Hello Rails! Week 1, Phase 3 – Dev Academy

This past week at Enspiral Dev Academy I have had a fantastic time!

In the guide for this phase it has this:

Phase 3 is the most exciting phase here at EDA. In this phase we no longer view you as students or developers-in-training, rather we look at you to be valuable, albeit junior, collaborators in the craft of software development.

I would agree, Week 1 has me very excited. It is lifting to be seen as “collaborators in the craft of software development”. And it really is about crafting software, websites, apps. I haven’t yet made anything really cool and exciting, however, I am getting excited by what I am doing, how I am doing it and the potential for me to create and craft in the near future. This is the first reason it has been a great week.


Secondly, the way the course has been structured works well  for me. In this first week of Phase 3 the Rubyists learn Ruby on Rails (the C Sharpies do a group project together as they had a big learning curve in Phase 2 and are kind of waiting for the Rubyists to catch up). There is less guidance and structure to this week of Rails then the previous first two phases. However, there still is a good structure there and this was useful for me as I like have a good solid structure when I am learning new things. The first two days of the week I re-created my shopping cart with Rails. For one of the Phase 2 personal projects we made a shopping cart using Ruby and Sinatra. This was referred to as “Diet Rails” but we learnt all about routing. Then with Rails, what happens is that it does a lot more for you. Which is cool and some may think what was the point of doing what we did with Sinatra but it made Rails seem not as scary to me. I was able to understand a lot of what Rails was doing and creating for me having had spent a lot if time creating all those same things when using Sinatra.

I worked on the shopping cart for a couple of days and covered the ins and outs of it with lectures plus learnt about Devise and Omniauth. Day 3 was set down as Test Driven Development and this is an area that I hadn’t focused on during Phase 1 or 2 and knew I had to knuckle down and get my head around it.

A slight break in this track of writing to mention another reason that I have loved this past week. I have ended up being the only Rubyist in Phase 3! So, our cohort starting with 5 C Sharpies and 4 Rubyists. Part way through Phase 2, one rubyist decided she wasn’t going to do Phase 3 as it wasn’t going to be useful for where she was at and where she wanted to go. Then the two others both decided, for various reasons, to roll back a cohort and repeat Phase 2. I felt at the end of Phase 2 that I had strong forward momentum and wanted to jump into Phase 3 whole heartedly. So, I have been working by myself mostly over the past week and I have loved it! It has meant that I have been able to focus on my learning and use tools and methods that work for me.

Wireframes, routes, ideas about apps made in Rails.

This has also meant that I have had many one on ones with the teachers at EDA, which leads me back on track to TDD. On the Wednesday the first ‘lecture’ Joshua Vial was set down to take. It is a bit odd doing one on one lectures, so Josh come over to where I was working and we started talking about TDD. He came up with a great idea to create a blog app in Rails with the proviso that I didn’t open the server (so didn’t look at the website I was making) until I had written the tests and the code for all of the functionality I wanted. We also did “ping pong” pair coding – this is where one person writes a test, you swap, second person writes the code to pass the test and then writes another test, you swap, etc etc.

Screen Shot 2015-06-20 at 8.59.03 pm I have learnt to enjoy test driven development. I am even thinking it would be fun to go back and revisit a lot of my projects and write tests for them. It was good to finally get my head around testing and I got to do some Capybara testing as well.

Screen Shot 2015-06-20 at 9.00.04 pm

On Thursday and Friday I learnt about Mocks Stubs and Doubles and using AJAX and JSON with Rails.

And to cut a post short that is getting long, last few important things from this week, at the start Samson Ootoovak gave a great intro to the week that set it up well for me. Within this was the clear intent that there was freedom to deviant from the structure and that this was strongly encouraged if you didn’t feel the content was useful or if you found any of it boring. It was cool to have this acknowledged.

Being the only Rubyist this week has given me the time and space to learn and to solve problems by myself, which has been a valuable experience. It has also meant that I have had many one on ones where I have asked questions and learn heaps, which has been fantastic.

Also on Thursday evening I attended a small meet up at EDA, for anyone who is interested in learning Ember JS. I think it will be extremely useful to know at least one JS framework before I finish at EDA, so decided that this would be a great opportunity. Ember has been created by a lot of people who come from a Ruby and Rails background so the way it is structured in its implementation is similar.

One of the most important learnings from this week is that I am no longer scared of learning new languages! Now that is really cool! I’m actually excited about learning more so I can do more cool things!

DevAcademy: final two weeks of Phase 0!

Week 8: Databases + Review

We did this stuff:

  1. Treehouse: Database Foundations
  2. Review JavaScript Objects with Codecademy: JavaScript – Data Structures, Objects I, and Objects II.
  3. JavaScript Gradebook
  4. JavaScript Tally Votes
  5. Fizz Buzz Super Edition
  6. Nums to Words
  7. Javascript Olympics

I quite liked learning more about SQL as I had learnt a little bit while teaching, so wasn’t anything that was new to me.

I have enjoyed learning JS but find it a very steep learning curve going into objects and OOP after not doing any JS for a few weeks. My head was well in Ruby-land.

Ruby seems so much easier – but is that only because I have been working with it intently for the last 3-4 weeks??

The challenges I enjoyed the most in Week 8 where doing the Fizz Buzz Super Edition and Nums to Words – these were Ruby challenges

Felt I learnt a lot during Week 8. I am still looking forward to seeing how all of these things work together in making a website or app.

Week 9: Review

Intro for this weeks challenges:

These challenges are difficult. If you feel like you need extra understanding to complete them, check out the optional but suggested activity below:

  1. OO-Basics
  2. Triangle-Debugger
  3. Reverse Words
  4. Rectangle Class
  5. Translate Ruby to Javascript
  6. Revisit Your Website

Most of these challenges were in Ruby, except for the translating. It seemed like they were in reverse order though, as the first one was a lot harder then the last ones.

I surprised myself quite a lot during these challenges as firstly we were told they were difficult and secondly at first glance they looked difficult. At least the OO-Basics did. But got them all done within two days, except for revisiting my website.

Every so often they throw in a challenge which has all or most of the code but needs debugging. I quite like these as I don’t need to worry about getting my code to work, I just need to try and found the errors in code given to me. I also really enjoyed making code look really neat and tidy as I think this makes a big difference to its readability.

It was fun translating some Ruby code to JavaScript. I ended up doing this with another guy in my cohort as we hadn’t done any pair coding and I was keen to have a go at this before starting Phase 1.

I chose a Ruby exercise on reversing words…

Screen Shot 2015-05-02 at 5.54.50 pm

…and did it in JS with Kyle and then refactored twice by myself…

Screen Shot 2015-05-02 at 5.55.13 pm

Screen Shot 2015-05-02 at 5.55.25 pm

Screen Shot 2015-05-02 at 5.55.36 pm

… quite happy with myself in finding the .map function in the JS documentation and getting it done to fewer lines.

The last challenge of the week was revisiting our website that we built and worked on in Week 2 and Week 3. After those weeks my site was looking like this:

After this week it is looking like this:

I’m pretty happy with how it looks at the moment. There are a few things I do want to do are to :

  1. add a drop down menu for smaller screens. I came across this post – Drop-Down Navigation: Responsive and Touch-Friendly, and it seems like it would be pretty easy to implement. They also have a demo site. When I have some spare time I will try to add this in.
  2. redo the photo, as think it takes too long to load
  3. tidy up the code as it is messy, as started with old site.

The change in design happened for a few reasons:

  1. initial one was too simpler and boring
  2. had used initial one for trying things out – e.g. JQuery drop down menu
  3. initial one didn’t have a clear purpose / context

A couple of sites that I took inspiration from where http://kendallflutey.com/# and http://amy.palamounta.in/about/. I was also thinking about how to present or “brand” me, as I was working on this.

During this process I discovered Font Awesome! I was looking for an icon to add an angle-up to use to get back to the top of the page and came across it. How cool! What other great sites are there out there for using when working on building a website?

So, that is Phase 0. Bootcamp / Phase 1 starts on Monday.

Phase 1 consists of:

  • Programming Fundamentals: Learn How to Think Like a Programmer
  • Introduction to the Dev Academy experience
  • Ruby, SQL, Active Record
  • Solving problems on the command line
  • Engineering Empathy: Explore your inner world

Phase 2:

  • Programming for the Web: Bring Your Applications to Life
  • Javascript, HTML, CSS and Sinatra
  • Learn to rebuild Twitter or create your own Hacker News
  • Engineering Empathy: Maximizing effectiveness with others

Phase 3:

  • Making Beautiful and Meaningful Things
  • Agile software development, user stories, scrum, and sprint planning
  • Introduction to the Rails framework
  • Final project pitches, lightning talks and demo day

The phases are three weeks long. I am hoping to do at least a post a phase. If not, there will be one very big one at the end of bootcamp! See you all on the other side!

Dev Academy: Week 7 – Object-Oriented Design in Ruby

This week was focusing on Object Oriented Design. We had 5 challenges to do:

  1. Drawer Debugger
  2. Pez Dispenser
  3. Bingo Board Part Two
  4. Refactoring for Code Readability – on previous weeks challenge Validate a Credit Card Number
  5. Virus Predictor.

And I have just realised as I have started writing this post that Object Oriented Design hasn’t actually be explained to us. So, as I have been doing a lot in the last 7 weeks, I have googled what OOD is. Some definitions and links:

Object-oriented design is a programming paradigm that began in the late 60’s as software programs became more and more complex. The idea behind the approach was to build software systems by modeling them based on the real-world objects that they were trying to represent. For example, banking systems would likely contain customer objects, account objects, etc. Today, object-oriented design has been widely adopted by businesses around the world. When done properly, the approach leads to simpler, concrete, robust, flexible and modular software. When done badly, the results can be disastrous.  http://www.objectmentor.com/omSolutions/oops_what.html

Object-oriented design is the process of planning a system of interacting objects for the purpose of solving a software problem. It is one approach to software design. Wikipedia, http://en.wikipedia.org/wiki/Object-oriented_design

It’s a process of planning a software system where objects will interact with each other to solve specific problems. The saying goes, “Proper Object oriented design makes a developer’s life easy, whereas bad design makes it a disaster.”  http://www.codeproject.com/Articles/567768/Object-Oriented-Design-Principles

A link to a possibly useful book on the subject:

Practical Object-Oriented Design in Ruby (POODR) is a programmers tale about how to write object-oriented code.



Another book with an interesting title:

The Bastards Book of Ruby: A Programming Primer for Counting and Other Unconventional Tasks

Object-Oriented Concepts – A primer on object-oriented design and using it to organize your code.

In a nutshell, object-oriented programming sees the world as data, modeled in code by “objects.” In OOP, the programmer focuses on the content of that object and how that object behaves (i.e. methods).

So it’s worth becoming acquainted with OOP because it is a design pattern especially suited for programming with data. The practical benefit is that it can vastly reduce the amount of code you have to write and the number of errors of inconsistency to debug.

I guess I have a bit of an idea now and in the Treehouse tutorials we did make a bank account class, so can see the link to the first definition above. Do you have a good definition or explanation of what OOD is? And any good examples?

What have I learnt / done this week? Well, I feel more confident with writing methods, classes and how the methods interact with each other. I am starting to become more comfortable with breaking a problem down into more than one or two methods. I can see the relevance of doing this. I have learn about user stories:

… and used them in solving a problem and wrote some nice code, I think.

Screen Shot 2015-04-17 at 5.10.31 pm

Still not sure about what attr_reader, attr_writer and attr_accessor do, as it seems I can either have them in or not and my file still works?! For example in the above code having attr_accessor :flavours just above the initalize method, it will work. Anyone got a good explanation of what it a attr does and when it is used?? Perhaps I am just doing something fundamentally wrong in my code?

I have enjoyed solving the problems this week. Two were ones we did last week that we built on or refactored and the other three weren’t too difficult, although did do some work on the Virus Predictor challenge with another person from my cohort.

Another member of my cohort shared a link at this book – the (Poignant) Guide to Ruby –  and link to PDF. Even though this seems to have bee written by someone who is all over the place (the cartoons and long rambling paragraphs), the core part of the book explains what Ruby code is doing in a very simple way. For example:

Screen Shot 2015-04-17 at 5.52.32 pm

Two weeks left until the start of Phase 1 and the nine weeks of bootcamp. It will be coding from 9am till 6pm Monday to Friday plus probably lots of evenings and lots of weekends. I expect I will be very antisocial over this time. What will be good is that I will be based in at Enspiral Dev Academy in Cuba St and there will be lots of people around that I can get help from. Also, I hope I will be able to help some people as well, even though I have a big dose of the imposter syndrome – post on that shortly.

Ending question, what resources do you use, recommended for learning everything Ruby?

Dev Academy: Week 5 – Algorithms and Week 6 – Classes = lots of hard work!


Week 5 of Dev Academy was about building on what we covered in Week 4.

Last week you built up a toolkit of ruby methods. You practiced with them and gained a good intuition of how they work, what they’re used for, and so on. This week you’ll use that toolkit to solve some more complex problems.


This week also involved reflecting on each of the challenges and how you went. I found this part extremely useful. Over the week I worked on improving how I wrote pseudocode and actually taking more time to understand a problem instead of diving in quickly.

I am still at a point where once I get an idea in my head about how to solve a problem, I don’t take the time to think about other ways to solve it. This is something I need to work on – to improve my lateral thinking. I think as I become more confident in my understanding and use of code, my lateral thinking will improve. It is also something I will look to focus on in particular over the next couple of weeks.


In each of our challenges, once we solve it with an initial solution we then are asked to refactor it. I’m still doing this at a basic level (or at least what I think is a basic level). At the beginning of each week we get given examples of possible solutions to the previous weeks challenges, which proved interesting for the challenges in Week 5. I learnt a lot of cool things that you can do in Ruby to reduce down your code.

For example this loop:

Screen Shot 2015-04-12 at 5.06.19 pm

For if / else conditional statements, for this:

Screen Shot 2015-04-12 at 5.07.49 pm

And then you can ‘chain’ together lots of methods:

Screen Shot 2015-04-12 at 5.09.42 pm

So, this:

  • takes a number
  • converts it to a string
  • reverses it
  • turns it into an array of characters
  • splits the array into groupings of 3 (slices it)
  • turns it into an array
  • then maps it (copies it) to a new array while joining  the sub arrays together and putting a comma in between
  • then reversing it back.

Another challenge in Week 5 was the Accountability Group Creator!

In this challenge, you are going to make a method that takes an array of names (you’ll want to make a list from the people in your cohort) and outputs a list of accountability groups for three different units. You should try to get everyone into an accountability group of 4, but it’s your decision how to deal with cohorts not easily divisible by four.

This was a fun challenge to do but more importantly I could see the link to the possibility of making a product that I have used. While teaching Physical Education you need to split a class into teams. I discovered Team Shake, where you enter in your class list, how many teams you want or how many students in a team. You can also rank your students by ability level and then decide if you would like same ability teams or different ability teams.

2_IMG_4314 (1)

It was great to see how the Accountability Group Creator challenge links in with an actual app I have used.


Week 6 we started exploring Classes by firstly doing either the Treehouse Ruby Objects and Classes tutorials or Codecademy: Ruby (Object-Oriented Programming Pt. 1 and Pt. 2). I actually decided to do both and luckily they didn’t take ages and was worthwhile doing both as they covered things slightly differently.

We then got into challenges where we had to write classes! I found parts of this week quite hard and other parts not so difficult. The Bingo Board challenge I got really confused with and got myself all tied up in knots but some good learning came out of it for me. I used IRB (interactive ruby) really well to help me figure out what I was doing wrong, which I hadn’t done to this extent before. I have gotten better at understanding error messages, thats got to be handy in the future! With the Bakery Challenge I think I  finally got a good handle on hashes and how to access the values and keys separately.

I have also started using a visual diary and writing down code things so I can use as a reference over the next few months. There is no way I am going to be able to keep everything in my head!

The last two weeks have been really busy and full on (so much I didn’t do a blog post at the end of Week 5). Part of this was due to being sick at the start of Week 5 and during Week 6 I had a couple of days where I couldn’t do much coding. So, feeling pretty good with what I have been able to achieve over these two weeks.

Tomorrow begins the last unit of Phase 0. I think what we will be covering is Object Oriented Design, Databases, and Review. Three weeks until bootcamp!

Minion-220 (1)

Dev Academy: Week 4 – Hello Ruby!

This week was an introduction to the language of Ruby. Starting with the Ruby Basics course on Treehouse which covered:

  • How Ruby Works
  • Ruby Strings
  • Ruby Numbers
  • Ruby Methods

Screen Shot 2015-03-29 at 8.24.54 pm

Then into the Ruby Foundations course which covered:

  • Basics
  • Objects, Classes, and Variables
  • Strings
  • Numbers
  • Arrays
  • Hashes
  • Methods
  • Loops
  • Blocks
  • Procs & Lambdas
  • Modules
  • Core – core collection of classes and modules
  • Standard Library
  • Testing

I was pretty happy with all of the stages up to Blocks. Having completed the University of Canterbury Introduction to Programming course (Python) last year, the concepts and syntax is pretty similar. So, no surprises for the first half but then there was the rest! Blocks, procs, lambdas!?!?!?!?

I have an in-built need in my brain to complete all tasks/challenges when I am doing a course of study. So even though I haven’t really understand most of the last stages in Ruby Foundations, I had to finish them all. One day, hopefully, it will all make complete and utter sense to me.

We also had 20 exercises to complete this week from as simple as creating some variables to working out if a year had been a leap year, to creating a Factorial Method. I quite enjoyed doing these as I like figuring them out.

It was good to start getting into learning Ruby. What I am really looking forward to though is creating projects. I feel I can only go so far with making loops and finding strings in arrays. So, when I get to use Ruby to make something ‘cool’ I will be really excited!

Dev Academy : Week 3 – JavaScript and JQuery

I have really enjoyed learning more about JS and JQuery. I knew a tiny little bit. I think I understand more now, but definitely do not understand everything that I have gone through this week.

I had already completed the JS Basics and JS Loops, Arrays & Objects, so got on with JQuery Basics. Within this course the projects were:

  • Creating a Spoiler Revealer
  • Creating a Simple Lightbox
  • Creating a Mobile Drop Down Menu
  • Creating a Password Confirmation Form
  • Creating a Simple Drawing Application

It really works for me that the tutorials are focused on creating projects. I enjoy seeing how I can use what I am learning for myself, rather then just doing stuff for the sake of learning it (although you do have to do this at times when learning programming).

Besides working through the Treehouse tutorials, one of the suggested challenges for the week was to “Make your Website Interactive”. I liked the Lightbox idea and added this interactivity to my photo portfolio site.

Screen Shot 2015-03-22 at 5.37.40 pm

If you click on an image it should come up like this:

Screen Shot 2015-03-22 at 5.39.20 pm

If it doesn’t then you may have JavaScript turned off in your browser or your browser for some reason is blocking the loading of the JS.

I am also working changing the layout and structure of my personal website and am planning on adding a JQuery mobile dropdown menu. Although, you can create a dropdown menu using HTML/CSS and after I have had a go with JQuery I am going to look into doing it with HTML/CSS as I think it will look better!

The last project was creating a simple drawing application. I haven’t uploaded this, so just an image. Pretty fun making this and exciting to add the interactivity.

Screen Shot 2015-03-21 at 5.31.27 pm

Another suggested challenge was the Treehouse course “Interactive Web Pages with Javascript”. This is creating interactivity just using JS and no JQuery and using the DOM! I am into the third stage which is “Traversing and Manipulating the DOM with JavaScript”. It is taking quite a lot of my brain power and I know I won’t have grasped everything by the end but it is a start.

I have started early on Unit 2: Ruby Fundamentals, Week 4: Ruby Basics as I have work all week and am not to sure how much time I will have in the evenings. It is going well so far and I was also able to fix some Ruby stuff in my terminal so I could run the tests for the exercises. So all round quite a productive day. And I got a surf in this morning!

More on Ruby Fundamentals soon…