We Are The Change We Seek
"i got this" - Kenny Wyland

This isn't where I thought I was going to be when I looked forward into my life, but here I am....

Yes We Can

Previous Entry :: Next Entry

Read/Post Comments (1)
Share on Facebook





Nerd Rant: Silent Failures Can Bite Me

Objective-C, the language used to write Mac and iPhone software, blows.

One of the very first things we learned in Computer Science 101 was that failures happen. We should do our best to make sure that failures are avoided, but we needed to accept that failures would happen and so it was vitally important that failures be handled gracefully.

This BS is not what Professor Cordero was referring to when he said "gracefully."

When you pass a message to an object in Objective-C (i.e. call a method), if that object happens to be nil then it just gets ignored and the program continues on without the slightest hiccup.

Oi, geniuses, if that object is nil then something has gone wrong AND I'D LIKE TO KNOW ABOUT IT.

What this caused for me is that when my code was performing steps A-E, suddenly steps C, D, and E stopped working properly and I couldn't figure out why. It was because step B was failing silently and therefore all of the code that came after it is working in a broken state. WTF, dude? What if I'm updating some important database information and those silent errors cause me to hork the data in the database without the slightest of complaints?

It's a stupid f'ing design.

</nerdrant>


Read/Post Comments (1)

Previous Entry :: Next Entry

Back to Top

Powered by JournalScape © 2001-2010 JournalScape.com. All rights reserved.
All content rights reserved by the author.
custsupport@journalscape.com