Monday, July 30, 2007

Yes?

My buddy Eric made a submission to WorseThanFailure and was featured today! Check it out.

Sunday, July 29, 2007

Holy Crap I'm Buying a House

The sellers got their act together, so we're buying a house. We close on Tuesday. Which is great, except that we had planned to not get the house, so we were only maybe 50% packed. The easy part.

So as soon as I returned from my company outing, the first things I packed were the 360 and my DVDs. That way I can't slack as easily. How much I want to play Forza 2!!

This post was written immediately after sealing the extra bedding box and immediately before checking the cabinets in the closet.

Tuesday, July 24, 2007

Query Analyzer, How Do I Hate Thee?

Microsoft's Query Analyzer is the tool MS provides as the main SQL Server development environment. Are they kidding? Besides the fact that it is broken, it lacks one of the best features ever made for IDEs: intellisense. How the hell is this not included? It could also have background compilation like VB.NET (checking for errors automatically). Adding these things are obvious wins.

What I'd really like to see is some sort of auto-formatting preferences. Everyone prefers their SQL formatted a little differently. I like capital keywords and short lines. Some like less indenting, lowercase keywords. Line breaks, spacing, capitalization of keywords, all these things have no impact on the actual parsing and execution of SQL code. The ideal SQL IDE would be able to store individual preferences for these things and apply them for each user. That way, I wouldn't spend 10 minutes reformatting SQL my coworker wrote or just struggle through it. This isn't really that hard; why they haven't done it is beyond me.

Monday, July 23, 2007

The Mighty Casey Strikes Out

My softball team had its first playoff game last night. Every team makes the playoffs, and we were the 7th seed out of 8, so that gives you an idea of how good (or bad) we are. Still we have lots of fun.

We were getting crushed, something like 12-3, in the 4th or 5th inning. I had been up once before with a bloop single the other way. I noticed their pitcher was changing his location based on where the batter was standing. So I tried to fake him out a little, standing in one location then moving as he delivered. That backfired when on a 3-2 pitch, I was standing about 6 inches back from the plate. I stepped in as the pitch came, but it appeared outside. It only looked outside because I was standing back, and as I watched the ball fall right on the outside of the strike mat.

I struck out looking in slow-pitch softball! And to make matters worse, it ended up being the last at bat of the season for me! I'm so disgusted with myself.

Seriously, No House For Me

The town board of health did not meet; they didn't have quorum. So they meet tomorrow... if they say yes, then the sellers have like 2 days to get all their paperwork to the bank. If they don't make it, then we don't close.

We had to talk to our landlord because we might have to stay in the apartment, obviously. Ironically enough, he had already rented it. While we waited to hear back from him, we had about four hours of sheer terror, thinking we might have to move to a new apartment. Thankfully, our landlord, the coolest landlord ever, said we could stay, but only if we signed a 1-year lease (we'd been renting at-will). So possibly no new house for me until next summer.

Force Fixing

I talked earlier about using enums for things like datarows returned from the database. Well, as you might have guessed, if I change what I return from the DB, my app will break. I've had many arguments about this sort of behavior and whether it's better to hard code the metadata from the DB or soft code it (meaning use reflection or other tools to determine what has been returned and handle it accordingly). I had a fairly long debate with Eric about it.

Obviously, as with every design situation, think of what you're doing first! Don't blindly follow a pattern. My coworker Joseph just transformed 500+ lines of code to 12 using reflection and soft coding. Was this a good move? Yes, because the code is still readable and manageable. I don't have the code here, but basically he checks the data's name, then finds the textbox with the same name, and puts the data in the box. Even in his iteration, there is some hard coding.

The point I'm getting to is that the main point people mention as a con to hard coding is actually a plus in many cases; being forced to fix the hard-coded stuff when you change what it's coded to. Before you say "WTF Ed!" let me say this; I'm not advocating highly-coupled design. However, I am advocating coupling your data controller classes/code tightly to your database. That way, if you (or someone else) changes your database, your code will fail, and you are forced to fix it.

Wednesday, July 11, 2007

America, Know Thyself

I was reading this article in the NYTimes about the possibly extinction of the trees used to make ash baseball bats when I came across this interesting tidbit:
Still, the emerald ash borer, or Agrilus planipennis Fairmaire, is the most immediate threat. Discovered in the United States near Detroit in 2002, the beetles, which are shiny green, will destroy a tree in two to three years. The larvae tunnel inside the trees, cutting off water and food.
Wait wait... a new insect species was discovered in Detroit in 2002? It seems a little crazy that in a super-advanced nation such as ours, we still don't know all the species in our own borders.

I'm Never Going to Own a House

The sellers of the house I am attempting to buy met with the town board of health last night to discuss and potentially grant the necessary variance for doing the required septic work. Basically, the town was going to say "Yes" or "No". This meeting was last night, and it's now the morning after and I haven't heard anything. A little courtesy would be nice.

Tuesday, July 10, 2007

Enumerations, How I Love Thee

I love enums. I use them all the time. Jared on Giant Robots got me thinking more about them. Let me list the ways I love them:
  • I use enums for column ids for a grid control. I get to say "grid.col(cols.thisOne)" instead of "grid.col(2)". Easier to read, easier to change, and it forces me to fix them on refactoring (more on this in a later article).
  • When I have a stored procedure return more than one table, I will use an enum to index the tables in the dataset. Again, I get to do "ds.tables(products.sold)" instead of "ds.tables(1)".
  • A more esoteric thing I like to do is when using datatables, I'll use an enum with "tostring" to reference the datarow. So I'd have something like "row(taskData.client.tostring)" ("taskData.client.tostring" evals to "client") instead of "row(5)". Again, this is more readable, and it forces fixing.

When I make an enum, I know exactly how it's going to behave. It's kind of like a super constant in that respect.

I'll talk about force-fixing in my next post.

Tuesday, July 3, 2007

Visual Studio Crash Log

This will a perpetual feature. I will log every time Visual Studio crashes on me and what I was doing when it did.
  • July 2nd, 10:15AM: Building a solution.
  • July 2nd, 2:55PM: Getting the latest from source control.
  • July 3rd, 12:24PM: Building a solution.
  • July 5th, 4:31PM: Building a solution.
  • July 9th, 11:43AM: Building a solution.
  • July 9th, 2:42PM: Getting the latest from source control.
  • July 10th, 10:31AM: Rebuilding a solution.

Monday, July 2, 2007

More Home News

So our house closing got delayed... again! This time, the sellers need to get a variance from the town board of health to do septic work so close to the well. This time we even got in a big fight with the sellers; they didn't want to pay the fees they are legally required to pay. Oops. We'll move in eventually. Maybe.

Rest In Peace

I never really understood the words "rest in peace". It's almost a cliche phrase these days. I used it in a blog post over on IFOD a while ago. It's just something you say to someone who has died. More importantly, it's something you say to others who share your grief.

Recent events have caused me to think more about what "rest in peace" really means. For Jon to rest in peace, it would mean two things: 1) he'd have to be happy with his life, and 2) he'd have to be happy with how everyone else is doing. I'm certain he'd be happy with how his life was; he always was living 110% and having a great time. But he'd also have to be happy with how his family and friends continue to live.

So there's a large part of "rest in peace" that relies on us, living our lives as Jon would've approved or wanted. I've found myself thinking more and more about Jon in everyday situations. Not that I'm trying to be just like Jon (because, as anyone who knows me knows, that's impossible), but who knows.

(As always, I'm just rambling here. Nothing I post is meant to be preachy unless I say so.)

Left to right: Jon, Ed (me), Adam

Sunday, July 1, 2007

Survival

Most of my friends knew Jon Snyder. Those who didn't know him learned of his passing by way of Annie or others. It's been a terrible time for all of us. There are no words to describe what Jon meant to most of us. Even people who crossed paths with Jon only briefly are profoundly affected by his death. I'm not going to try to relate how much we all hurt, and I'm not trying to write a tribute here.

It's been a two weeks since we in Boston got news of his death, and one week since his funeral. I am in better shape than I was last week; I can get stuff done at work, and I played in a softball game this week. I've done some cleaning and took out the trash. All things that I normally do.

And yet I still feel Jon's absence. I feel like I'm sleepwalking. Like it's all a bad dream. I seem to have a constant headache too. Katy said something that Bill mentioned at the funeral: "Jon's not gone; we just can't touch him anymore." I think that's what I feel when I say I can feel his absence. It's like a blind person; when you remove one sense, your others become heightened. Because I can't touch Jon, I can feel him more.

Here are some links:
Facebook group "Rest in Peace Jonathan Snyder"
Phil's well-written blog post
Kansas City Star Article
Obituary

All rights reserved. Take that!