I build apps.

I am a software developer specializing in C#, I have been doing this for the past 8 years.

I am passionate about developing software using test-driven development (TDD), object oriented design, and design patterns.

I have been writing a blog on and off for a few years now. During this time I have moved from several different blog engines and services to finally a setup that I think makes sense.

Text Files

My first blog was a set of text files that I maintained and manually converted to html files hosted on a server running from my bedroom in my parents basement. When I got to work in the mornings I would RDP to my machine at home and write my posts in notepad. Then I would copy and paste the content of the text file into an html template and copy the new file to my site.

MSN Spaces, Blogger, DasBlog

After about a month of that crazy setup I created a blog on MSN Spaces, then moved to Blogger. After a while I decided to switch to DasBlog hosted on a shared GoDaddy server. I ran DasBlog for a few years. It worked great with Windows Live Writer and make it really easy to create and publish new posts. To convert a thought to a written post sitting on the interwebs was quick and easy.

Wordpress

After a while I decided to spend some time converting my DasBlog to a wordpress blog. I think it was James who sparked the idea after a conversation we had, and some guidance that he offered.

Jekyll - Text Files (Again?)

Then came Jekyll. A static site generation tool. I began writing my posts in a format known as markdown and used jekyll to generate html files from my markdown posts.

I quickly fell in love with Jekyll because now I had an easy system for writing posts in the editor of my choice, and I could for the first time actually put my blog in version control. I no longer needed a backend database or heavy infrastructure to run my website.

Along came, Octopress. Octopress is an enhanced system of generating posts and deploying a site on top of Jekyll. I found that I still preferred working off jekyll because it's a lighter weight system that I can control to my liking. However, if I were to start a new blog from scratch today, I think Octopress would be a good choice.

My Current Setup

Today, I host the source markdown files and jekyll project in a private FREE repository hosted on bitbucket, and I deploy the generated static site to a FREE GitHub account via GitHub pages.

The cost to host my site is $FREE.99. I use the free Google Apps plan to manage my email, calendar, docs etc. I pay my domain registrar to register my domain and host my DNS.

What about dynamic content?

What dynamic content?

I user sevices like WuFoo to manage a contact form for me, and UserVoice to collect feedback and suggestions. I ported the comments from my old posts from DasBlog into wordpress and now into Disqus. I use Google Analytics to track keywords and visits to my site.

It's been a fun circle starting on text files, and coming write back to them.

Recently, I have been having some fun with C# and Mono. I decided to try to abandon visual studio, resharper, and windows and start writing from vim on my unix machines. Inspired by Gary Bernhardt and Destroy all Software.

vim

My vim configuration started to become a giant mess, as I started moving from Windows to Ubuntu to OSX. So a few months ago, I totally abondoned my vim configuration in favor of Janus.

Janus, is a vim distro with a bunch of plugins, snippets, and goodies all baked right in. This makes it incredibly easy to switch from your editor of choice to vim.

One of the fun things I learned from one of the Destroy all screencasts is to map ',t' to run your tests from vim.

Instead of using GVim or MacVim, I have been running vi from within iTerm 2/Terminal. Then I map ,t to a command that will run my tests for the current project.

  :map ,t :w\|:!rake spec<cr>

Instead of alt+tabbing back and forth between my editor and shell to run my tests. I can now seemlessly switch back and forth from running tests, to writing code all from one environment.

xbuild

For building projects, the Mono equivalent to msbuild is xbuild. It's super easy to use and works as I expected. On Ubuntu you can install via:

  sudo apt-get install mono-xbuild

To build your csproj, just jump back into your shell and run

  xbuild src/test/test.csproj '/target:Clean;Rebuild' /verbosity:quiet /tv:4.0 /nologo

nuget

I was having some issues trying to figure out how to install packages using NuGet and Mono on both my OSX machine, and Ubuntu machine. Thankfully, I came across this post which helped me finally get things working as expected. nuget on mono

The key to my success was to specify the runtime version. Without it, mono seems to default to the 2.0 runtime, and NuGet uses the 4.0 runtime.

  $ mono --runtime=v4.0.30319 NuGet.exe

The NuGet commandline tool can be downloaded from here and the command line reference is available here

unit testing

Machine.Specifications runs just fine under Mono. There's not much for me to say here expect, Thank You!

I 'borrowed' DevelopWithPassions continuoustesting script to be able to listen for changes to my .cs files to automatically start running tests in the background, then pop up a growl notification when a test fails. I'm not sure if I prefer having my tests running automatically or if I prefer to control when I want to run my tests. Sometimes it seems like a little to much noise with all the growl notifications, since I tend to save quite often.

annoying

I was surprised at how easy it is to write C# outside of the windows eco system. There are still a few things that are kind of annoying. I find it really annoying to have to manually update the csproj file anytime I add or remove a file. I also miss being able to hit alt+enter and allow ReSharper to automatically include the proper namespace. Although, it has been fun exercising my ability to remember which System namespaces need to be included.

conclusion

I'm having fun with this experiment. 'nuff said

follow along

  git clone git://github.com/mokhan/cs_practice.git

I just finished reading the five secrets you must discover before you die

Some quotes that I thought were interesting.

My grandfather, who, as I have said, was one of the wise elders in my life, used to talk about having a "good tired" at the end of a given day. He contrasted this with a "bad tired." He told me that a "good tired" was when you lived your life focusing on the things that really mattered to you. A "bad tired" he said often comes even when it looks like we are winning, but we realize that we are not being true to ourselves. It seems to me that the first element of knowing ourselves is figuring out what makes up a "good tired" day for us.

...

Socrates said that the unexamined life is not worth living. There is another way to phrase that: Unless you are continually examining your life to make sure it is on target, there is a very good change that you will wind up living someone else's life, which means coming to the end of your life and realizing that you had followed a path that was not your own.

...

So many people keep saying someday they will follow their heart, be the person they want to be in the world. If there is something you need to do, get to it.

...

What I have noticed is that there are ten-minute funerals and there are ten-hour funerals. Some people live a life that touches so many people in a positive way that people just want to hand around and talk about that person's life. Other people live a more self-focused life and this does not happen.

...

When I was young, it was all about getting the part. But as you get older, you realize that there is little true joy in getting paid to pretend you are ecstatic over a cup of coffee; you want to know your work mattered.

...

The happiest people were those who knew they had left things better than they had found them in some small way, whether in the form of children who were contributing, the small advancement of a cause, or leaving their impact on a small group of people.

...

What we hold in our awareness we move toward naturally.