Stanford iPhone App Programming lecture 11

Lecture 11 from the Stanford University iPhone Application Programming class was hosted by Evan Doll, who is apparently an achiever. He covered text input and displaying views modally, both of which I have had trouble with in my work on my various iPhone app projects that I have started.

His talk included a demonstration on the Clang code analyzer, using the keyboard with UITextView and UITextField controls, displaying and dismissing view controllers modally, and the proper way to dismiss said modal view controllers by setting up delegation in the parent view controller.

I have been developing an application in which it would be awesome to have some kind of custom virtual keyboard for entering data, as none of the canned keyboards seem to exactly fit the bill. This presentation should help me untangle some of the complexities that I have run across in trying to get this application done. Maybe then I too can be an achiever.

NetCFSvcUtil and Windows 7

So I have, for the most part, got the new development machine all set up and running pretty well. But ah, there is always a fly in the ointment…

I have a Windows Mobile client application that talks to a WCF service to move data back and forth. I have been using a batch file that I created that ran the NetCFSvcUtil.exe program included in the Power Toys for .NET Compact Framework 3.5. This tool reads information from the provided URL of the web service and creates C# or VB.NET source files that can be included in your project.

And of course, this utility program does not work on my shiny new Windows 7 RC machine, it gives the following error:

Attempting to download metadata from 'http://www.site.net/Service.svc'
using WS-Metadata Exchange or DISCO.
Error: An error occurred in the tool.
Error: Error in the application.

Some searching for this problem yielded the following posts:

NetCFSvcUtil.exe and Windows 7

Ambiguous error message from NetCFSvcUtil.exe

These links appear to indicate that the NetCFSvcUtil does not work on Windows 7 and there is no workaround just yet. And now I have a nice shiny new VirtualBox Windows XP image that contains installs of the .NET Compact Framework 3.5 with the Power Toys, and a copy of my old batch files, along with a shared folder that I can grab the files when I need them. Thanks Microsoft!

However, it appears that Microsoft does not have the market cornered on “D’oh!” backwards compatibility moments. It appears that some users have had some issues with the load times of Firefox 3.5, and believe it or not, removing the cookies and temporary internet files associated with IE can actually help. I will give you a link to look at while you ponder this interesting nugget.

The Firefox 3.5 fiasco

I guess you could say that Mozilla is a big believer in the More Randomer theory.

Setting up a new development machine

When you are forced to set up a new dev box, it can be a big hassle. (Especially if you, like myself, are a jack of all trades developer and master of none.)

It has taken the better part of a few days for me to overcome all of the problems (too many to list here) in trying to resurrect my old machine and get the new one built and up to speed, but I seem to be able to do actual work now. There are still some tools that I have not installed yet, mainly because I will need to dig around and find the original install CDs, and some less used data and files that I have not got into place on the new box just yet.

The new dev box has a Core 2 Quad chip, 8 GB of RAM, and a 1.5 TB hard drive. It seems to sizzle through the routine tasks much better than the trusty old 2 GHz P4 Precision 380 that I was using. (Although TortoiseSVN still crawls at times, anyone have any suggestions???)

Thanks to my company president Chris, he came through for me on this one in a big way, as per usual.

Stanford iPhone App Programming lecture 10

Lecture 10 from the Stanford University iPhone Application Programming class was hosted by Alan Cannistraro. He covered memory and performance, two topics that are often overlooked when developing software for mobile devices.

His talk included a demonstration on using Instruments to find memory leaks and memory allocations, the dangers of autorelease objects, and using NSThread and an NSOperationQueue to keep the program running during blocking operations.

If I ever get a halfway functional iPhone app developed, the information about finding memory leaks and threading should prove very useful.

CodeStock 2009 recap

Michael Neel has posted a recap of the CodeStock 2009 developer conference.

CodeStock Wiki

Thanks again to Michael for a humdinger of a conference.

Stanford iPhone App Programming lecture 9

Lecture 9 from the Stanford University iPhone Application Programming class was hosted by Evan Doll, clad in another interesting t-shirt. His topic of the day was persisting data on the iPhone by the use of property lists and SQLite databases, and communicating with web services using the JSON framework.

His talk was incredibly informative and straightforward, and I thought the demos that he used emphasized his points perfectly. Specifically, he covered reading and writing arrays and dictionaries to the iPhone’s file system, use of the NSCoding protocol, basic SQLite operations, and a demo that showed using the json-framework to pull down data from the Flickr web site and display image search results in a list. Finally, at the end, Evan talked about passing data between objects (such as from a list controller to a detail view controller).

The SQLite information should prove extremely valuable, as I am going to want to do some data storage in my iPhone app that goes beyond simply storing preferences in the NSUserDefaults area.

CodeStock 2009, Day 2

Here were the sessions that I attended on day 2 (Saturday, June 27, 2009) of the CodeStock 2009 developer’s conference in Knoxville, Tennessee:

Keynote by Josh Holmes

Finally, someone in the software development realm that values simplicity as much as I do…

Getting Started With WPF by John Kellar

John gave a very introductory presentation on developing applications in WPF, which seems to be the way that desktop client applications are going to be developed moving forward due to (among others) resolution independence and performance of WPF apps. The talk was pretty much devoted to a tour of simple application creation and layout in Visual Studio 2008 and Expression Blend, both by using the control toolbox and by manually manipulating the XAML. Along the way, John mentioned some interesting items, such as avoidance of the CanvasPanel, using Alt-Shift-Enter to go full screen in VS 2008, and the Microsoft web site WindowsClient.net, which is devoted to WPF application development.

ASP.NET Web Testing by Jeff McWherter

Jeff talked about aspects of testing web applications, with an emphasis on the tools that can make testing ASP.NET web sites easier and more automated. The tools he demonstrated were NUnit, WatiN, WatiN Test Recorder, qUnit (for Javascript), TestDriven.net, and Selenium. Also, Jeff showed briefly the System.Diagnostics.Stopwatch functionality, and talked about accessibility testing using the webaim.org web site.

Be A Better Developer by Michael Wood

Mike covered his theories on improving the craft of software development, and I agree with most of them. All developers need to be students and teachers first and foremost. The student part means learning about new technologies and gaining a thorough understanding of them, especially the fundamentals. The mentoring aspect allows the sharing of knowledge and experience, which benefits the entire team. His recommended reading is Getting Things Done by David Allen, and some of the tools he believes in are WinMerge, MSBuild, and Power Shell.

jQuery 101 by Rod Paddock

Rod covered an overview of jQuery, including initialization, selectors, events, and plugins. Again, being the Javascript neophyte that I am, I thought the presentation was very good and should help me figure out some of the mystery happening in these .js files in our web application project. Some of the things I found interesting were the jQuery UI, using $().focus(selectOnEntry) to automatically select text in a text box when the cursor reaches it, highlighting on focus and unhighlighting on blur, and using a div tag to display dynamic HTML.

How To Make Your Application Awesome With JSON, REST, and WCF by James Bender

James talked quite a bit about web services and using jQuery to consume them. At this point of the conference, I was a bit spent, to I did not take many notes about this presentation. The only notes I made was when he was talking about the Fiddler web debugging proxy. Hopefully, James will post his slides and sample code to refresh my memory.

Day 2 was also Javascript heavy, and I found the WPF presentation highly relevant, since we have a lot of desktop client applications in our line of business, and the WinForms applications are looking a bit dated.

A special thanks and shout out to Michael Neel and his staff and all of the presenters and sponsors on a job well done.

CodeStock 2009, Day 1

Here were the sessions that I attended on day 1 (Friday, June 26, 2009) of the CodeStock 2009 developer’s conference in Knoxville, Tennessee, along with what I thought was important, relevant, and/or clever:

Javascript Makes Me Happy! by Joe Bowers

Joe covered Javascript basics such as dictionaries, arrays, functions, event handlers, and closure, all of which were informative and useful for me, since I am a Javascript dummy. The iteration stuff at the end was a bit mind blowing, it will take me a while to figure out what was going on there, as it seemed to combine all of the above concepts.

Useful jQuery tips, tricks, and plugins with ASP.NET MVC by Elijah Manor

Elijah talked about a couple of interesting looking jQuery plugins such as TableSorter (which we are using) and xVal validation. I hope that we might be able to integrate the xVal stuff into our web application, even though we are not using ASP.NET MVC. Also, he pointed out some interesting tools, such as Firebug, PageZipper, Detect Plugins, and SelectorGadget.

Programming the Cloud with HTTP/REST by Mike Amundsen

Mike showed some very cool Javascript/web service demonstrations, along with a lot of talk about the theory and operation of HTTP and REST. It was a lot to take in for a novice web and Javascript developer. I just hope I can get some of his samples (for starters, the zip code checker) working on my box.

iCode: An Intro to iPhone OS Development by Adam Byram

Adam ran through a high level introduction of many of the concepts involved with iPhone software development, such as the tools required and overview of Objective-C. Then, he went through and began coding from scratch a to-do list application.

It was a Javascript heavy day, which is good for me, since I used to have no idea what some of my coworkers were talking about in our web application.

Can you recognize me now? Good.

OK, so a coworker and I are getting ready to hit the road and head down to Knoxville, Tennessee, for CodeStock 2009. Our company has two Verizon Wireless broadband USB cards that we use for presentations and such, so I procured one as I have done in the past to use in Mac and Boot Camp Windows mode on my MacBook Pro. Little did I know the trouble I was headed into getting it all to work on both the Windows half of my MacBook Pro and on my coworker’s Dell Vista notebook.

I had Verizon Wireless Access Manager (cleverly acronymed to VWAM) version 5.8.2 on my MacBook from my previous experience with a Pantech CDMA UM150 card from Verizon. I fired up the software, tried to use the card I was given (a Novatel Wireless EXPD EV720), and it was not recognized. Here is what happened next:

  • Uninstalled VWAM 5.8.2
  • Downloaded VWAM 6.10.2 from Verizon’s web site
  • Installed said software
  • Tried to run VWAM, connected device, no-go

At this point, I decided to try and get a bit creative, think outside the box as it were:

  • Tried to run the NvtlDriverCDFilter_V2.02.07.002.exe application, which I found in the folder C:\Program Files\Verizon Wireless\VZAccess Manager\Drivers\Novatel
  • This component must have already been installed (perhaps by the VWAM 6.10.2 installer), but I went ahead and did the removal
  • Automatic restart
  • Tried to run VWAM, connected device, no-go
  • Ran the NvtlDriverCDFilter_V2.02.07.002.exe application
  • Tried to run VWAM, connected device, no-go

OK, so now I am getting a little perturbed. Time to break out the big guns:

  • Launched Device Manager
  • A yellow exclamation point is showing next to a Data Interface (a-ha!!!)
  • Right click on Data Interface, select Update Driver, and let Windows handle the driver update automatically, at which point the yellow exclamation point disappears
  • Tried to run VWAM, connected device, hardware reported as ready to use and the Next > button lit up.

And it is now working fine on the Windows half of my MacBook Pro.

Armed with this knowledge, I went to my coworker and had him do roughly the same thing. He had an additional snafu on his machine, however. Toward the end of the NvtlDriverCDFilter_V2.02.07.002.exe installation procedure, it came up with an error:

Error 2738. Could not access VBScript run time for custom action.

We did some investigation and found a posting in the support database for NitroPDF that seemed to address this error:

Q10106 – ERRMSG: Error 2738. Could not access VBScript run time for custom action. EDIT: Sorry, this link appears to have been removed from the NitroPDF web site. 🙁

After registering the VB Script DLL, and running the installer again, and running the VWAM on his Dell, the card seems to be recognized and connects fine to the Verizon network. Celebrate good times, come on!

By the way, I hate to make this sound like one of those “Hello, I’m a Mac/And I’m a PC” commercials, but the card ran smooth as a baby’s bottom on the Mac OS X half of my MacBook Pro. No software updates or driver snafus whatsoever.

Stanford iPhone App Programming lecture 8

Lecture 8 from the Stanford University iPhone Application Programming class was hosted by a guest speaker from Apple. The topic of the day was tables and table view controllers. Again, there was lots of good information in the class. I have not really worked yet with tables in my iPhone application development so far, but I’m sure once I do, this information will help out.