17 May 2011

Pypy on Project Euler

Today, I ran some tests with pypy and my few Project Euler solutions:
Solution Python 2.6.6 PyPy 1.5 Factor
7 9.57s 1.92s 4.98
7_b 0.52s 0.14s 3.71
9 0.51s 0.10s 5.1
14 6.70s 6.97s 0.96
25 1.25s 0.68s 1.83
I guess the main message to take home is (see especially 7 and 7_b): a good algorithm is way more important then the interpreter, but if you can choose (e.g. you don't need numpy), then why not use PyPy and gain some speed?

10 May 2011

Latex sucks

Maybe I should not write blog posts when I'm angry about something... but anyway:


Today was another wasted day, mostly caused by Latex. To sum it up: Although there is no real alternative to Latex, and I will therefore continue to use it in the future: IT SUCKS!

Consider the following problem:
I want no pagenumbers on all pages from the first, until after the list-of-tables.
If Latex would be sensibly designed, somthing like the following would work:

\pagestyle{empty}
\maketitle
\tableofcontents 
\listoffigures 
\listoftables
\pagestyle{headings}

But it doesn't! Some pages still have pagenumbers! This is what is necessary to remove ALL pagenumbers.
\usepackage{scrpage2}
[...]
\clearpage
\pagestyle{empty}
\renewcommand*{\chapterpagestyle}{empty}
\maketitle
\tableofcontents 
\listoffigures 
\listoftables
\addtocontents{toc}{\protect\thispagestyle{empty}}
\addtocontents{lof}{\protect\thispagestyle{empty}}
\addtocontents{lot}{\protect\thispagestyle{empty}}
\clearpage
\pagestyle{headings}
\renewcommand*{\chapterpagestyle}{plain} 


And then run latex several times ...
That is too much voodoo!



11 Feb. 2011

Nokia and Microsoft

Nokia and Microsoft: "There are other mobile ecosystems. We will disrupt them."

Time to say goodby to Nokia phones and "hello!" to android (and hope for Ubuntu on smartphones...)

UPDATE: well, that is a good start: Ubuntu for phones... Let's hope that some mobile manufacturor picks it up!