KBD

Keith Devens .com

Thursday, November 20, 2008 Flag waving
I remember the first time I met a real crazy. And what I mean is someone that you wouldn't... – Jason Hoffman

Archive: December 18, 2003

← December 17, 2003December 19, 2003 →

Daily link icon Thursday, December 18, 2003

Programming without exceptions

Internet Alchemy: Programming without exceptions. I haven't followed all the links yet, but this seems pretty much like my philosophy on exceptions.

If you have a function that does one thing, and there's a clear way for it to fail in that task, and there aren't lots of ways for it to fail where you need to distinguish exactly how it failed, and there's bandwidth (which I'll explain in a bit) in the function's return value for a failure value (or maybe in a parameter list if you're passing pointers (or "by ref" arguments) around), then return it from the function rather than using exceptions, which like the post at Internet Alchemy points out, are essentially "non-local gotos".

Sorry for the run on sentence. By bandwidth I mean something like if a function is only supposed to return positive integers, an easy way to signal failure is by returning zero or a negative number. Or if your function is supposed to return an object or a pointer to something, make it return null.

malloc is a choice example of this. Returning null is an easy and unambiguous way for it to tell you it failed.

Things I'll spend money on if I get a job

I'd like to make a contribution to Robin Keir for his excellent K9 Bayesian spam filter. It's well over 99.5% accurate now, no question (disclaimer I just remembered - I have some blacklist entries set up in it as well, so it's not all due to Bayesian analysis). I turned on SpamAssassin on the server side just to check it out, and not only was it far less accurate, but it made K9 less accurate. Stuff that I think would usually score as 9x% spammy came back in the 80's. My dad, my brother, and I all use it, and it's a great program. Over the past three to four days or so, as I haven't been clearing my spam folder in my e-mail client because of finals, I've gotten well over 500 600 spams which I can look at whenever I want, thanks to K9. Oh, and this thing gives almost NO false positives. It's really excellent.

The Best of the Muppet Show

And lots of books from my Amazon wish list:

By the way, if you're thinking of buying any of these computer books, I'd recommend taking a look at Bookpool before Amazon. They have great prices and great service.

Part of the reason I'm creating this list is because I've been making a mental list of people I want to contribute to and I'm forgetting.

Ah yes, I'd like to buy something from Cox & Forkum, they do great work.

I might also hit the tip jar for sites I read every day, like Instapundit and again for LGF

I'd also like to contribute to Answers in Genesis again to help them get their museum finished on time.

I've also never contributed to Jews for Jesus, even though I've been on their mailing list for a long time, so I'd like to do that once I get a job.

And of course, I'd like to start paying off my credit card debt and student loans.

I think I'm forgetting some things. If I think of them I'll add them here later.

Heh, in the long term, maybe I'd like to spend some money on enough parts to build a computer good enough to play Unreal Tournament again. They have UT2004 coming out soon too.

Symbols in Christian Art and Architecture

Via Charles, Symbols in Christian Art and Architecture is an excellent site.

I didn't grow up in the church, so a lot of stuff that might be obvious to others isn't to me. Like, what's that P thing with the X in it? Smiley I don't know what it's called so I haven't found it on their site yet, so I still don't know.

Ah, it's called the Chi Rho, under C.

PETA

Whoo boy, PETA is crazy.

← December 17, 2003December 19, 2003 →
November 2008
SunMonTueWedThuFriSat
 1
2345678
9101112131415
16171819202122
23242526272829
30 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 4 posts

Recent comments XML

new⇒Java join function

Meh, don't have null strings in​your string arrays imo, but you're​welcome ...

Keith: Nov 19, 7:51pm

Girls, please don't get breast implants

sorry but another thing i have to​make a comment on about you​men...the men...

happynow: Nov 17, 11:36pm

Books by Vincent Cheung

to all Cheung​fans:

read:

http://www.progin​osko.com/aquascum/cheung.h...

Zamir: Nov 16, 9:07am

Spider solitaire

To undo or not to undo that is the​question.
I'm an undoer. 
My dad​was n...

Can Turk: Nov 15, 2:50pm

Generated in about 0.142s.

(Used 7 db queries)

mobile phone