Posts
2023H2 Goals
Mini-Reflection on “Open-Diary” and the Past Failures Having goals is a good idea, and it’s even better to pursue them.
Last year, around this time, I came up with the idea of an “open diary” concept. It allows people to keep an open diary as a review and share it like a blog post. I wrote my first post back then, and now it has been a year.
However, I think that’s okay.
Posts
Daily Progress
In the recent 2 days, I’ve spent some good time setting up this blog site… here’s the rough timeline:
before 2022-07-26, I was using Jekyll, and it has been working fine on 2022-07-26, when thinking about improving the blogging, there were a few functionalities that’s missing: the googleAnalytics was broken the commenting system was broken as well deployment has been hard – I have to do it manually, by pushing to gh-pages branch although GitHub uses Jekyll by default, it’s missing some plugins that I use so I have to build it manually in order to figure out what went wrong… I started to read Jekyll’s source code it took me 0.
Posts
Transform Any Website into Desktop App via Electron
End Result How it looks (in Ubuntu) in Startup Menu:
How it looks when opened as an App (electron-apps-ubuntu.png)
Motivation I recently started using a Ubuntu Desktop. However, quite a few apps are missing in Ubuntu.
Therefore, I have to use their web version.
Tools ElectronJS: https://www.electronjs.org/ Unity Launchers And Desktop Files: https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles How to Setup Install Electron Globally Electron runs chrome internally, but we can run it like a desktop app.
Posts
Separation of Concern
Situation When working in big companies like Grab, lots of times I’m just solving some simple CRUD.
Meanwhile, lots of my time needed to be spent upon different other things:
make and review pull request deployment fixing failures for functional test and unit test load testing integrated with the logging library Problem Turns out, there’re also other teams, solving the same problem again and again. This pattern has several issues:
Posts
Provide Sufficient Context in the Merge Request
TL;DR When creating a merge request, we need to include more context information:
describe what you’re trying to achieve in this MR why such change is needed What is Context Information A pain point of reviewing a merge request, is to understand the context. The context includes:
what the merge request actually intends to do why such changes are needed are there any other alternatives No Context is bad for Reviewer These context should be communicated properly, so that the reviewer can actually have a clue to justify if the change is necessary & sufficient.
Posts
Testing Result not Detail
When writing specs, I think the spec should describe implementation result, but not the implementation detail.
Take the ruby code below for example:
def add(a, b) a + b end one can test like:
expect( add(1,2) ).to eq(3) that’s testing the result; but if one write test:
expect( add(1,2) ).to eq(1+2) that’s testing the detail.
The problem with testing the detail is that… say if the dependent method, :+ got changed, then the result would actually be different, but the second spec would still pass.
Posts
CSRF protection in Rails
CSRF(Cross Site Request Forgery) is an attack that forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.
In this post, I’ll explore, in the source code level, how Rails protect itself from CSRF. It has two checks: based on token, and also the origin header.
We’ll first look at how rails put the token into the page, then see how the token is checked.
Posts
on Objective, and Focus
One should always reflect upon himself… to keep on the right track, to find out and correct mistakes, and to the greater self-awareness.
– by Myself.
When reading, what am I reading about? I have been reading a lot this year. Not only the Tech Specs (which I always do), but also the blog posts (which I often do), as well as the books (which I mostly started this year only).
Posts
Inspirations From Book "Second Machine Age"
I was reading about the book . It was.. so interesting that I actually prepared for a set of slides, plus, made a talk about this.
Here’s the picture after the talk:
I prepared like.. 40 slides; and here’re some of my short insiprations.
Steamer Machine is the first machine age.. because the level of development of our human world boost right its invention.
Then the second machine age starts with Information Technology.
Posts
On Abstraction of Process, People, and Ecosystem
Abstraction is a pretty interesting topic. It’s needed cuz huamn mind cannot process big data.
I first learnt about abstraction though programming, by professor Seth Gilbert when he was trying to instroduce Stack to us, during my first Algorithm Class.
Since then.. I was fascinated by the idea of abstraction… and I think it’s good to integrate with the idea of esbi quadrant from the <Rich Dad> Book.
Let the journey start.
Posts
The Strong Weak Person
Some people are alive.. but they are already dead. Some people has died, but they are still alive.
“I want… but …” is something we have been hearing too often these days.
These including, but not limit to:
I want to improve, but my company doesn’t allow me to do so I want to study programming, but I don’t have money I want to do more exercise, but I don’t have time I want … but … You said that you want it, but you are not doing it / not going for it.
Posts
Winner Takes All
This is a continue, from the last post InEquality.
Unlike traditional business, the internet is actually a much more competitive field – usually, consumer’s need in a certain field, can be fulfilled by a single company; company can only win the competition via diversity.
While for traditional business, due to the issue of scalibility, the market allows multiple companies, with samilar nature of business, build the same product, to exist in the market, together.
Posts
Inequality
InEquality All animals are equal, but some animals are more equal than others – George Orwell, Animal Farm
Inequality exists, everywhere. When I mean unequal, I mean efforts, and return. Provided same efforts, the return is different – actually, the difference is so huge, that make people feel that it is unequal.
Job not Equal For the same efforts, in the same industry, doing the same job, the job pay is unequal.
Posts
Small, Incrementmal Change, in Life
Life is a long process. People changes throughout their own life, and people changed in different ways.
In a few years time, one can see difference amoung people already. For example, in three years time, in the High School studies, students who used to have different capabilities, who can score nearly samiliar high score as others, would go to totally different university. in three years time after graduation, some can be already in VPs position (well, they are really out-standing ones), while some are still in the junior positions.
Posts
HHKB -- My Review
I’ve bought a keyboard recently, HHKB. Here’s one from amazon
Actually, at the time when I bought it, I’m not exactly sure if I need it or not – the reasons that I bought it, to be honest, are:
I need an external keyboard. It looks geeky, and cool The review says that it is good. However, after two days of usage, I think I may not like it that much (although, I’ll be continuing using it).
Posts
Agile Meetup After Thoughts -- Distribute Human Group
I went to the agile meetup today. I like how the agile meetup runs:
Break 2 hours’ time down to 4 sections, each section is 0.5h long. At each section, there’re 4 groups: A B C D Anyone can initiate any idea, to host a discussion in one group, at one section. Any topic is good What happened is what should happen Anyone is free to join any section; anyone can quit any section at any time This is totally self-organizing, which in a sense means, agile.
Posts
JS Tricks from JS-puzzlers
Javascript-Puzzlers is a nice place for people to.. test their JS knowledge :)
I wrote some code to learn&verify JS’s behaviour while solving the problems. I’ll try to put the result below.
Meanwhile, I’ve also put the JS source code here.
// Question #1: ["1", "2", "3"].map(parseInt) // Verify as below var a = ['1','2','3']; // This would show the input that `map` feeds to the callback a.map(function(){console.log(arguments);}); // output of one of the lines: { '0': '1', '1': 0, '2': [ '1', '2', '3' ] } console.
Posts
MeaningFul and MeaningLess
There is an interesting effect: people tends to do, or even addicted into, the meaningless things, rather than the meaningful ones. For example, playing the game ‘clash of clans’ is actually meaningless, because everything is built on virtual data, which doesn’t make much difference to people’s life; but, however, it does make some difference to the player’s life: player has emotional attachment after invested a great amount of time into that game, and lots of time (which can be potentially invested into lots of other things) has been wasted.
Posts
Speed is the king
I’ve been always believing that.. Idea is cheap, because implementation is hard. While for simple ideas, implementation is not-always hard, esp. when developer only want to create a basic working example – i.e., not worrying too much about the detailed implementations.
It’s believed that.. for a simple idea, 80% of the features – the main feature, can be implemented within 20% of the time – and that’s the main functionality.
Posts
On Concentraion and Focus
Mr. Luo Yonghao’s Smartsian OS was published with Pre-alpha, and the outcome of that OS is pretty bad.
I read about the comments online, from Zhihu especially. There’was one post especially gained my attendtion. It says that Mr.Luo is not a kind of consistent person – he always try doing different things: English Teacher, English Education Agency, NiuBo website, Movie Director, etc. Everything time when he wanted to do something, he started really big – boast about how successful he can be, but the end result is usually not that successful.