Things you should know when starting out

One of the greatest misconceptions about programming – certainly at beginner levels – is that it is full of maths. If, like some people, you have an idea that programming will dredge up all manner of faded school-day memories of trigonometry, algebra and the like, you’re wrong. The maths learnings of my distant past, at least to date, haven’t figured strongly in my programming experience.

If I had to give two examples of ‘vaguely maths-y’ things that have sprung up though, I’d say: the order of operations (ie. the use of brackets to help ‘order’ the way tasks are performed), and the idea of a co-ordinate space (ie. defining x and y coordinates to represent where things will be in a two-dimensional space.) Neither are enormously complicated.

Logic, on the other hand, abounds. The ability to think things through, understand the order in which they will take place, and have a sense of how to control that flow, pervades every aspect of programming. If you have an aptitude for logic, you’re going to be in a good position to start wrestling with the task of programming.

One way to think about programming is as a series of ‘processes’ that you set running – a bit like you’re getting the computer to ‘do a job for you’ – and whose interactions you manage. In programming, a process often produces an outcome. This outcome might be a file, but it might be something much simpler than a file, like a ‘string’ (a collection of characters), or a number.

The problem with processes is that, unless you do something with their outcomes, they just disappear into thin air. They literally ‘slip into oblivion’, never to be recovered, much like a shooting streaks across the sky and is gone. In other words, you need to ‘catch them’.

One of my earliest exposures to programming was via ‘Hackety Hackmain-qimg-3985d8913a092a8765f16f782f52f360.png‘, a follow-along Ruby tutorial written by a guy called _why. (Weird name, I know.) _why referred to a principle he called ‘catch the shooting star’, and it’s always stuck with me.

If you’re creating something with a process, you need to grab hold of it, or you’re going to lose it That’s where variables come in – as a way of ‘holding onto’ the outcomes of processes. This principle has underpinned a lot of my understanding of how programming works, and if you can grasp it early, you’ll find it really handy.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s