At Intel Research in 2005, I ran a study called "Voting with your Feet" that examined the relationship between a person's place preferences and their place visit behaviors. We were exploring a simple question: could a location-based system make recommendations about places that you might like based on your travel history? We looked at features like travel distance, place visit frequency, whether you visited the place alone or with others...
Monday, February 08, 2010
Voting with your Feet coming to Fruition? Google Maps Suggests Places You Might Like
At Intel Research in 2005, I ran a study called "Voting with your Feet" that examined the relationship between a person's place preferences and their place visit behaviors. We were exploring a simple question: could a location-based system make recommendations about places that you might like based on your travel history? We looked at features like travel distance, place visit frequency, whether you visited the place alone or with others...
Wednesday, January 06, 2010
Anonymous Methods for Control.Invoke
Monday, December 21, 2009
Batch Change/Rename File Extensions in Windows
Thursday, December 17, 2009
How to select the first/least/max row per group in SQL
Protovis How To

SVN/CVS Update Like Command in Mercurial
Thursday, August 21, 2008
The Death of a Laptop, Dell M1330
My current Dell laptop, the XPS M1330, has been a lemon almost since the beginning. Purchased in March of 2008 by April it had already exhibited strange behaviors, which I attributed to Vista. By mid-April, Vista blue-screened and I could not reboot even in safe-mode. Unfortunately, I was traveling in Europe at the time. My laptop became a brick that I had to lug around Italy and Greece. When I returned to the US, I spent two days reformatting the drive and installing applications from scratch. This was the first time I have ever had a computer fail to the point of requiring a complete reformat and yes I am a lifelong Windows user (maybe I've been lucky?).
At the present time I am again in Europe for business and, once again, my Dell XPS M1330 has failed me. This time, no amount of technical knowledge can solve the problem--I've been hit by the defective NVIDIA GPU issue. On Sunday (five days ago), my laptop screen started to freeze up and automatically reboot. This happened seven times in five hours (I'm stubborn and I was working on a deadline). Now my laptop refuses to boot at all--or, more accurately, boots with these beautiful vertical lines (see below). And no, plugging in an external monitor does NOT fix the issue. This is a video card problem, not a monitor problem. I should note that I am extremely reliant on my laptop--it is my primary computer (I'm almost like a Mac person in that way... perhaps I should take the hint and switch to a Mac?). Thus, I have incurred considerable cost in work time trying to remedy this issue not to mention the fact that I am now stuck in Europe without a computer.
Fortunately, Dell support has been incredibly responsive, answering my requests for help only hours after the initial email. However, since I am in Europe they want me to upgrade to international warranty coverage in order to receive support here. I most certainly do not want to blow this out of proportion but that offer seems a bit ridiculous. You would think that in the case of a known hardware defect, they would make some compromises in their regular procedures. From a Dell support email:
...since you are in Europe right now, if a service call needs to be processed to repair your system, I do regret to inform you that your current warranty does not support International coverage. You can either return first to U.S and have your system serviced there, or Transfer your system's ownership to Spain so Dell Spain Support will be the one assisting your for this matter, or lastly you can contact our Ext Warranty Department at 800 247-4618 to upgrade your warranty to have an International Support so we can process your request and provide service on any country that are covered by Dell International Warranty support.Some Background on the Issue
In early July, NVIDIA informed stockholders of the problem:
...the company just informed investors that "significant quantities" of previous-generation graphics chips have been failing at "higher than normal rates," and that it's lowering its Q2 estimates due to pricing pressure. NVIDIA will be taking a $150M to $250M charge against earnings next quarter to cover the cost of repairing and replacing the affected chips, but didn't specifically announce what products were defective, just that they include GPUs and "media and communications processors." Laptop makers have apparently already been given an updated GPU driver which kicks in fans sooner to reduce "thermal stress" on the GPU, and NVIDIA says it's talking to its suppliers about being reimbursed for the faulty partsDell's initial strategy was to release a BIOS update, which essentially keeps the laptop's CPU fan on continuously to decrease the temperature. This is a major kludge in my opinion but better than nothing, the major downsides are that #1, it does not really address the problem and #2, the resulting noise and decrease in battery life. From engadget:
...quite a few NVIDIA GPUs have been acting up. Nothing new there. However, Dell's attempting to help its laptop owners out by making a few notable BIOS updates readily available for download. Apparently the issue "is a weak die / packaging material set, which may fail with GPU temperature fluctuations." In order to combat the problem, Dell's BIOS flashes "modify the fan profile to help regulate GPU temperature fluctuations," though the Round Rock powerhouse only promises that the updates will "help reduce the likelihood of GPU issues." Hit the read link and give it a go -- it can't hurt... we hope.Many are upset with Dell's strategy here as a BIOS update does not fix the problem, it only decreases the likelihood that it will occur. As many have pointed out, this could simply delay the problem until the laptop is out of its warrenty period. From the Inquirer:
To make matters more laughable, the fix that NV is forcing on Dell, HP and everyone else does not fix the problem, it simply makes it less likely to occur during the warranty period. With HP now offering an extended warranty period, and Dell looking likely to do the same, this will only multiply the cost. Add in the fact that Nvidia is sending out defective parts as replacements (there are no good ones), and you have a recipe for a long and expensive tale.On Monday of this week, perhaps as a result of HP offering a similar deal to customers, Dell released this statement on their direct2dell blog:
NVIDIA GPU Update: Dell to Offer Limited Warranty Enhancement to All Affected Customers Worldwide. Dell will offer a 12-month limited warranty enhancement specific to this issue. For all customers worldwide, we plan to add 12 months of coverage for this issue to the existing limited warranty up to 60 months from the date of purchase for the following systems:Where Do We Go From Here?
However, what remains to be seen, is exactly where do Dell customers, like myself, go from here? It appears that there are, in fact, no good reliable NVIDIA video cards available and Dell is absolutely drowning in the problem. Also, from the Inquirer:
"We just got our first casualty from the Nvidia mobile graphics [expletive deleted]. Laptop used by one of our senior engineers started acting up this past weekend. Won't boot except in SAFE mode. Called Dell, they tried a few things, gave up, stated it was the graphics module, and said that because they were SO swamped dealing with that issue, they were just going to send a completely new laptop!"If Dell chooses to send me a new laptop, I hope it's a laptop with an ATI mobile graphics card or even Intel's own integrated graphics chip. Many are asking whether Dell is still shipping laptop's with defective parts and whether replacement parts are also defective (there is speculation that NVIDIA still has not corrected the problem).
There are two messages here which have echoes in earlier emails received over the past few weeks. First is that Dell is replacing full laptops over this, contrary to what they claim (read the comments here and here for more). The second is that the small 'under control' problem is far from that. If they had a handle on it, they would not be so far behind and drowning in backorders. Anyone want to bet Dell isn't going to get stuck with the bill here?
Some related posts:
- Dell Post #1: NVIDIA GPU Update for Dell Laptop Owners
- Dell Post #2: Latest on the NVIDIA GPU Issue for Dell Laptop Customers
- Dell Post #3: NVIDIA GPU Update: Dell to Offer Limited Warranty Enhancement to All Affected Customers Worldwide
- Desktop NVIDIA Cards Also Failing, Nvidia G92s and G94 reportedly failing
5:40:55 PM Agent: May I ask if you are in the united states currenty?
5:41:10 PM Me: i am not currently in the united states which is the essence of my problem
5:41:16 PM Me: i am traveling for business
5:41:37 PM Me: this makes my laptop even more significant to me
5:42:01 PM Agent: You need a new motherboard/integrated video card, sir
5:42:12 PM Me: that is true
5:42:26 PM Agent: This is a known Nvidia problem.
5:42:31 PM Me: yep, i know that
5:42:39 PM Me: but this is a dell system
5:42:45 PM Me: nvidia doesn't sell computers
5:42:57 PM Agent: have you contacted international support?
5:43:16 PM Me: i was informed by a previous support agent that i would need to "upgrade" my warrenty in order to receive international support
5:43:53 PM Agent: I would get you one immediately for next day service if you were in the United Sates
5:44:00 PM Me: Great. i am in Europe.
5:44:07 PM Me: let's talk about what you can do for me here
5:44:10 PM Agent: one, moment please
5:47:27 PM Agent: XPS_Michael_135201 pushes page, http://support.dell.com/support/topics/global.aspx/support/dellcare/international_travel?c=us&l=en&s=gen
5:48:03 PM Agent: you could place a local phone call to where you are at to get that replaced.
5:48:18 PM Agent: Is there anything else I can help you with today?
5:51:41 PM Me: ok, assuming i got the next day onsite service, would the replacement motherboard/gpu contain a new revision of the Nvidia hardware
5:53:13 PM Agent: The Nvidia problem, was a weak series of chips in the actual construction ( a weak die-cast) the replacement would not be from that line
5:53:25 PM Me: could i get an ATI chipset instead?
5:53:34 PM Me: or could i opt simply for the intel integrated video?
5:55:36 PM Agent: We can offer to replace it with a good part that is the same as what you purchaced.
5:57:41 PM Me: ok
5:58:10 PM Me: thank you for your help.
Update 08/22/2008 7:38PM GMT +1: Some people have asked for more pictures and a better description of how I knew my laptop was failing. It took five days from the first day of experiencing problems to complete failure (e.g., a completely dead laptop). My first indication that something was wrong occurred on Sunday, August 17th (six days ago now). I was using Excel and Word and then suddenly my screen would change color, look pixelated and Vista would freeze. This transformation usually lasted about 5-10 seconds before Vista would either blue screen or simply force-reboot my laptop. I had not heard of the NVIDIA GPU issues so I (ignorantly) thought this was yet another Vista bug. I do not have any photographs of my laptop screen in that state in Vista, unfortunately, but here is a picture I took on Monday when trying to run a diagnostic tool that froze mid-session:
After Monday, things only got worse and by Thursday I could not boot my laptop at all. Or, more specifically, the laptop would boot and look like this:
Update 08/25/2008 01:00PM GMT +1: Dell sent a service technician to fix my laptop, who, I must say was both incredibly efficient and friendly. Unfortunately because my Spanish is far from as good as my English, I was unable to gain much more information from the technician about how rampant and widespread this problem is. The "fix" for this issue, incidentally, is a whole new motherboard, which requires one to take nearly everything apart in the laptop and then put it back together. This particular technician had clearly dealt with many M1330 before as he was able to take apart the laptop, put in a new motherboard, and reconstruct the laptop in under 15-20 minutes.
Note that I am not certain whether this "new" motherboard is really new (or just a refurbished one). Nor am I aware of whether this "new" motherboard contains a fixed NVIDIA GPU. The BIOS software read A08 upon first boot. I immediately upgraded it to A12; however, the A08 number gives some indication as to the age of the laptop (e.g., when was the A09 BIOS firmware released?). Here are some pictures.
Monday, July 14, 2008
Saturday, July 12, 2008
Open Innovation: New Corporate R&D Strategies
Pundits in recent years have taken to bemoaning a retreat by U.S. industry from basic research in science and technology. And indeed, it's easy to cite research labs whose glory days have come and gone -- Bell Laboratories comes to mind. But consider this: IBM, Microsoft and Hewlett-Packard together spend $17 billion annually on research and development.
from: The new face of R&D: What's cooking at IBM, HP and Microsoft
Wednesday, July 09, 2008
Google Earth Crashes on Polygon Edit
Monday, July 07, 2008
Auto-Generate KML C# Classes
>xsd /c ogckml22.xsd atom -author-link.xsd xAL.xsd
This will generate a C# file called ogckml22_atom-author-link_xAL.cs.
Thanks to these two blog posts for the help: xsd command and multiple xsd files and Error generating classes for schema 'MySchema.xsd'.
Wednesday, July 02, 2008
Google Maps Street View in Middle America
Now, there have been plenty of write-ups online about the chilling implications of this technology from a privacy standpoint (see end of this post). Admittedly, I had not paid much attention to said implications until now. What I find startling here is not just that my family was captured on film and automatically uploaded by Google but that this picture was taken while my brother-in-law was on his private property in front of his own house (with my little niece no less). Further, if you click on the "Full-screen" link, the Street View photo itself increases in size, which is even more unsettling. It just makes one feel invaded. Note, here, however that there is evidence that Google is running automatic face detection algorithms and blurring faces. Automatic face detection is pretty much considered a solved problem in the computer vision world (face detection is not the same thing as face recognition). It's difficult to tell if Google is in fact explicitly obscuring the face here or if the overall photo quality is just poor.
Although the photo quality published online is rather low, I would not be surprised if the original captured image was of much higher quality, which likely still resides in a Google database somewhere. I would imagine that Google has plans to apply computer vision algorithms for automatic object detection, 3D-routing, sign reading, sidewalk routing (for people routing, rather than car routing), etc. Thus, there would be little reason for them to invest the money into Street View and not capture the highest quality imagery possible.
Some related links
Wikipedia's Google Street View page has a Privacy issues section as well as a long list of links to articles and news items related to Street View's growth, governmental concerns, and privacy implications:
Privacy advocates have objected to this Google feature, pointing to views found to show men leaving strip clubs, protesters at an abortion clinic, sunbathers in bikinis, cottagers at public parks, parents hitting their children, males picking up prostitutes and other activities, as well as people engaging in activities visible from public property in which they do not wish to be seen publicly.[19] Google maintains that the photos were taken from public property. Before launching the service, Google removed photos of domestic violence shelters, and allows users to flag inappropriate or sensitive imagery for Google to review and remove.[20] When the service was first launched, the process for requesting that an image be removed was not trivial;[21] however, Google has since changed its policy to make removal more straightforward.[22] Images of potential break-ins, sunbathers and individuals entering adult bookstores have, for example, remained active and these images have been widely republished.[23]
Mashable has a Top 15 Google Street View Sightings page including pictures of a possible crime in progress, female sunbathers, and men coming/going from adult related entertainment venues. Some more Street View oddities are listed on this blog post. The New York Times has an article entitled Google Zooms In Too Close for Some, which is also worth a look as it briefly explores the idea of public vs. private and ownership of data.
Monday, June 30, 2008
Skinny Love Primavera Sound Festival 2008
A friend I was with recorded this video of Bon Iver at the Primavera Sound Festival in Barcelona. We were sitting in the third row. It was my favorite show of the entire weekend. If you have an opportunity to see them, it's an amazing musical experience--I strongly recommend it. (Plus, it doesn't hurt that Bon Iver is a Wisconsinite, support your local midwest artists!).
Wednesday, June 25, 2008
Thursday, June 19, 2008
Sunday, June 15, 2008
Querying Big Datasets with MySql and Java
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1444)
...
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1746)
...
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885)
The solution was non-intuitive but an easy find with Google. From MySQL JDBC Memory Usage on Large ResultSet:
If you are working with ResultSets that have a large number of rows or large values, and can not allocate heap space in your JVM for the memory required, you can tell the driver to stream the results back one row at a time.
To enable this functionality, you need to create a Statement instance in the following manner:
stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY,
java.sql.ResultSet.CONCUR_READ_ONLY);
stmt.setFetchSize(Integer.MIN_VALUE); The combination of a forward-only, read-only result set, with a fetch size of Integer.MIN_VALUE serves as a signal to the driver to stream result sets row-by-row. After this any result sets created with the statement will be retrieved row-by-row.
There are a few caveats, which are described in the following links:
- MySQL JDBC Memory Usage on Large ResultSet
- Reading row-by-row into Java from MySQL
- JDBC API Implementation Notes
- MySql Streaming ResultSet
Friday, June 06, 2008
Bicing Usage Survey Now Live!
Bicing Overview
For the 24 Euro a year payment, you can ride for 30 minutes for free. After that, each 30 minutes costs 30 cents up to 2 hours. Bicing is meant to be used for commuting--thus, if you surpass your 2 hour limit, monetary penalties begin to emerge (3 euros / hour). Bicing applies service penalties (reduced access to Bicing) if you exceed the two hour limit on more than three occasions. Note, however, that you can bike everywhere in Barcelona easily within an hour so two hours is more than enough time. If you keep the bike out for 24 hours, you pay 150 Euros (the cost of the bike). Bicing is meant to provide an alternative form of transit in the city (e.g., to reduce congestion). As a result, it is not a service for tourists, only for residents of Barcelona (and surrounding areas). The kiosks are in two languages: Spanish and Catalan (Catalan is the regional language here).
Figure 1. (left) A Bicing kiosk. (right) A close-up of the Bicing LCD screen. Note that only two languages are used: Spanish and Catalan.
Checking-in / Checking-out Bikes
The Bicing system relies heavily on technology to control and enforce usage. The Bicing cards are RFID. To check out a bike, one simply swipes their Bicing card at the Bicing kiosk. The kiosk contains an LCD flat screen that tells the user which bike was just unlocked for him/her. If the Bicing station contains no usable bikes (e.g., either it's empty or the bikes at the station do not work), the Kiosk informs the user about other stations close by. To return a bike, the user simply drops the bike at another Bicing station and the bike is auto-locked back into the grid. Note that since this system is so digitally oriented, it's very amenable to being studied (e.g., usage data comes nearly for free--kind of like real-world click through data). Bicing users can log into the Bicing website and see a chronological log of their usage. Note that this data only shows temporal activity and does not include data on which Bicing stations are used. The aggregate data of which Bicing stations are full/available is available online as well (see below).
Figure 2. (left) The Bicing RFID card. (right) A user scanning his RFID card across the Bicing kiosk.
Figure 3. A bike is automatically unlocked after the Bicing user scans his/her RFID card. The bike is automatically locked back into the station once the two prods on the underside of the handle bars are placed into the appropriate nodes.
Real-Time Bicing Information
The Bicing website uses the Google Maps API to create a near real-time geo-spatial visualization of bike usage (so you can check online if a Bicing station near home or work has bikes available). Here's the official website map and here's a slightly better version created by a Bicing user. ![]()
Figure 4. The Bicing map displaying stations with bikes available (in green) and not available (in red).
Bicing Bike Design
The bikes themselves are made of custom parts that do not interoperate with normal bikes (thus, thieves have little incentive to steal them). They are also quite unique in shape and coloring. Two self-powered lights are used (one headlamp in the front and one red light in the back) for safety. A three-speed gear shifter and a bell chime are located in opposing positions on the handlebars. Also, a handy basket is located on the front handlebars for carrying groceries, bags, or other things.
Figure 5. Two Bicing bikes locked up to a Bicing station.
Figure 6. Bicing baskets being put to good use (photo credit: Dave Chiu).
Some Bicing Problems
One problem that the Bicing system faces is that of load balancing. Often times the bikes become disproportionately distributed in the city. This is probably due to two factors: (1) Barcelona, as a city, is built on a hill. Thus, we speculate that many Bicers choose to bicycle downhill but not uphill (e.g., they commute on Bicing in only one direction). (2) The resident and commercial density of the city is not evenly balanced (i.e., many Barcelona citizens commute in the same directions). As a result, Bicing uses trucks to move bikes around the city. We spoke to a Bicing truck driver last week. He told us that the city has multiple trucks, each driver is assigned to a region of Barcelona and is informed via mobile phone on where to pick-up/drop-off bikes. The problem of load balancing is significant as it is a major deterrent to usage. Many Bicing users complain about going to a Bicing station to pick up a bike and finding it empty or arriving at a Bicing station to drop off a bike and finding it full.
Another issue which many Bicers are quick to point out is that although the Bicing service runs 365 days a year, it is not open 24 hours a day / 7 days a week. From Sunday through Thursday: the service is open all day except for between 12AM and 5AM, at which time you can only return bicycles (you cannot check them out). On Fridays and Saturdays: The service operates 24 hours. I would imagine that this constraint is based on some agreement with the city and has to do with safety.
Figure 7. (left) A Bicing truck. (right) The inside of the Bicing truck.
Figure 8. (top) A Bicing truck driver moving bikes into an empty station. (bottom) The before and after.
The Bicing Usage SurveyWe created an advertisement to promote our survey in three different languages: English, Spanish and Catalan.
Spanish - Llamada a todos los usuarios de bicing!
Somos un pequeño grupo científico de Telefónica Investigación y Desarrollo trabajando en informatica ecológica y sostenible. En uno de nuestros proyectos, estamos estudiando el sistema Bicing en Barcelona. Nuestro objetivo es aplicar tecnicas de inteligencia artificial e informatica avanzada para mejorar el sistema Bicing y vuestra experiencia con el. Por ejemplo, uno de nuestros objetivos es conseguir que las bicicletas estén distribuidas de una forma más eficiente. Este es un proyecto nuevo y queremos involucrar a la parte más importante del sistema Bicing: sus usuarios!. Por ello, hemos creado una encuesta online para recoger vuestra opinión y experiencia de uso con Bicing. La encuesta solo os llevara entre 5 y 10 minutos y los datos son totalmente anónimos.
Contamos con vuestra colaboración.
https://catalysttools.washington.edu/webq/survey/jfroehli/56868
Català - Crida a tots els usuaris de bicing!
Som un petit grup científic de Telefònica Recerca i Desenvolupament treballant en computació ecològica i sostenible. En un dels nostres projectes estem estudiant el sistema Bicing de Barcelona. El nostre objectiu es aplicar conceptes de intel•ligencia artificial i recerca en informàtica per millorar el sistema Bicing. Per eixample, un dels nostres objectius es que les bicicletes estiguin distribuïdes d'una forma més eficient. Com que aquest projecte està començant volem involucrar la part més important del sistema Bicing: els seus usuaris! Doncs, hem creat una enquesta online per recollir l'opinió de l’ús (positiva i negativa) de Bicing. Trigareu entre 5 i 10 minuts a realitzar l'enquesta, les dades son totalment anònimes.
Esperem la vostra col•laboració
https://catalysttools.washington.edu/webq/survey/jfroehli/56870
English - Call to All Bicing Users!
We are a small scientific group at Telefónica I+D working on "green computing" research. In one of our projects, we are studying Barcelona’s Bicing system. Our goal is to apply advanced concepts in computer science to improve the Bicing experience, so that, for example the bicycles are better distributed in the city. This project is just beginning and we wanted to involve the most important piece of the Bicing system: its users! Therefore, we have created an online survey to acquire feedback about your experience (positive and negative) with Bicing. The survey will only take about 5-10 minutes to fill out and is completely anonymous.
We look forward to your feedback!
https://catalysttools.washington.edu/webq/survey/jfroehli/56481
Saturday, May 24, 2008
Anything to Make You Smile
And while you're at it, purchase For Emma, Forever Ago by Bon Iver (fellow midwesterner). Here's my favorite track from that album: "Skinny Love" being performed live. The music starts at 45 seconds in on this video (don't mind the Brits).
Thursday, March 20, 2008
Vote for David Gillette!
My friend David Gillette, a talented artist and animator, has been nominated for a 2008 Yahoo! Video Award. Cast your vote for him here.










