The obligatory, “I love golang” post

Golang gopherI’ve spent the last year and a half designing and building a microservices architecture in Go (First rule of Go. Always google “golang”.) After all this experience with Go, it’s finally time to write the obligatory “Here’s why I like Go” blog post. This post, of course, is a required assignment for all real gophers (that’s how golang users are referred to. Cute, ain’t it.) All kidding aside, I’ve really fallen in love with Go. Most of my work is done in Go these days, and it’s a really powerful language, with some good design choices. However, it’s not a panacea. It won’t solve all your problems by itself, and there are some times and places, where it really doesn’t fit.

First of all, for those who have been living under a rock for the past couple of years, and may not have heard of Go, here’s a quick run down. Go, or golang, was invented at Google to solve some problems that they were having with other languages. It’s a systems language (think C) based on C, but with specific design choices intended to make it simpler, and more flexible than C. Wikipedia says that it is “a compiled, statically typed language in the tradition of C and C++, with garbage collection, various safety features and CSP-style concurrent programming features added”. First of all, it’s garbage collected, so no more `malloc` baloney, and shooting yourself in the foot because you forgot to deallocate memory. Second, it’s got a crazy awesome concurrency model built in! This is the thing that gets most people excited about Go. Go makes it dead simple to write highly concurrent software. That’s a post all to itself, so I won’t get into details here, but seriously, it’s damn good. At heart, it’s still just managing threads on the OS, but Go abstracts away the dirty work of creating and managing those threads. Third, it’s a compiled language, which means that deployments become so much simpler, there’s no “dependency hell”, since you can compile a statically linked binary executable. It’s completely self-contained, and you just drop that binary on the machine that you’re deploying to. If you’re my age or older, you might think that’s ironic, since one of the “benefits” of scripting languages (like perl, php, ruby, etc…) was that there’s no need to compile them. It’s funny to me that we seem to have come full-circle there.

With all this Go goodness, are there any downsides? Well, kind of… Go is still a fairly new language, and the ecosystem isn’t as strong as some others. Perl and Python have been around long enough that no matter what problem you’re trying to solve, there’s probably a well vetted library that will help. That’s not necessarily the case with Golang. Of course, that’s changing as we speak. As more and more people start to use Go, more and more libraries get created, and the ecosystem just keeps growing. Golang is designed as a systems language, meaning it provides low level hardware access, so you’re not going to want to write a web CMS with it. With that being said, people certainly can and have written web CMS’s with Go. Personally, I don’t think that type of high level application is the sweet spot for Go. However, I do think that, for example, building a REST API for that web CMS, is a perfect application for Go. And as a matter of fact, that’s exactly what I’ve been doing lately, building REST API’s in Go that provide access to other services and systems.

In any case, Go just works for me. I’m planning a series of posts, where I’m going to go into more depth regarding some of Go’s features that I’ve either very fond of, or that I find myself using all the time. But for now, I just wanted to get back into the swing of writing. I just realized that I haven’t posted anything at all in 2015.

Perl arrays for fun and profit

In my day job, I deal with a lot of perl. After really taking the time to learn it, and working with it in a production environment, I really have a new respect for perl. But that’s a topic for another day. The other day, someone presented me with a perl coding challenge, and it took me a while to come up with the answer. Granted, I’m not really a perl guru, so I’m not too concerned, but I wanted to talk about and document how I solved the problem. The challenge can be simplified a little bit, and restated almost like a homework problem:

Given 2 arrays, find the union, intersection and difference.

See, here’s the thing. Most every other high level language makes this pretty trivial. PHP has the built in functions array_intersec and array_diff, in Ruby, you can just do something like ary1 & ary2 or ary1 - ary2, etc… Perl’s arrays suck eggs. I’m serious, arrays in perl are virtually useless… Well, that’s too strong. Array’s in perl are emenintly useful, they’re just kind of dumb. In order to do most serious processing in perl, you wind up turning things into hashes. And that’s basically what you have to do to get the array intersection, difference and union. Here’s a little script that does the job.

Continue Reading…

5 Reasons why Vim is my new IDE

Vim, the best text editor in the entire universe.Of course, referring to Vim as an IDE isn’t specifically correct.  It’s a text editor, but man, it can do so much more.  I think most programmers are always on the lookout for the text editor/IDE that really fits them.  It’s not that we’re looking for a magic bullet that will write the code for us.  For me, at least, I want my IDE to get out of my way.  I don’t want to have to wrestle with it just to get some code written.  I’ve tried them all, and there are a lot of really good IDE’s and text editors out there.  Gedit, kate, IntelliJ Ideas, KDevelop, SublimeText, Komodo Edit…  I’m sure the list goes on forever.  I thought I had reached the top of the mountain with either SublimeText or KomodoEdit.  For my money, they’re the best GUI based IDE’s out there right now.  But I still wanted something more.  A colleague talked to me seriously about Vim.  Of course I had tried it in the past.  You can’t do anything on the command line without running into it at some point, and banging your head against the wall trying to figure out how to get the hell out of it!  But until you start seriously trying to learn the Vim way, you’ll never understand how amazing it is.  Of course, there’s a huge learning curve to using Vim effectively.  But once you get even a little way down that curve, you’ll be able to do things that just blow you away.

Continue Reading…

The Best Online Project Management & Collaboration Tools of 2013

workflowThe web has opened us up to collaborative work on a global scale.  On any given project, we may work with contractors around the globe.  But managing that collaboration requires a tool, or set of tools, that allows asynchronous communication and information sharing.  Picking the right Project Management software is an important decision, and the final choice of tool is going to be highly dependent on both your management style and business needs. Quite some time ago, I posted my list of the 5 best web based project management / collaboration tools.  That list has proven to be one of the more popular posts on this blog, but the landscape has changed a lot, even in the last year.  So, after taking another look at my own workflow, and checking to see if there are any new tools out there that more closely fit my needs, here’s an updated list of some of my favorite Project Management software for 2013.

Continue Reading…

How to Set up ScribeFire for Nucleus CMS

I’ve been looking at ways to make it easier for me to post here more regularly.  Between projects, work, life, etc… I don’t post as often as I should.  So I’m currently trying out the Firefox Add-in ScribeFire.  Scribefire is a “blogging client” that allows you to write a post offline, and it automagically posts it to your blog.  However, since Nucleus isn’t the most popular of blogging platforms, there are some quirks to installation.  First of all, ScribeFire has an excellent auto-detect feature.  You simply enter the URL of your blog, and it generally detects whatever settings it needs.  It doesn’t detect Nucleus, however.  For Nucleus, you have to “Configure Manually”, choose metaWeblog API from the drop down menu, and use
as your API URL.  Voila, it works.  This posting is the result of my first use of ScribeFire, so we’ll see what happens.