Wednesday, May 9, 2018

Programming for Pennies

This post is geared toward the readers who are programmers or the readers who wish to become programmers.  I don't think there'll be anything particularly difficult to understand here, but if you're not interested in becoming a programmer then this advice is useless for you (it may be useless anyway).  You can always read on for my exciting prose, though.

Much of my (desired) life revolves around how I can simplify the world around me and spend as little money as possible without sacrificing the quality of life I want to have.  This is predominantly a security blanket for me.  The world is a chaotic place, and I tend to be a pessimist, so I always run through exercises that give me the illusion of control of my environment even if I don't achieve actual control.  One exercise I run consistently, if not to the point of obsession, is creating a Panic Budget.  In that scenario, I run through a (hopefully) hypothetical situation where I lose my current job and wind up taking another job at reduced pay.  I then determine the amount of money needed to live my life at the relative level of comfort I've come to take for granted and then determine if I can sacrifice some of those comforts without making myself miserable.

So, what's this got to do with programming? Well, obtaining resources for programming can run from extremely cheap to massively expensive.  As one example, Google has 74,000 employees and spends billions of dollars on infrastructure per year.  After running through my Panic Budget I've determined that I don't have a spare billion to spend yet, so I'll have to be more creative.

To start with, in order to be a programmer, I'll need a computer.  I don't really have a lot of heavy needs for my computer on a day to day basis.  I generally surf the net, watch some movies, occasionally write a blog post, and...write some code.  I also don't like lugging a bunch of hardware around for no particular reason.  So, this leads me to my first investment as a programmer on the cheap - a Chromebook.  I like Chromebooks - they boot fast, they have a lot of easy to plug in software because they're essentially glorified browsers, they're secure, and they're Linux based (though in almost all cases that's an implementation detail that only developers need to pay attention to).  However, because they are essentially nothing more than glorified browsers, they don't have a lot of the same tooling availability as more traditional systems like a Windows, Mac, or Linux laptop.  However, since we're living in the age of the internet, this isn't as big an obstacle as it first appears.

The rest of this post assumes that you have at least a tenuous grasp of programming tools.  If you're not a programmer but are a serious autodidact, fear not, the internet will come to your rescue here as well.  If you're willing to go all in and spend some serious time on a computer science education (but not some serious cash), this curriculum is free and comprehensive.  Get through it, and you'll be as prepped as any fresh-faced college grad.  Don't have the time to invest in a computer science education, but want to pick up on the tradecraft?  You can take your pick from several coding websites that will provide you with a good practical foundation.

Once you have your computer and your plan for learning programming in place, you'll need an IDE to code.  An IDE offers capabilities that make managing software projects much easier than they would be if simply left to the basic tools offered by an operating system.  However, due to the fact that IDEs require the installation of supporting software and compilers of the programs we're writing, a browser-based system like Chromebook isn't initially set up to handle an IDE.  Luckily, there are several options on the web that provide these capabilities.  They range in cost based on storage, compute capacity, and features available, but almost all of them have a basic tool for hobbyists or lone developers that are either free or extremely cheap.  I've chosen to use Codeanywhere because it's a remote virtual computer that allows me to install any necessary software for my projects, and I like the IDE capabilities they provide on top of that virtual computer.  I've upgraded from their free, basic plan - which is still pretty solid - to one that gives me a few more capabilities at $84/year.  As a side note, Amazon has its own version of an IDE which looks pretty slick named Cloud9.  It may wind up being even cheaper in operation than Codeanywhere (at least Codeanywhere's paid plan), but I've grown comfortable with Codeanywhere, so I won't likely switch unless I'm compelled.

Once we have a computer and an IDE, we now need a place to store our code.  Though GitHub is the defacto leader in this space, they don't allow for free private storage and their HR practices still seem to be a little bit suspect, so I avoid them when possible.  This leaves two alternatives - Bitbucket and Gitlab.  I use both because they both offer free private accounts.  Gitlab offers more features where Bitbucket offers more polish and a wider user base.  Depending on my project, one is likely to serve my needs better.

So, now we can write and store our code.  But, if we ever want to let the outside world view it, we need to deploy it somewhere.  I've narrowed myself down to a few providers here.  In cases where I want to deploy static sites (HTML, CSS, and javascript code only), Gitlab and Bitbucket provide options for easy and free hosting.

If I need to do something that requires a storage backend or something more programmatically complex, Google App Engine offers an amazing set of tools and generous free quotas for users as long they follow the framework's guidelines.

If I need more flexibility or need to experiment with something that the GAE framework restricts me from doing, then I use Digital Ocean.  It offers a lot of capabilities for minimal and straight-forward prices.

That'll get you up and running if you want to develop and don't want to spend a lot of money.  But that's just the start.  There are a lot of tools available to play around with for curious programmers (and their professional alter egos - software engineers).  As mentioned previously, the internet is definitely your friend in this case.  For example, if you want to experiment to continuous deployment, you can try several tools, including the one I use.  For image processing and storage, you can use a free one or one with free quotas and more capability.

If you're experimenting or are on a limited budget, don't be afraid to look around and try different software as a service solutions.  They give you broad exposure to the ecosystem on the internet and introduce to tools that pop up in most software engineering contexts, so they're valuable learning tools.  If you're trying to go-it-alone or almost alone, they also provide a lot of leverage for functionality that you would otherwise have to write yourself.

No comments:

Post a Comment