elfs: (Default)
[personal profile] elfs
I keep telling myself, "I should write something in my blog. I didn't do much yesterday." Actually, looking at my blog, I see that I made three posts yesterday, and all three of them were vaguely coherent. Amazing, considering that otherwise I felt like I was on the planet of the airheads.

Let's see. Status: 29 Journal Entries in the "draft completed" bin. 70 Journal Entries in the "unfinished" bin. Nothing else qualifies as anywhere near "finished."

I haven't written anything worthwhile in two weeks. I wrote 200 words the other day on a great story idea, but I seem to have writer's block. Inconceivable!

I have two overdue library books.

I've managed one spoken-word Japanese lesson per week since the beginning of the year, but have not yet gotten past chapter three of the written. I've studied 42 kanji and can remember maybe ten. Given that I need to know 2,000 in all their wacky glory, that's not good progress.

I have not yet ridden my bicycle this year. It's been cold.

I have not been drawing nearly as much as I'd like.

I have studies some programming language stuff, mostly in advanced python. I've learned that the correct python equivalent of a switch() statement is not a collection of if's, it's a static hash with a default operator. And I've been studying wxPython, which is a neat extension to the language for GUI stuff.

I have downloaded a lot more anime than I have time to watch. Given that I now understand how the human brain overestimates time available in the moderate future, anyone who suggests "Oh, you should watch this show," is only going to get a well-earned scowl.

I found this wacky flash game featuring a homicidal chick and her flying bicycle.

Date: 2005-02-22 09:51 pm (UTC)
ext_3294: Tux (Default)
From: [identity profile] technoshaman.livejournal.com
Inconceivable!

I do not think it means what you think it means. :)

(Sorry, couldn't resist. Fresh out of crayons. :)

Date: 2005-02-23 12:08 am (UTC)
From: [identity profile] nbarnes.livejournal.com
I have studies some programming language stuff, mostly in advanced python. I've learned that the correct python equivalent of a switch() statement is not a collection of if's, it's a static hash with a default operator.

Whiskey Tango Foxtrot, over?

Date: 2005-02-23 12:21 am (UTC)
From: [identity profile] elfs.livejournal.com
There's no switch statement in python, right? Usually people use a pile of if/elif/elif/else statements, like this:
if   cmd == 'print': doprint()
elif cmd == 'save':  dosave()
elif cmd == 'read':  doread()
elif cmd == 'quit':  doquit()
else: raise ErrorMessage, "WTF?"

What Guido intended, however, was that we'd write this:
{ 'print': doprint,
  'save':  dosave,
  'read':  doread,
  'quit':  doquit }.get( cmd )()


Which is much more like the scheme-like engine he was implementing at the core of the Python interpreter. We can discuss whether the latter is more clear than the former, but you can't argue that it's much more concise. As one commenter wrote, "You've got a high-level language. Use it, for god's sake."

Date: 2005-02-23 04:36 am (UTC)
From: [identity profile] nbarnes.livejournal.com
ObDisclaimer: I don't speak Python.

The elif stack is just ugly (like similar structures in almost any language). More than that I am not qualified to say.

Profile

elfs: (Default)
Elf Sternberg

May 2025

S M T W T F S
    123
45678910
111213141516 17
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 28th, 2025 10:13 pm
Powered by Dreamwidth Studios