A place to breathe

Tuesday, March 14, 2023

SVB Bank - Kisah Teladan untuk kita

Silicon Valley Bank "Bank Run" 

Silicon Valley Bank adalah sebuah bank di Amerika Syarikat. Tujuan bank ini diwujudkan adalah untuk membantu syarikat syarikat baru atau "startup" dalam menjalankan operasi mereka. 

"Bank Run" adalah satu fenomena yang terjadi apabila semua pendeposit cuba mengeluarkan wang, dan bank tidak ada wang untuk diberi kepada pendeposit.  

Mengapa jadi begitu? Ya.. bank sebenarnya tidak menyimpan kesemua wang anda di dalam peti besi mereka. Mereka memberi pinjam wang yang anda depositkan kepada orang lain untuk menjana pendapatan mereka dalam bentuk "interest". 

Mengapa Startup perlu di bantu? 

Ini kerana Startup adalah kompeni yang menjalankan operasi yang risiko amat tinggi dengan nilai pulangan yang amat tinggi. Ramai startup yang gulung tikar, tetapi, ada sesekali startup yang berjaya akan menjadi gergasi teknologi seperti Apple, Google dan Microsoft. Semua mereka adalah startup satu ketika dahulu. 

Apa yang terjadi dengan Silicon Valley Bank? 

Silicon Valley Bank menyimpan majoriti asset mereka dalam bentuk "Bond" (US Treasury Bond). Tetapi, oleh kerana US Federal Reserve menaikkan kadar faedah yang mendadak untuk menentang inflasi, Silicon Valley Bank mengalami kerugian... perkara ini kedengaran amat kompleks - ini kerana, sistem kewangan sekarang yang kompleks. Tetapi, apa yang terjadi adalah, Silicon Valley Bank mengalami kerugian dalam pelaburan mereka dalam pasaran bon, dan mereka cuba mendapatkan modal daripada pelabur. Mereka yang sedar akan situasi ini cuba mengeluarkan duit daripada SVB dan SVB mengalami "bank run". 

Adakah SVB salah? 

Perhitungan mereka dalam pasaran bon adalah kurang tepat. Mereka sepatutnya tidak merisikokan aset mereka yang besar (45%) dalam satu portfolio sahaja.Namun begitu, secara tradisi, Bon adalah satu instrumen yang amat selamat. Tidak hairanlah mengapa mereka secara selesa meletakkan banyak aset dalam pasaran Bon.

Pengajaran

Apa yang boleh kita pelajari adalah, duit kita tak semestinya selamat walaupun dalam bank... jadi, pilihlah bank yang stabil dan kukuh untuk menyimpan duit anda..


Rujukan: 

https://www.npr.org/2023/03/10/1162599556/silicon-valley-bank-collapse-failure-fdic-regulators-run-on-bank




Sunday, July 10, 2022

Why you should not bring your kids to watch The Rise of Gru

Dear Parents and Friends

If you think of bringing your kids to watch something for a little family thing post-Covid, please watch movie other than The Rise of Gru.

1. They teach your kids to become villain. 

That's right, not teachers, or other honorable professions. Gru aspire to be a bad person and idolize a bad person. How can this be a good movie for kids? It's not even good for you. 

2. Gru's mother do not have a good example to show

I can't explain how despicable the scene with the yoga or whatever instructor. 

3. Teach kids not to respect teacher's profession. 

The classroom was handled by unmotivated and uninspiring teacher, which by the way, is so widespread right now. 


Don't watch it. Just not worth it. Please use the budget to watch other movies. Or buy food with.

Friday, May 28, 2021

Unggas

Pagi yang hening
Pabila unggas sudah tidak berkicau
Tiada lagi yang terbang tinggi
Keluar mencari rezeki

Ku tahu sesuatu 
Yang mengganggu mereka

Kulihat segenap pohon ditebang
Setiap bukit ditarah rata
Setiap isi bumi 
Membuak-buak deras mengalir keluar
Dek kerakusan manusia 

Dan apa natijahnya? 
Adakah darjat kita lebih tinggi?
Adakah kemewahan ini memberi seribu erti? 
Adakah kita lebih mulia daripada sebelumnya? 

Pabila harta sudah tiada
Pabila wang ringgit bukan jawapan 
Pabila kemewahan menjadi rebutan 

Ketahuilah bahawa
Segenap alam ini sedang menangis
Melihat tingkah laku manusia
Mengikut nafsu 
Yang tiada penghujungnya

Thursday, May 27, 2021

Kelam

Di saat kau melihat kelam
Walau dada mu sebak seribu 
Ketika langkah longlai mu
Semakin hari semakin menyeksakan

Ketahuilah kelam itu
Harus kau tempuhi
Demi mencari
Kelibat cahaya obor
Yang akan menerangi mu
Di sepanjang perjalanan 

Seperti kelkatu yang mencari cahaya
Kau harus terus terbang mencari
Walau hanya seekor kunang-kunang
Menemanimu

Kelam itu hanya sementara
Menguji sejauh mana tekadmu
Dalam mencari
Cahaya di maya ini



Wednesday, May 26, 2021

Sendiri

Jikalau hari yang dinanti
Disambut sepi
Menyendiri

Jadilah kau seperti mentari
Yang menyinari pagi
Melewati segenap insani
Hadir memberi seribu erti

Jikalau hari yang tiba
Disambut dengan gelak tawa
Bersama

Jadilah kau seperti rembulan
Yang ditemani bintang-bintang
Mengambang penuh girang
Menyinari gelap malam

Jikalau hari yang tiba 
Penuh hiba

Jadilah kau seperti senja
Yang menghiasi dada awan 
Dengan warna merah jingga
Menyeru segenap alam
Agar pulang sebelum malam tiba

Jikalau hari itu kau tidak menentu
Ke arah mana yang kau tuju

Jadikanlah ia pedoman
Moga pada masa hadapan
Ianya tidak lagi berulang

Kerana setiap hari itu
Kau harus tetap maju
Walau seribu liku
Menantimu

Monday, May 24, 2021

Di balik pelitup muka mu

Di balik pelitup muka mu
Terukir wajah gusar 
Seolah ada sesuatu
Yang disembunyikan

Sewaktu dinihari
Kau melewati setiap liku
Untuk sesuap rezeki 
Walau kau tahu 
Dia ada dia situ 
Antara pelitup muka mu 

Sekarang kau terlantar sepi
Menunggu takdir 
Hanya waktu yang akan memberitahu
Sama ada kau atau dia
Yang pergi dahulu




Sunday, May 23, 2021

COVID 19 and humanity

Covid 19 is a threat to humanity. 

Humans has always been social. They thrive by cooperating. Think of elephents. How do baby elephents survive? It is because they walk in groups. The big papa and mama elephants. They protect the small elephants 

from being attacked. If you think of humans,. It takes around 10-15 years before a humans can protect themselves. Before that they depends on their parents and  community around them.

What Covid 19 has done is they are separating this support structure. Simply by making viral disease easily transmitted though close contact. 

What happen next? The support structure breaks. Parents unable to care for their children. Community avoid each other. The situation are like war.  They are casualties. Fatalieties. Victims. Survivors.

We need Heroes. Those who do the execution work. To help each other. To be a hero, you do your part to fight Covid 19. How exactly you do it, it is your call. You can support the victims, be nice, volunteer, medications, vaccines. Anything. Just do 't be a pain in the society. Just do our part. 

Let's be human again.


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 !

Wednesday, May 8, 2019

Postgres Dump on windows 10

Recently I've been trying to do all my development on Windows 10. Fortunately, Windows Power Shell has been really cool and I kind of like it.

If you use Postgres for some reason, you might be wondering how the heck you want to dump the SQL database using PgAdmin 4.

Well, sorry to say, there hasn't been luck for me, and probably for you too.

Now, go ahead and launch your windows power shell, and type this:

PS C:\Program Files\PostgreSQL\11\bin> ./pg_dump.exe -U postgres -t   your_table_name your_database_name >> ~/my_table.sql 

You will find your SQL dump in the my_table.sql.

Have fun ! 

Monday, December 31, 2018

New Tech, faster, but same

Recently there are 2 programming languages that is trying to take over the Internet:

1. Typescript
2. Dart

Both languages share the same idea in that it is trying to "enhance" Javascript. In actual fact, it does have some characters to replace Javascript as the king of the Internet language.

But funnily enough, both compiles into Javascript, and then get translated by browsers. I think the future would be for the internet to have less defined widgets, and more for empty canvas loading and run it over some sort of graphics library.

This is basically the idea that game developers has always been familiar with, no matter what programming language, widgeteries, UI behaviors, etc.

It would be interesting to see the development of the 2 languages and see what they solve.

Happy New Year 2019!

Hi viewers

I would like to wish Happy New Year 2019 !
Wish you well, and happy holidays

Friday, August 24, 2018

Expressing Emotions : Machines v. Humans

Finally I have breathing space to catch my blog. As if I'm so busy!
As a matter of fact, I am.

Well, for the most part, i'm spending time talking to machines and people. There are differences between the two - machines don't understand your emotions, although I know some of you might be attached to your own machines as if they're alive. Please lah. Don't do that.

People on the other hand, understand emotions. However, some people don't express their emotions in words or body languages. Sometimes, they show it through actions as well. These are the things you can never experience if you talk to machines.

By talking to machines, I don't mean that I talk to my family or friends over the phone or Internet. I mean, by writing programming languages or some actions such as issuing commands, or just pressing restart button.

Ok, so what's a big deal? Well, wouldn't it be nice if the machines can understand your emotions such that when you're interacting with the machines, you trick yourself as if you're talking to a human being?

Yea. That's the stuff of the computer world right now. A lot of effort technology companies do to achieve this. Somehow humans are now more comfortable talking to machines like Alexa and Google Home than actually go over dinner with friends. So the IT space just ride the waves.

I mean, really? Do we really need it? That machines takes over human in terms of communications?
I predict that in the next few years, the machines could actually do reasonably well at that. I mean, look at what has it gobbled:
1. Alarm clock - better.
2. Letters - fast and cheap ( except receiving saman and bills, I don't get letters from my friends anymore. I wish I have).
3. Commerce.

Ok i don't need to go on and on.

However, what machines lacks are actually actions. Stuff like mechatronics and connects to its AI brains. I just don't think we can achieve things like human does when it comes to expressing their emotions through actions. This is the only thing that I think robots can't easily emulate for the next few hundred years.

That means, humans can survive as ... well, human being.
For the next hundreds of years.








Thursday, April 19, 2018

Surviving 2018

Hola

Welcome to 2018. Many things happening and I don't even have time to type !. Well, majority of the things are just learning. Many tech, and also non-tech.

One of the major decisions that  I have to make is to switch to Android from iPhone. This is a huge decision, but actually an easy one.

First of all, my beloved iPhone is still iPhone 4S. That's right my friend. The best phone ever. And the main issue is it keep dropping calls. Well after few years (about 5 years) using, I guess it's time.

Second, to purchase another iPhone is just too expensive. I was thinking of buying iPhone X but I figured that the price tag is just too much. So I decided to purchase a Samsung J+, which sadly, I misplaced it after a few days of purchase. Anyways, I'm still searching for it and hopefully will find it somewhere.

Another new cool discovery after Python is Phaser - a new game engine developed by Photon Storm. I mean, I manage to compile and got into my Phone with ease. The good news is it's running Javascript ! So I don't have to learn new things. Writing game in C++ is just too much. I mean, I'm not going to release a Quake here!

A sad new thing about gadgets is actually there's not much of a new thing. I remember when iPhone was released and we just can't wait for an SDK. Those days.. good times.

I'm toying of an idea of creating my own phone. But naaah.. too much effort for this. Too many phones that are good in the market anyway. Samsung,Oppo, Vivo, Xiaomi ... just choose.

But I think Javascript and Python has got some synergy there for many applications including app on the phones.. it's just that no one really package it in a nice way that they could work together seamlessly.

We'll see. Anyone got free time ? ;)




Wednesday, July 19, 2017

Using Angular Generator

Using Angular Generator is easy.

Since I like to work locally, I use "--save-dev" option. if you want to install it globally, replace "--save-dev" with "-g"

Here the steps.

1. npm install grunt-cli bower yo generator-karma generator-angular --save-dev
2. yo angular
3. npm install grunt-karma karma karma-phantomjs-launcher karma-jasmine karma-core jasmine-core phantomjs-prebuilt --save-dev

Now you should be able to run grunt:

> grunt
> grunt serve

It is now published on http://localhost:9000

Enjoy!

Monday, February 20, 2017

The all powerful Shebang

When you write scripts, often times, you'll see the following line at the top:

#!/usr/bin/python 

Now what is this?

This line allows you to run your script as the executable, without invoking the interpreter. For example, if I write a python script called blabla.py, I will need to run it this way:

%> python blabla.py 

change the permission and add the shebang line, will allow you to run it this way:

%> chmod +x blabla.py
%> ./blabla.py 

if you want to run it in the background, then call the no hangup:
%> nohup ./blabla.py 

It will run itself doing its thing. Time to go to sleep while waiting for it to finish.

Wednesday, February 15, 2017

Changing NPM default module folders

When you install NPM on Linux, it will install into the root location by default. Often times, it could cause trouble if you want to modify the node_modules. 

To know where the node_modules are going to be installed globally: 

%> npm config get prefix
/usr

Now, I don't want to play around with the '/usr' permission because it is a standard OS directory. Trying to modify some stuff for node and have to deal with the top root directories is just not worth it. 

Now, change the NPM prefix: 

%> npm config set prefix=$HOME/.node_modules_global

so test it now: 
%> npm config get prefix

You should see that it list :
/path/to/home/.node_modules_global 

Change the path inside your .bash_profile: 
%> export PATH="$HOME/.node_modules_global/bin:$PATH

OK, now update your environment: 
%> source .bash_profile

Try installing an NPM just to check whether the global works: 
%> npm install npm --global
%> npm --version 

You should see your version changes from previously because it is now getting the latest npm.



About Me

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