technology

Instapaper use of username

Instapaper has an interesting take on username. It allows you to create an account with either a simple username (mynamehere) or an email address. However, it strongly recommend that you use an email address as the username because it does not separately store an additional email address field in your account. Instapaper has this setup partly because it offers a very long barrier to initial user. To "register for an account", you just enter a single username or email address. You can immediately start using the system. You do not have to set a password. Isn't this clever?

You can setup a password if you want to, and it's probably a good idea since it would be easy to guess people's usernames.

2010 May Boston Python Meetup Videos

Here are the videos for the Boston Python Meetup in May, on "Testing". Two speakers were Marshall Weir on "Testing, Where Do I Start?" and Stephan Richter on "How to Test the Hard Stuff". The videos are pretty long. I ran out of SD space at the end so missed a little bit of info at the end. There were constructions at NERD with banging and buzzing. It is amazing that we got even this much usable audio from it.

Boston Python Meetup 2010 May Part 1 from PK Shiu on Vimeo.

Part I.

Boston Python Meetup May 2010 Part II from PK Shiu on Vimeo.

Part II

My Love of Gadgets Started from my First Calculator

My First CalculatorWhen I was maybe ten years old, electronic calculator became available. I lusted after this basic scientific model, the size of a paperback book, at my local stationary store for a year. My dad bought it for me and I loved that thing. It has all the log and trig functions.

Since then, I slowly saved money and traded up for the latest in model. Remember the casio that also play music? Then a fancy Casio that has a 1/100th second timer, which I used in all my high school advanced Physics classes. Then the HP 27S that does financial and statistical calculations, too much of a geek to use a 19B even for my MBA classes.

How far we have come? When was the last time you used a physical calculator? I use my iPhone most of the time, or use Google. Next generation of children may never have to use one. But for my generation, that was my very first personal, electronic gadget.

iPad in every room, in every bag

After watching this segment, this is my take away: Wall Street Journal's Walt Mossberg has an insightful comment about people don't want to carry iphone plus iPad plus laptop all the time, true. David Carr says how much it is a family computer, True. What is going to happen? People need to have multiple iPad. Leave one in the bag. Leave one in the living room. Leave on in the dining room. It is a "pick up and use" device. Expensive? Sure. But it works that way.

Thoughts on the new iPad

Mount them everywhere: The price point is great. How about mount them around the house or office as informational display -- works with any system that has a browser interface. Leave one in the bathroom for, browsing... Education use: Again, at $499, and with a great intuitive touch UI, give them out to school children for reading and drawing and doing physics simulation.

Lack of camera: Otherwise AT&T won't give Apple the sweet $30/month prepaid unlimited data plan.

Will not work with standard Bluetooth Keyboards: unfortunate. Otherwise makes a great netbook replacement.

The perfect personal movie viewing device: obviously. BUT it probably can not iTune stream from family main system like OS X iTune can. So need to download and purge all the time? The work flow is a little dated.

Kindle is dead meat. Unless there is something strange/bad about the iBooks book marketplace. Of course, I can run the Kindle iPhone app or the presumable Kindle iPad app. I love my Kindle, but with an iPad, I can make notes much easier, say with an EverNote app.

Doesn't it make a pretty cool big GPS for your car?

It is going to make touch screen devices mainstream. Sci-fi visions coming true.

Finally, make sure you buy it with a credit card that has a no-question ask replacement policy, in case you dropped it !

Time to eBay my Kindle

It's happening. As expected, iRex announced their iRex Digital Reader 1000 and 1000S today. Larger screen, wireless connectivity and touch screen for annotation. A 10.2 inch screen makes a big difference. So demand for the e-ink display is raising, price will be dropping, while Amazon claims that they are not going to release a new Kindle this year, current owners may want to prepare for eBaying the old one and get ready for the newer Kindle when it appears. iRex 1000

Technorati Tags:

My New iPhone 3G

Yes. I got one. Spent total of six and a half hours. Worth it? Yes. Weather was nice, a little hot but not too much. Apple staff were very nice. Especially Alex -- She worked the line. Gave out (free) water, candy, went to get sunblock and more candy, even picked up a pizza for someone, then popsicles, and more water. They try very hard to make the waiting bearable. Why did I do it? I live very close to the Boston downtown Apple store. Drove by the night before, no more than 20 people where in line. Figure I will walk over at 7:30 to see the situation. There were about 400 people there. Decided to wait for one hour to see what happens. They said they have 40-50 reps in the store doing iPhone setup. It was true. The entire store was setup for the launch. After getting into the store, you line up around the central circular staircase, and they have individual reps meeting the head of the line, taking you up stairs to start the purchasing experience. The rep that I had, Ryan, was super patience when we hit some sort of AT&T error and had to call two different AT&T rep over the phone to get one that "helped". They have subtle touches like keep giving me a store phone to play with during the process, to complete the experience.

I stayed because during the first hour, the line moved so quickly, more than 100 people I think were in. Looking good? Until the ITMS crashed, halting the activation processing. Then they said AT&T was having problem as well. So the next two hours were mostly waiting and chatting with the neighbors. By noon time things were moving again and I was out by 2:30 with about 20 minutes spent with the AT&T problem. ITMS was still slow, so I did not get the phone itself activated until I got back into the office. The account was activated and number transfered (from Verizon) very quickly. In fact there was an hour or two I was without a working phone because the Verizon account was closed and the new iPhone was not working yet.

This is my first iPhone. Switching from Palm OS is a big switch. I am still learning it. But it is worth it, so far. More functional review next post.

The Beautiful Candle

Michael Faraday's lectures at the Royal Institution in London - "The Chemical History of the Candle" : A candle is beautiful. "Beauty means not the best-looking things, but the best-acting thing." A candle is beautiful because its functioning elegantly and efficiently rests upon a wide range of universal laws. The heat of the flame melts the wax while drawing upward currents of air to cool the wax at the edge, thus creating a cup for the molten wax. The pool of wax remains horizontal because of "the same force of gravity which holds worlds together." Capillary action draws melted wax up the wick from the "cup" at the bottom of the wick to the flame at the top, while the flame's heat trggers a chemical reaction in the wax that sustains the flame.

Faraday said the beauty of the cancel lies in the intricate play of scientific principles upon which it depands, and in the economy with which it knits them together.

Using iPhone in Hong Kong

It is also fun to see what cellphones are used in different countries. As my plane taxi into the Hong Kong airport, I looked over across the aisle and the occupant pulls out an iPhone, switched it on and proceed to check the weather. I had to ask -- Your iPhone works in Hong Kong? He replied "sure, just get it unlocked". He is not even a techie. While we are waiting to get off the plane, he further commented -- it's the same price here and in the States, buy one here, or get one unlocked at MongKok for USD 700-800, it will only take a few minutes, he said. That's about USD 100. The iPhone is a quad band phone for a reason!

Fighting spam in wordpress by bulk deleting comments awaiting moderation

I have lots of spammer breaking this blog and submitting comments. They are all held for moderation (i.e. delete). But deleting them using the wordpress admin interface manually is painful. Sometimes I let the comments build up, and then I end up having too many of them in the system. The admin interface cannot handle, say 10,000 comments in the moderation form. What to do? It is not as simple as writing a script to just call the delete comment form. Wordpres is pretty good at security -- meaning making this hard to do. It uses cookies and referrer checks to make sure the admin interface is not hacked. To script this, you need to use CURL. This is how:

1. Get a list of all the delete comment URLs from the admin interface. You have to go into the admin interface, click Manage/await-moderation. This will give you the potentially very large page of links to delete those comments. Save this in a file.

2. Grep the deletecomment URLs from that file. They will look something like this:

http://www.yourblog.com/wp-admin.php?action=deletecomment&p=540&comment=43565

I use a simple python script to grep these.

3. Use CURL to login to your blog's admin interface, and save the resulting cookies into a file. This is called a cookie jar in CURL:

curl -d "log=YOUR_USER_NAME&pwd=YOUR_PASSWORD" -c cookie_file www.yourblog.com/wp-login.php

4. Now you can use CURL to call those delete URLs, using the cookie jar. But first you have to specify the referrer to get pass wordpress' security:

curl -e "http://www.ourblog.com/wp-admin/moderation.php" -b cookie_file "http://www.yourblog.com/wp-admin.php?action=deletecomment&p=540&comment=43565"

Got ? It's that easy.

Snap Circuits SC 300

My love of electronics and computers, which defined my career, can be traceback partially to having a electronic building block toy when I was very young. Back then, we do not have Snap Circuits. The toy/kit that I had was more powerful and less user friendly. You can only buy that kit as a specialty item in Japan now. It is part of the Otona No Kagaku series, meaning "science for adults". There is a website that you maybe able to order one. Mine is the old version of the EX-150. A similar Germany version is still available at Lectron Electronics.

Anyway, back to the easy way -- Snap Circuits. When I looked at the pictures I never thought it was any good. It definitely is on the simple side on the electronic circuits that it builds. I gave one of these as a Christmas present to someone and I got a chance to play with it. I was surprised that it was a pretty good kit. Very easy to "use". So it is well suitable for younger kids, as an introduction to basic circuits. You can find the manuals online to check out the kids.

 

iquery cannot append option element object into select list in IE

I have a form that contains a dynamic drop down. The content of drop down 2 is dynamic depending on the selection on dropdown 1. Pretty standard stuff. I hook a function to dropdown1's change event, and load, using ajax/json, the dropdown2 with data retrieved from the server. I use the pretty simple lines of jquery code:

    $("#id_select1").empty;
    var e = document.createElement('option');
    e.text = "orange";
    e.value = "1";
    $("#id_select1").append(e);

This works in firefox, but not in IE. Turned out this is a known problem and it is marked "wontfix". You can read the bug report here. This is the work around:

    $("#id_select1").empty;
    $("#id_select1").append("<option>Orange</option>");

Not very nice, but at least it works.

Infrant NV+ RAID Failure, and replacement Part 2

*Updated*: This is the link to the official instructions (too late).

The replacement power supply unit arrived from Infrant. There are no instructions accompanying the unit. So I started to look around the NV+ to see how I can open it up and perform the replacement:

1. Take out the disks after labeling them. I think their order in the NV+ is important. Make sure bay one goes back to bay one, etc.

2. Loosen some screws in the back and the bottom. Turned out I have to start with the sides, then the fan, then the bottom, which is the PSU itself.

3. Notice all the dust gathered inside. Look at the pictures.

4. Then it's a matter of taking the PSU cable off and plugging in the new one.

5. Don't forget to transfer the serial number sticker from the old PSU to the new one before sending it back!

6. Check out the burnt coil in the picture.

7. Finally, don't forget to download and install the plug-in to up the fan speed to reduce the temperature. Otherwise it will burn out again!

It's basically not too difficult.

D70_22576

Infrant NV+ RAID Failure, Part 1

If there is one piece of hardware that you don't want failing, it will be a RAID disk array. After loosing a ton of media files, twice, I invested in a serious RAID box. The Infrant Technology NV+. It costs close to $2000 by the time I filled it with 1.5Terra bytes of redundant disk storage.A few days ago when I woke up in the morning, I find that my iMac has disconnected to the RAID drive. I looked, and the RAID is powered off. Strange since it is plugged into a UPS and there were no power related warning from the UPS. I unplugged and plugged the powercord back. The fan moved for a second, then stopped. After several attempts it came back online. Only to have the same thing happened two days later. The sympton seems to be power supplied related. Getting on the Infrant technology's support forum, and there was a posting directly mentioning this problem: Service Action to Prevent PSU Failure . Seems like it is a known problem, caused by the new fanless PSU overheating. Wish I knew about this ! I purchased the NV+ after some research. I think it is (was) a nice little company. Unfortunately for me, fortunately for them perhaps, Netgear seems to think so as well. Netgear bought the company. I called tech support. A well mannered highly possibly off-shored customer service rep answered the phone after 15 minutes. She was nice, took down my info, and transfered me to the "right department". I waited for 5 minutes on hold, and decided to hang up and will call them back later. What a surprised when my phone rang a few minutes later. They called me back. "The call must have been disconnected", he said. We went over the problem. I am not sure if he is completely sure or know of this known problem, but he offer to RMA the power supplier. I can either send mine back and wait for a new power supplied unit, or they will advance ship for a fee. I spent $19.95 and took the advance shipping option. They will ship me via DHL a new power supply. I have to open the case and do the swap, and they have prepaid return setup for me. Not too bad. Later in the day I received a DHL shipping notice. Let's hope this work out for me!

*Update*

See the instructions and pictures of my replacing the power supply here.

Leviton Vizia ZWave system

I have been running a zwave controlled lighting at home for almost a year now. It's great. Leviton recently entered the market with their own switches and controllers. They look good enough that I am going to swap out the old switches and install more new ones using Leviton devices. However they seems to have introduced some new terminology or feature that is confusing:

 

  • AREA is a group of NODES that react to SCENE or ON/OFF command
  • SCENE turn ZONEs or AREAs ON or to present levels
  • PROFILES are group of ZONE or SCENE controller settings

Does this make sense to you?

  • Is a ZONE an AREA?
  • Are AREA stored within the network within the controller, whereas
  • SCENE are device levels defined and stored locally at a controller?

How popular is the Treo?

I was at a conference today, held at a top class hotel. I had a lot of calls to make (or is it that I keep checking my emails?). Near the end of the day I am in dangerous red territories regarding battery life. I went to the concierge to see if they have a charger. She give me her box of chargers left behind by other hotel guests. It has chargers for new and old style Sony Ericcson phones, Motorola phones, mini USB, a few others that I do not recognized, but nothing for a Treo. My first thought -- the Treo is not that popular?

My second thought -- Treo owners are better organized and not likely to forget their charger at a hotel?

Emacs + Python + Windows

Being an old school multi platform kinda person, I use emacs. Lately I have been doing some serious Python programming on my laptop running Windows XP. I never got python-mode to work under emacs, version 21.3 or so, the released version from 2003. With the increase amount of coding, I wanted python mode --

Version 22 of Emacs comes with its own python mode. But version 22 is not available for windows as yet. At least not and official version. But, if you go to the EmacsW32 site, you can get the current CVS version, plus all the nice little W32 extras. Go here: ourcomments.org/Emacs/EmacsW32Util.html to download all the good stuff.

Now I have syntax highlighting in color, open recent file list, and a whole long list of new emacs and W32 stuff that I can try out.