Politics

The Democratic Surge

Here are some more statistic supporting my previous post that Republicans are toast. The turnout in Democratic primaries has been phenominal:
From The Democratic Party :

– Turnout increases ranged from 18 percent in Arkansas to an astronomical 2,549 percent in Kansas.
– In contrast, comparing 2008 Republican turnout to the last contested Republican primary in 2000, Republican turnout either stayed relatively stagnant or decreased. Sinking turnout throughout the country for Republicans shows the contrast between Democrats and Republicans this primary season.
– In fact, for the 30 states for which comparable data is available, 27 of them saw more Democratic than Republican voters this year.

And even though John McCain is the presumptive Republican nominee, one quarter of Republicans voted for a candidate not even in the race anymore:

As Democrats continue to see unprecedented enthusiasm for our candidates, the
news continues to be worrisome for John McCain. Even after locking up the
Republican nomination, 27 percent of Republican voters voted for another
Republican candidate in North Carolina, and 23 percent of Republican voters
voted for another Republican candidate in Indiana. [abcnews.com, accessed
5/7/08]

Technology

What’s New in Qt? — Trolltech

Someday, I’ll get back to using Qt in my professional existance. That and the iPhone. Anyway, webkit looks like a great addition.
What’s New in Qt?

Incorporate online content and services such as maps, music stores and instant messaging into your native applications. Qt now integrates with WebKit, the open source browser engine inside Apple’s Safari browser, the Apple iPhone and millions of Nokia smartphones. The integration allows developers to blend web and native content and functionality, create innovative user interfaces, and deliver a consistent, web-enriched user

Technology

Mercurial and darcs for distributed version control

In my work world, I use clearcase for doing version control. At NYSE, we used a flexible but complex model of several vobs for shared pieces, major branches for specific versions (.e.g. product.11), minor branches (product.11.03) and each developer creating one or more further branches as needed (product.11.03.4538). Lots of merging going on. It took a while to get used to but it works well.
At Credit Suisse, we have a much simpler model for clearcase where everyone creates a local branch off the main view and when they are ready just commits that. It freaks me out but it works.
On my personal projects, I’ve been evolving over the years. Many years ago, I
used RCS.
I thought CVS was a huge improvement over RCS. Then Subversion held sway over me up until
about a year ago when I started experimenting with more distributed version
control systems.
When I wanted to work with someone else, we both had laptops, were frequently
working without a network connection (commuting by train) and we were doing a
lot of experimental stuff. It made sense to use distributed version control. I
started off with Darcs. The concept is great;
everything works as expected. I had repositories under Linux, Windows, and
MacOS. Tres cool. Darcs got a little annoying with constantly prompting me if
I really wanted to included this. Sure, I used “-a” or answered “a” a lot
(accept all changes), but it was frustrating.
Recently, I decided to try Mercurial and I’m totally impressed. I’m not to far into my evaluation but the first few things work like I expect.

  1. Creating a new repository and importing all the changes from darcs worked like a charm
  2. Creating repositories on several machines via ssh works well.
  3. Simple changes and updates is intuitive
  4. Performance is great

More info

Here are some other articles

Technology

Software Design Thoughts

Constructors should be simple, predictable, and never fail.

Simple

Keep your constructors simple in the sense that:

  • Few parameters. Ever hear that a “function should do one thing and do it
    well”? It applies to constructors, too.
  • Few overrides. Don’t try to get around the previous dictum by having a bunch
    of overrides on the constructors. It’s confusing for someone to understand
    the initial state if there are a bunch of initial states.
  • Leave the work to public methods. If you think everything the constructor
    needs to be able to provide the ultimate configuration for an object you are
    trying to control (constrict) some developers too much.

Predictable

We write code like:

int  days = 13;

and don’t expect initialization to be doing very much work. Developers are used to that. Same with:

MyType val = new MyType(arg1, arg2);

should just be doing initialization comparable to assigning that integer. If
you want to have the constructor do a bunch of database work, factor that out
into a separate method:

val.LoadDB();

Many times people with constructor fever think have an underlying mindset that
thinks an object should be completely initialized and everything handled at the
constructor level. If you make every member function “const” then I’d believe
you. Otherwise, it’s just being a control freak.

Never fail

A constructor shouldn’t fail except under the most exceptional of circumstances
(out of memory). Examples of things that are not exceptional: a file doesn’t
exist, a network connection doesn’t succeed, input is poorly formatted, etc.

Technology

Ancient history

I’m googling myself and collecting some of the results:

Politics

Republican toast

I keep getting asked by friends where I am on Obama vs. Clinton (I’ll support either one in November). The next immediate question is inevitably aren’t the Democrats divided and isn’t this going to benefit McCain? It’s tough to get across just what a pathetic candidate McCain really is and how badly the republicans are going to do:
Here’s a Frank Rich article that provides a good overview:

The last debate, however dumb, had the most viewers of any so far. The rise in turnout and new voters is all on the Democratic side. Even before its deathbed transfusion of new donations, the Clinton campaign trounced the McCain campaign in fund-raising by 2.5 to 1. (The Obama-McCain ratio is 3 to 1.)
On Tuesday, a Democrat won the first round of a special Congressional election in Mississippi, even though the national G.O.P. outspent the Democrats by more than double and President Bush carried this previously safe Republican district by 25 percentage points in 2004.