.NET Productivity Sucks

I am being deliberately provocative in my headline, but a co-worker and I were commenting to each other that we felt that we were becoming less productive in .NET. On the whole, we do not think it is our fault.

Our current project uses the Prism framework. Only one member of our team can claim to be extremely versatile using this framework – the promise is that it allows developers to build applications that are easier to maintain.

Some members of the team are on a learning curve, but it seems to be a challenge for them. I experience the same thing a year ago on another project that was using Model-View-Presenter. In theory, the benefits are clear. In practice, not so clear yet. I find that I spend a lot of time learning and/or teaching, and I wonder what it will be like when we add new or different developers to the team.

I get tired of type errors in .NET – I have felt for a long time that the compiler is trying to protect me from making errors I would never make. But, I do not have have anything coherent to say about that right now. I just want to cite an interesting article that states that developers are more productive using Django than they are using .NET.

I have nothing to add – just want to say: I am feeling less productive in .NET than I used to. I like Python – I used it on a project over the summer. It felt great to deliver working code every day. Is it just me?

Installing VMWare Player 3.1 on Ubuntu 10.10

VMWarePatchI recently upgraded to the latest and greatest version of Ubuntu (10.10 – also known as Maverick Meerkat). All is well.

One of the keys to the way I use my computer(s) is that I usually store my data and programs separately. I can switch to a new operating system, or a new install at the drop of a hat. When I am working on a project, especially for a client, I often setup a virtual machine using VMware that I dedicate to the project. So . . . I need VMWare to work.

In the past, I have found it a problem to install VMWare on Ubuntu. In fact, it has just become easier to use the VMWare player rather than a full install of the server product. However, this time I had a problem.

However, I found a solution very quickly, I am posting it here for you edification. This worked for me. I don’t really care why it worked. Somebody should work to ensure that VMWare and Ubuntu play well together – they need each other. Some counselling perhaps?

Syllables Matter

The Natural Language Toolkit

The software I am writing for Dr. Kelly calculates a Flesch-Kincaid grade level for every assignment he grades. The formula is straight forward enough.

However, I was surprised to find that different implementations of this formula diverge dramatically from each other. The same text can have wildly different grade levels depending on the software you use.

For example, Microsoft word says that this blog entry reads at the grade 7  level, but another implementation says that it reads at a grade 9 level. Who is right? How does this happen?

It turns out that writing code to count the syllables in a word is not an easy thing. Early this summer, I tried to use the natural language toolkit to count the syllables in a word, but the code did not work. I threw the problem into the too-hard-basket for a while, and came back to it last week. A new version has been posted, and it works. It was patched by Alex Rudnick.

Here are two lines of code that show you how easy it is to count syllables in a word using the NLTK:

>>> from nltk_contrib.readability.textanalyzer import syllables_en
>>> print syllables_en.count("hello")

If you get the latest version of nltk_contrib, you will have no problems. However, I did find one small problem. This code insists that the word ‘the’ has zero syllables. The fix was easy enough, but I am not sure this how the maintainers would fix it:

Edit the file called syllables_en.py. It contains a list of so-called special syllables called specialSyllables_en. Add ‘the’ to the list, and specify that it has one syllable.

It is easy to see how this list works. For example “Mr.” has two syllables, but there is no easy way to figure out that “Mr.” is pronounced as “mister.” I may find other exceptions as I go.

However, having fussed with code, and having downloaded the latest version, I am pleased to report that the flesch-kincaid score I generate matches the score that is generated by Microsoft Word. My syllable count is correct, and the rest just follows.

My code will probably never agree perfectly with the score that is generated with Microsoft Word. It turns out that some English words are pronounced with a different number of syllables by English speakers from different parts of the world. Also, the code in the natural language toolkit is sometimes wrong. For example, it says that the word ‘calculates’ has four syllables. However, it is close enough in a great majority of cases. You should give it a try.

« Previous Entries Next Entries »