Aug 14, 2008

whitespace, curly braces and other programming constructs

I've been toying with Ruby and Python lately. There are some very very nice features built into their programming ethos. /* If you don't care about programming, stop reading now */

However, there are certain syntactical vagaries that have been bothering me.
1. Using whitespace to demarcate blocks of code
This is a good idea in terms of readability. However, it is a *terrible* idea when trying to parse through diffs, or sorting out levels of nesting. In general, whitespace shouldn't matter when you do a diff. Except, now it does. Curly braces are a really nice way to differentiate levels of nesting and blocks of code. At least Ruby allows this, which is why I might migrate from Python to Ruby with braces.

2. Passing in function parameters without parentheses
Perl tried to create a programming language syntax that incorporated all existing syntaxes known to man. There are, like, 256 different ways to invoke a function. Which is completely unnecessary. C actually got this right early on. Function parameters go in () and are separated by commas like this: (param1, param2). This is clean and intuitive. While Python and Ruby support this form, they also borrowed a bad idea from perl - simply using whitespace to separate parameter names from functions, and from each other. You don't really want to sit and wonder as to whether something is a keyword or a function parameter or something else. You never want to borrow programming constructs from Perl. As useful as it is, Perl is the epitome of a hacky language. A bit like English - very versatile and robust, but extremely irregular.

3. Lack of strong typing
I go back and forth on this one. You might argue that Python/Ruby are in fact strongly typed. But anytime you can call a function and not be sure as to whether it returns a string or an int (unless by design) you have the potential for some crazy typecasting.

That having been said, I really like some aspects of these languages:
1. Iterables (yummy!)
2. Forcing code blocks to be indented at the same level. There are some good things about readability - I just think it should go hand in hand with the curlies.
3. No terminating semi-colons
4. Intuitive use of operands
5. Very powerful and simple parsing libraries
6. More to come ...

Like I said, I'm still a n00b with these languages, so call me out if I'm wrong here.

Aug 5, 2008

Introducing Jay Smooth

I ran into the Ill Doctrine vlog a little late in the game (thanks Lil), but this man represents all the reasons why I fell in love with hiphop way back when. Smart, political and irreverent are all spliced together in this video blog. And he actually understands hiphop from the inside.

Check out this nugget:
"Science has proven that any meme becomes played out precisely at the moment when people start calling it a meme".

And if you want to delve deeper, here is a nice little clip on race:
http://www.illdoctrine.com/2008/07/how_to_tell_people_they_sound.html

Aug 3, 2008

To ER and back

As the tinu would say - "Uh! Oh!".

We were walking over to a friend's when her eye started to swell up. Her lip started getting all fat. Puffy cheeks. Hives. We were in the midst of a full blown allergy attack. Neither of us had dealt with a massive allergy before, so we were a little confused. But we managed to make it to the E.R. (Thanks Mike). A bit of shouting, some benadryl and a nap later she seemed to be on the mend. But it was all a little freaky.

The scary thing is that we still have no idea what triggered the reaction.

Observation: The Kaiser E.R. doctors are incredibly nice! I feel very grateful.

Update: Post E.R. photo

Jul 16, 2008

Yes, I was mean ...

... in calling a friend out for sending me a forward, but alarmist spam really bugs me.

I guess I won't bother with a "top ten ways to identify a bogus forward" list, but I did find this bit of advice that I found online useful:

Take your time
. Resist any urge to “act now”.

When you get a forwarded mail, your impulse should not be - ohmigodletmesendthistoeveryoneiknow. Instead, consider sitting on it. Don't ask yourself - could this be real? Ask yourself - could this be spam? If the answer is even maybe, then it is probably junk.

Jun 18, 2008

ff3 update

so i've been sampling the three different ports (win/mac/linux). one of the key developments with this release is the decision to "go native" with the UI. in other words, the browser is much more tightly integrated with the look and feel of the underlying OS.

the mac version is slick, and feels like a bonafide apple browser. the windows version is shiny and vistafied, but i'll probably get used to it soon enough. and then there is the linux version. the firefox people took the "go native" directive a little too seriously here, which means that the linux version looks like crap. yup - it has shitty icons, mismatched fonts, and poor anti-aliasing ... everything we love about linux based UIs. one of the nice things about the old firefox was that it had a clean simple design, and generally looked good, even under linux. i'm hoping i can reskin it back to the old look, and i'm hoping that mozilla realizes that they have better graphic designers than the bit bangers that work on linux (who are extremely smart people but a little command line happy). just because you can dereference a pointer doesn't make you a visual artist.

Jun 17, 2008

ff3

I just got the new Firefox, and it is *blazing* fast. Slick looking too! Me likey.

If I ever get around to it, I will post a completely subjective, opinionated and non-comprehensive review pimping the Firefox. But a lot of the memory and speed issues that dogged the old version seem to have gone away.

Jun 10, 2008

bikes on board

i've been pretty good about riding my bike in to the oakland office when i can. but the berkeley site has always been slightly more challenging, because it is way high on top of a hill. ok - that is really just an excuse, because they have a shuttle where one could theoretically load one's bike on the rack, and simply bus it to the top. really this is all about my irrational fear of loading my bike on the rack. which translates to embarrassment at not knowing how to do it properly, and being slightly shy and afraid to ask someone for help in the middle of the commuting time crunch. so yeah - i've been too afraid to try.

UNTIL NOW!

i am happy to announce, that i successfully loaded my bike on the bus today. i even found a nice helpful instructional video, in case you've been grappling with similar issues:

http://www.actransit.org/riderinfo/bikes.wu

saving the world one irrational fear at a time. YES WE CAN!

May 27, 2008

back in black

yup - the good ol' craptastic "minima" template is back.

mangled

Apparently, I am Shrevas Chiolia (at least according to the Globusworld agenda).

May 7, 2008

More Chris Glass

Taking the kids to Target


Originally uploaded by chrisglass

I'm feeling a lot of love towards Chris Glass of glass.typepad.com

50 ways

Apr 17, 2008

From the hit new movie ...

"They're zombies.
No, they're strippers.
No, they're... zombie strippers."

I think Snakes On A Plane just got some competition!

non-conundrums

i guess most of our so-called ancient philosophical problems have been solved by science. think about it:

1. chicken and egg - umm - easy - egg - the evolutionary parent of the chicken lays an egg with a slightly mutated piece of DNA, and voila - we have the first chicken egg. Once you start using biological markers to differentiate species, this stops being interesting.

2. tree falls in the forest - NO - it does not make a sound, if there isn't a sound perceiving agent around. sound is a psychological construct, and simply how we perceive vibrations in a medium. no "we" - no sound.

3. one hand clapping - either bart simpson has already solved this one, or this is a semantic argument, and thus uninteresting from a philosophical standpoint. (As in, you've already defined a clap as the product of two hands striking each other, so you either have to redefine your original terms or eliminate your wankage. it's like asking what if 2 times 2 were 13 [assume base10 here])

Apr 10, 2008

monster noises

can i just say that it is an absolutely sublime moment when you are finally able to go GNNHHRHHHR to your child, and she responds back with another GNNHHRHHHR. we are communicating!

just like that

we have a new look.

and just for being patient with my whims and fancies, i'll leave you with some gorgeous shots of ancient computer hardware: http://www.corememoryproject.com/main.php

Mar 22, 2008

when duke is not duke

an observation - when duke is a #1 seed, it generally means that they've got a great record and are actually good. #2 or lower means that they've had a few losses but the committee wouldn't dare give duke a lower seed, because they have so much cachet. any time duke is a 2 or 3 is a good year to pick against them in the early rounds, since it screams overrated.

dammit

boredoms were playing last week and i just found out. i think i'm going to compile a list of awesome shows that i've missed this year. pre-boredoms, we've already got the mag fields, and the mountain goats.