I See Dead Code

… as sounding brass, or a tinkling cymbal.

I See Dead Code header image 4

Entries Tagged as 'lang:en'

Rescuing Generics

January 12th, 2008 · 1 Comment

This is the first part in what is planned to be a loosely-coupled series of articles on current developments in mainstream programming languages.
Topics include:

Evolution of Java
New abstractions in programming languages
The functional turn
Scala: „The next programming language™”

Generics in Java
When I started to program Java 5 professionally after some years of blissful absence from the Java world, [...]

[Read more →]

Tags: java · lang:en · programming

Random Python unittesting snippet #1

December 18th, 2007 · No Comments

A small context manager for stating assertions about exceptions in Python unit tests:

@contextmanager
def assert_raises(*exc_types):
"""A context to ensure that an exception of a given type is thrown.
 
Instead of
 
@nose.tools.raises(ValueError)
def test_that_raises():
# … lengthy setup
[...]

[Read more →]

Tags: lang:en · programming · python

Stockholm TreeAligner 0.8 „Gamla Stan” released

December 13th, 2007 · No Comments

It’s only a couple of months late, but we’ve just released a new version of the Stockholm TreeAligner to an awed audience. This release features the prototype implementations of TIGERSearch and alignment queries, which will be perfected in the next release, due in March 2008.
For those who are wondering what kind of code name Gamla [...]

[Read more →]

Tags: coli · lang:en · programming · python · treealigner

Truth itself

December 8th, 2007 · No Comments

As is the way with Python, it turns out that you can create the start of something useful in less that fifty lines of code.↪
I simply cannot confirm often enough how true that is.

[Read more →]

Tags: lang:en · python

I have two cores, where’s my free lunch?

August 26th, 2007 · No Comments

I have tried to optimize the TigerXML parser in STA [↪] a bit, the results (graphs are stored in memory, with a 55 MiB corpus, on my Core 2 Duo 2.2GHz):

unoptimized: 61.01s
optimized: 39.68s

That still seemed a bit too slow to me, and I decided to try out some parallelization: since the ID reference remapping and [...]

[Read more →]

Tags: lang:en · programming · python · tech

Packaging in the rain

June 13th, 2007 · No Comments

Turns out that leaving work early and biking home really fast was one of today’s better ideas. Soon after I got home and had finished showering, it started to rain heavily. Normally, I would have been somewhere along the Isar at that time. This way, I could enjoy the cool brought by the rain inside.
I [...]

[Read more →]

Tags: debian · lang:en · programming

Code Grabbing

May 31st, 2007 · No Comments

On my last day on the old project, I just ran some statistics over the code. Over nine months, I’ve touched 494 of 513 source files in our project at least once, which is 96.3%. All the automatic refactorings in Eclipse have made this all too easy.

[Read more →]

Tags: lang:en · programming · work

XML parsers? But I know regular expressions…

May 31st, 2007 · No Comments

Dear Wordpress Developers, I won’t even explain to you what is wrong with this statement above.
CDATA and Doubly-Escaped Entities
So let’s see. In theory, the XML snippets
<bla><![CDATA[&auml;]]></bla>
and
<bla>&amp;auml;</bla>
represent the same DOM tree.
In order to see that this is actually true, one can use the Swiss Army Knife of XML handling, xmllint, to convert an XML file to [...]

[Read more →]

Tags: lang:en · programming · rant

Stockholm.py: The Source Files

May 28th, 2007 · No Comments

Having completed the sample solutions for the final exam, the course is now officially complete and the sources for all slides, exercise sheets and example programs as well as sample solutions for all exercises can be downloaded. I plan to give another course like that in the future, but in the meantime somebody else might [...]

[Read more →]

Tags: lang:en · programming · python

Sweden 2007, Part 7/7: Stockholm.py II

May 20th, 2007 · 4 Comments

This entry collects some of the remarkable things that happened to us during the course. In honor of the course language, this blog entry is in English.
Meeting Old Friends
On Tuesday, after finishing all preparations, we spontaneously decided to visit Lappis and see if any of Torsten’s former co-residents lived in Forskarbacken 12. Both [...]

[Read more →]

Tags: lang:en · sweden