I'm Gil Milow. I like to create software and write about the process.

why i like java

How many languages do I speak? If you only count oral languages it would be two. But if you count code, well there’s quite a few more. In this article, I want to focus on my favorite language for writing back end applications: Java.

Every year, Github and Stack Overflow come out with a list of the most popular development languages. Java has been on the list for as far as I can remember. Other languages grow in popularity but most eventually fade. Ruby is one fairly recent example of a language that exploded and now is on its way down. I think there is a reason why Java is at or near the top most years and I will explain why.

A few years ago one of my favorite bloggers Steve Yegge posted an ode to Kotlin, a language that runs on the same virtual machine as Java (the JVM). From the article:

Kotlin allows multiple classes per file, top-level functions, operator overloading, extension methods, type aliasing, string templating, and a whole bunch of other bog-standard language features that for whatever reason Java just never adopted even though everyone wanted them.

I have to respectfully object.

One of the great things about Java is its minimizing of syntactic sugar and other things that I believe can get a developer into trouble. For example: operator overloading and type aliasing, while allowing for smaller and easier to write code, can lead to debugging and adding features taking more time. Take for example this Kotlin code:

fun myfunc(a: MyAlias) {

In the above code, MyAlias is a type alias that is referencing.. actually I don’t know by looking at it. If I came across this code on Github I would have no idea what it does.

Too many developers focus on getting their first iteration of code to be small and fast to write without thinking of the ramifications later on. I would take verbose, readable, and understandable code over one liners any day of the week. Yes, it takes longer to type and yes it may not be sexy, but when you have to fix a bug you can look at the code and know exactly what it does.

Integrated Development Environments like IntelliJ take away some of the pain of typing verbose parts of Java like Getter and Setter methods. Using an IDE, I get the best of both worlds: a fast way to write code and code that is readable.

Java may be a dinosaur language and I may be a dinosaur developer. But when it comes to being productive, I think simplicity wins every time.

running development

A year and a half ago, I started running.

I’ve never been that great at sports or staying in shape. In college, I got serious about it and started going to the gym fairly regularly. Unlike many Americans who start on New Years Day but don’t follow through, I managed to consistently work out for those four years. After college and starting a full time job, it was more difficult to keep at it and my gym usage trailed off. I think this is especially typical of the tech world since we are sitting at our keyboards day and night.

A year and a half ago, my parents were getting rid of their old treadmill and asked if I wanted it. We had room in our basement so I plopped the crickety old machine in the back of the minivan and drove it over. At first, I took it slow. Once or twice a week, I warmed up and ran on the treadmill for as long as I could before fainting. I distinctly remember the first time this was about 5 minutes. Then I did some pull-ups, sit-ups, and push-ups. The whole exercise session took 15 minutes. I thought: that’s not too bad, I can do it!

My basement running went on for some time and I slowly increased the amount of time I was running. At that point it was really just a temporary hobby, but I slowly came to the realization that I actually enjoyed my time on the treadmill. With some advice from my runner friend Luke, I started keeping track of my running times and pace. I then came up with a goal: run a 5k in the summer at a decent pace.

In order to accomplish this goal I needed to do some basic analytics. I started a spreadsheet of all running activities. Research about how to train for a 5k pointed me in the right direction on how to analyze the data. I checked the spreadsheet regularly to make sure I was progressing. Sound familiar? That’s how to “run” a software development team. I’m not the only one making this connection. In fact, I was partly inspired to write this post by the Dad on the Run blog written by another software manager.

So how does one learn new and better ways of doing things? Start small and then iterate, iterate, iterate! Whether it is running or technology, there is always something new to learn. Start off doing the best you can and always be on the lookout for more.

One example: As I started to run longer distances, I started getting plagued by minor injuries. I call them minor because although they would prevent me from running they only lasted a few days. I researched them by asking friends who are runners for advice and scouring Google. Using technology helped as well. For by birthday, I received a GPS running watch. Not only did it help me keep track of my pace and timing more accurately, but the software actually led me down a path of understanding more about what I was doing. The Garmin watch software keeps track of your cadence, or steps per minute (SPM). Apparently, mine was too low. This meant that I was landing on the heel of my foot and potentially causing wear on my knees and leg muscles. I adjusted my running style to run at a higher SPM and removed one source of injury.

My 5k race times over the course of the year went from an 8 minute pace to a 6½ minute pace. That didn’t happen by accident. It happened by applying the same principals as being a technologist. Set goals. Constantly check to see if what you are doing is leading you towards these goals. If not, change what you are doing and try again.

This year my goal is to run a 10k. Next year, who knows? Just like running a software team, this is a journey that never ends and never gets boring.

multiple desktops and the windows api

In a previous post about the Macbook Pro, I mentioned that one of the things I love about OS X is the multiple desktop feature. I also mentioned that Windows 10 had just come out and it promised to have similar functionality. So, about that..

Windows 10 does indeed have support for multiple desktops and what’s more, it’s pretty damn good. There are some differences between the Windows and Mac when it comes to multiple desktops but overall they both work just as well. The one major thing that Windows lacks is the ability to switch to specific desktops easily using the keyboard. On the Macbook, I can set keyboard shortcuts in the system preferences to accomplish this. Windows has no such thing out of the box. I am a geek obsessed with productivity and so this was really annoying.

When I started using Windows 10, I found a solution to the problem using open source tools. I found the Windows-10-Virtual-Desktop-Switching-Shortcut project on GitHub that claimed to do exactly what I wanted. I gave it a shot but found that I could not get the keyboard shortcut to work. However, a utility called VirtualDesktopSwitcher, included in the project, did work. I searched some more and came across a popular utility called AutoHotKey that allows you to pretty much do anything in Windows using the keyboard. I hooked the two of them up together and voila, I had my solution!

Unfortunately, after a routine Windows Update last week, VirtualDesktopSwitcher ceased to work. My guess is that the reverse engineered Windows API that allowed VirtualDesktopSwitcher to work in earlier versions of Windows 10 was removed or altered. Sigh. Back to the drawing board.

Luckily, I was able to find an alternative, again on GitHub, called VirtualDesktopAccessor. In addition to switching desktops, it offers much more desktop-related capabilities. The instructions on the readme even show how to set it up using AutoHotKey! In order to compile the code, I had to grab a copy of Visual Studio 2015 Community Edition. To run the utility on a Windows machine without Visual Studio installed, I had to install the 2015 runtimes from Microsoft.

For those of you who don’t know what C++ even is, you can download the 64bit version of VirtualDesktopAccessor.dll that I compiled. Place it in the same directory as your ahk (AutoHotKey) file. For an ahk file sample, see the VirtualDesktopSwitcher page. My only alteration was to add the following for using Windows-{number} to access desktops 1-9:


biting the apple

All throughout my adult life I have been an avid Windows user. Even so, I once thought Microsoft was evil. Remember those days? That aside, their products were always easy to use and ubiquitous. When Windows 95 came out I was hooked on the interface. I never even considered another operating system for my personal or professional use.

Apple has enjoyed a strong following in the tech world. For me, they were closed-minded and oppressive. Apple always touted their products’ user-friendliness and simplicity, but I saw it more as a cult with a “my way or the highway” mentality.

That brings me to.. the iPhone. I’ve had a smartphone since before the iPhone came around, and was even creating Apps for it before anyone know what an App was. I did like the iPhone look and feel and made a Windows Phone version of it, but never had a desire to switch. By the time Android was available, I was so annoyed with the lack of support for Windows Mobile that I decided to get an Android phone. I’ve never looked back.

When my wife wanted to upgrade to a smartphone, we decided on the iPhone because of its so-called simplicity. Wrong move. My wife would constantly ask me how to do things on the iPhone to which my answer, after fumbling around for a bit, would be I have no idea. Her inability to figure out the phone was exactly the opposite of what I expected from a non-techie using an Apple product. Paul Stamatiou wrote a great post about it and I pretty much agree.

My antipathy towards Apple changed a few months ago. Sort of.

Although I love Android and dislike iPhones, when it came to portable personal computing my belief in the Windows ecosystem was starting to falter. Windows 8 was a dud in my eyes, and the hardware it ran on was not that appealing. That’s when I started reading about something called the MacBook Pro. It looked great, had amazing battery life and a touchpad that you can actually use. Finally, something I can carry around that has the power of a workstation without too many downsides of a laptop.

After much consideration, I bought one. When the new 2015 models came out, I found an older version at a great price and took the plunge. Then I set about learning how to use it.

Although at first it may seem similar to Windows, the Mac does have some major differences. Using the MacBook at first felt like moving into a new house. Everything that used to be rote and straightforward suddenly seemed foreign to me. Working on the Mac was like trying to drive in England. It’s similar to driving in the US but different enough to always keep me on my toes.

The biggest difference for me was the distinction between Applications and Documents. In Windows, an Application can have multiple windows but each one is treated the same by the operating system. This means I can tab through them (ctrl-tab), or look at them in the taskbar. In OS X, task switching is done at the Application level. This means that even if I have separate windows for Chrome, each with their own tabs, when I use ⌘-Tab I only see one Chrome icon. I think Apple have realized that this makes it hard to navigate between documents in the era where documents are first class citizens. Their solution is Mission Control, where you can see all your windows on the screen at the same time and pick which one you like. This works, but is a lot slower than using shortcuts like ⌘-Tab.

Modifier keys are something else that drives me crazy. In Windows, there is Ctrl, Alt, and Windows. Most keyboard shortcuts that have modifiers use the Ctrl key. If I want to copy, I use Ctrl-C. If I want to move the cursor to the previous word, I use Ctrl-Left. You get the picture. On the MacBook, there are four main modifier keys: Command (⌘), Option (⌥), Control (^) and Fn. If I want to copy, I need to use ⌘-C. If I want to move to the previous word, however, I have to use ⌥-Left. The list goes on. As I use it more, my brain remembers what keys I need to use for which OS, but it’s taking a while.

My last gripe is about what Apple calls mnemonics. If you are a Windows power user I’m guessing you use this all the time without even thinking about it. That is, until it is not there. If you have ever hit Alt-F to get to the File menu of your application, you are using mnemonics. I use them all the time to get to menu items that do not have specific hotkey combinations. It is a great time saver to not have to use the mouse for these menu items, especially when coding. Alas, Apple has decided that they are not a good idea and frown upon their use. This is another example of Apple thinking they know what is good for users but fall short.

So reading this you may be thinking that I regret my decision to buy the MacBook. I don’t. I love my MacBook and here’s why: Multiple Desktops, UNIX terminal, and the hardware. Yes, it is taking me a while to learn how to maneuver in OS X but the multiple desktops are a key feature and I love being able to use UNIX commands from the terminal. Yes, I’m a nerd.

But most of all, the hardware. It just works. The trackpad is so seamless that I don’t even need an external mouse. Multi-touch gestures work amazingly well. The Retina screen is gorgeous. And did I mention the battery life? It is amazing, like all day amazing. A lot of this has to do with OS X not being a power hog like Windows. You can run Windows on the MacBook, but from what I’ve read it goes through the battery much more quickly. I can improve the battery life even more by switching from Chrome to Safari, but I’m addicted to my Chrome bookmarks and, well, I just like Chrome better than Safari. Lightroom is a huge battery hog but I can’t live without that for maintaining my pictures. More on that in a later post.

The MacBook is such a great looking piece of equipment that I wanted to protect it’s delicate aluminum skin against the elements when I take it with me from place to place. There are lots of sleeves available for it, but the Acme Made Skinny Sleeve is my recommendation. There are no zippers to scratch the MacBook, it is sturdy, and it is easy to get the laptop in and out.

I’ve been sitting on this post for a few months and in the interim, Microsoft has released Windows 10. It already has a higher adoption rate than Windows 8. Maybe it will make me change my mind about Windows. But until someone can make hardware to match the MacBook I’ll stick with my evil Apple product, thank you very much.

kindle 4 life

I love my Kindle. There, I said it. A recent article on kottke.org pointed out that ebook reader sales are declining and ripped on Amazon for not being design-oriented enough.

I was curious what Kottke meant by that so I read (ok, skimmed) an article he references by Craig Mod. In the article, Craig talks about feeling that ebooks are less beautiful than paper books. He then says that Amazon should do a better job letting a reader know when they have long-neglected books that need reading:

The pile of unread books we have on our bedside tables is often referred to as a graveyard of good intentions. The list of unread books on our Kindles is more of a black hole of fleeting intentions.

Here’s the thing: I love my Kindle. Did I say that already? I can read using one hand. I can read without any room lights on. I can carry lots of books with me everywhere I go without having to, you know, carry lots of books around. Although I agree that the experience can be better I still think the good outweighs the bad.

Not long ago, newspapers used to be the way we consumed our news. Who reads a newspaper now? The convenience of reading internet news on a phone, tablet, or whatever has surpassed the need to feel the newspaper.

I think that the people complaining about ebooks being too sterile are of the older generation that grew up with paper books. They grew to love the feel of a paper book and miss that when using an e-reader.

The sad part is that if sales are going down that means that the younger generations are reading less. That is truly disheartening.

Older posts