Friday, August 22, 2008
Wait Wait What? Nullable Types in C# 2.0?
int? i = null;
And it works fine. I know the idea is that you can represent a non-answer or unknown entity this way, especially when dealing with databases and DBNull. Still, it seems like a bad idea in a lot of ways. I've spoken out against nulls before when dealing with booleans. But what about integers?
I don't like it. I'm all about conceptual integrity; one thing is one thing. So what is an integer? A whole number. Is null a whole number? No it's not.
So what's the flipside? Sometimes nulls exist. You're going to do a left-join one day, and then your integer column "reset_count" is going to be null. Now you have to code to use the "hasValue" boolean attached to the nullable int (you get "hasValue" for free with every nullable-type declaration). Every time you want to use that value, you have to add code:
if (i.hasValue)
If you have to add that code, then you really have to refactor your code. Whatever you're representing should be able to handle this one-to-zero-or-more relationship without special code. Maybe use a collection and "foreach" through it. Maybe you do something cool that I've never heard of. But if you have to code for nulls, please seriously consider refactoring.
Appendix: I can think of one condition where you might need to add your own "valueSpecified" boolean: classes that represent XSDs with optional attributes. I don't have to like it though.
Thursday, August 21, 2008
New Job, Day 2: Let's See Some Code!
Monday, August 18, 2008
A Glimpse
Pat: don't use byref. please for the love of god*Name changed, blah blah...
Pat: haha
Pat: :)
me: what do you mean about byref?
me: it's appropriate in some cases.
Pat: i think it's confusing and rarely appropraite
Pat: it's too subtle
Pat: i don't want to debate software right now.
Thursday, August 14, 2008
Sorry But I Can't Hold It In Any Longer
So I was surprised when I came in to work this morning and my file association/command line code didn't work. I check the history in version control and find that my esteemed coworker, Pat*, had changed it. I decided to be diplomatic (since I didn't want to piss off people to whom I would not have a chance to reverse any more impressions) and sent out an email to the team:myexe.exe -f "c:\filename"
Did someone change the code for using command line arguments for file associations? All of a sudden this morning I can't double-click and run a file. It looks like someone modified the command line stuff...
I get this response from Pat:
I fixed it, as it was broken. Come over and I'll explain.
(Note: this is one of Pat's annoying tendencies. When he has to explain something he did that invariably is a bad idea or mistake, he always wants to explain in person.) So I trot my butt over there to listen to his story. Turns out when he was setting up our project to work with our deployment software, he entered in the file association code the same as his last project. That is to say, without the space between the "-f" and the filename. So obviously the association wouldn't work.
Instead of adding the space to his code, or even bothering to look and discover what was wrong, he edited the source code of the project to work his way, which of course broke the rest of our builds once he checked in the code. Then he had the gall to suggest that this problem was my fault!
Thank God I'm outta there.
* All names have been changed to protect the incompetent.
Wednesday, August 13, 2008
Entropy Leads To Solar Power
Just had to get that out there.
Random
In other news, I got a new job. Yeah, awesome. No more of the crap I've been dealing with, only new crap. The thing I'm most nervous about is going from being the big fish in a small pond to just another fish in a big pond (replace "big" with "professionally good" and you get the idea). I start next Wednesday, so stay tuned for more on that (or don't, or whatever).
And I've been updating my Todo list regularly as I fix things. I have a hard-copy of the current list in my moleskin notebook I've been carrying around... again.
Monday, August 11, 2008
Totally Freaked Out
And the screen locks up with some static vertical lines flickering.
Ok, fine, a little weird whatever. I shut the XBox off and back on. It boots up, starts loading, makes the same braking sound, but then Niko appears. I move him to the elevator...
And again the static comes back with a crackly sound.
At this point I was actually scared shitless. I can't rationalize it, but somehow I thought that GTAIV is becoming self aware, or some other seriously scary shit. I don't know, but I was freaking out.
Freak. Ing. Out.
I jumped up and nearly ran to change the channel to TV or something non-threatening. With the Colbert Report on, I dared to turn on the console one last time.
Red ring of death.
I swear this was The Ring for how scared I was.
I won't be turning on the XBox until it's high noon.
Thursday, August 7, 2008
Calling All Softball Players
Monday, August 4, 2008
Fantasy Baseball Trade: Post Mortem AGAIN
New dude:
Jurrjens has been solid for the Braves so far, and I hope he doesn't get shut down early.
Cya later dude:
Hardy profiles like a lesser Tulowitzki (which is funny since I just traded for Tulo). He's been on fire lately, and I can only afford to trade him since I have Tulo.
Conclusion:
Seems like a trade that helps both teams. Hardy replaces Theriot on his team, and Jurrjens enters a rotation of Harden, Zambrano, Blackburn, Campillo, and Slowey.
Fantasy Baseball Trade: Post Mortem
New guys:
Cano is a notorious 2nd half player, and a very strong offensive and defensive 2B. He'll provide upgrades over Upton in every category except Avg. and steals. Wainwright will sit on the bench (until I decide to cut bait on Pronk, who currently holds my DL spot) until September or so, when he'll add some meat to my pitching rotation.
Long gone guys:
I love Abreu, and he's been crushing the ball lately. But he's 34 going on old, and he's shown some signs of slowing down. Plus I have a total logjam in the OF with Hamilton, Markakis, and Hart holding the 3 starting gigs and Abreu, JD Drew, and Ludwick (manning the Util for now). Upton was the focus of this deal. Since he was my 3rd round pick, I felt somewhat obligated to keep him for next year even though he'll lose his 2B eligibility next year. I managed to deal him and get a potential keeper back too.
Conclusion:
I think I overpaid for Cano, but given that I got rid of Upton, I completed my goal. Of course, now I have 6 potential keepers: Pujols, Hamilton, Markakis, Hart, Cano, and Tulowitzki.
*League stats: 10 teams, 5 keepers, 8x7 H2H scoring (add'l stats: H, OBP, SLG, K/9, K/BB), shallow rosters. I'm currently in 5th place (top 6 make playoffs).
UPDATE: The trade got vetoed, and no one will explain why they vetoed it. We renegotiated and removed Abreu from the deal.
Sunday, August 3, 2008
Shut Up You Bum! No One Cares What You Think!
The second is a little more interesting. I've played fantasy baseball for a modest 5 seasons so far with moderate success. Typically, I draft poorly but manage well. I also seem to do very well on trades. I get these gut feelings on guys, and while I try to focus on the stats, sometimes these gut feelings are very strong. Melky Cabrera is one of these. I wanted the Yanks to play Melky in CF every day over Bernie. Bernie was old, Melky was new. Stats favored the Melk Man. But I had this feeling that Melky wasn't the answer. I ignored it, argued for hours with my dad that Bernie was a 4th OF at best. One look at Melky's stats tells a different story.
The latest feeling was about Erik Bedard. He was so highly hyped this offseason for fantasy and real life. It looked like the Mariners could use him to catapult to the top. Despite having him high on my draft sheet, I had a bad feeling about him. That feeling was right.
I know hunches are total BS. But I also know that the subconscious is a powerful source of intuition, and that maybe the back of my brain knows more than I do. So just maybe I'll talk about them here.
OK OK Enough I know! I'll shut up already.
Saturday, August 2, 2008
Current To-Do List
Buy wire shelves for basementCompletedHang wire shelves in basementCompletedOrganize basementCompleted for nowBuy plants for gardenDonePlant plants in gardenDoneReturn some things to Bed Bath & BeyondWhat a fun time that was- Buy new coffee table and end tables
Buy and use crab grass removerNot doing- Start EBay auctions for Nokia phone and video games
- Mail Eric his games back
Get window screens from basement and put them on windowsCompletedTry to fix the broken screen in the officeFixedBuy a new screen for the window above the sinkUpdated: attempt to repair screenRepairedWeed whackCompletedHand wash the pans and plastic containers in the sinkDone, but will need to be done againClean up the walkway leading to the front doorCompletedGet the mower fixedFixed 8/16Mow the side yardMow the whole yardCompleted- Return cell phone to Target
Removed some weeds from the middle of the yardCompletedEmptied dishwasherDone, but damn does this happen a lotOrdered flowers for MomHappy Birthday Mom!- File bills/paperwork
Take pennies to Coinstar machineDone; used the money to buy a new mp3 playerGet replacement license plate for MaxOrdered; should arrive in 2 weeks- Hang new shades
Stain new ottoman legsCompleted
Monday, July 21, 2008
A Eulogy For A Phone

A power cycle solved the problem for about an hour, then it reinverted. I just worked with the weird phone until I shut it off for the movie theater. Now it will not power up at all.
It is truly a sad day for all phone-kind.
What really sucks is that both Targets I've been to have been sold out of T-Mobile prepaid phones. What the crap man!
Friday, July 11, 2008
Wednesday, July 9, 2008
Public Servivce Annoucement
Monday, July 7, 2008
Yahoo, Give the Minor Leaguers Love Too!
In Yahoo fantasy baseball, managers (people playing the game) get to choose MLB players from the player pool for their teams. The player pool normally consists of everyone who is on an active MLB roster or was on a roster last year and has not formally declared retirement. The Yahoo team also has several minor league players added, usually the interesting ones (e.g. Evan Longoria). However, they do leave some notable minor leaguers out (e.g. Jay Bruce). This leads to interesting situations when those left-out players are called up to the bigs.
Having the #1 waiver priority is a huge advantage. It means that you get first dibs on the hot new rookies recently promoted to the bigs who were excluded from the player pool. You can snag that essentially free player, be it Clayton Kershaw or Jay Bruce, hitting or pitching, whatever you need. These excluded players really make the #1 waiver pick much more valuable than it should be.
In one of my leagues, Evan Longoria was drafted with the 180th pick (out of 400 players taken). But Jay Bruce, Johnny Cueto, Edison Volquez, Matt LaPorta, and other excluded players were undraftable, leading managers to draft such waiver trash as Jacque Jones, Luis Gonzalez, Lee Gardner, and Ronnie Belliard.
Players who want to take a risk and hold on to MiLB stars can only hope those stars are in the select few added by Yahoo's sports staff to the player pool. Waiver priority is designed to decide who to allow to pick up dropped players. Instead, it can be used as a tool to drastically improve a manager's team midseason.
Yahoo really needs to add all MiLB players in any team's 40-man roster to the player pool. There, that'smy piece. I'm done.
Tuesday, July 1, 2008
Wedding: The Only Bad Part
I plan to post a thorough review of everything that happened on my wedding day, because A) it was mostly awesome and B) I don't like having to tell the story 8000 times. But there was one part that totally sucked: the limo.
During our booking process, we discussed various Excursion/SUV limos with the limo company and the owner, Brendan. When we visited Brendan to sign the deal, he showed us two Excursion limos, and pointed out one of them that likely would be the one we'd get if we booked that day. We booked the Excursion limo that night with Brendan and handed him a hard copy of our itinerary.
First of all, the limo driver showed up in a 14-passenger Town Car limo instead of the 18-passenger Excursion limo we had ordered. We spoke with the owner on the phone and he insisted we ordered the smaller limo. He asked me to check my receipt, which I could not find, and that the receipt clearly said 14 passengers. While I haven't been able to find my copy of the receipt, we spoke exclusively with Brendan about the Excursion limo. Brendan only ever showed us Excursion limos. The only place 14 passengers was mentioned was when we asked him if 14 people would fit in the Excursion limo. Brendan even admitted on the phone on June 14th that the limo he sent us would not fit 14 people. We had to make immediate plans for groomsmen to drive their own cars instead of being in the limo.
Then, the driver was unable to turn on the electricity in the cabin for the first 15 minutes of the trip. This meant no radio and no air conditioning, a big deal on a hot June day. She did not have a copy of the itinerary that we sent in via email and by hard copy when we signed. We gave her the addresses and told her the time and schedule. After she dropped off the men at the church, she left the church to get lunch for herself without telling anyone. By the time she returned and we sent her to the hotel to pick up the bride, the wedding was delayed by 30 minutes. Our guests had to wait 30 minutes for us in the church, and we lost 30 minutes of the 5 hours we had booked for the reception.
On top of it all, Brendan and the driver were rude through the whole process. The driver acted like she was doing us a favor driving us around, and Brendan didn't make any attempt to apologize or even be nice to myself and my best man.
I am in the process of discussing this with the limo company, so I don't want to mention their name yet. We'll see how they respond to my query.