Thursday, July 31, 2008

Hardware failures for the loose

My Dell laptop (which is my primary computer while I'm in the states) has died today. I'm typing this on a Asus EEE PC I bought the last time I had to send my regular computer in for service. Hopefully all goes well, but this means I've probably lost a weeks worth of code :(

Monday, July 21, 2008

Wireless Spectrum bidding ends, new Wireless Carrier for Canada

If your not Canadian, this probably isn't a lot of interest to you. However for Canadians this is excellent news. Yak Communications announced today that they have won spectrum across all of Canada (with the expected and notable exclusion of Quebec) and are intent on providing cellular access. There press release alludes to the current high prices and lack of service on existing Canadian wireless carriers. Sadly the spectrum they own won't work with any of my existing phones, but maybe for the next openmoko :P Anyways more competition is good, and certainly needed.
The full text of the press release since doesn't seem to be on the wire services yet:




    GLOBALIVE READY TO USHER IN A NEW ERA
    OF WIRELESS CHOICE FOR CANADIANS

    Globalive set to become a major wireless carrier in Canada

    TORONTO – July 21, 2008 Globalive Wireless Management Corp. is pleased to announce that it has provisionally won spectrum in Industry Canada’s Advanced Wireless Services Spectrum Auction across Canada (excluding Quebec) with an investment of over $442 million. With this victory, Globalive has set the stage to become a major presence in the Canadian telecom market.

    “This is an historic event for wireless users across the country,” said Anthony Lacavera, Chairman and Chief Executive Officer of Globalive Communications Corp. “It marks a new era of choice in Canada’s wireless world. At Globalive, we have earned a track record of innovation; that’s exactly what Canadians can expect from us when we announce our wireless offerings.”

    The auction, which began May 27, 2008 and concluded earlier today, was initiated by the federal government to increase competition in Canada’s wireless market. The reasons that led to the auction include:

    * Higher prices- Canadians pay an average of 60% more for mobile wireless services than Americans according to the Telecommunications Policy Review Panel (Final Report, March 22, 2006).

    * Fewer services – Canadians are missing out on high-tech mobile services. These services are becoming an integral part of modern business life (such as lightning fast internet connections, video-conferencing, video and TV streaming, and interactive application sharing) are not being introduced in Canada at the same rate as the rest of the world.
    * Low penetration - Only 58% of Canadians have a wireless device, such as a mobile phone, compared to the United States where more than 77% have a wireless device. Other industrialized countries, such as the United Kingdom and Hong Kong, have wireless device penetration of over 100% (The Economist’s Pocket World in Figures, 2007 edition).

    Globalive Wireless Management Corp., which was formed to participate in the auction, includes a leading international wireless operator in Orascom Telecom Holding S.A.E.

    “The domestic knowledge of Globalive, combined with the worldwide wireless expertise of Orascom Telecom, will allow us to bring the best practices in wireless to Canada,” said Michael O’Connor, Vice-President, Globalive Wireless Management Corp.



Three cheers for (hopefully) lower cell phone (and more importantly data) costs :)
Update: The end of the spectrum auction announcement has now hit the news wires
Update 2:A friend of mine pointed out this story about Orascom (one of the Globalive partners) possibly being involved in rebuilding the North Korean Hotel.

My start with the OpenMoko/FreeRunner

Now that I have my OpenMoko its time to get started developing for it. I have a number of personal itches that I want to scratch, but like with learning any new language or platform I find it best to start with the smallest useful project possible.

With that in mind I decided I'd create a small opkg (openmoko's package format) to sync the time from the gsm tower. After doing some digging in the gsm daemon it turns out that there are two separate parsing functions, one of which is never called (which is good because it does nothing), and the other which rejects the value reported by both AT&T and T-Mobile [it assumes a range of -48 to 48] and the networks report 138 for GMT-8. Reading GSM 02.42 didn't help much, except specifying that the time resolution must be at least 15 minutes. There seems to be very little, documentation about gsm network time. If you've got an FreeRunner or Neo and some free time and could add:

gsmd_log(GSMD_ERROR,"starting ctzv_parse parse param=%s in unsol\n",param);

to the ctzv_parse function in unsolicited.c file in the gsm module & recompile and let me what get puts in the GSM log along with your location & network information I'd be greatly appreciative :)

In the mean time, my plan for tomorrow is a auto-sensing gprs dialer, because setting up internet by hand on your phone is not fun-times.

I'm hoping to be able to announce and get started on an interesting project for the OpenMoko later on this week, so stay tuned :)

Friday, July 18, 2008

Co-Op term at Amazon

This semester I'm at Amazon, its quite a lot of fun. Seattle is a really nice city, especially in the summer. At Microsoft some people referred to the summer as "demo weather" because thats when they brought down the interns to try and recruit them :)

Most of my summer is being spent working on the problem of detecting miss-classified items (so for example if a fridge was listed as a shoe that would be bad news). Its the kind of work which I really enjoy because its fairly open-ended in terms of the solution and hard. A lot of traditional stock solutions proved to be unworkable since we have such a large data set. Oddly enough searching for information about scaling the approaches I dumped into some posts by a third-party trying to accomplish something similar with a subset of the Amazon data :).

Since the general rule of software projects seem to be if you create it you get to name it, I decided on naming my project "BrowseEpicFail" (I later renamed it to be more descriptive after I was informed that our team name isn't actually browse :P). Apparently one of my co-workers though this was pretty funny because I now have a faux-certificate, in the same style as the training certificates, in "Selection of Appropriate Names for Software at Amazon" :).

The only downside of all this is that I find my self having to ensure I don't spend all of my coding time on work code.

On that note, I'm hoping to have some exciting news about an application I'll be working on for the OpenMoko platform sometime next week :)

Thursday, July 17, 2008

Integrating your HUnit (or other) tests into your cabal package

As part of one my side projects I'm working on learning haskell, and creating a simple DNSBL lookup tool. An important part of any project, especially one which you plan to build on top off is its testing. There are quite a few options for Haskell testing such as quickcheck,etc., and the one that I ended up using HUnit. Most developers that I know have been burned at one time or another by making some "trivial" change building it and checking it in to only have it fail when running there tests would have caught it.

The solution of course is to integrate your automated tests into the build process. Cabal is a wonderful package build system for haskell. Unfortunately, very few (if any) people seem to use the provided mechanism for hooking in tests. The first set is opening up the Setup.hs (or lhs) file and overriding the default test hooks.
Start off by importing the necessary libraries

import Distribution.Simple
import Distribution.PackageDescription(PackageDescription)
import Distribution.Simple.LocalBuildInfo(LocalBuildInfo)
import System.Cmd(system)
import Distribution.Simple.LocalBuildInfo

Then we need to replace the default main (main = defaultMain) with a main with our command hooks:

main = defaultMainWithHooks (simpleUserHooks {runTests = runzeTests})

Now we need to define runzeTests so that our tests get run. You might be tempted to just through your tests inside runzeTest, but thats a bad idea since your module isn't visible. So we just make the test hook call out to our program:

runzeTests:: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO ()
runzeTests a b pd lb = system ( "runhaskell ./tests/mytests.hs") >> return()

Now if you've put your sources in a subdir (lets say src) you need to tell runhaskell where to find it, so instead do this

runzeTests a b pd lb = system ( "runhaskell -i./src ./tests/mytests.hs") >> return()

And now its done! You can run your tests with cabal by running

runhaskell Setup.hs test


The alternative approach, if you are using darcs, is to set darcs to run your tests:

darcs setpref test "runhaskell test/test.hs"

Or for the best of both worlds, configure cabal as above and set darcs to run your cabal tests:

darcs setpref test "runhaskell Setup.hs test"

For those of us who are running in git we can add it to our git pre-commit hooks to keep us from accidentally checking in broken code, just add:

runhaskell Setup.hs test

to the bottom of your pre-commit hook file (don't forget to make it executable :)).
We can even make the commit fail if our tests fail by returning the status from the test. Just store the return code where you run the test:

runhaskell Setup.hs test
code = $?
...[someother precommit hooks]...
exit code

Wednesday, July 16, 2008

Gaping hole in Gmail Privacy

I came across a an interesting blog post showing how to get the name of a Gmail account. Since the bug was visible through Google Calendars I hoped that it was maybe limited to users who had signed up for Google Calendar. This is not the case. The steps that I followed:
1)Register brand new gmail account with default settings

register new Gmail account

2)Go to google calendars (as a different user) select a calender invite the user to share one of my calendars (click on the down arrow next to your calendar)

choose a calendar to invite the user to share

3)Invite the user

Invite the user to share your calendar

4)Save the changes (note that it indicates the user isn't registered for Google Calendars) & go back

Invite user to Google Calendars

5)See the users name

see the username

Normally I'm all for notifying the company of the problem before public disclosures, but the cat is well out of the bag and having a walk around.
It apparently works regardless of whether the user is signed up for Google Calendars.
For me this isn't much of a problem, I'm incredibly easy to track down and my e-mail address has my name in it, but I know for others this could be quite an unwelcome surprise. Lets hope Google fixes this soon.
With that being said if you don't use google calendar you can see if anyone has used this to find out your name because you will get a google calendar invite.
(note: you can click through for a larger version of any of the images)
Update:This works not only on GMail accounts but also on Google App Domain accounts. Perhaps something for universities considering outsourcing their mail to consider.

Tuesday, July 15, 2008

DNSRBL module for haskell released

I'm pleased to announce that I've uploaded my first ever module to hackage (so please be kind, but suggestions are warmly accepted). The module looks up a hostname (or a hostname & hostaddress) on a set of DNSRBLs. This is probably of use only to a very small percentage of people (the application I've created it for is anti-spam and I can't really see any use outside of that). But with that being said check out my DNSRBL module,or on hackage along with the classy documentation.

Monday, July 14, 2008

Unboxing the OpenMoko/FreeRunner including the spares kit, debug board

My FreeRunner (along with debug board and spares kit) has just arrived today. A few people have already unboxed FreeRunners, but I haven't seen any pictures of the debug bored so I figured I'd show:

I've been playing around with getting it to register on AT&T and T-Mobile. T-Mobile worked with my first SIM card, which was no big surprise. Given the difficulties with the Neo1973 and AT&T SIM cards I wanted to try it on AT&T, which was less of a success. Of my 3 AT&T 3G SIM cards, 2 of them worked, and one had a bit of difficulty:

r
# Register
EVENT: Netreg searching for network
EVENT: Netreg registration denied

Some words of advice to wrap up the pictures, when following the getting started with your FreeRunner guide, if you are behind a router there is a chance your ethernet connection is 192.168.*.*, you can get around this by just running:

route add 192.168.0.202 usb0

since it looks for the most specific route first :). One last parting word of advice, if you are in the USA you probably want to use the phone on T-Mobile for now since AT&T apparently still has some unresolved issues.
The full set of photos I took unboxing the OpenMoko/FreeRunner are here
I'm planning on writing some code for this, but honestly it is about #3 on my project list for the time being. I'm thinking about writing an auto network configurator for GPRS settings, but I'm going to have to look at what functionality the existing network configurator provides and now to plug into it.

I just got my Hackage account

Which means that I will be uploading my first attempt at creating a haskell package ( a small library to do lookups in DNSRBLs ). Funtimes :)

Thursday, July 10, 2008

OpenMoko/FreeRunner

Phones are a guilty pleasure of mine, I own quite a few. The OpenMoko/Neo FreeRunner look quite interesting, if not particularly state of the art. I ordered my phone from the online store almost as soon as it went online and have been waiting for the shipment notification (apparently they were overwhelmed with the volume of orders).I just got the e-mail confirming that my phone has shipped :)
I'm looking forward to hacking on some low level code again :)

Free Blog Counter