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!

Advertisements

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…

Dev Academy – Week 2

I’m now at the end of Week 2 of Phase 0 of Dev Academy. This week has focused on HTML and CSS. The main tasks we had to do this week via Treehouse I had already completed as I started on Treehouse back in the middle of January. I managed to find a link to a months free membership and started on the Front End Web Development track. So I have been working on trying to progress sites I have already made to improve the responsiveness and look. Here is my main site with links to others, all still works in progress.

I have started working through the CSS – Beyond the Basics course on Treehouse. I have particularly enjoyed learning about flexbox and multi-column layouts. It will be good to play around with these and use in sites, while still thinking about how to keep a site workable for browsers that don’t yet support these options.

I am just getting into transitions and transforms and have animations to look forward to. Who knew there was so much you could do with CSS3! I could see secondary school students doing lots of cool things with this kind of styling.

One area I would like to development more is the design of sites. I still feel that I have a very basic and limit idea of design of websites. I would like to be better at using colours and creating the look and feel of a website. Like Annie Lennox’s new albums site is wow – http://nostalgia.annielennox.com/.

Screen Shot 2015-03-14 at 4.52.48 pm

I like the pop out menu from the side and menus like this that pop down, mostly in mobile sites. Anyone know of a good place to start for basic but good design tips?

With Git and Github –

  • am really enjoying the power of branches
  • found site called “git – the simple guide” – http://rogerdudler.github.io/git-guide/, really useful
  • using GitHub pages to make websites for projects – doing this is slightly different from making a page for a user following GH pages. I found this page on how to make them manually confusing, so at the moment what I do is once I have pushed up the master branch with the inital commit, I create a new branch called “gh-pages” in GitHub and the site is created. When I want to updated the project site (website) I do have to pull the master changes down into my gh-pages branch and then push that up to the gh-pages branch on GitHub. Which is a bit round about. When I have another site I want to get online, or another one to start, I will have a go at following the Creating Project Pages manually instructions.
  • have also this week had a crack at using markdown language to add information to my copy of the weeks instructions, to show what I have and haven’t done.

Week 3 we will be getting into JavaScript and JQuery.

Finished JS Loops, Arrays and Objects – Treehouse

Liked this course, fun playing with loops, arrays and learning about objects. Had a few issues though.

First problem was that sometimes I type too fast or I’m not being careful enough. When I was meant to type ‘ += ‘ I would type ‘ =+ ‘, for when I wanted to add something to a variable. This caused me a few “OMG! Why isn’t it working?!” moments. Luckily though I figure out what I was doing wrong just before posting a question to the Treehouse forum.

Another thing I discovered was about errors showing up! The images below show the code with the error, the error message that came up in the console and the corrected code.

So, this problem has a 2-dimensional array and what I did was missed a comma in the outer array. This made the program throw an error BUT the error message was not coming up saying it was on line 6.

How did I realise I had made this mistake? Again, was about to ask a question in Treehouse and when you do start to ask a question it pops up questions that have already been asked that are similar to yours. Had a look at these and one mention that often errors occur by missing out a comma or semi-colon. So I had a closer, more careful look through my code, not just at the lines that the console and told me their were errors out.

Good to learn that the cause of an error may not be where you think it is! Something to try and remember and to get better at typing without missing out commas etc!! Also, to think about is that even though it the console did not give the line the error was on, with it saying line 17, I could have thought about what variables/objects/functions were in that line and then looked at them. This would be a good way to tackle errors in a large program!

The last thing that I got thinking about while doing this course was when to use/write a function? In the last challenge, in my solution I got it working with a for loop inside a while loop. The solution that Dave from Treehouse showed used a function for the for loop part. I want to know how do you decide when you should create/write/use a function?

Intro to Programming – Treehouse

Have just completed the short block ‘Introduction to Programming’ in the Front End Web Development Track on Treehouse. Enjoyed doing this. Learnt about using the console in Google Chrome and then creating a JS file and running through Chrome and seeing results in the console for the page.

This was a short course but worthwhile doing even with having done some programming before. It was good have a recap and of course learning how things are done in Javascript, as the only other language I know a bit of is Python.

I have been pleased to learn that I have retained quite a bit about the concepts of programming from the Canterbury University Intro to Programming paper I did over the first half of 2014. And more importantly I think, is that I am confident to try out things and search for help when I am stick, rather then just thinking I can’t do it. Had a couple of these moments when working through this block.

Screen Shot 2015-02-11 at 5.01.34 pm

Changing of content – had just finished this Introduction to Programming and went back to the Front End Web Development page to have a pop up saying that changes had been made to the course. You have an opportunity to review the changes before updating to it, which is good. I decided to update, as I kind of think that an update would be an improvement plus it affected mostly blocks I hadn’t done yet, except for the Intro to Programming. Which is now JavaScript Basics and some stuff added later on as well. So now onto JavaScript Basics – I may fly through it!