Skip to content

{ Monthly Archives } November 2006

Mobile Java

In the previous post I described what I call “Assembly Java”. The name itself, Assembly Java, is paradoxical (oxymoronic) through the opposition between a high-level programming language (Java) and a low-level programming style (‘assembly language’). The previous post was intended, I guess, as a (subtle) critique of Java used as a low-level programming language. In [...]

The 10 principles of Assembly Java

Assembly Java is a particularly economical and efficient style of usage of the Java language. These are the principles of Assembly Java: #0: Define as few classes as possible. Ideally, use a single class. How: Pack as much as possible in each class. Merge conceptually-unrelated classes together, when possible. Why: Every class incurs a space-overhead [...]

The rise of the dot-org

Here I show why the .org TLD will grow in standing and reputation, eating from .com’s domain market share. TLD means Top Level Domain, such as .com and .org. CC-TLD means Country Code TLD, such as .de and .uk. (source) This graphic shows the evolution of the total number of domains, per TLD, in time. [...]

MIDP over JavaSE

This is a topic I posted on the Mobile and Embedded forum: There is a need among midlet developers for a ‘phone emulator’ which runs in a (desktop) web browser. This would allow the developers to demo their midlets on the web, and allow the users to try/test the midlets before installing them on their [...]

JavaME open source

It’s old news now, since a week (since 2006-11-14) a first piece of JavaME has been open-sourced by Sun under GPL, under the name PhoneME (Mobile and Embedded). First of all, this is a great move, thanks Sun. The license (GPL) is ok, even though it could have been a more liberal one like Apache, [...]

Development as a series of Expansions and Contractions

Software development can be seen as an iterative process where each iteration consists of an Expansion followed by a Contraction. An Expansion consists in implementing new features as quickly as possible. The focus is exclusively on getting the new features to (somewhat) work. This may be seen as a prototyping of the new features, because [...]

Implementing the lgamma() function in Java

The gamma function is the extension of the factorial to real numbers (n! == gamma(n+1)), and it’s a very important function in mathematics. Gamma(x) grows very quickly (similar to x**x), that’s why lgamma(), which is the logarithm of the gamma function, is often used instead. In the discussion below, I’m only considering the lgamma(x) on [...]

Java horror

This is life without enums, macros or function pointers: static final int SIN = 1, COS = 2, TAN = 3, ASIN = 4, ACOS = 5, ATAN = 6, SINH = 7, COSH = 8, TANH = 9, ASINH = 10, ACOSH = 11, ATANH = 12, EXP = 20, LOG = 21, LOG10 [...]

Good old factorial

A simple routine for computing the factorial in java, with good speed and low footprint. static final double factorial(int n) { if (n < 0) { return Double.NaN; } if (n > 170) { return Double.POSITIVE_INFINITY; } double x = n, tail = x; switch (n & 7) { case 7: tail *= –x; case [...]