Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,194,289 members, 7,954,151 topics. Date: Friday, 20 September 2024 at 01:13 PM

Error: No Error - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Error: No Error (822 Views)

How Do I Fix "Player.exe Has Stopped Working" Error Message. / Invalid Security Token Error 403 Blogger Template / [Help Request] Help With Database Connectivity Error (2) (3) (4)

(1) (Reply) (Go Down)

Error: No Error by javarules(m): 10:44am On Jan 16, 2009
I was using firebug to peek into facebook today, and what I saw stunned me. I saw this as a response to one of their a million and one ajax posts

response = {error: 0, errorSummary: "", errorDescription: "No error.", errorIsWarning: false, payload

: [], onload: ["setCookie(\"made_write_conn\", \"1232098415\", 20000);"]};

/* !eval(new String('response = ('+safeResponse+')wink) */

Now the untrained eye wont see the catch, and the slow mind might take a second to come to speed with it, but the programmer mind in me saw it immediately like this

Error
errorNumber: 0
errorSummary:
errorDescription: No error

Now if that's funny
Re: Error: No Error by logica(m): 11:53am On Jan 16, 2009
simply means u will always have an error associated with any response. and in the case where there is no error, rather than return "null", an instance that says "all is well" is created. what's the biggie?
Re: Error: No Error by javarules(m): 5:49pm On Jan 17, 2009
u dont get it? why would you write an API like that. onSuccess retunr success, on error return error.

wtf is an error occured. description of the error, no error.

go to a doctor, he said u are sick. oh doc, whats the nature of my sickeness, he replied

YOU ARE SICK OF "NO SICKENESS" now thats awesome isnt it??
Re: Error: No Error by logica(m): 8:36am On Jan 19, 2009
U r 2 busy thinking about semantics while the writer was busy thinking about code reuse. If he was to create a data structure for "Success", it would be way too similar to the "Failure" or "Error" structure. He therefore decided to merge both into one. He could have decided to call the structure "SuccessOrFailure" or "ErrorOrNoError" but the name doesn't make a difference. He understands what he's trying to do, and the name does not affect the structure in any way.
Re: Error: No Error by javarules(m): 8:44am On Jan 19, 2009
He sure understands I know, and I am sure if another was to manage that code he will sure be looking for success in an error bag!
Re: Error: No Error by logica(m): 11:13am On Jan 21, 2009
In your head think of the data structure "Error" as "ErrorReport" (error is different from error report of course, as error report can make sense as "no error") and keep it moving. You are still talking semantics.

(1) (Reply)

Sql Server Reg. / Attention! Thanks Mr Lojik / What Can I Do With Gis?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.