Jul 10 2008

When you’re a software developer…

You’ve got to work in teams, or at least you’ve got to work with the idea that someone OTHER THAN YOURSELF is going to be working with your code at some point. I’m sure there are some people out there developing some crazy proprietary stuff that will never release their code to anyone but the client.

I haven’t blogged in a bit, but today’s boiled my blood enough that I kind of had to.

If you don’t code, just wait for my next post.

And without further ado: Danny Iachini, since you’re the only one in the intersection of “reads my blog” and “codes a lot” (at least that’s apparent to me)

So I’m doing this project that was made awhile ago by some guy I’ve never met (thank goodness) and I’ve been plenty mouthy about my issues with this project. It’s a management system for a global company to keep track of their products and statuses and servicing and stuff like that. It also includes an RMA system. I inherited most of the code, which is script-based, and went to work patching things up and adding a few little functions here and there.

Sadly, no two coders are alike, but I think that most coders have common ideas about what is efficient, scalable, and elegant. I am working with code that is none of these things.

  1. First off my number one problem with this code, is the goddamn whitespace. For any non-coders reading this, whitespace is sort of like indenting your paragraphs in a word document. it makes it easy to read, easy to see where paragraphs start and end, and you’re quickly able to see the details when browsing quickly. Whitespace is a programmers best friend. This guy doesn’t use it. No tabbing inward, although sometimes random spaces are thrown in to sort of emulate the idea of whitespace without it being consistant at all.
  2. Now, I don’t know if this is a valid complaint, but I’ve always coded php using echos. So, in other words, I echo out what I need in the dynamic parts of the page, interrupting strings to concatenate variables into it where they’re needed. This means that I’ve got solid blocks of PHP embedded in whatever other code I’m working with. This guy does the opposite. He interrupts a huge big list of html (that all gets processed by the server) with multiple sets of php-openers and closers for things like end-brackets and if-statements. ugh. Not only does this make it ugly, segmented, and longer/more taxing than necessary, but coupled with the lack of whitespace, i have NO clue where one function will end and another begins. It’s horrid.
  3. This guy’s variable names are full of capital letters, underscores, and all sorts of other fun crap that I have to hit the shift-key for. Thanks for taking up my time because you want to be extra accurate in naming this column Product_Name instead of simply productname.
  4. The database. Ugh, I don’t even want to get into it. There’s more redundancy per table than I’ve seen anywhere lately. A good example is in the RMA system. There are flags for steps of the RMA (it being received, investigated, and returned), as well as dates for when these processes were completed. What I don’t get is why the flags need to be there. It’s an extra set of columns in the table used for determining if something had been done yet. YET you could just as easily have a script investigate that for you just by testing to see if the cell is empty or not. That’s just one example. There’s tons.
  5. Error messages are passed through request variables in the URL. When’s the last time you were ever at http://a-site.com/?I’m sorry you can’t view this page because you’re not logged in. ?? ugh.
  6. I don’t know the previous author’s grudge with more than one file, seeing as every file has about 1000 lines of crap that could easily be split into function-specific files. Instead of edit_products.php, why not just have edit_product1, edit_product 2, and so on…
  7. Well that’s it. I’m done ranting. I feel better now.

    Oh yeah there are california videos and stuff if you can find them ;)


Mar 9 2008

Happy DST-Slash-Unofficial-Beginning-Of-Spring!

Today is honestly my third favorite holiday of the year. Right after Christmas and Thanksgiving. Laugh if you must, but Daylight Savings Time is a yearly major improvement of the quality of my life. An extra hour of daylight (that would have been missed while I slept) and increasing temperatures is just what I need after a long, nasty, depressing winter.

There were a few days this week where it was warm and the snow melted. I wore flip-flops, refused my jacket, and really enjoyed myself. Sadly, last night decided to get ugly and snowy, but this doesn’t destroy my hope. Spring will always win in the end.

Spring and Summer are by far the best seasons for me. It’s nice to have changing leaves in the fall, but after a few weeks (including the dropping temperatures) I am quite fed up with it. Winter always hits me delightfully. I love the first snow. Then I hate the subsequent months of it. I think this is why I like Spring so much. It takes away the general gloom of post-first-snow-novelty-slush/snow/darkness.

Here are some things I’ll be looking forward to in the coming months:

  • Not having my car door freeze shut on me: Last night I had to ice skate back to my car, climb in through the passenger side, and brave a drive home that could lightly be called “dangerous”.
  • Warmer temperatures in general: Not having to bundle up every time I want to go downtown brings a lovely sense of freedom.
  • Light past 6pm: The sun’s working a little more with my schedule finally.
  • Vegetation: This is a big one. Plant life coming back is really uplifting. It makes being outside enjoyable
  • Fireflies: The Pennsylvania state insect is the Pennsylvania Firefly (“Lightning bugs”). When these guys come out, it makes a night in the spring or summer simply awesome. I always get mad when people squish them.
  • Shoes become non-compulsory.
  • Outdoor naps become acceptable again.
  • The Blue Loop (campus bus) won’t always be full because people don’t want to walk in the cold. And even if it is, who cares, it’s nice out anyways.
  • Rain will be enjoyable instead of bone-chilling.
  • Thunderstorms will return to be watched.
  • Stargazing becomes a possibility for a night’s activity.
  • My birthday will happen (and all the subsequent madness of turning 21 at PSU)
  • Outdoor activities (hiking, frisbee, barbecues, sunbathing, etc.)
  • Fewer instances of Raynaud’s Phenominon: I have this circulatory weirdness when my hands are exposed to cold temperatures. The second they start to warm up, the blood vessels in my fingers constrict and my hands change colors a few times and it really kind of hurts. It’s a minor annoyance but an annoyance nonetheless and the only time it happens during Spring is if I hold a cold drink for too long. So, yeah. woo woo.

K, so that’s all I could come up with right now. I’m pumped for this Spring business to be happening.


Jul 27 2006

Word to the wise

I pulled my ipod out of it’s case tonight, wanting to clean it. Since I took it to Michigan, all sorts of sand and gunk got in between the skin and the actual iPod, so I reached in for a cleaner-product that I’ve always used. Remember Goo-gone? The stuff that removes stuck-on-adhesive stuff? Well, in our house we have “Goof-Off”, which, as it turns out, is a xylene-based cleaner. What does xylene do, you ask? Well, to put it straightforwardly, it ruins iPods, and effectively at that. Xylene melts plastic slightly, so my ipod is just about destroyed. Unfortuneately, it wasn’t a ‘little’ bit of Goof-off that I used. I thought maybe it reacted with my gunky ipod crap, so I kept applying the stuff, like you would with rubbing alcohol. Thank goodness I have my skin, and that I managed to scrape enough melted-plastic off my screen to be able to read it…barely.

In that process though, I tried other things. Enough chemical fumes to wipe out a city block are floating around my bathroom/lungs. I took my dremel-tool to the plastic (I thought at first that the white melty-stuff was a residue), and I’ve tried sanding, scraping, and just about anything else you can think of that involves dragging an edge along plastic in an effort to get it off.

So, needless to say, I’m a little peeved. See, I never mind when something breaks down over time. I’d be fine if my iPod simply wore out over the course of 2 or 3 years. But when a perfectly operational something-or-other is rendered useless in about 3 seconds, with about 2 more hours of hopeless attempts to fix it, then I have problems.

Maybe I’ll post pictures when I’m done mourning. This sucks, let’s hope I can find my parts/replacement plan stuff.

Goof-off, I hate you. You did not warn me, even on the container.

argh