KBD

Keith Devens .com

Monday, October 13, 2008 Flag waving
Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will... – Eric S. Raymond

Archive: January 11, 2003

← January 10, 2003January 12, 2003 →

Daily link icon Saturday, January 11, 2003

s/experimental/extension/

The x isn't there for "experimental", it's there for extension, because the x-www-form-encoded mime type is a non-standard extension and has never actually been standardized by whomever standardizes mime extentions. It's only a de-facto standard.

Update: Joe from bitworking.com kindly pointed out that I was full of crap and should have checked the RFC.

Update again: Actually, I may not be so full of crap. I just checked the first MIME RFC RFC 2045 section 5, which says:

In the future, more top-level types may be defined only by a standards-track extension to this standard. If another top-level type is to be used for any reason, it must be given a name starting with "X-" to indicate its non-standard status and to avoid a potential conflict with a future official name.

In fact even the grammar productions say "extension"! Also, the part of RFC 2048 Joe quotes (he quotes from the draft which wound up being RFC 2048, I think) refers specifically to "x." content types

For convenience and symmetry with this registration scheme, mediatype names with "x." as the first facet may be used for the same purposes for which names starting in "x-" are normally used. These types are unregistered, experimental, and should be used only with the active agreement of the parties exchanging them.

However, with the simplified registration procedures described above for vendor and personal trees, it should rarely, if ever, be necessary to use unregistered experimental types, and as such use of both "x-" and "x." forms is discouraged.

but then compares them to "x-" headers and says they're used for the same purpose... so at best, both "x." and "x-" are both extensions and experimental types.

Quickies

Unfortunate URLs

Every so often the company networking department takes a vacation, gets a major hangover and comes up with horrible URLs for companies...

i just saw the greatest f*****g thing!!!

i have a dart board in my basement and my brother was throwing darts at it, he trew one adn it hit the bullseye then he threw another and it stuck right in the end of the other dart in the bullseye robin hood style

Oliver: Jehovah's Witness

Our neighborhood seems to be popular with Jehovah's Witness'. We get a visit from them at least twice a year. I'll just politely accept their literature, close the door, then throw away the Watchtower material.

Here's a rundown of key teachings of JW that makes them a cult:

He has an interesting summary, along with a whole bunch of links to more information. This is great, because JWs are one of the cults I don't know all that much about because I've never known or had to deal with anyone who was in that cult, whereas I know Mormons, Christian Scientists, etc.

Russell: T9 is Amazing.

Predictive text technology is really cool. Yesterday I got to see how useful it is because my friend was typing a location into his awesome satellite guided navigation system thingy in his Infiniti and after every character only the characters that would be a valid next character were available to enter.

News.Com: Amazon to decide soon on free shipping

"It's effectively a major price reduction," he said. "We've had it in place long enough to collect a lot of data about how it affects customer behavior, and that's how we'll make the decision."

Amazon will announce during its quarterly earnings conference call Jan. 23 whether it will continue the program, revert to the previous policy of free shipping on orders $49 and above, or move to a price point somewhere in between.

"We're always going to have free shipping," Bezos said. "Customers get what customers want, and they've been very clear that they want free shipping."

"I've been asked for at least six years, 'How can you guys make any money on the Internet with the pricebots (automated price comparison sites) out there?'" Bezos said. "My answer has always been, yeah, it's one of the things that makes our job challenging, in the same way gravity makes Boeing's job challenging...What we have to do is offer the best customer value proposition we can, and we'll come out favorably in those comparisons."

Check out this interview with Jason Isaacs who plays Lucius Malfoy in Harry Potter.

The screenshots of jEdit 4.1 look really awesome. I'll have to try it again when version 4.1 is out of beta. Lets hope the FTP plugin works this time!

These are some cool shirts.

Java and Pointers

Jeremy: java.lang.NullPointerException

I remember back in the mid-90s when Java first came out. I actually read the Java 1.0 language spec. The whole thing. It was cool. One of the folks who was telling me about it (just before I read the spec) endorsed it by saying "it's like a cleaner C++ with no pointers!" I've heard the "you don't make pointer mistakes in Java" bit a lot over the years.

Despite all that, I'm still able to convince Java to throw a java.lang.NullPointerException at me. Every time I get one (which is pretty often right now) I have to laugh just a bit because this is the a language without pointers.

Charles: NullPointerException:

Jeremy Zawodny has discovered the NullPointerException, and laughs because he's been told that Java is "the language without pointers". Claiming that Java is a language without pointers is, of course, rubbish. All variables that refer to objects are references (i.e. pointers) to that object, which resides somewhere in the heap.

What Java lacks, is pointer arithmetic. The only operation that is permitted on a pointer is dereferencing (the '.' operator), which allows you to perform actions on the object being pointed to. There are two reasons for this. Firstly, it frees the JVM to do memory-management how it wants, and not have to be a slave to the "pointer equals memory address" thing. Secondly, and more importantly, it prevents a large class of memory-corrupting, security-destroying, application-crashing bugs that can result from direct manipulation of pointers.

Which brings us to null. Null is the value for a reference which means "this reference does not point to any object". If you try to dereference null, you get a NullPointerException.

Some languages treat null differently. Objective-C's nil is a reference to the null object, which responds to any message you throw at it with nil. This makes an unassigned reference something like a black hole, you can send anything in but you'll get nothing back. Smalltalk gives you both worlds: nil is a singleton that passes every message to doesNotUnderstand. In development environments this throws up the debugger when it's reached, but common practice is to redefine nil to observe the Objective-C behaviour in production.

Fascinating, I never knew that.

Also check out a little more on this by Kasia.

Update: read more on LtU. Ehud makes the point I was thinking as I wrote this post, and he says it well:

It should be noted that this issue is quite relevant to teaching programming. Some people assume that by using language like Java you eliminate the need to teach students about pointers. This is a rash conclusion.

← January 10, 2003January 12, 2003 →
October 2008
SunMonTueWedThuFriSat
 1234
567891011
12131415161718
19202122232425
262728293031 



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

Recent comments XML

new⇒Spider solitaire

I have now won, at the "Difficult"​level, 186 games of Spider​Solitaire.  I...

75.179.28.113: Oct 13, 9:34am

new⇒Girls, please don't get breast implants

Please, don't marry him.

You​want to get surgery to make​yourself more i...

gigi: Oct 12, 11:47pm

I hate PHP

Elliot Anderson,

Dude!! You the​man! The reverse replacement for​array_u...

Alex Ndungu: Oct 11, 1:35am

Call a function from a string in Python

?!code:
some_object.__getattribute​__('method_name')()
?!/code

is​the s...

Patrick Corcoran: Oct 8, 3:53pm

Sed one-liners

Hi.

I wanted to let you know​that I wrote an article "Famous Sed​One-Lin...

Peteris Krumins: Oct 8, 3:05am

Timesheet Calculator

Hadn't seen it before now, but my​company already uses a time​tracking prog...

Keith: Oct 7, 10:44am

Generated in about 0.059s.

(Used 7 db queries)

mobile phone