10 Mar 2024, Bangkok
How to embed YouTube videos
Given any YouTube video, get the html fragment by clicking on Share > Embed > Copy
as per the images below:
Read More
Sat, 25 Dec 2021, Bangkok
Image courtesy of Sasin Tipchai
To learn a subject or a domain, it makes sense to learn from the masters of that subject or domain.
I’m trying to solve...
Read More
18 Dec 2021, Bangkok
On my little laptop, I have lots of books organized by tags. And when I’m interested in a particular topic, I’d go to that tag and browse it.
However, I also have a few favourites or...
Read More
29 Nov 2021, Bangkok
I was reading the manual for, AS - the portable GNU assembler
and found the following:
Mainly struck by two things: a) the ability of these...
Read More
29 Nov 2021, Bangkok
The kindly author of S2JS, a website for learning coding beyond Scratch, has created an amazing online clone of MITS Altair 8800.
And in explaining how to program the MITS Altair, he described...
Read More
20 Oct 2021, Bangkok
Policy
What is a good policy for logging in a microservices setup?
We start with policy so that it guides implementation. In the past I’ve just implemented logs here and there and it’s all rather haphazard...
Read More
The coming of self-driving cars
The self-driving car appears to be next big thing. All the major car manufacturers have them in one form or another. Even Apple is building one. A recent McKinsey article claims the...
Read More
I’ve always been fascinated with the idea of software components that can be easily wired together to provide new functionality. In a recent tech blog post, Netflix has gone further with the wonderful idea of self-assembly.
Why Self-Assembly
...
Read More
Motivation
Suppose you made some observations regarding the area of a house and its sale price:
Area = 1 , Price = 3 Area = 2 , Price = 7 Area = 3 , Price...
Read More
An earlier post described the proper initialization of JQuery Mobile and Cordova using $.Deferred of JQuery.
This post describes the initialization with Promises using Forbes Lindesay’s implementation. It turns out that using promises results in cleaner, simpler code.
...
Read More
userid+timestamp as key for user requests
The proper key for user requests is simply the user ID and timestamp.
In a recent application, the original key chosen reflected some internal data such as dates, target accounts, etc because I...
Read More
Storing dates
In Javascript, the following returns the UTC in ISO format:
x = new Date() x.toISOString() // 2014-11-30T23:51:12.287Z x.toUTCString() // Sun, 30 Nov 2014 23:51:12 GMT x.valueOf() // 1417391472287
valueOf() is the number...
Read More
The Cordova library ships with a standard method for binding events to deviceready. However, if JQuery Mobile is also used, it becomes tricky to bind to the JQM Mobile ready “mobileinit” event.
Below is the template code that solves this...
Read More
When writing client apps, we usually need to connect to the data server. However, this connection is typically different for production and test environments. This post describes a simple way I’ve come up with to solve this little problem.
The...
Read More