Friday, August 29, 2008
Now I Can Really Screw Myself
And to think, I started with a credit card with a $201 limit.
Tuesday, August 26, 2008
Just an FYI: Ctrl + Atl + i = Immediate Window
If you can't find the Immediate Window in Visual Studio (it doesn't appear in Debug -> Windows or View -> Other Windows), press the shortcut "Ctrl + Alt + i". That will make it appear.
That is all.
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