Tuesday, June 16, 2009

Fun with acoustics


Usually it's about computing, but this this XKDC Comic suddenly comes very close to my professional interests. Though not for marking sharks I'm currently part of a team that develops an intelligent acoustic tag for monitoring instruments that are on the seafloor.
As far as I know it's the only really trace of humor I've ever found regarding underwater acoustics...

Thursday, June 04, 2009

And we call it 'Low cost small notebook PC' !


So Microsoft wants to rename the 'Netbook' to 'Low cost small notebook PC'. Great idea. (maybe also since Netbook is actually a copyrighted trademark from Psion..) I think everybody will be happy that this clumsy word will now be replaced by a much more descriptive term ;-) Maybe an abbreviated version ('LoCSNoP') could be used to make this new initiative a huge success like the previous smash-hit 'UMPC'
But why did they not take the opportunity when introducing Windows 7 to rename it to 'Mid priced GUI based operating system for personal computers and laptops, version 7' ?

Wednesday, May 27, 2009

Blog or advertorial ?


Being a long time fan of Jeff Atwoods Coding Horror I recently found myself annoyed for the very first time. Not by the content of his writing but by the way he uses links to books. Actually he discusses books a lot, and in general each book title is also a link. But it's a link to Amazon so I can immediately BUY the book. But that is seldom what I want. Unless the blog contains a thorough review of the book itself so the only thing left to do is read it yourself. But if you just mention a phrase and the title the link should lead to the book or authors website so you can find some additional info.
I know advertising is the main (only) source of income for professional bloggers but you should be aware that your are walking a thin line when balancing between credibility and commercial benefits.
And yes, that's the reason why there are no ads on this blog ;-)

Monday, May 11, 2009

User friendly, or friendly users ?


UI development has been a source for discussion. Books have been written, entire blogs are dedicated to it and when you start reading and digging deeper you'll just get to a point where you will become completely stuck. You'll think weeks about every single menu item, background colour gradient angle and button placement.
Yet I've written an application that has a UI that would not even pass the basic test for usability and I never had a single complaint about the interface! The menu structure is not really logical nor standard, dialog boxes for similar functions vary widely in appearance and their buttons are placed almost at random. And when you click 'Help' it just opens a .pdf document that contains only the very basic instructions.
All this happened because it started as an 'internal use only' application and grew by demand through the years. Functionality was added on the fly if someone required it to get a specific job done and often I just 'plugged in' a windows form from a different app just because that already contained most of the functionality of what I needed at that time.
And then suddenly the application was 'promoted' to end user software and supplied with an expensive piece of hardware and used by a slowly expanding group of people around the world. So on regular intervals I get feedback and requests for change but it's always about the functionality. A calculation is found incorrect, export functions should export more values, graphs should show more details and so forth. Never ever did somebody complain about the arcane data editing function, the strange menu structure or the crippled help.
The users are certainly not computer specialists. They are people whose main job is just to do measurements. They just need that software as an additional tool in a similar way they need a four wheel drive, rubber boots and ropes. And it seems they don't really care how it works, as long as it gets the work done.
"So I have to press the left mouse button three times while holding control, shift and F4 to get a printout ? Al right. I'll write it down."
And they will always do it like that. And if they have to instruct their new colleague it will give them a good feeling that they know this awkward combination by heart. My feeling is that they treat it like any other professional tool. You have to learn how to master it and it becomes part of your professional skills. I suppose that is the reason why Linux adepts stay enthusiastic about their operating system, even though they have to get to the command line and type their cryptic commands for anything but the most trivial tasks.
"So you can operate the LHC ? Big deal, I know how to get connected to my bluetooth phone from my Linux powered laptop !"
(Don't mail me about this last remark. I have no idea..;-)

Tuesday, April 21, 2009

Finally: One language, three worlds.

Eureka. At last. With the release of the System.Windows.Forms assembly for Mono a dream comes true. Well, this sounds a little over the top but it felt like that the first time I got my 'SimpleTerm' application running on Ubuntu. SimpleTerm is C# application for serial port (RS232) communication that I originally created for the PocketPC using SharpDevelop. By using only CLR functions that are available in the Compact Framework I could build an application that runs on a PDA and a desktop, unchanged!. So it was exactly the same bytecode on both platforms. Now this does not work on the Mono platform (although there seems to be a way to patch the bytecode itself) but after I imported the project into MonoDevelop and just compiled it, it actually worked ! Which could be considered as a breakthrough merely for the fact that it supports serial communication !. So it's not just a 'Hello World window' with an OK button but its a real application that even supports the most underappreciated form of digital communication. And I say 'underappreciated' because the RS232 specification was established in 1969 and it has been the main form of communication between computers for over 35 years. But it is only since the release of System.IO.Serialport in version 2 of the CLR that serial communication is really supported out of the box in a mainstream development framework. I know this is not an issue for most people, but if you are working with instruments and microcontrollers whose only means of communication is still plain RS232 it is a real revelation.
The image shown here is a combination of three screenshots, one of a PocketPC emulator, one from an Ubuntu system running within a virtual machine and one from a 'standard' Windows XP computer. The text in the main window of the application shows the result of a call to 'Environment.OSVersion' which indeed reports the operating system and version on all three systems.

Saturday, March 14, 2009

Creative AdWords


Usually I feel the 'intelligence' of Google is impressive. Almost every search I do leads me to the right pages within the first two or three results. And the ads shown on the right of the search pages are also often remarkably relevant. That's why the WTF page shown here really surprised me. (Yes, you hae to click on it to see the details). I saved it as a screendump, since it is unlikely that you would get the same results if you visited the original article now.
On the other hand, the WTF site is definitely a site for real nerds, so the first ad ('How To Pick Up Girls ?') might be in the right place after all.
For those of you that do not master the Dutch language: ad 3 and 5 both lead to shops that sell underwear. Clearly AdWords got mislead by the multiple occurrence of the word 'String' in the source code Which is strange if you realise that Google programmers are probably among the 0.001% of people whose first association to this word is 'string of characters'.

Friday, January 16, 2009

Is a €550,- Netbook still a Netbook?


With the introduction of the ASUS PC S101 you start wondering what the definition of a Netbook is. The S101 has a larger screen and a bigger keyboard and this of course is reflected in the price of approximately €550,-. Well, maybe I see it wrong, but for €550,- I can already choose from a myriad of different 'normal' laptops that already have a larger screen and keyboard. And way more storage capacity than the internal 32 GB SSD of the s101.
ZDNet defines a Netbook as 'A subnotebook computer that costs less than US$400 and incorporates an Intel Atom microprocessor'.
I would add to that the following:
- Weight less than 1.5 kg
- Runs from batteries for at least 4 hours
- Wifi
- Solid state disk
- Maximum 10 Inch screen

That's a netbook, or else it should just be referred to as portable computer.

Thursday, December 18, 2008

The Netbook Marketing Miracle


Once again proof that you should never be too sure about what the market does is shown in this article Based on his experience and market research the author very clearly proves that computers like the current generation of Netbooks never were and never will be successful. The funny thing about this is that is was written Michael Mace, a former employee of Palm Computing. And the company that is publishing it (Rubicon) actually advertises to be an expert in marketing. Now I'm not saying this company is not good at their work. It's more proof of the fact that nobody ever can predict what sells and what not. The most frightening thing for marketeers should be the fact that the product this article refers to (the Palm Foleo) was introduced in 2007 and was considered a flop end cancelled even before it was was ever sold. Yet it's difficult to see the difference between this box and the ASUS EeePC 700 which was introduced only a few months later. And a year after that Netbooks are responsible for almost 30% in all computer sales. So I wonder what Palm CEO Ed Colligan thinks when he reads back his this announcement.

Tuesday, November 18, 2008

Fun with shrinking URL services


Actually I was never even aware of the fact that there are services that allow you to abbreviate URLs. Until I stumbled upon them in Twitter. (Also a service I was not aware of, but that's a different story) Apart from the obvious 'Why Did I Not Think Of That' moment, the second thought that came to me is that it would be fun just to type in random combinations of letters, and see where it gets you.
So I started with rurl.org/aaa to find out what the best fishing spots are in Russia.
And I cannot read rurl.org/zzz , but somehow I think it has something to do with a jubileum.
Even funnier it is to use combinations that have a meaning, like my initials: rurl.org/caj which bring you a surprising technical paper by Scott Hanselman.
And of course rurl.org/sex , which does not bring you what you might expect...

(And if you want to know how it works, check out this article by Jeff Atwood)

Monday, November 03, 2008

Chair or no chair-man..

Not at all related to any of my blog entries, but just too funny to let it pass by unnoticed. This Chairman of the South African Finance Portfolio Committee proves that the national tv station indeed lacks the money for maintaining it's furniture.

Wednesday, October 22, 2008

Would you trust anyone with your passwords ?


For a while I've been using the Foxmarks Firefox extension. It's an excellent way to keep all your bookmarks in sync on every PC, even on my EeePC with Firofox under Linux. Once installed you can almost forget about it and it just does what it has to do in the background. Great. And then recently there was an automatic upgrade that asked me the following question : 'Do you want to use the Password Sync feature ?'
So I could synchronize my 100+ passwords on all my PC's too ? Great, I thought for a few seconds. Until I realized that this would imply that everytime I log on all my passwords are send to a central server. To a place I have no idea where it is. Controlled by a company I almost know nothing about. The 'About Us' shows some reliable names, including the famous Mitch Kapor, who's known to have so much money that he really couldn't care less about my ample savings on a foreign Iceland bank account. But what about the others ?
Of course Foxmarks says the passwords are safely encrypted. True. But how can I check that ? Well, I could probably check that using some network-spy software and a lot of hard work. But even if I were a hardcore hacker I would do this only a once or twice. Certainly not every time I use the service (then I would be better off by writing all my passwords on the back of my hand every day..).
And a year from now I probably don't even realize that I'm still using this feature. and the plug-in is updated automatically. So if for example a year from now update 30.134 is installed, and by accident this plug-in 'forgets' to encrypt the passwords ? Or it uses some type of encryption that is easy to decode by the Foxmarks programmers. Who may not be the same trustworthy team that founded the company in the first place as Foxmarks by then could have been purchased by a Nigerian Investment Company.

Friday, October 17, 2008

Silicone spray or Mortgages, both can kill the system

I'm not even sure Joel Spolsky thought of it when he wrote this article about the way commission based sales systems eventually always seem to backfire at the company, but the current financial crises is certainly the the biggest proof that this works on any scale...

Thursday, September 04, 2008

Speed up with Chrome

There is much buzz around the new Google Chrome browser. I suppose most of you have (like me) downloaded it, played around with it and then continued to use Firefox for everyday use. After all, the shiny clean look is impressive at first and the page preview look is fun, but the lack of (visible) UI elements and the fact you have to do without all your usefull plugins like Adblock, Foxmarks ,FireBug and Webdeveloper soon makes you return to Firefox.
And this is intentional. Chrome is not (yet) for everyday browsing. It's created as a platform for web-based apps. The importance of chrome is mainly in what you see in the image below.




These are the results of the V8 Javascript benchmark. The higher the score, the better. So yes, the Javascript V8 engine as used in Chrome performs roughly 30 times better than the engine in IE6. And this is really important these days, since Javascript is the engine that powers all these popular AJAX based web applications like Basecamp, Google docs, Flickr or Twitter. So, as predicted by Jeff Atwood in his article about Javascript, the speed of Javascript is going to be more important. And when you believe (as Google does) that the future of computing is in the browser, Chrome is the logical platform. What really surprised me though is that it lacks a 'full screen' function. After all that is what you'd really expect from a browser that is supposed to replace your desktop ?
And yet you still cannot launch any browser without having an operating system. And right now Chrome only runs on Windows...

Friday, August 22, 2008

Dreaming on: Chandler 1.0 released

You might not have noticed, but on August 8th, 2008 at 1:47 pm, Chandler, the ' "Note-to-Self Organizer", designed for personal and small-group task management and calendaring' finally came to release 1.0 ! Now Chandler is an Open Source project, and 80% of these projects probably never reaches this stage at all, but Chandler is a special case. It is created by the Open Source Application Foundation which was founded and and is sponsored by Mitch Kapor. The Chandler project is a unique example of where a project that has no deadline and an unlimited funding can lead to: unlimited development.
And no matter what finally comes out of it, the first three years of the project already gave us the magnificent novel by Scot Rosenberg : Dreaming in Code. A great book that may well outlive the software itself. It describes the development process from the initial idea upto version 0.7. Three years have passed then and Rosenberg realises he just has to draw the line himself and publish the book before the project is finished. And he was right. The book was written by the end of 2005 and so it has taken roughly two and a half years before they they finally came to version 1.0 . I'm glad he didn't wait for that, since by now I already read the book twice. I really recommend it to any developer, manager or just anybody using software (Yep, that's you by default, or you would not be reading this..).
Apart from it being really fun to read, it's description of ever shifting deadlines, continuously changing specifications and numerous code re-writes is so recognizable to me as a developer. Just check out Joel Spolsky's review to see what I mean.
And what about the software itself ? Well, I haven't tried it yet but the concept is great, though not as revolutionary as it might has seemed in 2002. As already mentioned in the book, 37Signals already provides most of the functionality as a web application. With all the benefits: no server maintenance, available everywhere through every browser and automatic upgrades.
But the Outlook / Exchange combination is still used in many corporate environments. And since Chandler is aimed at replacing that, they might still have a chance.

Thursday, August 21, 2008

Easy C


After reading this 'Daily WTF' I first laughed, but then I suddenly noticed the this particular line:
/* arithmetic operators */
#define MOD %

.. when I realised this actually solves one of my little annoyances that I had for as long as I program in C or C# : I never remember the 'modulo' operator !
Since it's not something you need everyday I always end up looking at some kind of standard C manual to find out what it was. And nine out of ten times I first hit a compilation error because I use the (non existent) mod(x) function. I think this has to do with the fact that the '%' sign is not in any way related to a 'real' mathematical operator like +, -, / or * . Probably the C language developers just felt that the modulo operation should be a keyword, and the % was the last unused character on the keyboard.
And what about the '==' versus '=' mistake, often marked as the most frequently made mistake in C programming ? Using just ' #define EQUALS == ' would really eliminate this type of error. So maybe there is something to say for this 'Better C'. If it helps you in writing programs faster because you it makes things look more natural to you, then why not do it like this ?

Wednesday, July 02, 2008

Serial communication on the EeePC

Whenever I get a new computer, or just anything that is programmable, my first thought is " Will it do RS232 communication ?" That's mainly because I'm working all the time with instruments and micro controller based systems whose main or only form of contact to the outside world is still plain 9600 baud 8N1 RS232 comms...
And for the EeePC the answer is yes.
I connected a fairly standard USB-Serial converter. This device is based on the Prolific 2303 chipset which is very common in most converters these days. The EeePC recognizes and starts it immediately, although this is not immediately obvious. The KDE desktop does not show any sign of activity, and there is no way you can even check it's appearance through the desktop. To be sure it installed, open a console and type 'dmesg'.
[Inline Rant]
(Don't ask me why almost everything on Linux requires typing 5 to 10 letter acronyms for tasks you never even knew existed.. [growisofs, nifd, mozplugger, fstab-sync ??? And these are just a few of the most popular commands.])
[Inline Rant End]
Well, if your USB converter gets recognized it will show up in the last couple of lines of text shown to you. And if so, it's available as /tty/ttyUSB0 (U-S-B-Zero). Now it's time to do something useful. First you will need a communication program, which is not available in the standard EeePC distribution (or 'distro') so you will first have to instal additional repositories: this entry on the eeepc wiki shows how.
Now just start the Applications->System->Synaptic, search for minicom, Cutecom or GTKCom and install it.
I started using minicom, but apart from this being a bit like going back to the eighties (It's a Procomm /Telix for DOS clone..), I could not get it to send what I typed. It did set the Modem Init string, and received all characters I was sending to it, so I assume my USB-Serial adapter works.
So I moved to Cutecom, and this works fine. Cutecom is pretty simple and straightforward, but that's merely a plus if you use it on the rather limited screen of the EeePC.


EeePC is here !


It's obviously the most desirable gadget of the moment. The ASUS EeePC with it's 7" screen, small but complete keyboard and it's beautiful 'Pearl-Shine' white finish. And it's also a real computer. 900Mhz Intel Celeron, 512 MB RAM, 2 Gigabyte flash hard disk, WLAN, Ethernet, VGA output and 3 USB connections make this little box a full fledged PC with capabilities one could only dream of a few years ago. It comes with a Linux OS, and it boots in something like TWENTY seconds. It has many pre-installed apps, like the complete OpenOffice suite, FireFox and Thunderbird, so 90 to 100% of your daily work is covered. And that's what it's for. I think if you buy it as a'multi purpose' desktop PC replacement and expect to work exactly like your WindowsXP machine you're missing the point (and you get rants like "I hate my EeePC"). Nobody complains about his multi media phone not being able to run OpenOffice. That's not what it was designed for.
On the other hand, if you are a geek like me and are tempted by the possibilities of this platform then there is plenty of room for experimenting. But I'll keep the original setup intact because that's really ideal if you want to get some work done in confined spaces like an airplane chair on a low cost flight..

Monday, May 26, 2008

Too hard, or a challenge ?

Quote:

'it's a fun programming exercise that you're doing because it's just hard enough to be interesting but not so hard that you can't figure it out.'

Never thought of it that way, but this is indeed the kind of project I like to do most. And if most programmers are like me they will always tend to bend a projects towards this edge. If it's too simple we'll add functionality that creates new challenges. And if it seems just to hard we try to figure a way around it (buying a third party library or let someone else do it..) so we can spend more time at the things we like, like the slow fading in and out of our super-fancy splash-screen...

Friday, April 25, 2008

Arcade Games

So I'm not the only one. I already tried to explain in one of my previous posts how I felt about Arcade gaming, but if you read Jeff Atwoods blog about the subject you know exactly. I could not have said it better.I think the only difference between me and Jeff is that he needed a car to get to the arcade, and I could go by bike...

Tuesday, November 20, 2007

The Mysterious Breakpoint

(Or how even Microsoft programmers sometimes forget to clean-up..)

While working on a piece of software that relied on a ActiveX control, I regularly found my debugger stopping at an address somewhere in memory that was not part of the program. First I tried to find out where the bug was, then I found that just continuing the program worked fine, and that there were apparently no side-effects. But it kept stopping there, no matter how much of the debugger features I disabled. So I decided to get into it a bit deeper and found out it always stopped at an address named 'DbgBreakPoint' in module NTDLL.DLL. It looked like it stopped on a breakpoint, but not one that I had set. And the 'Disable all breakpoints' option in the Borland C++ Builder debugger did not make any difference. It really looked like Microsoft forgot to remove a breakpoint from one of the most important DLL's in Windows. A bit of Googling made clear that this was indeed the case, and also that it was not easy to get around it. Patching NTDLL.DLL appears impossible since it is one of the most 'protected' core-pieces of Windows. If you try to modify it, Windows will just 'restore' it on start-up. And if you are clever and modify the backup copy it uses for this restoration, Windows just won't start at all...
So the only way around seems to 'patch' the DLL in memory after it is loaded by your program by overwriting the memory location containing the breakpoint with a 'NOP' instruction. Here is the function to do it:

void PatchINT3()
{
unsigned char NOP=0x90;
void* pNTDLL;
DWORD BytesWritten ;
FARPROC Address;
if (Win32Platform != VER_PLATFORM_WIN32_NT){ return; }
pNTDLL = GetModuleHandle("NTDLL.DLL");
if (pNTDLL == 0) {return;}
Address = GetProcAddress(pNTDLL, (LPCSTR)"DbgBreakPoint");
if (Address == NULL){ return;}
unsigned char Byte= *(char *)Address;
if (Byte != 0xCC) {return;}
try

{
if (WriteProcessMemory(GetCurrentProcess(), Address, &NOP, 1, &BytesWritten))
{
if(BytesWritten == 1)
{
FlushInstructionCache(GetCurrentProcess(), Address, 1);
}
}
}catch(EAccessViolation &E){}
//Do not panic if you see an EAccessViolation here, it is perfectly harmless!

}

I suppose anyone who got to here has enough knowledge of Windows programming to see how it works :-)
And so, by calling PatchINT3() at the start of the program the breakpoint is erased and won't show up again.
(Thanks to Peter Morris at HowToDoThings , who wrote the Delphi version that I translated here)