From double-quotes to single-quotes

.

Inconsistency begets insanity. If every developer follows the agreed coding conventions, life feels more wonderful. When a string literal can be enclosed in single or double quotes (ECMAScript 5 specification section 7.8.4), often it helps to stick with one type of quotes. For example, jQuery code style mandates the use of double-quotes. Personally I prefer… Read more »

Rexx: one-based indexing and built-in tracing

.

A software engineer’s life is not complete without implementing a programming language. While I did create a lightweight BASIC interpreter targeting embedded systems eighteen years ago, I’m still longing to design and work on my own style of programming language. Looking around various languages which have the goals of being powerful and yet easy to… Read more »

Up close and personal

.

Work-life balance always fascinates me. After all, we all have personal and work email addresses for a good reason. Sometimes it helps to avoid conflicts of interests, often it is useful to draw the demarcation line between the career and personal life. Some people I know are very good at this, e.g. not doing any… Read more »

JavaScript branching and code shuffling

.

Modern CPU is equipped with a branch predictor to help with optimizing program execution. For example, a loop typically exits only once and the flow is kept inside the loop for a while (it’s called a loop for a reason). Since the terminal condition to quit the loop is only hit once, the loop predictor… Read more »

Primavera updates of Esprima

.

It’s spring, it’s primavera! Meanwhile, all your code are belong to us. On a more serious front, it’s been a while since I announced Esprima, the lightning-fast ECMAScript parser project. I already wrote a bit about the idea behind its development strategies, in particular since Esprima was one of my important FOSS focus last year…. Read more »

JavaScript object structure: speed matters

.

A common pattern to speed-up the performance of your JavaScript code is to leverage the optimized property access found in modern JavaScript engines. In fact, fast property access is a key in design elements of V8. It is also achieved in JavaScriptCore, the default engine behind WebKit, via polymorphic inline cache. Firefox enjoys the same… Read more »