Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Tuesday, October 19, 2010

COBOL Rules!

Having taken a position with a firm that recently launched an Agile Development initiative, I have been giving a lot of thought to how software is developed.

First off, I will say that I don't hold out much hope for Agile. Every company has its own work culture which is entrenched and not easily shifted. Some may be ripe for accepting an approach like Agile Development but most are not. If Agile is launched an AVP with a memo and training program, just sit through the seminar and wait. It will go away just like Who Moved My Cheese.

More generally, I think we spend much too much time and effort in agonizing over organization and methods instead of producing quality programs. I don't mean we need test-driven development or a million test cases in the QA group. I mean that little attention is paid to the actual code that is produced. Is it efficient? Is it secure? Is it robust? Is it easy to understand and modify? I believe W Edward Deming said that the problem with management is that it reads too many management books and not enough statistics. Same with programmers. My last organization did a Lunch-and-Learn series on best practices in coding specific situations. It was nice. Most of what I see, though, is google-the-problem/copy-a-sample-from-a-blog/compile-the-result. And that is when they aren't trying to stay on the bleeding edge.

I have rediscovered an admiration for COBOL programmers. I have to assume that the senseless dash toward "progress" seen in Java programming circles is less an issue in COBOL, which is considered a dying computer language. These guys and gals receive a request or specification and then code a solution. End of story. No need to impress anyone with the latest framework, there.

I read a comment thread recently which mentioned the "80% of anything is crap" rule with regard to programmers. Why don't we attack this statistic by attempting to make that crap a little less aromatic? What we need is a movement to improve the quality of programming by teaching theory and best practices. We all know that well written code is less prone to errors. But do we pay any attention to coding? No! We spend most of our time talking about patterns and pair-programming. Perhaps with enough theory and programming philosophy, developers might recognize that moving something from the Java source file to an XML file does not reduce the code, it merely translates it into XML. Or that using JUnit increases your code-base because your test modules are programs too that may need to be tested themselves.

I have been a programmer my entire working life but I trained as an engineer. I often wonder when will the time come when software "engineering" lives up to its name and drops the hacker culture and becomes a true discipline.

Thursday, April 17, 2008

I knew him, Horatio

The other day I found myself wondering what would replace Java as a programming language. Many are so entrenched in Java (or the latest cool new tool) that they just ignore the fact that all things come to an end. C seemed so entrenched that it was hard to imagine anything else eclipsing it (no pun intended).

What got me thinking about this was my philosophical frustration with String vs StringBuffer. String is the base class for handling text but to do anything even as banal as concatenation, you are supposed to use StringBuffer. I understand that immutable Strings were introduced for efficiency but they lie like a pustule festering in the heart of the language. Nothing will ever make them elegant.

And now we have Annotations in Java 5 (or is it Java 1.5?) We are told that XML is banished and deployment descriptors are a thing of the past (see here). The trend now is to entangle your code with deployment information (WebService and Entity annotations). Ironically, the instructor in the Core Spring class I recently took tried to sell us on the ways that Aspect Oriented Programming would disentangle our code. He followed this up by indicating all the Spring-specific annotations that we should add to our code! I can't escape the feeling that we are going to be deluged with new annotations when every framework will insist on their own, unique attributes. In order to port our so-called POJO to a newly released framework (or new version of an old one) we are expected to recompile our code. Imagine the stack of Annotations required to make our Plain Old Java Object deployable on the wide variety of possible environments our clients may be using. Alternatively we could try to tell CitiGroup that they have to use the technology that we chose to Annotate. Good luck! This smells like an attempt to solve a short-term problem (That Evil XML) with a long-term solution.

In Java 1.7, there is talk of multiple object return types. This may be the final sign that Java has Jumped the Shark. Are the developers of the language compelled to pile more and more stuff on the specifications to show that the language is growing or something.

And thus begins the gradual decline of Java.

More Stupid Programmer Tricks

Am I dense or just not one of the cool kids?

This is from JAX-WS FAQ page (https://jax-ws.dev.java.net/faq/index.html#jaxwsdiffJaxRpc)
Q. What is the difference between JAX-RPC and JAX-WS ? One of the main difference between JAX-RPC and JAX-WS is the programming model. A JAX-WS based service uses annotations (such @WebService) to declare webservice endpoints. Use of these annotations obviates the need for deployment descriptors. With JAX-WS, you can have a webservice deployed on a Java EE compliant application server without a single deployment descriptor.
Excuse me, but the @WebService anotation is the deployment descriptor, except now the deployment is entangled with the implementation!!!

Tuesday, February 20, 2007

Technological Evangelism

Since no one actually reads this blog, I can take a moment to vent...

I have been informed that the software project on which I work will be modified to use something called the Spring Framework. Naturally I googled it to get a taste of what it involves before diving in. As near as I can tell, the "core" framework involves building XML files that contain all the definitions and dependencies of your classes and then using Spring to instantiate them , blah blah blah. Whatever. The lulu is that the proponents of Spring are claiming that this "removes the class dependencies from my code." Huh? Do these guys not realize that my new XML file IS my code. To boot, the XML is far harder to read than Java! Guess what? Since the XML is essentially my Java program rewritten in XML, I better have a way to test it. I have gained something questionable at the cost of more complex and error-prone code.

This reminds me of the Code-To-Test movement where you write a bazillion unit-tests and then use them as your "specification" - once you pass all the tests, you're done. Um, guys... your unit-tests ARE your code. They have to be tested, too. You gonna write unit-tests for your unit-tests?

A number of critiques of Spring make the disclaimer that they are not impugning Spring originator Rod Johnson's intellect. I am not sure I can extend the same charity to every one of his disciples. Aside from the marketing copy quality of some of the tutorials (isn't "versatile and flexible" redundant?), the concept of what constitutes "code" is a pretty basic to computer science. Is this too abstract for the average open source user?

It has sometimes been claimed that the problem with software development is that it is not enough like engineering. Having at least graduated as an engineer, I can see some truth to that claim. The alarming thing is that we are moving rapidly in the opposite direction. People are adopting all sorts of crap because it's hyped and it's free (I was personally burned by Log4J) .

Perhaps a great new software paradigm will emerge from this wild west free-for-all. Perhaps we can all get back to writing applications instead of tools. Or maybe I will just continue in my curmudgeonry, decrying the poor state of our university education system.