All coders have to start somewhere, no-one innately comprehends code. It may surprise you to learn that I am no exception and I, too, had to start somewhere. For me that somewhere was a little place I like to call Codecademy... because.. that is its name.
Makers Academy pointed me in this direction after I applied for the coding bootcamp. They asked me to complete the introductory course in a programming language called Ruby for my interview with them. I'll be talking a lot about Ruby, so remember that name!
This post will charter the two week journey from knowing nothing about coding to
Don't tell anyone... |
puts "Hello, world!"
This is the first program most people write, in any language. It looks pretty basic and what it does is entirely unremarkable, but it is what it is. Let me deconstruct it for you and explain what it does.
The first part of this program is puts dumbed down this basically instructs the computer to put something on the screen. There's a bit more to it than just that but for the purpose of this explanation, that will suffice. The second bit "Hello, world!" is what will be put on the screen. It's coloured green so you can identify that it is a string (sorry if you're colourblind).
word to the wise: a string is just a group of characters - but it's handy being able to tell what type of thing something is by what colour it is, you know?
Did we understand that? I hope so because I'm moving on anyway.
Codecademy is good. It holds your hand. I completed it in about a week and it had me thinking I got this. I'd written some programs and learnt about some fairly complicated coding techniques. I thought I was ready. Makers Academy also wanted me to have completed the first eight chapters of Learn to Program, a tutorial written by Chris Pines.
This experience was a little different. Firstly it wasn't all neatly contained inside a virtual environment accessed through my browser on the internet. It was on my computer. I was making my computer do things and I didn't fully understand how. Whatever, just get on with it.
Now i was writing code and it was on my computer and I was accessing it through the command line (like some hacker) and getting it to do the things that I wanted it to do. This was real stuff. These exercises were harder, they didn't hold my hand, they required more effort to do but it was worth it.
puts "Hello dear.."
count = 0
while count != 3
input = gets.chomp
if input == "BYE"
puts "What?!"
count = count + 1
elsif input == input.upcase
puts "No.. not since #{rand(1930...1950)}."
count = 0
else
puts "What?!"
count = 0
end
end
puts "Bye then"
This was a program that I was extremely proud of when I wrote it. I felt like I had written my first program without a step by step guide and got it to do some pretty complicated things. It was so satisfying to watch my computer do what I wanted it to do.
It's called the Deaf Grandma program and is one of the challenges in the book by Chris Pines. It started off as a simple program that would take some user input and then reply with either "WHAT?!" or "No.. no thank you". Unless the user input was all capital letters then 'Grandma' would not be able to hear and would reply pretty rudely. If it was all capitals then she would still mishear you (because she's going deaf, you see). It then evolved into something more complex, adding in a random number from a predefined range with the response and requiring the user to say "BYE" three times in a row to end the program.
(* ̄∇ ̄*) - stop it! I'll blush! |
Don't be fooled though. This short program took me a long time to create with a LOT of trial and error as I still didn't fully understand everything I was doing (I still don't). But that is what being a coder is all about: problem solving. And in this case, problem solved!
All this and I haven't even been accepted onto the course yet!
After
It was okay for me to be feeling like that. I expect I'll probably be feeling like that for the entirety of the course. And so will everyone else. It's important to keep it in perspective and just take it once step at a time.. because that's all us humans can do.. because we only have two feet.
I'll tell you about my interview and first impressions of the Academy in Shoreditch, London in my next post - so check back another time, if you're so inclined.
No comments:
Post a Comment