Monday, October 31, 2016

CODE CLAN WEEK 6 - THEY PUT JAVA IN MY FERRARI!

So I'm back in Edinburgh for week 6. There was no homework at the weekend so it was a good opportunity to recover from last week's project by not writing any code. This week we are moving away from Ruby and off into the world of Java programming and into a Compiled language.

Monday starts with standup at 9:00 with 21 relaxed cohorts ready to be thrown into the deep end of a new language. Lots more learning and at an even more rapid pace than before.

 

Java was intended to let developers "write once, run anywhere" (WORA) meaning that compiled Java code can run on all sorts of platforms that support Java without the need for recompilation. So it is possible to run it on the operating system on your PC, your Mac, your toaster, or even your Ferrari.

Although I've said 'rapid learning' above Java did not seem as painful as Ruby's day one. The Java code did look familiar, with variables and methods similar but in camelCase and lots of semicolons. The day's lessons were on Classes and Multiple classes and had us building dogs, cats, and bear coding examples. Oh, and remembering to compile the code... Ruby is an interpreted language and does not need to be compiled. Java does.

Tuesday and after standup, we had probably the hardest day yet. Long and so much to take in. A Bear example saw us learning about Array lists Casting and Polymorphism. Arrays in Ruby you can shovel any old thing into them. Java you can't and you have to define their size before you start. Array lists help us get around this.

Polymorphism! Joy! ..this is the ability for something to take on many forms. So if you have a Car Class and a Ferrari Class, the Ferrari can go into a car-shaped memory and also go into a Ferrari-shaped memory. The Afternoon was a lab expanding what our bear from Monday could do and giving him the ability to eat Salmon and Humans, and dance salsa.

Wednesday.. hmmm it was harder than Tuesday! We learned about Abstract Classes and Template patterns and an announcement that we would be making a card game for our weekend homework. So the afternoon lab task was to split into pairs to discuss and plan how you would build a card game in Java. What classes you would need and how they would interact. Sounds easy but is quite complicated to break down into its component parts.

Thursday and in standup, it is apparent that it's not just me who thinks things have ramped up. Today we learned about enums (these are cool!) Try-catch exceptions and some advanced testing. For the lab, we split into pairs again and started to code up the classes of the card game we had planned yesterday. The evening was social night and 3 cohorts from 7 had organized a pub quiz in Code Clan to welcome Cohort 8 and celebrate their first week. This was an excellent night and a great way to round off a week before getting the full homework assignment on Friday.


So to sum up week 6 (have I really made it this far already!) another good and enjoyable but difficult week. Code Clan instructors: top marks. My fellow Cohorts: each and everyone is brilliant and helping massively to make this learning experience something to relish!

Oh and here's a picture (right) I snapped at Edinburgh Haymarket Station. It made me chuckle and remind me of Windows and how used to a Mac I have now become...

Monday, October 24, 2016

CODE CLAN WEEK 5 - TRAINING THE DRAGONS


So I've made it to week 5! It's an early start on Monday morning as I'm staying and commuting from Stirling this week. After a 4:00am drive to Stirling and catching the 7:17am train to Edinburgh Haymarket, I was back in the Code Clan office ready for another week.

This is individual project week and we were set 5 different briefs last Thursday and we had to choose one for a project. The idea is to cement the past 4 weeks' tuition with a full-stack application made from scratch. We were encouraged to pick a project that we could have some fun with and challenge ourselves. Each project brief had an MVP (Minimal Viable Product) of functions that it should do. I wanted a project in which I could make visuals and have a clean neat front end. The choices were:

  • Best Pub application - a week thinking of beer but not getting any… next?
  • Olympic medal application - I'm not very sporty… next?
  • Record shop application - I'm not very musical... next?
  • Expense tracking application - possibly but it can be done in Excel… next?
  • Animal shelter application - you get to train animals… cool!
So I decided on the Animal Shelter but with a twist. My boys and I enjoy the ‘How to Train Your Dragon’ movies so how about a dragon shelter where homeless dragons could be adopted by Vikings?

Friday was an all-day planning day, and we were encouraged not to code till at least Saturday. I started with some blank A3 sheets and sketched out some ideas, then planned my database and tables and did some use case diagrams. I set up a new Trello board to capture my requirements and divided them into Must, Should, Would, Could, (MoSCoW).

I actually didn't get a chance to do any work on it over the weekend so at standup, on Monday morning it was a bit unsettling to hear some people had met their MVP already. Anyway, I had 3 days to take my planning and build my application.

Monday was spent in Ruby and SQL, creating my database and adding my dragon table, my owner's table, and my adoption join table. Each had its own object data created in a Ruby seed script. Lots of Git Adds and Git Commits were the flavour to keep my project code safe. This continued regularly throughout the week.

On Tuesday I carried on and made my controllers and models and worked on the code to simulate the relationships. I achieved my MVP at the end of the day and updated the traffic lights on my Trello board.

Wednesday was a brilliant day where I could add my CSS and HTML along with some graphics to improve the look of my front end. I downloaded lots of pictures of dragons and Vikings from various how-to-train-your-dragon websites and finished up late afternoon with an application I was pleased with.

Thursday is presentation day and following standup, I had the pleasure of going first! My name begins with A and we were going alphabetically through the cohorts. Lucky me!

MacBook in hand I plugged in the HDMI cable and began my presentation. Thankfully I could hear oohs and aahs and my application was well received and had quite a few questions. I gave a demo of my application, showed how I had set up my Trello board, showed pictures of my planning diagrams, and did a brief code walk-through. Applause and that was me done and on to the next cohort.

Each cohort took it, in turn, to do standup and present their application. Everyone had developed their own unique application and wow, most of these people had no coding experience 5 weeks ago and now we're presenting a fully working application that could have real-world uses!

Week 5 has been one of the best weeks, and it was brilliant to be able to code and focus on a full project for an entire week. There were difficulties but the instructors and other cohorts were on hand to assist when I became stuck.

So a massive thanks to Code Clan and instructors. And to my cohorts, I am chuffed to bits to be part of such a brilliant group of people.




Monday, October 17, 2016

CODE CLAN WEEK 4 - FRANK SINATRA

So towards the end of last week, things ramped up with the complexity of the SQL queries:

"SELECT t.* FROM trainers t INNER Join ownedpokemons o ON o.trainer_id = t.id WHERE o.Pokemon_id = #{id};"

The weekend homework was of a similar theme so good practice. This time we had to create a Cinema database, and past customers, films, and tickets to and from Ruby methods. I had the car with me last week so unfortunately, the drive home was dead time. Listening to a Ruby Coding podcast made up for this.

I managed the bulk of the homework on Saturday. The Monday morning 05:43 train to Edinburgh gave me an opportunity to review and add to my homework and move on to practising Ruby in Code Wars

Monday - starts with the Scrum at 9:00 followed by a one-to-one review of the homework with an instructor. It's good to get some feedback on the weekend's work and some pointers on how I could have improved.

Classes begin with an overview of the internet and what is really going on when you make a request for a web page. All good stuff and I now understand what an HTTP: 404 error is. We were then introduced to Sinatra (Frank Sinatra) which is an open-source front-end framework for Ruby. A few examples later the lab was to create a Ruby calculator with a browser front end.

Tuesday - everything is coming full circle and the Pizza app goes online with a code along with the class. Building on the Sinatra from yesterday we combined the previous week's SQL and made a full-stack web application. Pizzas could be ordered via a front end stored in a database and then retrieved. This was hungry work so it was off to Pizza Express for lunch with fellow Cohorts. The afternoon was a group lab where we were tasked with creating another full-stack application for a shoe shop.

Wednesday - and we are introduced to 'Restful Routing' and applied it to our Pizza shop application. This completed the different actions that could be applied to the Pizza shop, by providing Edit and Delete (DESTROY) facilities. An afternoon paired programming lab let us develop our own record shop application using what we had learned in the morning.

Thursday - and following the 9:00 standup we are off into the world of libraries developing an application with many-to-many SQL queries that manage books, members, and how books can be issued. For this, the number of balls being juggled has risen considerably. Having to develop ruby code embedded into HTML and have it managed by Sinatra and having to think about joined inner tables is getting tricky. The Afternoon class is an introduction to Cascading Style Sheet (CSS) with instructions on how to improve the style and formatting of our HTML front end.

In the afternoon we were issued our first week-long project task. There is a choice of 5 projects that you can choose from and we have till Friday standup to choose from.

Friday - 10:00 stand up and I'm going with an Animal Shelter (...with a twist) application. We are encouraged to Plan Plan and Plan on Friday and not do any coding till at least Saturday morning. We will see!

So at the end of Week 4, I'm still really pleased with the course so far. It did ramp up again in difficulty this week, but I seem to be getting used to it now and my brain is taking the strain.

Monday, October 10, 2016

CODE CLAN WEEK 3 - PROGRAM LIKE EFEN REYS

So I have made it to week 3... Go me! last week ramped up a bit towards the end with blocks and enumerators. The weekend homework task was to create a Karaoke bar which was apt as I was lucky to be staying at the Crieff Hydro for the weekend. Sitting on my Mac in the bar with a beer coding had just the right inspiration and atmosphere. 3 objects were created Room, Guest, and Song. All had to interact with each other and it was fun to play with the objects.

Monday's standup was interesting to hear how my cohorts also enjoyed the homework. The Monday lesson began with a bit of thought for the day and a pep talk for the cohorts to make sure we were having fun and enjoying coding. We should program like Efren Reyes who is a famous pool player. When he makes mistakes he takes them on the chin and laughs them off rather than getting all stressed. So when our code is not working don't stress it, just laugh and work through it. A good mental attitude will help us code better.

This week is SQL week, so in the classroom, lessons introduced us to databases. Lots of CRUD (Create, Read, Update and Delete). This class was made easier by creating a Star Wars example database. Luckily for me, Jamie (my son age 8) and I watched The Force Awakens in the hotel cinema the night before so I was up on my Jedi.

Tuesday and the 'SQL' homework was summed up during the 9am scrum by a fellow cohort as 'SQ-Hell'.

The homework was a challenge to format SQL queries on a database to retrieve data with Increasing complexity. The last few questions required multiple inner-joined tables! The day progressed with more SQL and introducing Ruby into the mix. Programming Ruby to push and pull data from the database meant that data used in the Ruby programs could be persistent. So we created a Pizza Shop and started passing pizza orders into the database and removing them to an array of Pizza objects. Both Luke Skywalker and Darth Vader placed pizza orders.

In the afternoon lab, we split into pairs to program methods to recover data on the pizza sales and who placed orders.


The homework challenge was to map out the Facebook database structure and identify 'one-to-one', 'one-to-many', and 'many-to-many' relationships

Wednesday and SQL continues to advance; We moved the database calling logic out to its own class and passed it an SQL query as a string... Then placed method calls on the objects using a block to retrieve the data... Check me with all that jargon in one sentence.

Thursday, following the scrum we get a presentation from Cohort6 of the projects they have been working on for the past week. They are 10 weeks ahead of us and were assigned a team challenge last Thursday. A couple of words come to mind: 'Wow!' they achieved that in a week!; and 'PANIC!' we need to do that in 10 weeks?. The brief was to create a raw JavaScript web app. The range of solutions and functionality presented was brilliant. From Dashboards for Astronauts to Munro Bagging tool, to a Disease mapper. I still have lots to learn. Afternoon and it's back into class and we are still in SQL databases, only this time we have moved into the world of Pokemon. The lesson is to create Many-to-Many database interactions, between Pokemon and their Trainers with a Joining Table. The lab was to create our own databases with Wizards and Magical Items. Thankfully Thursday is social night. Some well-deserved beers and a burrito closed off the day.

Friday is standup at 10:00am and the issue of the weekend homework. I've not had it yet but I'm guessing it's SQL databases with joined inner tables with many-to-many relationships...

So to sum up... another great week at CodeClan => still very challenging => but I have some brilliant Cohorts enjoying the Journey with me => Roll on to week 4, where we get to add an interface to our Ruby and Databases.

Tuesday, October 04, 2016

CODE CLAN WEEK 2 - AND WE ARE PUTTING THE BAND BACK TOGETHER

So week 2 starts with a scrum and then a review of the previous week's homework. I was lucky to have 3 hours of quiet time on the train back to Aberdeen on Friday where I managed to get the bulk of the homework done. It did make me laugh that Jamie my son (age 8) and I were both finishing our homework in the kitchen on Saturday evening. Jamie had grammar and reading and I was making a fantasy model pet shop using Test Driven Development (TDD).

Monday saw us learning about cats, wizards, and wands to model classes and multiple classes... No, wait, that's the other way round. The homework was to continue with classes and model a speedy car (with turbo) and a slow car (non-turbo, Normally Aspirated). The type of engine would affect the car's performance and fuel economy which would be passed into the car object.

Tuesday was a brilliant day of coding along with an instructor to form a "simple" snakes and ladders game. 21 cohorts clattering away at the keyboard churning out ruby code. The game of snakes and ladders turns out to be quite complicated if you break it down into a program. Thankfully Object-Oriented Programming (OOP) simplified it into objects, boards, players, dice, etc.

Wednesday, following the scrum, was a whole day exercise where we were split into pairs and tasked with making our own objects and having them interact with each other. The world was our oyster, so as a team, we decided to put the band back together and form band-related objects including, songs, venues, and gigs. It can get very complicated very quickly but we met the brief of having objects interact with each other.

Thursday introduced us to the 3 pillars of Object-Oriented Programming (OOP) -> Inheritance. Abstraction and Encapsulation. This covered a superclass bird object and its sparrow, duck, robin, and penguin sub-class objects. All had methods quack, chirp, and fly. (except penguin who couldn't fly). Blocks were the final lesson for the day with a small lab. Thankfully this was Thursday's "social" evening so no homework and a chance to go for a beer with the rest of my cohorts. Blocks were hard, so much chat in the pub was discussing coding

beer_array = beer.select{ |beer| beer.type}.count

Friday is revision time and a chance to go over anything we need a refresher on from the week. Oh, and we get issued the weekend homework challenge.

So week 2 is in review. Another big thumbs up to Code Clan, my instructors, and my cohorts. I can't believe how much I have learned in the two weeks. I feel part of something special and really BIG...