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.

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) {
} else if (bar) {
} else {
else if(bar)
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)
        foo f
        inner join bar b
            on      f.foo_id = b.foo_id
                and f.blah = 'MAGIC_NUM'
            f.foo_id = 1
        and b.bar_id = 2
        -- or whatever
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
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
Brain Juice At 33%, Captain 
2009.05.26 16:02 - Work-related
I think it just took me the better part of four hours to clean up some code to a state that was readable enough to begin puzzling out how it has to be changed to accommodate our ever-changing system requirements.

I am pretty sure this is just some basic furniture moving (i. e. "A little to the left, a little more ... on second though, put it back in the corner where it was. No, a little more to the right, etc."), but they've gone and changed the jargon surrounding this feature in the two years between when this code was probably written and now, when they've decided that maybe they'd actually like to use it. This complicates an already baroque implementation of a confused feature.

Anyway, I'm a bit frazzled, now.
  |  [ 0 trackbacks ]   |  permalink
I Wonder How Much Less Effective Business Communications Can Get 
2009.04.10 15:10 - Meatspace Stupidity, Miscellanea, Work-related
I'm sure it's not a novel observation, but I can't help but feel that using IM for communications between professionals located in the same building is actually a terrific mistake for ... well, for anything, really.

A phone call is as immediate and probably more effective (by conveying vocal tone and other cues missing from textual communication), without being significantly harder to log for future reference. (I know many IM clients will log this stuff for you, but the one used here does not. The server does log everything for the nice people in compliance, though!) Email, though less immediate, provides an excellent ability to track material for future reference, and is more likely to generate a correct and useful response. A face-to-face discussion is, in my experience, almost always faster and more effective for anything complicated enough to justify discussion.

Basically, all I can tell IM is really good for are brief messages asking someone to come here or coordinating things for lunch. It doesn't offer the deniability of a face-to-face meeting or phone call, nor the paper trail of an email discussion, and is demonstrably less effective than any alternative.

So, why bother with it?
  |  [ 0 trackbacks ]   |  permalink

Back Next