Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoa Bad Habits [closed]

What are those bad habits you've developed since you've started coding in Cocoa?

I think making a list of bad habits and actively adding to it and, more importantly, breaking those habits is a good technique to produce your code quality. So start now, get your bad habits off your chest. Maybe other people share your bad habits.

like image 691
schwa Avatar asked Oct 15 '08 16:10

schwa


People also ask

Is it safe to eat chocolate after expiration date?

Chocolate bars are best eaten as fresh as possible, but they can still be considered edible a few months after the best before date printed on the packaging. Some chocolate professionals also believe that chocolate becomes better as time goes by. Like wine, some new flavors may develop in the chocolate bar with aging.

How do you know if chocolate is expired?

Chocolate's expiration date is really just an indicator of when its quality will start to decline. If it looks, smells and tastes normal, you're in the clear. Cracks or dots on the chocolate may signal it's a bit stale and has seen better days.

How long does chocolate last after expiration date?

Best before dates for dark chocolate products tend to be over 2 years, and you can normally eat the chocolate for up to 3 years past this if stored properly. Most resources state that milk chocolate can last approximately 1 year, but take this with a pinch of salt.

How do you fix chocolate that turned white?

If you're a chocolate bar purist, you can reverse “bloomed” chocolate by melting it down and then molding it again — this brings the fat back into the actual candy. You can also still eat it as is, even though it might not look as appetizing as it did when you first bought it.


2 Answers

Passing nil to arguments that call for NSError**, pure lazy.

like image 106
lfalin Avatar answered Sep 20 '22 05:09

lfalin


Not unit testing enough. It's really difficult to clean up and refactor code if you don't have unit tests. And without constant refactoring and cleaning, code rot begins to set in and spread.

Using the singleton pattern to share objects, like +[MyObject defaultObject]. This is essentially a global variable that makes for some nice hidden dependencies and coupling. This, in turn, makes code harder to test.

like image 45
Dave Dribin Avatar answered Sep 19 '22 05:09

Dave Dribin