Archive for April, 2006

Lost that last post

Hmmmm, I just spent 15 minutes typing in a post, and pressed the "Publish" button, and it came up with a blank page. After waiting a while and seeing that the browser was no longer active, I pressed the "back" button to go back and try again. BUT, the page is constructed with on page java script that refreshed the contents of the page to an empty box, and all my work was gone.

-> Rather Disappointed

Where is this going?

(1) Is this really what I want to spend my blog time on?  Tag-language.  I spoke with someone else today who said that he felt that the JSP tag library phenomenon had kind of faded, and that the fadhad been replaced by other approaches.  I dont know.

(2) I am certainly not going to have a blog about blogging, which seems to be the narcissistic tendencies of so many bloggers.  So I will stop this one here.

Reflections on Tag-language

That last post was too long. The discussion around pesudoprogramming is too complex to contain in a single post, or a single essay of any form. I feel it utterly fails to clarify anything, because it is built on so many other axioms which have not been clearly stated.

I was challenged by someone on the stance that use of tag-language in a JSP was less powerful, less convenient than just sticking to Java. So it is me against him, can I find some third person support for either position? I searched the web. The ONLY mention of tag libraries were from people promoting those tag libraries. They always include a page of reasons why the tag library is superior. Many "reasons" are unsupported assumptions about being better. Other reasons unfairly compare a very poor Java example to a tag; the Java could be written much better and it would be a better comparison. Most of the arguments don't hold water.

I was thinking, *somebody* must have done an unbiased comparison of using tag-language or sticking to pure Java. No matter how I searched, I could not find any evidence of a careful controlled study comparing the two approaches. Then I realized that the flaw is my assumption that there would be a such a study.

Who would do such a study? If you like tag-language, you are motivated to write a page expousing the benefits of tag-language. But if you don't like tag-language, you pretty much just ignore them. It is reasonable to assume that tag-language works in a particular domain of the programming space, and those who like it are in that domain, and those who do not are in a different domain.

Who am I, then, to rain on sombody's parade simply because tag-language is not useful for my purpose? I am a system architect and must set the direction for many people, some of whom are less experienced. These programmers are trying their best to do a good job, so they see the arguments and are persuaded. I guess what really bugs me is that the arguments are fallacious, and nobody corrects them! Only one side is presented, so people do not dig to see the what the truth should be, they simply accept the arguments.

I guess I am not done with this subject. I will have to address each argument for tag-language, and see if it holds up to scrutiny.

Pseudoprogramming

What are I going to gripe about today? How about: "programmers who think they are going to make other peoples lives easier by letting them program in a new language that is less complex."

OK, the motives are good: "Programming is complex. Many people are intimidated. Let's make something that they will be less afraid of, and still accomplish the job." Pumped up with virtue, they launch into making a "simpler language".

Simpler than what? Complete programming languages: Java, C++, C#, VB, PERL, Smalltalk, COBOL, LISP, and yes even FORTRAN. You have a lot of languages to choose from. Any programmer worth their salt knows a handfull. These are "complete" languages. They stand on their own. You can make complete programs from them. After you get the hang of a few of them, you find that you can program just about any program in any one of them. Sure, they have differences. There is no question that different languages are better (or worse) at different tasks. But for the most part, the algorithms behind most tasks will be pretty much the same. There is a certain universality to programming that comes from taking a problem, breaking it into a sequence of distinct steps, that manipulate values stored in addressible locations.

I have my favorite languages. My favorite languages have changed over time. The language that I find easiest to use for almost any purpose tends to be the one I am most familiar with. I do mostly Java right now. A few years ago it was PERL, adn before that C++. Before that Java, and before that C++, and few other languages I am trying to forget. See I have switched back and forth a few times. And what I have found that any one of these langauges can do the job. The only thing that is complex is using multiple languages at once.

Learning and keeping in mind one syntax is comfortable, but switching back and forth between multiple langauges on a daily basis is more complex, more tiring, more accident prone, and just plain more difficult. It is impossible to do everything in one language. You have to know HTML to generate web pages, and maybe even JavaScript. You have to know BAT files or shell scripts to automate simple things, and maybe MAKE or ANT scripts. There is a clear tendency for people to avoid learning new languages for special purposes. Learning a new language is hard work. Mixing languages at the same time is hard work. It is far easier to keep everything in one language if you could.

Scripting languages: there is also a place for scripting languages. Sometimes these are complete enought to make whole programs, but usually they are used to string together blocks that are composed in a complete language. Again they are necessary, but keeping the number to a minimum simplifies the world.

PseudoLanguages: so what am I griping about? Languages invented by programmers precisely because they are "easier" to use. Usually these pseudo languages are not that well thought out. They tend to be fad-ish. Non-programmers tend to balk at the amount of punctuation that they see in a piece of code, so these simplified languages often try to use less punctuation. Often they try to use English language words on the assumption that a familiar word, even if used in an incongrous way, will be easier. There is often an attempt to make it like a natural language, but in fact even though some sentence look a little like an English sentence, there are many many English sentences which make no sense in that langauge.

Another recent fad is to use XML as the basic syntax. XML is a strong and important syntax for representing data of all forms. It certainly can be used to form a programming language. Ant and XSLT do this, and they are fine. But don't think that that just because a language is based on XML that it is easier to use.

But my pet peeve this week is JSP tag libraries. JSP files are hideous enough. You have HTML framework, with Java embedded within it, and the parsing rules change within the JAva sections such that the resulting file is neither wholly HTML nor Java. I certainly understand why someone would want to make this better. But inventing tags is not the answer. Now you have a third language. The syntax of a tag is neither HTML, nor is it Java syntax. The dream I suppose was to eliminate the need for Java, but it fails to do so, so now you have three constructs mixed together. Again the motive was that people who do not know Java could construct JSP pages. Dream on. There is nobody making JSP pages who does not also know Java. Just because you can make commands using angle brackets does not mean that it is "easier" to use. There is no indiciation that this new tag language reduces the amount that you have to learn. You still have to construct loops. You still need variables. In my experience, adding a tag library to a JSP only makes it more complex, which is harder to use. Like most pseudo languages there are special cases that are easier to program, and these are used as examples, but because tag library is not a complete language, it can not be used on its own to write a complete program, as soon as the example gets more complex than the simple cases, the argument falls apart.

That is my gripe for the day. If you are going to use JSP pages, and since you have to know Java anyway, you are far better off just sticking to the Java for everything. Fewer languages means easier programming. It is that simple. Psuedolangauges only make the job more difficult, no matter how misguided the motive is.

Hello world!

Alright, this is my first post.  Frankly,  I have looked into a number of blogs, and I am not sure which one I want to use.  But someone else I know uses this one, so I am trying it.

Goals:  the purpose of this blog is to comment on what I see in the enterprise software field, with the possible result of making things better.  I want to complain!  I am just not satisfied with what I see.  I know things could be so much better, if we can just get our act together and do something about it.  I get kinda grumpy sometimes.  I am always encouraged by the following quote:

"A reasonable person adapts themselves to the world around them.  An unreasonable person refuses to adapt, and tries to change the world to fit them.  For this reason, all advances depend upon unreasonable people."

I am unreasonable about a lot of things.  Like spelling for instance.  Why do I have to type "through" when "thru" does the job just as well.  But I don't have any delusion about being able to improve the language.  Instead I focus on my area of expertice which is enterprise software.  The current buzz word is "Service Oriented Architecture" and "Business Process Management".  I sure there will be many more buzz words over time.  My focus is on helping people to be more effective at their work.  This could include work done on computers using software, but it can also include simply coordinating work done without a computer.

I don't claim to have any special secret insight into how to clean the entire high tech mess up, but I do think that small incremental improvements in the right direction will eventually get us there.  I figure, if we share these ideas, eventually there will be enough critical mass that these new ideas will be adopted.  If the idea makes sense, and often it is not entirely clear.  So that is what the blog is for, and I guess we will see if I like this one enough to keep it going.