Friday, April 27, 2007

Just Strap Some Bulwarks to the Tank

Remember that bug I was talking about last post? Well I figured out the problem; it was a bug in SQL Query Analyzer. Ha.

But the whole situation (and my resulting blitz of productivty afterwards) reminded me of a situation I read about. In World War II, after the Allies successfully landed in Normandy, they were having trouble making progress inland. The hedgerows in that section of France were particularly nasty. The infantry kept having to fight the German troops at every intersection, and the tanks were constricted to roads and couldn't really do anything.

The solution? Some brilliant commander realized that the Normandy beach was covered in discarded fortifications from Rommel's "Atlantic Wall". So he had the engineers attach some of those fortifications to the fronts of the tanks (with superglue I can only assume) and had the tanks rumble right through the hedgerows.

What's the comparison I'm trying to make here? Well, my issue with the previous was that the query analyzer was incorrectly scripting the existing stored procedure to the query window, and so I couldn't do anything. This is like the Allied troops getting bogged down in a hedgerow. Eventually I could've slugged through it, but it would've taken a long time.

Had I attached some fortifications to the front of my tank (i.e. used a different tool or outlook), I would've found the problem instantly (e.g. SQL Enterprise Manager didn't have the bug, and the system stored procedure "sp_helptext" returned the correct SQL as well). Instead, I spent something like 2 hours (then 15-20 minutes with Matt) slogging away at the problem.

I think my point is lost somewhere up there. What I wanted to say was that when you hit a problem that stops your work, try looking at it from a different angle. This will help you solve it (the obvious benefit), but more importantly, it will keep you interested in the problem and keep your attention from wavering (the benefit that I really needed).

Wednesday, April 25, 2007

Roadblocks 'R' Us

It's amazing what can shut down a person for a whole day.

On the list I left for myself after work yesterday, the first thing was "Bug 910: Resources from other offices not appearing after search". To implement this feature (I never wrote the code in the first place, so it's a bug of omission I guess), I decided to take the super-complicated stored procedure (just over 900 lines) Matt wrote and I modified and remove something like 60% of it. So I fired up the query analyzer, selected "Edit" for the existing sproc, changed the sproc name, and pressed F5 (this should create an identical sproc with a different name).

Oops, not so fast!
Server: Msg 170, Level 15, State 1, Line 524
Line 524: Incorrect syntax near '('.
What happened?

So I figured somehow I hit delete or something and removed something. I find the line number mentioned, but there's nothing wrong with it. Plus how could there be? I just extracted that code directly from the existing sproc, which already runs? It's impossible.

My brain just shut down. I could not parse how this could possibly be happening. It's like writing "x = 1" and then "isTrue(x = 1)" returns false.

And how do you ask for help with something like this? "Hey Joseph, my SQL isn't working, but it was, and now there's an invisible bug somewhere... can you help me go line by line through this 900 line sproc?" I think he'd shoot me.

I still haven't figured it out.

Friday, April 13, 2007

Slacker Nation: Part 2; or Origins

How does one become a slacker? Are slackers born or made? These might not be questions great thinkers ponder (I wonder if Aristotle was a slacker), but they are interesting nonetheless.

While I haven't done a comprehensive study on this, I know how I became a slacker. It happened in third grade. My teacher, Mrs. Butler, was teaching us double-digit subtraction; take the one ten and make ten ones, etc. I was always great at math, so this stuff was a breeze (31 minus 17? EASY! Give me something hard to do). She gave us a math test, and it had one section with five questions that looked something like this:

1) 43 minus 24


____

I wasn't sure what that line meant, so I did the math in my head and put my answer on the line. Easy stuff. Well, she marked all of my answers incorrect. Apparently, I didn't read the instructions, which said to show your work. With those incorrect answers, my score was low enough to warrant being put in the remedial group. I was pissed (well, as pissed as a third grader can get). I wanted nothing more than to be with those kids I knew I was smarter than, working on those "enrichment" worksheets with the tough problems (345 minus 167! Also, multiplication!). And yet, I was stuck with the remedial group, having stuff I already knew explained to me.

So I tuned out. Not consciously, of course. As an eight-year old, I still wanted to appease my parents in everything. I continued to pull down good grades (not that elementary school is tough) and be a good kid. But I never really had to try hard again (until sophomore year of high shcool), and because I "knew" that trying hard wouldn't really get me anything, I didn't. I spent class time doodling (8th grade social studies), talking (honors English), sleeping (AP Chemistry), or not present (honors American History).

Yet I graduated with a 3.85 GPA. All I was subconsciously learning was to work the bare minimum to get by. (Fortunately, college was able to coax a lot out of me. Learning that I wasn't the smartest man alive helped me focus on work I didn't like.) Are all slackers created by nuture? Or does nature take a part? I don't know.

Stay tuned for the thrilling conclusion of Slacker Nation.

For Part 1 of Slacker Nation, click here.

Whoa... I bought a house?

Yeah, it's still sinking in that I actually bought a house. While we haven't done anything yet except push paper around, things feel like they're moving wicked fast.

Anyway, I've been caught up with house stuff and selling things on eBay. Also, Annie's grandmother is in the hospital, so we've been visiting her every night this 
week. 

This weekend I'll be busy again. House stuff plus apartment stuff. Maybe I'll get to the website.

Monday, April 9, 2007

Big News

I bought a house!

Well, I put an offer down that was accepted. It's going to be close to two months before we "close" and therefore own the house (or rather, the bank owns it and lets us pay them for 30 years). Suffice it to say, I'm excited!

Also, because of Easter and the home buying stuff, I didn't have time to work on part 2 of my Slacker Nation series. I'll attempt to hammer that out this week.

Friday, April 6, 2007

Slacker Nation: Part 1; or, The Definition

When I was young, adults made a big deal about slackers. They would conjure up images of a guy with longish hair (only long because he doesn't care about cutting it) with baggy, dirty pants (why wash clothes? They'll just get dirty again) who does every task to the minimum (so he can get back to "slacking"). I was told that becoming this man, this slacker, was the worst possible outcome of my life. I was young and impressionable, so I believed this.

Flash forward to high school. I took mostly honors and AP classes, but many of them were not hard. My honors history class was one of these. The teacher was smart and good, but he believed in homework. I don't, so I didn't do it. I got A's on all the tests, essays, and projects, but zeroes on all the homework, resulting in a B in the class. I tried to do the homework one time. I looked at the front page of the packet. On top was a big map of North and South America. The first question was "Mark on the map the location of the Panama Canal." This was a junior year honors history class. I threw out the packet. Did this behavior make me a slacker? I could've gotten an A easily if I had done the homework. But to me doing this homework was a complete and utter waste of my time. I'd rather read history books (which I did, often). I was troubled by this for a time, but never troubled enough to change my ways.

And now, present day. If you've read some of the past posts here, you'll see that sometimes I'm just unmotivated to do things. However, I'll go to town on certain things, like the cell-phone negotiation and the EBay stuff. Why do I have no problem working on these things, yet getting myself to write the basis for my website is hard as hell? A few years ago, I found an interesting article online called the Slacker Manifesto (pdf). The author brings up a few interesting points, but this is the most important one: slackers work hard only on what interests them (as opposed to Type-A people who can work their ass off on anything). This theory direction contradicts the message sent by my parents when I was young. I can be a slacker and still be a productive member of society. Sweet.

Stand by for Part 2 of this series, yet to be subtitled, where I discuss something else about slackers.

Too tired to be lazy

Annie goes to sleep before I do, but for maximum cuteness, I get in bed with her until she falls asleep (or until I fall asleep and start snoring, whereupon Annie wakes me up and kicks me out). Last night she took a while to fall asleep, so I actually fell asleep several times before she did. When I finally got out of bed, I was a slug. I wanted to not get up, but I had to feed the cat, turn off the TV and lights, etc. So reluctantly I got up.

I could not get myself to do anything constructive, not even playing video games. So that sucked. I managed to check my ebay auctions and fantasy scores, but that's about it.

Thursday, April 5, 2007

Do the Dragon

I decided to relax last night. After two days of two-hour-plus of working on EBay items, I decided that I'm entitled to some FFVIA. Too bad I stayed up until something like 12:30AM playing it. It's just so addictive!

I'm off to my semi-annual performance review in a bit. Wish me luck, me! ("Good luck, me!")

Wednesday, April 4, 2007

When the moon hits your eye like a big pizza pie, that's Ebay

I spent about 2 hours last night taking more photos of my magic cards and resizing them, but I finally got three auctions up. Check them out here:

Taiga, revised
Birds of Paradise, revised and frouth edition
Everything else, revised, fourth edition, the dark, ice age, fallen empires, and antiquities

I had a Fork I was going to sell, but John, who's been so helpful to me regarding card value and what to do with these auctions, wants it. So I'm selling it to him. Sorry guys.

I really want to play some Castlevania:Symphony of the Night tonight, but I have to do this whole process with my two GBAs and my original XBox. Good thing I finally got past the bottleneck in FFVI I was at.

Tuesday, April 3, 2007

Single Tasking

"Single Tasking" is an idea I produced for myself one morning last week.

When I get to work in the morning, I typically check the New York Post online for new Yankees articles. I also check a few webcomics. Sometimes those sites will link to other sites I want to check out. I'll fire up Visual Studio and Query Analyzer, bounce between them and Opera, then open Firefox for my FF-specific stuff. As a result, I do a lot of things, but I'm not terribly efficient at them. Even when I say "Enough!" and close FF and Opera, I still have multiple work things going on at once.

So I decided to say "Here's the feature/bug/whatever I'm working on, work on it til it's finished." I have to fight myself hard to not think about other things or check email or whatever, but I'll get it done. Then I have to repeat the process. It's totally against my nature to do this for some things (like writing an SQL controller class for my .NET app); I've always found decent productivity while having a TV on tuned to a movie that just came on that I've seen before (more on this later). However, that approach doesn't work when working on code.

After producing this idea, I realized that I'm totally not the first to discover it. ThatVoodooYouDo covered an idea I've been trying to incorporate into my single tasking. Steve Pavlina (that crazy dude) covers an idea called "Timeboxing" (sort of the inspiration for this blog) which sorta ties in with this.

Nevertheless, I've found my highest level of productivity on code during single tasking. How about you?

Day whatever: New approach

Firstly, my activity since last update:

Nothing except last night, when I spent about two hours organizing and photographing my Magic Cards for impending EBay auction. Very tedious, but I stand to make anywhere from $40 to $120 from it, and those cards were just sitting in the closet, so it's free cash really.

Secondly, my protocol:

Obviously, I missed posting most of last week. I began to found posting here somewhat tedious, especially with the format I was using. It's not like all this needs to be machine readable (yet!). Maybe I'll write a webapp on my website (when I finally write it) to handle all that crap for me. But for now I'm going to just post what I do and not worry about "success" or "failure" or all that crap.

Fair enough?
All rights reserved. Take that!