MongoDB

MongoDB .Net Driver date handling

I ran into an interesting situation when saving dated to MongoDB using the Mongo .Net driver (version 2.0). When saving a date with unspecified kind, the driver converts the date to a universal datetime. It appears that the driver will assume that a DateTime object with an unspecified kind is a local time, and convert it to universal time (UTC) before committing it to the database. In my particular case, my origin date was UTC and was read from SQL server.

Computers

Keyboard Manual Registry Settings

I have always had a sneaking suspicion that my keyboard repeat rate and repeat delay settings were a little too slow for my taste. Windows only lets to you increase the values in a fixed range but with a registry change, you can adjust as you please. Play around with AutoRepeatDelay and AutoRepeatRate, these are the settings that work for me. Don’t set the AutoRepeatDelay too fast, it will make it so that when you type letters they are repeated immediately.

Programming

PowerShell Sublime Text Shortcut

Lately I have been learning about Git and GitHub. Most of this work is done at the command line, I have found myself quickly amassing PowerShell functions that acts as shortcuts. One very handy shortcut is the ability to launch the sublime text editor and open the current directory as a project. Or alternately passing in a file to edit. Once this function is in your powershell profile, just type “edit” at the command prompt and sublime will open the current folder.

Consulting

Keeping Up with Technology

Learning new technologies and techniques is a part of life for any software developer. Programming is a quest for knowledge and understanding which lasts your entire lifetime. No other profession has a more dynamic working environment. Tools change and evolve on a daily basis it seems. Learning is incumbent on all developers. Darwin’s law applies, adapt or perish. Luckily most of us are used to this environment and thrive on the constantly changing landscape.

Programming

Remember, Software is Soft

There are times when I have witness (and participated in) arguments about trade-offs between scope and effort. Sometimes developers tend to push back fairly hard with the perception is that the effort is too high for a particular feature change. Coders can become downright defensive when you are talking about changing the fundamentals of an application. After all, this is their baby and someone just through it out with the bathwater.

Life

It doesn't matter what it is. Start Now.

It’s funny, I put off writing this post for over a week. That might make me a hypocrite but it doesn’t mean that the truth is less important. Procrastination is the enemy. If you want to get something done, start immediately and fail often. There are a million reasons not to start right away. Maybe you won’t be any good at it, or you have more important things to do. Maybe you are just plain scared of judgment from your peers.

Programming

Tech Interview Question: The Clock Problem

“The Clock Problem” is an interview question that I have been using for a few years. I first learned about it when I was being interviewed. I have now adopted it as my first line of defense against imposters. :) It’s a simple problem that can be used to determine a candidate’s capacity for analytical problem solving. The beauty is that the problem has a simple and elegant solution which can be found in less than 10 minutes.

Consulting

Take Pride in Your Work

In my daily work, I lead teams that build software. These are “line of business” or “enterprise” software systems. I come into contact with a lot of developers, all with differing backgrounds, experience levels and personalities. I see the good and the bad. Pride generally stands out as the most accurate quality indicator of the individual developer. Having pride in your work makes you want to improve. If you are mindful of the effects that your work has on others, that can only lead to a better career path.

App Engine

The case of the 30 day memcache timeout on app engine

I ran into an interesting problem with Google app engine. It seems that the memcache time limit is enforced differently on the development server versus the production servers. The documentation says that the time limit for a memcache key is 30 days. The behavior that I have observed is that if you set a memcache key to timeout at 30 days, the development server (on windows) will happily persist the data as expected.

Consulting

Should you be a platform developer?

Over the past few years I have seen many developers struggle with a growing dilemma, do I devote my time to platform development? When I say “platform development” I mean building application on products such as Microsoft SharePoint and Microsoft CRM. The IT world is rapidly moving toward standardizing on platforms such as these. They offer lower IT costs, standardized infrastructure and overall lower cost of ownership. It makes sense from a business perspective, but what do you do as a developer?

Programming

How to add your last tweet to your blog

I thought it would be nice to see my last tweet on my blog. It turns out that there is an easy way to do this using jquery and the twitter api. These instructions may not work for you if your blogging platform does not allow embedded JavaScript (wordpress.com does not). To get the tweets for any user in JSON format you can visit http://api.twitter.com/1/statuses/user_timeline/username.json?callback=? Where username is the twitter username.

Programming

Code is Creative

Most people think of programmers as the guys guzzling mountain dew in a dark room where pizza slides under the door at around 6PM and a feature is built by 2AM. Although this is can be the case (we’ve all been there), I have found that most of the people that I look up to are not at all like this. More often than not people who have influenced me over the years are people that show a genuine passion for software but also have massive creative energy and a social team mentality to boot.

SharePoint

Using the SharePoint content database as a cache

Data caching is a core concept in the web dominated world that we live in. The premise is that we should not have to go back to retrieve data from a data store for every single web request when the data is unchanged, thereby sharing data across web requests. This offers huge performance advantages because all latency related to data fetching, query processing and transmission is eliminated for requests that use the same data.

SharePoint

Custom Field control implemented as a User Control

When creating custom controls it is often must easier to create a control using the “User Control” development model instead of the “Server Control” model. Server controls generally have a more “low level” feel and dictate that the developer build the control’s rendering from scratch. Either by building a control tree or by constructing the rendered output in code. Alternatively user controls have nice separation of code and presentation by virtue of having a markup file (.

SharePoint

SharePoint Custom Application Development Methodologies

As SharePoint becomes more prevalent in the custom application development realm, there has been some friction and malcontent expressed in relation to deployment processes, team development methods and application upgrade paths. I believe that Microsoft has fallen short on providing the tools necessary to promote and support custom application development on the SharePoint platform. In my opinion, the SharePoint platform should not limit nor impede my ability as a custom application developer to deliver solutions that follow the same deployment principals as any other custom asp.