Well, it's been such a nice day so far... 
2010.02.08 21:25 - Meatspace Stupidity, Whining, Work-related
Discovered some considerate jerk had taken out my passenger-side taillight when walked out to the car to drive to work. No note or anything that I noticed, so somebody's a real class act. I drove to work fairly angry, and discovered as I was parking that I'd left my access card on the dresser. Awesome! Since I wasn't in a mood to turn around and retrieve it, I signed myself in, and resolved to pick it up over lunch, which I did do.

Managed to return a bug ticket as a non-bug (testers: read your documentation!), and managed negative productivity the entire rest of the day, without any great input on my own part. A ticket that was in peer review was returned for minor revisions (no worries), then wound up being shelved for discussion that will probably involve a near-complete rewrite. Yay! It only took a week and 16 pages the first time, so I'm sure it won't be too big a pain the second time. (Do I have a dripping sarcasm tag? No?)

I was able to get an insurance claim filed, and will be stopping at the local PD to file a police report covering the damage, because I can't do that over the phone.

I was doing better while I was sleeping through the clock radio playing the classical music station ...
  |  [ 0 trackbacks ]   |  permalink
Once in a While, I Think About Playing In Traffic 
2009.08.04 10:23 - Whining, Work-related
300+ character regular expression that can be obviated by a single call to DateTime.TryParse().

What the heck. Maybe there's some business requirement requiring a specific set of date formats be supported, but, hey, DateTime.TryParseExact() will cover that scenario. At least it's old code, so there's some hope that we'll have learned from this somewhere in the last two years.
  |  [ 0 trackbacks ]   |  permalink
This is something I hate 
2009.07.21 09:13 - Whining, Work-related
Was handed half-finished application yesterday afternoon. Seems like it ought to be a very straightforward thing: if it were a console app, I could probably pull it off in less than 1K lines of code.

So, of course, it's got a GUI and at least twice or three times that much code already written and it doesn't do anything yet.

[Addendum: Possibly the best part are the weird bits of code that are either an indication that the coder doesn't fully understand the ins and outs of the language, or that there is some very weird and stupid business logic laying around.]

[Addendum Addendum: Looks like I'm overreacting a little. I think I should be able to get where I need to go with this by the end of the week, especially now that I've cleaned most of it up.]
  |  [ 0 trackbacks ]   |  permalink
Coding Standards SO IRRITATING 
2009.07.16 10:04 - Whining, Work-related
Visual Studio will let you specify an external settings file which can contain a blue million different settings, including coding style bits and pieces. This is probably a good idea, as there's also menu shortcut that lets you reformat whole files on demand, which will make whatever poor soul that winds up responsible for merging branches in your source code repository endlessly happy. (ISTR stumbling across a checkbox somewhere in the application's bowels that let you reformat a file whenever you saved it, but can't find it now. Perhaps that misfeature was removed.)

I'm still irritated that it includes settings for brace style, and that they're all wrong0. The only thing I find more irritating than having the Wrong Brace Style1 foisted on me for no good reason is having a SQL query I've already written completely reformatted because the other developer couldn't figure out how to make an isolated change without running the whole thing through some code generator.2

And if you think that this seems petty, trivial, and boring ... well, I never promised anything.

Footnotes
0. Where 'wrong' is defined as 'not the way I do things'. I just can't put every brace and flow-control keyword on a separate line. It's pointless. It makes an if-else-if-else construction take up four extra lines that say nothing. It's like inserting dramatic pauses into a reading of a grocery list.
Me Them
if (foo) {
    blah;
} else if (bar) {
    blah++;
} else {
    baz;
}
if(foo)
{
    blah;
}
else if(bar)
{
    blah++;
}
else
{
    baz;
}
Anyway, I hate it.
1. Where, again, wrong == !mine.
2. It's usually painfully obvious, too, because I use a somewhat verbose formatting style in SQL:
Me Them (often, not always)
select
    f.foo_bar,
    f.foo_baz,
    b.bar_foo,
    b.bar_baz
    from
        foo f
        inner join bar b
            on      f.foo_id = b.foo_id
                and f.blah = 'MAGIC_NUM'
    where
            f.foo_id = 1
        and b.bar_id = 2
        -- or whatever
SELECT F.FOO_BAR, F.FOO_BAZ, B.BAR_FOO,
    B.BAR_BAZ
FROM FOO F INNER JOIN BAR B ON F.FOO_ID
    = B.FOO_ID AND F.BLAH = 'MAGIC_NUM'
WHERE F.FOO_ID = 1 AND B.BAR_ID = 2
It's certainly more compact, but God help you trying to read anything non-trivial that's formatted like that. It's worse if they've done it by hand, so that the indentation is both inconsistent and achieved with a combination of spaces and tabs.

  |  [ 0 trackbacks ]   |  permalink
Argh. 
2009.06.19 14:36 - Work-related
1500-ish lines of C# for a single class which contains 20-odd static member variables and less than 10 instance variables. Functions which take no parameters, return void, and set one of those globals. The global will never be checked for null, the code is not organized so that it can be read in anything like an expected order (the variable is accessed and used in 2 functions around line 250, but set at line 500-something), and variables do not tend to follow guidelines about descriptive names. At least the set function is static. (Of course, so's another function that takes an instance of the class as an argument ...)

I don't know. Maybe I'm the one that's out in the weeds here, and this is actually brilliantly optimized design. I kinda doubt it, though.
  |  [ 0 trackbacks ]   |  permalink

Back Next