Are we Smalltalkers missing the mobile trend?

This might be an interesting detail for all people involved in Smalltalk environments that run on Android and/or iOS. Among the top 10 search terms used in 2012 to find  my blog there were “smalltalk android” and “smalltalk ipad”. And in fact, almost every day I check my blog statistics, and these terms or variations thereof are on the list.

To me, this is a clear indication that people are looking for documentation and possibly ready-made installation packages for either Smalltalk IDEs or deployed applications that are written in Smalltalk. I must admit I have been playing with the idea of writing an application for Android in either Gnu ST or Pharo repeatedly, but never took the time because I couldn’t find much documentation for it. People do deploy Smalltalk appliations on iPhones and Android devices but I haven’t found much material on how they do it. It’s either blindingly obvious for people who are used to writing Android / iOS apps, or the people who managed to do it regard their knowledge as a trade secret. Both are okay with me. I like to have a certain advantage on things I know as well. So I am not going to bash this.  Continue reading

Schauderhaft: Don’t Rewrite Your Application

I’m probably the last to find this excellent piece on Jens Schauder’s Blog called Don’t Rewrite Your Application. It’s not only worth reading, but also thinking about it and memroizing it. There’s almost never a really good reason to rewrite a reasonably-sized business application. The effect will very often be a the loss of a lot of money and probably never an application that is substantially better than the one it replaces:

  1. Whatever you might think of the code base and the developers that created it: They weren’t stupid nor evil. So chances are the results of your work will look just as ugly in two years from now.
  2. You don’t know the requirements: Part of the reason legacy code bases are ugly is that requirements change. There is no reason for you to assume this won’t stop.So chances are the results of your work will look just as ugly in two years from now.
  3. You don’t have the time: As long as the rewrite isn’t done, you’ll need to maintain and probably evolve the current application. If it is of any importance, you can’t ignore it for the months to come. If you can you should do so without wasting your time with a rewrite.

So true. In the Smalltalk world, we’ve seen all sorts of craziness in that field. Some customers spent literally millions of Euros into this lesson. Here’s a possible solution:

Instead of rewriting the application refactor it. Learn to properly estimate the effort needed for implementing new features in a clean way. Add some time to make the code immediately around that new feature a little cleaner as well. Use that as estimate. This way the application will become a little cleaner with every update.

Boy, how right he is!

If you know the requirements of your system, still have some skilled developers on the team and need to move the application further, it’s almost always better to invest in existing know how and the team to improve their skils in techniques like Refactoring, Unit Testing and Code Management. Combined with Continuous Integration you can accomplish several things:

  1. Improve an existing system with new features in little time
  2. Lay the grounds for easier addition of features in the future
  3. Come back to the pace of innovation that your project once  had
  4. Save a lot of money and frustration (and if you are a CTO or in upper management probably even keep your job and feed your family)
  5. (Re-) Motivate some of your most valuable team members who’ve lost their believe in a future of their projects a long time ago (you should NEVER underestimate this aspect!)
  6. Motivate new staff to come to your project as it promises to be fun, effective and respected within your organization (Have you ever heard or said the sentence “we can’t find Smalltalk developers”? – maybe it’s your fault because you scared people away from the project or technology for years for no real reason…)
  7. Surprise your users with new features instead of apologies for not delivering
  8. Have fun!

Sebastian Kübeck on Checking Runtime Dependencies

In his blog post “Dependency Management Beyond Language Boundaries” Sebastian Kübeck describes a problem that is not unique to Java projects, but has had its peeks in it because Java has the privilege of being “mainstream” and thus the testbed for all kinds of “new ideas” to heal the world.

I like his introductory sentence very much because it describes one of my main concerns about how static languages can lead people into dangerous solutions for problems that can be solved much more elegant in dynamic, reflective languages:

In the meantime, Java is quite an old lady in IT terms and had to survive various hype phases which all left their traces in legacy applications. One of them was the XML configuration mania which left us with numerous XML configuration files. This was followed by the Annotation pseudo cure that obfuscated our source codes in such a way that we couldn’t see the source code forest within all those annotation trees.

Annotations and the overuse of external (XML or whatever) files for configurability to the extreme are typical cases of premature flexibilisation that can lead to very high maintenance cost (Did you ever have to debug a Struts application?).  Unfortunately, the Smalltalk world is currently in danger of overusing Method Pragmas, which bear the potential for similar problems like Annotations do in Java. They may be helpful, but they can also lead to practically non-understandable code, where you simply don’t know what’s happening in your system.

The rest of Sebastian’s article shows how it’s possible to check Struts configurations for correctness in unit tests. A good piece of inspiration, not only for Java developers!

What sUnit could learn from jUnit [UPDATE]

The complete family of xxxUnit testing frameworks have their roots in Kent Beck’s sUnit testing Framework for Smalltalk.

While jUnit (the Java flavor) and sUnit were very similar for a long time, jUnit “lately” added a lot of stuff that is helpful in Java, but quite useless in Smalltalk (like Java Annotations), mostly with jUnit Version 4.

There is, however, one difference between sUnit and jUnit that I think should be overcome. I am speaking of the TestFailure Class in jUnit that has not been added to sUnit. I don’t know exactly when the jUnit implementation got TestFailure, but I miss it.

Why do I miss TestFailure? Because its non-existence makes post-testing reporting very hard, unless you write your own TestRunner.

But let’s start from the beginning.

I’ve played with the Hudson Build Server (which will soon be known as Jenkins, but that’s another ugly Oracle-related story) lately in order to have a nice frontend for automatic builds of the VA Smalltalk projects of a customer (you can learn more about the beginnings of this project here) .

One thing that I wanted to do is use my TestResults and report them back to Hudson. Which is quite easy once you find out about a suitable xml format for TestResult. The gold standard here is again an artefact that’s coming out of the jUnit project.

Since my build machine works like a batch processor, and since I wanted to simply use the TestResult of a Suite to create an xml file that can be read by Hudson, I was hoping for an easy way to marshal TestResult to XML. So the first idea was to add a step to my batch that accepts the TestResult from the Test runner step and simply convert the results to XML.

Unfortunately, sUnit does not keep the output of failed tests anywhere, it just keeps the test class and test selector of a failed test.

So if you have an assertion like

self assert: (1>2) description: ’1 should be greater than two’.

and the assertion fails, you will not find the description anywhere in the TestResult. The testwill be recorded as failed, but there will be no way of finding out what went wrong. You’ll have to rerun the test in the sUnit Browser and take a look at the Exception that gets thrown.

I took a look at Lukas’ implementation of his Hudson build integration for Pharo. He wrote his own TestRunner that immediately outputs the jUnit XML file, but I think this is not the right solution. The right solution is what jUnit does: keep an instance of TestFailure for each failed test that includes the description. (you can take a look at TestFailure API documentation – it’s lean and easy)

Why do I think so? Because writing your own TestRunner will probably decouple you from future sUnit development, and because writing an xml output is probably not the only place in which you might need the description.

What do others think? Should we change sUnit and add a TestFailure Class?

[UPDATE]: I just found out that sUnit V4 has a TestFailure class, as a subclass of Exception. From the comments on the SUnit Config Map in VAST 8.02:

- The major 4.0 change is to dispatch on the exception (see #sunitAnnounce:toResult:).  This allows
user-defined subclasses of TestFailure or Error to plugin different behaviour in specific cases.  (For
robust behaviour in the face of old code using pre-ANSI-error-raising, Signal also responds to it.)

So I now have to take a closer look at V4 to see whether and/or how I can collect them in a TestResult.

Still I think the design and implementation of #sunitAnnounce:toResult: is wrong or insuffcicient for reporting purposes. #sunitAnnounce:toResult: adds the TestCase to the list of failures, but what I’d really want is some extra infor to which I can add the error description so that it is accessible from the TestResult.

One approach (which seems obvious) would be to add the TestCase to the TestFailure Exception and add the exception to the failures collection. Thus the failures list could access all info that’s needed for Reporting.

I’ll have to Play with this a little, and hope to find some time in the next few days…

Forrester Research: Java Is A Dead-End For Enterprise App Development

It’s not really new to anybody in the IT industry: trends need to come and make big bucks and they also need to go and free the stage for new ones, so that even more bucks can be made.

Analysts do play their role in making a trend come or go.

This time, they are on a mission to declare Java as legacy which will be replaced. It’s not yet fully clear what’s coming next, but Java is in our way (Well, I somehow agree to this one but I already agreed to it 8 or 10 years ago).

The latest mosaic piece is a blog post named “Java Is A Dead-End For Enterprise App Development” by Mike Gualtieri from Forrester Research, in which he explains why Java does not look into a bright future. His advice is:

Java development is too complex for business application development. Enterprise application development teams should plan their escape from Java.

Amen!

There are quite a few arguments in his article that make a lot of sense:

Java frameworks prove complexity. Hibernate, Spring, Struts, and other frameworks reveal Java’s deficiencies rather than its strengths. A future platform shouldn’t need a cacophony of frameworks just to do the basics.

True. But when it comes to Struts and other web frameworks, we must be fair and say that the complexity of web applications is not really Java’s fault, it’s because the mess of technologies like HTML, CSS, AJAX, JavaScript, HTTP is extremely complex and the whole web application chaos comes from the fact that we always nail new additional technologies onto this ball of mud to save a particular problem, rather than just come up with new and improved bas technologies. Java with its static typing just adds a few dozen adaptors, beans, templates and xml files on top of that for the simplest jobs. Partly due to the fact that we still fear to throw away code and want everything configurable to a degree where programming is the smallest part of assembling a web application. But that’s another story, let’s continue looking at Mike’s post:

Java is based on C++. Is this really the best way to develop enterprise business applications?

No, it’s not, but nobody ever really said so – apart from Sun and IBM. And the reason for that was not really altruism but the quest for big Bucks ;-)

Java’s new boss is the same as the old boss. Oracle’s reign is unlikely to transform Java. [...] So far, it appears that Oracle is continuing with Sun’s same failed Java policies.

Right. Larry wants to see some return on his investment in Sun, so being a Java Superstar is not on his list of priorities. I’d say arguments like this are just a sign of disapointment about the fact that the industry is still a place were people want to make money. Which I think is not too bad, since I am part of it and need to feed my kids. So this is neither a technical nor a rational argument. Java could still be great even if it cost 10000 Dollars per developer seat. But it’s not, even though it’s for free.

On the other hand, the community has added a lot of valuable code around Java that really makes Java a powerful platform.

Gualtieri comes to these conclusions:

What It Means: Application Development Teams Must Find A Better Way To Develop Apps

He’s oh so right. What I see in may daily practice at major IT shops is so depressing. Levels of complexity layered by the dozens, and nobody can draw a picture of their part of the overall architecture which would help anybody understand how The Enterprise System really works. No idea who to call when a Transaction fires some weird error message. Badly educated architects with a wall full of certificates and methodology popes sitting in their ivory towers. Java is just a little piece in the puzzle which adds complexity within software systems. But it does a great job of it.

The next generation of app dev tools will:

    • Dramatically increase developer productivity.
    • Allow developers to delegate change to business end users.

Unfortunately, he forgot to name them. But I somehow have the feeling I read sentences like this in the early nineties. And maybe people with a longer history in IT may know these wishes even from the 70ies or 80ies.

Interestingly, technologies like that have existed for decades. Smalltalk for example allows for high productivity, is highly adaptable, can be learned quite fast (I do train people in Smalltalk that come from very diverse backgrounds, and they learn pretty fast). It’s just that Smalltalk has been covered in articles from colleagues of Gualtieri 15 years ago ;-)

Java on the Mac: no need to worry

A few days ago, Apple revealed their plan to give up providing Java Runtime versions for Mac OS X. There was quite some speculation if this means Apple plans to diss Java similarly to Flash.

But obviuosly, they really just said: we’re not investing anything any more, but we welcome Oracle to do that for our platform.

Which is what will happen: Apple just announced that they will support Java 6 on Snow Leopard and Lion, and Java 7 will be provided by Oracle. This is true for many platforms, so the Mac will be like all the others.

So we’ll have Java and Eclipse on our Macs for quite some years to come.

Hat Tip to MacRumors

We knew it all the time: Web Services won’t heal the world!

I never really liked the big Web Services. All the XML-burdened complexity combined with lots of tools from the big vendors that had extremely long names and the purpose of which could never be understood unless you already were lost somewhere in the mud of XML-tides.

When I read today that the WS-I initiative officially stopped existing on heise online(German), I was really surprised, because it would mean there still is some sanity in the IT industry somewhere ;-)

I especially like this part of a blog post by Simon Phipps that was linked to in the above-mentioned article:

Whatever other origins it had, the whole movement was, as far as my own experience recalls, transmitted around the industry by a senior analyst from a large analyst firm visiting all the key players and asking them about their “web services strategy”.  As a consequence they all assumed Web Services were a key strategy for their competitors and put huge effort into devising a strategy of their own

This guy seems to really understand how technology trends are born in our industry ;-)

Maybe this also explains why some companies were in a lemming-like “We need to rewrite everything in Java/.Net/Whatever” mode that also cost loads of money and only rarely really led to better systems.

How closed will the Mac universe be in, say, 5 years?

I love using my Mac. I like my iPhone. The new Air is really an interesting piece of hardware.

Part of the reason I like my Apple products is that they run quite stable and offer a pleasant overall experience with installing/uninstalling applications. I also like the fact that I can use my Linux/Unix shell commands on it.

But there are times when I wonder how long I’ll like to use Apple products.

The newly announced MacApp Store will probably make finding and installing (and, of course buying) applications easier than ever.  But there is a back side to the coin. Apple wants the experience to be as good as possible and so tries to keep everything out of the App Store that may disturb this. By explicitly disallowing all programming languages other than C/Objective-C and runtime environments, they try to make sure that you cannot install anything from the App Store that’s not perfect. But what’s perfect is defined by Apple.

As long as it is still possible to install software on a Mac that is not purchased in the App Store, I still have a choice, and if I want a Java/Ruby/Smalltalk/Clojure/Scala-written program on my Mac I still can do so. But what if Apple decides to lock Mac OS 11 completely and only allow Apps from their App store on it?

Will we have to jailbreak our Macs to run Eclipse or Pharo in a few years?

And what if Apple is succesful with this policy? How long will we be able to install software of choice on any other commercially available OS?

Let’s hope I am just dreaming a nightmare and reality is different…

Is Apple hinting at Java’s exit from Mac OS X?

Back in 2006 when I made the move to a Mac, Apple had put a lot of effort into making Java/Swing Applications feel like native on Mac OS. Adopting Java and integrating it well with MacOS was key to attract new users to the Mac.

But Apple today is self-confident enough to declare mainstream technologies a legacy on their machines. It seems Adobe’s Flash (which is not shipped pre-installed on the new MacBook Air and is not available on any iOS device) now has a prominent friend.

Apple today announces that they won’t maintain a JRE for Mac any more:

As of the release of Java for Mac OS X 10.6 Update 3, the version of Java that is ported by Apple, and that ships with Mac OS X, is deprecated.

This means that the Apple-produced runtime will [..] may be removed from future versions of Mac OS X.

This does not mean that Java will go away from the Mac any time soon, but there will (very likely) be no Java Runtime from Apple any more. So now it is up to Oracle (or any other third party) to provide a Java Runtime for the Mac, because it seems Java 7 (if that ever becomes real) apps will not run on Macs any more. But it also means that betting on languages that run on the JVM for development on the Mac is not a good idea (I am especially thinking of Clojure and Scala here).

Some may think that’s no big deal, since Java is a server-technology and the overall market share of Macs is quite small.

But this also makes life harder for providers of software packages that are portable, like IBM (Lotus Notes, Symphony, DB2 tools etc), the Eclipse project, Oracle (admin tools) and many others. What will happen if they cannot install on Macs any more?

Will this hurt the Mac platform or the software vendors? Will the possible inability to run a Scala-App on Macs influence the developers’ decisions, or will it make the Mac an unattractive platform for users due to missing applications?

Is this just Apple moving away from the mainstream or is the mainstream becoming irrelevant for some corners of the IT industry?

Hat tip to macrumors

King Java’s dead – long live the King? Or: Do we need a next big thing at all?

The Java world seems to quite disappointed about the fact that the language will not evolve as fast any more as it used to. Java 7 will ship a whole lot later than expected, and most of the really “desired” features of it will now be part of a newly born Java 8 release that will not ship before mid-2012.

But I don’t think this is very surprising. Java today is regarded as THE platform for everybody. Oracle is trying to make it everybody’s darling by nailing feature over feature onto it. Since most of the newer features are aimed at overcoming the most painful restrictions of a static type system, some of the proposed syntax extensions turn Java sourcecode into a nightmare stuffed with braced constructs. The addition of closures will bring in a lot of power and expressiveness of sourcecode – at the cost of new syntactic constructs that bloat the language and make the code harder to read.

So Java projects will soon be faced with the same problems as C++ projects: in order to keep their code maintainable, they’ll have to set up rules on which language features not to use – even if they would be helpful.

Continue reading