Skip to content

Archive for October, 2008


Everbody should Vote and everbody should Report!

On November 4th 2008, millions of Americans will go to over 200,000 distinct voting locations and using different systems and machinery to vote.  Some voters will have a terrific experiences, and others will experience the same problems we have been hearing about for years – long lines, broken machines, inaccurate voting rolls, and others will experience problems that we haven’t heard about before. That’s why a new citizen-driven election monitoring system called Twitter Vote Report ( was just launched. Using either, iPhone, direct SMS, or our telephone hotlines, voters will have a new way to share their experiences with one another and ensure that the media and watchdog groups are aware of any problems.

And YOU can help!  Be a citizen journalist!  Submit a report about conditions at your polling place.

Four ways to submit reports to Vote Report:

  • Twitter: include #votereport and other tags to describe the scene on the ground
  • SMS: Send text messages to 66937 (MOZES) starting with the keyword #votereport plus other hash tags
  • iPhone: We have a Twitter Vote Report iPhone app in the App store!
  • Phone: Call our automated system at 567-258-VOTE (8683) to report about conditions, using any touch-tone phone

And if you would like to talk to a human to report bad conditions you’ve observed, please call our partner 1-866-OUR-VOTE.

As news outlets and blogs will report on Election Day stories, is an invaluable resource for thousands of voters to get immediate help. From questions like “where do I vote” or “how do I make sure that my rights are being upheld,” Twitter Voter Report augments these efforts by providing a new way for voters to send text messages (aka tweets) via cellphones or computers which will  be aggregated and mapped so that everyone can see the Nation’s voting problems in real-time.

Imagine a nationwide web map with pins identifying every zip code where Americans are waiting over 30 minutes to vote or indicating those election districts where the voting machines are not working. Collectively we will inform each other when the lines are too long and ensure that media and watchdog groups know where problems exist.

For more information, go to  The complete list of tags or keywords that you can include in your reports is listed there.   And please help to spread the word — send this to everyone you know!


Vote report iPhone app is official now!

Read Dave’s release note here.

Proud to be part of the process!

Sze Wong


I’m now with the Twitter Votereport team

Yeah, it’s funny. I got an email yesterday (Sunday) afternoon saying that someone is in great need of some iPhone help and the deadline was mid-night!! When I got home I looked into the project and found out that it is the Twitter Votereport application. ‘Interesting’, I thought, and what is required is indeed something I can do. So I responded to the email saying I could help but it was already 6pm. A few email exchange confirmed that I will be helping out and there I was joining the team.

I end-up working form 10pm to 6am on it. Yes, all for democracy. (Hopfully Dave didn’t reject all my code and everybody can use it on election day)



Developers Hate J-RAT

One of my team member told me that she saw another team using our J-RAT method. I said “Great! How they like it.” “All developers hated it,” she said. “They didn’t like being watched and couldn’t actually code when sitting with everybody.” Well, that is a classic misuse of J-RAT. Every J-RAT sessions that I moderate have been loved by developers, testers and users a-like.

J-RAT stands for Joint Rapid Application Testing. It is meant to replace either functional testing or user acceptance testing. The goal of J-RAT is to change the testing culture from bug centric to product centric, and remove the wall between the test team and the development team. The idea is to set aside a period of time for testing a particular module(s) and all related parties (developer, testers, business analysts, end-users) in the project should all sit in the same room and focus on testing. One moderator will be assigned to the room (usually the test manager) who’s job is to control the pace of the test and how many concurrent threads are running within the room. The room should have at least 2 white boards and ideally 2 projectors. The development team should control one projector and the test team should control the other projector. The moderator will control one white board where test cases are written on the board and everybody in the room should know which case(s) are currently running. The other whiteboard is for discussion.

For a successful J-RAT, the moderator must be trained to run J-RAT and must be respected by the team. Since the moderator is pretty much the boss during J-RAT and if people don’t listen, the process will breakdown.

J-RAT also calls for no senior management in the room, preferably not even the project manager (except when it is for user acceptancce test, then the PM must be there), as the goal is for the team to freely express their concerns and thoughts to get the product out the door without worrying about ‘politics’.

J-RAT done right will result in dramatic reduced in testing duration (usually 1/5), higher overall quality and much high team spirit.

The team that my team member told me about probably saw us running a successful J-RAT session and want to replicate that. However, without proper training, all they have copied is ‘putting everybody in the same room’. The result is a crowded room with a senior manager in it; everybody is nervous, and not much got done.

Sze Wong

Zerion Consulting


Back to Apple

My computer life began when my mom got me an Apple IIe in the 80s. I had great fun with that machine. Coding in Basic, upgrading memory (got the great 128K memory card) and even upgrading the CPU and built-in ROM. I left Apple when I sold the IIe and got an 386 in early 90s.

Since then I’ve been using Windows machines. There are a few times in my career when I tried to live with Linux machines but found it be too hard to actually have it as your only machine. The fun thing is, all these years since I’ve been developing software, I have never been really devoted my effort on the Microsoft platform (even tough I’m certified on .NET). Jobs took me to C++, Java, Unix but never had a chance to seriously develop for the MS platform.

3 months ago, I had lunch with one of my friend. He was in the process of quiting his full-time job to build an iPhone game company (His company is currently number 1 on the chart). He said, “Sze, this is the 80s all over again, this is an exciting new platform and exiting opportunity and you should not miss that.” That message stucked with me for two nights. That weekend I went and got a MacBook pro.

So here I am back to Apple and I am very happy to report that my MacBook is now my parimary machine. I’m now more than full-time in iPhone development and I am committed to this platform.


Problem about NSUserDefaults

After you register the defaults, you still need to do a sync to have
the values actually saved in the default database:

        [[NSUserDefaults standardUserDefaults] synchronize];

See if that helps.

Sze Wong
Zerion Consulting

On Sep 27, 12:10 am, Tom <> wrote:


> hi, all
>   i want to store some status of application to recover application’s
> status when start next time…for example, i want to display  a
> content my last inputed in the searchBar when applicaltion start. i
> used NSUserDefaults like this:
> – (void)applicationDidFinishLaunching:(UIApplication *)application {
>         [aViewController aSearchBar].text = [[NSUserDefaults
> standardUserDefaults] objectForKey:@”searchBarText”];
>        …

> }

> – (void)applicationWillTerminate:(UIApplication *)application
> {
>         NSLog(@”will terminate”);

>         NSMutableDictionary *defaultValues = [NSMutableDictionary
> dictionary];
>         NSString *searchBarText = [[NSString alloc] initWithString:
> [aViewController aSearchBar].text];
>         [defaultValues setObject:searchBarText forKey: @"searchBarText"];
>         [[NSUserDefaults standardUserDefaults] registerDefaults:
> defaultValues];
>         NSLog([[NSUserDefaults standardUserDefaults]
> objectForKey:@”searchBarText”]);

>         [[nbWikiUIController nbSearchBar].text writeToFile:@”searchBarText”
> atomically:YES];

> }

> but the content of searchBar is blank when you click the iphone
> simulator’s home button and start the appliclation ever, if
> you write some value to a file directly it will work well, like this:

> – (void)applicationDidFinishLaunching:(UIApplication *)application {

>         NSArray *paths =
> NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
> NSUserDomainMask, YES);
>         NSString *documentsDirectory = [paths objectAtIndex:0];
>         NSString *appFile = [documentsDirectory
> stringByAppendingPathComponent:@"searchBarText"];
>         NSString *myString = [NSString stringWithContentsOfFile:appFile];
>         [nbWikiUIController nbSearchBar].text = myString;
>        …

> }

> – (void)applicationWillTerminate:(UIApplication *)application
> {
>         NSLog(@”wikimate terminate”);

>         [[nbWikiUIController nbSearchBar].text writeToFile:@”searchBarText”
> atomically:YES];

> }

> If you do like this, you will get this warning:
> warning: ‘writeToFile:atomically:’ is deprecated (declared at /var/
> folders/Mv/Mv45MRvrHuKkTR4seo+8kk+++TI/-Caches-/
> CompositeSDKs/iphonesimulator-iPhoneSimulator2.0-
> cwkscxilvbhpyzhgdmxradhnpbjc/System/Library/Frameworks/
> Foundation.framework/Headers/NSString.h:352)

> i don’t know why…

> many thanks.

- Hide quoted text -

Get a snapshot of the image in the current view

Are you trying to save an image of your active UIView into a file or
the photo library?

If so, here:

        [pictureView.layer renderInContext:UIGraphicsGetCurrentContext()];

        UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
        UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);

pictureView is the UIView that you want to save.

Sze Wong
Zerion Consulting

On Sep 30, 12:13 am, equrick <> wrote:


> hi,all. how can I get a snap image of the current top view on the
> screen?  Are there some Api?
> many thanks.
- Hide quoted text -

Save files on the iPhone

Definitely. Read the following:…

The API supports FTP also.

I’ve not done FTP myself but we use NSURL to do HTTP Post/Get requests
and to send/receive standard content so what you are looking for is
definitely doable.

Sze Wong
Zerion Consulting

On Oct 3, 1:21 pm, Lata Rastogi <> wrote:


> Am trying to download a file from the internet and save it to my  
> iPhone using Objective-C so that my app can use it the next time it  
> runs.
> Basically, letting the user download some files from the internet on  
> his phone to be viewed offline later.
> Is that possible?

> Regards

- Hide quoted text -

Save files on the iPhone Options

Are you trying to save files that sits on your desktop to the phone’s
file structure through xcode? If you are talking about ActiveSync kind
of file transfer, then the answer is no. The iPhone (if you didn’t
know yet) is a very close environment.

Now, that depends on why you want to do that. If you want to put a
file into the phone so your app can access it, then just put it along
with your app and you can reference it through NSBundle, like:

                NSString *imagePath = [[NSBundle mainBundle]
pathForResource:fileName ofType:@”png”];
                UIImage *image = [UIImage imageWithContentsOfFile:imagePath];

I’ve also put pre-built SQLite files along with the bundle so that app
can access them.

Sze Wong
Zerion Consulting

On Oct 1, 12:21 pm, “Lata Rastogi” <> wrote:


> Hi
> Can I save remote files on the iPhone using xcode?
> Thanks!
- Hide quoted text -