Wednesday, February 28, 2007

I am the king of FizzBuzz

With all the latest hooplah about fizzBuzz, I decided to make the most maintainable VB.NET implementation of fizzbuzz ever! Check out the majesty:
Public Class fizzBuzzCalculator

private _count as integer
private readonly _fizzText, _buzzText as string
private readonly _fizzInt, _buzzInt, _ceilingInt, _DoneInt as integer

Public Sub New()
_count = 1
_ceilingInt = 100
_doneInt = Integer.minValue
_fizzText = "fizz"
_buzzText = "buzz"
_fizzInt = 3
_buzzInt = 5
end sub

Public Function PrintNumbers() as String
dim count as integer
count = _GetNextInt()
While count != Integer.MinValue
Console.WriteLine(_CalculateOutputForSingleInt(count)
count = _GetNextInt()
end while
end function

Private Function _CalculateOutputForSingleInt(ByVal int as integer) as String
Dim output as string
if int mod _fizzInt = 0 then
output += _fizzText
end if
if int mod _buzzInt = 0 then
output += _buzzText
end if
if output = String.Empty then
output = int.toString()
end if
return output
end function

Private Function _GetNextInt() as integer
if _count > _ceilingInt then
_GetNextInt = Integer.minValue
else
_GetNextInt = _count
_count += 1
end if
end function

end class

Day 9: A New Hope

Was productive yesterday, but on work stuff. We have a semi-annual review process at my company, and they require you to write a self evaluation. Employees typically also write an upwards review of their boss. Also, anyone can request a coworker to make a lateral review. So I had to write a self evaluation, an upwards review, and a sideways review. I wanted to look professional, so I spent about 10 minutes on each, a little less on the sideways review, for a total of 26 minutes (I clocked myself). So I booted up RadRails and poked around at my RoR test project for about 10 minutes.

I don't think my times should be additive for my goals. For example, if I spend 15 minutes during lunch on one project and 15 minutes later on another project, that should be a failure (because really, what can you get done in 15 minutes?). Mark it down as a rule!

Date: 2/27/07
Status: Success
Project 1: Evaluation forms for work
Time: 26 minutes
Project 2: Website
Time: 10 minutes (no constructive work done)

Tuesday, February 27, 2007

Day 8: Extenuating Circumstances

Yesterday I went to the gym for the first time in at least a month. When I got home, I spent 1.5 hours on the phone with my dad, at least 30 minutes of it talking about real estate. After Annie fell asleep, I started to poke around getting RadRails to recognize my project (first trying to get it to check out of Subversion directly, but it didn't seem to want to do that). I then gave up and played FFVI. So I got maybe 10 minutes in there.

I know that one of the things holding me back is that I keep thinking I need some help getting started... but I don't really. I should just start cracking.

Date: 2/26/07
Status: Failure
Project: Website
Time: 10 minutes

Monday, February 26, 2007

Day 7: First Test of Adversary

My first major test happened yesterday, and its name is "Final Fantasy VI." I purchased this game last week, and boy, it has consumed me. I spent like 12 hours playing it this weekend. Something ridiculous like that. Anyway, we'll see how I handle this new addiction.

Date: 2/25/07
Status: Failure

Saturday, February 24, 2007

Day 6: Early Worm Gets the Worm... or something like that

Bam. It's not even 2PM and I've already hit my goal. Booya.

More work on setting up my environment. Got Rails, Capistrano, RadRails, SQLite, and something else installed. Worked on getting it all working together. I'm missing a few pieces, and certainly not doing things in the right order (Capistrano? I don't even know her!) but I made progress. Next time I'll make sure Eric or Brent or John is online to help me get this shizzle working.

I do have one problem: my actual time accounting for this is a little vague... I worked for over two hours today on this stuff, but I was watching TV the whole time. It wasn't good TV, but it did reduce my overall efficiency. I'll be conservative and say 30 minutes.

Date: 2/24/07
Status: Success
Project: Website - development environment
Time: 30 minutes (120 minutes multitasking)

Day 5: First Friday

So my fear came true; I did not meet my goal yesterday. I did not have any social plans or anything, but I still couldn't find time to be productive. Granted, going to bed at 10:30 didn't help.

The first idea that comes to mind is to not count Fridays. My gut is against this.

My second idea is to push that 30 minutes to another day. I don't really like this either because it makes my goal more of a job.

Well, I don't really have enough data to detect any patterns, so I'll just mark it as a failure.

Date: 2/23/07
Status: Failure
Project: none
Time: 0

Friday, February 23, 2007

Possible complications

I had a thought this morning: I will have trouble on Fridays reaching my goal. Today shouldn't be a problem because Annie and I do not have anything big planned (we might go see a movie). However, last Friday I got home from work, changed, went out, and did not return until past midnight. I had no chance of being productive.

I'm not sure how to handle this. I'll have to come up with some sort of proviso.

Thursday, February 22, 2007

Day 4: Getting to the Good Stuff

Today was the first time I did programming work, and it felt good. However, I didn't write any actually code for my website; rather, I spent about 25 minutes setting up my development environment. I was going to do some more, but I had a few questions about RoR and which database server I should use (I'd love to use Kirbybase, but I'm not sure if that's where I should start) but Eric wasn't online, so I stopped there.

However, I had done some work earlier, so I was already over my goal. I decided to write a VBA app in Excel to manage my fantasy baseball draft cheat sheet (I won't go into details here, but it's a basic app). I spent about 45 minutes on that (much of it was spent cursing at VBA because it's not VB.NET), but I got some good work on it.

Date: 2/22/07
Status: Success
Project 1: Website (dev environment setup)
Time: ~25 minutes
Project 2: Fantasy baseball app
Time: ~45 minuts

Wednesday, February 21, 2007

Day 3: Changing Gears (of war... lol)

Today was the first day I started working on something other than the GMAT prep. My XBox 360 has had consistent but random crashes with a "Disc is unreadable" error message. Clearly, the discs are all readable, as I have played through these games many times without error. I tried to troubleshoot this by email, but the email techs can't authorize a repair, so I called in. I spoke with a knowledgeable female CSR (with whom Annie accused me of flirting... as if!) who authorized a repair. Booya.  However, the phone call took only 23 minutes.

Date: 2/21/07
Status: Success... kind of
Project: XBox 360 repair
Time: 23 minutes

Protocol Update

Today I started a paper log of my productivity in a small stenography notebook. I did this for two reasons:
  1. If I'm tired, it's easier to write "date: project: time" in a notebook than logging on and writing a blog post.
  2. I might forget what I did if I didn't write it down.
Crazy, I know.

Tuesday, February 20, 2007

Day 2: Success in the face of failure

Tonight Annie's parents were over and are spending the night. This meant no Gears of War (as her dad stays up until like 2AM watching TV, and I'm really not comfortable slicing Locusts into two gory chunks with my chainsaw bayonet) so I had a good chance of getting some work done. I decided tonight was a good night to finish the GMAT prep test (as you're really supposed to do it all in one session).

I tried to complete the test in the kitchen (attached to the family room, where the other three were watching TV), but I was too distracted, so I bounced to the guest bedroom. I completed the test (completed each multiple-choice section in less than the 75 minutes given for each) and began work on the "diagnostic questions" in the GMAT test book I borrowed from best buddy Bill. I got about six math questions done in 20 minutes before Annie's mom wanted to go to sleep, which required me leaving the guest bedroom. So chalk up another success.

Date: 2/20/07
Status: Success
Project: GMAT prep
Time: ~70 minutes

Monday, February 19, 2007

Day 1: Failure before Starting

Today is President's Day. I got it off from work. Annie (my fiance) and I had a few chores to do, including some shopping (I am one of those guys who enjoys the mall. Hey, I grew up in New Jersey, give me a break). I also had social video game plans for 9:30 PM (finishing Gears of War on insane difficulty with Ryan). So my plans for today were relatively modest, but more than the 30 minute goal:
  • Complete a practice GMAT test. Total time alloted for test: 2.5 hours
  • Work 30 minutes on my father's website.
I began the GMAT test around 1PM and got through the two 30-minute writing sections. Then Annie and I hit the mall. We returned around 8PM, and I managed to get another 30 minutes of the test in before my attention was lost forever. So I missed my daily goal, but hit my project goal, so I'll count this as a success.

Date: 2/19/07
Status: Success (based on original goals), Failure (based on the day's individual goal)
Project: GMAT prep
Time spent: ~90 minutes

Sunday, February 18, 2007

Introduction

Hello readers! This blog is different from my other blog, "I'm Funny Once a Day", or IFOD. "I'm Productive Once a Day", or IPOD, is not intended to be funny. My goal is to post here daily.

What will I post? Well, here's the deal. I've struggled with being productive outside of a work or school environment since, oh, ever (I'll tell you the 3rd grade story later). I've tried financial incentives, social incentives, even flagelation... well not really. But the more I try, the more I end up playing Gears of War.

So gleaning some ideas from blogger Steve Pavlina and friends Eric and Brent, I've implemented a policy of modified time-boxing. Basically, my goal is to spend 30 minutes a day doing something productive. 

Now, let's define productive. First, here's what I do not include:
  • Household chores (since they need to be done anyway)
  • Work (because I am plenty productive at work and always have been)
  • Anything I need to do (for example, taking the car to get an oil change, or calling Bank of America to dispute a charge on my credit card)
  • Posting to this site.
Now, here's what I do include (N.B. this list is my current list):
  • Working on my website/learning RoR and CSS
  • Calling Microsoft to get my psuedo-broken XBox 360 fixed, and then shipping it to them
  • Calling T-Mobile to negotiate a new contact where they give me lots of stuff
  • Building a VBA app to create intelligent a fantasy baseball draft cheat sheet
  • Studying for the GMAT
  • Posting to IFOD
So, I will post my daily "productive" work here. Also, I will post various thoughts about being productive outside of work, and anything else. This blog is mostly for myself and my friends. Eventually I'll move this to my own site, but that may be a while.
All rights reserved. Take that!