A place to breathe

Thursday, December 31, 2020

Farewell 2020 ...

 Today is the last day of 2020. 

I would like to bid farewell the most anticipated year of my life.

I've always looked upon 2020 as my benchmark as to what I would like to have, or to be, or become after. It's like a virtual checkmark in your life calender. It's also supposed to be a national vision back when I was at primary schools. So it's stuck in your mind what would it be to be at 2020. In a lot of ways, it's positive for me personally, because I could try to achieve dreams, or meet new people, or whatever, before 2020, and after. 

The Covid-19 is a test from Almighty Allah to test human beings. No matter what has happened in the world, be sure that you're thankful for being alive. Because many are still struggling at hospitals to fight for their life.

For me, being at home bring our family closer. 

And I manage to explore and improve my technical skills, esp Flutter, AWS and Unity . 

Farewell 2020. 

You'll be greatly missed.

 

Monday, November 23, 2020

One code for all. Partially at least

I've got development going with Flutter. A decent new kid on the block that I started to like. I feel like front end is like a new type of Nasi Lemak. It's just almost the same thing, the only difference is what you put on top of it to make it something else. Whether you like it with sotong, udang, ayam, Or you like it with your rendang. But, it's just almost the same thing. 

I found Flutter is also flattering. First, that the approach is almost like React. It's just different syntax. But what's good is it's not React, so I don't have to deal with JSX, Hooks. Not that I don't like, it's just that I've invested in Angular so much that taking on React is like achieving same thing with two different approaches. Nonetheless, I'm still coding with React until I realize I'm running out of time. 

Now, fortunately, I found out that Flutter can be compiled into a web. How convenient at inconvenient times!. Although it's running on beta,but .. I am hoping it's taking off some day. Not much thought that I put now except that as long as it could compile into the web, we can just serve it statically. That's good enough. 

I still keep a portion of the web with React. It doesn't matter. Keep the components up for their jobs, as long as the users are served with delightful user interfaces and awesome performances ! 

BTW, we're hosting this on AWS. I feel so much relieved. Why did I miss all these fun before? I hope it's not too late to join the party.!

Sunday, October 18, 2020

The Three Nasi Lemak Team

Most of you Amazon/AWS fans have heard of 2 pizza teams. Well, for those of you who haven't, basically is a guide that a team should consists no more than what you can feed with 2 pizzas.. somewhere around 10-12 people.

For me, the 2 pizza team is not suitable for startup. This is because:

1. We do not have 10-12 people working with us in the beginning, especially at the conceptual level. Most of our teams are 1,2, or 3 people. If we get lucky, we get our family, friends, neighbors, or even pets such as fish and cats to help us out to do our startup activities.

2. Second, pizza is too expensive. Especially in this part of the country where buying pizza is a luxury thing. On average, you need to spend about RM 30 per pizza. This is just too much money to spend for a small team of 1 or 2 for lunch.

3. Third, we don't need to buy 2 pizza. We can only buy 1... for 3 people.

Ok. Enough of that. Let's see why we need a small team, and a small budget to feed the small team. And that is always scalable and works even if you have bigger teams.

1. A startup need minimum 1 person to start, which is the founder. For him, he can write a program, debug, test, release and maintain. Everything with just on his bare hands, a decent laptop and access to the cloud computing. Of course, this is a rare case. But normally, a typical startup starts with 2-3 people bouncing ideas, - the co-founders. Do you really need 2 pizza boxes for lunch ? Not really. Maybe 1 is enough. Or why not try buying nasi lemak for each three of you?

2. I think the best way to write software is to collaborate with your friends. I found joy and amusement when learning from each other. But how many people that you usually collaborate efficiently ? I would say between 2-3 people. Yes, even in large software, most of the time, the contributors are few. The rest are either doing some support work, juniors you need to train, testers, document writers, etc.

2. If all we need is about 2-3 people to write good software at minimum, why not making it a rule? A simple rule that states that, a minimum working software is between 3 people : 2 people working on development, 1 person on everything else - ranging from UI feedback, hiring part timers, managing finances, doing advertising, documentation.. etc. The third person can also write the code, maybe end-to-end tests automation.

I call this rule, The Three Nasi Lemak Team rule. A team that can be fed with only 3 nasi lemak (usually , we can consume nasi lemak during breakfast, because during lunch, we're busy coding).

It's small enough team to run a startup, cheap enough to buy food (a typical nasi lemak costing you not more than RM 3, but it could go as low as RM 1). It fits a startup who just getting started.

At startup time, we just can't be spending too much on Pizzas.

Friday, May 1, 2020

AngularDart

I used to work in Angular 1.x . Not particularly pleasing, but it is one nice web development that allow us to do some form of JS-binding that make your website looks cool.

When Google came along, they introduce Angular 2 (and subsequent madness of release versions), which is a much improved version of Angular 1.x. What's not nice is that, your Angular 1.x app now no longer compatible with Angular 2. To migrate them, suffice to say, it's a pain.It's possible, but you might not want to do it. The effort is just monstrous.

OK, I still stick with Angular. But there's a new kid on the block called React, which is gaining traction. A lot of people like it, but I still don't quite appreciate it simply because I don't like coding my HTML/CSS into the JS file itself. I thought it's not very portable in case React doesn't see the light of the day one day.

Recently I got a hand of React, I kind of got a hang of it. Starting to like it myself. And then I also found a new development called AngularDart.

I was thinking AngularDart is the same like Angular but it's not.  They have some of their quirks. I am still getting along. I will post a few more things if I found it interesting.

Friday, April 24, 2020

Express JS tutorial

Hello Developers

I would like to share how to build a Node JS backend server that is the simplest. It is called ExpressJS.

1. Download Node JS (https://nodejs.org/en/)
2. Make sure you have a command line. If you are on Windows, I recommend you use Git Bash
(https://git-scm.com/downloads)
3. Download your favorite editor (Visual Studio/Sublime, etc)
4. Download a command called "Curl"here https://curl.haxx.se/
5. Create a directory where you want your server to reside anywhere in your computer. with command line, you type "mkdir "
6. Go to your directory - "cd "
7. Now, if you've installed node correctly, you should be able to type "node" in your terminal. If you got an error, make sure that the Path is set correctly. You can set it either in your .bash_profile (Linux/Mac) or Environment variables (Windows)
8. Create initial node files by running "npm init"
9. Create a file called server.js "server.js"
10. Copy and paste the following code into server.js

const express = require('express');
const app = express();

app.get('/', (req, res) => {
res.send({
message: "hello, world"
});
});

app.listen(5000, () => console.log(`Node server listening to port ${5000}`));
 

11. Modify your package.json to use node script to run:

"main": "server.js",
"scripts": {
"start": "node server.js",
"test": "test"
},

12. Now, run your server : npm start
13. You can test your server by running curl command : "curl -X GET http://localhost:5000/"
$ curl -X GET http://localhost:5000/
{"message":"hello, world"}

Now you're done!. You can write your own API server from now on.
Good luck !

About Me

I'm currently a software engineer. My specific interest is games and networking. I'm running software company called Nusantara Software.