thani.sh

dd if=/dev/head of=/dev/blog

Multiplayer Tetris Game (part 6)

Posted on Jun 8, 2025

Instead of the step by step approach we followed on the previous article, what would happen if we simply asked the AI agent? Would it still be able to complete the task?

Multiplayer Tetris Game (part 5)

Posted on May 25, 2025

We can take our game a step forward by allowing users to play from multiple devices. This time, let's try to use some AI agents to do the coding.

Multiplayer Tetris Game (part 4)

Posted on Nov 20, 2022

This tutorial continues where we left off on part 3. We will add some tests to make sure the game is working as expected.

Multiplayer Tetris Game (part 3)

Posted on Nov 11, 2022

This tutorial continues where we left off on part 2. We will split the code into multiple files to make it easier to maintain and implement a few more game rules.

Multiplayer Tetris Game (part 2)

Posted on Jan 24, 2021

This tutorial validates the design we used to write code on part 1. We will try whether it's possible to fix bugs easily and whether we can add some new features to the game without major code/design changes.

Multiplayer Tetris Game (part 1)

Posted on Dec 13, 2020

A tutorial about writing a multiplayer game from scratch. Starting from solidifying the requirements and continues all the way up to creating a working prototype with vanilla js.

Solving Interview Problems

Posted on Feb 5, 2019

Sometimes, we get to solve programming questions on site during software engineering interviews. This is one of the questions I used to ask from candidates.

Debugging RxJS code

Posted on Sep 5, 2018

This are undocumented internal details of RxJS and it can break anytime. It probably would have changed by the time you're reading this blog post.

Duplicate click events

Posted on Jun 27, 2017

While trying to debug this issue, we found out a couple of interesting things about how Angular manages event handlers.

FabricJS performance hack

Posted on May 17, 2017

The frame rate can be improved by only rendering inside a rAF callback.

The class in static methods

Posted on Jan 25, 2017

This is useful when writing static methods which can be inherited by other classes. Here's an example.

Async tasks sequentially

Posted on Jan 9, 2017

Let's check this badly written example first. The sequence below will run each step asynchronously.

Rant - JavaScript import syntax

Posted on Sep 7, 2016

The import syntax on javascript looks damn ugly when many items from a module. Take this example piece of code form a typical GraphQL code.

Transpiled JS on Github?

Posted on Jul 13, 2016

If you're maintaining a javascript project on Github there's a good chance you're using a transpiler to convert it to a format usable be older platforms and to minify it.

Using multiple GOPATHs

Posted on Jan 18, 2016

Is it possible to use multiple directories as GOPATH and how does it behave when downloading packages or when importing go pacakges from code?

Masking GraphQL Errors

Posted on Jan 3, 2016

The way graphql-js and express-graphql handle errors is has some issues. Consider this example server which has a bug in a resolve function.

Github repo license file

Posted on Oct 17, 2015

I, like many other developers, always use Github to host my projects. And like most of them I thought all of my public projects are by default open source.

Day 3

Posted on Jul 29, 2015

All go packages except packages from the standard library are placed inside the $GOPATH. A package consists of a set of go files in a directory.

Day 2 - Built-in Features

Posted on Jul 28, 2015

This tutorial consists of a number of example go programs demonstrating each feature. It is recommended to try some of them on the Go playground or on your local machine.

Day 1 - Getting Started

Posted on Jul 27, 2015

The go playground is where go code can be run easily and fast therefore it makes an efficient place to try new go code. This also makes the playground useful when learning how to program with Go.

Limit Go Benchmark b.N

Posted on Jul 23, 2015

Operations count (b.N) can be set inside the function to limit the number of operations Go benchmark does. But perhaps this is a sign there might be other issues.

Go for Node developers

Posted on Apr 15, 2015

I'm developing Node apps for years and started working with Go last month. So far, I like it as much as I like Node. So I hope to blog some quick tips about Go (aka Golang).

Errors vs. Bugs

Posted on Oct 11, 2014

One of the most important things I learned during past few months at MeteorHacks is the difference between errors and bugs and how they should be handled.

Isolated Testing

Posted on Sep 8, 2014

Just thought of sharing something about writing tests with JavaScript. Usually, it's best to keep tests simple and test just one thing per test.

Empty Function Shorthand

Posted on Aug 13, 2014

JavaScript is an interesting language and so far my favorite. Maybe it's just me but I find stuff some people complain about javascript such as automatic semicolon insertion.

Aggregation for Firebase

Posted on May 24, 2014

Assume we need to create a realtime dashboard to show some summary values. Usually, with Firebase, we'll have to get all data to the client and process them there.

Organizing files in Meteor

Posted on May 2, 2014

Starting hacking on a project with Meteor is lots of fun. But things can become a mess very easily. Meteor does not have too much restrictions on how to organize our project.

‘Hello World' to MeteorJS

Posted on May 2, 2014

In this tutorial, I'll try to walk you through building a simple realtime wall (like a guestbook) where anyone can post messages.

When not to "Fork" on Github

Posted on Apr 2, 2014

When I first started using Github, just like many others I simply went ahead and forked each and every repository I liked on Github. But this makes no sense at all.

Elastic Iframes

Posted on Mar 29, 2014

Sometimes it become necessary to use iframes when building some web applications. Often we have them hidden but sometimes iframes can be useful visible too.

Setting up wingpanel-slim

Posted on Mar 28, 2014

Elementary OS is one of the most beautiful operating systems I've ever used. Usually I mod my OS extremely but for the first time, I left most of the OS defaults as is.

Create an empty git branch

Posted on Mar 27, 2014

It's really easy to create a new empty git branch with no parents (AKA orphan branches). First create an orphan branch with this command.