Posts

Does Google blur phone numbers on Street View?

Image
I was looking for a business telephone of a tyre repair garage. Unfortunately the small shop might not be paying to get an ad on yellow pages and I could not find it. Next step was to try to find it on Google Maps Street View, as I knew there were lots of text on the garage walls. Unfortunately, though I could find that street photos, the photos blurred the last group of seven numbers. Though I've searched around, it does not seem to be an error: Apparentely the software does blur not only faces but also license plates. I wonder wheter these numbers on the wall might be considered license plate numbers. At any rate I was lucky enoughthat one of the angles of the scene did not blur the numbers. Hopefully we'll get an appointment to get our punctured tyre repaired soon.

Some power benchmarks

Image
After some time willing to do this I've found a moment to do some measurements. Firstly, I've removed Arduino Mini Pro power led resistor to see how much current was needed for the device in power-down mode: It's just 155uA@3V3, even lower if you go down to just 3Volts. The Mini needed 5mA for normal operation (with no output loaded). The other component I was interested on testing together was Digi's XBee module. While XBee needs 50mA on operation, using SM=1 (Hibernate mode) the power goes down to 1.6uA when sleep mode is forced (by raising pin 9 to high). That all means that a basic wireless sensor node based on this components will use at least 55mA during ON periods and 0.16mA while SLEEP. That translates into about 4 hours of continuous operation from a 220mAh 3V button cell. However, if node is powered up only 3 seconds every 5 minutes, then the same battery should last around 13 days. This seems to start looking ok for my sensor network project.
Image
A recent project required the use of an industrial computer, able to work within a wide range of temperatures. Interaction with other systems would happen by serial and Ethernet ports. I've used devices manufactured by Moxa , running uClinux (a slim version of Linux that can run in systems without an MMU, like some ARM processors). Development is done using a GNU C cross-compiler and almost all the time development uses familiar tools. My systems came from factory with an old version of the kernel I had to upgrade, but once upgraded they are working rock solid. Manufacturer support was also valuable whenever a feature was expected but missing on the uClinux distribution (i.e. no ?time functions on busybox-based find).

Enterprise WPA troubles

Image
Two gadgets we've got recently refused to access the university wireless network. The reason is that WPA with an EPA-PEAP autentication server is used on UPV campus. The ASUS eeePC that comes with Xandros Linux does not support that. Alternatively I could use the eeePC built-in VPN to connect to a secondary wireless network, but again, that software did not work either. The Nokia E71 cellphone does support WPA Enterprise, but contrary to other wifi setup that can be done on the fly, the so called WPA Enterprise is hidden down there in the system configuration menus. The solution I took for the eeePC was quite radical as I installed eeeXubuntu . There is a special Xubuntu version that worked for me. You create a boot image on a USB flash dish to get it installed on the eeePC. One word of warning though: I you accept to install system updates, each new kernel update will break the Atheros wireless driver (it can be rebuilt later, but it's a manual process). The solution for E71 w...

Low power arduino

Image
I've bought recently a new Arduino Pro Mini. I was mostly interested on what the minimum power consumption might be when powering it at 3.3 volts. The average current was 5 mA with pin 13 led off. But what it is most interesting is that sleep mode current goes down to 400 microamps (and this is still keeping the red led on). As the red led resistor is 10k I guess the sleep current will go to almost nothing once I remove the red led resistor. That is a very interesting value if you're worried about power consumption for sensor network applications. A CR2032 will last for more than 500 hours at 0.4 mA!

Stippling fun

Image
Have you ever wondered how to achieve a monochome representation of an image using just dots? This is what stippling is all about. The next question is how this can be done. You might have seen Wall Street Journal hedcuts and they look great, but they are produced by a human artist. Machine-based approaches like dithering and half-toning work well too, but they are not quite the same as the above. Google led me to the nice work of Adrian Secord, with the not so suggestive name of Weighted Voronoi Stippling. Author provided binaries and source code too. Unfortunately it did not work for me. But after contacting the author, who provided me an updated binary that ran on my Leopard iMac. You have a sample image of the input (right) and output (left). I want to thank Adrian for being so kind of including my suggestion of adding SVG output to his code (and for making his project's code available).

Fixing Hardy audio problem with Pulseaudio

One of the few problems I've got with Hardy (Ubuntu 8.04) has been a weird audio problem . It looks like Flash plugin and any other application that plays audio do not like each other. So I have had to close Firefox completely to get audio working again in, let's say Rythmbox. My audio device is Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02) I research the problem a bit and I've found three pieces of advice: 1) Install libflashsupport (which did not fix my problem) 2) Restart pulseaudio (that might be done right by killall -9 pulseaudio) or kill gnome-power-manager 3) As suggested here : asoundconf set-pulseaudio (this one worked for me) Now I can play a song on Rythmbox while viewing (and listening) a video on youtube. Something it was possible on previous versions.

Inkjet vs Laser

Image
Have you ever been interested on the output quality of both Inkjet and Laser printers? I can see many comments on the net about the cost of running the two types of printers. Someone mentioned that HP is making $10 billion dollars a year selling inkjet cartridges (this seems like a lot of money). I am not worried about the printers' running cost at the moment. A recent project required me to study a few pages of a document. On a closer inspection I realized they were not printed on the same printer. While laser printed documents create well-defined contours, inkjet printers seem to create small ink spikes on line contour (as you can see on this entry photo). Light reflection properties are also different, inkjet black being non-reflective but laser printed black being slighty reflective. I'm not complaining about any type of printers as for regular use I think both provide good-enough output. However, it seems it is not difficult to tell which printer you are using just looking...

Trouble with ASUS hardware

Image
While my refurbished-at-home Apple iBook is happily running I put myself in the trouble waters of replacing my aging computer. But first things first: a few months ago I bought my wife an ASUS EeePC subnotebook. While it worked out of the box we quickly realized something was not quite right with it, as any minor impact (as hitting the surface with your fingernails) could trigger either a reboot or completely hang the system. After an RMA, the replacement unit seems to be working happily (after I figured out how to get WPA working first; BTW, do the system upgrade over Ethernet connection BEFORE trying to log onto a WPA wifi network whose passphase contains spaces !!). For my new desktop (replacing an old Pundit-R) I chose a mini tower barebone PC again from ASUS with a new E8200 Core 2 Duo processor. The system works nicely most of the time, however there is trouble: The Marvell Gigabit Ethernet adapter on the motherboard still has some issues with GNU/Linux kernel. Even the Intrepid ...

Google's App Engine

Image
We've got a talk at our university about App Engine by Googler Mano Marks. In short App Engine is Google's alternative to LAMP. And, like Gmail, Google is offering you free hosting for your web-based application (up to certain storage and daily bandwith limits). Application logic is written in Python, although other languages might be supported in the future. And backend storage is based on BigTable , which does not follow the classic relational model of many *SQL databases. For me these are two changes that may turn some developers down, but the strong point I think is that developers can forget about scalability or availability problems. While I've created an account and I've downloaded the SDK , I'm only studying the demos at the moment. If you are interested on learning more I think you'll find the video from Developer Day interesting.

New VMware vmplayer installer for Linux

Image
Since yesterday vmplayer 2.5 is out for free download. One of the tools missing in Ubuntu 8.04 was this (IMHO). Of course it was possible to install it through a more entertained process. I was surprised that VMware was not offering an easy alternative to the huge Ubuntu user base. Today I've learnt that current version is distributed with an easy (should I say Windows-like?) installer. Download the software package with .bundle extension chmod +x VMware-Player-2.5.0-118166.i386.bundle sudo ./VMware-Player-2.5.0-118166.i386.bundle Done! Thanks VMware!

Reasons not to upgrade a G4 iBook

Years ago we bought one of the latest G4 iBooks as a bit later Apple started using Intel processors. The 12" laptop served us well but now battery and hard disk were dying a RAM was just 256MB. Acting against my own advice I decided to upgrade the system instead of buying a new one. Buying RAM was not easy as mini DDR 333Mhz RAM was not popular anymore. Luckily I bought it second hand from a friend. A new battery was required to get more than one hour of autonomy again, so I bought a new battery from a Chinese source on eBay. So far so good. I knew that replacing the hard disk would be a real PITA but I fell short. I bought a 160GB 2.5" on the local shop for less than $90. I would say that physical replacement is not something you will enjoy doing more than once in a lifetime but I got the job done with only one screw missing. I had to reopen the thing because I forgot to put back the standby magnet, it was not fun. So once I thought everything was fine as the new hard dri...

Sterling numbers of the second order

Image
I am sure once in a while you may have faced the problem of distributing n elements into k different groups. It does not seem rocket science but, do you know in how many different ways it can be done? Of course it is not a new problem a all, and here is where the Stirling numbers ( of the second kind ) come in handy: they tell you the ways of dividing n elements into k groups. For the Code Jam problem "Square Fields" large dataset the numbers may seem discouraging as the number of alternatives for 15 elements are: S2(15,1)=1 S2(15,2)=16383 S2(15,3)=2375101 S2(15,4)=42355950 S2(15,5)=210766920 S2(15,6)=420693273 S2(15,7)=408741333 S2(15,8)=216627840 S2(15,9)=67128490 S2(15,10)=12662650 S2(15,11)=1479478 S2(15,12)=106470 S2(15,13)=4550 S2(15,14)=105 But for the small dataset combinations are just a few after all: S2(7,1)=1 S2(7,2)=63 S2(7,3)=301 S2(7,4)=350 S2(7,5)=140 S2(7,6)=21 So brute force would have worked nicely for the small dataset case but not so for the large one.

Feeling of frustration

Image
I joined yesterday a CodeJam practice session. It seems Googlers were fine tuning the contest site for the onsite finals to be held soon. Problems were (or they look) easy but a combination of stubbornness and not thinking before coding let me in an embarrassing position (the best thing I can say I was not the worst player). However I failed to see the very easy relationship on the number of black balls (odd/even) and the final output of the Old Magician problem (too late I found out that even black balls lead to a WHITE result, BLACK otherwise and UNKNOWN was just a distraction). The square fields problem looked very much like a k-clustering problem, but here the clusters are all same size and square shape. You have to answer what is the minimum size of the squares to get a partitioning on exactly k-clusters. I can tell you how other people solve it, but you can read this by yourself. Instead I'll tell you what won't work: My first idea was to use java awt library and Rectangl...

New Arduino form factor

Image
A couple of new versions of Arduino boards can be found on Arduino blog: the Arduino Pro and the Arduino Pro Mini (depicted here). Both work at 3.3V and I think that makes them ideal for battery-powered applications. In my case I'm going to create a small circuit to interface the Mini to an XBee wireless module to create a smallish wireless sensor. Hopefully I'll get much longer operation times than those Rob Faludi measured with Diecimila and XBee shield.

Klondike with a twist

Image
Before Windows I've never played Klondike (aka Solitaire). I do not like it very much as many times I've got stuck so I do not play it very often. This time roles have switched and I find myself writing code to play the the game: There is an ongoing TopCoder programming contest where you are asked to write the "game logic" code. I am a poor Klondike player and it shows in my code. There are many pages out there with guidelines on how to play it well, but sometimes the rules are too high-level . To make things worse the game is known not to be solvable in some cases . Competition will be open till September 10th.

It was about time

I've waited till the end of my holidays to upgrade the operating system of various of my computers. I was happily running Ubuntu's Gutsy (7.10) and I'm upgrading to the new Hardy (8.04). Actually it is only one month more for the new version to be available, but this time I did not wanted to upgrade in the middle of the semester. Contrary to other times, this time I decided to do the upgrade using the embedded upgrade feature of the system updater. My conclusion is that, as usual, it is a risky proposal: My laptop froze when updating the locales (a known bug as I found out later) but killing locale-def allowed the process to come to an end. Lately the system healed itself and everything seems to work as expected now. A minor complain is that now the system takes a few more seconds to wake up from suspend. On one of my desktops the experience was different but not fault free: No complains or hangs on the locale but an error message about not being able to install linux-ubunt...

Another challenging problem

Image
Code Jam round 3 seems to be quite more challenging than previous rounds. I was not able to complete Polygonovich's professor problem in two hours. I was quite happy with the use of java.awt.Polygon object, mostly because it includes a contains method that seemed quite useful for this problem. However solving the problem took longer than expected too, as I wanted a method that worked nicely for both the small and large problems. In the mean time I constructed the whole set of graphs for the small dataset. You may find it interesting. Vacation time is over though, so I'll be back to work soon I still I have some problems pending.

Keeping me entertained

I thought the Crop Triangles Code Jam problem will be gone in no time. It looked simple the morning I started with it and I was expecting to have it all done by lunch time. The basic idea is that you have an integer coordinate system (or grid) and in certain points of the grid there are some trees located. If you use those trees as vertices to make triangles ... how many different triangles can be created? Well, the answer to that is actually quite simple using combinatoric numbers, but they added a restriction: the center of a valid triangle has to be located on a grid coordinate, if not do not count that triangle. A triangle with vertices (x1,y1) (x2,y2) and (x3,y3) has a center at coordinate ((x1+x2+x3)/3,(y1+y2+y3)/3) My first solution was to simulate the system. Given all the available trees, I will go though all the different combinations and after checking each one a counter will give me the valid answer. That idea worked nicely for the small dataset (once I realized that Case #...

CVT vs MT vs AT vs AMT

Image
I've always owned manual transmission (MT) cars, but while living in USA I drove automatic transmission (AT) cars most of the time (manual transmission is not very popular over there). When I recently bought a car I was offered a continuously variable transmission (CVT) that, instead of gears, uses an steel belt and two variable-diameter pulleys. The system works nicely and it may even offer a set of "simulated" fixed transmission rates. While the fuel economy is not as good as MT it gets quite close. For many years AT cars exhibited worse fuel economy than their MT counterparts. I've always found weird that, but I am not a mechanical engineer 8but wikipedia tells me it's because of torque converter mostly). Now it seems some manufacturers, probably feeling the pressure from regulators due to the high cost of petrol, are delivering a new technology (maybe not so new) dubbed as automatic manual transmission (AMT). The good thing about AMT is that its fuel e...