Archive for May, 2007

Why I HATE my 17″ MacBook Pro (Intel)

Wednesday, May 16th, 2007

I’m trying to work. But right now I’m not working, I’m writing this.

Q: Why am I writing this instead of working?

A: Because my MacBook Pro has decided to spend 2 minutes showing the spinning color wheel in the application I was trying to use.

I used to have a 17″ G4 Powerbook with 2GB of RAM. When people asked me what I thought of it I was always very positive and enthusiastic in my reply. Then I got a 17″ MacBook Pro, and I hate it and wouldn’t recommend it to anyone.

Every single day, probably half a dozen times, I’ll be using some application (in this case Aquamacs, a version of Emacs for the Mac) when, for no apparent reason, the mouse cursor will change to the spinning pizza wheel of death, and remain that way for up to a couple of minutes. This happens to me in Firefox too, so it’s definitely not an Emacs thing. It probably happens in other apps too, I haven’t paid as much attention as I probably should have.

I’m too busy swearing at the machine.

Anyway….. what the hell!? I wish I could just throw this piece of junk away and get something that just works. I’m planning to head back to Linux next time around. I can’t believe that this machine could have made it out the door. But I need it too much to be able to just send it back, so I’m stuck, and I resort to cursing and blogging.

I have other complaints too. I run a make clean that removes a bunch of files (around 20M of stuff, not that many files). Sometimes the rm command will just sit there for 15 or 20 seconds before completing. What’s it thinking about? I run unit tests on Python code all the time. Sometimes the python command to run the tests will just sit there, the other day it was taking almost a minute to launch python. Yes, I know, I can go look at what’s going on on my machine, and I do, and sometimes, yes, it’s busy. But this is just ridiculous. I’ve been using UNIX for 25 years and I haven’t had to wait for things like this since the early 80’s (and then on a machine I was sharing with up to 128 others). It’s infuriating to have the expensive latest and greatest laptop and then have it perform like a dog.

FWIW, the machine is probably a year old. Probably these seem like small problems, but I think Apple really screwed up, and there’s plenty of complaints online about problems with these laptops. Blast them to hell.

Now back to work – if I can manage to get a cursor in Emacs, that is.


Monday, May 7th, 2007

Here’s a Python function to iterate over pretty much anything. In the extremely unlikely event that anyone uses this code, note that if you pass keyword arguments the order of the resulting iteration is not defined (as with iterating through any Python dictionary).

from itertools import chain
import types

def iteranything(*args, **kwargs):
    for arg in chain(args, kwargs.itervalues()):
        t = type(arg)
        if t == types.StringType:
            yield arg
        elif t == types.FunctionType:
            for i in arg():
                yield i
                i = iter(arg)
            except TypeError:
                yield arg
                while True:
                    except StopIteration:

if __name__ == ‘__main__’:
    def gen1():
        yield 1
        yield 2

    def gen2():
        yield 3
        yield 4

    assert list(iteranything()) == []
    assert list(iteranything([])) == []
    assert list(iteranything([[]])) == [[]]
    assert list(iteranything([], [])) == []
    assert list(iteranything(3)) == [3]
    assert list(iteranything(3, 4)) == [3, 4]
    assert list(iteranything(3, 4, dog=‘fido’)) == [3, 4, ‘fido’]
    assert list(iteranything(3, 4, func=gen1)) == [3, 4, 1, 2]
    assert list(iteranything(3, 4, func=gen1())) == [3, 4, 1, 2]
    assert list(iteranything(3, 4, func=iteranything)) == [3, 4]
    assert list(iteranything(3, 4, func=iteranything())) == [3, 4]
    assert list(iteranything(3, 4, func=iteranything(‘a’, ‘b’, c=‘z’))) ==
        [3, 4, ‘a’, ‘b’, ‘z’]
    assert list(iteranything(3, 4, func=iteranything(‘a’,
        iteranything(5, 6), c=‘z’))) == [3, 4, ‘a’, 5, 6, ‘z’]
    assert list(iteranything(None, ‘xxx’, True)) == [None, ‘xxx’, True]
    assert list(iteranything(3, 4, [5, 6])) == [3, 4, 5, 6]
    assert list(iteranything(3, 4, gen1, gen2)) == [3, 4, 1, 2, 3, 4]
    assert list(iteranything(3, 4, gen1(), gen2())) == [3, 4, 1, 2, 3, 4]
    assert list(iteranything(1, 2, iteranything(3, 4), None)) ==
        [1, 2, 3, 4, None]
    assert list(iteranything(1, 2, iteranything(3, iteranything(1, 2,
        iteranything(3, 4), None)))) == [1, 2, 3, 1, 2, 3, 4, None]

the blind leading the blind?

Tuesday, May 1st, 2007

At some point I read a description of why entrepreneurs pitching VCs is a bad mix: because you have people who can’t explain anything meeting people who can’t understand anything. That’s unfair all round of course, but still…. Having done some of this and had people just not “get” it, you can’t but wonder why they don’t get it. Of course part of it can be about the pitch itself, the presentation, etc etc. But even if you suppose everything is ideal, investing (both as a founder and as a financial backer) are both an act of faith.

There’s lots of evidence for this. To begin with, if it were a science and there were quantifiable measures, those things would presumably be known and you’d have a lot fewer startups and a lot fewer investors, simply because failure would be rare.

Until recently I thought there was more of a lack of vision on the investor side. But now I’m not so sure. For example, the Google guys were apparently running around search engine companies trying to sell their idea (vision? early startup?) for $1M. They couldn’t find a buyer. What an extraordinary lack of….. what? On the one hand you want to laugh at those idiot companies (and VCs) who couldn’t see the huge value. OK, maybe. But the more extraordinary thing is that Larry Page and Sergei Brin couldn’t see it either! That’s pretty amazing when you think about it. Even the entrepreneurs couldn’t see the enormous value. They somehow decided that $1M would be an acceptable deal. Talk about a lack of vision and belief.

So you can’t really blame the poor VCs or others who fail to invest. If the founding tech people can’t see the value and don’t believe, who else is going to?

I usually enjoy Paul Graham’s essays. In a recent one, The Hacker’s Guide To Investors, he says:

Risk is always proportionate to reward. So the most successful startup of all is likely to have seemed an extremely risky bet at first, and that is exactly the kind VCs won’t touch.

Which is also pretty interesting. In some ways it’s like a horoscope – appealing to every dreamer who believes they’re sitting on a billion-dollar idea. But if the always is true in the above quote, then if it happens that you are in fact sitting on something that will bring huge rewards, then it by definition must appear hugely risky.

If you throw in the initial observation that even the founders cannot assess value, then I think you get three things. One: a feeling of taking huge risk is a necessary part of building something that’s hugely rewarding (i.e., if you don’t have that feeling, then you’re probably not building such a thing). Two: even if you are building such a thing, you cannot know it. You just have to believe. Three: if you cannot know it, but can see huge risk, you can’t expect investors to see things any differently. So to get them to invest you really have to make them believers too.