Sunday, March 21, 2010

New Resolution - Pick up Distributed Version Control

I'm starting with Mercurial, because Joel Spolsky wrote a tutorial on it. I admit I had a hard time trying to pick up Git and Perforce (is that a DVCS?), but I am starting with Mercurial.

I've just started on the first chapter at hginit.com.

Thursday, March 18, 2010

Mercurial is a modern, open source, distributed version control system, and a compelling upgrade from older systems like Subversion. In this user-friendly, six-part tutorial, Joel Spolsky teaches you the key concepts.

Wednesday, March 17, 2010

Collection of Code Snippets

Why do programmers/developers bother to rewrite the same code skeletons all the time? Do it once (or not at all), share it, and benefit from others' contributions!

Monday, March 15, 2010

JQueryUI - Superb GUI Toolkit

There are a lot of tool-kits and software that are purportedly very powerful, flexible, feature-packed etc. But most of them are rather difficult to setup, or have a steep learning curve, or lots of documentation to read,

... ... or ... ...

all of the above.

JQueryUI is the first tool-kit I've used that has instructions in a few succinct lines that I can easily understand, use, and just get it to work!

Highly recommend JQueryUI (and of course, JQuery) for all web GUI development work.

Thursday, March 11, 2010

Python Tools for Web Form Interaction

If you are like me, who, needs to write custom automated testing software to interact with devices with web interfaces, the tools you choose will definitely make a big difference to your productivity.

I've discovered ClientForm

... a Python module for handling HTML forms on the client side, useful for parsing HTML forms, filling them in and returning the completed forms to the server.
that is very good news for me, since I have to automate several tasks working with devices that provide only an interactive web interface. Activities like logging in, updating code, resetting the device, etc, that require more complicated mechanisms like cookies, hidden fields, and random nonces, prohibit the use of statically configured form submissions.

I had started off sniffing and dissecting web pages to manually discover the required information to submit dynamic forms. This activity can take me a whole day for just a simple user interface login. ClientForms, by doing all the hard work of parsing the form, has enabled me to cut this down to 15 minutes. I guess the only difficulty remaining is with forms being manipulated by Javascript during submission. I am still learning more about ClientForms but there is much more in the Python community (and for that, Perl) that can be harnessed to make life for programmers more productive.

I shall leave you here. In a subsequent post, I shall share some of the other tools that I have found, and also some history of my programming experience.

Thursday, February 18, 2010

Dell Internal Wireless Channel Problems

I've had a hair-pulling week trying to setup a couple of new wireless access points in the office.

Using the default of auto-channel selection on the AP, it selected channel 1 to be the cleanest channel. However, all our Dell Latitudes D610/D620/D630 did not manage to "connect" to the AP when using the internal wireless card.

My mobile phone could connect fine, so did an external adapter. Only the internal wireless didn't work.

I brought the AP back home, and it could connect flawlessly. I brought it back to the service center, and it worked too.

Then I tried changing the AP channel to some other channels and I was able to connect. Is there something with older Dell Latitudes with working on channel 1?

Sunday, January 10, 2010

Canon P-150


Despite the 'P' Prefix, this is a scanner, not a printer.

I just bought this from Challenger yesterday instead of ordering it from Amazon and having it shipped. The difference is about $80, good enough for a cool date night out in town.


Change default input method on Windows Mobile

Changed the default input method on my Omnia2 (WM6.5) from the Samsung keyboard to Swype.

Set HKEY_CURRENT_USER\ControlPanel\Sip:DefaultIM to "{7D51A54F-14D0-4eda-AC8D-0AE175C344E8}".

Follow the link in the title for the post where I first saw this information. I'm going to reproduce it here:

  1. Run registry editor on the Windows Mobile device.
  2. Navigate to the following registry key:

    HKEY_CURRENT_USER\ControlPanel\Sip

  3. Locate a registry entry named DefaultIM. Change the string value data for DefaultIM to the following CLSID according to your preference of input method.

    To make Letter Recognizer as default input method
    {42429690-ae04-11d0-a4f8-00aa00a749b9}

    To make Block Recognizer as default input method
    {42429691-ae04-11d0-a4f8-00aa00a749b9}

  4. Soft reset the device after change to make the new default input method effective.
  5. To revert and change back to the default original Keyboard input method, the value data of DefaultIm for keyboard is {42429667-ae04-11d0-a4f8-00aa00a749b9}.

If you have other input method, most of its CLSID is stored at HKEY_CLASSES_ROOT\CLSID registry key branch. Locate the full complete CLSID for the input method, and change the “DefaultIM” value data accordingly to set different input method as default to use and activate in Windows Mobile device.

How to disable "message sent" bubble in Omnia2

Omnia2 from M1, Singapore, running Windows Mobile 6.5. Searched high and low on the Internet, but all the forum postings are copied from the same two sources, including the typos.

Tried setting these keys to '1' but still to no avail.

HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Settings:SMSNoSentMsg
HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Settings:MMSNoSentMsg

Somehow, Samsung's own messaging application is not reading these settings.

HELP!

Omnia2 Tweaks + FAQs

Click on the link in the title ...

This is a comprehensive list of very useful tips for the Omnia2. Start here for more information.

Omnia2 - Enabling the Lunar Calendar

Edit registry key: Hkey_Local_Machine\Software\Microsoft\Calendar

Set "ShowLunarCalendar" to 1

Open your calender program and click the on right-bottom Menu -> View -> Lunar

Windows Mobile /WinCE Registry Editor

On my Omnia2 running Windows Mobile 6.5, I am using Schap's Registry Editor for WinCE (click link in the title of this post). This is good for editing registry keys which remote editors are not allowed to access/change, probably denied by ActiveSync.

CERegEditor runs on the desktop PC connected to the Windows Mobile phone (I'm doing this via ActiveSync/USB). This is very useful for "downloading" large sections of the registry to find where certain configuration settings are stored.

Omnia2 - Change Touch Vibration Strength

Omnia2 (GT-I8000) running Windows Mobile 6.5 has a vibration feedback for taps on the screen. It happened to me suddenly, that the vibration was gone, even when I enabled it in the Settings, Sound Settings, Touch Alert, Alert (set to "Vibration" or "Sound + Vibration").

Searching the Internet for this turned up more noise than signal. So, digging into the registry, I found this key HKEY_CURRENT_USER\ControlPanel\VibeTonz.

It turned out that the strength of the vibration could be configured, and it was set to 0.

TouchVibeStrength (DWORD:0-5) controls the strength of the vibration.
TouchSoundOn enables sound feedback.
TouchVibeOn enabed vibration feedback.



Disable Threaded SMS on Omnia 2

Device: Omnia2 (GT-I8000)
OS: Windows Mobile 6.5

Get a registry editor (I used CERegEditor by mdSoft)

Open the key HKEY_LOCAL_MACHINE\Software\Samsung\JINBOX. Samsung's messaging application are stored inside here.

Set "ThreadedViewDisabled"=dword:00000001

Friday, December 25, 2009

Mobile Transition - Nokia E65 to Samsung Omnia2

Traded in my Nokia E65 for the Samsung Omnia2 (GT-I8000) on Christmas day 2009. Switched to M1 from Singtel.

Original contract price: $398
SunSaver Plus discount: -$100
Data Plan discount: -$100
Switching from Singtel: -$100
E65 Trade-in: -$100
Final amount paid for handset: $0.

Still getting used to the phone and applying numerous registry hacks. It's not all that bad actually ... getting an iPhone just ties you in to a fixed user experience. I still prefer some flexibility and the ability to get under the hood.

I'm quite sure you can get under the hood for the iPhone and Andriod phones as well. And I agree: Windows Mobile is slow and laggy, but somehow, only on Samsung handsets. HTC phones with lesser hardware specs seem to run circles around my Omnia2. Sigh.

Tuesday, June 23, 2009

Speed Up SSH Logins

  1. Disable UseDNS
  2. Give the -u0 option in /etc/default/ssh
SSHD_OPTS=-u0

Monday, March 30, 2009

DD-WRT on DIR-300

I wanted a standalone AP-client/Ethernet converter/Wireless bridge. I couldn't find a suitable product on the market (with my budget of < US$50). The products I did manage to find were either too expensive, too old, not available, or too over-featured (remember you heard this term here!).

Well, there were a few: like the Zyxel G-570S which cost S$99 (too expensive), Engenius ECB-1220R which was not yet available (but the price seems alright at S$75). Asus WL-320gE/WL-330-gE looked like they fit the bill too, but was too expensive.

The Linksys WGA54 was an obsolete, EOL product. Last firmware was in 2005, and it doesn't support WPA. I bought 3 of them only to find out that they worked quirky too. There was no way to get the signal strength, for example.

I came back to something that I've overlooked for a while, because the published product specs didn't support an AP client mode - the Dlink DIR-300. It was based on an Atheros AR2317 which IS supported by DD-WRT, which had client mode wireless, which was a full linux distribution (something which I was right at home with), and it was both CHEAP (S$50) and readily available. So I popped over to Challenger on the weekend, bought one unit, and brought it into the office today to get it converted.

It wasn't too daunting after all. It took me a few tries and reboots to get the DD-WRT firmware properly flashed onto the board, and a couple more steps later we are in business. I got my wireless AP client up and running.

I was able to connect to an AP using WPA2-PSK via the webpages. The only complaint I had about the interface was that it put the onus of knowing the security settings on the user, and did not detect the suitable configuration for the AP. It had telnet (how about SSH?), but the username and password did not match the web-based login. AP scanning works well. I could use the iwconfig and iwlist commands to scan for access points and get the signal strengths. Just perfect for my wireless testing. I could even do performance testing from the router itself.

Acknowledgements

Thursday, February 19, 2009

Elektra

This is what I have always been talking about (but failed to achieve/implement/convince). It's way overdue that application programmers use a common library API to manage configuration settings instead of having to reinvent the wheel a million times. I have heard all the arguments before, and I have an explanation for each and every one. So come on and flame me, but of course I would rather have an engaging discussion.

If Elektra were a girl, she'd be the one I'd marry. (based on first impressions till date)

Overview of the Elektra Initiative

Elektra is a universal hierarchical configuration store, with related goals like GConf and the Windows Registry. It allows programs to read and save their configurations with a consistent API, and allows them to be aware of other applications' configurations, leveraging easy application integration. The whole point of it is to tie applications together, so that they can co-operate and share their user-preferences.

The developers are associated to unix philosophy and the very practical point consists of writing a configuration library. Every software needs this functionality, it is not easy to do it right and performant and we want to avoid any unnecessary code duplication.

major focal points

  1. API implementation to access the key/value pairs namespace with a variety of Backends and Bindings
  2. Definition of a standard key/value pair hierarchy, namespaces and semantics
  3. Produce quality patches for popular softwares as X.org, Samba, KDE's KConfig XT and Gnome's GConf

Sunday, January 04, 2009

AVG Antivirus Accidentally Kills Windows

Saw this on OSNews.Com. Users of AVG Anti-Virus beware:

Dutch, French, Italian, Portuguese, and Spanish users of the popular anti-virus software AVG have discovered a nasty surprise. AVG has mistakenly identified a core Windows system file, user32.dll, as a Trojan, and summarily deletes it, b0rking Windows. AVG has announced they're working on a fix.
Interestingly, I cannot find this on AVG's website, neither in the News or Updates section. So judge for yourself.

The Brains and Bones of my NAS

I've just found this article on AnalogZone featuring the custom ASIC (IT3107) of my Netgear ReadyNAS Duo, which contains a SPARC-based core along wth integrated NAS circuitry. Apparently the IT3107 supports 4 SATA controllers (argh, I should have gotten a 4-bay NAS instead, but the cost would be prohibitive at this stage).

Here is an excerpt from the article on some of its major features (I didn't know this before):

Infrant's basic concept is to integrate all the functions required to support a small RAID array with the electronics required to put the data on a 10/100/1000BaseT network, and to throw in a print server function for good measure. They've already rolled out a product to address the higher-priced SMB-level market which supports up to eight SATA drives. They're now introducing the ExpandaNAS IT3107, a consumer-grade device with half the SATA drives for the SoHo and consumer market. Depending on what works best for your needs, Infrant will happily sell you either the raw chip or a complete OEM-able board that only requires a case, power supply and disks. And power won't be too much of a problem since power consumption for the IT307 is only 5 W.

Powered by a 32-bit SPARC-based RISC core (with several extensions that we'll look at shortly) the chip supports RAID 0/1/5 operation for up to four SATA drives. Its network connection is a single Gbit Ethernet port. A PCI host interface and a pair of USB interfaces for supporting peripherals such as printers complete the I/O complement.

Rather than pass disc data through the CPU, its disc interface bypasses the PCI bus and uses DMA to shove blocks of data from the drives to the on-chip 64 bit DRAM controller. This leaves most of the SPARC's processing power available to manage the disks, handle the print serve tasks, and support its GbE connection at full rate. Infrant has also enhanced the chip's performance by beefing up the SPARC processor's instruction set. While its instruction set is still SPARC v8-compatible, the processor has had the way it executes several instructions optimized to keep critical segments in the fast lane. They also equipped the CPU with additional hardware logic including a hardware table walk-through for lookups, a lock-down cache, and a 3DES encryption core.


For Sale - Asus Pundit-R Barebone

I'm letting go of my Asus Pundit-R barebone of 3 years (see the specs on the right).

It is basically working, but intermittently does not POST (I found that taking out the cover helps), probably due to a loose SDRAM chip or slot.

Make me a reasonable offer (my reserved price is SGD$150), and I will include a ViewSonic 15" CRT monitor (needs 5mins to warm up), Western Digital Jumbo Buffer (8MB) 60GB and Pioneer DVD Rewritable into the bundle. Make me a good offer and I will throw in my Canon D646ex flatbed scanner.

Note, there is no bundled Windows OS. I can install and update Ubuntu for you if you like. I have been running the machine as my Linux workhorse.

Please leave a comment or email me privately at cohawk (at) yahoo (dot) com.

Saturday, January 03, 2009

Run Multiple Versions of Internet Explorer AT THE SAME TIME

Anyone who has been a web developer for any amount of time would understand how tricky it is to get web pages to render correctly on different browsers, especially when the user base has a varied installation of browsers.

Installing a new version of IE replaces the previous version, so this is not encouraging at all for the adventurous (of which developers by nature are) who like to install cutting edge versions of software to test drive.

I've just thought about this problem myself, and viola, it turns out that I am too late! The problem has already been solved.

Here's a quote from TredoSoft:

Ever wanted to test your website in various versions of Internet Explorer?

It is possible to run Internet Explorer in standalone mode without having to over-write previous versions thanks to Joe Maddalone who came up with a way of achieving that in November 2003. Basically, Internet Explorer is run by exploiting a known workaround to DLL hell - which was introduced in Windows 2000 and later versions - called DLL redirection.

Get the Multiple IE installer.

Monday, December 29, 2008

Sick of Singapore ISP Bullshit

First it was Singnet and their "nobody needs more than 21Mbps" rubbish. Then Starhub is finding excuses for their inability to handle congestion from multiple users in the same area.

All the things mentioned in this page are true. But, it is a deliberate attempt to confuse users to prevent them from knowing the real truth.

I just signed up with Starhub's 8Mbps MaxOnline Express Plus plan, which comes with a complimentary 1Mbps mobile broadband plan. I've found that the mobile broadband was actually FASTER!

This is not the first time I have noticed this, but today I have decided to take down my results.

Using 2Wire's SpeedTest I obtained 3 readings from mobile broadband and cable modem each. The time was around 9pm today (Monday evening).

With mobile broadbamd, I had:

1.17Mbps
1.21Mbps
1.33Mbps

With cable modem, I had:

161.40kbps
190.70kbps
127.50kbps

Surprisingly, I am getting the full download speed from my 1Mbps mobile broadband connection, which is 10 times faster than the supposedly much faster 8Mbps cable connection.

No more excuses, Starhub. I have performed

  • the same test from
  • the same website at
  • the same time period
with astonishingly different results. Try explaining your way out of this one.