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.

Thursday, December 25, 2008

Javascript for Everything

Do you still think that Javascript belongs only in the web browser? Think again!
JSDB is JavaScript for databases, a scripting language for data-driven, network-centric programming on Windows, Mac, Linux, and SunOS. JSDB works with databases, XML, the web, and email. It is free and open-source. Use it as a JavaScript shell, to run CGI programs, or as a web server.
Do all your scripting with ONE language. JSDB is built on a standalone JavaScript shell for various operating systems, Linux, Windows, Mac. Suddenly, even web developers have the power to develop real applications without going into the complexities of Visual Studio.

With wxJavaScript and its numerous bindings for Curl, MySQL, etc, you can even put together powerful Windows based applications in a jiffy, and did I mention you only need to know JavaScript? No pre-requisite for Bash, ActionScript, Python, Tcl, etc.

CamStudio - Destop Video Capture

Have you ever wanted to give some step-by-step instructions to people on how to use some programs, or even their own computer, and get frustrated because you had to write lines upon lines of text, throwing in a couple of screenshots which most people have no patience to read or are unable to follow?

Desktop Video capture is the way to go. CamStudio deservedly came up tops on a Google search for "desktop video capture". There are lots of other software packages, but they either cost money, and they simply DO NOT WORK.

CamStudio works, and it's free. Best of all, it generates SWF output for you that you can embed into your website, or upload to Youtube right away. Consider making a donation if it helps you.

SquashFS on Cygwin

It's rather trivial to compile Squashfs-Tools under Cygwin. With this comes a host of benefits for developers, i.e. lay people can make their own modifications, and roll their own images without bothering the developers to run mksquashfs for them under Linux.

I know most people are not going to compile their own (although I don't see the big difficulty), so I have packaged the binaries for Squashfs 3.4, which are available here.

Anyway, this is the patch against squashfs3.4:

Update: I've submitted the patch to the official Sourceforge page:
https://sourceforge.net/tracker/index.php?func=detail&aid=2465952&group_id=63835&atid=505343
Index: squashfs3.4/squashfs-tools/unsquashfs.c
===================================================================
--- squashfs3.4/squashfs-tools/unsquashfs.c (revision 4)
+++ squashfs3.4/squashfs-tools/unsquashfs.c (revision 5)
@@ -49,9 +49,11 @@
#include <sys/time.h>

#ifndef linux
+#ifndef __CYGWIN__
#define __BYTE_ORDER BYTE_ORDER
#define __BIG_ENDIAN BIG_ENDIAN
#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#endif /* __CYGWIN__ */
#else
#include <endian.h>
#endif
@@ -252,6 +254,7 @@

void sigwinch_handler()
{
+#ifndef __CYGWIN__
struct winsize winsize;

if(ioctl(1, TIOCGWINSZ, &winsize) == -1) {
@@ -259,6 +262,9 @@
columns = 80;
} else
columns = winsize.ws_col;
+#else
+ columns = 80;
+#endif
}


@@ -2411,6 +2417,9 @@
if(sigprocmask(SIG_BLOCK, &sigmask, &old_mask) == -1)
EXIT_UNSQUASH("Failed to set signal mask in intialise_threads\n");

+#ifdef __CYGWIN__
+ processors = atoi(getenv("NUMBER_OF_PROCESSORS"));
+#else /* __CYGWIN__ */
if(processors == -1) {
#ifndef linux
int mib[2];
@@ -2431,6 +2440,7 @@
processors = get_nprocs();
#endif
}
+#endif /* __CYGWIN__ */

if((thread = malloc((3 + processors) * sizeof(pthread_t))) == NULL)
EXIT_UNSQUASH("Out of memory allocating thread descriptors\n");
Index: squashfs3.4/squashfs-tools/read_fs.c
===================================================================
--- squashfs3.4/squashfs-tools/read_fs.c (revision 4)
+++ squashfs3.4/squashfs-tools/read_fs.c (revision 5)
@@ -36,9 +36,11 @@
#include <sys/mman.h>

#ifndef linux
+#ifndef __CYGWIN__
#define __BYTE_ORDER BYTE_ORDER
#define __BIG_ENDIAN BIG_ENDIAN
#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#endif /* __CYGWIN__ */
#else
#include <endian.h>
#endif
Index: squashfs3.4/squashfs-tools/global.h
===================================================================
--- squashfs3.4/squashfs-tools/global.h (revision 4)
+++ squashfs3.4/squashfs-tools/global.h (revision 5)
@@ -71,4 +71,9 @@
typedef squashfs_inode_t squashfs_inode;
typedef squashfs_block_t squashfs_block;

+#ifdef __CYGWIN__
+#include <sys/termios.h>
+#define FNM_EXTMATCH (1 << 5)
#endif
+
+#endif
\ No newline at end of file
Index: squashfs3.4/squashfs-tools/mksquashfs.c
===================================================================
--- squashfs3.4/squashfs-tools/mksquashfs.c (revision 4)
+++ squashfs3.4/squashfs-tools/mksquashfs.c (revision 5)
@@ -49,10 +49,12 @@
#include <fnmatch.h>

#ifndef linux
+#ifndef __CYGWIN__
#define __BYTE_ORDER BYTE_ORDER
#define __BIG_ENDIAN BIG_ENDIAN
#define __LITTLE_ENDIAN LITTLE_ENDIAN
#include <sys/sysctl.h>
+#endif /* __CYGWIN__ */
#else
#include <endian.h>
#include <sys/sysinfo.h>
@@ -3161,6 +3163,9 @@

signal(SIGUSR1, sigusr1_handler);

+#ifdef __CYGWIN__
+ processors = atoi(getenv("NUMBER_OF_PROCESSORS"));
+#else
if(processors == -1) {
#ifndef linux
int mib[2];
@@ -3172,7 +3177,6 @@
#else
mib[1] = HW_NCPU;
#endif
-
if(sysctl(mib, 2, &processors, &len, NULL, 0) == -1) {
ERROR("Failed to get number of available processors. Defaulting to 1\n");
processors = 1;
@@ -3181,6 +3185,7 @@
processors = get_nprocs();
#endif
}
+#endif /* __CYGWIN__ */

if((thread = malloc((2 + processors * 2) * sizeof(pthread_t))) == NULL)
BAD_ERROR("Out of memory allocating thread descriptors\n");
@@ -3422,7 +3427,6 @@
return FALSE;
}

-
*new = init_subdir();
if(stickypath)
*new = add_subdir(*new, stickypath);



Here are some links to this topic:



Sunday, December 07, 2008

Speed Demon

Did I also mention I bought the Linksys WRT310N Wireless-N Gigabit router for $109 during one of the hourly timeslots at Sitex which allowed the first 5 customers to get a discount from the show price of $159 (RRP $199)? Not a bad deal considering the Dlink DIR-655 is going for over $200, and the Belkin N1 Vision is going for $225 as well. The 310 is just one step down from it's sibling 610 in terms of features. The 610 has an additional 5GHz radio which allows it to avoid the spectrum congestion in the 2.4GHz space, crowding with mircowaves and other wireless access points.

The irony of the matter is, my home network may be Gigabit enabled, but I cannot enjoy it!!! Because my laptop is NOT Gigabit! Sony SZ483N !@#$% has a Marvell Yukon (gigabit line) Fast Ethernet chip! My NAS is gigabit, my router is gigabit, and even my work laptop is gigabit! Argh!!! I guess this is what I have to contend with by going for looks. There is always something deficient about something small, slim and pretty.

Ahh, there is new firmware for my Linky. Time to dowload! Haha.

Saturday, December 06, 2008

Starry Escapade

I signed up with Starhub yesterday for their MaxOnline Express Plus. Comes with up to 8Mbps (usual disclaimer mumbo jumbo applies) download with SpeedBoost at selected partner sites of up to 100Mbps. A free home phone line and 1Mbps mobile broadband is also included. All for a price of $59.92. SIM card fee: $37.45, one-time service activation fee: $34.10.
Actual bandwidth is dependent on hardware, software, Internet traffic and destination server.
The cable modem provided is NOT 100Mbps (DOCSIS 3) capable. Which means you have to get your OWN DOCSIS 3 cable modem to be able to access Yahoo! (happens to be one of the partner sites) at 100Mbps. I have not been able to load any speedtest page successfully to test out my connection, but the intuitive feel is that Yahoo does seem to be faster than DSL. So does HardwareZone, and especially VR-Zone.

I got a nice big CDROM called MaxOnline User Guide. Inside the 650MB CD there is a grand total of 17.7MB worth of PDF files (only one actually). Is this necessary? I'd rather they provide a thumbdrive, it is more practical since the drive can be reused, and the manual tends to go out of date anyway.

A digression about how this 100Mbps thing is possible. Singapore has a local Singapore-ONE network which is powered by a speedy backbone. When accessing the SpeedBoost sites, you are actually accessing the local servers. The company itself does not have to own the servers in the localities concerned, even though Yahoo! itself may in fact own servers in Singapore. Akamai installs servers in Singapore that cache popular websites like Yahoo, CNN, etc. If you are interested enough, take a peek at the HTTP headers when visiting these websites, you will see that they are being cached by Akamai. However, you are still accessing the most up-to-date information from the main servers, because Akamai constantly checks with the main server for the most updated pages, and fetches new ones as necessary.

The 3.5G USB dongle for the mobile broadband is HUGE. Makes me just want to use my phone. Caveat: if i put the SIM card into my phone, I lose cellular connectivity as the 3.5G is for data only.

Sending SMS from the 3.5G SIM card costs 5 cents a message. I feel this has to be made more explicit. I knew about this only because I asked.

Does Starhub still practise port blocking?

Bummer: I called Singnet earlier today asking to terminate my Singnet account, and I was told I can only do that in Feb 2009! That means I will be paying an extra $33 a month for another 2 months. Any takers?

I'm escaping from Singtel into the demonic arms of Starhub, what kind of escape is that?

Wednesday, December 03, 2008

Servant Leadership

Heh. I simply have to talk about this - smart people think alike! I read this on Joel Spolsky's Inc article "How Hard Could It Be?: My Style of Servant Leadership"
management's job is to get things out of the way so that all the great people we've hired can get work done.
This is something I have personally believed in, and professionally practiced. A lot of managers simply assign tasks to their engineers/subordinates, set them deadlines, and left them as they were, nary lifting a finger to help, and reprimanding their people without even a clear knowledge of the situation.

I've always believed that my job is to remove the obstacles, administrative hurdles, red-tape, inefficiencies, and distractions so that my team can get their things done. Getting their work done is getting MY work done.

There is really so much I agree with Joel, as I went back to finish reading the article, a few more points struck a chord with me:
... working hard to make Fog Creek Software a place where authority and respect are earned and not bestowed. A place where management is an administrative function ...

Go on, read it! Print it, and paste it on your cubicle, facing outwards (if you have a boss), inwards if YOU are the boss.

Well, the reality of the situation is that I have not been completely able to focus on removing the obstacles - I still have to get my feet wet when the going got tough - I really shouldn't do this too much because I will lost my strategic value-add if this is sustained. We live in a world of constraints, be they natural or man-made and I guess we'd just have to work within those.

Tuesday, December 02, 2008

Netgear ReadyNAS Community

THE PLACE to get the inside scoop on everything ReadyNAS. Find previews and reviews of new features, tutorials, and information you won’t get anywhere else. Well, maybe you will, but not easily and not in one happy place like this. Do give us feedback on the ReadyNAS Community Forum and let us know if you would like to see topics not covered here. Enjoy!

Ejscript Embedded Javascript Language

Javascript, also known as ECMAScript, is the world's primary programming language for web sites and applications. The Internet "breathes" Javascript and with Ejscript, it can now be set free to become a language that exceptionally is well suited to embedded and web applications outside a browser.

Ejscript™ is a compact, fast and powerful implementation of Javascript. Use it in applications, devices, server side web scripting, or anything outside the browser that your imagination can dream up.

With classes, interfaces, optional strong typing, type checking, namespaces, modules, getters, setters, iterators and a rich system library -- Ejscript is the ideal language for a host of embedded applications.