Makers Academy: Weeks 5 & 6

Week five was our first introduction to programming for the web and therefore a week I had been looking forward to from the start. We began with Sinatra, a fantastic lightweight framework or DSL (Domain Specific Language). With Sinatra just 4 lines of code is all it takes to make the most rudimentary server 

    require 'sinatra'

    get '/hi' do
      "Hello World!"
    end

This was all very promising unfortunately the rest of the week I spent in a bit of a daze. The fatigue had caught up with me in a big way. At university this was called 5th week blues. I was surprised to run into them again but this is probably the hardest I’ve had to think since university.

The rest of the week was focused on HTML and CSS which fortunately I had covered a fair bit before. It was also the first time I used Linux. That can be read about in another blog post but I will share the best here. That is the cowthink command.

Week six was much more productive. We added databases to our repertoire. This was something I had not done before and with the ever increasing speed we attack topics the intensity just keeps going up. We used them to create a fairly large project, a bookmark manager. In some ways not the most enthralling project but with the ability to sign up and log in it is worlds away from what I have created before. Even if most of the heavy lifting is done by another magical gem, Data Mapper, creating this has filled me with a lot of confidence that many of the projects I want to build are now possible. 

With databases and the ability to record users data some time needed to be spent discussing security. Obviously this is a huge topic and one that it is best not to try and solve as a beginner with so many issues that need to be got right. There are a lot of ‘plug and play’ solutions to securing user data such as md5. We used BCrypt a more secure system that plays well with Data Mapper.

As always the internet came to the rescue with many helpful resources. Unusually this time I’m going to start by recommending a book. The Code Book by Simon Singh, I read it a few years ago and mostly does not talk about computer security but general coding and code breaking. It starts from Roman era cyphers but leads up very well to the issues in all so called secure communications. Also was this site, devdocs. A massive library of reference for developers.