Archive for January, 2009

iPhone SDK, Cocoa & RESTful Web Services, Memory Leak

January 16th, 2009

Recently, I gave the second version of my iPhone and Java Web Services talk at the Boulder JUG. It was a great audience filled with interest and great questions. I promised them I would continue to load up my Delicious bookmarks with great iPhone links, and I’m doing just that.

Pertinent to that talk, let’s quickly revisit that memory leak issue for NSURLConnection. In short, if you call sendSynchronousRequest, you get an internal memory leak of 128 bytes of a NSCFString object from inside the API.

To isolate this from my application coding skills via the iPhone and Java Web Services demo code, let’s look at an example called ZipWeather from AppsAmuck. Attach the profile to the ZipWeather, exactly as downloaded. Run it. Type a zip code. It leaks.

It appears that the NSURLConnection:sendSynchronousRequest() Flaking out, even for others, calling this API to Amazon Web Services. I believe it may be the leak contributing to these hiccups. I’ve tried turning off the cache, but it still leaks. I’ve tried the async version and it still leaks too.

This Apple article even suggests using this same API in the same way that ZipWeather and my iPhone and Java Web Services app does.

In short, I’m submitting another Radar report to Apple about this and hope it doesn’t get closed out as “Unable to reproduce” as João Pavão’s defect # 6179277 did. I’m able to reproduce it every time, with everyone’s sendSynchronousRequest calls.

I love the platform, but as you all know, one core API bug can really cause a lot of challenges until resolved. Let’s hope this one gets resolved very soon!

References:

  1. SOAP Service Calls on the iPhone
  2. Stack Overflow thread on Cocoa Web Service Access
  3. Apple iPhone Dev Center
  4. A Blog about 5 languages calling web services, including Objective-C
  5. A continuation blog post specifically on Objective-C and REST
  6. And a download of a sample client in Objective-C that calls REST methods
  7. UPDATE: SeismicXML leak discussion
  8. UPDATE: MacRumors sendSynchronousRequest leak discussion
  9. UPDATE: NSXMLParser leaks too

200901161532.jpg

Open Source – 5 Big Reasons

January 15th, 2009

I was asked to write a few paragraphs for a client on why they should primarily chose open source software in the current state of our industry. In addition to a few articles supporting these positions, many have posited that we should even use government incentives to further boost OSS as a spark to re-ignite the industry. Leave your feedback on what your feelings are on OSS and I’ll look into using some of the responses in my next presentation…

Open source is gaining momentum like never before in the most respected of institutions and enterprises. Originally, the choice to use open source was made only by smaller companies for strictly financial reasons. Those reasons still hold, but are now joined by a chorus of other great points in the current intellectual property, commercial vendor, and economic state that the business world is currently in.

Interoperability is strongest in the Open Source realm. Open Source enjoys the absence of financial motivations to close data inputs, and the existence of desire to have adopters join in and migrate from other open and closed platforms. You’ll find that there are numerous import & migration tools for your existing data, and you’ll discover that your data is stored in highly interoperable formats for future migration to any platform your business needs dictate.

Cost continues to be a factor leading towards Open Source in today’s economic climate. Open Source wins every time on initial acquisition cost, but also on maintenance expenses over time. You can budget for well known project costs without yearly surprise increases in maintenance just because a commercial vendor raises renewal prices.

Quality is also a strong point of Open Source. This can be surprising to teams who think that well funded commercial products would have higher quality due to all the talent on such teams. But Open Source also sports excellent talent, as well as the hidden weapon of breadth of automated unit tests, constantly guarding the product’s quality at each and every release.

In this uncertain economic climate, it can actually make more sense to know you perpetually have the full source code to your product. This removes the dangerous dependency on the continued solvency of a particular vendor. Open Source allows you to control and know your software destiny beyond any outside economic influences.

In sum, Open Source presents an attractive package in terms of cost, sustainability, and quality that are a perfect fit for the current business conditions of 2009 and beyond.

Matthew’s Social Networks Graph, Winter 2009 Edition

January 11th, 2009

Every once in a while, I aggregate all my social network links for the new subscribers to the blog. Here’s the Winter 2009 edition:

  1. Delicous Bookmarks
  2. Twitter @matthewmccull
  3. Global Java Conferences Calendar
  4. Denver Java Events Calendar
  5. Linkedin
  6. Facebook
  7. Friendfeed
  8. DOSUG Homepage
  9. Blog (this page)
  10. Tripit
  11. Slideshare
  12. GitHub
  13. GitHub Gists

[2009-01-15 Updated with SlideShare, GitHub, Gist]

Developer Syntax Highlighting for Presentations, Copy-And-Paste on the Mac

January 11th, 2009

Based on some Twitter conversations with @fredjean about the Codex Ruby Gem, I’ve been inspired to stop taking screenshots of code for slides and rather putting in formatted text. But this isn’t as easy to do as it should be. Eclipse 3.4 has lost (for me, and others) the ability to copy and paste rich text so that it appears formatted in the paste destination. Maybe that’s a MacOS failure of later Eclipse versions. No matter though, as I drift father from Eclipse usage. My favorite other two editors can fulfill this need nicely with two simple add-ons.

Jim Weirich’s blog post about using Ruby and posting source as a means

Dave Thomas (@pragdave) chimes in with his similar thread about presenting code — gasp — without Keynote entire.

Textmate: Copy as RTF Bundle (Plugin)

This sweet plugin lets you copy formatted code of any language TextMate recognizes as RTF. Perfectly suitable for pasting into MS Word, Pages, TextEdit, or namely, Keynote. Install it via:

cd ~/Library/Application Support/TextMate/Bundles
git clone git://github.com/drnic/copy-as-rtf-tmbundle.git “Copy as RTF.tmbundle”

Initialized empty Git repository in /Users/mccm06/Library/Application Support/TextMate/Bundles/Copy as RTF.tmbundle/.git/
remote: Counting objects: 34, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 34 (delta 14), reused 34 (delta 14)
Receiving objects: 100% (34/34), 6.88 KiB, done.
Resolving deltas: 100% (14/14), done.

The copy:
200901111502.jpg

And the paste:
200901111503.jpg  

IntelliJ: Copy as HTML Plugin

Similar functionality works from IntelliJ. Just install the plugin “Copy to Clipboard as HTML”.

200901111508.jpg

The copy:
200901111509.jpg

And, the paste:
200901111510.jpg  

Presentation Techniques in Video Form

January 10th, 2009

I just finished watching several excellent presenters from a summary page of 10 video clips. Everyone should consider watching these to improve their talks in 2009. These are the superstars of this skillset and there’s so much to be learned from them.

Sean Kelly’s Web Application Framework Comparison Presentation Video

January 10th, 2009

Sean Kelly of NOAA and JPL does a head to head comparison of TurboGears, Zope, J2EE, Ruby On Rails and Django. It’s articular, fun, fast, and well presented. It’s worth your time to listen to expand your horizons.

Mouseless Web Browsing

January 10th, 2009

I’m a keyboard lover. The productivity from keyboard shortcuts is just amazing. So I’m constantly keeping an eye out for new keyboard navigation techniques. Web browsers have been a sore point, because to click a link with the keyboard you first have to tab to it. This can be, on link heavy pages, 20 or more tabs before I can hit enter. Hardly productive if you ask me.

That’s where Mouseless Browsing for Firefox comes in. It puts a number next to each link and you just type the number on the keyboard, press enter, and away you go. It couldn’t be easier. Go forth and use the mouse no more for your web browsing efforts and watch your productivity take a leap!

Cnn.png

iPhone 2G Network Switching from 850Mhz to 1900Mhz?

January 4th, 2009

Here’s an interesting, though only lightly cross verified fact. AT&T might be moving the 2G network over to the 1900Mhz band (your phones are practically tri-band, nowadays) and using 850Mhz for more of the 3G network. 850Mhz penetrates barriers more easily, thereby yielding, in most cases, a better signal reach and strength. I have noticed and commented to co-workers (prior to this article) an lessened ability to get 2G signal in many of my normal locations around Denver. So to me, this is a consumer scientific same-data-point test, and I’m seeing reduced throughput and signal strength (in some cases, 0 bars now at places I used to be able to get 2 or 3). Comments from anyone with a 1st Gen iPhone?

QuickBooks Pro 2009

January 1st, 2009

I have used QuickBooks Pro for about 8 years. The upgrade to the 2009 edition is the single worst upgrade ever. And trust me, I’ve submitted insane everyday-workflow bugs against the other older editions, so saying this is the worst is saying a lot.

Let’s articulate.

1) They have redesigned the transaction download screen. So far, I’ve yet to be able to find ANYONE who thinks it is an improvement. Read these three long forums and reviews for just a smattering of the loathing going on:
An Accountant’s Review, request for time-loss reimbursement
Intuit Community Post (got so long, they had to start a new one)
Intuit Community Posts about Online Banking feature destruction in 2009
And those are just the first Google Hits. There are hundreds.

2) So, an apology would be in order, right? And just restore the 2008 features, right? Nope. No can do according to “Greg Wright, the product manager for QuickBooks”.

“I care a lot about fixing the QuickBooks online banking feature so that it works as well as it used to. … I can’t go into details yet about what our plans are…”
You can find this quote in the forums.

3) The amazon.com rating has dropped so dramatically that Mr. Wright has reached out to customers, pleading for their patience in the form of a review.

4) I have sent Mr. Write a personal email outlining the 8 problems, including the ones in the Online Transactions window, in the latest R05 release. That’s right folks, there are 5 service releases for this 2009 app and we just rang in the new year 18 hours ago. And they still haven’t even addressed the bugs, and are still asking for our patience to get this screen back to it’s ’08 behavior. Wow.

I applaud Mr. Wright for replying, but he also better get the team coding/fixing/reverting. Mr. Wright noted “We have the developers working nights and weekends to fix this.” Maybe a quick subversion revert is all that’s needed guys.

Problem list, from 45 minutes of using it and 2 hours updating it:

1) A forced call in to activate? I am OK with DRM for licensing, but a forced call to try and be sold to all kinds of services that I don’t use feels very wrong. It took over 15 minutes of my very valuable time listening to a non-english speaking rep ask me non-sensical questions. I am patient with ESL folks, but one of the questions she kept repeating (I asked and wrote it down carefully so I could send it to you) was “And is role add what?” I tried three times, then eventually just replied, “None”. I have no idea what I was answering. She also kept asking me how my Christmas was. That’s nice once, but three times? Please, I am busy running a small business. Just give me my code and let me get on with business.

2) No way to disable Online services advertisement at login to the application. Only choices are Later and Sign Up. How about a Never button?

Online/Downloaded Transactions Screen–>

3) Can’t copy and paste between any text field in the transactions fields (with mouse right click or keyboard)

4) Billable — Can’t ever get it to stay checked. It flickers off a millisecond after I click it. It does this no matter how many times I click it.

5) Amount is not populated into the split. And I have to use split because that is the only way I can enter a Class. I have to tediously click the “Show Splits” option just to enter a class.

6) Can’t do a “Receive Payment from Customer” like I could in 2008. I have to go out and manually do that via the menus, then enter back in to the online transaction view (even worse since it requires all other screens to be closed)

7) Close all other windows? I’ve never had to do this in any previous version. This is an extremely odd step backwards, given that the new screen is otherwise a net loss of features. Perhaps I could have lived with this if the downloaded transactions screen was more feature-ful than ever before.

8) Have to click NOT AN EXPENSE to get the manual match screen? But it is an expense. So clicking on NOT AN EXPENSE makes no sense. I need a “Match Manually” link like we used to have in 2008.