Categories
Development

OSAtomic?

Mike Ash: “As anyone who does threaded programming knows, it’s difficult. Really difficult. Threaded execution results in highly unpredictable timing with how multiple threads interact with each other. The result is that code which appears to be correct and passes tests can be subtly flawed in such a way that it fails rarely and mysteriously.

There are many rules to follow when writing threaded code, but the most important one is this: lock all access to shared data.”

If you’re a Windows developer, and have had the pleasure of coding a threaded application, OSAtomic sounds pretty darned familiar, without reading Mike’s article. If your brain instantly went to InterlockedIncrement you’re not alone.

Threading can be difficult. Read what Mr. Ash has to say if you’re new to Cocoa, or new to development. Threads can be your best friend or your worst enemy.

Categories
Development fun Life

The Past Weblog: My First Windows App

The original Rob Fahrni weblogrob.crabapples.net: “Back when I was a young programmer… That seems like the correct way to introduce you to my first ever Windows application. I’ve kept the code for many years, and I’ve only recently moved it from 3.5″ floppies to a CD. I was checking out the code a couple of days ago and boy have I come a VERY LONG way since that project.”

I just happened to stumble upon this post while Googling for something to use in another post. My old weblog served me well and has become a bit crufty over time. The archives still work and the site still gets quite a few hits a day thanks to Google, and a nice nine-year run. (Wow, I forgot to celebrate my 10th year of weblogging, darn.)

My work on iOS based applications reminds me of my time back in my early Windows development days. It was so exciting and new. I had so much to learn and I was excited about learning it. That’s how I feel about iOS today. It’s a very exciting time.

Anywho, the link to the code for Rob’s Tic-Tac-Toe still works.

Maybe I should do an iOS version, just for old times sake?

Categories
Development Life

A Living Resume

Eat your own dog food.James Robertson: “One of the things I got asked about was my technical chops – since I’d been working in software promotion, did I still have any useful skills from a development perspective? Well, the blog is a living, breathing example of the fact that I know at least a few things. The code is in the public repository, so it’s easily accessible as well.”

James is a Smalltalker, and a darned good one. He not only promotes Smalltalk but eats his own dog food. His weblog is a living testament to that.

Not such a bad way to sell yourself.

Categories
Development Mac

NetNewsWire 4.0 Lite

Brent Simmons: “It’s a complete rewrite of the code base, which had last been re-architected in 2004/2005. It was overdue, and it’s taken about a year to do. The iPhone and iPad versions will soon use this code base too — and there will be a full, for-pay version of NetNewsWire 4.0 for Macintosh too. (The full version will have more of the features you’re used to: syncing, searching, starred items, AppleScript support, and so on.)”

It’s available in the Apple Mac Store. Give it a gander.

Brent is a great developer and isn’t afraid to “turn the soil.” It seems like he’s constantly looking for ways to improve his baby and isn’t afraid to completely rewrite stuff.

Amazing work.

Categories
Development Mobile

No

Rob Fahrni, binary formLoic Le Meur: “How do you think it will evolve? One platform will win? When html5 is good enough apps will die and web based on all devices will win? How many appstores will we have to register our app to?”

I say ‘No’ because I don’t think a web browser can beat a native application. The web is definitely a least common denominator way to reach an audience and give them a taste of what’s possible, but if you want a rich, and deep, experience nothing beats native. Most mobile applications tend to be fairly shallow, not all, but most. That leads to the question Loic is posing. His products are fairly shallow (that’s not an insult, just an observation) so an HTML 5 version may be plenty “good enough” to satisfy his users.

I for one would go off and write a native app because that’s how I roll. I’m a native snob.

Categories
Development iOS Mobile Technology

Software is King

Mike Rundle: “Because the future of mobile hardware design is for it to fade away completely and have the focus be the OS and apps it runs.”

Yes, software is king. It’s good to be the king.

Categories
Development

Objective-C Memory Management, The Rules

Objective-C Ref CountingInterfacelab.com: “There are only 4 basic rules when it comes to memory management in Objective-C:

If you own it, release it.
If you don’t own it, don’t release it.
Override dealloc in your classes to release the fields that you own.
Never call dealloc directly.

That’s it. The first two are the most important and we’ll get into the basics of object ownership next.”

Just an FYI for those coming from another platform, or language. Remember, Objective-C’s parent is plain ole C, and you can mix C and C++ with your Objective-C. Keep the alloc/free, new/delete rules in mind when allocating objects. Also remember Objective-C objects are reference counted objects. If you want to keep an object around bump its retain count by doing…

anObject = [object retain];

When you’re done make sure you do

[object release];

Otherwise you’ll have a leak in your code.

I’d recommend a quick look at Cocoa Dev Central’s Learn Objective-C tutorial. It’s very good.

Once you have the rules figured out it’s fairly straight forward.

Categories
Design Development

Mini Giants

Hundred10: “We were excited to work with the Grizzlies on their iPhone app because of their position as marketing innovators in within MiLB. We threw some crazy ideas at them (some of which will have to wait for version 2.0) during the design phase and not once did they tell us to leave the room, which was a nice bonus. And all the app goodness is served up in delicious Retina Display high-res glory.”

My favorite feature is Card Me. It’s easy to use and you can publish your pictures to Facebook. Neat.

Here’s to many, many, more Hundred10 mobile applications.

Categories
Business Development iOS

Craig Hockenberry on iOS Development Costs

Will write C/C++ for foodStack Overflow: “I’m one of the developers for Twitterrific and to be honest, I can’t tell you how many hours have gone into the product. I can tell you everyone who upvoted the estimate of 160 hours for development and 40 hours for design is fricken’ high. (I’d use another phrase, but this is my first post on Stack Overflow, so I’m being good.)”

Craig would know, he’s a very experienced Mac and iOS developer. In other words he’s been doing this for years and is one of the good guys. Listen to what he has to say. These aren’t toys, they’re serious applications, and those serious applications take time, and money, to create.

My brother and I spent many hours on a fairly small application, that doesn’t have a complex UI. Can you imagine the amount of time it takes to go outside the default UI, not to mention whatever logic is needed behind the scenes? Yeah, it can be quite daunting, I can assure you.

Go read the piece. Craig should post it to his weblog. It’s very valuable information, from a very valuable developer in the iOS ecosystem.

Categories
Apple Core Labs Development

Now, we wait

RxCalc 1.2 IconI’ve been sitting on a new release of RxCalc for a while now. Jerry and I took a look at the code about a month ago and fixed up a couple of minor issues. For the first time we opened the door to beta testing. RxCalc is small but it’s getting to the point that it’s nice to have more eyes on it. We were able to enlist a great Pharmacist by the name of Robert Martin to help us verify our numbers were correct. Between Robert and Jerry we have over 30-years of heavy Pharmacokinetics experience. We’re very thankful to have Robert’s experience. He definitely helped make RxCalc 1.2 the best release ever.

Now we wait

The binary was submitted today, October, 3, 2010 at 4:35PM. Now, we wait.