18 December 2007

Job vacancy at 4RF

Software Design EngineerB.pdf

This is a new position, advertised on Seek and on the company's web site.

Review: Windows XP - Coding Sanity

Review: Windows XP - Coding Sanity

This is quite funny!

Stephen Colebourne's Weblog

Stephen Colebourne's Weblog

The strongest support was for Improving Generics, String Switch and Multi-catch. Attendees were giving a clear 'yes' to these being in Java 7.

I've been wanting to post about multiple catches for a while... I didn't know there would be such a strong demand for it!
Ok, for generics... the Java implementation (when compared with C#'s one) is just horrible.
But 'erasure' doesn't seem to want to go away

09 December 2007

Understanding dependency injection and Guice

crazybob.org: Introduction to Guice Video (Redux)

I've just seen the first 20 minutes, but it's sufficient for me to clarify:
1 - the usefulness of dependency injection
2 - how this new framework, designed by Google's Bob Lee, can help reducing the amount of code one needs to write, and more

From now on I will look at factories with suspicion...

07 December 2007

Back to ASM

I've been quite busy lately trying to get a simple dsp algorithm running on an 8-bit processor.
For the first time I've realized that it's probably more challanging for the compiler to output efficient code for such a small processor, rather than a bigger one, say an ARM.
No wonders why you can't easily find an open source toolchain.
I've been amazed by the unexpected number of assembly instructions a simple instruction can translate to.
And sometimes it seems the case that what wouldn't be the quickest way of doing things in C, translates in effect into a fewer number of assembly instructions.

22 November 2007

NZ$600 Asus Eee PC quick review

Breakfast tech review: November 21 (6:21)
Breakfast's tech test-driver Gary Steel reviewed the Asus Eee PC, a laptop designed primarily for Internet use.

20 November 2007

4RF on TV, as a success story

TVNZ, Breakfast Business


Download Video

Business Nov 20: Declining productivity (1:54)
New Zealanders may work some of the longest hours in the world
but latest statistics show that it is not translating into
increased productivity. In fact, workplace productivity is
declining.

19 November 2007

Open Inheritance versus Designed Inheritance

Final means different things depending on where it’s found. If you put it in front of variables, that means ‘constant’. Final variables can just be assigned a value once.

It’s different if it’s put in front of methods and classes. In that case it means that it closes them from being overridden through inheritance. A final class can’t be extended, and a final method can’t be overridden by methods with the same signature in derived classes.

I’ve just discovered that closing or not a class to inheritance is behind two different school of thoughts: Open Inheritance and Designed Inheritance.

Here’s a little introduction to these two different approaches:

http://martinfowler.com/bliki/DesignedInheritance.html

DSP... in Java

Interesting applications, entirely written in Java:

Sphinx-4 A speech recognizer
FreeTTS 1.2 - A speech synthesizer

And something else, that might come useful sometimes :-)
jMATLAB - an interpreter for the matlab language and a plugin for Eclipse

16 November 2007

java.util.zip

I've just discovered that this useful API has been present in Java since version 1.1.
That's good because I don't have to add any additional library to perform the task of zipping, that would steal some additional precious embedded storage room.
XML files are notoriously redundant so the idea of gzipping an XML file before saving it onto flash can lead to significant savings.

The only problem, I had to learn a bit more about the difference in Java between byte-based and character-based streams.
As you probably already know, these two types, byte and char, are different.
Byte is an 8 bit signed type, while char is a 16 bit unsigned byte. The reason for char is to allow support for internalization and localization by carrying character set information.
Some classes use byte based streams, some others char based ones.
The java.util.zip library uses byte based streams, so in order to interface it with character based classes (like an XML parser) I needed to use some sort of bridge classes.


Examples. To Gzip a String:

String str = ...;
ByteArrayOutputStream ba = new ByteArrayOutputStream();
GZIPOutputStream gz = new GZIPOutputStream( ba );
DataOutputStream os = new DataOutputStream( gz );

os.writeBytes( str );
os.close();

byte result[] = ba.toByteArray()



To UnGzip from an InputStream:

InputStream is = ...;
GZIPInputStream igz = new GZIPInputStream( is );
InputStreamReader isr = new InputStreamReader( igz, "ISO-8859-1" );
StringBuilder strb = new StringBuilder();
int c;
while(( c = isr.read() ) != -1 )
{
strb.append( (char)c );
}
String result = strb.toString();

12 November 2007

I'm loving unit tests!

Finally I get to appreciate Unit Tests. They greatly speed up development of network applications. Using Junit (4.4) I can easily set up any particular test condition in isolation. It has definitely advantages even on the powerful debugging capabilities of Eclipse for Java.

09 November 2007

Java Swing Survival Guide - Software Reality

Java Swing Survival Guide - Software Reality

This is an old but spot-on article that highlights the limitations of Java as a language for desktop applications. It also finds some qualities in it.
We'll see whether the latest development (SwingLabs, JavaFX) can give some hopes to Java as a language for desktop applications.

How to compare a Byte[] and a byte[] ?

I love collections in Java, they're so handy and I too think arrays should be deprecated.
But a lot of functions return just plain arrays.

So I happen to compare an array of objects Byte (returned by an ArrayList) and an array of plain bytes, returned by a ByteArrayOutputStream.
I know an array of Bytes is an array of p... ehm, references so its nature is totally different from the one of an array that contains primitive types.
But I wish there was a method to compare the two, so clever to do boxing/unboxing automatically.

Eclipse and Make projects on Linux

For some reasons, to build a project I have to run make with root privileges.
I love to run it from within Eclipse, so that the output from the console is piped nicely into the IDE. Before I thought I could safely run Eclipse as root for that purpose. That choice has caused though a lot of pain...
So I've looked for other ways like adding myself to 'sudoers' with no password, and adding 'sudo make' to the project compile settings
But Eclipse fails and returns an error like 'exec failed to run sudo make'.
A quick workaround I've found is to create an additional dummy makefile in another directory with the same targets as our make, and each targets just calls the real makefile, by prepending sudo to the make command, for example:

all:
cd .. ; sudo make all

The real solution to my problem would be not to have to run 'make' as root.
In order to do that I need to find a way to grant users privileges like running the 'chmod' command on files they don't own. There must be a way to do it...

07 November 2007

JavaScript To Fragment, The End Of The Reign Of The Browsers - Weiqi Gao's Observations

JavaScript To Fragment, The End Of The Reign Of The Browsers - Weiqi Gao's Observations

A very interesting point:

JavaScript has become an assembler of the web. And it needs to grow up. Or it risk being overtaken by other languages.

The browser platform is passé. The race for the next round of cross-platform (note: not cross-browser) internet applications (note: not web applications) has already started

26 October 2007

Guglielmo Marconi

There's a lot of juicy gossip on the wikipage of this Irish-Italian inventor of the telegraph.
Did you know that Mussolini was best man at Marconi's second wedding?

24 October 2007

A new article about 4RF on Computerworld

http://computerworld.co.nz/news.nsf/news/2A4BAAA69E7C7B6ACC25737900053629

4RF operates around the clock from NZ

Headquartered in New Zealand, the company has the ability to operate 24-hours a day, says Paris-based marketing director

By Ulrika Hedquist, Auckland | Wednesday, 24 October, 2007


Being headquartered in New Zealand is a competitive advantage, according to Wellington-based wireless equipment supplier 4RF Communications

Of the company’s 60-odd staff, 52 are based in New Zealand, where the company takes care of research and development, manufacturing, sales, marketing, finance and general administration, says marketing director Jarlath Lally. The rest are based in overseas offices in the UK, Dubai, North America, Malaysia and South Africa, he says.

The company, which designs and manufactures long distance point-to-point radio solutions, has the ability to operate 24-hours a day, Paris-based Lally says.

“Anything that comes at us during the day in Europe, say a quotation, a bid or customer issues, and we start working on here, can be passed over to our colleagues in New Zealand at the end of the day. When we wake up the next morning, things have moved on,” he says.

It gives the ability to create an “around the clock momentum” on the sales and customer service side, he says.

The company was founded in 1999 by chief technology officer John Yaldwyn. Yaldwyn was with MAS Technologies for 13 years, where he held senior engineering and management roles, before leaving to start 4RF. The company was really kicked off as an “R&D vehicle”, says Lally. Today, the company exports over 95% of its products. It has deployed solutions in over 140 networks and in close to 100 countries, he says.

The technology delivers communications capabilities to remote areas, and a lot of 4RF’s business is in developing countries that have the need to roll out critical infrastructure, he says. The system can link points up to 100 kilometres apart and deliver speeds up to 65Mbit/s.

One of the company’s main challenges is talking to regulators around the world and reminding them that the wireless technology does exist. “It is still extremely valid for mission critical applications in utilities, the oil and gas industry, in the public safety environment — police and ambulance networks,” says Lally.

While Lally is reluctant to name clients, he says the company has struck some significant deals recently in the rural broadband/telephony sector, the utilities sector and the oil and gas sector.

4RF invests about 20% of revenues in R&D, Lally says. The engineering core competence is one of the strengths of the company, he says, and the company is now looking to develop other types of network-related technologies that its customers are asking for, and to bring these additional technologies to the same customers.

4RF won the ANZ Wellington Export Awards last month and is one of 23 finalists in the 2007 New Zealand Export Awards, to be held in November.

My new blog

I've realised I never talk about work or what I discover while working.
I've been a programmer for about 5 years now, started with Digital Signal Processing (which I still love and would love to do) but later expanded to generic embedded software (C for ARMs), C++ (multithreading on Linux) and Java 4-5-6.
About Object Oriented design I love learning about Design Patterns and discovering more elegant and robust ways of doing things.
I'm an employee of 4RF Communications Ltd., an 8 year old company based in Wellington, New Zealand. It's a young, vibrant, mid-sized company and I feel very lucky to work for them.
What I'll write in this blog will not necessarily reflect the opinion of my employer.
By the way I'm starting this blog in English, so that everyone can read it :-)