KBD

Keith Devens .com

Thursday, March 18, 2010 Flag waving
But goodness alone is never enough. A hard cold wisdom is required, too, for goodness to accomplish good. Goodness without... – Robert Heinlein

Archive: November 04, 2005

← November 03, 2005November 05, 2005 →

Daily link icon Friday, November 4, 2005

  1. Check out this synopsis of Harry Potter. Via Adam.

       (0) Tags: [Harry Potter, TV/Movies]
  2. Tutorial on Good Lisp Programming Style | Lambda the Ultimate. To read.

       (0) Tags: [Programming]

Sam Ruby: Sometimes the dragon wins

Sam Ruby: Sometimes the dragon wins. Not here: ɥɦɐ. And you can search for it.

My dirty little secret, however, is that I'm storing everything in MySQL in fields declared to be encoded in latin1, storing UTF-8 in there anyway, and trusting the browser to get Unicode right. I've tried storing everything in Unicode-encoded fields in MySQL, but it mangled some of the rarer characters when I tried to convert this post once my host upgraded to MySQL 4.0 or 4.1 (whichever one first supported Unicode fields). Some characters worked, some didn't. My only guess is that MySQL only handled an older version of Unicode and stripped everything it didn't understand.

  1. The New Criterion — Buckley at the beginning (via Power Line):

    In the current issue of the New Criterion, Professor Hart brings his gifts for portraiture to bear on an autobiographical reflection on the founding father of National Review and the modern conservative movement: "Buckley at the beginning."

    This brilliant essay is difficult to excerpt. Please read the whole thing.

    Ok. To read Smiley

       (0) Tags: [Opinions/Politics]
  2. Cox & Forkum: Bad Moon Rising.

       (0) Tags: [Opinions/Politics]

Should I pollute my root namespace?

I've decided that my wiki has long since been dead. Editing has been disabled for a while, and I don't even remember whether that was an accident or not (i.e. whether I was working on the software and left it broken (and whether that was intentional or not) or whether I just decided to disable it). Public editing just did more harm than good (extraneous pages were created, comments would be left I didn't need, and discussions would form (and a wiki isn't a good place to conduct a discussion)).

But, I still want a place to put random pages. So, should I:

  1. Put all random pages at my root (i.e. right under keithdevens.com/)?
  2. Clean up the /wiki and put all random pages there?
  3. Create a new namespace like /pages and put random pages there?

I'm leaning towards A because:

  1. I already have certain content pages at my root, such as the pages in my tabbed navigation at the top
  2. Even though they're at the root, random pages can still have structured (i.e. nested) URLs
  3. Why have the extra nesting of a /pages or a /wiki? It's like "of course they're 'pages'. They're on your web site, after all". Or alternatively, "Huh? /wiki, but uneditable pages?"

Chris Langreiter puts all his stuff under "space". Ian Bicking puts all his stuff at the root, but that's the root of blog.ianbicking.org so that doesn't count. Main reasons I'm reluctant to choose A are:

  1. It pollutes my root namespace and seems "messy" to me
  2. Lots of little pages at the root make trivial little pages as important, as far as the URL is concerned, as important pages like /about or /software
  3. I feel like it's hard to change to something else later if I do it this way

Opinions very welcome.

  1. Brad Cox's Objective-C book: Object-Oriented Programming and The Objective-C Language (via Steve Dekorte).

       (0) Tags: [Programming]

String escaping behavior

Which do you think is the more appropriate behavior for escapes that aren't escapes in your programming language: Say you have an escape that doesn't mean anything, like "\g". Should your programming language turn that into "g" or leave it as just "\g"?

$>python -c "print \"\g\""
\g

$>perl -e "print \"\g\""
g

$>ruby -e "print \"\g\""
g

$>php -r "print \"\g\";"
\g

$>lua -e "print \"\g\""
g

$>cat test.c
#include<stdio.h>
int main(){printf("\g");}

$>gcc test.c
test.c:2:19: warning: unknown escape sequence '\g'

$>a
g

$>MzScheme -e "(display \"\g\")"
Welcome to MzScheme version 299.400...
#f::9: read: unknown escape sequence \g in string
> ^Z

Anyone want to test C# and Java for me (since I don't have the interpreters on my system)? More importantly, want to tell me which you prefer? What does JSON do? (Update: it's not defined in JSON, but an alert("\g") in Firefox's JS console gives 'g').

← November 03, 2005November 05, 2005 →
March 2010
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



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

Recent comments XML

I hate ASP.NET

I hate ASP... I was doing wonders​with PHP, then suddenly one of my​clients...

Johnies: Mar 17, 6:14am

Quantum physics and free will

I knew you were going to say that....

Tom Massey: Mar 15, 9:26pm

Generated in about 0.063s.

(Used 7 db queries)