Leinninger.com

September 14th, 2001:
Code Snob

What is good code? Any developer with a few years of experience will provide a different answer. My answer is simple: do the most with the least. This simple rule dominates even nature itself. Overly complicated systems require greater upkeep and maintenance. During the early evolutionary stages of our planet, overly complicated species faded into genetic obscurity. Early programing languages followed the same pattern. Complication without reason will only breed more complication.

Whoa!

Today, many developers openly brag about their 250,000 line application: “Just let (the next guy) try to figure THAT out!” Although this may ensure job security, it is truly no way to better your development environment. What is to be gained by a 250,000 line application that performs the same task as a 10,000 line script? Unless you’re paid by the bit, nothing.

A little over a year ago, our team inherited code from another group. We’re responsible for a major online financial resource, offering information and services to tens of thousands of visitors daily. Our team is web targeted and trained. We know good code, back end to front end. The original team consisted of desktop application developers accustomed to long development cycles, endless code, and poor communication. They built the original site as if it were a desktop app. That’s all fine and good if you’re in a market that moves at a snail’s pace, but the financial marketplace is constantly redefining itself. We couldn’t afford to have six month code cycles.

Good posture is key!

The first thing to go were object oriented (OO) tools for generating html. I’m not just talking about off-the-shelf products. The old team actually wrote Visual Basic and C++ applications to generate and/or compile their html for them. While I can appreciate the inner workings of their code, I can’t justify it’s use. With such tools we lost all flexibility. The smallest change required the use of cumbersome tools and a lot of waiting. Rule 1: If you can code it by hand, do so. Application wizards and assistants can be useful if you’re stuck. We must remember, however, that these tools were developed to help everyone to anything. A specially tailored code solution will to the job as well, if not better, with less code.

Another thing we noticed almost immediately was the complete lack of inline comments in the code. The comments that were found were more enigmatic than the code itself. Clear comments will help you when writing your closing docs (covered later) and assist when you have to debug your code later. In most cases, comments cause no extra bloat in modern code. Compilers ignore them, as do most modern runtime interpreters. The one glaring exception to this is HTML. Not only will those comments cause code-bloat, they can be a little too helpful to some visitors snooping through your code.

Reusable code is key. Not only can it save time, it limits possible points of failure while reducing the total number of lines of code. Although good reusable code may take longer to prepare initially, you will save time in the long run. Be prepared for future features, but you don’t have to implement code for them. A lot of the excess code in the old site was placed there for future changes that never happened. (Some things were as surplus as directories for features that were never needed or even planned on!) Simply recognize that changes will be made at some point to some of your code. Don’t code it into a circle. Make sure others can add to it easily. (Use clearly defined variables, group similar functions together, etc.)

Agree on a standard for variables and general code format early in the development cycle. If existing projects established these standards already, use them. Depending on your environment, you may have different formatting standards for different languages. Keep this to a minimum whenever possible. When size restrictions permit, limit the use of obscure abbreviations. (You may know that intlStatMtd means “internal status method”, but somebody else most likely won’t, unless you’ve established this in a comment or doc.)

Good posture is key!

All coders hate writing documentation, yet we all complain when we have to work on a project for which there is none. It is a necessary evil. There are a few things we can do to make writing and maintaining docs a little less painful. Use a template; most pro shops have established doc templates with an outline of the suggested content ready for you to fill out. If your shop does not yet have one, find an example of one you like on the internet and present it to your team leader. You’ll get a gold star on your forehead as well as some peace of mind. If you’ve included good comments in your code, consider yourself half-done already. Start cutting and pasting. Most projects start out with a spec. Most of the intro content for you doc can be pulled directly from the spec. Finally, remember to update your docs when changes are made to your code.

All in all, good code is the result of conditioning:

  • Brevity is bliss. Nobody likes a joke that takes forever to get to the punch line. (Exception: Comeback College. Ask George.)
  • Stay away from packaged solutions. They’re for everyone, not just you.
  • Write good comments, it’ll help if you fall on your head mid-code.
  • Write methods and functions that can be reused. Nobody likes code-bloat.
  • Standardize your code format. It just looks so damn pretty.
  • Write and maintain accurate documentation. You can tell your friends that you’re a programmer and an author.

Well, what are you waiting for? Why are you reading this? Don’t you have code to write?! Get to it!


Further information and related links:

Perl.com Coding Standards Guide
WebStandards.org
Good code format opinion
Ars Digita Documentation Template Example (pretty good)

- Duane

May 22nd, 2001:
Stupid is as Stupid does…

The nation as a whole is moving towards stupidity. If Darwin was right (and he was, by the way), we will be a country comprised of soft-skulled idiots with no sense of balance. Every day society makes it easier for idiots to continue living. We protect them, guide them, even admire them. This has got to stop.

They are not kidding!

Last night, Brian and I were watching a program on the History Channel about the manufacturing of aircraft during World War 2. Women were riveting while balancing on aircraft frames with no protective glasses, midgets (I kid you not) crawled inside wings to push rivets through with no regard for physical safety. Nobody complained, they just worked their asses off for love of country. Patriotism aside, these people were in real danger. Today a dozen safety commissions would have regulated those factories to a crawl. I’m all about safety, but the only governing regulation controlling those workers was common sense. If you shot a rivet through your foot it was your own goddamn fault for pointing it there. Not the rivet gun manufacturer’s (for not having a safety), or the factory for not training you better. You just knew that if you pointed the rivet gun at your foot you were going to feel some pain.

Part of the reason we have so many stupid adults is the fact that they’re not thinning out in childhood. (I’m about to come dangerously close to Dana Carvey’s grumpy old man character, so hold on…) Back in the day, there were things like six foot tall jungle gyms shaped like rocket ships embedded in a concrete foundation. It was every healthy child’s goal to climb to the top of that death trap. Often children fell, if they were lucky, they landed on another kid. However, they were much more likely to land squarely on their ass at the bottom of the playscape. Sure, they cried a little bit, but the next time they scrambled up that metallic skeleton, they sure as hell held on a little tighter and watched their footing a little more carefully. If they didn’t they were stupid. If they were stupid they probably weren’t going to make the cut anyway.

Today, the closest thing to those heaps of scrap iron shaped into spacecraft is the playscape (much more politically correct than “jungle gym”, eh?). Gone are the metal slides that would reach temperatures of 200 degrees fahrenheit, melting the outer layer of skin off of any child that dared brave it’s perils. They have been replaced by brightly colored, curvey plastic slides. Anything even remotely sharp has either been filled down, covered with rubber or removed. Playgrounds are covered in some bizarre soft rubber material so kids can fall down with out skinning a knee or bumping their heads. How can we expect children to understand that falling down is dangerous if it really doesn’t hurt that bad?! It’s more dangerous for little Timmy to walk down the street with his mother than it is for him to run full bore, headlong into a pile of his favorite toys.

We were never required to don a helmet before mounting our training wheel equipped, banana seat sportin’ Schwinns. Our only hope was to throw ourselves in the direction of the nearest lawn in the event of a bail. Skateboarding was a different story, even I wore pads when attempting to skate. A helmet though? No way! Those things were too damn expensive… but I knew my limits and respected them. Sure, I smacked my head many times, but I’m pretty much o.k. today. That’s where the soft-skulled idiots with no sense of balance come in.

Kids today live without fear for their actions. If they fall they’re protected. If they make a mistake, chances are they can try it again without harm. They are sheltered from the gore of daily living. They never see the horror of the real world. I remember when an anvil falling on a coyote was a laugh riot. Today no animator would even dare draw that. They be sued and fired in an instant. Kids are so protected that they wouldn’t have the common sense to know that they shouldn’t drop an anvil on their little brother. Because some kids have lived without fear for the results of their actions they decide that they can march into school and start shooting. They don’t know pain, they don’t fear the outcome. They never fell off of their bike while doing 30 mph downhill. Maybe that would have knocked some sense into them.

If these idiots do make it to adulthood (and they have a lot better change today than they did 10 years ago), they will do anything they can to prove that they do not deserve to exist. They are the ones that don’t know that coffee is hot. Thank them for the fast food coffee cups the words “Caution!!!! HOT!!!!!” blaring at you in 20 different languages. They are the ones in their giant SUVs talking on their cell phones while rolling along at 10 mph under the speed limit. They are the one that are still driving those SUVs on tires that were recalled because they explode causing rollover accidents. It is those people that make life difficult for people with a grain a common sense.

Heads up!

Head’s up!

It is time to stop holding everyone’s hand. If the oven is hot, don’t stick your head in it. If we let common sense rule, our rulers might have common sense.

Stop the maddness!

Further information and related links: Firestone Tires Tire recall ad Stupid people The Darwin Awards Chrome Ribbon Campaign Voluntary Human Extinction Movement

- Duane

April 18th, 2001:
Tainted Web

I’m a web developer, not just a guy that builds web sites for relatives and hobbiests. I design and implement complete commerce solutions, interactive media centers, and even a few online brochures. I make a pretty good living at it too.

I’ve been working with internet-related technology since 1993 (that’s before the world wide web actually existed in any formal way for you young-ins). I’ve been coding html since 1994… back before html tables even existed. I continue to stay on top of the latest trends and technology. I also work for a well known software company that has a number of very popular commerce and financial web sites. I am part of the machine.

I've got a hand up my a$$!

When I started investigating the web, it was nothing more than an extension of the bulletin board systems (BBS) that I had used throughout my high school life to find software and talk to other geeks. It was a mysterious entity that very few people knew about. Back then, it was nothing more than a few gopher (kind of like limited telnet interfaces running from menus rather than complete command-lines), ftp, and usenet (newsgroup) servers. There was no reason for non-computer-types to use it (i.e. no pictures) and it was great. It was an uncensored, unregulated, open space for people to express themselves and exchange ideas. There were no advertisements or intrusive pop-up windows. Just raw, pure information streaming onto the screen at a blistering 9600 bps.

Within a few months the web began to evolve. Hyperlinks and html were the “hot new thing.” I discovered lynx, followed shortly by Mosaic. The colored text and click-able interface entranced me. There was no turning back. Ads were still a rarity, as was much valuable content. Occasionally an opportunity to buy something online presented itself, but e-commerce was still in it’s infancy (at best). Mere months later, gifs and even jpegs were commonplace. Online porn started to appear en masse. The internet was still untamed. It was the wild west of the information age, just coming into it’s own. People flocked to the web in search of quick wealth. Small businesses were suddenly on equal ground as the big boys. I started to work with html professionally and even worked with/co-owned a few start-ups… I wasn’t even 21 yet.

Then, the online goldrush hit. Companies erupted from the digital horizon. Big names poured massive amounts of green into their online presence. People that had never turned a computer on in their life rushed to consumer electronics stores eager to buy anything that could get “online.” The electronic frontier started to tilt towards corporate control. Small businesses could no longer compete on a level field with the big boys. They began to over-regulate and under-perform while remaining over-valued.

Even web development became corporate. I admit that I sold-out early, but I was fortunate enough to join a big company (with big funding) that maintained a young start-up’s attitude. The area’s most hip development houses were gobbled up by large communication companies or ad agencies. Some entrepreneurs retired young, others dressed up their resumes and went job hunting. People altogether stopped visiting Joe-Nobody’s online bookstore and flocked to Amazon. URLs floated at the bottom of every television commercial. Microsoft even admitted that this whole internet thing might be more than a fad.

Mmmmm.

Without warning, the iNvasion began. Apple Computer introduced the iMac personal computer. It was friendly, easy to use, and came in pretty colors. Everybody jumped on the bandwagon. People bought candy-colored cd players, file cabinets, even fat-free grills! Everything suddenly became iEnabled, from radios to fishing poles. The internet candle had been burning with the power of a solar flare, it couldn’t last forever… and it didn’t.

Suddenly, Wallstreet recognized that companies, even those with pretty web sites, aren’t worth anything unless they make money. What a concept. The value of such “promising” newcomers as pets.com, Disney’s go.com, and even seasoned veterans like toysrus.com and AOL began to show weakness. During a business trip to Silicon Valley, I observed dozens of vacant offices that very well might have housed such almost-made-a-profit companies like e-pickles.com or iDoormat.net.

The corporate world made a mistake. They barged in too early, pissing gasoline onto a raging inferno. With a mindset of “if the little guy can do it, we can do it bigger and better”, they flooded the digital domain with lawyers, committees, and uninformed stockholders. The machine stripped the innocence and curiosity of the web and force fed bite-sized chunks of information to the masses. They over-analyzed every detail, micro-managed every feature, and over-produced every project. The collective online public willingly rolled up their sleeves and overdosed on corporate bullshit.

Companies are bailing on the digital new world. Business analysts are directing their over-paid, suit-wearing, project managers to escape while they can, like rats leaving a sinking ship. Corporations are scaling back their online business strategies and re-evaluating their technology budgets. Good.

I am the Grim Reaper!

After the dust has settled there will be a vast wasteland, abandoned by corporate America. It will be up to us, the connected community, to restore the internet to it’s former lustre. The corporate world will watch us, preparing for the next “big thing.” We will continue to share real information with each other. Idea will be free and technology will flourish once again. We will not be hindered by non-disclosure agreements or departmental approval.

Sure, some companies will remain, but the ones that will truly succeed are the ones that know their place and are capable of co-existing with the rest of us. They will understand that they don’t have to buy up competition to succeed, they just have to compete. They don’t have to advertise during the superbowl, they just have to deliver what they promise. They don’t have to micro-manage, they just have to work hard. Like the rest of us.


Further information and related links:

100 Dumbest eBusiness Moments
Fu#%edCompany.com
Sigma6 was bought by AppNet, who was bought by Commerce One
eBusiness.com – watch ’em fall
Chrome Ribbon Campaign
Internet Killed the Video Star

- Duane

March 8th, 2001:
Need for Speed, Part 1

I like cars. A lot. I can’t pinpoint the moment I realized this, but I know it happened around the age of 17. A highschool friend of mine had a Chevelle Malibu that he worked on constantly. Dave Damore embodied a calm cool that I rarely encounter these days when it comes to cars. What he had was good enough. He worked on it. He knew it inside and out. He appreciated other people’s work. It didn’t matter who was faster, spent more money, or looked better. It was enough to just be part of it.

I wasn’t really a part of it, but I longed to be. My 1984 Chevrolet Eurosport was the embodiment of everything that was wrong with the American “cookie-cutter” car. The anemic 2.8 liter V6 was disgustingly underpowered. The throttle-body inducted engine hesitated to every command of the accelerator. Dave tried to make me feel better by explaining the lineage of that damned car. The Chevelle became the Malibu, the Malibu became the Celebrity, and the Celebrity was the Eurosport. I have no idea why it was given that name. (Interestingly enough, the Eurosport became the Beretta, which once again became the Malibu… in a sad V6, front-wheel-dive incarnation.) I had what fun I could with my sickly little car. I added a PA system that allowed me to heckle other motorists and torture drive-through attendants at Burger King. I did what I could with the stereo and even replaced the stock exhaust with a real Cherry Bomb muffler. It almost sounded good.

When that car was on it’s last leg I sold it. It wasn’t long for this world and I was sure it couldn’t take the hour and a quarter drive to and from Novi (where I worked at the time) every day. I replaced it with a (used) 1989 Chrysler LeBaron GTC. Not too impressed, eh? That car was amazing. The ride was as smooth as my parent’s LHS with just as many goodies (LH series climate controls and navigation). Let’s not forget the potent little turbocharged 4 banger under the hood. This sleeper could embarrass most stock Fox Bodies found making the rounds on Gratiot every night in the summer. Alas, this car was the victim of overwork and undersleep. Following several 14 hour days and an all night phone/mind game with an ex-girlfriend I began to doze off while driving through a malfunctioning blinking yellow light. The rest is history.

My next car was my first real muscle car… well, at least it looked like one. A co-worker was selling her 1989 Pontiac Firebird Formula. Red, T-tops, V8, 245 rubber on 16-inch wheels. I could tell immediately that it wasn’t as fast as the LeBaron, but I thought it had more potential. If I only knew then what I know now. Like the Eurosport before it, it breathed and drank through TBI, a power-robbing alternative to the less environmentally-friendly carburetor. Apparently, that year there were 3 V8 options for the Firebird. The TPI 350ci Formula 350/Trans Am, the TPI 305ci Formula, and the 305ci TBI Formula. The latter of the three, while still a V8, produced a sad 170 hp! There were so many tree-hugger mods on the thing that it lost 100 hp to the 350! I did what I could over the years and currently have it near an honest 250 hp. I still own it and it continues to run great.

Once I was working full time I was able to afford my first new car. I leased a 1998 Subaru Impreza RS. It was the first import anyone in my immediate family has ever owned. Impressed by the recent World Rally Championship wins and the performance of the 2.5 liter, horizontally opposed, boxer engine (~165 hp, 5 less hp than the Formula’s stock output, and half the size… in both cylinders and displacement) mated to full-time all-wheel-drive. The Impreza is absolutely a thrill to drive while providing a safe means of transport during the dreaded Michigan winters. While researching this car I began to find out more about the import scene… both good and bad. There seemed to be a strong following with a lot of promise. I admit to being pretty old school when it comes to pure power, yet I’m impressed by what some of these guys do with their Civics and Talons. Some of my closest friends are very involved in the import racing scene. We’ve had many discussions about Detroit iron vs. Import technology. Most of us still respect each other at the end of every “discussion.”

My latest endeavor is a 1999 Chevrolet Camaro Z-28. I firmly believe that I’ve finally done the right thing. The car has plenty of power and unlimited potential. I’d love to install a supercharger, upgrade the suspension, and bolt on bigger wheels and tires. However, for now this is more than I need.

It all comes back to what Dave Damore said. It’s good enough… for now.


Also available: Part 2

Further information and related links:
The Rice Boy Page
LS-1 Performance
Import Performance
Hot Rod Magazine

- Duane

February 21st, 2001:
Greedster

Today I had a heated discussion with a number of friends about the impending “changes” to the Napster music sharing system. Here is the thread:

Brian:

I kind of hold the same attitude towards music as I do towards PC games. Try it out for free (crack, illegal copying, or otherwise) but if you like it, just buy the damn CD or game. I liked solder of fortune, so I bought it. It was worth $29.95.

[Napster]

Think about it though… even if you like one song on a CD.. for the number of times that you’ll eventually listen to it, it’s worth the $15 bones or whatever you end up paying. I suppose most people just look at the up front cost and don’t realize that they’ll probably own the CD for several years and listen to it hundreds of times. I’ve definitely gotten $18 bones worth out of my Soundgarden CD.

Better yet, rip the mp3’s and send a check directly to the musician. They’ll love you.

Duane:

I have no problem paying a $5-10 fee to subscribe, but don’t cripple it. Most of the stuff that I download is one-hit wonder stuff… the kind of CDs you don’t want to clutter up your shelves. I bought the Crazy Town CD (butterfly) and it sucks… it wasn’t worth the $17 I dished out for it.

With 20 million users on napster with a $5-10 fee per month the record companies would make more than what they currently make from radio station licenses. The only difference is that they wouldn’t be able to control the radio station playlists or manhandle markets based on the per-capita mainstream.

If you’re hardcore, you can still record digital music from your cable box (music channels) and make MP3s, or just borrow a CD from your friend and rip it. This solves nothing, it’s just holding the industry back.

Personally, I plan to frequent IRC and Hotline servers a lot more and fuck the man.

Duane:

I think that streaming MP3s and personal MP3 players in cars, etc. are the next step. First there was AM radio, the FM in stereo. Now we can make personalized music selections and have access to any song any time. Since “satellite radio” has gone nowhere in the past 10 years, despite promises and a billion articles in Popular Science, the music-listening public deserves something better. CDs are over priced (you can get a friggin’ DVD for the price of most CDs!!!!!!), and often contain a handful of songs that you’ll listen to.

I like buying CDs, especially for bands that I can listen to over and over again. Sometimes I’ll download an MP3 and never listen to it again, I just wanted to hear it ONCE!!! Additionally, you can never be guaranteed that you’ll be able to find the CD you want when you want it (like that Damn “Surface” song, right, PG?). What about new releases? When Pearl Jam was at it’s peak, I couldn’t get the CD anywhere in Grosse Pointe because every store was sold out!

Brian:

My theory: The idea of “singles” off of an album is bullshit. I hate radio because they try to cherry pick songs out of a CD to make money. Would you read one chapter of a book and put it down?

I like the Zeppelin way of thought: They created albums, not songs. So what happened? Zeppelin didn’t really make a dent in the single charts at all, but they sold shitloads of records. That’s the way it needs to be done. I don’t know who Crazy Town is, but they don’t sound amicable enough for me to buy the CD, ya know?

[Lars! Fire Bad!]

I would say that of the CD’s I listen to, I like at least 75% of the songs on each of them. I accomplished this by not listening to songs of the radio and “nitpicking”, but networking within bands. Reading liner notes, finding out who influenced them…etc. Music is a weird thing.. in order to get true enjoyment out of it, you have to put some work into it. If you don’t, you get shallow pop songs by untalented bands that wear thin quick.

Compare it to grabbing a tabloid at the checkout as opposed to reading a good novel. Yea, you can grab the tabloid and skim through it.. easy and quick: But no content. The novel takes some effort and reading time, but I’m sure it’s going to be much more in depth and enjoyable.

Uhm. Yes.

Duane:

So, you’re saying that there a no CDs that only have a song or two that you like? Are you also saying that you can go into any RecordTown and find any song you want? I know for a fact that with your “selective” musical tastes that you can’t find what you want everywhere. If you’re paying $10/mo. you can download what you want, when you want it. I can go on napster right now and download a Dwarves song. I bet my left nut that I can’t saunter into Best Buy and do the same. How about those late nights where you coding your ass off until 4 in the morning and you need a little pick me up. Hit napster and get a song or two… any time… 24/7!

Groups don’t make the real money from CDs, they make it from merchandising, guest appearances, and tours. Album sales are designed to recoup the record labels investment in a band. If you have “x” potential, they invest “x” amount in recording, mastering, publicity, and marketing. Then they expect your album sales to pay them back. Most groups don’t meet the estimates, but the 1% that do make up for the rest with a fat price tag of $15-20 a CD. The little guys get pinched out of the sphincter of the big labels.

Record companies need to let go of the old model and incorporate napster and electronic music distribution into their plans. Rather than pressing a billion CDs and giving half of them away, publicize and release music to radio stations electronicly (192k is better than FM radio quality).

’nuff said.

Brian:

(I think everyone’s probably sick of this by now) But I like all the Dwarves songs.

Any CD’s with one or two songs I like? Honesty? There aren’t. I should say “There aren’t that I know of”. If there are, then that band shouldn’t be making a record and I won’t give them my attention or $$$. I buy into bands, not songs. Hopefully the ones I give my $$$ will turn around and make yet another awesome record. It’s worked for Speedealer and Supersuckers, and Ultra Bide, and …well, you get the idea.

I also don’t buy into the “give me convenience or death” way of life. Look how fat it’s got us so far. If you want something to last and be meaningful, put some work into it. It works with web sites, right? Try it with music!

When purchasing CDs however, you just need to know where to look: Repeat the Beat (Plymouth and Royal Oak), Record Collector, Tower Records in AA, Schoolhouse Records, Half Moon Records… that’s just a start.

Most of the time you can get the CD you want used for 1/4 as much as you’d pay for it new. I got that Mazzy Star CD for $5.00!!! Works like a charm too, no scratches at all. I’m sure you remember after the ‘puter show.. I got like 4 CD’s for $20 bucks total!!

I’m all for the digital revolution. I just think that some things are better off not being not being that way. Sure you can shoot off an email, but it’s just sooo much cooler getting a hand-written letter (got one from Dana yesterday, with a “I Love Mullets” sticker in enclosed.. it’s going on the guitar.)

Give me the gadgets, but don’t take away the subtle things. Going around town looking for a CD with a couple friends is pure bliss. I remember running around town with Brad, Mike and Ingrid looking for that Thrall CD (which I like every song on, BTW)–found it at the AA Tower Records. I ran in there and found it and was jumping around… That was so much fun! For some reason, I just don’t think I would have the same memories downloading them from Napster.

I agree with the money shit. Hence my send a check directly to the musician, or stay away from the major labels (which generally don’t inhabit my musical domain much anyway). Once you’re in the band thing for a while, you start to learn how it works.. and why I feel the way I do. Bands & People(r) don’t pick the music they listen to off of FM, the suited-corporate-drone-A&R guys do. How does that single sound now? I’ll pick my own. It’s soma for the masses, baby! (Thrall quote)

Ok, I have to work now 🙂

Brad:
When I grow up I want to be DW.

All of these are great points. I leave the conclusion of this discussion to you. Can this emerging technology kill new bands and cripple big record companies? Will it allow radio stations to share new music that would otherwise never be heard? Will it cost $9.95 a month and require a contract?

We’ll see…


Further information and related links:

Napster
Speak out against restricting Napster
Artists Agains Piracy
Make Lars happy, he needs the money…

- Duane

Devtroit