Chapter 22 Writing A Maintainable And Readable Perl Script Longer Than 8 Lines
If there was such a thing as a readable and maintainable perl script longer than 8 lines they'd have to write a couple of chapters on that subject alone. Perl projects turn into unreadable spagetti code faster than red meat rots in the summer sun.
When I mentioned I wanted to increase the DSL bandwidth at my office because I wanted to do media hosting and I brought up the Nexland Pro800/Turbo, the network guys at my ISP told me that the Nexland was flaky for Linux/Unix systems. I run Linux, the network guy at my ISP runs BSD, don't remember which variation.
With the death of the 45 single, an artist can have a hit single that gets a tremendous amount of airplay. However, airplay (i.e. popularity) will not always translate into CD sales.
If you look at the Billboard singles chart (Hot 100), success there does not equate to CD sales since labels for the most part do not sell singles anymore and the singles chart is mostly based upon airplay stats.
The lure of Perl is that Perk junkies think that if they create a script that does in 5 lines what a C/C++, Java or VBScript server app takes 50 lines of code that they are working with something superior. This is completely false because I know I can code a C/C++, Java or VBScript faster than it takes a Perl fanatic to debug and get their crappy 5 line script to work "correctly", and my code is actually readable and maintainable by someone other than the author.
There is no such thing as a maintainable Perl script longer than 10 lines.
What they are doing makes perfectly good business sense. They could also throttle the bandwidth to 256k for basic service, and make the hard core users pay more for the full 1.5mbs.
I've accidently run into this turd's pop ups. Having to reboot my stupid Win98 machine because of this jerkwad is not something I enjoyed. He gives legitimate suppliers of adult entertainment a bad name.
150 secs vs. 5 secs: I Know The Story
on
Bitter Java
·
· Score: 1
I went through a similar object oriented problem. I created a credit card validation and approval system that in theory would only require a customized backend to integrate with any mechant account.
The results? It took 2 1/2 minutes on average to get the authorization code from the credit card service. The stripped down (1:1) code only took 5 seconds. Yes--150 seconds for an object oriented vendor independent abstracted version versus 5 seconds for a flat direct to their API version. This was on a test RedHat 7.2 Linux machine with 768megs of RAM and dual 533's with no users. I tried a different machine, RedHat 6.2, 640megs, dual 533's, no users, same results.
I played around with memory allocation for Resin, Apache, etc. No improvements.
Laws are what really matter. Since RFC 1036 is not a law, RR can play around with NNTP as long as they don't break it.
What RR is really doing is providing a mechanism for copyright holders to track down those individuals who post copyrighted materials on Usenet so that they can be prosecuted for their infractions.
I bought 8 new IBM 18GB SCSI LVDs from EBay for an average price of $60 each.
Speaking of performance, the IDE lovers should try writing and then reading a 1GB temp file. SCSI is always faster and the system doesn't slow to a crawl while doing the file write.
Linux is not viable on the desktop yet. It's all about the apps, not the OS.
Until Star Office or Open Office can match up with MS Office, Linux on the desktop is only viable for geeks. (I also like Photoshop, Dreamweaver, Cakewalk Pro, but don't see them being ported any time soon. GIMP ain't in the Photoshop caliber league inspite of what some people may think.)
Hardware compatibility is another problem. With all the winmodems and NICs out there that don't work with Linux how can you expect to get people to use it if you can't network? Replacing the NICs and winmodems isn't always the answer if you've got a cash strapped school.
If it takes an extra 3 or 4 hours plus the cost of extra parts to get a machine compatible with Linux, and you guestimate labor at $50/hour, suddenly buying an M$ license doesn't look so terrible.
I still like Linux on the servers, but on the desktop, it's got a long way to go.
I don't even send in registration cards anymore on the commercial software I buy, so why do you need to know my e-mail address?
Sending in registration cards in the past resulted in my name getting circulated to all sorts of different companies who bombard me with junk mail that I do not want nor am I interested in.
Giving you my e-mail poses the exact same problem, only spamming is cheaper and easier than sending snail mail.
Don't bother trying to teach them vi or emacs...absolute waste of time you want to show them the power not drive them away. I've been using vi for over 10 years and still find it to be as irritating today as when I was in college. Ditto for emacs.
Run XFree86 with something like gedit to modify your source files. The MCSD will feel at home since gedit is kind of like notepad.exe, leaving you to concentrate on the real nuts and bolts -- bash, cron and grep.
grep -Hin "phrase.to.find" *.sourceextention has saved me countless hours trying to find the right source file.
also, some sort of shell script to show the power of "gluing" together other programs can be helpful.
#!/bin/bash SOMEDIR="/usr/queue/temp" SIZELEFT=`df | grep "/dev/sda3" | awk '{print $4}'` MACHINE_ADMIN="root@localhost" if test -d $SOMEDIR then
pushd `pwd`
# only included for demo purposes
cd $SOMEDIR
echo $SIZELEFT > temp.stat
if test $SIZELEFT -ge 552356
then
echo `date +%Y-%m-%d" "%H:%M` "lots of space: " $SIZELEFT >> log.msg
else
echo "/dev/sda3: running low on disk space: $SIZELEFT" | mail -s "Warning: Space Low" $MACHINE_ADMIN
fi
popd
# only included for demo purposes else
echo "$0 - ooops! (no such directory $SOMEDIR)" | mail -s "missing queue directory $SOMEDIR" $MACHINE_ADMIN fi
The programming language with the best (i.e. developer friendly) IDE, debugging tools, and code wizards will ultimately win out.
Yes...the vi, emacs and gdb purists will have their opinions, but the majority of developers don't like banging their heads against the wall dealing with vi and emacs.
Although my Java apps run on Linux, I do all the development using Visual J++ v6.0 on Win95/98. Sorry, people, but Forte and JBuilder running on a Linux system are way too slow and suck up far too many resources for me to use them.
I also do a lot of VB development, and my perspective has always been if the java people could put together a development environment just as fast and easy to use as Microsoft's, Java would be unbeatable.
From a pure business prospective, since a 56K modem can do approximately 4k/sec in the "real" world. 8k/sec over a 24 hour period is about the same as downloading an entire CD's worth of material (approx 650 megs a day).
The only reason anyone needs to upload or download anything beyond 50 megs a day is to get porn or warez.
Businesses might need the bandwidth, but home users do not. In spite of all the talk about broadband multimedia, the truth is the old fasioned television is far superior to viewing a dinky little presentation on your PC.
Greatest Of All Languages?!
on
CPAN Shifts Focus
·
· Score: 0, Flamebait
Oh! You mean Visual Basic, the most widely used language in the entire world. VB currently runs on over 95% of all desktops and well over 35% of all servers in the entire world. A feat few other languages can claim.
I didn't know CPAN had VB. I thought CPAN was all about Perl. You know, that language that has modules that break when you upgrade from version 5.000 to 5.00X resulting in something akin to Perl's version of DLL Hell.
I don't know anyone who develops for the Microsoft platform (Windows or.NET) who uses command line compilers for anything other than "Hello World".
Anyone doing "real" development for the MS platform will get Visual Studio.
The productivity gains offered by Visual Studio more than offset the price gouging by Microsoft.
Now, if Sun or Borland could offer tools in the league of MS for the Java platform.NET would've been dead before inception. Forte and JBuilder are slower than molasses and are not particularily intuitive. Hence the ability of MS to come in and steal Sun's Java thunder with.NET.
Booting faster? Yes, XP/2000 technically boots faster because even after the GUI is up, XP/2000 is still continuing to load/start services. So, the machine is still not fully ready to run although technically, it looks like it is ready. My only Win2K machine is not truly ready until about 2 minutes *AFTER* the GUI logon shows up.
As far as XP being snappier, MS moved the graphics functions into the kernel with NT 3.5(1) because of the very fact that users were complaining about the sluggishness. What that means is that a bug in the video driver can bring your NT/2000/XP system to a dead halt that only the power switch (hard reboot) can fix. I know, it happens on my one Win2K server. It doesn't happen on my 5 Linux servers running the *EXACT* same hardware/motherboard/memory configuration.
The one advantage Win2K/XP has over Linux/Unix is that it is easier to set up using the default configuration. Other than uptime, the other major disadvantage of Win2K/XP is that tweaking and optimizing them is more cumbersome than tweaking/optimizing Linux/Unix.
The review states: "Also, tables inserted inside of MS Word documents do not translate..."
Unfortunately, after working with people in the property management, real estate, newspaper and public relations worlds, I have discovered that tables are an incredibly important part of MS Word and are a heavily used feature.
Footnotes and endnotes, which do work, are mostly used by students, academians, scholars and book authors, however, in the industries I've worked with (i.e. the "real" world) no one has used those features.
Until they get tables and charts working, MS Office is still the primary choice.
Chapter 22 Writing A Maintainable And Readable Perl Script Longer Than 8 Lines
If there was such a thing as a readable and maintainable perl script longer than 8 lines they'd have to write a couple of chapters on that subject alone. Perl projects turn into unreadable spagetti code faster than red meat rots in the summer sun.
Right you are buddy!
The biggest crybabies are the ones that suck up all the bandwidth in a desperate attempt to create their own personal pr0n or warez server.
It is within the right of any ISP to throttle bandwidth.
What RoadRunner should do is institute a metering system where people pay for the amount of bandwidth consumed.
The legitimate users are not affected by this.
"Be nice and don't kill this guy's downloads page."
I don't think 10 people downloading the PS2 build of Apache is going to kill anyone's download page.
Correction -- I don't think 3 people downloading the PS2 build is going to cause any problems.
When I mentioned I wanted to increase the DSL bandwidth at my office because I wanted to do media hosting and I brought up the Nexland Pro800/Turbo, the network guys at my ISP told me that the Nexland was flaky for Linux/Unix systems. I run Linux, the network guy at my ISP runs BSD, don't remember which variation.
A Linksys router costs about $60 for the one port model, about $90 for the 4 port 10/100 switch model.
If you are buying a router for $60 to $90, why would you need it to support more than 254 hosts?
With the death of the 45 single, an artist can have a hit single that gets a tremendous amount of airplay. However, airplay (i.e. popularity) will not always translate into CD sales.
If you look at the Billboard singles chart (Hot 100), success there does not equate to CD sales since labels for the most part do not sell singles anymore and the singles chart is mostly based upon airplay stats.
The lure of Perl is that Perk junkies think that if they create a script that does in 5 lines what a C/C++, Java or VBScript server app takes 50 lines of code that they are working with something superior. This is completely false because I know I can code a C/C++, Java or VBScript faster than it takes a Perl fanatic to debug and get their crappy 5 line script to work "correctly", and my code is actually readable and maintainable by someone other than the author.
There is no such thing as a maintainable Perl script longer than 10 lines.
Wrong!!!
Solaris was originally derived from BSD.
Cable modems use shared bandwidth.
What they are doing makes perfectly good business sense. They could also throttle the bandwidth to 256k for basic service, and make the hard core users pay more for the full 1.5mbs.
I've accidently run into this turd's pop ups. Having to reboot my stupid Win98 machine because of this jerkwad is not something I enjoyed. He gives legitimate suppliers of adult entertainment a bad name.
I went through a similar object oriented problem. I created a credit card validation and approval system that in theory would only require a customized backend to integrate with any mechant account.
The results? It took 2 1/2 minutes on average to get the authorization code from the credit card service. The stripped down (1:1) code only took 5 seconds. Yes--150 seconds for an object oriented vendor independent abstracted version versus 5 seconds for a flat direct to their API version. This was on a test RedHat 7.2 Linux machine with 768megs of RAM and dual 533's with no users. I tried a different machine, RedHat 6.2, 640megs, dual 533's, no users, same results.
I played around with memory allocation for Resin, Apache, etc. No improvements.
The intent of RFC 1036 means nothing.
Laws are what really matter. Since RFC 1036 is not a law, RR can play around with NNTP as long as they don't break it.
What RR is really doing is providing a mechanism for copyright holders to track down those individuals who post copyrighted materials on Usenet so that they can be prosecuted for their infractions.
$400 for an 18GB SCSI?!
I bought 8 new IBM 18GB SCSI LVDs from EBay for an average price of $60 each.
Speaking of performance, the IDE lovers should try writing and then reading a 1GB temp file. SCSI is always faster and the system doesn't slow to a crawl while doing the file write.
Linux is not viable on the desktop yet. It's all about the apps, not the OS.
Until Star Office or Open Office can match up with MS Office, Linux on the desktop is only viable for geeks. (I also like Photoshop, Dreamweaver, Cakewalk Pro, but don't see them being ported any time soon. GIMP ain't in the Photoshop caliber league inspite of what some people may think.)
Hardware compatibility is another problem. With all the winmodems and NICs out there that don't work with Linux how can you expect to get people to use it if you can't network? Replacing the NICs and winmodems isn't always the answer if you've got a cash strapped school.
If it takes an extra 3 or 4 hours plus the cost of extra parts to get a machine compatible with Linux, and you guestimate labor at $50/hour, suddenly buying an M$ license doesn't look so terrible.
I still like Linux on the servers, but on the desktop, it's got a long way to go.
I don't even send in registration cards anymore on the commercial software I buy, so why do you need to know my e-mail address?
Sending in registration cards in the past resulted in my name getting circulated to all sorts of different companies who bombard me with junk mail that I do not want nor am I interested in.
Giving you my e-mail poses the exact same problem, only spamming is cheaper and easier than sending snail mail.
Don't bother trying to teach them vi or emacs...absolute waste of time you want to show them the power not drive them away. I've been using vi for over 10 years and still find it to be as irritating today as when I was in college. Ditto for emacs.
Run XFree86 with something like gedit to modify your source files. The MCSD will feel at home since gedit is kind of like notepad.exe, leaving you to concentrate on the real nuts and bolts -- bash, cron and grep.
grep -Hin "phrase.to.find" *.sourceextention
has saved me countless hours trying to find the right source file.
also, some sort of shell script to show the power of "gluing" together other programs can be helpful.
#!/bin/bash
SOMEDIR="/usr/queue/temp"
SIZELEFT=`df | grep "/dev/sda3" | awk '{print $4}'`
MACHINE_ADMIN="root@localhost"
if test -d $SOMEDIR
then
pushd `pwd`
# only included for demo purposes
cd $SOMEDIR
echo $SIZELEFT > temp.stat
if test $SIZELEFT -ge 552356
then
echo `date +%Y-%m-%d" "%H:%M` "lots of space: " $SIZELEFT >> log.msg
else
echo "/dev/sda3: running low on disk space: $SIZELEFT" | mail -s "Warning: Space Low" $MACHINE_ADMIN
fi
popd
# only included for demo purposes
else
echo "$0 - ooops! (no such directory $SOMEDIR)" | mail -s "missing queue directory $SOMEDIR" $MACHINE_ADMIN
fi
The programming language with the best (i.e. developer friendly) IDE, debugging tools, and code wizards will ultimately win out.
Yes...the vi, emacs and gdb purists will have their opinions, but the majority of developers don't like banging their heads against the wall dealing with vi and emacs.
Although my Java apps run on Linux, I do all the development using Visual J++ v6.0 on Win95/98. Sorry, people, but Forte and JBuilder running on a Linux system are way too slow and suck up far too many resources for me to use them.
I also do a lot of VB development, and my perspective has always been if the java people could put together a development environment just as fast and easy to use as Microsoft's, Java would be unbeatable.
From a pure business prospective, since a 56K modem can do approximately 4k/sec in the "real" world. 8k/sec over a 24 hour period is about the same as downloading an entire CD's worth of material (approx 650 megs a day).
The only reason anyone needs to upload or download anything beyond 50 megs a day is to get porn or warez.
Businesses might need the bandwidth, but home users do not. In spite of all the talk about broadband multimedia, the truth is the old fasioned television is far superior to viewing a dinky little presentation on your PC.
Oh!
You mean Visual Basic, the most widely used language in the entire world. VB currently runs on over 95% of all desktops and well over 35% of all servers in the entire world. A feat few other languages can claim.
I didn't know CPAN had VB. I thought CPAN was all about Perl. You know, that language that has modules that break when you upgrade from version 5.000 to 5.00X resulting in something akin to Perl's version of DLL Hell.
Judges and lawyers are not techno saavy.
They understand writs, briefs, prior decisions, etc., but technology ain't one of them.
Are you on drugs?!
.NET) who uses command line compilers for anything other than "Hello World".
.NET would've been dead before inception. Forte and JBuilder are slower than molasses and are not particularily intuitive. Hence the ability of MS to come in and steal Sun's Java thunder with .NET.
I don't know anyone who develops for the Microsoft platform (Windows or
Anyone doing "real" development for the MS platform will get Visual Studio.
The productivity gains offered by Visual Studio more than offset the price gouging by Microsoft.
Now, if Sun or Borland could offer tools in the league of MS for the Java platform
Who cares about looking better?!
Booting faster? Yes, XP/2000 technically boots faster because even after the GUI is up, XP/2000 is still continuing to load/start services. So, the machine is still not fully ready to run although technically, it looks like it is ready. My only Win2K machine is not truly ready until about 2 minutes *AFTER* the GUI logon shows up.
As far as XP being snappier, MS moved the graphics functions into the kernel with NT 3.5(1) because of the very fact that users were complaining about the sluggishness. What that means is that a bug in the video driver can bring your NT/2000/XP system to a dead halt that only the power switch (hard reboot) can fix. I know, it happens on my one Win2K server. It doesn't happen on my 5 Linux servers running the *EXACT* same hardware/motherboard/memory configuration.
The one advantage Win2K/XP has over Linux/Unix is that it is easier to set up using the default configuration. Other than uptime, the other major disadvantage of Win2K/XP is that tweaking and optimizing them is more cumbersome than tweaking/optimizing Linux/Unix.
The review states:
"Also, tables inserted inside of MS Word documents do not translate..."
Unfortunately, after working with people in the property management, real estate, newspaper and public relations worlds, I have discovered that tables are an incredibly important part of MS Word and are a heavily used feature.
Footnotes and endnotes, which do work, are mostly used by students, academians, scholars and book authors, however, in the industries I've worked with (i.e. the "real" world) no one has used those features.
Until they get tables and charts working, MS Office is still the primary choice.
This guy is proof that intelligence in one area does not equate to intelligence in other areas.
A good lawyer can be an idiot at everything else in their life except the legal process.
A good hacker can be an idiot at everything except hacking.
It would work on the condition that Linux/AOL had a word processing and spreadsheet program that looked and functioned just like MS Word and Excel.
Star Office doesn't count because it's a lousy piece of crap that doesn't even come close to what MS has to offer.
Internet access and functions are only 1/3 of the equation. The remaining 2/3's continues to be the client heavy local apps.
People/businesses buy an OS so that they can run a specific app or set of apps.