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

WEEK 5

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.

Reflection

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.

Refactoring

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

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)

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