Thursday, December 31, 2009

Goals for the next 3 months

It's almost a new year. So it's now time to come up with some New Year Resolutions. I've already looked back at what I've done the last year, so it is time to look forward.

First, I plan to write 1 blog entry a week on average. This is an aggressive pace, but I've already written 6 posts in the last 3 weeks which I'm counting since it is my list. There are 17 weeks between now and the end of March. So that means I must write 17 blog posts by then. Since this is number 8 of 17. I am off to a good start.

Second, I plan to redesign the look of this blog. I like to delve into many different areas of programming and web design and a site redesign is a good place for me to stretch myself.

Next, I am currently reading Strunk and White's The Elements of Style. I plan to finish this book within the next month. Afterwards, I plan to get halfway way done with the other book I am working on, the Self Paced training guide for Microsoft certification 70-536.

Finally, my Stackoverflow rating is currently 219. I would like to improve this rating to 300 by the end of March.

Overall, this is a much more conservative list, but there is still much for me to do.

Tuesday, December 29, 2009

Wishful Thinking

It was wishful thinking for me to think I could accomplish all the goals I set out to do over to months ago. Not in 18 months could I accomplish what I set out to do in 6 months.


In some areas I was successful. For instance. I did read 1 book a quarter. However. I was woefully off target with the number of blogs I posted.


Overall This is how I did:
  • Blog posts: I posted 4 of the planned 26 posts. I've done more posts in the last 3 weeks then the last 18 months. Hopefully, I can keep up with this pace.
  • Source Code: I did not read any software code projects at all.
  • Development Books: I did complete Dreaming in Code, and I've read many other Development books, close to the pace of 1 per quarter.
  • Developer lunches: I had some initial success with this, but the lunches did not last. Many of the people who would show up left the company. Only 1 other person is still working here, but his a DBA Engineer so their isn't much common ground for us to discuss.
  • Release 2 Software projects: I released 1 Software project. But only to Google's Code base. After I uploaded the source code, I have not touched the Code since and only one other person is aware that it exists.


All in all, not a very good showing. Later this week, I plan to announce a more conservative plan for the next few months.

Thursday, December 24, 2009

Microsoft Courier

I thought an appropriate post for the day before Christmas would be a wish list. There is only one tech item on my wish list: a Microsoft Courier.


Now If you haven't heard of this device yet, there's good reason for that, it hasn't been released yet. It's a product that Microsoft is keeping under wraps and won't publicly comment on yet. There have been a series of videos released that showcase its usability.


Video 1


Video 2


Now it is odd that such a stunning device comes from Microsoft, but as interfaces go, this one seems exceptionally stunning.


This isn't the first portable duel screen system that Microsoft has prototyped. There was an older system that Microsoft put together from two PDAs, the Codex


Both of these devices are intriguing and perhaps a glimpse of Mobile devices of the future. As someone who likes PDAs, this development is really exciting and one that I will be following for months to come.

Wednesday, December 23, 2009

PALM OS vs. Pocket PC

Recently, my 8 year old Palm Pilot died. It took a nasty fall off of the counter and the screen broke. Sadly I had just started using it again. The last four blog posts had been written on it. I was relying on this device to organize many different things. Thankfully, they were all backed up on my computer so little was lost.


As someone who has difficulty getting organized this came as a big loss to me. Fortunately, my wife helped Me find a replacement device. I ended up with a Dell Axim x5. This device comes with Microsoft Pocket PC instead of the Palm 0S and is a much more advanced machine then the one it was replacing.


There are some advantages to using Pocket PC instead of Palm's OS. While there are many differences between the two devices, I will focus on the Operating System itself and cover the devices later.



First of all, the OS is more polished. Navigation is much more intuitive, and is more like Windows then the Palm OS.


Secondly, the applications on the Pocket PC line up with the Microsoft Office applications. Where as the Palm device required the use of a third party system to sync and store the data with a host computer, the data from the Pocket PC synchronizes directly with the Office Applications and file system.


Third, the data input for the Pocket PC is much more sophisticated then what Palm Could offer. To me, this is by far the most important advantage.


If you've never used a Palm device there is only two built in data input options. A tiny keyboard and Graffiti. A proprietary writing shorthand that one had to memorize In order to use this method of input. Often. I would mess up Something or would forget how to make a symbol. The Pocket PC offers both of these input options and a third, a Transcriber, which can identify the words written on the screen and convert them to text. It is much more natural and quicker.


I'm still learning all of the functions, but I've found this device to be very intuitive so far. And for someone who has chicken scratch hand witting, the this device is remarkably good at figuring out what I am trying to say. There is no higher compliment I can give but that.

Thursday, December 17, 2009

ASP.Net MVC and LINQ Tutorials

I was running through several Asp.net MVC and LINQ tutorials when I ran into a problem; part of the code in the tutorial wouldn't compile. After an hour searching, I finally found the solution to the problem. This is fairly widespread, as far as I can tell.

This has occurred b/c these technologies were in beta and the tutorials were written then. Microsoft has made some changes to these frameworks, but some individuals have not made the effort to go back and update their tutorials (I don't mean this as a slam against these authors. There are plenty of reasons why these tutorials don't get updated.)

In an industry such as ours that is ever changing, we need tutorials to teach new technologies in a hands-on fashion. That's why I have started a wiki at

http:\\devtotorials.wikia.com

This is an ad supported site at the moment, but eventually this will be moved to another location once the site has a decent amount of traffic and content.

Tuesday, December 15, 2009

Staying Enthusiastic about Programming

I started in programming like many developers out there. I was a hobbyist as a kid. I picked up a book on BASIC as a kid and loved it. I enjoyed seeing something I wrote and created come to life on the monitor. It was because of this passion that I learned Computer Science at school, and this same passion kept me from directly pursuing a development job out of college. My reasoning at the time was that if I coded at work all day, it wold take all of the fun out of coding.

Sadly, I was right. Especially in the last six months, since I moved to a new project, this feeling has overwhelmed me.

The problem lies mostly within the project itself. There does not feel to be any guidance, project assignments made little sense, there were serious deficiencies with the database that I was not able to address, and there have been serious communication issues with one of the offshore offices. At times, I have really gotten the feeling that the US office and foreign office are competing, yet the metrics aren't fair. Sure, the foreign office I might have addressed more issues, but these were largely the easier issues and many of them had to be addressed multiple times as the first fix broke something else.

On top of all of this, I have had 5 different managers in 12 months. One of those transitions occurred without my knowledge. I actually sent my new manager an email asking him if I reported to him!

Through all of this, there is one way that I've found to recover the passion to code again; hang around others who are passionate about coding. The level of energy is amazing and has really allowed me to refocus on my craft again.

The what is easy, but how might be difficult. What if there is no one else at your company who shares your passion for coding?

One option is to attend a local developer group meeting. .Net and Java will often have user groups in major cities.

You can also try to find a local nerd dinner.

You can try to read some blogs of other passionate developers, but written text is poor at conveying emotions. The better electronic approach would be to listen to developer podcasts. I try to listen to Stackoverflow and Hanselminutes on a regular basis. Not only do I walk away from podcasts educated, but they are also motivating. (Unfortunately, I am now blocked from downloading them at work, so that in itself is demotivating.)

We can all lose our passion for our jobs, but engaging with others who still have that passion can help bring it back out in us.

Thursday, December 10, 2009

Signs its time to find a new job

1.) There's no or few other developer who are passionate about what they do. This means they've all gone elsewhere.

2.) New policies and restrictions are placed on developers, hindering the work we do.

3.) A major contract falls through or a major client leaves.

4.) Reorganization or layoffs out of the blue. This could be a sign of things to come.

Tuesday, December 8, 2009

Playing Ball

Like many developers, I entered this career because I enjoy creating programs and solving problems. However, sometimes managers just don't understand the hacker mentality. While we as developers may strive for perfect code, as employees, we are expected to deliver results.

While programmers may prefer to be judged on our awesome coding abilities, managers prefer more tangible and measurable qualities to grade us on. While we may not like it, this is how the corporate environment works.

If a developer wants to advance his career, sometimes its necessary to play ball. Playing the company politics game is not a game most people will want to play, but it is a necessary evil.

Playing the politics game sounds dirty, but not it doesn't have to be.

The easiest way to play to do this is by making your boss look good. Completing tasks on time, delivering accurate estimates, and providing expert advice are a few ways this can be done everyday. But it is the atypical tasks that provide the best opportunity for this. Whenever there support issues, timeliness and clear communication are key to making you, your department, and your manager look good to other departments and the rest of the company.

Special projects are also a good opportunity to excel. Perhaps its tabulating some data, building a special application, or creating some documentation. These can provide insights to what the company at large is working on and provide ways to help accomplish those goals.

Recently, my manager was tasked with finding out who had an MCP ID. I had one, but had some difficulty finding it. While searching for it, I learned that it was important for the company's Microsoft Gold certification. For those without a MCP ID, this would be an opportunity to earn one while the need was still in the manager's mind.

Wednesday, April 15, 2009

Challenges

Challenges

I had to do something the other day that I've never had to do. I turned down a job offer. Some background infomration might be necessary first to fully understand.

Last fall, I was informed that I would be moving from the domestic development group to the internation development group in late Winter. In the beginning of winter, I was given an assignment from our Implementation group to help them with their backlog. They were impressed with my work and offered me a temporary position with their group to help them decrease their backlog even further.

For the last two and a half months then, I've been augmenting our implementation staff with some of the work they have. Early on, I knew the work would lead to a job offer. In the end, there wasn't really a choice.

A lot of the work is technical in nature, but not very difficult. Most of the challenges that I was faced with in this posistion were not technical challenges, but social challenges.

Technical challenges are the challenges that occur in trying to get the technology to do what is necessary to complete the job at hand. This could as simple as knowing how to operate a lawn mower for a lawn care service, to using Outlook, Office, and other computer applications, all the way up to actually designing the software that others use.

Social challenges are the challenges that occur in working with others. Examples include trying to figure out what a person has asked of you, what it is that they really want accomplished, or how to pursuade them to do what you thing is best.

Each job presents Technical and Social challenges, but I am a person who thrives on the Technical challenges. In this, I had my answer. To be satisfied with my job, I need to have a job that presents me with Technical challenges that push my skills, and not just a job which utilizes my skills.

Tuesday, April 14, 2009

Weekly .Net Library Review 1: TimeZoneInfo and DateTimeOffset

Weekly .Net Library Review 1: TimeZoneInfo and DateTimeOffset

While on StackOverflow (www.stackoverflow.com), I ran across a link to this poster.




I know very few of the classes listed on the poster, but it occurred to me that I should strive to learn more of them, so in the style defined by Scott Hanseleman, I plan to investigate a different class or two available in the standard .Net library. In this first installment of many, I will go over two classes that were introduced in .NET 3.0, TimeZoneInfo and DateTimeOffset. Both of these classes can be found in the System Namespace.


TimeZoneInfo

TimeZoneInfo is similar to the TimeZone class. However unlike the TimeZone class, the TimeZoneInfo class provides many static methods, including GetSystemTimeZones(), which returns a collection containing a TimeZoneInfo object for each Time Zone that is configured on the local machine.

DateTimeOffset

The DateTimeOffset class is similar to the DateTime object that has been in present in .NET since 1.0. There are two distinctions. First, the DateTime has a Property called Kind, which returns an object of type DateTimeKind. DateTimeKind is an enum with three values, Utc, Local, and unspecified. This denotes what time zone the object is based on; UTC, Local, or an Unspecified time zone. DateTimeOffset is always based on UTC time, so this property is unnecessary. DateTimeOffset also contains an Offset property, which is an object of type TimeSpan. This object contains the Offset necessary to calculate the local time from the UTC time. For example, if the local time zone is Eastern Standard Time, then the offset will be -05:00:00.

Sample Code

Above is a screenshot of the application, with notes in red.

1 is a drop down box named cbTimeZones.

2 is a label named lblUTTime

3 is a label named lblTime

4 is a label named lblOffset


During initiailization, cbTimeZones is populated with the results of TimeZoneInfo.GetSystemTimeZones(). The selected Time Zone is set to the local time zone. A function called UpdateTime is called, which sets lblUTTime to the current UT Time, lblTime is set to the time in lblUTTime plus the offset, and lblOffset is set to the offset of the current selected Time Zone.

A DispatchTimer is created and set to trigger every second. When triggered, it calls a method which in turns calls UpdateTime().

The constructor looks like this:




public TimeZoneUtil()

{

InitializeComponent();

DateTimeOffset currentTime = DateTimeOffset.Now;

foreach(TimeZoneInfo tzi in TimeZoneInfo.GetSystemTimeZones())

{

cbTimeZones.Items.Add(tzi);

if (tzi.Equals(TimeZoneInfo.Local))

{

cbTimeZones.SelectedItem = tzi;

}

}

UpdateTime();

timer = new DispatcherTimer();

timer.Interval = TimeSpan.FromMilliseconds(1000);

timer.Tick += new EventHandler(Timer_Tick);

timer.Start();

}




The TimerTick method is trivial and the UpdateTime method is straight forward:





private void Timer_Tick(object sender, EventArgs e)

{

UpdateTime();

}

private void UpdateTime()

{

DateTimeOffset currentTime = DateTimeOffset.Now;

TimeZoneInfo selectedTimeZone = (TimeZoneInfo)cbTimeZones.SelectedItem;

TimeSpan selectedTimeZoneOffset = selectedTimeZone.GetUtcOffset(currentTime);

lblTime.Content = currentTime.UtcDateTime.Add(selectedTimeZoneOffset).ToString();

lblUTTime.Content = currentTime.UtcDateTime.ToString();

lblOffset.Content = selectedTimeZone.GetUtcOffset(currentTime);

}




The 4th line of UpdateTime is the trickiest. Here we get the UTC time (A DateTime object) stored in the DateTimeOffset object and we add to it the offset from the currently selected TimeZoneInfo (A TimeSpan object). This gives us the current time in the selected time zone.

To get the current time, the easier approach would be to call LocalDateTime property on the DateTimeOffset object. I do not do that in this example, as I wanted to allow the user to select a time zone instead of always using the local time zone.