Tuesday, November 25, 2008

further adventures in wasting time

The 2 days I'd never get back eventually turned into around 4-5 days total of developing, creating unit tests, system testing, and correcting various bugs the tests didn't find.

And now 1 more day. Backing the changes out.

Released ~2 weeks ago; customers and internal support are finally installing the new version and KABOOM! Unknown references in the C Runtime library.

Superfantastic news! Turns out our development / production testing environment isn't at the same HP-UX patch level as most customers' systems. Thanks, Oracle 11g! Thanks, budget constraints that made someone decide they had to stick it on the same server we use for support!

Wednesday, November 12, 2008

twitterpated

I'm all aflutter over the news that HBO has ordered the pilot for Game of Thrones -- http://grrm.livejournal.com/58155.html

Monday, November 10, 2008

'tis the season

For zombies. Sweet, sweet zombies.


http://iamnotinfected.com/

and

http://survivetheoutbreak.com/

great ringtone, or greatest ringtone?

don't gamble

I should learn not to bet for or against the weather.

I'd let the leaves in the yard get away from me -- decided to take a few days off leaf duty until the maples dropped more of their leaves.

I wasn't able to do the raking Saturday, due to a bunch of errands that couldn't wait till Sunday. Decided the weekend was a waste raking-wise due to the predicted weekend rain.

Woke up Sunday to see that it hadn't rained. Decided I didn't want to get started on the leaves since the clouds looked ominous, and instead started on the rain gutters. Ick. No rain by the time I'd finished, and I was filthy anyway, so I started in on the leaves. Promised myself I'd go until the rain started.

No rain. For the four hours it took me to get the leaves off the front and side yard. Lame. Stupid rain, you were supposed to give me an excuse to go inside and watch bad TV.

16 new bags o' leaves to add to the 10+ from previous weekends. Still have the backyard to do, and about a quarter of the leaves from the maples in the front yard.

Wednesday, November 05, 2008

tell me what to do, lazyweb!

I want a laptop. Or a netbook. I don't particularly want to buy both.

After trying to type on a Eee PC 900(?), if I go the netbook route I definitely want to actually try typing on it in person. Right now, leaning towards a Eee 1000H or maybe the Samsung NC10.

Or, do I just spend another $800 or so and get a just-as-portable but more powerful system? Leaning towards either the Lenovo Thinkpad X200 (non-tablet) or buckling to peer pressure and getting a MacBook.

Or... do I go for an even bigger model so that Eclipse isn't all scrunched up? Or, do I just use it for 'fun' projects where Vim is all I'll need?

Yeah, I don't know what I want, and I've got conflicting requirements. Small! Big! Cheap! Oh, alright, spend 3x as much.

A decent keyboard and sturdy build are my only consistent criteria.

Monday, October 27, 2008

2 days I'll never get back

Through sheer happenstance, one of the test databases for our new system was (mis)configured in such a way that an Oracle sequence was generating very large ID's for a certain field.

Very large as in 123,456,789,236

Guess which horrible application uses a 'long' type to hold those IDs? Guess which horrible application is supported on both HP-UX and Windows? Guess what type might be 32bit on Windows and 64bit on HP-UX? Ding! Ding! Ding!

Spent all day Friday and today rejiggering the code to use 'long long'. Most of today was spent un-rejiggering and re-rejiggering the code to work around Oracle Pro*C's inability to use 'long long' as a host variable -- today I had to swap all that out of the embedded SQL in order to use character strings and stroll/sprintf to move values from the strings to 'long long' and vice-versa.

I had thought the code was 'OK' on HP-UX... after all these recent changes, I'm not so sure. The code to transfer the values from the query results to their 'long' variable instances seems wrong. In any case... it'll work the same on both platforms now.

I take some solace from finding the problem before any customer. We have at least 3 customers nearing 1-billion bills -- although the horrible app is 10+ years old, the rate they're adding bills to their systems grows every year. They can also start/change their sequences whenever they feel like it. So, maybe we had another 1-5 years before it became a major emergency.

Wednesday, October 22, 2008

disappointment, thy name is tiny keyboard

I've been resolutely avoiding purchasing an Eee PC (or other netbook) until I actually could get my hands on one and try typing.

Tried out an Eee 900? at BestBuy the other day -- not sure which exact 900 model. Too small. Maybe I'd eventually get used to it, but I've decided I definitely should go with the slightly larger Eee 1000H.

Tuesday, October 21, 2008

not spam

I never imagined I'd get an e-mail with subject line "Help with goat talk" and it would not be spam.

Tuesday, October 14, 2008

which is better?

  1. Laughing/crying at the right-wing, loony spam mails I get from my kook of an Aunt.
  2. Laughing at the "in no way related" e-mail containing the facts behind the rumors that inevitably follows a few days later
The latest example, a forward from the doublespeak-tastic 'American Family Council', with the subject line 'Fwd: If you think things are bad now, just wait....'
{snip}

In case you may think I’m a “the sky is falling” type of person, you should know: When it comes to predictions, I am a very reserved person. But not on this one. I cannot overstate the damage a liberal victory will do to our country. The upcoming election is the most important in the history of our nation. Yes, if the liberals win you will lose some of your religious freedoms and free speech rights. Churches and pastors will not be exempt. You will not be allowed to say certain things about a particular group. Every item of the homosexual agenda will be approved. All the laws protecting the unborn will be wiped away.

{snip}
And 5 days later, the next e-mail from her with the subject line, 'In Fairness to B. Obama. AND J. McCain.....Snopes.com' :
There are so many derogatory Political Emails floating thru space out there, that I am personally tired of having to wade thru them all - and acknowledge that it's hard to get the straight-forward Truth....

I think it might do us all well to consult those who have done the research on these (either bogus or real-truth) emails. (See links below)

Click here: snopes.com: Politics (Barack Obama)

Click here: snopes.com: Politics (John McCain)
My favorite part of the inevitable follow-up e-mail is the lack of self-awareness or any hint of an apology for adding to the onslaught of misinformation herself. Despite the fact that no one has asked her to, I'm glad she's warned us that she's "personally tired of having to wade thru" all those spam messages she passes along.

I've decided whenever I get baited into a political or religious discussion with my family, I'll make the saving throw by chiming in with, "While I appreciate that these Gay Agendas (*music sting*) make our meetings well organized, they're really making me re-think my conversion to Secret Islamism."

P.S. Also plus too as well : http://www.factcheck.org/

worst. impression. ever.

Dear Autoflush Toilet,

You ain't foolin' me! You're not a bidet!

Why does your sensor think my back is transparent?

You're horrible.

Love,
Steve



P.S. Now that you're thinking about me pooping, I'd like to point out that I deftly avoided use of any onomatopoeia.

P.P.S. Mostly because I couldn't connect the dots between this post and the punchline using the consignment store named "Grunts & Postures" near the first apartments of my wife and I.

P.P.P.S. First one to comment with a "full of shit" joke gets 15 demerits.

P.P.P.P.S. Yes, despite the demerits, it is still worth it.

Wednesday, October 08, 2008

hudson == teh awesome

Hudson is great. Lightyears beyond CruiseControl. Everything configurable through the (awesome) UI, a ecosystem of plugins, and incredibly simple installation.

We don't have that complex a build, but our SCM team looks at me like I'm a crazy person when I point out yet another issue with the build. After the umpteenth time I've found yet another build problem, I decided to give Hudson a try. We need to checkout some modules from the trunk, and others from a branch. It was bad enough when their chosen solution to that problem meant we couldn't automatically trigger the builds with a check-in -- builds had to be forced from the UI, then a pre-build step did a CVS checkout of the modules from the appropriate branches. The last straw was realizing that the pre-build script also contained some logic that overwrote any changes we made to our build.xml file with some out-of-synch version of build.xml that one of them had created at some point in the past. The sort of thing you'd like a heads up about.

With Hudson, builds have been a snap to set up -- monitor these CVS modules, run this script from the repository if any changes are checked-in, the build artifacts will match this regex pattern allow download of them from the UI, keep only X number of builds on the CI server.

Hudson doesn't let you checkout from a mixture of HEAD/branch either -- but it's simple enough to set up multiple build commands, the first of which is doing the branch checkout. We won't get a complete changelog or CI automation, but it's good enough.

Tuesday, September 30, 2008

lessons in conflation : compare != sort

For months, the business people have complained that the rules engine sporadically produces different results on Windows than HP-UX. They'd complained previous developers said, "sorting is different on Windows and Unix". I did my best to restrain any reply more caustic than, "That's silly."

Until this month they couldn't point me to bills that had the problem at the same time as we had log files from our regression tests (or find me any archived e-mails from the original developers). Given that we're probably the only people running the application on both HP-UX and Windows -- during our regression testing on the two platforms -- the bug hasn't been that high a priority.

Finally tracked down the cause of the issue to be differences in the qsort() algorithm of the C runtime lib -- specifically how qsort() handles two elements that compare as equal (!). For some reason, the Windows qsort() performs some extra comparisons and 1 extra swap.

The list we're sorting looks something like :

1. $23.96
2. $23.96
3. $23.96
4. $23.96
5. $40.95

On Unix, qsort() and this particular compare (descending order by amount) results in the following :

5. $40.95
1. $23.96
2. $23.96
3. $23.96
4. $23.96

On Windows, its qsort() and the same compare function resulted in:

5. $40.95
3. $23.96
1. $23.96
2. $23.96
4. $23.96

The values we're comparing are equal... but what we're actually sorting is the value and a reference to where it started in the list. Because the sorting produces different results we end up annotating the bill lines differently on Windows than Unix.

Changing how we do the comparison fixed the problem. Now we compare left/right values, if they are equal we compare the originating line number of the values.

And now we get consistent results no matter the platform:

5. $40.95
1. $23.96
2. $23.96
3. $23.96
4. $23.96


Next time, in Steve's job rants:
  • Typedefs on top of typedefs on top of typedefs. Oh yeah, and because of typedefs A, B, C, and D it turns out 95% of calls within the system look like pass-by-value but are in fact pass-by-reference. It took me ~2 months to realize that was going on. 4 months later and it still gives me the heebie jeebies.

Saturday, September 27, 2008

loving/hating Fit

We waste a huge amount of time on our legacy code base because we have no Unit tests, and no standard way the project's developers test their changes.

It's typically some error-prone manual process -- run some SQL in Toad, copy results to Excel, run the bill, re-run SQL, compare to the old results with eyeballs, pray.

I read about Fit a few months ago, and it seemed like it'd solve a lot of our problems. Blackbox testing would help build tests up around our legacy codebase. It'd also help bridge the communication gaps between onshore/offshore development, and development/business.

Finally took the time to play with it this week -- specifically, DbFit. Without any customization, I was able to write some simple SQL in a wiki page to generate a new test case for the issue I was working on this week.

I'm in love. It seems like with some minor customization we can make some huge leaps in our productivity. But I really hate trying to navigate the Fit/Fitnesse web sites for reference information. Ugh.

additional offshoring adventures

My project at work is a set of Java applications for which communicate over UDP / RMI. The port numbers they talk over is configurable. In our hosted environment our servers may be running the apps for multiple clients. So, the users (or our tech support people) have to configure unique port #'s in each set of config files if there are multiple s running against different databases. It's a annoying, but the least of our worries at the moment.

Monday this week, I realize our configuration editor doesn't give the user the ability to edit a certain set of port #s. I ask the offshore team to add that ability to the config UI.

When I come in the next day the offshore lead has decided the existing way we do things is too error prone. He's made a great change so that the configurable settings are just a range of port #'s and the application(s) will pick unused ports within the range.

After reviewing the changes, the only issue I found was in some output files created by the apps once they pick a port number. Once the port # is selected, an output file will be written. It was implemented with a DataOutputStream to write an int primitive to the file, and read back in with DataInputStream. I'd prefer it to be human readable, so I respond with some notes saying to make the file a text file rather than a data file.

I come in the following day, and find that the only thing he's changed is to give the file a ".txt" file extension.

Wah?

It's the 'little' things like this that drive me crazy. Things I assume don't need much specification. It's particularly annoying because this engineer is so awesome -- he's always quick to turn around any solution, and always asks great questions on our calls. And, he did a great job of taking the initiative to fix a major flaw just a day earlier.

Tuesday, September 16, 2008

further adventures in offshoring

Have not had time to do a code review for the project I've inherited. Decided to use FindBugs to pick off low hanging fruit.

aiiiiiiiieeeee.
  • bitwise '&' operator used instead of boolean '&&' operator
  • '==' operator used for Long/Integer/many-other-reference-types
  • String.equals() comparing a String to a DO object
  • Enum classes with their own extra-special equals() methods. Ick.
  • Classes with equals() but no hashCode()
  • Who implements finalize()?
  • many, many more

Saturday, August 16, 2008

an afternoon I'll never get back, thanks Eclipse!

Spent Friday afternoon fighting with Eclipse. Around lunchtime, my development environment stopped working... When launched from Eclipse the app couldn't find the log4j, Spring, or Hibernate config files. After many false starts and much gnashing of teeth, finally noticed it wasn't all config files that weren't getting copied into the projects' output folders but only .xml files.

Finally managed the right phrase in Google that found me the answer: http://dev.eclipse.org/newslists/news.eclipse.platform/msg74562.html

Apparently, Eclipse plugins may update one of the preferences that tells the builders which file extensions it shouldn't copy to the build output path. To fix it, you have to go to 'Preferences... -> Java -> Compiler -> Building' and then check all the extensions entered into the Filtered Resources text field.

I'm not sure if it was a plugin change, or (probably more likely) changes I was making to my launch configurations to not run out of the 'dist' directory into which the inter-project Ant build packages everything.

I'm not sure if I should be happy that the offshore team I've now inherited at least got the Ant build right. Or, if I should be concerned about whether they've actually been running the code / configuration they think they are when running under Eclipse.

One more in a long line of complaints I've had regarding how this set of applications is configured. Normally, I'm the one on whatever-team-I'm-on pushing for extensive runtime configurability. I don't know why this project's configuration setup -- not the Spring/Hibernate, the home-grown .properties file reading and command-line handling stuff -- rubs me the wrong way. The nonsensical or nonexistent documentation, the obfuscated search paths, the unhelpful error messages, or the fragility of the whole system when you're missing one piece... all of the above?


Even with that lost afternoon, I still love Eclipse. After all, it's free. Oooh, free. One plugin that now I can't live without: Remote System Explorer.

I've got to run Windows at work, and the corporation-approved SSH client sucks balls. When you resize a terminal window... what would you expect to happen? More columns/rows? Bah! That's too obvious and old-school for Attachmate Reflection's SSH client-- instead the mother f*&#$*#&er resizes the font. Badly.

PuTTY is mediocre. The corporation's security agent can't be disabled, and it prevents the cygwin install from running completely.

Enter Remote System Explorer. Multiple terminal windows. Does the 'right' thing when resizing or scrolling. Gives me a file-tree view of the remote system via SFTP. I can edit remote files within Eclipse and it automagically saves them to the remote system.

Eclipse is a beast, and a bit of overkill for a shell window. But, I've already got it open. And, unlike my Ubuntu system running under VMWare... I don't feel like the corporation's jackbooted thugs will re-educate me if/when they find I'm using it.

conclusions

  • If you write an application where the order of command-line options matter, you're a bad person.
  • I need to use the adjective 'Diabolical' more often.