Monday, 21 August 2017

Makers Week Three: Scissors, Paper, Rock!


I just finished up my hipster haircut to make me even more "Shoreditch" and while waiting I whipped out my laptop tried to do some coding. Its so cool that you can do this and it makes any queuing that involves the ability to sit a pleasure. I am a Brit after all which means I'm very good at queuing, and this just adds more to that skill.

Shoreditch hipster art stuff and dat

Today we were checking out something for Ruby called Flog. Gem install it and run "flog --g --a [folder you want]" and get your code ranked! We're looking around 15 or less for classes, and under 6 per functions. Newbies should go for 30/10. As you can see my takeaway code did not do so well lol. A big sign of this is that the code is so much bigger in this class then any other.

The main reason we want this is to allow testing to be more efficient, as one change wont be effecting tons of other tests. Its cool to see this represented somehow, its pretty easy to go nuts when making something and not think about good practices.


Last week went by quickly. Much more complexity was added to our learning as HTML,  and another testing framework called Capybara was thrown in. We learned about the server/client relationship and our week task was to make a web app Pokemon style. 

With complexity ramping up, so does my diagramming!

Unfortunately, I think I was way too casual that week and ended up spending four days setting everything out, then freaking out about not having enough time left. I barely got to the bit where we type in your name.

This freakout was mainly because I had discovered from the students above us that we would be trying to make Rock, Paper, Scissors as a webapp and I knew I hadn't enough knowledge to do this.

The weekend challenge was indeed this, and I had to spend some time looking through the week challenge to work out what to do. In the end, ran out of time. 

Lesson learned. Lets not do that. Especially when we will be getting more things thrown at us at an exponential rate, its really bad to fall behind. Reminds me of missing a few Math AS Level lessons back in the day, when you finally do turn up you are completely lost.

Important to let off some steam with some table tennis madness!


Today our coach showed us that she knows her shit by doing our weekend challenge in an hour. It was an amazing sight to see how she worked and how a pro developer builds a program from scratch.

Maybe out of pure boredom and/or genius she threw a curveball at us. This for me highlighted how code can extend problem solving into the realms of thinking out of the box.

So a traditional way of making this game would have the following steps;
  1. Input your name
  2. Input your choice
  3. Make the computer randomly choose. ["Rock", "Paper", "Scissors"].sample. Sample randomly picks from our list here. 
  4. Compare your choice and the computer's and print out the result.
But in true and totally unnecessary form our coach did this;
  1.  Input your name
  2.  Input your choice
  3.  ["You win!", "You lose!", "Its a draw!"].sample
  4.  Computer makes the result a reality by choosing the relevant option.
This kind of backwards way of thinking really shows how solving problems can be just as effective by giving the illusion that it does what we want when it might not. 

Like why not pick the outcome first? Who says we cant? Maybe this is how gambling sites work to make sure that they get the correct probabilities that they say they have.

Anyways I thought this was a cool thing that she did, I never really thought about doing it in that way. Oh and of course, every step was done with TDD testing all the way.

This week we are going to be working on using a database in a webapp, seems pretty heavy. Should be some interesting stuff... Until next week, have a great week dudes!

When the cat says no coding allowed...

Monday, 14 August 2017

Makers Week Two: God of Cookery Takeaway


So week 2 is done.

So far our projects have been making programs on London Bikes, Airports, and Oystercards. Really seems like the guy who designed them for the course really needs a holiday!

When we say programs its not the polished snazzy looking ones you have on your computer. They are things you run in a terminal with only words to show for your efforts and it they look like they have been made in 1986. I will show you down below...

Learning everyday with classmates that want to improve creates an amazing environment. There is a real sense of camaraderie in our group. With these boot camps and the industry as a whole, it feels quite likely that most people will be introverted, but our group is outgoing and has brought those to come out of their shell.


One of the most recent things that I have found out about myself is my style of learning. Finding a lot of examples and wanting documentation seems second nature to me. But I hadn't thought about the quality of learning I am doing by doing this constantly.

When I do this and find an answer to what I want, am I really understanding fully what is going on? Maybe not so, and even worse because of this I may think I am.

My amazing coach is teaching me to be more thorough (which means frustratingly slower) with my learning. We have extra walkthroughs with our projects that give us more literal answers and we are encouraged not to use them, which is really difficult!

Questions to her adhere strictly to her belief of process orientated learning. This is very hard to do when providing a straight answer is easy and satisfying, but in the short run it achieves less. Asking her questions can be frustrating but I understand and appreciate this style of teaching, and am convinced that this what teaching should be.

Asking questions to her will result in the following things happening;

  • A question will be asked back, to make us think more deeply about the problem and possibly the solution.
  • The question will be reworded to make it clearer on the intent.
  • The question will be deemed irrelevant or inconsequential.
  • If it is deemed worthy of a straight answer, one will be given.
Currently I feel a bit lost, because since learning coding my process has always had a "do more exercises" mentality. This must change to a more methodical approach. It seems overwhelming as there is so much to learn.

My coach looks a bit like Daria, but much more upbeat and funnier!


Every weekend we are set a weekend challenge. This weekend we had to design a takeaway that has a menu, allows for selection and then sends a text to confirm the order! Its cool to have the code do a "real-life-thing"!

My takeaway is inspired by Stephan Chow's movie God of Cookery. He is famous for making the satirical football movie "Shoalin Soccer". In the movie he is a corrupt food critic that meets his end to his career, then becomes a monk to find his inner chef!  Sounds ridiculous? Oh it is, and that's what makes it good. Not that I'm for promoting this kinda thing but youtube might have the whole movie up there...

The food in the movie is super high quality, literally God-like standard so if you wanna buy a dish from my takeaway you'd better have a lot of dosh! 

Here's my program in action!

First we will be using the terminal to run our thing. Ruby should come with macs by default. You can type in IRB and that will open up a sandbox that you can play around with. Here I am using an alternative called Pry. It has extra features and its more colourful so its better for showing.

Once we're in, first thing we do is require our files. This is necessary to load everything up. Once they're "true", we activate the program by making a new takeaway. Here we call the new takeaway, "takeaway", but it can be any other name.

Next thing we do is find out what other functions there are. We do this by typing takeaway.header. 

Header outputs these other options. We can activate them by typing takeaway.[function]. Note that if we used another name other then takeaway, we would use that name dot function.

Lets see the menu;

Cheap right? The Buddha Jumping Wall is half price this week! Lets order some stuff...

Notice that in the header function the choose_dish function has brackets. We can pass arguments into those brackets and here they represent the dish number, and the quantity.

Right, lets checkout. That should be enough food.

So like the choose_dish function, we have some arguments to pass in. These represent two codes we were given by Twilio to link them up with our program, and the third one is our phone number.

Here I've hidden my code a bit. Point being that manually having to input these codes make sure that when we upload our project to github we don't give all our details away there too! We could totally hard code these in and not need to have a user input.

And voila! We get a text with our order. Note the time in our message is delayed by one hour.

This project was really cool because it had this at the end which interacted with our real phones! The code for this project is here if you are interested, I wont explain it for now. Its pretty awesome that I've come this far that I can do this without much help. It was also cool seeing my fellow cohorts manage to do it too and its interesting to check out the variations we have.

Week 3 looks like its something different, moving onto making a web app this week. Should be good, I'll keep you posted next Monday, happy codings ppl!

Monday, 7 August 2017

Makers Week One: Everything Expected & Moar


Probs gonna be a short one today, I'm pretty tired but its Monday which means blog I must!

Its been an exhilaratingly stressful awesomely frustrating week. Weird combination of adjectives? Yep! One up, one down. Except the downs are good too.

One of the first things emphasized by our amazing coach was that the process of learning was what it was all about. The completion of the tasks was not the priority. This might seem strange to the traditional way of learning with grades and exams,  but 20 previous cohorts with a 90% employment success rate says otherwise.

Its nice to be in an environment of learning showing us first hand of eduction should really be like. My fellow cohorteers are really awesome amazing people. From moving to a new country to do this, a fresh graduate, stock broker, bankers, ex start-up owners, accountants, working in Vietnam as a westerner,  and an ex poker player... the list goes on. Amazing stories, and amazing openness to accepting the knowledge that Makers is giving us.

Nothing distracting in this high-octane learning environment. NOTHING!

On top of the skills we learn off our coach, Makers also takes care of our mind and body well being as well. The oddly (but probably coolest) titled "Joy Coach" of Makers meet every day for some meditation and occasional yoga. It is important that she knows no coding whatsoever. Both things I would never do, but I am trying many things out now. At worse its a nice very light calming mid afternoon nap to keep us going.


Much of the Makers course is influenced by researched methods of learning, much from the infamous Google "new age" way of working. Freedom to set our own times is pretty abundant here, we have a schedule for workshops and activities but nothing is strictly set. As long as we attend and try and complete the weekly task then its ok, we're all adults here.

Jokes on YOU we're using Ruby we don't have em  BRAH!

There is a lot of research to suggest the benefits of pairing. Pairing is where you code with one other person. In our instance, we are given a weekly task to do and we work on it changing partners everyday.

There are quite a number of benefits to doing it this way;
  • If you zoom ahead then the next day you will have to help your partner catch up which means plenty of explaining of what you did. This is great for the guy who is behind to learn, and great for the ahead guy who has to explain things which is great for clarity.
  • You see different styles of coding, thinking, working. You can learn off each other and improve bits here and there.
  • Its good bonding time, and makes coding social! (Wow!)
However, I do wonder outside of a bigger group that can swap around like this if its that good. The swapping kinda evens out the skill level overall so it benefits everyone. But if there is a pairing where one is a lot more advanced, it is hard to not be intimidated and/or take the back seat on things.


I talked some last week about finding about this horrible thing called TDD. Test Driven Development was something that is an industry standard way of developing something methodically.

As I love to make things, and am impatiently so, as the title says this doubles the time it takes to create something because you are creating a test and then testing each step of the way.

Like I said before, the syntax is rather different to what we have been learning so far which is rough. Our coach said that it feels bad as our coding is at a certain hight level, and TDD is super low, so the gap is big. Strangely enough it seems bigger for me as I have previous coding experience!

But maybe one day I will love it. I doubt it, but who knows? I'm here now innit!

I'm interested to see how my motivation keeps up during these weeks. Its fair to say that since starting this year, my motivation has probably dwelled like 2 times, both mainly because I finished my youtube notetaking and basically didn't know what to do. Here is an interesting video by MPJ who is a developer for Spotify talking about motivation (whilst getting lost?).

Hmmm this was "short" eh? lol. Talk to u guys next Monday, have a fantastic week!

Monday, 31 July 2017

Day One Makers Academy - And We're Live!

So yeah I know I blogged yesterday but here's the thing...

I said I'd blog every Monday, and its Monday, so I'm blogging. Makes sense? Ok.

Yeah but in all seriousness I did it as more of a milestone celebratory blog because I had finished the 4 week pre-course. Another reason was to give a more detailed insight to potential applicants that are thinking about applying.

But yeah, Monday! Mondays mainly because I expect that we will be given weekend challenges so in theory I can have a bit of extra time to blog and reflect.

So day 1 was everything I expected and more...


The night before I would say I was caught in an infinite loop which ultimately crashed my computer. This where the computer is me trying to sleep and the loop is me knowing I need to sleep, but that that anxiety of knowing this is making my me unable to sleep.

Its cool I got there in the end. I got a solid 3 hours wooo!

This first week I will be commuting from my magic land of roundabouts called Milton Keynes to London. FYI I am very good at driving around roundabouts btw. The journey takes around 90 mins from the station give or take.

I wanna know how much cheaper it will be to commute and go to work like a normal person, but also see how exhausting it will be. I have a place to stay in London for the 2nd week so it will be interesting to compare.

Just a word about English weather. As an ex poker player, it is to my shame that the English weather is actually an amazing bluffer. When I think its cold, freaking crazy heat! Oh, the sun is out? Cool, just T-shirt needed, and of course a bloody monsoon tears down! It doesn't help that in UK its not really financially worth it for places to have A/C everywhere, so its actually hotter than in Asia in some ways. Either way, you got me again you bastard... as I had extra weight in my bag of my jumper and coat!

Meeting the cohort dudes was awesome. Everyone is in the same process orientated mindset which makes it an amazing environment for learning. It was great to see familiar faces from the meets, and the new faces as well.

I have been trying to get onto a course like this for a few months now,  and I'm relieved that its started. Less coding by myself everyday and more collaboration and like interacting with real human beings!

One thing that really stood out to me was not just our amazingly casual and funny teacher, but also the depth of the course. It wasn't just about coding, but also had things for our mind and body wellbeing. Maybe the only job titled "Chief Joy Officer" in the UK, Dana is there to look after students wellbeing and teach emotional intelligence.

Yoga is happening every other  day and medition is daily. My Britishness automatically makes me wanna bail out, but fuck it I'm all in, and I ain't going back.

This is course for the long term. We're not just improving the technical, but our minds, our bodies, and giving us a process to maintain it afterwards too. Help us learn to help ourselves. It was very inspiring. Makers doesn't have this kind of reputation for nothing.

But that is just Day 1!!


The last week of the pre-course brought in something that really threw me aback. 

There I was pretty happy with my learning so far and then suddenly out of nowhere it seems this entirely different foreign thing invades my confidence like a million dollar battle scene in Game of Thrones.

Test Driven Development is something that is used to test out if your program is working or not. It is written by the developers themselves most of the time to give some structure to building their program systematically. I have never heard of this before, maybe it was because I was, and am so focused on the making.

In complete timing coincidence, I'll let Tom Scott talk about fizzbuzz in his freshly newly released video;

We made our fizzbuzz code;

But we're still noob so we're gonna still use our repetitive code for now...

Then we use something called RSpec to test our Ruby code;

So here we wrote 4 tests, if we enter 3 (fizz), 5 (buzz), 15 (fizzbuzz) or 4 (don't change anything).

Hopefully this isn't wrong lol. So what's wrong with this?

Well, its all so foreign. So far I don't think we've used "describe" or "do" or "expect" or the method ".to eq", of which that isn't underscored like "to_s"(convert to a string) above. On top of that, there is do/end which is the same structure as a loop, but it only runs once? I try to avoid using do/end loops because I find I end up getting confused about where/how many "ends" there are/go.

But the struggle is all part of the process I guess. It will all come in due time. After all, this is one of the main reasons why I want to do the course, it is guiding me in the right directions needed. Learning by myself, I wonder how long it would have been before I knew what TDD was?

Ok, I've written War and Peace again. Time to sleep. Til next week...

Sunday, 30 July 2017

The Makers Academy Pre-Course

I've been on quite a hiatus, I'm announcing that I've joined Makers Academy, London! Actually, I had gotten in month ago, and tomorrow my course starts for real on site. Such a sudden announcement though innit!

Despite the price, I think this is exactly what I want in terms of moving forward towards being a developer. It seems the community are divided on their opinion about boot camps.

One side says that you can learn everything yourself without needing to spend that much money, and the other side say that they are great for accelerating learning, helps push students in useful directions and has great community support.

The problem with these arguments is that there is no right answer. And in a community of super clever people they hate that. Smart people love being right, and hate it when things are not black and white. Everyone is different, so different things will suit different people. "Tomato, tomato!". Oh wait, that doesn't work in text form...

So if your thinking about joining as well, I hope that this will help you make your choice. I will talk about the pre-course process and things to consider. I'll try to be as informative as possible but again I don't want to reveal everything as it will have to involve me putting big #SPOILER ALERT everywhere and we don't want that do we?

There is more information on their youtube channel as well if your interested.

Just a quick word about GoCode Academy.  I will blog about this in more depth later, but basically they had a bootcamp in Milton Keynes which is more local and substantially cheaper. This was due to start in July, but ended up being delayed so I decided to pursue Makers Academy and see how I felt about it.


I had two, I know some other students had more.

The Pre-Interview Interview

After filling out the application form, I was contacted within the week to join a google hangouts interview session.  I was interviewed with two other applicants, one was for the remote course, and the other starting later on. We basically introduced ourselves, talked about our backgrounds and our motivation for learning coding and wanting to do the course.

It was pretty informal just like a chat. The interviewer Ollie was very welcoming. I have a feeling that this is the first "filter" step that is taken to see if you are a fit for the course.

After the interview you will be sent an email if you pass through to the next stage. It will contain links to homework which will involve you completing an online course on learning Ruby. You are required to schedule another interview to review your work.

Because I was still unsure about Makers at this point, I scheduled my interview for 10 days time. The logic was that I wanted to go there and have a look around, ask questions and get a feel for the place.
The downside was that I didn't give myself much time to complete the online course! I did so anyways, so it all worked out.

On site upstairs at Makers

The Interview Test 

You can do a remote interview as an option but I chose to go in.  A word of warning, make sure you go to Commercial Street, and not Commercial Road! I was pretty lucky that they were quite close together so I managed to get there in time lol.

After settling in we talked about my background and motivations for doing the course. I was asked some problem solving questions, and I solved an online exercise with Ollie's help in which he helped as much as possible without giving me the answer, which is a tough balance especially when you see someone struggling!

But the struggle was good, and I showed my process and genuine enthusiasm as I had learned something new. I had also brought my huge notebook that I have filled up with coding notes since the beginning of the year. Document your work for this exact reason! I already knew I should do this when I started.

Once the interview was over, I had a mini tour and asked some questions. The location is pretty small, but cosy. There is a kitchen and a table tennis table on the 2nd floor, and the 3rd floor is filled with computers.

I was sent an email the very next day to say that I had been accepted. Once accepted,  more emails will arrive about payment, setting up your computer, and the pre-course.

A nice handwritten welcome! Its not all digital


Officially I am in the July cohort, we actually started 4 weeks ago. This is because we have been doing the Pre-Course course, to prepare us before the "real thing" live!

Since January I have spent my days studying at home, so this was not that much different. We were given tasks to complete online each week and upload them to Github. We learned that the terminal can do a huge amount of things,  built our own mini program, explored some testing, and revamped our CVs.

Socially, I've tried to meet up with my fellow cohorts a few times and pair together. Pairing is where you spend time collaborating with another coder to achieve a goal and/or learn off each other. We also have our own online messaging group using Slack. It seems that this is the community's choice of software, as my friend in NY who is a developer uses it for work too.

One of my fave places to meet with the other students was Qbic Hotel near Algate. Tons of plugs and wifi, and also interesting lamp covers allow for hilarious perspective photographs!

I've found my fellow cohorts to be pretty amazing people. Most had successful careers and decided to change it up. Everyone so far has the same thirst for learning and are really up for the weeks ahead. It is quite intimidating to be in their presence, each one with their personal journeys and wealth of their experiences, all converging to this point.

Its nice to be in this together for once. All of us at one point missing a single full stop in our code and spending hours with frustration trying to figure out what is wrong! All of us elated at completing a Codewars challenge. All of us being wide eyed as we learn new and cool things everyday.

We continue learning Ruby, and then testing ourselves by ranking up on Codewars.  I am very grateful that I learned some Javascript already, because a lot of the concepts are already engrained in my mind which makes it a lot easier. For a lot of my fellow cohort members, this is their first coding language and I cant imagine how much more difficult it is with the amount of information they have to take in!


This is some things that I would advise for you if you want to increase your chances of getting in;
  • Start Learning To Code NOW! -  Check out my previous post on how to get started. The fact that I have *some* experience with a language even if it isn't Ruby has helped me a ton. It is very unlikely that any teaching received do will have a lot of  "hand-holding" like during the school years, so its important to show that you are able to do independent learning.
  • Document It - For the love of god make sure you document your learning! Do it with notes or maybe an online document, make sure there are dates on it. Get a Github account and learn how to use it. Push some self initiated projects there. You wanna have something to show for your work, and later on down the line this will be good to show to potential employers. Think for the future! 

  • Find Your System - Work out good system of learning that works for you and enjoy it. Whether it be using books, videos or online courses, make sure you have that open mindset of always working on improving and learning.
  • Try To Be Social - Try to get involved with the community. It might be hard. But try anyways. Visit Makers or General Assembly, talk to some people. It can be really easy for this to turn into an isolating situation, but it doesn't have to be.
That's all I have for now, maybe I will add some more if I think of anymore. Feel free to ask any questions in the comments.

I know I've posted this before but I love this video, its so inspirational and I feel like I'm makin' it count!

Sunday, 16 April 2017

Beginner's Guide to Coding, from a Beginner!

Wassup all, its been a while. I normally set myself a task of doing a weekly post just as a challenge and some therapeutic unloading. But right now I'm just chilling with it and not be too strict with it whilst I spend a lot of time learning this stuff...

Four months in, pretty much spending a good 3 hours average every day learning Javascript, I feel like I'm getting somewhere despite it all feeling rather overwhelming. There's no short of [free] resources, but the hard part really is knowing what you wanna learn, what you wanna do with it, and how to move on.

Right now, I have a better idea of what I'm going to do, thanks to an old time friend that I managed to get in contact with, who shared me his journey, and some great advice. So technically its not beginner's advice, but with it travelling through me lets say that counts!


Lets be real. This stuff looks intimidating and hell. All the stereotypes of hackers doing crazy stuff with tons of code and geeking out. A lot of you guys will just say forget it.

But with everything, take bitesize steps. You don't jump straight into the deep end, you learn to swim first, actually you just get in the pool before that! I literally had not done any coding in January, but I've been dedicating some time to learning this stuff, and bit by bit my knowledge increases!

Fortunately, from my previous job, its taught me how I love to study and learn new things, and I know a good system that works for me. Whether you wanna go hardcore 8 hours a day, or just an hour or 2 when you have some free time, its totally worth spending it learning.

Your aim when you start is to learn one programming language to a sufficient level, to not just be able to "make stuff", but allow yourself to understand the logic and structure of it, so that it help you can learn other languages later.

The only argument I've heard for teaching latin, is that it is a language which helps you understand the format and structure of other languages. This means that even if the language you've learned is redundant, it is still very helpful for this reason.

After some extensive research from my go to adviser named Google, the best languages to start out with are Python, Javascript, Java, and C++. In all seriousness though, one of the biggest reasons to choose these is the fact that there is a ton of online resources for them.

With so man languages out there, its hard to know which one to choose.


Ok, so I basically started because of Shiffman's Coding Train. For me his channel really stood out to me as an attempt to be very beginner friendly, and more importantly... fun!

My beef with other coding YouTubers is that holy crap some are so boring and basically assume the watcher's [more than often advanced] level. However YouTube's greatness is that it can cater to niches, but in doing that you leave out a whole demographic audience. Each to their own tho!

There are a few places which offer free courses, with optional paid ones too. The best thing about these places is that you don't need to download any coding software, you can write the code straight into the browser and learn from there!

Hello Processing - A great introduction for someone starting from complete scratch!

Coding Train - Daniel Shiffman's channel, has a ton of introductory videos and coding challenges ranging from coding Snake and Flappy Bird, to Maze Generators and Pathfinders.

Udacity - Online learning resource that has free and paid nano degree courses.

Code Free Camp - Open source free learning website that has great content using a points system for completing exercises and encouraging networking.

Some notables, Kahn Academy and Lynda are good sites as well, but I haven't used them so I cant really say much from about them from my experience.

I also like to watch some YouTubers FunFunFunction which is a more advanced vlog by a developer of Spotify, and SimpleProgrammer which are more advice style vlogs by the founder of PluralSight.


NB - I didn't know that you could use the syntax above as an if statement. I learned this regoing through Udacity's Javascript for beginners free course. First part "Courses" is the variable, "?" is the if question, left of the colons is what happens if true, right of it if false.

Is doing a course a good idea? Well, it seems to be one option if you can afford it because it can be quite expensive, up to £8000 for a 12 week course. Some even advertise the fact that you don't even to have any experience at all but these ones will mostly be a full time intensive course.

One of the most important things in selecting these courses is to make sure they have good support for once you graduate afterwards. That is, help in getting a job afterwards. In NYC I've heard there is a saturation of these courses flying about and some don't offer much support afterwards, so be careful when selecting them. Do some research, look at the reviews.


I had quite an eye opening moment in trying to code Tic Tac Toe, it was clear to me that I didn't actually fully understand a lot of what I had learned. But there's nothing like the experience of going through the motions and creating an idea.

Don't worry so much about "ugly" inefficient code. Do it ugly, repeat lines of code, your learning its ok. Just be aware of it and just try and get the thing to work! That's the more important thing.

You will be stuck a lot, you will google a lot, and asking on forums isn't a bad idea. But take the advice with a grain of salt. Make sure you ask specific questions in your code rather then general ones. For example, why doesn't this line work, rather than how do I code this whole thing?

On the flip side, be aware of the responses that end up telling you what your doing is inefficient, then proceeds to rewrite your whole program for you. That helps no one, I never understand how they expect you to learn by copy and pasting all the code that does what your trying to program. They clearly are only about being right in their one dimensional way without taking into consideration the level of a beginner.

Another reason to do extra side projects is not just the learning you get, but adding things to your portfolio. In the creative industry, and I'd consider programming being part of that, there's nothing that beats an amazing portflolio, showing off the skills that you have.

It also allows you to blow off some steam, explore new ideas and keep your motivation. Google had been famous for its 20% time (rumoured to be abandoned now) which was that their employees had to spend that amount of time not doing Google work, but their own projects. This led to a lot of new products which included gmail, google docs, adsense and google art.

I have a list mini projects I would like to do, which are 30 odd games I'd like to create. Of course I'll be bloggin' about them. The challenge of this blog is to talk about coding but still make it understandable to you guys who don't code. I hope this helps if your interested in getting started, I have a unique position in that I started this year, but have quite some experience with blogging.

Saturday, 25 March 2017

Coding Naughts and Crosses... Underestimated!

3 months in with learning code, the honeymoon period is seriously over. One of the most annoying things about it is learning all the huge amount of information through videos and copying examples, then trying your own stuff and realising that you don't actually understand it at all.

I've been pretty impatient to be honest. I've wanted to get to some "good" stuff, like Zelda/Bomberman top down platforming games, and/or card games like solitaire and big 2. But getting stuck at certain points really stumps your momentum.

This realisation that I've been jumping the gun was when I decided to try and make Naughts and Crosses. "OMG, too EZ", I thought, this will take me a few hours tops.

Dammit, this is harder then I thought! And I've been learning there is a negative attitude towards programmers that what they do is easy.

One of the things that makes coding so important, is the fact that you are solving problems in ways that need you to think differently then what you would expect. Making Naughts and Crosses seems simple but has complexity and needs creative thinking.


Note that I'm using the P5.js library for Javascript. TLDR; my full code is at bottom.

What seems like a pretty simple game gains in complexity as you reach the end. Starting out drawing a board, the X's and O's are quite easy to do. The hard part is putting them within the areas clicked, alternating them, and then eventually have the code work out whether there is 3 in a row of X's and O's, or all the spaces are filled for a draw.

Oh, we also have to make it know if a space has been filled or not.

I started out with making variables of cols and rows, made a loop to draw out the board. Then I did 9 boolean (true or false) expressions for whether the space was filled at all.

Then I added a counter which is 0, 1 or 2, but when its 2 it resets back to 0. After each symbol is in its position 1 is added to the counter.

So we can make an if statement to be like, if the mouse is clicked within position x and y numbers (lets say top left), AND it has counter 1 AND var TL is true, then draw circle there. Since the counter starts at 0, circle is always first. After that it must be 1, which is a cross and so on...

var cols = 3;
var rows = 3;

var TL = true;
var TM = true;
var TR = true;
var ML = true;
var MID = true;
var MR = true;
var BL = true;
var BM = true;
var BR = true;

var counter = 0;

function setup() {
createCanvas(600, 600);

function draw() {
if (counter == 2) {
counter == 0;
result ();

function mouseClicked() {
if (mouseX >= 0 && mouseX <= 200 && mouseY >= 0 && mouseY <= 200 && TL == true) {
if (counter == 0) {
new Naught (0, 0);
if (counter == 0) {
new Cross (0, 0);
TL = false;

... repeat 8 more times with positions adjusted.


After a bit of googling some ideas on how to check if there was a winner/draw, I came across the nostalgic math problem from secondary school (that's high school for u Americans) of Magic Squares!

I could say something like;

If row/column/diagonal = 15... then its a winner!
If numbers of all spots added up = 45 then its a draw!

So I created another variable that gave each position the number of the magic square and voila!

if (oScore + xScore == 45){
   text("Its a draw!", 300, 300);
if (oScore == 15) || if (xScore == 15) {
    text("Its a winner!");

Finished! EZ!

Well... no. This method works, if you get 3 in row straight away, but if you get more then that, ie another turn on the board that isn't part of the row, it will not add up to 15.

The very cool way of using magic squares is quashed. Not so magical after all...


What was needed was a better way of storing the data on each position and whether it had an X or an O in it. What we needed was a 2D array.

An array is a list stored using [ ] symbol. A number in between it represents the position in the list. The lists always start with 0. So [1] would be position 2. Arrays are really useful because they can manipulate lists and can be interchangeable for its purpose. If I programmed a ball, I could put that ball object in an array and have loads of them bouncing all over the place.

So a 2D array, is a list within a list. So for us here, we want an array of 3, and within that 3 we want another 3 for 9 spaces. Array [0] would have another array in it of [0][0]. [0][1]. and [0][2]. That could be the top row. Confused? Good, coz I'm just getting my head round it too.

So we start off by making the list;

var pos = [];
pos[0] = [0, 0, 0];
pos[1] = [0, 0, 0];
pos[2] = [0, 0, 0];

We can already see the way it is written out that it kinda represents its position. 0 = empty, 1 = O, and 2  = X.

I also improved upon the code by using the floor function to find the mouse clicked position. The floor function rounds the number always to the lowest whole number.

The new code for the top left would be like this;

function mouseClicked() {
x = floor(mouseX / 200);
y = floor(mouseY / 200);

if (x == 0 && y == 0 && TL == true) {
if (counter == 0) {
new Naught(-200, -200);
pos[0][0] = 1;
if (counter == 1) {
new Cross(-200, -200);
pos[0][0] = 4;
TL = false;
repeat 8 times adjusted for position...

And my stupidly large code to check winner would be like this;

function result() {
this.x = 300;
this.y = 325;

//[Down][Across] Starting from top left

var topRow = pos[0][0] + pos[0][1] + pos[0][2];
var midRow = pos[1][0] + pos[1][1] + pos[1][2];
var botRow = pos[2][0] + pos[2][1] + pos[2][2];

var leftCol = pos[0][0] + pos[1][0] + pos[2][0];
var midCol = pos[0][1] + pos[1][1] + pos[2][1];
var rightCol = pos[0][2] + pos[1][2] + pos[2][2];

var diagDown = pos[0][0] + pos[1][1] + pos[2][2];
var diagUp = pos[2][0] + pos[1][1] + pos[0][2];

var sumBoard = topRow + midRow + botRow;


if (topRow == 3 || midRow == 3 || botRow == 3 || leftCol == 3 || midCol == 3 || rightCol == 3 || diagUp == 3 || diagDown == 3) {
text("NAUGHTS WIN!", this.x, this.y);

} else if (topRow == 12 || midRow == 12 || botRow == 12 || leftCol == 12 || midCol == 12 || rightCol == 12 || diagUp == 12 || diagDown == 12) {
text("CROSSES WIN!", this.x, this.y);

} else {
if (sumBoard == 21) {
text("ITS A DRAW!", this.x, this.y);


So this mostly works. There are still some issues where you can still continue the game after it has found a winner, I'd like to have some resetting going on.

I also think that I could probably shorten the blank square checking by linking it to my array. Also, a loop looks like in order to help with the hideousness of my code repeated 9 times.

There are multiple ways of coding this game, some are better then others by being more efficient. By efficient, the coding community agrees its the least number of letters possible. But for learning and starting out, that's not always the best way to learn. Dirty code for beginners means they actually finish, whilst others get stuck and possibly give up. Improvements can come later on, as long as one is aware that its dirty, then its ok.

Anyways outdone myself again, just like my code, this blog post exceeds its recommended number of words, happy coding ppl!

Friday, 3 March 2017

Rocket Science!

I followed along in making this program learning about evolving systems that try to complete a goal.

This is from Shiffman Coding Train's Coding Challenge #29.

The rockets start off in random directions, trying to reach the circle. The closer ones evolve their data to the next generation until they reach the circle.

I'd be lying if I said I knew exactly 100% what was going on, but I have an idea. It does get to the point where it feels like sometimes I'm copying the code and its going right through me, but I think its good practice to learn anyways. Another reason would also be that I might remember how this was done and I can refer back to this if I needed to do something similar later on.

One of the biggest problems with learning programming is that there is too much to learn, and its hard to find the right direction to go. There are a ton of different languages and no one knows when one will become obsolete.

Doing a course can help you with finding your way, although it is really important to have portfolio of stuff and not just think that passing it will be enough. Specialising seems like where the money's at and not being a jack of all trades.

Right now I'm interested in making my practice games, the list is so long now, like 30 games lol.

Matter.js looks really interesting so I think I'll be going in that direction for now.

Friday, 17 February 2017

My Pong's so Wrong!


Ok, so here's my first little program that I've tried to do. I decided to choose something easy, with a lot of references to.

Obviously this isn't finished I still have to remove the sides, make the scoring if the ball goes past the paddles, and probably some kinda change in acceleration and/or angle depending on what speed the contact is... if that is how it works, I might have to research it.

Hopefully this works in blogger, I've been trying to find something where I can embed it in so that it would work right here. W and S controls the left paddle, O and L controls the right one. Its super simple I know, but gimmie a break I've just been coding for a month and a half!

Clicking on the </> will show you the code if your interested, how much is needed for such a simple game?


On [electronic] paper this seemed simple enough. Rectangle, Rectangle, Ball, Win. EZ.

However, this was not the case. Motion is quite annoying to deal with, but it was motion + interaction between the objects that killed me omg. Having to make the ball bounce of the paddles was a lot harder then I had realised. 

Basically I broke down my plan like this;
  1. Draw the stuff, paddles and ball.
  2. Make the stuff move, paddles up and down, ball bouncing around.
  3. Have a bunch of IF statements to what would happen when ball hit paddle.
  4. Scoring, spawn new balls, maybe some super old skool retro sounds, and other misc if I want.
  5. PONG!

No.3 took me absolutely ages in my noob mind. First of all, trying to define a bounce area was a huge pain the ass. This is because in order to make the program know that there is intersection happening, it needed a formula;

Middle of ball (radius) co ordinates + Middle of Paddle = Distance between both objects.

If Current distance, which is a constantly changing number because the ball is moving, is less then the above formula, then must be overlapping and therefore intersecting. 

But remember, the paddles are rectangles, so the middle of each of the sides are different, so you needed seperate if statements for x and y co ordinates. Lost? Yeah I was too for like 4 days lol. Basically if the ball came from below or top, the middle of the paddle is way shorter width-wise. So the distance might be way shorter then it should be.

The biggest reason for taking so long was that I used an OR statements instead of AND to check whether it was intersecting the rectangle or not.

Another funny thing was that I decided to have a go at Pong to take a break from the videos. However, the next set of videos was talking about vectors, forces, motion, oscillation etc etc. Basically a whole bunch of shit that would have been super useful, and watching it now I'm seeing how I could have done some things differently, ie better lol.


One of the biggest things I've learned through these videos, is that Object Orientated Programming (OOP) is really important and so I decided to make Pong that way which made it much harder. 

Basically OOP is a way of writing the code which makes it easier to read, but has a lot of groups and referrals back to them. So this allows the main page to have all the actions so to speak, and they refer to the objects which is on another page.

This also allows for easier customisation. For example if I wanted to change the size of the ball or paddles, I just change one number and everything else would still work without needing to go through the whole thing and change up whatever they effected.

If circle is written as "ellipse([draw at location x],[draw at location y],[radius of circle]);"

We can just go "x = 100, y = 100 r= 25", then "ellipse(x, y, r);"

This is a much longer way of writing it, but we can see that down the line its way better.

Hopefully this post isn't too dense. I kinda watch and learn this stuff with a lot of if going over my head, but enjoying the process and seeing the potential of how some ideas of mine can be implemented...

Zomg Math!

Monday, 6 February 2017

Hello, World

print("hello, world");

Usually anyone who starts out in learning coding will have this be one of the first things shown. It simply put the text "hello, world" on the screen.

I think that is quite a fitting start to my first programming blog post.

Since Jan 7th after coming back from a family holiday in Cornwall, I've been learning coding through this channel called "The Coding Train".  You can always tell the difference when there is a teacher who loves his subject and loves teaching it to others. Great teachers are so underrated and underappreciated these days, but yet they are the most influential people to shape kids' future career choices.

I started up with Processing, which is Java. Then moved onto Javascript. They are similar in many ways, but Java is local and Javascript is for the web. This allows programs to work within any browser, and therefore has a great potential for sharing and collaboration.

As a graduate in Interactive Design, one of my biggest annoyances during that period was the number of ideas I had that I couldn't implement. I really regret not learning coding earlier, as I see the potential for so many things now.

Potential paths I'm interested in is making desktop programs or apps, and now with what I have seen with Javascript, maybe some full blown games right within a browser! My niche is that I have a better understanding of good user interfaces, and that itself will improve a lot of programs tenfold. Too many times I have seen tons of apps and programs that are designed awfully, with no consideration for the interface, customisation or ease of use.

Right now there is so much to learn, its quite overwhelming actually, and starting out feels like you just copy the code and see it work. Understanding it fully will take time, but more importantly at the beginning it just gets you to embrace the code editor (Atom), and handling the errors you inevitably will get.

What got me started with finding The Coding Train was his Coding Challenges series, where he shows him making certain things through code. There isn't really that much stuff out there for people to see how things can actually be made so this is a great idea and basically got me hooked.

So in honour of that, I want to make my own Coding Challenges to test out what I've learned and see if I can do them. I'd like to record them to see how long it'll take but I might be embarrased at my complete noobishness about it. Here's the list I have so far;

1. Space Invaders
2. Pong
3. Uno
4. Blackjack
5. Poker
6. Snake
7. Hearthstone!?
8. Working with Poker Data, eg HEM
9. Snooker/Pool Game
10.Track and Field
11.Super Meat Boy
12.Heads Up AI
13.Live Infographic Related to Online Data
15.Lava Lamp
16.Chess/Chinese Chess
21.Tic Tac Toe
22.2D Overwatch

Its really important to have a portfolio of work to show for potential future employers. What I've learned in the creative industry, whether it be graphic design or coding or writing, is to keep and archive all work good or bad and record the process. Nothing advertises you better then showing your talent off through your work.

Of course, these are different in difficulty and I probably wont do them in this order but I'll keep things posted here.

Committing and playing poker has helped me learn to work in my own time. Try and do some learning and reviewing every day, watch a video, take notes. I've written down about 70 pages worth of this stuff, watched about 200 videos and some live streams, and enjoying the process.

There's nothing more frustrating then getting errors sometimes. This is especially annoying as I am copying down code a lot of the time, so more often then not its a missing semi colon or bracket. I wonder how many hours/days coders have spent in their careers looking for the tiniest mistype within their code.

Anyways til next time, I'll leave you with some circular beats! Need to figure a way of sharing this stuff but for now a link will have to do! :D


Monday, 23 January 2017

I've Quit Poker

I have decided to call it a day.

Its a gonna be a long one, scroll to bottom for TL;DR!


I have been playing spins for close to 2 years now, and poker "full time" for about 5.

There's nothing more frustrating then hanging up the towel since I believe that I'm at my peak of ability in playing the game. We can all obsess over our theoretical expected value numbers known as "chip ev", but at some point reality kicked in and I just cant do this anymore... I'm just not making enough money.

The P-YAN Ultimatum!

I had worked hard with the legendary Abarone68 in Spins, and he took a chance to back me. But after playing these games for nearly 2 years and getting paid less than minimum wage, an ultimatum had to be set. I told him in October that I wanted to make $500 per month [after splits] to make this worth my while.

Whilst I hear all you poker buddies instantaneously all shout at me that making monetary goals is the worst thing you can do, in this situation I think it was a valid target set as it was a chance to push myself and see what I was made of. This also allowed me to see whether there was potential in my ability to get some consistent results, and therefore have an outcome of which I could survive by.

Another reason and probably the most important one of all, was to set the idea of a yes/no to this question of whether I should continue pursuing this tougher career choice. If I achieved this goal, lets continue, if not, its time to hang it up. No in betweens if, buts and oh, you almost made it! Achieve it, or not, lets settle this once and for all.

The biggest change I did in October was deciding to move away from a limping strategy heads up, and go back to the "standard" min raising strategy from the button. I think overall I ended up making too many mistakes compared to the advantages it gave me playing this style. However all isn't lost with learning limping, it allowed me to understand quite a few things especially at how effective it can be playing vs aggressive players.


To get the challenge going I planned to drop to $7s and get back to $15s asap. But the $500 was totally achievable in $7s which meant it didn't give me a ton of pressure to achieve my goal.

one of the biggest advantages to playing this strategy was that you would get a good chunk of recreational that would endlessly fold their stack away waiting for that top 30% starting hand. It seemed that I caught a huge bunch of these players in October, including in the 100x I had hit and won.

This was my 5th top tier Spin (100x, 200x, and the I'm fucking outta here I retire instantly [10,000x] spin!). My first 200x was a complete shambles, played terrible. The 2nd one was heartbreaking as my A9 lost to A3 with equal stacks. The 3rd I hero called an overshove but he had it (agreed with my coach that it was a fine call), and the fourth having no chance whatsoever.

It was like I was trained for this spin, every other scenario had already happened. All I can do is get it in good, and hope to win... but don't expect to as I have learned in my harsh 2nd top tier spin. It was quite crazy as another reg had also got in the spin that I played against earlier in the day.

He had rejammed on me with quite a crazy bluff which sucked out on heads up, but I pulled it back and won that other spin. So in this Spin I managed to return the favour by bluffing him off a hand. That being said, his call in a 100x was a lot harder then in a 2x spin, but I'm glad I had the bottle to do it, as I knew I shrinked up in my first two top tier spins.

Amazingly not only did my hands hold up, but I absolutely destroyed my opponents and it was over in the blink of an eye comparatively to my other ones.

Note that with these graphs that vs Regs stats don't work since Pokerstars finally managed to stop the tracking ability of spinlyzer. These stats were from my own hand histories I uploaded to the site.

Great start. Hopefully this continues. And it did. 80 Chip EV, $1200 month. Check mark.


As planned I wanted to jump straight back into the $15s asap. And so I did. And so it killed me in the quickest time possible, I was back playing the 7s after 5 sessions later.

There's nothing worse to describe when things aren't going well losing money so quick when it took you days of hard work the month before to earn. You get bluff caught continuously, run into bigger hands, your AA/KK keep losing in vital spots. There's nothing you can do but just keep playing and hope that your stock market crash of a line will recover soon.

My 3 sessions shot at 15s, spat and kicked out before I could blink...

Playing Spins is so fucked up sometimes. This is because you can get as high as a 40% winrate in these but could still end up losing money because you lose all your multipliers. This has happened to me quite a few times and its really disheartening. Losing is so easy and making money is so tough. You basically have to run decent in the games, as well as run decent in getting those bigger multipliers to turn up! The ones who crush the games "survive" their multiplier droughts and then crush when they eventually show up.

One thing playing 3 handed does to you is improve your game tenfold (assuming you have some good support of course). This is because you are forced to play so many more hands, especially in uncomfortable situations, you end up learning tons from it. It kinda has a similarity to grinding the heads up games, the edge is tiny but the learning experience is so valuable.

I kinda went from being a 9 mans sit and go push/fold chart player with no clue post flop, to being a fearless post flop player that is able to adapt and target my opponent's specific range of hands.

November ended up being a killer for me. Not just coz of the loss, but to my confidence of achieving the goal set out. October was like seeing it as a possibility, November was the door closing...

In saying that a poker player would point out to me that 40 chip ev per game was pretty decent, and that it was just an unlucky month.


At this point I was quite demoralized at the way it turned. October was $600 after splits, and negative $600 for November. It was quite confusing actually because I didn't think about what happened to the split if I had a negative month. In the end I decided I would make a theoretical split for the loss too even though that's not what happens in a staking agreement. So that made it October making $600, November -$300, meaning November would need $1200 to make it, $2400 after splits. Its not really gonna happen esp at $7 stake however good you are. But for the sake of completing the challenge I'd continue anyways.

I've heard amazing things about December being the month of a great recreational player pool, especially in the last week during the Christmas period.

It came and gone, and it didn't seem to be the case. In fact I ended up seeing more regs from the $15s to $7s which surprised me. I even noticed a 50 chip ev reg from $15s that I know had come 3rd in a $150k spin for $15k dropping to 7s as well!

Actually made chip ev money big blind heads up! Progress!

Amaya really dropped the ball with their promotions this year. Especially in crucial times like the last week of December. It was also confirmed that DNegs "God Promotion" that he said was the positive to offloading all the bad changes that happened, was actually cancelled in the end. You went out on a limb to be the middle man, playing devil's advocate and well, the devil got cancelled in the end, only ending up taking your reputation for being the poker community's "man" with it. Just say your in it for the money DNegs, we'd respect you more for it now...


Maybe some big leaks early game, as it seemed that line was never on top when it should be?


In playing poker, like a lot of people, we like the freedom and the money of course. But my idea was always to do this to use the money to pursue whatever I decided that I wanted to do, without signing into the borrowing culture. As my past had taught me, things can really get out of control. My winnings had let me do a ton of travelling to visit friends that I had made in London during my uni days. These internationals who say "Come visit me sometime", meaning it, but realistically not expecting that to happen that much. But I made it happen, visiting friends in Perth, Los Angeles, Seoul (3 times!), Bangkok, and my motherland Hong Kong.

I also decided to move to Manchester simply because I thought it was a cool place to live. And it was. But when times got tough I moved back home and tried to keep the poker going. The longer this struggle happened my openness to exploring the things I wanted to do lost its way and I soon forgot why this was the reason I wanted to play, on top of the fact that I loved the game as well.

When I was a kid in school I remember making some games, some cards others with dice kinda like D &amp; D and play them with my friends at break time. This creativity was certainly something in my blood but finding its way was difficult. I ended up studying Interactive Design at university, but struggled to implement these ideas into reality.

Now with YouTube and other sources exploding with tons of learning material, I'm interested in pursuing to learn coding and programming. Computer games? Possibly. But could be software, could be VR type stuff. Who knows? I just want to explore and see where this leads me. I could make a fully customisable Hold Em Manager that isn't a joke that is unable to show your daily stats and list them over a month! I could program the software for the next poker site?

I had been playing Spins for 2 years, without making much money and I know that the experience has taught me that I'm able to commit to whatever I want to do fully. This is almost proof that I know I'm happy to work hard at something as long as my heart is in it.

Whats next? Job and learn coding on the side...


From now on, this blog will move its focus away from Poker and include things that I find interesting, probably mostly with coding. I have found great inspiration from a NYU lecturer who teaches coding but in an animated inspiring way and puts it up on YouTube.

I'm renaming it P.[DOT]LOG from this day forth. I'm sure a lot of you poker dudes out there who read my blog are disappointed, but this blog has always been about what I want to share, and I will never do things based on targeting an audience.

My final words for poker is thanks to everyone who's helped me. I've privileged to have been coached by two of my fave SNG smashers (who both went to the same high school) Abarone and Glitlr ("Poker RIP"). I have no excuses, I've had excellent coaches, a crap ton of sessions, but it just seems I am just not good enough.

28 Sessions w/Abarone who taught me so much!

In this day and age, the cream rises to the top... and the group of guys that can survive below them grow smaller and smaller. I am quitting full time, but in my mind I've learned a skill for life, and I will never stop playing completely as I have the confidence that I am still better then a ton of players, so this is nice to still have in my back pocket.

TL;DR - Puyan isn't making enough money. Gives himself 3 months to make $1500 and fails, so quits.

Add this