Moving On

Things sure have been quiet around here…

As some of you may already know, I’ve left the relative safety of my job at Collaborative Drug Discovery to have another go at starting a company.

I’m currently working with a friend to once again create something out of nothing and bring yet another crazy idea into the world. Therefore, if you see me and I look like I just got finished working for 18 hours straight, please buy me a beer and put me to bed.

As for the new company, I’m not ready to talk about what we’re doing yet, but I’m sure that I’ll be writing about it here as it comes together.

Don’t Forget to Clear Out Your Rails Session Data

For the last year or so, this blog has been running slow, slow, slow.

From time to time, I tried to figure out what was going on, but I figured that Typo upgrades were just causing things to slow down and use more and more memory.

Until tonight.

Tonight I did a database dump and it came to 44 MB.

There is no way I have 44 MB of content in this blog.

So I had a look at the dump and realized that I had close to 100000 sessions in the sessions table, and that there was a table for Sitealizer plugin that’s no longer part of typo.

So after a drop of the Sitealizer table and a

rake db:sessions:clear

Typo is now using 20% of the memory it was using before, running much, much faster, and the database dump comes to a slim 476 KB in size.

So this is my reminder to myself (and everyone else) to be sure to clear out your sessions table from time to time.

Omnifocus Interface == Fail

I use Omnifocus everyday to track what I’m doing, and I love it, but there are tons of UI problems with it that drive me absolutely crazy. There’s a good article about some of the failings of the interface design here (with a video showing some of them), but there’s one interface decision that’s been absolutely driving me nuts lately.

Look at this picture:

omnicalendar

See anything wrong with it?

If you said, “There’s no way to set the due date for a project to Tuesday without clicking the little arrow at the top left to go to next month” then you’re right.

What a horrible failure of UI design. I end up up dealing with this at the end of every month, and everytime it’s a pain in the ass. Compare it to the iCal day chooser:

ical

See that? Much better. They just grey out the days in the upcoming month. (They even go above and beyond the call of duty and show two upcoming weeks.) This is what the Omnifocus date chooser should be.

Hopefully there will be an Omnifocus update soon that addresses most of the problems with the interface. I expect more at the price point ($89) that they’ve positioned it at.

Django Testing Framework == Fail

I was reading on a plane recently, and was about halfway through the Django book, when I realized that I hadn’t seen anything about how to test my application yet. I tend to be a test first developer and use lots of mocks to play with things, especially at the beginning of a project, so I flipped to the index, turned to the test page, and saw the following:

Testing was still under development when this book was being written, so to learn more you’ll need to read the documentation online at http://www.djangoproject.com/documentation/0.96/testing/

Not a whole lot of help when you’re on a plane.

Still, I was willing to give them the benefit of the doubt. Maybe they could create a bolt-on testing framework that would really be something.

Unfortunately, it’s just not very good.

Perhaps I’m spoiled by Rails and Rspec, but to me, the Django testing framework feels like something that they put in place just because someone told them that they needed a testing framework. It’s not an integral part of the system.

Let’s look at their test types.

First of all we have doctests. These emulate the output of the Python interactive interpreter exactly inside of your test code. All this does is to encourage the bad practice of writing some code, firing up your your interpreter, running a few cases, and then cutting and pasting the results into a file. There’s no need to think through all of the cases or what you’re really doing here. It’s just an after the fact, feel-good, safety check.

Second, we have Unit tests. Not the most sophisticated testing framework in the world, but these look like a better choice, very much like any sort of xUnit tests.

The biggest problem I have with these, and the Django testing framework in general, is that the tests don’t look to be compulsory. Why, in this day and age, don’t we make the generation of a test automatic, and make the user decide to remove it if they really, really don’t want to test, not the other way around?

Testing as an afterthought inevitably leads to poorly tested code.

I certainly hope that, as Django continues to grow and mature, testing take a more central role in the future.

Innovation, Or the Complete Lack Thereof, In the Start-up Community

You can’t just ask customers what they want and then try to give that to them. By the time you get it built, they’ll want something new. – Steve Jobs

I was at a networking event out here in the Valley a few weeks ago where a bunch of companies went up on stage and presented their companies to the audience. I’m fairly certain that at least one of them might have been interesting, but to tell you the truth, I don’t really know because I didn’t really pay attention to any of them.

I already knew about the ones that mattered and a quick glance at the program showed me that the others weren’t worth listening to because they were me too clones of other start-ups.

After the presentations were over, a friend asked me what I though of them, to which I replied, “Don’t know, didn’t pay attention” and he responded, “yeah, but are you actively a hater like me yet?”

I think that I got his point, and that is that there are times lately where I just want to slap people when they tell me what their company is doing.

I know that innovating is one of the hardest things in the world to do, but lately, I’ve been disappointed in 99% of what I see. As far as I can tell, there seem to be two main reasons for this:

  1. The first reason is because of what I call the “me too” start-up. For example, when I first moved to SF, Flickr was the big thing out here, so for a few months everyone seemed to have a crap photo sharing site. Then this changed to Youtube/crap video sites, Facebook Platform/crap widget sites, and on and on. Some degree of competition is a good thing, but it’s all a little much. If you have a substantial improvement to an existing product then, by all means, go for it. However, if you’re just doing a feature for feature copy of a competitor’s website then, please, invest those resources in doing something else. Or at least don’t try to pitch it to me as something new and exciting.

  2. The second reason, and the one that bothers me more, is the “aim high, fall fast” start-up. This is the start-up that has lofty goals, and falls into the trap of selling them out to meet some sort of smaller and less interesting short term target. This is all too common (hell, I did it at my last start-up), and I think that a big part of it comes from the fact that it’s so cheap to start a company now that sometime it’s easy to forget just how hard you really have to work to make something great. These are the companies that VCs need to fund at their “aim high” stage to keep them from plummeting. Sure, they might have an idea that’s way off in left field, but companies like that are usually the ones that grow into something huge and interesting.

So, I guess that I’m asking everyone out there for one thing, and that is to think bigger than we are right now. Think outside the box, don’t water it down in the early stages or once a little revenue starts to trickle in the door.

When I run into you at a networking event, make me say “damn, that’s a crazy idea, but it just might work” and when I run into you 6 months later don’t make me shake my head at you because you’ve turned it into a clone of another idea.

Perhaps if we all start using our heads, the innovation will start flowing freely once again.

Exposure to New Things, Still Good (More on Maglev)

I’m somewhat taken aback by all of the negative reaction to Gemstone being a closed source product in the wake of the Maglev announcement.

Look at this:

Cargo Ship

Do you really think that the people that own this ship care about paying for software?

I doubt it, but they probably care about things like development speed. And software reliability. And the ability to get someone on the phone immediately if something goes wrong with the software.

That’s the world the Gemstone comes from. I would bet that if the software running the shipping platform for this company falls over, it would lose more money over the course of a few hours then it would cost them to license Gemstone for an entire year.

Here’s another example where JP Morgan has a system built on top of Gemstone that they can not afford to shut down or migrate to another language because it would cost them too much money.

How is being exposed to the toolset that powers things like that going to be a bad thing?

Sure, it’s closed source, but if enough people use it and benefit from it then the community will just do what we always do:

Some of us will pay for it, some of will find clever ways to subvert the license, and the rest of us will get to work on building an open source clone of it.

That’s what always happens, and when it does happen some people will continue buying the closed source supported version (Oracle) and others will move to the free version (MySql).

What makes anyone think that something different is going to happen here?

The Even Bigger News About Maglev

I’m not at Railsconf this year, but before he left I asked my coworker Krishna to beg for, borrow, or steal a copy of the Maglev alpha code and bring it back to the office. Unfortunately, it looks like that’s not going to happen (in an email he says “They don’t have anything to share at the moment”), damn it.

Still, as Obie says, this is a huge deal. Even without the stated performance improvements that they’re already seeing (I’m hearing 5x to 100x in microbenchmarks vs the MRI), it would still be a huge deal, because this might be our best chance ever to move people to a real object database. And not just any object database, but one of the best object databases out there.

Once you use it, you won’t ever want to go back.

As far as I’m concerned though, the bigger news about this is that the Maglev VM “does retain the ability to run Smalltalk code.” As long time readers of this blog know, I’m a big fan of Smalltalk and the Seaside framework, and being able to start a project in Rails and then use the same data to build a Seaside app will knock down another huge barrier as far as getting people to try Seaside goes, (see my my post from a year and a half ago about sneaking Smalltalk in through the Ruby backdoor).

In my experience, Seaside makes writing web applications faster and easier than even Rails does.

Paul Graham is well known for saying that their secret weapon while developing Viaweb was Lisp, because it let them develop software faster than any of their competitors.

Ruby + Smalltalk + Gemstone is your secret nuclear weapon.

Not only will it let you develop software faster than any of your competitors, it will also let you scale that software in an easier manner than ever before.

Apple OS Upgrades Need Decent Release Notes (Ruby Broken in 10.5.3)

I’ve been dead in the water all day here because Apple changed something in the underlying Socket/Networking implementation in Mac OS X 10.5.3 and now Ruby doesn’t correctly handle sockets. I’ve been looking at it, but haven’t figured it out so far.

My thread on ruby-talk is here http://www.ruby-forum.com/topic/154556 if anyone wants to weigh in on it.

I’m assuming something has to be patched into getaddrinfo.c in the ruby distribution, but my C is more than a little rusty, so it’s slow moving for now.

Really, how hard is it release a document along with an OS upgrade explaining the low level changes made. Isn’t that what we have the Apple Developer Connection for?

Should I Care If You Use Ruby (or Any Other Language For That Matter)?

It seems like every time I post something bad about a programming language, or compare one language (A) to another (B), at least one commenter lets me know that they like language B better, and furthermore, some aspect of my post has convinced them that language A is so bad that they won’t even try it anymore.

The thing is, I don’t care.

I’m not a consultant anymore. I’m not trying to sell you anything (unless you need drug discovery software). I’m no longer actively involved in open source community. If you don’t want to ever try Ruby (or Smalltalk, or Python, or whatever) it really doesn’t matter to me.

When I point out something about a language, I’m just doing it because I genuinely think that it is better than something else.

So how do I really feel about languages?

Well, over the last couple of months I’ve written code in Ruby, Smalltalk, Javascript, Python (if you haven’t read Programming Collective Intelligence you should), Java, and even PHP (SearchMonkey is seriously cool, if you haven’t checked it out).

So what language do I think that you should program in?

All of the above, and as many more as possible.

Learn about functional programming. And iterator methods. And closures And continuations.

Even more importantly (from my selfish point of view), learn about things that other programming languages can do that I don’t know about.

Then hopefully someday we’ll be able to have a discussion about programming languages without resorting to pointless statements like “I still prefer braces over keywords for blocks” and instead we’ll get comments that we can all learn something from.

Ruby is a Playground, PHP is a Factory

While reading yet another article on why PHP Sucks (today’s witty twist, “but It Doesn’t Matter”) I realized yet another reason that I’m glad to be programming in Ruby.

Ruby, to me, is like a big open playground, while languages like PHP remind me of big industrial factories. I don’t think that any of us would argue that industrial factories are more efficient for most things, but they also suck the creativity and life out of the people working in them.

For instance, why would you ever want to write code like this:

class DescribeNewBowlingGame extends PHPSpec_Context
{
    private $_bowling = null;
    public function before()
    {
        $this->_bowling = new Bowling;
    }

    public function itShouldScore0ForGutterGame()
    {
        for ($i=1; $i<=20; $i++) {
            $this->_bowling->hit(0); // someone is really bad at bowling!
        }       $this->spec($this->_bowling->score)->should->equal(0);
    }

}

when instead you can write this:

describe Bowling do
  before(:each) do
    @bowling = Bowling.new
  end

  it "should score 0 for gutter game" do
    20.times { @bowling.hit(0) }
    @bowling.score.should == 0
  end
end

You wouldn’t. The first case is, at best, a bastard representation of the second case.

Of course, being out on the playground means that people get hit in the face with a ball once in a while, and everything isn’t as neatly laid out for you as it is in a factory, but you also have the option to be creative, and not just do things like everyone else does.

And, sure, the playground is far more full of assholes than the factory, but these assholes are also more creative and entertaining to work with than people who just put widgets in place in a factory.

Plus the playground has that weird kid in the corner who’s doing something totally crazy, but that just might be a genius, and if you get enough of these kids together, you’re going to produce something that’s much cooler and more creative than anything that gets built in a factory.

So you can talk all you want about big boring websites being written in PHP (or Java, etc).

As for me, I’ll keep working in a language that encourages people to be creative.