17Feb/101

Parallelism and Abstraction in Java

Here's an interesting parallel programming interview with Intel's Paul Guermonprez covering threads, JSR166y, and Hadoop. I particularly enjoyed the Hadoop discussion at the end.

The discussion focused on efforts to separate Java programming from the nitty gritty details of threads. This separation allows a greater number of developers to successfully program for parallel environment by removing focus on the technical details, and thus reducing the knowledge required to write the code. There's also some coverage of the benefits of the higher level of abstraction of functional programming and how the functional programming style is being incorporated into the Java concurrency model. The text has this:

The future will be functional programming or won't be at all.

Intellectually, I applaud these efforts. Emotionally, I feel some loss.

My first introduction to threads was in a systems programming class, using the C language and Pthreads library. Pthreads blew my mind, or maybe it was lack of quality in the lectures. Either way, determined not to be defeated by Pthreads, I went out and bought a stack of books on Pthreads and threads in general and set out to wrap my mind around threads. It worked, but along the way, I learned that I loved the challenge and so I embraced concurrency and parallelism with much enthusiasm. This knowledge that I've accumulated will always be of great value, but as I move toward programming threads at further and further abstractions, I'll lose that close connection to the internals, and I'm a little saddened by that.

Filed under: Java 1 Comment
16Feb/100

Martin Odersky and Josh Suereth at Scala BASE Tonight

I'm looking forward to a Scala BASE meeting tonight that is headlined by Martin Odersky and Josh Suereth.

From the announcement email:

Professor Martin Odersky is the director of the LAMP group at EPFL, the creator of the Scala programming language, and author of Programming in Scala.

Josh Suereth hosted the first Scala Lift Off East in Reston, VA and has been involved with lots of Scala projects including scala-tools.org, scala-arm, scala-io, scala-jigsaw, and scala-lolz.

Filed under: Scala No Comments
25Apr/092

Scala Cheat Sheet Created

I started teaching myself Scala this week because I want to speed up coding of new projects without sacrificing quality, readability, reliability and performance. Scala seems like a good choice for this. I've also been interested in learning more about functional programming, and exploring the concurrency benefits that functional programming can bring to the table.

I've read halfway through a book on Erlang , another functional programming language, and am finding many similarities to Scala. (That book, BTW, "Programming Erlang: Software for a Concurrent World", by Joe Armstrong , is an excellent book and I highly recommend it.)

So far, I'm liking Scala a lot. It's comfortable because of it's close ties to Java and the fact that it runs in the JVM. It's also compatible with much of the Java code I've written in my life, so that's a huge plus!

My only complaint at this point is with the documentation I've found. There's a lot of great online documentation, but the quick start articles I've read thus far seem to skip all over the place and leave a lot out, so I find myself flipping from one to the other trying to make sense of what I'm reading. It would be a lot easier if I had a concise reference to glance at.

Scala Cheat SheetI decided that what's needed is a cheat sheet (pdf), but then couldn't find one, and because necessity is the mother of invention, I've written my own.

Now beware, this cheat sheet was created by a newborn 3-day old Scala programmer, so there may be a lot of corrections needed, and I'm certain it needs more information added to it, but I think this is good enough to start with for a quick start guide.

[Update: I've made several improvements and added a version number that I'll increment every time I update it.]


References for the quick start cheat sheet:

The Busy Developers' Guide to Scala series:

Scala Reference Manuals:

"Scala for Java programmers", A. Sundararajan's Weblog, blogs.sun.com

Filed under: Scala 2 Comments
15Jan/090

Dependency Injection and Inversion of Control

I've been reading quite a few blog posts on dependency injection recently. I don't know why that's suddenly the topic to write about since it's been around for quite a while. I don't have any brilliant new revelations to offer, but just maybe a few thoughts in response to a blog post I read by a Jordan Zimmerman, "Dependency Injection Makes Code Unintelligible"[1].

First, a couple of quick definitions from Wikipedia:

"Inversion of Control, or IoC, is an abstract principle describing an aspect of some software architecture designs in which the flow of control of a system is inverted in comparison to the traditional architecture of software libraries."[2]

"Dependency Injection (DI) in computer programming refers to the process of supplying an external dependency to a software component. It is a specific form of inversion of control where the concern being inverted is the process of obtaining the needed dependency."[3]

The two topics I want to hit on from Jordan's post are testability of code that's been subjected to IoC/DI and, more trivially, the naming of dependency injection.

Filed under: Java Continue reading
4Jan/090

Adobe Flex and Linux

Dear Adobe, Please Support Linux....

I prefer Linux over Windows and have preferred Linux for many years. The notebook computer that I use most of the time is running Ubuntu Linux . Linux has the tools I need. Linux, in particular, has the programming and networking tools that I need. Linux is just simply a superb environment for programming.

Adobe Flex is ActionScript programming. The Adobe Flex Builder, an IDE for building Flex applications, is based on Eclipse. Eclipse is an IDE that runs on many platforms, including Linux. Flash runs just fine on Linux (though Adobe has historically been somewhat slow to keep the Linux version up-to-date). I use Eclipse every day. I use Linux every day. I'm new to Flex, but find it fascinating and want to use Flex Builder.

To sum this up, Linux is an ideal programming platform, the tools required for Flex development (Flash and Eclipse) run happily under Linux independently, so why oh why is the Flex Builder not available for Linux?

I downloaded the trail version of Flex Builder to play around with, but to use it, I'm running VMware and have it installed in a Windows XP VM on my Ubuntu laptop – a painful, excruciating situation. So I ask Adobe to please, please, please let your Flex Builder run on Linux, too.

As soon as Adobe adds Linux support, I promise to be first in line to purchase Flex Builder for Linux.

Filed under: Programming No Comments