Dvorak keyboard layout – the february challenge

February 1st, 2010

So this is the first of my monthly challenges.

I’m a pretty good typer on a normal QWERTY keyboard (numbers later). Many people are faster and more than those are slower. I don’t really need the ability to type faster, so learning the Dvorak layout and using it comes from a number of other reasons:

  1. I’m spending less and less time on actual geeky stuff. Soon(ish) my Computer Science degree will be earned and I need something that will tell people I’m still a geek at heart. And preferable not my looks :)
  2. I hate the fact that QWERTY has invented to slow people down. Where were the germans when we got rit of the actual type writer arms. They should have been on the front making sure QWERTY died.
  3. I don’t like people using my computer. Hopefully they will select another one at the office.

Number 3 is of cause not an actual problem, but a 2 bullet list is just to short. I’ll try to speed test my Dvorak typing each day in the month and put it into a nice graph. I speed tested my querty speed on speedtest.10-fast-fingers.com, and completed with 332 points, 81 words per minute, 440 chars a minute and 0 errors.

Introducing standalone and bundle products on pagegangster.com

January 26th, 2010

Big updates on pagegangster.com. We introduced the standalone product so people can download the entire e-catalogue and put it on a CD, their own webserver, an USB stick or whatever they want. We’re really excited about this launch, so go check out the new website and products. We also made a number of other changes making it possible to purchase a number of activations directly in the system. This is really good news for the customers looking for mass discounts.

Getting slightly technical for a moment, we learned a painful lesson regarding migrating data from one structure to another using the Django ORM. By mistake we tried to update a lot of models one by one. After waiting for over 90 minutes we rewrote that specific data migration in raw SQL and completed it in 3 minutes. I love the ORM but you have to be careful.

Seeing this update from a Django developers point of view the best news is that we’re not using wordpress for drive our main website. We can now concentrate on making the more hard core backend stuff. And besides some cache trouble it’s hard to beat wordpress in the usability game.

All comments are very welcome. Just comment here or send an email to info (at) pagegangster.com.

Introducing pupyMPI

January 25th, 2010

Jan, Frederik and I just released the first – somewhat stable – version of pupyMPI, a 100% pyre python implementation of the MPI standard. Or, as close to the standard as we saw fit.

Most python-mpi projects are bindings to some C implementation which gives a lot of strengths. It runs very very fast for one thing. So fast you can actually use it for real production if you want. In our opinion it’s not that useful, as most real applications will depend om some further systems and most real clusters will probably only allow you to run your C and FORTRAN stuff. They do however give developers a nice way to develop rapid prototypes, learn and play with MPI. pupyMPI boosts all threes while keeping the system to close to regular MPI, you can probably convert to regular MPI if you need the performance.

A quick example

Just to show how fast you can actually implementing programs in pupyMPI here is a quick example of a distributed program. It does a monte carlo pi simulation with some user defined number of simulations:

#!/usr/bin/python/

from mpi import MPI
import sys
from random import random
from math import sqrt

mpi = MPI()
world = mpi.MPI_COMM_WORLD
rank = world.rank()

try:
    simulations = int(sys.argv[1])
except:
    simulations = 1000000

per_rank = simulations / world.size()

hits = 0

for i in xrange(per_rank):
    # Simulate a part hitting inside the unity circle.
    x = random()
    y = random()

    if sqrt(x*x+y*y) < 1.0:
        hits+=1

# Gather the sum of hits from each process at the process
# with rank 0
total_hits = world.reduce(hits, sum, root=0)

if rank == 0:
    pi = float(total_hits)*4 / simulations
    print "Estimating PI on %d nodes through %d simulations yield %f"
         % (world.size(), simulations, pi)

mpi.finalize()

The output of several runs given below:

$ mpirun.py -c 2 monte_carlo_pi.py -- 1000
Estimating PI on 2 nodes through 1000 simulations yield 3.184000

$ mpirun.py -c 4 monte_carlo_pi.py -- 10000
Estimating PI on 4 nodes through 10000 simulations yield 3.135200

$ mpirun.py -c 8 monte_carlo_pi.py -- 100000
Estimating PI on 8 nodes through 100000 simulations yield 3.136560

$ mpirun.py -c 10 monte_carlo_pi.py -- 1000000
Estimating PI on 10 nodes through 1000000 simulations yield 3.144464

$ mpirun.py -c 10 monte_carlo_pi.py -- 10000000
Estimating PI on 10 nodes through 10000000 simulations yield 3.141069

$ mpirun.py -c 10 monte_carlo_pi.py -- 100000000
Estimating PI on 10 nodes through 100000000 simulations yield 3.141677

The above example have very little communication involved other than the final exchange of hits. We implemented a lot of different communication operations as you can see in the online documentation.

Performance

Don't expect much, as a pupyMPI program will normally run 15-20 times slower than the C equivalent. But hopefully it will prove a fine educational tool and maybe also be used for fast prototyping. If we get the time (and credit at school) we'll performance tune it to get within a factor 10 of the C version.

Personal development a month at a time

January 20th, 2010

I saw somebody else doing it, and it seems like a cool idea to try some new things and ideas you wouldn’t normally try. So starting from feb 2010 I’ll change my live somehow that will affect my day-to-day routine. The about 2 people reading this blog is very welcome to pitch ideas.

DoubleGreen.dk… how hosting should be

August 25th, 2009

I love the thought of people building a business based on doing something good, and doublegreen.dk is just such a business. CO2 negative hosting environments for Danish customers might not be the largest scale project, but it’s a step on the way. It’s just like voting… your vote means something so small / medium scale environmental goodies also matters. It’s not just up to the big companies to make the changes, all though that would also be much appreciated.

So all your people with one and dandomain.. move.. the sooner the better.