I See Dead Code

… as sounding brass, or a tinkling cymbal.

I See Dead Code header image 4

Entries Tagged as 'programming'

Oh my god—it’s full of cores!

May 24th, 2009 · 6 Comments

Beginnings
After the bleak, joyless work of releasing software, plugging holes of preventing users from clicking buttons they should not have clicked in the first place, writing unctuous documentation and release notes and wrapping code into neat little installers with tiny bows and bells that gently tingle when touched, there are few things as profoundly satisfying [...]

[Read more →]

Tags: hardware · lang:en · programming

Scrollable Widgets with PyGTK

May 17th, 2009 · No Comments

It is possible to write custom GTK widgets that have “native” scrolling support, as opposed to just shoving them into a GtkViewPort and forgetting about them.
Apart from having mastered a small coding challenge, as it turned out to be, this also gives you greater control over the scrolling itself, like making sure that certain [...]

[Read more →]

Tags: lang:en · programming · python

The big wheel of commits

January 31st, 2009 · No Comments

Yesterday, I merged the frame semantics branch, which I have been working on for my MSc thesis, into my personal repository. Since such a grave step always demands introspection, I looked at all 513 commits I ever to to the TreeAligner repository and created a little statistic on commit times.
The picture contains a 24h [...]

[Read more →]

Tags: lang:en · programming · treealigner

KONVENS ‘08

June 22nd, 2008 · 3 Comments

Just this week, our paper „Extending the TIGER Query Language with Universal Quantification” for KONVENS ‘08 has been accepted. The abstract:

The query language in TIGERSearch is limited due to its lack of universal quantification. This restriction makes it impossible to ask simple queries like „Find sentences that do not include a certain word”. [...]

[Read more →]

Tags: programming · treealigner

I have no life and I must program

May 31st, 2008 · No Comments

Some participants of this semester’s „Computational Linguistics” course (which is a code word for „10 different lecturers guide you through the wonderful world of algorithms and theoretical foundations of CoLi”) obviously lack a life and willfully extended their own homework assignment, writing small toolkits for finite state automata.
Surprisingly, all those toolkits were written in Python [...]

[Read more →]

Tags: coli · lang:en · programming · python

Look at me, I know Functional Programming!

May 5th, 2008 · 1 Comment

Sometimes I wonder what the hell I might have been thinking while writing code like this1 :

1
2
3
4
5
6
7
def uncurry(f):
return lambda t: f(*t)
 
def longest_common_prefix(Sa, Sb):
return len(list(
takewhile(uncurry(eq),
[...]

[Read more →]

Tags: lang:en · programming · python

GMM Code

March 13th, 2008 · No Comments

For one of the exercises, we had to implement the EM algorithm for Gaussian Mixture Models. I’ve spent a considerable amount of time on my solutions, either because I wanted to learn a new language (Scala version) or I wanted to not forgot an old one (C++ version), so I don’t want the code simply [...]

[Read more →]

Tags: coli · lang:en · programming

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