Sunday, 3 July 2016

wk_four[1]

Welcome to the twilightzone flipside! I'm writing this from the end of Week Four of the Makers Academy PreCourse. My last post only really covered the first day (it was that light-a work load) so here I'll be telling you what else I got up to! It's all rather exciting so I hope you're sitting down. And, as always kids, arms and legs inside the ride.



I'm assuming you read the first part of this week's post, if you haven't go and do it now, go on. I'll wait.  Done? Good. Okay so what else have I been up to this week? Well let me first start by telling you about a little conversation I had last week.

On the Friday I went to the Makers Academy graduation event - it's when all the Makers from the upper-most cohort present their final projects. It was also a good excuse to meet my mentor and her cohort - the people I'll be sharing the Academy with over the next 6 weeks. They're pretty great.. so far. Anyway, while talking about the PreCourse they planted an idea in my head.


I've said before that the work that was set for this week was easy - simple. They said that if i fancied a challenge I should try and deploy the FizzBuzz program to Heroku. WTF IS THAT? My understanding was that it was turning it into a fully functioning thing and hosting it on the Heroku website. I mean, thats basically what it is, but it wasn't that simple.

Also like I've said before: I love a challenge. So after about 6 hours I finally managed to do it. Which isn't bad going, to be honest. It required me to learn a brand new framework: Sinatra. This is a lightweight library that allows you to turn Ruby programs into a web application. It uses .erb templates and passes various block of whatever into them depending on what you write (obviously). In this case it passed HTML code that I wrote using ruby to handle the fizzing or the buzzing behind the scenes.



So I had to learn Sinatra, Embedded Ruby (.erb), HTML and eventually some CSS (webpage styling language) to make it look pretty. This was a pretty big undertaking and I can't tell you I fully understand it all, but eventually I got it to work! There was a lot of faffing around with things like Gemfiles and config files, but finding out what these are and how they fit into the structure of a thing was actually so rewarding. I suppose the journey is the most important part - having that grit to persevere through the unknown.

Anyway, this is exciting stuff. It means I have something to show you that isn't just code, I've made something and you can interact with it how you would anything else! 



Look! Are you kidding me?! That is so swish. You can go and see it for yourself here. I know it's still soemthing pretty simple, but I'm honestly so happy with myself for getting it done. Also; 
LOOK AT THIS BUTTON.


I added it as a GIF incase you're on a mobile device and can't appreciate it. It was all done in CSS which is something I didn't really get before - and even that animation is a bit confusing to me. But the fact that I got it all to work and look this good is such a win.



So that was that. I deployed my very first app. What next? Well after learning a new frame work I wanted to check that I really got it. So I made another one. This one is actually useful though. It's called 'Is it Friday today?'. I made it for all those times when you can't remember whether or not it's Friday - feel free to check whether or not today is Friday yourself! It changes when it's Friday. I thought that was pretty cool.



I'm now pretty much an all-powerful app developer. What is there left for me to do? Well, I brushed up a little on Codewars - I met up with some of the people on my cohort a few more times and it was good to talk about code and what we'd been doing this week. A few other people managed to deploy their apps to Heroku too - I think we're all pretty proud. It wasn't easy after all.

There were also a few of us that attended a talk at the Guardian's office in London, it was about getting a job in tech. It was interesting and good to meet other people in similar positions to me - though they were also very different. I made a few contacts and drank some beer. Not bad for a night's work. One thing I would say though if you're in a similar position as me - this sort of thing might be better left till later - as I'm nowhere near looking for a job at the moment, not all of it was particularly relevant. Still, good to show my face i suppose!



Another thing I've been doing this week is developing my understanding of the concept of code. What it is, what it means and how it should be. I've watched a lot of talks on't internet about the design of code - a lot about something called 'Object Oriented Design'. Gaining a rudimentary understanding of this concept helped me really understand what refactoring code is and different parts of a program should interact with each other. Two talks I thought were particularly good were by Sandi Metz - from what I can tell she's pretty big noise in Ruby. You can find her talk on OOD here and the other one I recommend (on something called Code Smells) here.

There's one last thing I did this week that I think is worth mentioning it. These last four weeks have been intense, I've learnt so much, met some great people and started on a journey to completely change my life (for the better.. probably). But from Monday it's going to get even more intense. I suppose its called a Coding Bootcamp for a reason.. With that in mind I made the decision to give myself a break and do something nice. I wouldn't want to start the main part of the course at Makers Academy already burnt out, so I went to on little spa break with my boyfriend.

It was good to grasp at the last bit of truly free time I'll be having for a while and do something nice with it. I think it was good for me to switch off if only for a little while - like I've said before, it's hard for me to switch off from coding - a change of scenery and a strangers hands all over my oily body was great.



The little break I had was on Thursday - this allowed me to make it to drinks with some of my cohort and the cohort above on Friday evening. I'm glad I was able to make it because they're all such great people, it was good to have some more alcohol time to get to know them a bit better! It was the last day of the upper-most cohort too so they were there too - graduates. Where I will be in 12 weeks time. Having all 3 levels in the same place was great - being able to see where I am now and where I'll be soon, surrounded by such happy and excited people. I've said it before and I'll say it again:

I'm really looking forward to changing my life with these guys.



Thursday, 30 June 2016

wk_four[0]

It’s the final stretch. The last slurp of that oh-so-tastey kale smoothie that is the Makers Academy PreCourse. This week has been fairly relaxed and low-pressure. I can only assume it was structured this way to allow people that may have been falling behind a bit a chance to catch up before we start on-site. This has been good for me though, it’s allowed me to experiment a bit with code, understand a few things a little better and most importantly catch up on my blogging! It’s true, I’m actually writing this Week Four blog post from week four. The dream is real.


I normally have a little snappy line here about whether or not you should continue reading based on arbitrary conditions, well I’ve been staring at my screen for five minutes and nothing has come to mind. So moving on..

This week’s challenge was a program called FizzBuzz. It’s extremely simple. Like. Really. Simple. I had actually done this program before while preparing to start the course, weeks ago, and just to refresh my memory (and confirm that it was simple) I did it again. It took 5 minutes. It took 20 minutes to write 4 different ways. So I was feeling pretty confident.



The program was easy, but the point of this week wasn’t to expand our knowledge of code, it was to teach us about something called Pair Programming as well as Test Driven Development. I’ll talk about both these things a little later on. I might even give them their own headings. But before I do, I’ll quickly explain what FizzBuzz is.

FizzBuzz is a little program that should be able to evaluate a number and return “Fizz” if the number is a multiple of 3, “Buzz” if it’s a multiple of 5, and “FizzBuzz” if both. If neither it simply returns the number. Easy peasey squeeze the lemons.


  class Integer

    def fizzbuzz
      str = ''
      str << 'fizz' if self % 3 == 0
      str << 'buzz' if self % 5 == 0
      str == '' ? self : str
    end

  end


Here’s ONE way to solve it. It’s not the prettiest code, at the moment (having done this for only 4 weeks) its more about if it works. So this code adds a method to the Integer class. Within the class a method is defined: fizzbuzz. Putting a method inside a class makes it specific to that class and allows you to call it more naturally within the code. The fizzbuzz method first creates an empty string. Now there are two lines that each evaluate whether or not the number can be evenly divisible by 3 and 5 and will shovel the magic word into the empty string. Because of the order of the code there is no need to add another line for 3 AND 5 as it will shovel both if both conditions are met. It then checks whether or not the string is empty - if it is then it will just return itself.

Not Bad.



Now thats out of the way lets talk about other stuff.

programming.pair


Despite FizzBuzz being easy, the point was not to write it alone. Two heads are better than one. Pair programming is when two people collaborate - one person types and one person talks.



I paired with Jess. You may have noticed I’ve spoken about her before, she's alright. We did the exercise twice pretty quickly. First time she wrote the code and I instructed and then we swapped. It was good to understand the principles behind this practise, though I would say it’s perhaps difficult to fully comprehend it when writing a program that takes 3 minutes to do.

I will say that programming with someone is good though. Obviously I haven’t got the entire scope of it yet but having someone else working with you can open your eyes to different solutions. Different people do, and know, different things (shocker!). So, for example, while I might be fully comfortable writing if statements, Jess might know of a better way to do it. I think this is probably where it shines.

It’s also just nice working with another person from a social perspective - it’s easy to get carried away on your own and if you go too far ahead when you look back you might have left a mess behind you. Having to instruct and explain your decisions to someone else helps to make sure you’re making the best ones.


test.driven(dev)


Test Driven Development, or TDD, is the second concept that we were introduced to this week. This came in the form of RSPEC. RSPEC is a ruby Gem that lets you write tests for your program to check that it works.



Let me give you an example of when this would have been useful for me last week:

So I was extending my method that lets the user add students to the record. I wanted to add hobbies at the end of user input. Adding students looked like this -

1. enter student name
2. enter student date of birth
3. enter student cohort
4. enter student hobbies

When I was testing the last bit of my program I was having to go through this flow every single time I made a change to see if it worked. Then, even if the code didn’t throw up an error I couldn’t be 100% certain it worked without printing out all the students again. Rspec lets you write tests in a single program and then run it. So it would basically do all that for me in about 0.03 seconds - I challenge you to input data that quickly! Further to this, if you test each method as you write it, you know it works - and if its broken you know that whatever you just did is the problem. It makes sure that what you write is less likely to break when you change it. Hopefully.

So thats testing.. but how does it drive development exactly? Again, The scope of FizzBuzz is probably too small for me to have a firm grasp, but from what I understand you can write code more accurately and more deliberately if you simply focus on one tiny problem at a time.

There's a certain mantra that goes with it:

First you write a test that fails. Then you write the code that passes the test. Then improve the code you’ve written. Then start again - with the next part of the problem.

So this is what we did on Monday. This left me with a lot of free time. I used the rest of the week to push myself a bit, do something a bit more interesting. I also brushed up on a few things I know I'm weak at that will be coming up soon. I'll be talking about exactly what I did for the rest of the week in my next post.

spoiler: I have something to show you (and I'll leave my clothes on this time)



Wednesday, 29 June 2016

wk_three


So we’re at week three of the Makers Academy PreCourse and you’re still reading? I’m impressed.. with myself. Allow me just a moment of reflection here; I started this blog because I was told it was a good idea (I’m sure the free marketing for Makers Academy is purely coincidental!). I’ve tried blogging before, it’s not easy, you know. You have to think things in your head and then write them down, usually I fall at the first hurdle there. So I’m really happy that I’ve managed to push out a post for every week so far - I hope you are too!


After Chris Pine successfully subjugated my whole cohort last week with his book learn to program morale was lacking slightly. After all it was intense and took a lot of work. So now we’ve learnt to program now what? The first day of the week (Monday, incase you didn’t know) was hard. I had no motivation to do anything, I think I had burnt out a little bit, So I allowed myself a break - I started on Tuesday and I think allowed myself that time was important.




Are we not finished? In short: no. (Surprise surprise!). This week did, however, turn out to be much more manageable. Instead of a whole textbook asking us to write ~20 programs we just had to write one. But it was pretty big.

If you like hearing about big things you’ve come to the right place, if you don’t I’m afraid you’re going to be disappointed.

The program we wrote was a relatively simple directory application that runs on the command line. I’m sure that doesn’t sound too exciting, I’ll do my best to keep you engaged. Like any project there was a spec - but we didn’t know it just yet. The way Makers had structured the task literally let us make simple things one at a time and then slowly bring them together to make something. This makes sense, I know that if I had known the spec from the beginning I probably would have gone straight in with some more complex code - starting simple is always preferable.

A lot of the development of this program felt like a cycle: write something. It works. Write something else. It doesn't work. Change the first thing to make it all work. And so on. Gradually over time things got more and more complicated as I introduced more functions. 

For example;

I began putting students names and cohorts in an array. This was good, its a way to store more than one element of data. Actually it was a Two-Dimensional array, because it was an array with lots of arrays inside it - one for each student. Now, if you want to print all the students names thats easy - you can print all the arrays with all the data. But if you want to search through it to find a specific cohort or name is not quite as intuitive. 

  students = [["Jack", :november],
              ["Jess", :november]]

Enter the Hash. I’ve spoken about them before, the store pairs of data as a key and a value. See it below! So we have an array of hashes - one for each student. This is so much better because it allows you to be more explicit in your code. Sure, if you stored everything the same in arrays you could use it - before it would have been array[0] for the name, now its hash[:name]. That makes it much more obvious what you’re trying to do. Hashes are great.

  students = [{name: "Jack", cohort: :november},
              {name: "Jess", cohort: :november}
 

Next we had to order our students by cohort. Originally I tried sorting them by the cohort value in each hash - unsurprisingly this didn’t order them correctly - it ordered them alphabetically. How did I solve this? Remember I said hashes are great? Yeah, more hashes. I added a hash of months to my program - the keys are months and the values are numbers to order them by. Next I made it so whenever a student is added the cohort entered will actually take the key AND value from the hash of months I made and place it in a hash within the hash. So we have an Array of Hashes with Hashes inside them. It was them possible to order them by the number inside the cohort hash.

  students = [{name: "Jack", cohort: {month: :november, num: 11},
              {name: "Jess", cohort: {month: :november, num: 11}}

Now what? We’re done? Oh no. How about finding out about student hobbies. Hobbies. Plural. I stuck another array in the hash to store a list of hobbies. Things are getting complicated.

  students = [{name: "Jack", cohort: {month: :november, num: 11}, hob: [:coffee]},
              {name: "Jess", cohort: {month: :november, num: 11}, hob: []}  

Fast forward a little bit and I was working out how to save and load files. Now the exercise wanted me to save it as a CSV. That stands for comma separated variable. So it stores all the elements in-between commas separately. Now the issue here is that when you split everything by the commas it stores just fine, but then when you come to rebuild it - what if some students have 4 hobbies and others have 2. I’ll end up sticking a load of nil into the arrays to iterate through all the data - and then it becomes an issue of when hobbies end and the next  student begins. So I thought I could do it better. I went off piste. I understood what was being ask, but I was making so much more work for myself in the end. So I did it differently.

After all I had just learnt to program, why not try something else? It’s all a learning curve after all. And I relish a challenge.




Instead of messing around with iterators and CSV files I used YAML. That stands for YAML Ain’t Markup Language (seriously). It’s a different way to store data and in this case it made so much more sense. It was difficult to implement - I’d never done it before, but thats half the fun. I had to use this line at the top of my code ‘require ‘YAML’’. Never done that before. Require just loads a program into your program so you can use it’s rules and methods.

That's the code-talk over. I hope your head isn’t spinning.




After I got everything working it was a relief. It felt like a real accomplishment - my program actually did something. You could load a file of students, add more students and save them. You could even save to a different file (wow!). But it was a mess. My methods were 30 lines long and did so many things. 

The last part of the development process here was refactoring. That basically means improving the code without changing what it does - making it more efficient, more elegant and more less likely to break.


So that's what I did this week. I actually finished quite early - Wednesday, I think. This is because of that thing I told you about in my last post. Not being able to switch off? Still a work in progress I’m afraid. I enjoyed doing this so much I couldn’t put it down and so I flew through it. I suppose you might call that 'passion'.


Sunday, 26 June 2016

wk_two

Okay. I need to tell you something. I gave in, I was not on Cloud Nine with Cloud Nine. So I did it. I bought a MacBook. And you know what they say: Once you turn Mac theres no going back! Or something like that. So yeah. I have a UNIX system now, and after using it for a week I’m glad I got it. It’ll be good to have this continuity through Bootcamp at Makers Academy. Not being kicked out of hipster coffee shops for using a Windows machine is also nice.


So I’m really chowing down on that smoothie now. The PreCouse is well under way, with the first week under my belt and a certain confidence about the command line it’s time to actually do some, you know, Coding. Its Coding Bootcamp, after all.

You may remember from a previous post that I had to complete the first half of the book by Chris pines: Learn to Program. Well, now its time to complete the rest! This week was tough, some might say gruelling. There’s a few twists and turns in this post, it’s a bit of an emotional rollercoaster. Reader Discretion is advised.



So without further ado lets jump into some code! It’s what I was doing all week so I might as well show you some! Even though it’s basic and ugly - even now while sharing it I can see improves that could be made - it’s important to share it as I did it in order to actually track my progress.

 def old_roman_numeral num
 
   numerals_hash = { "M"=>1000,
                     "D"=>500,
                     "C"=>100,
                     "L"=>50,
                     "X"=>10,
                     "V"=>5,
                     "I"=>1}

   numerals = ''
 
   numerals_hash.each do |l, i|
       (num / i).times {numerals << l}
       num = num % i
   end

   numerals
 
 end

This is one of the first programs I wrote this week (the first of MANY).  Its function is fairly straight-forward: it converts any integer (whole number) into 'old school roman numerals'.  Old school means no bells or whistles; 4 is IIII, 9 is VIIII. You get me? Numerals you'd be used to might be a little different - I'll tell you about that in a sec.  First let me explain how this program works.

It's just one method - called old_roman_numeral and takes one argument (num). This means that you pass the method something for it to play around with - in this case it would be that integer I was telling you about. Now I don't think we were necessarily meant to use a hash, but I did as I had actually completed this exercise before starting the PreCourse and felt like challenging myself.   The numerals_hash contains pairs of data - each letter has an integer associated with it (the pairs are the values each letter has as a roman numeral.. but you probably worked that bit out already).  Next it creates an empty string called numerals, this is where all the numeral letters are going to be put.

Then we get to where the magic happens. No, not my bed room, how presumptuous of you! I mean the bit in the method where things happen. See that numerals_hash.each business? Thats where it does the things. The .each part is a little method that will iterate over every element. In this case it lets us do something with each of the letter-integer pairs in the hash. It defines each element in the pair as l, for letter, and i, for integer.  Then each time it iterates through the hash it will define the argument integer passed to the method by i and this will only return whole numbers it will then append l onto the empty string that many times.  It then sets num to be the modulus of the integer from that pair before moving onto the next pair in the hash.

After doing this for each pair in the hash, it returns the string, which has now been populated with the appropriate letters. Clever, eh?



The next task was to make it so that the method spat out the new roman numerals - you know, like 4 is IV, 9 is IX.  Well, that was 'mathsy' and I got confused so I just ended up changing my hash to include a few more pairs:

numerals_hash = { "M"=>1000,
                    "IM"=>999,
                    "CM"=>900,
                    "D"=>500,
                    "CD"=>400,
                    "C"=>100,
                    "XC"=>90,
                    "L"=>50,
                    "XL"=>40,
                    "X"=>10,
                    "IX"=>9,
                    "V"=>5,
                    "IV"=>4,
                    "I"=>1}

What? It got the job done.

stop it Jen, I thought we were friends!


So lets fast forward now to the end of the week. Progress has been made, programs have been written.  Here's a more complicated one.  It's emotionally intense - the tree dies :(. Rated PG: minor peril

class OrangeTree
    def initialize
      @age = 0
      @height = 0
      @oranges = 0
      @alive = true
    end

    def height
      @alive == true ? @height = ((@age * 0.4)).round(1) : "It's dead. :("
    end

    def grow_oranges
      if @alive == true
        @oranges = (@height * 15 - 25) unless @age <= 5
      else
        @oranges = 0
      end
    end

    def count_the_oranges
      @alive == true ? @oranges.to_i : "A dead tree has no oranges. :("
    end

    def pick_an_orange
      if @alive == true
        @oranges =-1 unless @orange == 0
      else
        "A dead tree has nothing to pick. :("
      end
    end

    def die
      @alive = false
    end

    def one_year_passes
      @age += 1
      if @age == 26
          self.die
        end
      self.height unless @alive == false
      self.grow_oranges unless @alive == false
      return "Oh, no! The tree is too old, and has died. :(" if @age == 26
      return "This year your tree grew to #{@height}m tall,
              and produced #{@oranges.to_i} oranges." if @alive == true
      return "A year later, the tree is still dead. :(" if @alive == false
    end

  end

This is where you start to realise you're no longer a man but a god, with ULTIMATE POWER over the the things you create. Sort of...



This program was probably one of the first I wrote that hinted at Object Oriented Design (OOD).  This isn't something I needed to worry about, but it'll certainly be relevant later on.  So what does this code do?

It calls into existence a new Class of object. The OrangeTree. It defines it's variables immediately with initialize.  Its @height is 0, @age is 0, has 0 @oranges and @alive is true. The @ before the variable means it's a class attribute.  Basically a variable assigned to the class.  I'll glaze over what each method within this class does specifically and just tell you that every year that passes it gets older, taller and eventually bears an amount of fruit proportionate to its height.  After 26 years though, it dies. Thats as much as I want to say, I'm still trying to hold it together.


"First I was angry, then I was sad, then I was just grateful for the time we got together."
- Jess, fellow Maker -





So thats all the coding I'll be talking about in this post, I could go on and on, but I won't.  I just wanted to give you a few examples to see what I've been doing so far.  Don't worry though, I'm not finished.


Other stuff happened this week too. Most notably: I got run down.

I've found the PreCourse so far to be so enjoyable, I've actually found it difficult to put it down at the end of the day.  I've easily spent 40-50 hours a week on it and I'm not sure thats a good thing.  This week I really had to take a step back and look at how I work.  I've definitely found it difficult to decompress at the end of the day, I've had dreams of coding.  Woke up on Thursday morning having solved a Codewars Kata in my sleep. Sounds useful!  But I think it actually works to my detriment. It's a good thing that I'm enjoying it, of course, but I understand, now, the importance of switching off.  I'm working on it.



Also during the week we were asked to get a mentor. It's my understanding that in the last cohort they were assigned.  Not this time! We had to awkwardly find our own! I thought I was done with online dating.. Still, my vast experience in the field fully prepared me to charm my 'chosen' with enough 'quirkiness' to break the ice.. I think.



Overall this week has been great. It's not been easy, but it has been immensely satisfying getting through all the work and seeing everything I do work properly.  Chris Pines' book is probably no ones favourite but the amount of knowledge it succinctly imparts is undeniable. I  can't wait to put it all into practice.

Friday, 24 June 2016

wk_one

First thing’s first: I’m a realist you might be reading this and thinking: 

“hang on.. Jack doesn’t have a Mac.”
You’d be right. 

“Then how does he get into hipster coffee shops?” 
They don't let me in - No MacBook, No service. 

“What about taking pictures on a webcam and applying stock filters?”
Nope.

“Oday Ouyay Eakspay Igpay Atlayinay?”

Aymayebay. Utbay eway idayessgray.


Look, the point I was trying to get to is that Mac’s OS X is a UNIX based operating system. They’re extremely popular in pop-culture creative industries and as such seem to be pretty much the norm. At Makers Academy all our work will be completed using a Mac (they’ll loan you one), so everything I’m learning uses UNIX. Windows is not UNIX. They’re different. Thats pretty much all you need to know. So what I was trying to get you to ask was; “How are you learning to use the command line on a UNIX based operating system if your computer doesn't have one?”. That’s all I wanted, but you had to be silly.



Some of you may know (and some of you may not know) that UNIX is actually quite popular and is the base of a lot of other operating systems. One such system is Ubuntu (Ooboontoo - don’t embarrass yourself).

So the way to get around not having a UNIX system here is something called Cloud 9. 




nounInformal.

1.
a state of perfect happiness (usually in the phrase on cloud nine).
(source: dictionary.com)
I feel ‘perfect happiness’ is a bit strong. Cloud 9, or c9.io, is an Ubuntu virtual machine in the cloud. Essentially another computer that I can access through my browser. I mean I’m happy I can get on with the course I paid all this money for.. but its no box of kittens. Cloud 9 is not ideal, but it's what was recommended by Makers Academy if I didn’t have a UNIX computer. And I don’t. So.. yeah. 



system(‘terminal.exe’)

The first part of the Week One workload was to learn how to navigate around a computer using the command line. The command line is that black box with  'computery' looking text. Loads of slashes and colons, maybe even a squiggly! (Some times I call ~ a squiggly). You might have used it to flush your DNS that one time when your WiFi wouldn't work. Made you feel like a hacker didn't it?



I know I did. For some reason the first time you start using the Command Line to 
use a computer it feels a bit like you’re looking at 'something you shouldn’t. It’s not shiny, it doesn’t have any buttons and it certainly doesn’t have a little talking paper clip.  It’s more like catching your computer in its bedroom, with its pants down....  You were not invited but you went in anyway and now its awkward.



Despite all this tension in the air between us I pushed on. Went through the computer’s draws and what not. Just to make it really awkward. I learnt how to do all kinds of things in the command line, but generally just simple stuff like changing directories, moving stuff around and searching files. I don’t have any jokes for this bit. It is what it is.


[‘git’,  ‘tag’, ‘‘guten’’].reverse

Now with a rudimentary understanding of the command line it was time to learn something that is probably going to be with me my entire career as a developer. Git. Now I’ve explained this a few times to friends, family, cats on the street, and now I’m going to try and explain it to you.

Git is a friend. The friend that was there all those times. The one that goes “Remember that time when you were thrown out of that club for [REDACTED]?”.  Well imagine if your friend could take you back to that moment. You could then replay your life from the moment just before you [REDACTED] it all up. You could do things differently, change the butterflies that caused the typhoon. Then pop back to present day for you friend to be like “Remember that time when we went to the club and nothing exciting happened?”. Yeah. That's what Git is.

stahp, gurl!

Wipe that smirk off your face. This is serious. Git is a version control system. Git tracks changes to files. Every time you do something, you can tell git about it. These changes are stored and can be retrieved. They can also be changed. So if you want to roll back a version or two, you can. But if you want to go back and change something, you can. Then when you go back to the original (master) version (branch) it’s carries these changes through. So you can literally go back in time through the creation of a program and step on as many or as few butterflies as you want!



This is extremely useful for when you break things. It lets you fix them. Git is such an unfortunate name for something so useful.

Murderer ? arrest_perp : release_civ

The last part of the week was putting this all into practice in the form of a game. Games are fun. It came in the form of a police file with evidence, interviews, databases and what not and it was our job to use our mad command line skillz  to sift through the data and work find the killer. 



It involved using the command line to create new files and put evidence into them so you could look at it later; searching through databases for particular records as well as retrieving a butterfly file using git. This is all stuff I would have had no idea how to do before and now I was able to do it! In fact I did it twice.  The first time took me a day and a half... the second time took me an hour. I believe that is what you call progress?



Honestly I really enjoyed this and think it was a really effective tool to learn more about when the commands we learnt would be useful in  a really rewarding and exciting way. It got me very comfortable with using the command line to navigate and make changes to a computer - now I’m using it every day and I’m more than happy to look at my computer with it’s pants down.


Sunday, 19 June 2016

PreCourse.initialize

Everything starts at the beginning. So here it is, the first day of the rest of my life. The PreCourse. That is to say the course before the course, that one that gets you ready. If the main course is bootcamp then I suppose the PreCourse is the spinach, wheatgrass and kale smoothie you had for breakfast. But the very first day? That would be the cold shower that wakes you up (its cold because you think it will help you lose weight - turning the health up to 11!).



This post is about that cold shower. If you’re looking for hot showers then kindly take your business elsewhere.

If you haven’t worked it out from the title, this post is about the launch night. It probably won’t be terribly interesting but I’m working more than one angle in writing these blog posts. One such angle is locked and loaded on people like myself thinking of taking a leap of faith into something completely unknown. Some of my writing tries to answer some of the questions I never knew I wanted to ask so they can be more informed on what to expect should they choose Makers Academy to put their thang down flip it and reverse it.



It was basically like the first day of school, except the teachers give you beer. Maybe that is just like the first day at some schools.. but not any school I went to. Although I went to a catholic school. My teachers gave me the blood of christ wine. Perhaps it’s different elsewhere…

I’ll set the scene for you. Me, fashionably late, bit sweaty, bit nervous. Everyone else: not late, not sweaty, but also probably nervous - we’re all in the same boat after all. Pretty sure I was the last to arrive, everyone was already talking amongst themselves so I just wandered around aimlessly a bit till someone helpfully pointed me towards the beer. I grabbed myself a bottle and faced my first challenge of the course. It took me a good 20 seconds to open that bottle of beer with the bottle opener provided. How embarrassing, I used to work in a pub! No one was looking at me, but of course I felt like everyone was!



Not the best start to the evening, but I didn't have much time to worry about what next as we were asked to sit as the presentation was about to begin. Oh I didn't mention there was a presentation? It was only short - just served as a little guide for us on how to get through the PreCourse. It was helpful - and a good way to provide a space for us to ask any questions we had before the PreCourse really kicked off. It only lasted about 40 minutes, after that we were left to our own devices.



I managed to strike up a conversation with a few people and it just took off from there. I know I’ve described it as a cold shower but some times doing something you don’t like can be good for you. Most people that had come for the launch night stayed till they kicked us out the building - about 9pm - during that time I managed to make a few good connections though it wasn’t possible to speak to everyone. It was extremely reassuring to find out how nice and interesting everyone was, everyone had a story to tell and a unique path that lead them to Makers Academy, it was a bit like being Cilla Black on Blind Date.

 "What's your name and where do you come from?"
Sorry if you're a bit young for that reference, I'm trying my best here. 

style it out, Amanda




Since then I’ve met up with a few of them to study together and we’ve all spoken a lot on an app that gives us a space to chat in (slack). I haven’t met or spoken to everyone, but the atmosphere is so overwhelmingly positive now that we’ve started, I’m sure we’ll all get along famously. I’m really looking forward to changing my life with these guys.


If you're disappointed there was no coding in this post then don't worry, you're in for a treat next time...

Tuesday, 14 June 2016

self.interview

Makers Academy is selective. This means you need to be good enough. To get into this coding bootcamp course you need to learn a lot within a fairly short space of time and then prove that you’ve learnt it in an interview. It’s also for the Makers to meet you, get a feel for how you are and how you work and make sure that not only you’re compatible with them, but they’re compatible with you. 

I was no exception here, keep reading for an account of my interview... stop reading for anything else.


I should firstly tell you that I actually rearranged my interview because I was worried that I didn't understand Chapter 10 of the Chris Pines book: Learn to Program. I needn’t have been so concerned (you’re only required to study up to chapter 8!). Looking back on that now I can’t remember why I was worried about a chapter that I wasn’t supposed to have done but there it is. 

It went like this.

WTF.

WTF.

….WTF.

MUM, I CAN’T DO IT.

[3 days of ignoring it]

….oh. I can do it... kinda.



This actually taught me a lesson: Calm Down. I’m going to encounter a lot of situations like there where I can’t immediately see the solution, some times if you’re feeling overwhelmed by something it’s better just to leave it for a little bit, move on to the next thing and revisit it later. Of course I had learnt this before, I suppose I had just forgotten - or maybe my brain wasn’t in student mode

Anyway. Panic over. Problem solved. Next!

While I still wasn't convinced I was 100% ready, it was interview day. Makers Academy is simple enough to find, its on commercial street in Shoreditch. That doesn't mean to say I actually found it easily, living in an age of anxiety I had to follow google maps that took me every-which-way via Manchester, but I arrived on time.




Now I don’t know what you’re expecting when you think of a coding bootcamp - but I was expecting quiet. Quiet and tapping. If everyone is busy coding programs they should probably be silently tapping away at their MacBooks only pausing to frown slightly at their screen and shout in their head “WTF!”.

Well my first impression of the coding bootcamp site was noise. A veritable din. I was not expecting that in the slightest and in all honesty it was quite intimidating! After thinking about it in hindsight it made sense that it was so noisy and I don’t know why it didn't occur to me: almost all the work you’ll do at Makers Academy is done in collaboration with another student coder. It would make sense that they would need to talk and that a room full of people coders working together would be noisy.


Aside from the noise the space is pretty cool, pretty much what you might expect from office space in trendy Shoreditch - exposed brick, wooden floors, unapologetically raw concrete, glass. Hipster. Cool, me and my flat white will fit right in.


My interviewer was Irina. She was nice. A+++ would recommend.

My interview was deceptively simple. It was very informal. Irina wanted to understand what brought me to Makers Academy and why I thought it was the best choice for me. After giving her pretty much the same schpeil that you’ll find in my first blog post we moved on to some simple coding exercises.

By some I mean two. and by simple I mean simple.

The exercises, or Kata, were on Codewars. Codewars is a community-lead coding portal which includes exercises for coders to practise/compete on. It's a great tool for learning to code so if you're thinking about it, check it out! It has lots of social functionality and I expect we’ll be using it a lot. The two exercises I did under Irina’s watchful eye were:

Kata 1
repeat a string a certain number of times
---
add the first element and subtract the second element of each array 
within a 2 dimensional array

Kata 1.
After a brief amount of fumbling about on Irina's MacBook I got to a method that worked. And if it worked then I was satisfied. But oh my god let me show you how I did it:

 def repeat_it(string,n)

   a = ''
  
   n.times { a << string }
  
   a
 
 end

It shows a fair amount of knowledge of how coding can work. First it creates an empty string. Then it appends the contents of string into the empty string however many times the number variable specified. This makes an string made of the required number of copies. It then returns this.

Sounds impressive? Do you know what would have been really impressive?


 def repeat_it(string,n)

  string * n
 
 end

That would have returned exactly the same thing. You can even read it in english.

"String times n"

There was no need to over complicate it though in the heat of the moment this simple solution genuinely did not occur to me.



Kata 2.
I think I did okay here considering my level at the time.

 def number(bus_stops)

 n = 0

 bus_stops.each { |x| n += ( x[0] - x[1] ) }

 n

 end


This function iterates through each array element, first subtracting the second first element from the first zeroth,  then adding this total to the variable n. Thiƒs is probably the best I could have hoped for at the level I was at and I was fairly proud of myself that I was able to do it.

Now (2 weeks into the PreCourse) I would probably do something more like;

 def number(bus_stops)

  bus_stops.inject(0) { |n, (a, s)| n += ( a - s) } 

 end

Just to prove I’ve made progress! 



That was it. That was my interview experience. Fast forward two weeks and I got the call. I was in.