Great iPhone SQLite tutorial

dBlog: "I see many people asking for SQLite tutorials around, and since I am using SQLite for the next part in the Advanced RSS Reader Tutorial, I thought I would write up a quick tutorial on using SQLite with the iPhone SDK." - Now, couple that tutorial with Gus Muller's FMDB and you're off and running.

Thanks guys!

And yes, I am aware of Core Data. I even have Marcus Zarra's Core Data book, just need time to dig into it. I'll definitely be using that down the road some time.

Yes, there's a Mac application in my future, I can smell it.

Labels: , , , , ,

Posted by Rob at 11:33 AM | 0 comments | Click here for a permalink to this entry.

Using Shrty

This simple example assumes a few things.
1) _shrty is a member variable.
2) shrtySvcWithName - We're creating a service instance that doesn't require a name or password. (E.G. IsGd)
3) self implements the ShrtyDelegateProtocol protocol.

First things first.
#import "Shrty.h"
Shrty.h will include everything you need to use Shrty.

Next you'll need to create a ShrtySvc instance. The code below illustrates how you may choose to do that. In this case we're passing the service name, Is.Gd, into a helper method to create our instance. There are constants defined in ShrtySvcConst.h for all the services supported by Shrty.

// Go create an instance of the IsGd service.
[self _createShrtyInstanceFromServiceName:kShrtyIsGdSvcName];
if (nil != _shrty)
NSString* urlToShorten = @"";

// Shorten the URL.
[_shrty shortenUrl:urlToShorten];
In the example above I've removed some code for brevity's sake. Another thing to note is use of the helper method _createShrtyInstanceFromServiceName, included below. This method is part of ShrtyAppController.m, you'll find it in the Shrty source, it's part of the test project.

- (void)_createShrtyInstanceFromServiceName:(NSString*)serviceName
[_shrty release];

_shrty = [ShrtySvc shrtySvcWithName:serviceName userName:nil userPassword:nil delegate:self];
If all goes as expected you should expect to receive a callback to your didReceiveShortenedURL method.

- (void) didReceiveShortenedURL:(NSString*)shortenedURL
if (nil == shortenedURL)
Then you can do with that URL what you please, post it to Twitter, or Facebook, or whatever.

Labels: , , ,

Posted by Rob at 12:45 PM | 0 comments | Click here for a permalink to this entry.

Sounds good to me

Matt Gemmell: "Ship a mac software product. Being a self-employed contractor is wonderful compared to being an employee, but being a software vendor has always been the goal. Three years from now I'd like to be self-sufficient with my own software, and the first step is to release a 1.0 product." - Matt has contributed some really great code to the Mac community. In fact his Open Source contributions inspired me to write some small, free, source code and give it to the Mac community.

Good luck Matt, we'll be looking for some cool stuff to come out of Instinctive Code.

Labels: , , , ,

Posted by Rob at 8:51 AM | 0 comments | Click here for a permalink to this entry.

Free Objective-C/Cocoa Code

Merry ChristmasI've been tinkering with some code off and on for a while, and thought I'd finally share it with the Mac Developer Community in hopes of getting some feedback as well as some users.

The project is called Shrty, short for "Shorty", and you can use it to shorten URL's in your Mac Desktop or iPhone application. The code is a work in progress, but I'm hoping folks will find it useful.

Shrty shorten currently supports,,,, and YOURLS based URL Shorteners. I have support for coming, the parsing required a bit more work and it's not quite finished.

Expand is not quite ready. I need to work on the parsing code for all of services.

The project basically contains a sample application that exercises Shrty, and the Shrty Library Code. The test application is nothing fancy, and in fact is pretty darned ugly, but if you decide to make use of the code I'm sure you'll make a great UI for it.

If you have any feedback please drop me a line, In the meantime, Merry Christmas!

Christmas Present Icon by Icon Drawer,

Labels: , , , ,

Posted by Rob at 12:53 PM | 0 comments | Click here for a permalink to this entry.

Open sourcing something

After reading Daniel Jalkut's excellent essay on Open Source software, I have a question.

Which of the liberal licenses are best for code that can be used in a commercial product as well as a GPL'd product?

Links to license particulars would be greatly appreciated. I'm currently looking at The BSD License.

Labels: ,

Posted by Rob at 8:58 AM | 4 comments | Click here for a permalink to this entry.

Great summary on Jalkut's GPL essay

John Gruber: "In some sense, Jalkut's essay could be considered a big "Duh" - a statement of the obvious. To wit: that GPL-licensed software projects discourage participation from developers working on anything other than other GPL-licensed software projects. That's pretty much the stated goal of the FSF. BSD-licensed projects encourage participation from developers working on just about anything." - It's not that Open Source is bad, it's just restrictive. Gruber's points are fantastic. I think there's a lot of FSF developers that see Open Sourced projects as free, but they see things from a different perspective. Open Source is socialism, BSD style licenses are more like a democracy. If I used a piece of Open Source software and found a bug, and was able to fix it, I'd be happy to give that back to the community. I wouldn't, however, build a business on top of it.

It's not bad, it's just not as open as people would like you to believe.

Labels: ,

Posted by Rob at 9:22 AM | 0 comments | Click here for a permalink to this entry.

The evil side of the GPL

Mr. Good LookinDaniel Jalkut: "Now for the most controversial point of this article, where I suggest that the GPL does more to harm collaborative development than it does to help it." - Developers beware. If you incorporate GPL'd code into your code base you could be in trouble. This is the evil side of the GPL. Proponents of the GPL like to talk about freedom, but it's not free, there's big cost, namely the distribution of your source code.

There are many different license types floating around out there. Pick the right one for your project so you don't end up in court.

Labels: ,

Posted by Rob at 7:57 AM | 0 comments | Click here for a permalink to this entry.

Open Source the iPhone?

Chris Petrilli [via James Robertson]: "It seems everyone has advice for Apple. Hell bent to resurrect them from that horrible abyss of having billions of dollars in the bank and making money almost as fast as it can be printed. Today, itís five reasons why Apple should open source the iPhone. Letís take a look at his five 'reasons', in slightly out-of-order execution, shall we?" - Some of the Open Source zealots continue to amaze me with their wacked out arguments. Apple is doing just fine the way they are, thank you very much.

I have zero problem with Open Source, zero. Instead of pushing everybody to your model why not focus on making better software than the other guy? I would still put Linux at a distant third on the desktop, with Apple being #1 and Microsoft being #2 when it comes to form and function. My grandmother really doesn't want to open BASH to get something done. Yes, I'm fully aware it's gotten better, but it's still way, way, behind the competition, and everything you hear from the Linux team points to the server, not the desktop. So, given that, why would you want to open source a beautifully designed, highly functional, mobile OS? Apple built the iPhone for people, not machines.

Here's how I see it. Success on the iPhone for the Open Source crowd would mean you could run vi, emacs, BASH, and SSH on it.

Labels: , ,

Posted by Rob at 8:00 AM | 0 comments | Click here for a permalink to this entry.

Blockbuster movie machine

digg: "The Blockbuster version of the 2Wire MediaPoint digital media player is used to download videos from Blockbuster OnDemand via broadband, says Blockbuster." - I only posted this because of the comments, take a gander. Linux posts have finally grown tiring. I love the all caps "OH MY GOD A COMPUTER RUNS LINUX???" Of course you also have the zealot with "Where is the source code?"

I had to check out the device because they actually interest me, but I don't care what it runs on, as long as it works. It could run DOS for all I care if I can get video on demand.

We still have to try out the new Netflix/XBox on demand service, it may fill the need.

Labels: , , ,

Posted by Rob at 9:41 AM | 0 comments | Click here for a permalink to this entry.

More on Chrome

James Robertson: "it seems that Chrome renders YouTube just fine on my old Windows box - it's just under Parallels that a problem arises." - It's interesting they released only on Windows, and the problem James is reporting makes me wonder if they're using hardware acceleration in their rendering? That would definitely be a problem in the current release of some VM's, I know VMWare Fusion has issues in 1.x, but I'm not sure about Parallels.

I guess it's time to go look at the code.

Labels: ,

Posted by Rob at 9:14 AM | 0 comments | Click here for a permalink to this entry.

Cast the first stone

Apple Insider [via digg]: "'The idea with open source software is to allow early adopters access to the buggier pieces of code so they can help fix them or let people who want to wait for a solid release the ability to do that,' says developer Casey Borders. 'The key is choice, and Google has taken away that choice and is developing Android like every other piece of closed software.'" - The open source community threw plenty of stones at Apple for their iPhone "restrictions", now it looks like one of their own darlings is causing developers grief. The Karma bug bites back. So let Apple do what they want, and Google can do what they want. Everybody's happy.

Check out the first comment on the digg post.

Labels: , ,

Posted by Rob at 8:50 AM | 0 comments | Click here for a permalink to this entry.

Michael Geary on his Google Talk

Michael Geary: "I want to thank everyone who came to my Mapping the Votes talk at Google last night. I hope it was worth your while. The talk will be on YouTube soon, and I will follow up with several articles with more details on the topics I talked about." - This would've been great to attend! That, quite frankly, is one of the bummers about living in The San Joaquin Valley instead of The Silicon Valley. I miss great stuff like this. Oh well, at least we get the benefit of this great post and the coming YouTube video!

Thanks Michael.

Labels: ,

Posted by Rob at 8:47 AM | 4 comments | Click here for a permalink to this entry.


Slashdot: "If the marriage of Microsoft and Yahoo were to be consummated, GNU/Linux would be hindered, argues Roy Schestowitz. Yahoo's funding of open source initiatives would dry up." - Well, maybe, but why does that matter? It's open source, anyone can contribute, isn't that what makes it so attractive? A better argument against it would be lack of sense it makes for Microsoft to go into debt to purchase Yahoo!

Labels: ,

Posted by Rob at 12:49 PM | 0 comments | Click here for a permalink to this entry.


Microsoft Cash Cow.The Huffington Post: "Far too few, though, are writing about the impact of a sale on employees' work and morale. What analysts seem to forget is at the end of the day employees are what make a company worth anything at all." - In my experience I don't think Microsoft cares too much about the employee's in such a deal. The collection of 'old-timers' were encouraged, as is the culture at Microsoft, to move on, get a job in another group. I still believe on the whole Microsoft didn't really get Visio but they were certain they did and when the old-timers called bologna they were ignored and and seen as pariah, IMHO.

I'm fairly confident you'll see HUGE layoffs; goodbye Sales, Marketing, HR, etc... The engineering teams are important for the time being to keep the ship afloat. The Visio team managed to retain 99% of the engineering team during the transition, one guy couldn't stand the thought of working for Microsoft and bailed to Adobe within a week. We were a total Windows shop, on the bleeding edge of everything Microsoft created, we rode their coat tails to success. It was intentional. The leadership at Visio was very bright and knew how to succeed. I can see mass defections at Yahoo! if this deal is approved. Why? Well, I work with a bunch of Linux/Open Source type folks that don't care too much for Microsoft and probably wouldn't work for them given the choice between Microsoft and, say, Google or another successful Open Source based company.

That said, Microsoft turned Visio into a billion-dollar business, so they're clearly doing something right! And as I've said may times in the past, I'd go back to work on Visio in a heartbeat given the opportunity, and you can take that to the bank.

Labels: ,

Posted by Rob at 8:43 AM | 0 comments | Click here for a permalink to this entry.

On Google Android

Stefano Mazzocchi: "Dalvik is a virtual machine, just like Java's or .NET's.. but it's Google's own and they're making it open source without having to ask permission to anyone..." - That's one way to skin a cat. Basically it looks like the Android folks wrote their own VM based on the Java language. Interesting choice(ick.)

I find it very interesting how folks view Android. I've heard great and wonderful praise, I've heard folks poo-poo it as a platform. Me, I don't care about it one iota. If I were going to make a run at developing phone based apps I'd shoot for the iPhone. Now, in my day job it might be interesting to pursue an android device as a video viewing device. Hmmmm....

UPDATE: I think OpenMoko is a better choice than Android.

Labels: ,

Posted by Rob at 7:23 AM | 3 comments | Click here for a permalink to this entry.

There be dragons here

InteropNews: "Why does Red Hat tolerate CentOS? The Community ENTerprise Operating System is an identical binary clone of Red Hat Enterprise Linux (minus the trademarks), compiled from the source code RPMs that Red Hat conveniently provides on its FTP site. It is also completely free, as in beer" - Tolerate? They have to tolerate the CentOS folks because they decided to create a business on an open source operating system. Thus, they have to release their version of the source code to the community. Right?

Now, if you're a Google and everything you use is on the inside you can keep it close to your chest and not release changes back to the community. You get a competitive advantage. Open Source is nice in that way, but to build an entire business model around selling code and services people can get for free is a tough sell.

Labels: ,

Posted by Rob at 10:07 AM | 0 comments | Click here for a permalink to this entry.

Linux for my parents?

A cute little monkey.Foogazi: "The most obvious and important reason your parents should run Linux is the security the Linux operating system provides." - I don't think so folks. The most obvious choice is Macintosh, period. If your parents already have a Windows box and $600.00 they can score a Mac mini and hook it up to their existing monitor, keyboard, and mouse. Apple pays very close attention to the user experience, everything just works. When we bought our daughter a Mac laptop she popped it open and started working day one, without Dad's help. The only reason I knew it had arrived is she called for the wireless password. I've provided ZERO technical support in a year-and-a-half. Try that with a Linux box.

The open source camp should take a close look at the Macintosh user experience and clone that instead of the Windows experience. If people want Linux to be adopted by mom and pop it's going to have to work WITHOUT configuration when the box is started, no matter what the environment. That has been my experience with Mac.

Labels: , , , ,

Posted by Rob at 8:32 AM | 1 comments | Click here for a permalink to this entry.

20 Open Source Windows Apps

Technology Bites: "Here i will list some of the open source or free programs as alternatives to windows commercial programs." - There are a few in there worth looking at; Programmer's Notepad, Inkscape, Juice, and Scribus.

Labels: , ,

Posted by Rob at 3:15 PM | 0 comments | Click here for a permalink to this entry.


Rob Fahrni has been a Software Developer for 20 years. He's developed DOS, Windows, Linux, iPhone, and Palm based applications in C, C++, Objective-C/Cocoa, C#/ASP.Net, and, yes, even BASIC...
About >>

CrabApples.NET Home Kim Fahrni, Hacker Widow Haileigh Fahrni, My Culinary Journey Taylor Fahrni, Goin' Buggy Jerry Fahrni, Pharmacy Informatics and Technology

Apple Core Labs, LLC RxCalc - A Pharmacokinetic Calculator for iPhone


I work at Pelco. The opinions expressed here are my own, and neither Pelco nor any other party necessarily agrees with them.

Subscribe to ATC Send e-mail to Rob Follow me on Twitter. My Profile on LinkedIn.