Week 10/2 – Tech tests and Ruby Unconference!

Dan was sick on Thursday and couldn’t come in the morning. We did the morning session with Mary which was not very productive since she doesn’t know us and how we work quite well. After that we had Tic-Tac-Toe tech test and I didn’t do focus on it because we had Jamboree at 4pm. There were almost 40 ideas and I also participated with 2 ideas. One was a friend group travel recommender which a group enters some keywords of what kind of holiday they’d prefer for their group holiday along with their preferred date and budget range. The app would then research possible places suitable for a group holiday and make recommendations with accommodation and flight options. I think this is a good idea and will try to work on it after the course. The other one was a bit personal and not very complex. It simply was a very intense alarm which prevent you to snooze it and wake up on time. We had the first round votes and 9 ideas were shortlisted, none mine as expected 🙂

Friday we started with a very productive technical interview workshop with Zara and Raj. We split to groups of 3 and did mock interviews with each other by using the questions given. Later on Raj, who is an experienced manager that did a lot of interviews, gave us tips and tricks about the interview process. The important parts are:

– being honest and open in the interview

– saying “I don’t know” when not knowing the answer

– vocabulary

It was a long yet definitely one of the most productive workshops of the whole 10 weeks. After that I think I voted for the barber app, sending sms for coffee and poker game with ruby. Our last tech test was getting a json file and by using the values of that produce a receipt with the given numbers. Dan wasn’t here and there was no review hence like most people I didn’t do this one as well and played lots of ping pong. The day ended around 5 and happy hour started at 6:30 for about 1 hour until we moved to Bricklane to have our cohort curry. We were a crowded group about 20+ and seating was a bit tight. Also waited about 2 hours for our curry but it was a lovely night with BYOB! I left around 11 since I had to be ready and steady for Saturday’s Ruby Unconference!

Even though I was a bit hangover, I managed to wake up on time to go to Holborn for the conference. Tom, Joe, Laura and Johnny were other guys that came. The concept of the conference were quite interesting as the participants offered to talk on and asked for other experienced others to talk about the topic that they wrote on the empty slots. After 30 mins of explanation, the conference started on 10:30 and had 5 sessions for 1 hours including 1 hour lunch break. I went to Z3 (a sudoku solver program) and machine learning which was a quite intense session. We went to lunch with 2 other girls and had some chat with them. Later on continued with lazers/OPAL (I left lazers in half since it was almost purely hardware). Final 2 sessions were testing rails controlles and tech tests & technical interviews. The last session was really useful since I had a chance to understand the point of view of the very important people in the industry. They decided not to give supermarket kata since MA was using it in it’s curriculum. Also I heard of a very interesting interview process from @sleepydog which is:

-cv review

-phone interview

-4 pomodoro with 4 different developers observed by another member

After live coding, interviewers gather together and simultaneously thumbs up or down to “would you like to have this person in your team tomorrow”. If all thumbs are up, the person is hired, else not hired.

Other people said that it was quite tough and interview process would be more based on real life problems such as bug fixing in rails. The people couldn’t find a final decision since the time was over. We went to a pub and I also met with @tekin there who lives in Manchester and works for Coop as a consultant. Overall it was a really productive meeting for me to get to know and familiarise with the industry leader and professionals!

Week 10 – Tech tests

The week started by 2 remaining group presentations; TDDedective and Technology Recommender (?). 1st group made a very cool Atom add-on which tries to prevent spiking w/o testing. I really enjoyed their approach and their members were really strong as well. I’d definitely recommend this add-on and may even use myself 😉 Last group had issues with technology selection had to work on weekend as well. Their product was a pretty basic MVP and lists the steps needed for set up when a technology combination is selected.

After the presentations we started doing our first tech-test. It was simply yet complicated test with 3 requests:

-set up a server on port 4000

-create a route that saves the key, value pair

-create another route which returns the 1st value if 1st key is written as the value

Even though it’s solo, you somehow interact with get support from your pair(!) or cohort-mates. I did it somehow with the support of Johnny however I don’t like my solutions that much. Hence I redo it and committed to github. I started with node express however decided to do it more simple and changed to Sinatra later on. It was pretty basic but you have to understand how to save the params of a request.

On Tuesday we had the 2nd test which was writing a program for keeping a bank account. It was pretty similar to Oystercard challenge which showed how important it was to have separate classes to do each job instead of one god-class. I did it quite well with the help of my old Oystercard repo and was happy about my solution. In order to get ready for the Jamboree I decided to go to a meetup which says that they’d do digital brain storming. My friend Levent came to get his house keys from me and decided to stay along with another woman. We worked together to use the app as testers and had some nice outcome. It is an OK app which supports the people who can be a bit shy to express their opinions in BS sessions. After the meetup we left to Levo’s to visit Tofi and had some chat.

Wednesday was quite interesting(!) with the GildedRose refactoring kata. There was a extremely long (almost 40+ lines) if else statement to be refactored alongside with test to be written. However, to admit, after a very intense 9 weeks of pairing and group work, tech tests and solo working seems a bit dull and boring. I wrote about the curriculum change and having the tech tests to 10th week instead of 12th week (after the graduation). I still believe this is a good thing however it really is not that much of fun. I did the test with some guidance from Jimmy (write tests and use ‘case when’ statement). It was Laura’s birthday and even though I missed the cake, I went for some drinks to Culpeper – which was the highlight of the day 🙂

Week 9 – Code Farm – Last group project

 

We came on Monday to make code review of Instagram Challenge however almost half of the cohort didn’t do it. It was really similar to Yelp clone and IMO the main challenges were the likes. I reviewed basically with Murtz, Joe and Tom – Only Murtz did it with a very basic/to no CSS like me 🙂 I personally think that it was an important repeat of the main tasks we’re going to do hence I’ll work on it extensively.

The day continued with Makerthon (aka Jamboree) with all cohort submitting ideas and voting for them. My idea was to make a very simple add-on to double check .env file along with other files of the project to look for an open API key. However there were more creative and complex ideas compared to mine such as:

– creating a web page/game to to teach code to children (10-12 y/o)

– a group pomodoro add-on to atom that reminds to take a break

– TDDlinter to check your un-tested codes

– DOM lister for Ruby (lists all classes, methods and objects for a given project)

– DB and MVC associator with diagrams (or smth like that 🙂 )

– There was an interesting idea that would work with REACT

– Technology recommender (DB, Server, Language) based on the project

I voted for the web page, REACT and tech recommender and after randomisation there were 5 groups (first 5) and my group of web page was Abi, Johnny, Lawrence, Mr Jons and Summer! What a lovely and joyful group it is! We gathered in the afternoon to discuss what we can do after doing some research. We thought about 3 possibilities; game, quiz and hybrid however all of them had some setbacks. A pure game with lots of animation would be just a game since we wouldn’t be able to add the teaching part to it easily. We thought about maze game on canvas but it’d be just logic of moving correctly as opposed to teaching them coding. Pure quiz was not the most charming option since we wanted to make something fancy and colourful for the kids. Another option was to make a game like space invaders with new ammo or bonus feature addition after answering the questions about coding correctly. Finaly Dan came and discussed the pros and cons of each. We decided to make a web page with animations based on the chicken sketch of talented Abi! We decided to work with JS, Rails, basic pSQL and Canvas!

Canvas is a very useful element of HTML5 and JS where one can draw objects and images. I really liked how flexible it is to utilise with original methods such as clearRect, drawRect, fillRect, drawImage, etc. I’ll write more details about the usage of it.

Tuesday we started with SUP and discussed our ideas. Our focus would be an animated page with explanations and animated/fun examples. I had some recommendations but they were a bit ahead of the MVP. Main parts would be variables, arrays and logic. Summer came with the idea of animated Chicken and we mostly focused on animating it correctly. We worked with Lawrence to write the JS of animation from scratch but it was far more complex than our expectation hence we used “internet” to support our solution. I didn’t feel very useful that day to admit. At the end of the day we had a basic working web page with some basic animations.

flatchicken

Wednesday I worked on the variable page restrictions for the size of the canvas and rectangle size, speed of the chicken while others were working on the arrays and testing. Abi and Summer made a great team that created funny animations! I wasn’t extremely productive day for me since at the end of the day I learned that we wouldn’t use rectangle any more and the chicken speed page were completely changed. Also I think it was the first day that I worked without a pair. Anyways, I learned how to do a little bit complex JS restrictions along with setTimeout and setInterval functions.

I was pair with MrJons on Thursday and we managed to convert the rectangle to our lovely chicken. We were able to move and resize it within our canvas. We also did the Logic page and managed to add the chickens dynamically. Those 2 tasks took almost all of our day but we were satisfied. Talented Abi also drew some fences for the page layout and our page became artesanal(hand made). We did lots of huge merges and our lovely page had it’s skeleton covered with a rich

Friday we worked together with Lawrence and as a group rushed to finish the remaining tasks of the project. Our main focus was setting the name variable along with getting rid of canvas bugs. The bug is the issue where the last remaining moving chicken appears on the next page. We need to run clearInterval and clearTimeout function to stop the previously working function. There were more to be done on the final touches however we did our last merge session around 1:30 and did some mob-coding for the remaining parts. Johnny worked on Heroku deployment and managed to overcome the major bugs. Time flies so quickly that it was already 3 when we finally decided to start working on the presentation. While Abi and Summer was recording the page they also did the dubbing with laughter crisis’ 🙂

We gathered in the 2nd floor and with team Pompomodoro and DOM modeller made our presentations. I really found both of them really useful tools and the logic behind them. 1st team was missing half of the members due to sickness however it didn’t let them (Rosie and Laura) down. They managed to deploy their Atom package as well!!  DOM Modeller accepts offline or Github files and lists all classes, methods and separates them as public and private by measuring their lengths. It’s a great tool to check the quality of the code. Our presentation for CodeFarm were quite fun and people enjoyed our animations. Even though it’s not as technical as the others, I personally found it pretty useful for the usage of JS. 2 more teams will do their presentations on Monday and we’ll start the tech-test week by then.

After the presentation we had our usual retro and confidence workshop continued by our happy hour. This time the beer finished quite early and we bought tons of beers from Tesco. However another challenge was the closure of the facility at 7:30 hence we moved to Alfie’s. It was a lovely night as usual with lots of chat and fun. I left quite late and to admit had a lazy weekend 🙂

Feel free to visit our project page code-farm.herokuapp.com and have a lovely week!

overload

Week 8 – J-EATS !

We started the week with basic code review where I saw some different methods of Ruby again and we shared our “best practices”. Dan shuffled us and we formed a group of 5 to work on Yelp clone. Our group was consisting of Joe, Erce, Abigail, Tom and Stephan which is actually J-EATS! We used shuffle to decide our pairs and I was with Joe.

We met at 2nd floor small rooms and decided how we should work with Rails. Tom emphasized how we should use the routes (GET, POST, PATCH and DELETE) and we also worked on the user stories. Our main task was to create Restaurant through a User and write Review for them hence we needed 3 classes. We decided to use Postgresql as our database and started working on the project. First we set up our environment and database. We created our models of Restaurant and Comment and associated them accordingly. At that time I didn’t know how to scaffold a controller with command of rails generate scaffold… The main magic was the “devise”! All the user staff (authentications, registration, confirmation, password encryption, etc) that we were struggling was completed just by installing the gem within 2 lines of code… It is quite handy however quite secretive and unmanageable. We had to migrate our database based on our associations within the db (has_many, belongs to and foreign keys. Since I didn’t work with pSQL before, all these db migrations were quite new to me. We finished the 1st day quite productively.

On Tuesday we started with a SUP and discussed the items we covered yesterday. Using the big rooms were really productive since we somehow were able to do mob coding and reviewing. We had some merge conflicts and interestingly throughout the week I was the victim of almost all of them. We were mostly focused on the Restaurant & Review association. During the project we noticed how clever Rails was.  Devise had all the routes, forms and even notices & error messages in it… The headline of the week happened this evening as we went to pub quiz with James, Ewa, Alfie, Abi, Stephan, Johnny and Jimmy 🙂 I really enjoyed it and again it was a reminder for me how little I know about British culture 🙂

On Wednesday pairs we worked more on review and restaurant association with the limitations and validations. With our usual SUP and big screen codings. To admit, we were almost done just missing image loading and CSS. I managed to reach the restaurant reviews through controller and view.

Thursday we were split to work on image uploading, Facebook authorisation and geocoding. I didn’t see the authorisation process and still missing it. We worked on the geocoder gem however didn’t succeed that much. I suppose paperclip was used to upload images to the DB. Tom worked on prettifying the page with CSS and we loaded the project to Heroku as j-eats.herokuapp.com.

Friday was pretty easy and chilled. I was with Stephan and the others worked on the Amazon S3 photo uploading server. We struggled a lot with Stephan even though we were following the tutorials. Later on Joe did it quite easily by just following the tutorial and I was a bit amazed how he did it. Later on I learned what would be my main leaning from that day:  restart the rails server after substantial changes. .. Our geocoder can get the coordinates from the address which we’d later use to pin the location w/o using the regular Google Places API. With the addition of photos, reviews, ratings, restaurants and address based maps our project was almost ready to go just before the confidence workshop.

I was happy about this week’s learning curve even though I missed some major parts which were FB authorisation, image loading to DB and Amazon S3 cloud server usage. The setback of working as a group and not doing extensive code-review is not being able to learn every step of the project. We added this comment to our weekly review. When I was working with Stephan on dropping the pin on the exact location of the place, we couldn’t make the association between JS, rails and erb which made me quite frustrated. I should push myself to be more positive in the event of struggle and maybe give breaks to start with a fresh mind. With this we finished another busy and enjoyable week! Our weekend challenge is Instagram Clone which we’ll build a clone of it by using the techniques we learned this week. I’m really looking forward for this!

Week 7 – 2nd Group Project!

In my last post I forgot to mention the graduation of the seniors on 16 September. We excitedly watched their idea brainstorming and gathering in teams 2 weeks ago. Also watched their busy times for 2 weeks (weeks 10 & 11). The graduation was motivating however less frightening this time. When I watched the May cohort’s graduation, I was really amazed about the projects they produced. Anyways, the guys had projects like Flare (location sharing app), Quizbuzz (multiplayer quiz game), 3D animation game and a couple more. Good job guyz! Later on we had our usual Friday gathering and visited Culpepper 😉

dsc_4428It’s worth to mention that the schedule of the course had changed. Hiring week was at week 12 however a non-busy week after the intense period of graduation was not very exciting. Also all the tips, tricks, cv preparation, meetup following during the last week was not very productive, imho. They decided to spread the week to 6 weeks with weekly workshops with Zara. Tech-tests will happen at weeks 10-11 hence we’ll have more time for refreshments. Good idea! We’ll also have Jamboree (Makerthon) on week 9.

After a busy week I had a relatively lazy weekend mostly focusing on MEN (Mongoose, Express and Node.js) set up and tried to set-up the server myself. I decided to do it instead of bowling challenge since this sounded more professional life oriented.

Dan informed us that Week 7 would be optional, meaning that you can work with pairs or groups – based on the cohort and individual decision – almost all of us favoured against the group work. The week started with live shuffling of the groups and my group members were Rosie, Ewan and Andrea.

The task for the group were 2 applications; 1 page note app and news app without using any framework which meant that we had to write our testing framework, JS library as jQuery and AJAX, etc. You may say that it’s a bit useless considering that they have been already produced and being used extensively. However it’s a good way of going back to the roots and have a deep understanding about the foundation.

dsc_4426

First day was basic discussion about the technical approach and tests. Instead of unit test, we focused on writing feature test in which we were successful. However we were confused about writing unit test and called it a day. On day 2 Andrea was missing due to her illness. We worked as 3 and started over from scratch managing to collect data from input however it was quite tricky to add them as a separate list item each time the submit button was pressed. We noticed the vanilla JS methods of revising HTML with appendChild and createElement. We also split the entry’s 20 letters as a summary of it and managed to add the summary of the note successfully as an a href element below the text box. Quite writing a library from scratch…

Finally we managed to access our list items and toggled the visibility of the text box div, summary div and full note div on Day 4 and mostly focused on the styling which was really basic. I was happy about our achievement due to less amount of members and sickness issues. Friday we started to work on the news app which was quite similar the note app foundation. We used Guardian’s API to collect data with our pure JS .get method and managed to list summaries and collect the longer version. We managed to list the 10 stories and also added the long versions in a separate div. However our time was not enough to store them aesthetically and finish the page properly :/ We did stand-up and retro along with usage of big screen. One of our main lacking issues was not using any project management tools. Overall I had a lot of fun with lots of new learnings for a single page app and got better in working in a group.

jack-captured-our-serious-coding-moment

At the retro we reviewed our last week where Dan emphasised that group work was not obligatory and people who don’t feel comfortable should select to work in pairs. The advantage of pair working is to touch each element of the project personally even though you may not achieve a great result. Considering that learning is the main priority, this is a good idea… Later on we had intercohort gathering with September cohort. Those guys are really crowded and we had some problems to get used to their number considering that July cohort was only 22 people! It was a nice night with lots of ping pong, Guess Who and nice drinks!

The weekend challenge was Ruby Refresher with about 41 questions scoping from very easy one method solutions to writing Chris Pine’s 99 bottles song.  I did some of it on Saturday and visited Stephan to help him move his house on Sunday from Mile End to Limehouse Marina. It was a fun and sunny day with nice music playing while riding the boat 🙂 We worked with him a bit and I left to get ready for Monday and week 8 🙂

Week 6 – First group project

After a no-homework weekend our groups were assigned and we started working on our new project; MakersBnB. My team members were Johnny, Peter, Jon and Tim. Peter was aaway on the first day and our debates were about which technologies to use in the project. Considering that we have an understanding of web servers we decided to try Node & Express. In order to make it more challenging we agreed on trying a non-relational database; MongoDB and it’s ORM Mongoose. Our decision of using Mongoose was affected by it’s ORM to be consistent with JavaScript as well 🙂 Later in the week I noticed that we actually used single Node since we didn’t utilize the Express & Express Generator. I noticed this when we were trying to separate controller to partials 🙂 Our testing framework was Mocha and Zombie, the headless browser. We learned how to write tests in a different framework than RSpec and Jasmine.

2nd day started fast with speedy adaptation of Peter and our acceleration was really fast. The first test was if the user can sign up and have a welcome message on the page with his/her name. It was a quite broad test and was the main challenge for that day. We had to work on sessions, password confirmation, authorisation. After a couple of days we noticed that our approach was not the best one. The thing to be done was to reach MVP and then do the polishing and additions. By this I mean, the other groups focused on simply creating account by signing up and being able to list their place.

3rd day we managed to connect Mongoose with the controller and were able to create users with sign up. Our models were quite OK however since MongoDB were non-relational database (NRDB), connecting different models were not very easy and we were the only group that used a NRDB. The main advantage of NRDB is the ease of handling huge amounts of data however our system would consist of only 10 or max 20 entries. We decided to take a challenge and it was a challenge. We focused on learning the new approach and managed to approach the models with repeating one-to-many connections.

We used BCrypt for authorisation and for sessions we used below approach:

User.findOne({’email’: req.body.email}, function(err,user){
req.session.user = user;
req.session.save();

Also in order to use the sessions in all pages we used res.locals as below:

app.use(function(req,res,next){
res.locals.currentUser = req.session.user;
next();
});

On day 4 we were able to create listings under user accounts and make bookings however our approach was again quite complex. We decided to make the place availability and booking duration as range. This bore problems since one of the user stories was not being able to book a place if there was a confirmed booking. We were not able to search for both given dates and the query of a confirmed place was another major challenge. I’m sure that’s DOABLE however than a decision was given to just query for 1 day of booking in any given listing and if that’s confirmed by the owner all other booking requests (same of different day) would be automatically cancelled. This was a simpler approach and it worked with the thick & fat code of Peter.

Friday was quite a relaxed date considering that there was the graduation of July cohort and we managed to work only until 2-3. We made a basic styling with Bootstrap (made on day 4 I guess) and addition of a welcome page image was done. As I said, we worked on splitting the app.js to it’s related models however as I mentioned earlier, we didn’t set our project with Express and we had issues about split.

Overall it was a massive learning for us and others in the cohort. As a wrap up for our group I can say below:
-We utilised Trello & Waffle in days 1 & 2 and later on gave up using
-We had strong members however contribution was not equal and people’s drive speed was not very consistent
-We didn’t do sufficient code reviews & mob coding
-Mostly focused to finishing instead of learning as a group
-Didn’t give enough feedback

Dan asked us what would our preference be for the next week between pairing & group work. Almost all of us selected working as a group. I also didn’t touch much of remaining Bowling Challenge and decided to set up Node.js & Express server on my own. It was a good reminder but time was not enough to finish all 🙂

Week 5 – JavaScript!!! ;

It was not easy not pleasant my friends… After Ruby, Javascript was like a language from another universe… It was like a constant nightmare in which “.this” and “;”s are chasing you along with their best friends “{” and “}”. It took about 2 days to get used to the syntax.

We had some workshops like “this” and “constructor” workshops also we re-visited fizbuzz and airport challenge by using JavaScript. After them JS started to make some sense… This week’s project was Thermostat. We used JavaScript, jQuery, AJAX (with JSON and API support), basic HTML,CSS and again Heroku. To be honest, I liked JavaScript and especially jQuery where it lets you to do almost everything you can think of. It was a big explanation of miracle when I learned about API’s, JSON and using them with $.get and $.post properties of AJAX. It definitely more sense how we are able to do major tasks without reloading the whole page such as Twitter’s new twits, Google’s auto-search property and reloading the inbox…

JavaScript doesn’t have direct distinction of Class, Object and Methods as almost everything is an Object and Objects (say, functions) can create objects. There are callback functions and promises which I still am not an expert of. Not but not least it is working asynchronously which can be used extremely efficiently causing the system to run while the program was busy processing the first part of the code.

My pairs of 5th week with Matt, Jonathan, Thao, Rosie and Joe (respectively). We managed to understand and achieve some stuff with Jon mostly for airplane challenge and entry parts of thermostat and it was a quite good and productive day with Rosie focusing mostly on AJAX, JSON and API. However at the end of the week my thermometer still didn’t have a persistence since we didn’t connect it with a database or a cloud service. We had a chance to play with CSS and the page design. Out implementation was a range bar which acted as increase and decrease buttons while changing the colour of the temperature output.

The weekend challenge was the Bowling Challenge which will last for 2 weekends. Unfortunately again that the person in the house that was leaving (whose room that I relocate to) gave a big dinner with huge preparation process. It lasted pretty long and I had to attend it until the end. It killed almost all of my weekend and I had a brief time to study on the weekend challenge. Priorities are surely changed for the remaining 7 weeks!

Week 4 – Ruby & Database &Sinatra interaction!

We did our code review for the RPS game and it was working great with almost zero amount of design. I’d really like to design the actual page but apparently I need a good designer eye and if not deep, good understanding of CSS and UI. The foundation and the backend part was quite good so I was not unsatisfied at all. We had to use helpers and hash keys instead of if else trees. This was the main issue of the challenge.

My pairs for week 4 were Andrea, James Stonehill, Lawrence, Tam and Johnny. During that week we dig into Databases, posgresql, tables (property columns and rows), primary and foreign keys, CRUD (Create, Read, Update and Destroy), DataMapper, ink model, creating a modular Sinatra App, DatabaseCleaner, test & development environments, deploying the app the Heroku and migrating the Database, one to many & many to many relationships, email verification, password confirmation, securing the password with BCrypt, hash keys and salts, authorisation and refactoring of controller based on the models. I couldn’t do password recovery and mail token unfortunately. When doing a retrospective like this it seems that we really cover a lot with this Bookmark Manager project.

I think the most important ones were having persistence of data (posgresql), BCrypt and authorisation, RSpec testing with different environments (DBs), Capybara and Database Cleaner. This way we managed to make Ruby talk with another database with ORM! It’s quite easy to write while I’m on week 6 however it was not very easy to understand all these subjects at all.

The Database we used was SQL and relational which is quite understandable. The psql language was also pretty straightforward. Having the web page to do tasks in the database with POST & GET requests is the real magic!

We have more more to come. such a nice time I’m having! As a side note, I’m not sure about the exact date but the seniors had their brainstorming for their graduation projects either that Monday or the previous Friday and had about 2 weeks to design, produce and deploy them!

The weekend challenge was the Chitter which is actually a Twitter clone but more basic with less properties. I was a bit unsatisfied with my weekend challenge performance since I had a very close friend as a guest until Saturday evening and had to move to Shepherd’s Bush from Lewisham on Sunday. Starting the project on Sunday afternoon was not the best thing and I had really a lot of pressure on me… Chitter was actually very similar to BM Manager. However with such a short time, I made some errors and their accumulation accompanied with neglected tests didn’t result quite well. In the end I managed to finish the project however the base of the challenge was again from the seniors’ githubs…

Week 3 revisited!

I forgot to underline that during week 3 we used Sinatra and turned our laptops to servers. By this, we saw Ruby on the Internet for the first time and moved to Online from Offline! Having few clicks handling the terminal was quite awesome. The weeks challenge was the Battle where there are 2 characters fighting each other. Their names were assigned by the user on the homepage and after that by turn P1 attacked P2. Characters had their hp’s as constants and if one of the characters’s hp reaches to 0, the game is lost. Some people made their game really fancy with images and effects. Me and my pairs simply made the MVP (minimum viable product) which solidly did what it has to do without any or miserable aesthetical touch…

As a side note, we used Ruby as a Sinatra server with `ruby app.rb` through the command line. The issue with that is you have to reboot your server if you made any change to your code. However there are cool gems such as shotgun and rackup which lets you to implement your changes without a need for rebooting.

During the weekend I visited my dear MA friend, Stephan at his narrow boat! As a rule all canal boats have to move within a direct route every 2 weeks and I was lucky enough to help him during his lovely journey. After doing mostly digital work, some labour was quite a change and really fun. How could I know that the opening and closing of the locks of the British Canal System was foreshadowing the Database week! We discussed a bit of our weekend challenge after a lovely breakfast. The challenge was to code a Rock, Paper and Scissors interactive game. The player enters his name during log in and for each turn selects a weapon where computer’s selection is completely random. During code review I saw some people make games of X rounds or AI opponents which have different tendencies for each weapon. Also there were bonus questions such as multiplayer and an advanced version of the game with 5 weapons. The trick of the challenge was to implement the logic of the game with a detailed hash instead of extremely long if else statements.

The weekend challenges are a good way to comprehend and implement the skills that we learned during the week. The main issue is to do it alone as much as you can and see your limits. You don’t have to completely finish the challenge and do the bonus tasks. However it’s for your own benefit if you do it!

The major wins of this week was the learn params[;], switching turns, controllers (app.rb, redirects, GET and POST methods), Capybara, Selenium browser and feature tests! Feature test is a bit different than unit test with which you can mimic a user and simply browse in the browser filling the forms, clicking buttons and links 🙂 They can show you if your system is working for a user/customer on client side however they are expensive and slow.

I’m aware that my blog posts are quite boring and highly personal. I really would like to have a blog when I was travelling South America and tell jaw dropping stories… To make this more readable, I should add some pics and funny anectodes to my posts or cut them short!  I’ll have a separate post for Week 4 🙂

Week 3 of MA – Started to understand what’s going on around!

So, time for a review of what we did on the 2nd weekend challenge and 3rd week… Ah, almost forgot to mention that today was the first day that I come to MA with bike from Lewisham. I thought it would be hard but the day evolved to a harder version of that 🙂 That day I did yoga and went to a room viewing at Stoke Newington which added almost 1 hour to my already 70 mins ride (35 mins each way). But I was sooooo happy since I don’t spend money, do some physical activity plus a fresh start to the day 🙂

Takeaway challenge was not very hard after the Oystercard challenge during the week. You simply need to create an object (Menu Class) within another object(Takeaway/Restaurant Class)  when initialising it and have the order as a separate class. I had to check how this separation was done from some senior’s githubs. With this little help,  I got the main idea it was quite fun and easy to code it afterall. But I should rely more to my code instead of getting the info from others or walkthroughs. Code review was fun and not too hard.

We were with Ewan on Tuesday after the bank holiday. Unfortunately we couldn’t play much table tennis. This week’s curriculum has “Intro to web” and we started with very basic HTTP, client & server training. We had quite brief info session with Dan about http status code, GET & POST methods. Then we started with running a Sinatra server following the walkthroughs. the day was quite basic and ended quite fast.

Wednesday’s pair was Abigail. We started working on the Battle and it was a really productive day. The sleep meditation was lovely as well. My biological clock starts to get used to the events in MA; each day meditation at 2Pm, sleep meditation on Wednesday’s and Yoga on Tuesday & Thursday at 5pm.

Thursday I was with Peter and we were dealing with class methods. I was still having problems about them until I read this blog for the 3rd time during a week and understood the difference between a class method and object method – or I suppose I understood. The difference between them are described below:

class Foo
  def self.bar
    puts 'class method'
  end
  
  def baz
    puts 'instance method'
  end
end

Foo.bar # => "class method"
Foo.baz # => NoMethodError: undefined method ‘baz’ for Foo:Class

Foo.new.baz # => instance method
Foo.new.bar # => NoMethodError: undefined method ‘bar’ for #<Foo:0x1e820>

It can be seen that if you try to call a method class method on an instance or an instance method on a Class you get undefined method errors…

Yep, the day with Peter was OK as well. We did the params and sessions. And I joined the yoga as usual. We were stuck on the user switching part of the challenge and called it a day.

Ben was my pair for Friday. He was with Tom and they managed to finish the week’s challenge (what a surprise !). I expected some guidance from him however we were stuck on the switching turns part for about 3-4 hours. We managed to come to chapter 28/30 however I again couldn’t see the end of a challenge… The best part was that with James we organised a gathering after the course and it was a blast. I felt so so happy! Beers, music, peeps and ping pong – a great combination. Later on we went to the nearest pub and continued there. As a cohort, our ice was totally melt and I was smiling all the time 😉

The 3rd weekend challenge and 4th week is TBC 🙂