The Bride of the First House (bride) wrote,
The Bride of the First House
bride

Drop Kicking Someone Isn't Nice, Is It?

weather: sunny
outside: 18°C
mood: bleh
This is a Classic that I haven't seen in sooo loooong, I actually thought we had bred this out of the industry.

We're a small shop and I've become the owner/maintainer of a small internal tool that was created by a Co-op (Canadian Interns are called "Co-ops", short for "Co-operative Education Students").

We use this thing quite extensively. The design and most of the implementation was done before I was hired. In fact, I think one of the things that gave me an edge over the other candidates for my job was my ability to be the full-timer to maintain this thing. The Co-op Kiddo's term was ending in a month or so, so I had that much time to suck his brain dry for info. It would have been enough time for me, if that was the only project I was doing. It's mostly set up, I do minor tweaks every once in a while. Occasionally, I find things sticking out or coming apart and fix them. Yeah, yeah, a pox on me for being the developer and the QA at the same time.

I got a request to change an enumeration type in a database. Do an ALTER TABLE blahblah MODIFY bladdy-blah enum(...doo-dee-doo..., 'Macintosh');. It was for a newly supported platform. Fine, no problem.

They go to use it and get a validation error that says "This field must be a number".

HWHA?!?!

It's a text field. There aren't even any numbers in the text of the enumerated items. There have never been.

I hunt this down and it turns out, Co-op Kiddo does a DESCRIBE on the table and looks in the TYPE column. The logic goes, "if I see 'int' in here, it must be an 'integer' type". Forgetting, of course, that enumeration types contain arbitrary text. It saw the "int" in "Macintosh" and decided that it had to be an Integer field and dynamically generated the Number Validation Rule.

That wasn't the only screwed-uppedness I saw in that validation piece. He also had five straight IF statements with no ELSEs hanging out trying to do the validation rules. The first one was the check for Required fields.

Uh-oh. Uh-fucking-oh.

If your world is separated into Required and Not-Required, there should be an IF-THEN and an ELSE to catch the two conditions properly. So, I completely re-wrote that bit to separate and catch all the conditions in the right places.

Then, I had this really bad feeling. A Tingling Spidey Sense, if you will. I searched all the source files for a string that was unique to the piece of code that I re-wrote.

Boom: the same bit of broken code is in a number of separate places. Need to change them all individually. *ungh*

Double-whammy: there's an iteration counter variable that is named differently in many, but not all the modules. There is also a string that's hard coded for each different module. So, copy and paste with both eyes open, eh?

I'm going to request to go to this year's UBC Comp. Sci. Career Fair where the Co-op Kiddo is, so I can strangle him myself. To be fair, I can maybe see why no one checked his Math on this. He did some pretty nifty things and I concede that he was a smart kid. And at a time when everyone was busy, it slipped. *sigh* They're still students and their work still needs to be monitored. But at the same time, it wasn't his first Co-op term, he did have some work experience prior... we have to trust him a little and give him a little autonomy, blahblahblah...

Even so, I said this last year when I did the Career Fairs. I am embarrassed and saddened at the lack of quality shown by the students from my own Alma Mater.

I swear it isn't the school; the Grad Students are a brilliant and awesome bunch. I swear it isn't the profs; they are world leaders in their respective fields. I swear it's just the whiny little brats undergrads. But what good is that, really? All I can tell people is "I think it was much better when I was there..." and hope my work speaks for itself.

I'll be encouraging my brother to go to SFU.

Subscribe

  • 下雨天﹐留客天。

    weather : rainy outside : 17.6°C mood : ... 《下雨天留客天留我不留》 Is it 《下雨天留客﹐天留我不留。》? Rainy days are for company. The…

  • Random Childhood Memory: Two on Food

    weather : sunny outside : 20.7°C mood : ... Cafeteria Food I get the impression that it's generally accepted that…

  • 五更腸旺

    weather : light rain outside : 17.6°C mood : ... We've become regulars at a local Taiwanese style eatery. I even have…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 7 comments