Have you ever come across a problem that you thought could be easily fixed by software but couldn’t find a tool to do it?
It can be a very frustrating experience. This tool should exist!
So, how hard could it be to build it yourself? After all, you’re not doing it with the hopes of going into the tech profession. It really is just to make stuff that makes your job easier.
You might work in a field that’s not directly related to tech and you don’t have access to that techy colleague who can whip something up for you. So what are your options?
Go looking for a developer on oDesk? This might work out for you. Don’t go into this without careful planning and clear idea of what you want, otherwise this will end up being a mess.
You could have a go at solving the problem yourself?
Before you dive headlong into figuring out which programming language you want to learn (spoiler alert: RubyOnRails), it’s worth investigating the tools available to you as someone without much (any?) coding experience.
So where do we start… as with so many things today, there’s usually a service that can help you out.
Automation as a Service (AaaS, now that’s a good acronym)
If you’re looking to automate a process, and a lot of software tools fall into this category, then your first port of call should be IFTTT and it’s business focused rival Zapier.
These services allow you to chain together actions on different web services based on a trigger you specify. A great example is to add a reminder to your phone telling you to take an umbrella to work when that day’s weather forecast is rain.
At this point, your problem might be solved. You can accomplish a lot by using web services as the building blocks of your tool.
However, if you need something a little more specific, read on…
Backend as a Service
Continuing the theme of leveraging existing services we arrive at BaaS.
There’s a whole raft of services offering a backend for your next project, accessed via a handy REST API. The 2 big uses cases for this are developing for iOS, where you need to store data beyond on a server but don’t want to (or can’t) build the server part yourself.
If you fancy having a go at installing one yourself, there is Helios, an open source BaaS that you can deploy to Heroku and manage yourself.
Still not enough for you?
You’re still looking? Ok, I guess it’s time to bite the bullet and start learning to code. The question now is what language shall I use and where do I start?
You have a lot of options, so let’s narrow things down a little.
Here’s the big 4:
PHP. The workhorse of the web. Facebook uses it. Probably the most popular web language.
Java. Google use this for a lot of their stuff, they also built a framework for writing web apps in Java, it’s called GWT.
Python. Another favourite in the Googleplex. Python has a great web framework called Django.
Ruby. The goto language of many startups, primarily because of it’s web framework called Rails. Twitter was originally written in it.
Out of those options I always recommend Ruby, paired with the Rails framework, as people’s first step on the journey to learning to build web apps.
It’s a great language to learn, you can pick up great habits of software development that will make it easier for you to learn other languages, if you want to pursue it later.
But, the primary reason people love RubyOnRails is how quickly you’re able to build things with it.
Where to start with Ruby?
A key part of learning is to recognise what are the ways that you learn the best.
Most people find that a combination of visual and kinetic learning styles are most effective. So, for coding, watching someone doing something and then doing it yourself straight after, seems to be a good way to approach learning.
There are a lot of resources available for learning RubyOnRails at different levels of experience. In general, the community is great and very welcoming and helpful towards people new to the scene.
Phew, that list is quite long and has a lot of acronyms. You don’t need to know all of that before you can build something. Just keep in mind that you will be learning more than just a single programming language when you build things on RubyOnRails.
Your first port of call should be Try Ruby. This will let you play with Ruby in your browser, without needing to install anything. Then, if you like learning from a book, have a read through Rails Tutorials. It’s free and covers a lot of ground. Also worth keeping an eye on is Learn Rails by Daniel Kehoe.
If you prefer a mentor based approach, then let me do some shameless self promotion and highlight my class Rails Kickstart. It’s a video based course, taking you over the basic building blocks you need to create your own apps with RubyOnRails, with access to support from an experienced Rails developer to help you when needed.
Beyond that, there are some great bootcamp classes, Web development immersive course at General Assembly (disclaimer: I teach in their London office sometimes), Maker’s Academy and Dev Bootcamp. These bootcamps require quite an investment of your time, so they only make sense if you’re looking to make a career of this.
Control structures have been around nearly as long as programming but it’s hard for me to see them as more than an annoyance. Over and over again, I find that better code has fewer if-statements, fewer switches, and fewer loops….
You’ve seen the tutorials about how easy it is to build a RubyOnRails app. Those screencasts have been blowing your mind. Type a few lines in the terminal…
gem install rails
rails new app_name
rails g scaffold posts
… and ‘hey presto’, there’s the beginnings of the next Tumblr. At this point, as a beginner programmer, you’re feeling pretty inspired by the possibilities that lie before you.
Faithfully, you type out the lines you read in the tutorial and then this happens…
Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension.
That looks scary. You Google it and find the solution. Install Xcode command line tools. 3gb download? Ok, so you go and read up on the tutorials again while you wait.
Finally, everything is installed. Time to get writing some code.
Hang on, do you have a text editor? No. Ok, just quickly go download one.
And on the rabbit hole goes. At some point you will be able to start coding but you might have lost the will to try in the process.
As someone wanting to learn programming, particularly if you want to build for the web, RubyOnRails is a brilliant place to start.
Unfortunately, getting your computer to a place where you can actually write and run code can be real pain in the ass.
Your first interaction with Rails shouldn’t be installing dependencies and getting a development environment working. I’m a firm believer that you need to get excited about what you can do with Rails before you should persevere with learning how to set up your environment properly.
Fortunately, there is an app for that… actually there are a few.
My favourite being Nitrous.IO. For your first time with Rails, this is going to make your life so much easier.
Sign up for a free account, create a box setup for Rails and then everything you need to get started is installed for you.
I recommend it whenever I teach people to code with Rails now, as it’s a great base for everyone to start with. After all, you don’t want to learn to install software, you want to learn to build a software product.
You’re busy implementing the Facade Pattern in your latest Ruby project and then you realise you need to delegate a method call to a class method. The Ruby standard library has a few tricks up it’s sleeves to help you out.
You may have heard about SimpleDelegator and it’s big brother DelegateClass, maybe you’ve used Forwardable too. Now it’s time to bust out it’s lesser known relative, SingleForwardable.
def_delegator :source, :my_method
@source ||= source_klass
puts 'Delegated to me'
MyFacade.my_method #=> 'Delegated to me'