Archive for the ‘Technology’ Category
Review of iOS 4 on iPhone 3G
I’ve just updated my iPhone with the new iOS 4 firmware yesterday and here’s a short review.
There has been lots of commotion about multi-tasking but I’m not the least concerned — not because I am not getting it on my iPhone 3G, but because I don’t see a need for it with the type of apps I use. Mail and Google Maps in the background doesn’t make sense. I might change my mind if there’s a good IM client someday.
For now, the only useful features are shown below.
- iOS 4 Folders
- iOS 4 Spellcheck
- iOS 4 Zoom
IPv6 over IPv4 (6to4) all up and working
Yes, I’ve set myself out to learn IPv6. I thought it was simple – or at least with my understanding of IPv4. I was completely wrong! IPv6 has a much more complicated addressing scheme and “rules”. It requires a change of mindset for a start. The worst part? Getting it all to tunnel through IPv4 when you’re running dynamic IP.
Anyhow, I’ve got my Linux (CentOS 5) box working and my home network is now “IPv6 ready” (hooray!) but I’m still tweaking the settings so I’ll update the technical stuff later.
Some little bits about IPv6 I’ve learnt so far is that DHCP servers aren’t really required anymore. Interfaces can self-assign an IP based on their MAC address and this will be almost certainly unique (since MAC addresses are unique). Even in a controlled network, the interface would assign it’s own address.
Meanwhile, here’s my traceroute to ipv6.google.com.
traceroute6: Warning: ipv6.l.google.com has multiple addresses; using 2404:6800:8005::63
traceroute6 to ipv6.l.google.com (2404:6800:8005::63) from XXXX:XXXX:XXXX:1:217:f2ff:fe40:3848, 64 hops max, 12 byte packets
1 XXXX:XXXX:XXXX:1::1 0.534 ms 0.392 ms 0.410 ms
2 2002:c058:6301::1 199.142 ms 199.858 ms 199.485 ms
3 2001:470:0:13b::1 201.157 ms 200.728 ms 198.965 ms
4 2001:504:d::1f 197.870 ms 199.858 ms 199.927 ms
5 2001:4860::1:0:21 290.454 ms 203.619 ms 264.787 ms
6 2001:4860::1:0:77d 220.451 ms 220.804 ms 436.060 ms
7 2001:4860::1:0:75 511.964 ms 511.896 ms 320.166 ms
8 2001:4860::1:0:16 703.447 ms 399.187 ms 624.945 ms
9 2001:4860::2:0:119c 511.687 ms *
2001:4860::2:0:119b 529.863 ms
10 2001:4860:0:1::e3 403.409 ms 517.593 ms 400.969 ms
11 * * *
Hop 11 seems to have packet filtering and dropped my traceroute.
I’ve also masked my internal LAN IP to XXXX:XXXX:XXXX otherwise somebody could connect back to my LAN segment. I haven’t had time to figure out the firewall yet. But you can say this is the beauty of IPv6. With a 128 bit address space, every machine has a public routable address.
Once I have my home network all ready I will begin transitioning all my servers to IPv6. Embrace technology.
Second last CS3216 blog, lah!
OK, Prof. Ben is chasing me for a blog and since I’m sitting here (at work, at this hour) waiting on a colleague, I shall write a short entry. I realized I haven’t been blogging for a while and my 105% honest excuse is that my manager went to Sungei Gedong Chalet (a.k.a. Reservist) so I was busy as hell covering some of his work.
So here comes the second last blog entry. Aheem… (clears throat)
I’d love to thank my wife, mother, father, etc. and of course Prof. Ben for inviting me to attend this class out of nowhere. I truly enjoyed my time and learnt a lot of things. Actually, I joined the class with the aim to learn anything, or what Prof would call “random stuff“, not to develop Facebook apps. I’ve actually had enough of Facebook apps back in 2007 where I worked in a small company dealing with some very first Facebook applications being made out of Singapore, although building an app for others and building an app for yourself is a different thing altogether.
So what have I really learnt? I’ve learnt that my English sucks after four years of being bombarded by Singlish in the local workforce. I’m actually struggling to write a proper blog entry every time.
I’ve also learnt that I’ve lost touch with the geek world. I didn’t even know what Google Wave was. I’ve never heard of Prezi, and I’ve never heard of DropBox. There’s probably about 100 other things I’ve never heard of that I found out during these 13 weeks.
I’ve also found out that damn NUS students can talk and present! Sorry lah, but to the outside world NUS students are either like nerds or CMI.
I’ve also found out that a year 1 freshie can actually learn ActionScript 3 build a Flash game within 1 week.
So there are super things that people can do that you’ve never thought was possible. But, now I know the power to create lies within, and I finally kicked myself in the ass and learnt how to build stuff in Flash. So, yes, I picked up a new language. Programming language, not French.
I also face new challenges trying to get things done. I think it’s a little different everywhere. Back in Polytechnic, it was either nobody cares, or maybe I cared too much. Yufen once said doing project a with me gave her “满足感多多,成就感少少” (great sense of satisfaction, no sense of achievement. Did I translate right?) because I practically wrote most of the code and we’ll all get an ‘A’.
Then at work you could K people ‘cos they either deliver the goods or get fired. It was the root of all evil at work. $$$
Then in NUS it was also different – everybody cared too much, but was too busy. Like Prof. Ben said, this is not the typical NUS class. OK, I buy his explanation.
So anyway, CS3216 is a weird class, but I guess it’s weird in the right way.
Back to work…
Advertising as a Monetization Idea
I was chatting with a few folks who made the pitch last Friday and it seems a lot of people think selling ads is the only way to make money.
While Google probably made close to $100m in Singapore selling advertising alone, I still think citing pure advertising as a form of monetization is an extremely bad idea.
Advertising is an extremely crowded space. Search engines are doing it, news portals are doing it, forums are doing it, social networks are doing it, so where do you stand in this crowd, especially if you’re a new startup?
Instead of looking to sell advertisements for money, think of how you can monetize your strengths such as selling a service or selling data and statistics for market intelligence, or even being acquired by another company.
Think about it…
The Business of Search and Advertising
Phew. I’m finally back from graveyard work, showered and waiting for my hair to dry. I’ll blog while my memory’s fresh. If I go to sleep now, I’ll wake up with only half of what I was thinking the night before.
Chewy gave a very interesting talk at NUS today. It gave me new perspectives of the CPC/CPA advertising scene but I have my thoughts decided to blog them so everybody can discuss. I’ll be sending Chewy an e-mail so he can comment as well.
I totally agree that search is a place where money can be made. When Google went offline for two hours in the middle of last year, the Internet literally died together with them. Imagine the world without search today. (Food for thought.)
The local consumer industry’s probably not as competitive as in the US, but they certainly have found ways to suck your money without the need to spend more money on advertising. I mean, as a business, isn’t that fantastic?
I think Singapore’s a weird economy. Here’s why I think so:
We don’t really have much choices. When Chewy said that Singapore’s the richest country in Southeast Asia, well, maybe we are in terms of raw GDP per capita, but I’m not entirely sure if we’re equally rich when taking real costs of living into account. The way PPP is calculated just isn’t fair. I mean WTF is a Big Mac Index? It’s almost like a currency conversion against US$! PPP needs to take into account other living standards and not just a “basket of goods” plus a Big Mac — stuff like a house or a car for example. It’s not like in the US where I could choose to live far out and buy a house cheap, I don’t really have a choice! Punggol is as far as you can get! Half a million for a HDB flat? Forget it!
We’re materialistic. So when Chewy brought up the point about Taxi queues, I’m not surprised. It’s a matter of how people perceive the value of money. I’m sure there are times you think to yourself, “OK, I can afford to wait. I don’t need to spend $3. I’ll stand in line.” Singaporeans are a materialistic bunch of people who’d rather spend money on goods for showing off than for services that convenience them.
We’re suaku. I tune in to News Radio 93.8 when I drive and there’s this programme called Talk Back or something like that where people call in and debate some topic, like “do you think Taxis are expensive in Singapore?”. Sometimes it just drives me nuts listening to what people complain about here. I can only conclude that we’re very suaku.
That much about what I think is the state of Singapore’s consumers, I’ll move on to the part on advertising.
The current CPC/CPA advertising does indeed encourage competition, but this type of advertising (price war) is unhealthy for businesses. It turns consumers away from the real value of a product (or brand) and focuses on price instead. If the industry worked this way, there wouldn’t be Bread Talk or Apple and business would fight themselves to death and create more disparities of wealth.
If you looked at PC hardware in Sim Lim, the stores there basically compete on nothing but price. Same probably goes for shoes at Queenway. If they wanted to win the sales, they simply cut the price. Plain and simple? Not so. At the end of the day they basically do more work for less and customers don’t even remember the stores’ name. So now goes back to the question on my TV purchase. If Chewy asked me why I didn’t go to Sim Lim to buy my TV, my answer would be that I trusted Harvey Norman (or Best Denki/Challenger) more than the dodgy stores at Sim Lim. That’ was why I decided to take a walk at Harvey Norman (instead of Best Denki/Challenger) which was nearer to my home.
Any business who’s looking for long term growth needs to build its’ brand. And by branding it doesn’t mean a colorful logo or a fancy yodel. A brand is something people have an affiliation to and builds royalty over time. Unfortunately though, brand building has to start when a consumer is unaware, and that’s where the CPM advertising and Search Engine Optimization (SEO) guys come in to screw around with generic algorithmic search results.
Although I’d believe that that there’s potential for CPC/CPA to aid in building brands, this is still an area that’s untapped. CPC/CPA isn’t necessarily positive for brand building. Some people may perceive advertisers as scammy or desperate, for example. I’m also sure that most people don’t plan and search online to buy everything. Some purchases are made on impulse, especially small value items like little earrings. Females 14 to 25 years of age should be familiar with such a buying pattern.
Tweaking a CF/Flash Linux System
This is a follow up to my post on Building a CF Card Disk Home Server. I made some simple tweaks so that the system would work faster and more reliably.
Just to answer JJ’s question on the speed of the CF disk, it’s not faster than a regular hard drive, but that could be due to my cheap CF card. If you’re willing to spend a bit lot more for a faster CF card, it should match the read speeds of regular hard drives, though write speeds may still be lacking.
So, the focus here is to tweak the system for a CF/flash drive. There are two key differences from hard drives to consider.
- Flash disks have no problem with random access while hard drives are best accessed sequentially.
- Flash disks have much more limited write cycles than hard drives.
With these differences in mind, I picked out the following things to optimize.
- Encourage random access. This is easily done by changing the default I/O schedulers (e.g.
cfqoranticipatory) that buffer I/O requests so that hard drives can process them sequentially. Buffering is not useful for flash disks at all. The best scheduler for random access drives is thenoopscheduler, which simply just a n00b (pun intended) FIFO queue. To use it, edit/etc/grub.confand appendelevator=noopat the end of the kernel line, e.g.
title CentOS (2.6.18-164.11.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.11.1.el5 ro root=/dev/hda3 elevator=noop
initrd /initrd-2.6.18-164.11.1.el5.img
- Discourage swapping to disk. Since the CF disk is slow and has limited write cycles, I reduced the swapping to disk by editing
/etc/sysctl.confand adding a linevm.swappiness=0at the end. - Don’t track file access. Tracking file access means writing the last accessed time to disk every time a file is read, i.e. one write operation for every read. Disable tracking of file access by adding the
noatime,nodiratimeoptions to mount points in/etc/fstab, e.g.
/dev/hda3 / ext3 defaults,noatime,nodiratime 1 1
/dev/hda1 /boot ext3 defaults,noatime,nodiratime 1 2 - Don’t write unnecessary files (such as logs) to disk. If you need logs for debugging only while the system is running, mount them as
tmpfs. I mounted/tmpand/var/log/httpd(Apache logs) astmpfsby adding two entries to/etc/fstabas show below.
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/log/httpd tmpfs defaults 0 0
Anyway, for the curious, here’s the speed of my CF drive. Modern SATA drives can get as much as 60MB/s, PATA drives a little slower around 30-40MB/s.
# hdparm -t /dev/hda
/dev/hda:
Timing buffered disk reads: 58 MB in 3.05 seconds = 19.04 MB/sec
The Beauty of CLI
While Apple has successfully proven to the world that a well designed Graphical User Interface (GUI) can indeed provide better user experience, the beauty of a good Command Line Interface (CLI) shouldn’t be forgotten either.
A GUI works well in consumer environments (e.g. SOHO routers), but enterprises and service providers work a little differently.
I work in a service provider environment and have seen quite a fair bit of “high end” technology products. (These are usually appliance or black box hardware, like firewalls, routers, load balancers, DPIs, etc.) My observation is that while a lot of them have a great solution to an engineering problem, they actually create a management problem. Why? Because of the lack of a proper CLI or a proper management tool.
There’s only so much a GUI can do to manage something as complicated as, say, a firewall. Check out the screenshots below taken from Mac OS X and Windows XP. They’re surprisingly complicated and not exactly useful. FYI, clicking on the [+] button on the Mac brings you to a file browser; I was expecting a form with IP address, port numbers and protocols.
So, how do I add a rule to allow my custom app running on UDP port 15,233? How do I tell the firewall to stop processing further rules if I see a certain TOS marked packet? These aren’t use cases for consumer firewalls, but in enterprises, rules like these are very common.
Firewalls are actually simple examples of GUI gone wrong. However, there are way more complicated devices than firewalls around, such as load balancers, DPIs and all sorts of routing gear. The problem gets multiplied many folds when there are tens, hundreds or even thousands of these configurations to manage on multiple machines.
While a fancy GUI gets you through a sales pitch with the higher management folks, it’s really a PITA for the guys (like me) running the show. There’s a certain beauty in CLIs that GUIs cannot emulate. One if them is duplication. It is extremely difficult to duplicate mouse clicks and menu navigation, not to mention getting around errors. Imagine you have 1,000 Windows XP machines. You need to add a new firewall rule to allow your users to access a new mail server. Without Active Directory, you’d have one hell of a time… clicking.
The other pain of working in enterprise datacenters is the lack of remote access (thanks to NAT and VPN crap) or an actual monitor console. Many engineers run around with a laptop and a RS232 serial cable. That’s all that’s needed to manage a device on the run.
So if you’re going to build something for the enterprise, particularly appliances/black box devices, please focus some effort on building a proper CLI or centralized management. Learn from the experts – there’s a reason why guys like Cisco, Juniper and Extreme are industry leaders.
Building a CF Card Disk Home Server
Thought I would recycle some old systems in my house, so I dug up an ancient Book PC (Micro ATX?) running Celeron 1GHz with 128MB RAM and decided to do away with the risky hard drive that was generating lots of heat and rebuilt it with a CF card.
I got myself several IDE to CF adapters off eBay and also two unbranded 4GB CF cards. Flash disks are getting quite affordable recently and this is a good way to repurpose an ancient machine without having to spend a bomb on SSDs (and maybe a SATA controller).
Installed CentOS and I’m off for several hours of Yum update. I’ll turn this into a home development box and print server. No X11 (GUI) on this thing. 128MB is no longer enough to do these fancy stuff on modern distros.
One thing though, I’m looking for a more efficient and low profile heat sink/fan combo for Socket 7/370. I can’t find anywhere that sells these stuff now… at least not for a decent price.
P.S. Due to an ordering error I have two four extra IDE (PATA) to CF adapters. If you’d love to have them, please drop me a message and I’ll happily pass them to you. The wife takes revenge at my historical archive of computer hardware, such as the CPU Hall of Fame below by buying more shoes and bags.while (true) { nags(); }
No Real Use for Google Wave?
I can’t seem to think of a very practical use for Google Wave. IMHO it’s a technology that’s neither here nor there. It’s not a very effective replacement for e-mail either as it’s not a scalable model. It’s not exactly a great collaborative tool as well though I agree maybe it has good use for taking meeting minutes and random notes. It’s certainly not a good file sharing or document editing tool.
I’ve been thinking quite a bit on what I can really do with Wave. It’s frustrating actually
On a side note, it’s surprising how the ancient DNS and SMTP protocols we take for granted scaled so well. IETF and IEEE are a bunch of geniuses.
World Class Troubleshooting
I’m sitting in a client’s office and just two cubicles away, this guy is on the phone with another guy trying to troubleshoot something.
“Hello? Yah, yah? What is wrong?”
Few seconds later…
“Oh, can you go inside? Erm… edit the file?”
Few seconds later…
“Yah, use pico open the file.”
One or two seconds later…
“Pico don’t have? What you use? Nano? Don’t use nano. You try pico?”
Few seconds later…
“No pico? Install pico and try?”
Few seconds later…
“OK, you call back. Yah. OK, thanks, bye.”
So he concluded the guy used the wrong editor?
Few minutes later, he makes a call to someone else.
“Hi, yah, er, ask you ah, how you see the Linux is 386 or 686 or x64?”
Two seconds later..
“Oh like that ah. Use you-name lah. OK. Then, then… like that I cannot install the 386 on 64bit lah?”
Wahlaueh, it drives me nuts just listening to the conversation
Heng I don’t have to work with these people.








