Thursday, January 15, 2009

Lessig denied by Viacom

Was just having a look at Lawrence Lessig's blog since he twittered that he had an interview with Stephen Colbert. He puts up YouTube link in the post "let the remixes begin", unfortunately ...

Yup, "This video is no longer available due to a copyright claim by Viacom International Inc."

Kinda ironic, but expected.

However here is the interview which still works (for now)

I loved the great example Colbert makes by "adding value" to Lessigs book by scratching out Lessig's name and drawing a Snoopy inside.

"Now, my book! My Work of Art! You OK with that?"
"OK, put this on EBay, and see if its going to get more than"
"Thats exactly my point! You've added value to that! Bravo."

Colbert then does what he does best and says:

" ... nobody should take my work and add anything thats inappropriate, thats what I'm saying. Never, EVER!"


Wednesday, January 14, 2009

Touch N Go Scam

Ive been using the Touch n Go card for quite some time, and never had much issues with it. Ive found it really useful especially with the SmartTag device. This is a rant about the little interaction I have with Touch n Go Sdn Bhd, and why they suck.

A few weeks ago, I got denied entry with a bizzare message "Kad Tamat Tempoh". I never new TnG cards could expire! Because of this, I was inconvenienced in having to queue up and pay cash in the manual toll booths. The problem was that whenever I use any toll booths, its either after work hours, or the TnG offices would be at the opposite side of the road.

So this morning, I decided to spend two trips around the Ulu Klang Elevated Highway (thats 2 x RM1.50) just to get to an open TnG office. I asked the lady at the counter if she can renew my expired card, and she said sure. Just fill in a form. Great.

So while I was doing that, she punched in some stuff in her keyboard, and when I was done, she handed me a shiny new TnG card. Hooray, I thought, that was relatively painless.

Until I looked at the receipt:
Sorry about the bad pic, but thats the best my phone could do.
Old card No: 00000000000
Old Mfg No: 0488145330

New Card No: 601464000xxxx
New Mfg No: 1832xxxxxxx

Old Card Balance: 70.75
Old Deposit:15.00
Amount Forfeited: 0.00
Card Price: 10.00
New Card Balance: 70.75

Warranty Expires om 1/13/2010
What was interesting was that there was a Card Price! WHAT? I just needed them to extend my card expiry! So I asked the lady what was this about. She said that
"its standard policy, and instead of taking money, we've deduct it from the Deposit amount."
"Gee thanks, but it doesn't explain why you have deducted RM10 in the first place"
"A new card costs RM10"
"But I've just given you my old card to exchange!"
"Ive given you a new card"
"Its your own companies arbitrary expiry ..."
"Yes, the card expires after 10 years."
"So when does this card expire?"
... she checks the computer and says:
"on 17th April 2016"
"But thats just over 8 years from now: Whats this about 10 years?"
" .... "
"What's this about returning my deposit? My Old Balance was 70, you deduct 10, so why isnt my new balance 75?"
"No, I entered the old balance for you. Previously it was 65"
... I have no way of verifying this. *grrr* Why doesnt the receipt correctly read what it should read? Why can there be manipulation on their end?
"So who can I talk to about this?"
"You can call the Customer Hotline below ... "
"No, do you have a manager?"
"No, we are just resellers ... I too have to call the hotline when I need help"

So it looked like I was not going to get anywhere with this drone. I then checked their website, and found this helpful warning:

This is consistent with my experience, so I just would like to know why TnG charges for a new card in the first place. A deposit model is almost bearable. Considering that people will be loading these pieces of plastic with their own money, if they lose it or abuse it, then its their fault and their monies should be forfeitted. The "loss" to TnG is minimal if not at all: they gain when people do silly things with their cards.

So what justifies them charging people for using their tickets? Do credit card companies charge for cards? Do LRT companies charge for those paper tickets? No! The cost of the tokens are covered by the services paid for by the consumer.

Its completely unjustified to charge for something which would arbirarily "expire" after a few years.

Plus what is the story about reducing the expiry date to 8 years? The warning merely says "give you more years of driving", and doesnt quantify the next round of expiring cards.

I checked my MyKad (as I've loaded a few RM in it for LRT usage) and she said that it expires in 2050. Er ... why should there be an expiry at all? What is going to happen in 2050 when everyone's MyKads "expire" because of a third party? Will there be IC counters at all TnG outlets while they "exchange" cards again? Gah.

On speaking to my colleagues, it seems Touch N Go have other scams which they run. They have a loyalty card which refunds 5% off your toll usage. However there are hoops to jump through. These refunds only kick in IF you use more than RM200 per month! My colleague who lives in Klang and therefore pays more toll than an average KLite, says that he barely makes this "quota". Some months like February and holiday filled months make him miss the alloted amount, and he loses out on the RM10 rebate. In addition, there is an annual membership fee of RM20. Plus you have to physically go to an outlet to redeem your rebates. It renders the "loyalty card" completely useless, if not frustrating.

So Touch N Go, what are you up to really? Your "Quality Statement" says that:
TNGSB aims to enhance customer satisfaction by complying with the requirement of the Quality Management System (QMS) and continually improving the effectiveness of QMS
I have no idea what this QMS is nor what it defines but judging from my interaction, I'd say it can be very spectacular.

Also, why is it that when we use TnG in carparks, its costs more? Are you charging the carpark operators a surcharge on the traffic? These shortsighted scams of yours certainly hinders on your Mission Statement:
To provide secure, swift and convenient cashless payment mode to all

Ten years on, and we don't have a cashless card as prevalent as Singapore's or Hong Kongs. With 3rd World mentality like TnG, you'd just have to wonder why.

Yes, its a rant, and Im pissed.


Monday, January 12, 2009

Secure Eateries

Malaysia is a very secure place. Especially at eateries. In the days of free Wifi hotspots, one can never be too careful as we go about our virtual daily lives amongst the interwebs while chomping down on food. This is a review of a new special breed of restaurants which offer something special to the security paranoid.

SSLurping your food.

Along the bustling row of shophouses down Desa Setapak, where a multitude of TAR college students hang out, an enterprising shop owner has taken the latest encryption technologies and married it to the ancient Chinese art of making flour, egg and rice into yummy goodness.

Restoran SSL Noodle - cannot be stopped by the NSA

One can hardly describe the splendours of munching on the 64bit versions, or nowadays the more commonly consumed 128bit strands of noodles. For those who have a hearty appetite, 256 and 512bit noodles, the noodly equivalent of the Double and Quadruple Whoppers, are also available. However because of the high overhead, diners are warned that byting 32 times or 64 times per noodle strand respectively can take alot more time than just slurping it down. To each his own.

Each serving comes with a sizeable ball of entangled noodles which would leave most crackers crying like babies. There's no way but the brute force method to get through the servings.

I can't wait for more SSL type noodles houses to open around the city. Of course please make sure that you check on their Certificates to check on their authenticity, as checked by trusted Authorisors, and not make do with mere Self Signed Certificates.

Eventually one would expect that in more upmarket places like Bangsar, a rename would be required to reflect the newer and trendier direction of this form of eating: TLS Noodles, or if going international with ready merchandise and quirky branding available, The Flying SSL Spaghetti Monster would be a ready hit.

SSH, people are eating.

Down in the sunny beachside town of Port Dickson, there exists a Curry House which fulfills every sys-admins dream. It may be a very small niche market, but I believe that these guys are on to a real winner.
Secure Dining at Niva SSH Curry House

Imagine of more entrepreneurs like Niva's were just as enterprising all around the world: There wont be the Great Firewall of China, outsourced SysAdmins would flourish and Net Neutrality would be a no brainer. Forget Cyber-Cafes; that is way too 90's. Today, SSH Cafes are definitely the way to go, dude!

The great thing about Niva is that you can "single sign on" to his entire franchised outlets around the country. Assuming of course you have valid private and public generated keys. This means that from here, you can make orders, execute deliveries and pay remotely all from one establishment.

Ditesh has got a great resource to fully maximise Niva's franchise: "That bag of SSH tips and tricks," and I can attest to the fact that Niva supports all the features and benefits of SSH.

Reverse SSH tunnels? No problem! Niva will deliver your chapatis directly to your office even though there is a "No eating in your cubicle" policy enforced by management. Forwarding goodness? definitely: Niva can hop skip and jump through those tight firewall hoops to get those vadais where you want them.

Secrecy? All the foodstuff is encrypted to ensure that nobody knows whats inside. So that smelly Thosai bawang tambah garlic will never be detected by anyone until it gets reconstituted at your desktop.

The Good

Eating in these restaurants guarantee that no eavesdropping will occur. This makes Cabal meetings super convenient (take that, Pelita!) The food itself is mediocre, but it is the added service which makes the experience totally Awesome.

The Bad

The waitressing service. They either expect every browser to do all the heavy lifting, or each patron to type out every order themselves. They just provide the freely available Ports.

There are far too few secure eateries in Malaysia. Once would expect that with the growing IT literacy in the general public would encourage more SSL and SSH type shops to thrive. I believe its the dropping regard for terminal based commands.

The Future

The Government should do more to promote these establishments. Triple tax deductions, science or government grants and Preferential policies should apply. The promotion of these eateries is crucial for the success of the Multimedia Supper Corridor.

There's only upside to this market, and its wonderful that Malaysia has taken a lead on this. I don't expect any other country to have Security as their main selling theme to their eateries now do you ... ?

["Thank Gawd Its not Vista" - TGIV does not count.]


Saturday, January 10, 2009

Squeezing videos

Sometimes you just need to squish some videos to fit into single sided DVD of 4,482MB. So if you've got a 1hr video file which is 500MB or so, and would like to reduce the size to about 300MB, use this:
mencoder -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=650 -oac copy orig.avi -o squished.avi
Here's a quick rundown of what the flags mean:
-ovc lavc: Use the libavcodec to encode
-lavcopts: sets up the options
vcodec=mpeg4: i.e. Divx
vpass=1: this is not really necessary, but would be useful if you want to re-encode this in the second pass. This generates a file called divx2pass.log, which will be used for vpass=2.
vbitrate=650: here is where I've skipped a stepped, and forced a bitrate for video. Adjust this if you need to squeeze another meg or so.
-oac copy: just copy the audio portion as is.
orig.avi: the original video
-o squished.avi: the squished, output video
This would give something like this:

MEncoder 2:1.0~rc2-0ubuntu17 (C) 2000-2007 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 47, Stepping: 0)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
AVI file format detected.
VIDEO: [XVID] 608x336 24bpp 23.976 fps 1267.5 kbps (154.7 kbyte/s)
[V] filefmt:3 fourcc:0x44495658 size:608x336 fps:23.98 ftime:=0.0417
Opening video filter: [expand osd=1]
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
audiocodec: framecopy (format=55 chans=2 rate=48000 bits=16 B/s=16000 sample-0)
VDec: vo config request - 608 x 336 (preferred colorspace: Planar YV12)
Movie-Aspect is 1.81:1 - prescaling to correct movie aspect.
videocodec: libavcodec (608x336 fourcc=34504d46 [FMP4])

Pos: 120.3s 2884f ( 4%) 76.31fps Trem: 13min 253mb A-V:0.041 [651:123]

The original file was 576MB, while the re-encoded file is projected to be 253MB and all done 13 minutes!

There are more tricks with MEncoder, and this resource is really useful: "Encoding with MEncoder"


Friday, January 09, 2009

Help MERCY Malaysia help Palestine

I don't care who's at fault. All I care is that people are in dire need of help, and we can do something about it.

Ive given a small donation to MERCY Malaysia, as Dr Jemilah Mahmood has procured over USD100K of medical supplies ready to be delivered to Gaza via Egypt. Her work is certainly noble and worth supporting. See what they are up to, and their frustrations at the Egyptian border.

According to Yasmin Ahmad's blog, they managed to transfer 50 tons of supplies.

As Dr Jemilah often says, "No amount is too small, and will be gratefully received."
And who knows, the 10 ringgit that you gather may seem small, it could translate into some suture (medical sewing) which would stop a child from bleeding to death.

So please give some to a respectable organisation like MERCY Malaysia (CIMB account number: 14240006561053) I did it via Maybank2u, and it took less than 2 minutes (including the TAC wait).


DUKE - Duta Ulu Klang Expressway - so far so good!

Today was the opening of the Duta Ulu Klang Expressway (DUKE) and I jumped to the opportunity to test it out. The reason being, driving around the Second Middle Ring Road (MRR2 or Jalan Linkaran Tengah 2) has been such a chore lately as it congests up after Zoo View, Kampung Pasir, all the way along Bukit Antarabangsa till the interchange with Jalan Ampang - for no apparent reason. I really do not understand why there is a standstill at all, considering the flyover over Jalan Ampang to Cheras is free flowing.

So DUKE is the answer for me: to bypass all the cars around Bukit Antarabangsa. Here is the map which I've colour coded to indicate traffic congestion (the redder, the more traffic), and my alternate route from Melawati to Ampang (in green towards DUKE). Click for glorious technicolour.

The turnoff from Wangsa Maju to DUKE along Jelatek was rather abrupt, and the road in today was especially messy with gravel. But once you are on, its plain sailing towards the rolling (and currently dangerous) hills of Bukit Antarabangsa. Its quite a sight.

After a few kilometers, the exits are clearly marked: one going North back towards Melawati / Gentings) and the other south towards Jln Ampang. I took the Jln Ampang exit, to rejoin the madness of the congestion.

Merging with the traffic was relatively easy, as I was the rare ones to approach from DUKE. There was only one other car; a white Kancil which tried the new Expressway.

Then it was the usual trudge to get past the corner, for normal traffic again.

Overall, the time taken was about 15 minutes for a journey which took 45 minutes yesterday. So its a real time saver for now.

I did not notice any toll booths, so I can use this route for free indefinitely. The booths are further up the Expressway around the Air Panas / Setapak area. DUKE is not fully complete yet. It currently terminates at Sentul which leads either to the city, or to the new Expressway link (another toll) which feeds traffic to either Batu Caves or Genting Highlands, i.e. meeting MRR2 on the north east.

I am really happy that the DUKE designers didn't do a AKLEH (Ampang - KL Elevated Highway) by not having fully formed interchanges, i.e. only allowing traffic into the highway and not allowing traffic to get off unless they pay the toll charges twice. However I wonder if this would mean that the Mat Rempits or KL Drifters will now use the Jelatek / Ampang section of DUKE to practise.

Try it out, and hopefully there are more people from the area needing to get to Jelatek/Setapak/Sentul/Duta than more people trying to get to Jalan Ampang. Otherwise DUKE will just exaberate the problem.


[Update: 12th Feb 2009: They have started charging for tolls, which is great, because the feed into MRR2 was starting to get jammed in the morning. Yahoo for me.]

Tuesday, January 06, 2009

Starting simple with Python - CSV to SQL

Well, time to learn a new language, and what better than Python? Here's my first attempt at it, to solve a very simple admin task I had to do, which was to change a csv file to a series of SQL updates.

There's just a small bit of logic required; to skip over empty fields, and sanitizing the input, so overall its a really simple piece of code. Ive added some stuff like command like arguments, but of course havent written error checking, nor usage help. What is strange about Python is that its really sensitive to what sort of indents you use. Tabs are not the same as spaces, so please be very careful, else be wary of this infamous error:
IndentationError: unindent does not match any outer indentation level
Here's the code, which I'm sure I'll be referring to in the near future.

import sys
import csv

destinations = csv.reader( open( sys.argv[1], "rU" ) )

for data in destinations:
if (data[1] != ""):
country = data[0].replace( "'", "\\'" )
print "update Country set ShipMethod = '" + data[1] + "' where CountryName = '" + country + "'; "