Fun with programming!

So I came across this guy’s channel, Mattias Petter Johansson, who has been making a lot of videos explaining programming concepts in about 10-minute chunks, and I thought it would be worth sharing! His explanations are easy to digest (IMHO) and he speaks slowly and clearly, making it easy for non-native English speakers to pick up. Plus, he looks like a really nice guy.

He recently quit his job at Spotify and has started a Patreon page full time. And he seems to be doing well with his fans, so surely the quality of videos is somewhat assured! 🙂

Boilerplate React App

React-icon.svg

I started learning about React from Facebook’s official tutorial page, and it was fantastic. There was zero configuration, and I got straight to developing and experimenting with React.

But I’ve always wondered what was the bare minimum I would need to get a React project up and running. So here is the result — a boilerplate project.

Of course, the boilerplate lacks the following, which I thought was important:

  • Mocha/Jasmine/Jest/etc. – no test frameworks.
  • Flux/Redux – no state management.

Returning to front-end web development

For the past 4 months or more, I was introduced to my first front-end project in the company (after working partly on Visual Studio/C# and CI/CD-related tasks), and I was really glad to be able to work on something more relevant to my skillset and interest.

The new project required us to split an existing C# project (which had front-end and back-end code) into two parts — Javascript+React (SPA/single-page app) for the front-end, and C# (likely .NET, but I didn’t ask) for the back-end.

React-icon.svg

The good thing was, it was Javascript. Despite my inactiveness in web dev for the past 2 years, it didn’t take long for me to get back into it. The unfortunate thing was, I hadn’t been keeping up with the quickly-and-ever-changing web technologies.

In my previous job, I spent so much time with Bootstrap, jQuery and self-written native libraries, that I didn’t realise how much tech I had been missing out on. Thankfully, this project made me realise that I have so much more to learn, and I am glad I was given the opportunity to learn as I work.

Thankfully, I also had the opportunity to work with two experienced UI guys from the UK team, and I have a colleague sitting beside me who had started 2 months earlier on the project, to guide me through the project’s code, and explain its concepts.

I’m sure you can easily Google up articles about React, so I won’t elaborate too much about it. In a nutshell, I really enjoyed using React! And the concept of Redux was pretty hard to grasp at first, but once I got it, it felt really familiar, like I was writing game code (based on the idea of immutable states).

redux-icon

Regrettably, in my previous company, my ex-boss had stressed on the importance of testing, especially for web apps, but I never got around to learning or using them. Dear Andrea, if you’re reading this, I’m really sorry I skipped around the task and focused too much on writing the application code, instead of dedicating some time to write tests. I’m sure the tests would have helped shave a lot of time off discovering and fixing bugs.

jest-logo

But, now, I have had the opportunity to write in React, Redux, Jest and Enzyme. And I see the power of frequent, automated tests. I finally understood what unit, component and integration testing means. I now (sort of) understand why some people are so concerned about test coverage. I’ve learned so much in the past 2 months and I intend to pick up more relevant tech that complement the project, such as Webpack, ESLint, Selenium and more.

selenium-logo

Thinking back of my life journey up until now, I think it’s been quite a strange ride. I went from C++ to Visual Basic, to PHP, to Actionscript2/3, to Javascript, to C# (Unity), then to Haxe, to NodeJS, and now I’m back to Javascript (ES6/JSX).

I’ve come to realise that “programming skill” isn’t exactly about the prowess in the language, but rather, the ability to use as many complementing libraries as possible, effectively, to create the end-product. Heck, even non-project related tech knowledge would help a lot, e.g. Git commands, integrating CI/CD into the project, or using Powershell scripts to automate build and resource provisioning.

PowerShell_5.0_icon

On a side note, finally learning and writing tests for the React app made me realise that it must’ve been really difficult to write automated tests for games. Although Riot has written an article about how they tested their game (League of Legends), I imagine it must’ve taken some effort to get the initial tests working.

Hello 2017!

I’m a half-year late, but here’s a quick post to show that I’m still alive.

I haven’t done anything code-heavy for this year, unfortunately. I have been picking up some non-gamedev related programming stuff lately though, specifically React. The sad reality is that, developing web apps for businesses is less stressful and pays better (for those who genuinely enjoy web development) in Malaysia.

I think I’ve already said enough in my previous post from 2016, and my sentiments still sort of ring true today. But before I end this quick post, let me share this little video which I came across, that pretty much sums up my thought of “making it big in the gamedev scene”:

I really do hope to pursue gamedev again someday, perhaps as a serious hobby. But for now, I like the idea of having a decent stable job and spending my free time on self-improvement, like learning Japanese and exercising.

Goodbye 2016!

In case anyone is wondering if I’m still doing development, the short answer is yes!

The long answer is, not quite! But perhaps this last post for 2016 will shed some light on what’s been happening.

I had a long downtime. I guess I had an early mid-life crisis, because I was still figuring out my life, especially since my personal life is quite a mess. But I had a lot of time to think, thanks to that: Do I really want to make games, or do I just want to dream of making games?

My answer had always been yes, and I would justify it with grandiose goals and noble reasons. But the truth is, I was just chasing a dream. And like most dreams, mine went unfulfilled because I spent so much time fantasising over it, distracting myself in local indie gamedev social circles when instead I should’ve been seriously putting 110% into developing my game.

So 2016 has been a pretty huge year for me. I had hit rock bottom this year, but I won’t bore you with the details. On the bright side, I do think I have a clearer idea of where I want to go from here on.

I’m sure everyone had their fair share of good and bad moments this year. But let’s look forward to next year. Onward to 2017!