The Education of a Programmer (Me)

Just another WordPress.com site

Month: September, 2014

The value of slow coding

When I took my first programming class going after my Master’s Degree. My instructor then, John, told all of us that if we sat down to code and wrote 100 lines of quality¬†code in an 8 hour day that we were really great programmers. At the time, I thought he was being somewhat facetious. I’ve worked on projects where I turned out several hundred lines of code in a day which was ultimately deployed and considered useful.

Then wisdom followed knowledge. I know how to code. I can figure out what I’m after, write it, and it will pass tests and it will work, but I also learned from John to re-visit my code and always try to make it better. Whether that’s more memory or processor efficient, or just generally create a better algorithm to do what I need to do; it didn’t matter, just to re-visit the code after I’ve left it alone for a while.

Now I’m working on a project and I realize that in the last two days, I’ve written maybe 200 lines of usable code, other than metadata code in wiring up a database to a web app which ensures better type safety, etc. That’s the stuff I write without thinking and while it’s necessary, it’s not the most stellar code.

This morning I found myself really proud of 4 lines of code. It took me some thinking and research to write 4 lines, but in the end, it was 4 good lines that did what I wanted and were well-crafted. So, now I’m realizing John was really right; slower coding produces better results.

Weird Font Post

Ok, I know that I usually write book reviews or about something I’m coding, etc. This time, I’m writing about something a little different; fonts. I admit, I’ve always been fascinated by them. I love the written word and have always studied orthography when I was in my Linguistics program. So it serves to reason I would be just as fascinated about fonts. I almost added a graphic arts program to my current mode of study just to have a chance to learn how to build my own fonts. Well, one font anyway.

I write programs, so I stare at a lot of code and I have searched through many many fonts, trying to find one that made me happy when I had to read so much code. I’ve seen many which were close except for something which would drive me to distraction. Maybe it was the curve in the lower case l or the lower case i. Maybe it was the dotted zero. (I even write a slashed zero in handwriting, thanks to my wife.) Whatever it was, it never fully felt right. Then I stumbled upon Input. The thing which stood out immediately for me was the option to customize the font to what I liked. They had options for miniscule a, g, i, & l. They have zero options, curly brace options, and asterisk options. Basically, I could make my font the way I wanted it to look.

Then as I would read about the development, I emailed the designer and got a very nice return email which invited me to continue to note things I’d seen in the usage.

It comes in the standard Mono, Sans, and Serif, with several weights and several kerning options, (regular, narrow, condensed, and compressed.) So to have it for Visual Studio, I make my own custom variation (InputMonoCompressed) and it looks fabulous, I can read it all day, and then I can use the other variations in other apps as I see fit with no headaches.

Best of all, you can use it for free in certain circumstances. However, if you want to use it for commercial publication or for your website, you have to pay for it. That’s fair in my book. When I can afford it, I might just buy a license to use it on a personal website. Until then, I’m going to gratefully read code in it while I work!