Using A Cross Platform Text Editor (Emacs Vs Vim)

31 Aug

I have been dissatisfied with my text editor choices for a while now. I
use a Windows 7 PC at work and a Mac at home along with doing some work
on my Linux VPS. I have using Notepad++ on Windows for a long time but
it do editing remote files very well. I bought a Textmate license for
the Mac several years ago but I don’t actually use it enough to get the
benefits out of it that I could. Editing files on my VPS has pretty much
necessitated using either Emacs or Vim. There have been a lot of Rails
people discovering Vim lately and blogging about it.

During college I had a job where I worked as a document typesetter using
LaTeX on a LINUX terminal. I spent my time working on plain text in a
text editor and I learned both Vim and Emacs during this time so I have
experience with both of the big text editors. I have used Vim for years
to do quick edits to config files and small text files on LINUX
servers. Since Vim has been getting so much hype lately I thought I
would start out with it. I downloaded the Windows GVim package and I
found a nice Vim Rails oriented config setup on github and I used it for
a week. I just couldn’t get comfortable using Vim for more than quick
edits. Customizing Vim is not easy and or intuitive at all. I really
don’t care for the way tabs are implemented in Vim. Vim makes it to much
effort to switch to another tab. I guess I have been spoiled by editors
with modern tab implementations. So I decided I would try Emacs next.

I downloaded the latest release of Emacs for Windows and the Emacs
starter-kit from github. Although both Emacs and Vim are a little more
difficult to configure on Windows than they should be I got up and
running. It is fairly easy to configure Emacs to act like a standard
editor on the Windows platform by doing a few things. I CUA mode which
makes Ctrl-X/C/V have the standard Windows application meaning of
Cut/Copy/Paste. I also found a nice package that enables file tabs in
Emacs and Ctrl-Tab and Shift-Ctrl-Tab navigation between them. I have
been keeping a copy of my .emacs.d directory on Dropbox for syncing
between my Windows PC and my Mac. By putting in a little time you can
get Emacs to behave the way you want your text editor to behave.

ASP.NET MVC Monster Controllers

16 Aug

I didn’t understand why some developers were wanting subcontrollers in MVC until I had to work with a controller a previous coworker wrote with over forty actions in it. This controller is doing so much it really hard to keep track what is going on where. Do to the constraints of the project I did the initial design and implementation of the repository/services model on my own then I tried to bring my coworker up to speed on MVC. Once we reached the stage where he had a grasp of the basics we pretty much worked independently on our separate sections. We only really worked together when one of us got stuck. If I had seen the monster controllers I would have had him break them down.

Microsoft Does Something Right

13 Aug

My last post was kind of disparaging of Microsoft for some of the bone
headed moves they have made lately so I wanted to praise Microsoft for
one of cool technologies they are developing. I have been reading Scott
Guthrie’s blog posts about the new Entity Framework “Code First” feature.

EF Code-First is the data persistence strategy I have been wanting from
Microsoft. I want to be able to write my model classes and add
validation attributes without having to inherit from a .Net Framework
class or deal with a design surface or generated code. One of the
coolest features of Code-First is the ability to generate the database
directly from the model objects and seed the database with data. This
feature alone will make setting up integration tests much easier.

I think Code-First and the new DbContext wrapper for ObjectContext will
make Entity Framework much easier to work with and I plan to use these
features in my next .Net project over LINQ to SQL.

Microsoft Writes Off Dynamic Languages

10 Aug

Microsoft seems to have washed its hands of the dynamic languages
running on .Net work it was doing. This is a real shame, I was hoping to
one day be able to work in Ruby with full Visual Studio support. I had
hoped that Microsoft would have enabled a TDD/BDD approach using dynamic
languages on the Windows platform. Using a dynamic language would have
much less friction than using C#.

Although Microsoft has done a lot of work on making C# the premier
language for the .Net platform all the cool programming development
seems to be in dynamic languages. The last really cool programming
language innovation Microsoft made was LINQ. I love LINQ it’s a great
feature that enabled the creation of LINQ to SQL and the Entity Framework
Microsoft’s ORM’s. It took Microsoft years to add LINQ and anonymous
types to C# to then enable the creation of their ORM technologies. The dynamic
language people looked at LINQ and said that’s a pretty good idea and
then they created arel which is similar in functionality to LINQ.

Lately Microsoft has been making moves that don’t make a lot of sense to
me. On one hand they seem to be working full speed on developing ASP.NET
MVC and making it the first choice of professional web developers
working on the .Net platform. This is great as MVC made Windows web
development actually enjoyable for me rather than something I suffered
through.

Then they are coming out with technologies like Microsoft.Data that
allow the worst kind of beginner mistakes to occur and Microsoft even
commits some of these mistakes in it’s documentation for Microsoft.Data
with the excuse of illustrating simplicity. The other new Microsoft
project they are calling LightSwitch is another attempt to allow
non-programmers to develop client UI’s to their data. I don’t have a
problem with the concept except when it comes time to do anything with
the LightSwitch generated UI I will be stuck in SilverLight trying to
turn Microsoft’s generated code into a real application. I wish
Microsoft had just improved SketchFlow to allow a business user to
layout what they need and then leave the rest of the development to
someone who knows what they are doing.

Microsoft’s new focus on beginners and those with no programming skills
is not encouraging, especially when their documentation is bad or
misleading. Microsoft seems to want to return the low end of development
back to the bad old days of classic asp pages and business believing
they can run a real line of business app on Microsoft Access. For the
professional developers who will have to encounter these bad projects in
the future Microsoft is not making any friends.

Early Birthday Present

16 May

grill.jpg

I picked up an early birthday present this afternoon. Thanks to a sale at Lowe’s I was able to pick up this four burner gas grill with side burner for a very good price. I am going to put it together next weekend and do as much grilling as the weather permits. 
grill.jpg