26
Mar
2009
 

Don’t Blindly Trust D.E.B.B.

by Marcus Zarra

In some recent discussions I have been shocked to realize that many developers treat DEBB as gospel. This is a terrible idea. DEBB is written by people like me and I am a moron.

(more…)

 
26
Feb
2009
 

Don’t Screw Your Customers Over

by Marcus Zarra

As part of working with the print world I occasionally have to actually print something out. Publishers like to have paper copies of contracts, tax documents, etc. Its a pain in the rear and outdated but a necessary evil at this point.

One such occasion happened today and I needed to mail out a new signed contract to THe Pragmatic Programmers. As luck would have it, I lost my aging copy of Mail Factory, an app that prints nice mailing labels, since the last time I needed to print a label. No big deal, I went to their website and tried to download a new copy. Since the last time I used it, about a year ago, they have cancelled that product and rebranded it Labels & Addresses. Still no big deal, I downloaded the new application and recreated my label.

When I went to print the label I saw in the preview window that they printed “trial version” on the label. Ok, now this is starting to get annoying. If you are going to let me demo the software, let me demo it! Don’t put trial version on the very first label I try to print!

I took a deep breath, remembered that I have been using their software for many years now and decided to just buy a license. They even took my old license in and gave me a discount. Blood pressure dropped, things were fine. Then I ran into their payment processor — Digital River.

I am stunned, stunned, that anyone is still using these thieves! Immediately they try to charge me a “license backup” fee which is an Opt-Out. Annoyed, I opt out of that. On the payment page I have a choice for PayPal. Surprise, there is a $3.50 “manual processing fee” for PayPal. This is NOT 1998! Still, I wanted to print a pretty label so I back out, add a credit card and hit process. I am then presented with this:

SWREG - Error
Uploaded with plasq‘s Skitch!

Did my order go through or not? Who knows? I check my credit card provider, no charge. But are they slow or did it fail?

I contact the software vendor but they are only open until noon EST. Guess I will find out tomorrow or the next day since their site claims they strive to respond within 1-2 days. A happy customer this does not make.

Advice

Do not do this to your customers. Stop using these payment processing services that charge you insane amounts of money and screw your customers over. Spend a day (yes it only takes ONE day) and write your own that links to Google or PayPal. Or just use E-Junkie like I do. This is a customer facing system. When you bend your customers over with additional fees, cryptic error messages and other junk, they are not going to come back to you and say “please sir I would like some more”.

Also, respond to customer email within 24 hours. Don’t let it sit. Don’t give your customers a 7 hour window per day that you handle email. This is just bad.

My Solution

I deleted their software, will be asking for a refund (IF they ever charge me) and I wrote the label by hand. I will not be going back to them any time in the future for any of their software unless they stop using Digital River.

 
28
Jan
2009
 

Don’t treat your customers like thieves

by Marcus Zarra

Every once in a while I run across a situation that just amazes me. While this topic is not strictly about software development it is about the subject of the business of software.

Our customers give us money for something we have already written.

This is an important point to grasp. We write software once and sell it many times over with no production costs other than initial development. Unlike almost every other industry in the world we only have to write the software once! We do not have to produce something new every time a customer wants to purchase something from us.

(more…)

 
1
Dec
2008
 

MacDev 2009 Christmas Offer

by Marcus Zarra

As most of you know, Scotty is hosting a developer’s conference next year in England. To make this event even more enticing, he has just announced a Christmas offer.

Sign up for MacDev2009 before the 24th of December and get FREE copies of both Code Collector Pro and Changes App together worth over £40.

There are going to be some great speakers at this event and I am looking forward to it.

 
4
Oct
2008
 

Announcement: Marcus will be a Panelist at O’Reilly’s iPhoneLive conference

by Marcus Zarra

Now that the NDA has been lifted we can all finally come out of the closet :)

If you have not heard, O’Reilly is hosting a conference on November 18, 2008 to discuss all things iPhone. I have been invited to attend the conference as a Panelist.

Please come and join the conference, if nothing else, to heckle me :)

iPhone Live

The list of speakers (as opposed to panelists), is quite impressive and definitely worth the trip.

Speakers

 
4
Sep
2008
 

Cocoa Tutorial: Creating your very own framework

by Marcus Zarra

There are numerous situations where creating your own framework is advantageous. Perhaps you have a block of code that you use repeatedly in many different projects. Perhaps you are building a plug-in system for your application and want the infrastructure to be available both to the application and to any plugins that are coded.

A Cocoa framework is another project type in Xcode. The end result is a bundle, similar to an application bundle. Inside of this bundle is the compiled code you wrote and any headers that you want exposed. The headers are important. Without them, just like any other piece of Objective-C code, it is very hard to code against.

(more…)

 
27
Aug
2008
 

Cocoa Tutorial: Sync Services without Core Data

by Marcus Zarra

Sync Services have come a long way in Leopard. Before Leopard it was an extremely complex operation that was almost completely manual. Needless to say, this sucked and it was probably one of the reasons it was shunned by most developers.

If you are using Core Data in a Leopard application then Sync Services is so trivial that you should be syncing if it makes sense. In this article we are going to cover syncing in a non-Core Data situation as that is quite a bit more complex.

If you have read the Sync Services documentation then you know it is complex. Let me dispel an illusion right away. It is hard. It is not poor documentation, syncing is very hard and very few people get it right. Take a look at Omnifocus to see an example of a company thinking it is easy and losing data. Therefore if you are expecting this subject to be trivial you will be disappointed.

In this example we will be syncing with the bookmarks schema and displaying them in a simple outline view. The outline view itself will be editable and those edits can be synced back. Not terribly useful but provides a very simple example.
(more…)

 
18
Aug
2008
 

Cocoa Tutorial: libxml and xmlreader

by Marcus Zarra

Let us pretend for a moment that NSXMLDocument was not available to your Cocoa application for some reason. Perhaps you have low memory requirements, perhaps you are running on a slimmed down version of OS X. Whatever the reason, for the purposes of this exercise, NSXMLDocument does not exist.

Let us now assume that we have a requirement to parse an xml document quickly and without loading the entire tree into memory in a object structure. In a situation like this libxml comes in handy. Unfortunately it is quite a bit more complicated than calling alloc init on NSXMLDocument.

libxml is a C library that is included with all current releases of OS X. With this library we can quickly read in a document, scrape the information we need out of that document and avoid loading the entire tree into memory at once. In addition, libxml (and more specifically xmlReader) does this very quickly, far faster than NSXMLDocument which is very useful when you have a lower end CPU. In this project we are going to create a simple application that reads in an xml file containing a list of people, their names and their ages. For the purposes of demonstration we are going to load that data into an array of NSDictionary objects and display it in a standard Cocoa window.

(more…)

 
9
Jul
2008
 

A git quickie

by Marcus Zarra

After reading Fraser Speirs’ excellent write-up on his conversion over to git, I followed a few of the links to find a bash script to display your current git branch in the command prompt. Following yet another link from that post showed how to convert the bash script to zsh.

Here is my contribution to move that from the prompt to the right side of the screen.

function parse_git_branch {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function precmd() { RPS1="%~$(parse_git_branch)" }
export PS1='> '

Note that the last line just gives me a very short left hand prompt which I prefer.

GitBranchDisplay
Uploaded with plasq‘s Skitch!

 
8
Jul
2008
 

A Case Against Dot Syntax

by Marcus Zarra

I was not born an Objective-C developer. I know that in some circles that is considered a mortal sin. Before learning Objective-C and Cocoa I had developed in a great number of languages dating back to the early 1980’s. I tell you this so that what you are about to read next is taken in the light that it was intended.

Take a look at the following lines of code:

- (void)doSomethingSpecial
{
	myVar.itsAttribute = 10;
	myOtherVar.itsAttribute = 20;
}

Now tell me, what is myVar and myOtherVar. Is it an object or a struct? Can’t tell from that piece of code can you. That is half of my argument against dot syntax in Objective-C. It makes the meaning of your code unclear. Objective-C is known for its self documenting nature. Dot Syntax removes that.

(more…)

 
8
Jul
2008
 

The audacity of [some] Windows Developers

by Marcus Zarra

Thanks to our beloved iPhone (I do refrain from calling it “My Precious”), we have seen a sudden influx of Windows Developers. Now, when most of us came over to OS X and Objective-C from whatever platform we hailed from we did not assume that everything would be the same. Most of us are reasonable people and realize that OS X is different for a reason. Unfortunately, it appears that we are unusual people. Perhaps this would explain why we came over to this platform before it became “popular”.

With this recent influx of developers, most of whom we have welcomed with open arms, there are some who expect everything to be the same as the platform they came from and without bothering to learn or experiment have proclaimed our development tools to be “prehistoric”. This truly amazes me.

First, welcome to OS X and iPhone development. This is not the same language, platform and API you have been dealing with. Accept that or go home. We are not going to change it to suit you. We like it just the way it is.

We do things differently over here. Accept that or go home.

You have an interest in either OS X or the iPhone. To do a proper application for either one (barring a few edges cases), you need to learn Objective-C and Cocoa. Accept that … well you get the idea.

Objective-C has been around for a long time and it is a well thought out language. It is a runtime focused language and therefore things work differently than you are used to in your more structured environments.

Most of the time when these so called developers complain about Objective-C I simply roll my eyes and walk the other way. It is the sane thing to do. Never wrestle with a pig — you get dirty and the pig likes it. However, one particular “genius” has decided to out himself on his own blog. Of course I speak of none other than Jesse Ezell.

It is clear from this blog post that he has no interest in learning why OS X, Cocoa and Objective-C are different from his beloved Visual Studio but instead cries that it is too hard. I mean, seriously, complaining about NSObject vs Object? Perhaps he did not bother to learn that there is more than one root object in Objective-C? And then go to on and complain about MVC like its the devil’s music? Hopefully he is not the best that .net has to offer us!

But even with all of that, I read his post, chucked and moved on. It was not until he responded to the comments on that post that I decided to respond. It seems, from his perspective, that if a developer cares enough about their development environment to respond to his rant (and try to educate him!) that we are all “rabit elitists” out to get him!

First the word is rabid, not rabit. If you were using OS X you could have seen that it was misspelled and used the dictionary to figure out what the word meant. If you can’t even bother to run a spellchecker why bother writing at all?

Second, we care about our platform. We care about the code that we produce and how our applications look and are presented to the user. I know that is probably an extremely foreign concept where he comes from. But we care!

When developers come over here with preconceptions they do everyone a disservice. If they cannot even be bothered to pick up a book and read about the language to understand its fundamentals and its tools then why bother complaining about it. They are a waste of space. Move over and let someone who is willing to learn step up to the plate.

As for this developer’s ego and contempt for the developers on this platform — shame on him. His arrogance speaks towards his ignorance. He probably has written more lines of code in the past few years than I have. I have found that applications on Windows tends to take ten times as many lines of code as the same application would written on Objective-C and Cocoa. That does not make this developer better — if anything it makes him worse.

My suggestion is this: Pick up a book and read. You can even just read blogs like this one and avoid having to pay any money to learn. If a developer can’t be bothered then go home, we have no interest in you and certainly have no need for you.

 
29
May
2008
 

Coding Practice: Cleaning up the default Core Data project

by Marcus Zarra

In this entry I am going to do something a little different. Instead of showing some wicked code, I am going to reformat one of Apple’s default templates.

Apple writes some amazing code. Unfortunately a lot of their templates demonstrate simply terrible coding practices. What is worse, people take these templates and assume that they are the proper practice for coding in Objective-C and propagate that poor code into their own projects.

The first example I am going to tackle is the AppDelegate class that is auto generated in the Core Data template. This is not the Core Data Document template but the standard application template.

(more…)