SourceForge replaces part of its platform with hosted applications

As project administrator for a couple of SourceForge projects I recently received an e-mail about the upcoming deprecation of multiple applications that are part of the SourceForge platform:

The following applications are due to be deprecated, replaced by
high-quality Open Source applications we have in our Hosted Apps offering:

  • TaskManager will be replaced by TaskFreak!, dotProject and Trac (tickets).
  • DocManager will be replaced by MediaWiki and Trac (wiki).
  • Discussion Forums will be replaced by phpBB.
  • Diary and Notes will be replaced by WordPress.

The C++ cut is the deepest

When you hear me speaking about C++,  you probably notice the passion. I might expose a similar passion when I pinpoint some of Java’s weaknesses. Maybe I do sound like “Dick” in the article Java is Slow! at The Daily WTF?

From GW-BASIC on my first computer I went through QBasic, QuickBasic, QuickC and Turbo C++ until “reaching” Visual C++ in high school. It is more than 10 years since I wrote CalcEm, the first Open Source emulator for Texas Instruments calculators TI-82 and TI-83. It is hopelessly outdated now, but it was a great achievement for me at the time. (I’m actually sitll proud; the last CalcEm version is ranked as 102 on the all-time top downloads list at with 43556 downloads.)

Maybe C++ entered at a sensitive point of my life? When learning Java at the university it only felt crippled when I already knew C++, so I only used Java when I had to and C++ (as in g++) when I got to choose. Sometimes the choice was bad, but it was about learning after all. I remember that our Kalah C++ implementation ruled the competition!

C++ made me feel in control! I never felt as much in control when using Java, and I still don’t. But I’ve learned not to demand so much control.

My friends may have heard me dreaming of working at Tandberg. I don’t languish for ThoughtWorks so much these days. (They do have Martin Fowler, but they also use Lotus Notes. Go figure.)

This is why I never applied for a job at UIQ. I like C++ so much that I cold not stand the horrible subset of C++ that Symbian has inherited from Psion. Instead I got stuck with a stone-age C++ compiler on Tru64. But I got away and now I’m your Java man!

Just let me do a little PHP, Python, Ruby, Scala or Groovy too! And wouldn’t C++ be great for something? 🙂

Network printer power-on when needed

My FreeBSD server is now equipped with a TellStick for control of 433.92 Mhz wireless remote switches. Our home is not (yet 🙂 fully controlled by remote switches but we have a few of them now. One of the features I wanted was to control some lights but for some reason the TellStick in the server closet does not reach one of the remote switches so I might get an extender for that later on.

Something that seems to work very well is remote control of a 230V fan (actually an old dual-fan PSU, but it’s a temporary solution) in the server closet. The server closet is next to our bedroom so in order to get rid of some noise at night I now use the TellStick to turn off the fan at 22:00 and start it again at 8:00.

The hack that this blog post is about is meant to power-on my networked HP LaserJet 2200 on demand.  We seldom print everyday so it’s rather pointless to have the printer on all the time. I implemented this solution for fun and I’m not sure that I’m going to keep it.

I thought for a while about how to detect when any computer on the network was trying to print, and I decided to try to listen for ARP who-has requests. This is (almost) the script I use:

/usr/sbin/tcpdump -i em0 -q -l -n arp dst host 2>/dev/null |
while read line; do
  /home/david/bin/ 1 > /dev/null 2>&1

As you might deduce from the script it will try to turn on the printer for every ARP request for the printer IP address. This will cause more power-on signals to be sent than necessary, but I call that a feature! 🙂

The script looks like this:

`dirname $0`/ D 2 $1

And this is the script:

/usr/local/bin/sudo `dirname $0`/rfcmd LIBUSB NEXA $1 $2 $3

Rfcmd is a command line tool for interfacing with the TellStick. I run it as root and I use libusb for the USB support.

A future improvement could be to turn off the printer after it’s been unused for a certain time, but now I simply call to turn it off at midnight.

I don’t know if it is bad for the printer to cut the power but it already has a serious smear issue so I’ll only keep it until the toner runs out and then buy a new printer. Brand new networked laser printers with duplex start at €200 here in .se so it shouldn’t be too expensive to get one with good Linux support when the time comes.

Looking at Scala and Groovy

When people and companies realize what a dead end Java has gotten into, I want to be prepared for the alternatives. Java will become the dinosaur language like COBOL, but it will not be replaced by a single programming language but with a mix of languages. Several of these languages will, for many reasons, run on the JVM. As I see it, the most promising languages on the JVM today are:

  • Scala
  • Groovy
  • JRuby (Ruby implementation)
  • Jython (Python implementation)
  • Clojure

I have tried some of the LISP-ish Clojure with the aid of a colleague, but it is too esoteric for me. Python and Ruby are nice but “only” new implementations of existing languages. Groovy code can be pretty similar to Java, but it is more “dynamic” and it has closures! (Thanks to the appropriate deity here!)

Scala is described as a “general-purpose, object-oriented, functional language for the JVM”. The hybrid of object-orientation and functional programming is likely to be an advantage for Scala as it is possible for people with little experience with functional programming (like me) to approach it little by little.

In order to give Groovy and Scala a closer look I’ve bought Programming Groovy, by Venkat Subramaniam, and Programming in Scala by Martin Odersky, Lex Spoon, and Bill Venners. The latter book comes from Artima, who also provide Scala articles such as Twitter on Scala, How Scala Changed My Programming Style and The Origins of Scala.

A few months ago I wrote a Groovy script that copied bug reports from Trac to Mantis, using Groovy XMLPC to connect to the Trac XML-RPC Plugin and GroovyWS to connect to the SOAP interface for Mantis. The implementation is a topic for a future blog and the code is a bit crappy as it was both a learning experience and a throwaway tool.

Hopefully some small project will turn up so I can try out Scala soon.

Make Developers’ Lives Better

The Pragmatic Programmers has a spin-off called Pragmatic Life. It made me think about the books I have acquired that are more about life than about programming:

  • The Seven Habits of Highly Effective People, by Stephen R. W. Covey
  • Pragmatic Thinking and Learning: Refactor Your Wetware, by Andy Hunt
  • Getting Things Done, by David Allen

I’m also thinking of ordering the The Passionate Programmer, by Chad Fowler, when it becomes available…

Some personal reflections on the above books:

The Seven Habits Highly Effective People

I’ve read the  whole book once and begun studying the chapter about the first principle (Be Proactive) in more detail. These principles seem really hard to turn into habits, but it sounds good!

Pragmatic Thinking and Learning: Refactor Your Wetware

A smörgåsbord of things to do to make better use of your brains! I’ve read it but I cheated by not stopping to do the exercises when told to, so I’m about to read it more “deliberately” and do the exercises.

Getting Things Done

My wife bought us this book in Swedish (called Få det gjort! : svart bälte i vardagseffektivitet) but neither of us has started reading it yet. I expect it to be a great book, and I’m very pleased that my wife bought it without any hints from me. (I readily accept that it can be seen as a hint to me to get more things done!)

The Passionate Programmer

The previous incarnation of this book was called My Job Went to India: 52 Ways To Save Your Job and that didn’t appeal at all to me. Now it sounds really interesting but I will probably not have finished the books above when it is released, so I have no idea when I can get some quality time with this one.

libspotify – the official Spotify library!

Spotify opens its doors to developers and releases libspotify. Nice!

The C API and examples look very clean. It’s even possible to play songs through the API and I guess that’s much more than anyone expected. Some might complain that the library is binary-only for Linux on IA-32 but I won’t…

If I had a premium account I would probably spend a lot of time toying with their API the next few days!

It would be perfect for the never-gonna-happen project with a car computer connecting to AUX or CD changer input on the car stereo. The car computer could be based on an ALIX board, run Linux from Compact Flash and use an USB-based mobile broadband to download songs.

Recommended reading: “The Book Of JOSH: Scala In The Enterprise”

The Grey Lens Man sure can put the truths about Java in writing. In his article The Book Of JOSH: Scala In The Enterprise he provides a few clearsighted truths about Java before describing the cornerstones of his new architecture: JSON, OSGi, HTTP and Scala (JOSH)

I’m almost touched to tears when recognizing truths like this one:

Java is the Brier Rabbit of IT. Once touched you can’t let go. Its simplistic enough to be inadequate in almost every situation. The commercial world just loves this aspect of Java as they exploit revenue streams from filling these gaps via endless Frameworks, Patterns, APIs, Annotations, IDEs and Toolsets.

The dirty secret of course is 25 – 50% of all of it is pure overhead, without direct value, but necessary to overcome the inherent limitations of Java.

On the other hand, the upside of Java for enterprise IT is pretty obvious. Any problem you might have can be solved with money and armies of plug and play bodies and you get mountains of buzz material for those presentations.

You simply can’t deny that he is right in writing:

… if you seen the proposed syntax for closures, well its readily apparent, Java’s elastic modulus has been exceeded. A crippled language has been fast marched evolved into a broken language.

Fortunately there is light at the end of the tunnel:

But bottom line, enterprise Java developers can transition to Scala. I know this, because I’ve directly observed it.

Give me a JOSH project to work on, now!

Open Source client for Spotify

I think they should have avoided “spotify” in the name of the software, and I haven’t tried it yet, but Despotify seems cool!

Update I noticed that the domain name seems to be registered by Per Gottfrid Svartholm Warg, known for his involvement in the famous Bittorrent site The Pirate Bay…