Language Requirements

This weekend I read a paper entitled “Ada, C, C++, and Java vs. The Steelman”. This paper was written by David Wheeler. The Steelman is the requirements document for the Ada programming language. The paper stated that Ada implemented 93% of the requirements from the Steelman. C++ on the other hand only implemented 68% of the requirements. You would think that Ada would rank higher since it was written to meet the language requirements. I thought I would list and comment on some of the requirements from the Steelman here.

Simplicity: One thing I know about the C++ language is that it is very powerful. However with that power comes a level of complexity. I do not think C++ can be considered simple by anybody. However that is not necessarily a bad thing.

Maintainability: On this topic I am divided. Since C++ is not a simple language, it may not be as easy to maintain in general. However the layout of the structure with the use of classes may make some maintenance tasks easier. C++ may get a grade of C for maintainability.

Efficiency: The C programming language has been know to be low level among the many high level languages. As such it is highly efficient. C++ adds a bit of complexity to C. That may incur some overhead. But I still think as a whole it is an efficient programming language.

Function vs. Procedure: In the C++ programming language, there does not seem to be any explicit difference between a function or procedure. In fact, all the C++ class methods would be considered functions. However I have written in other languages where a function returns a value, and a procedure does some work with potential side effects, but does not return 1 value.

Exceptions: I do know that C++ has exceptions built into the language. However I myself do not personally use them that much. I try to code logic for exceptional situations directly in my code without using the exception functionality.

Assertions: I believe the C++ assertion capability is a carry over from the C programming language. I do like the ability to use assertions. This is a positive programming feature that C++ implements.

There are a whole lot other requirements listed in the Steelman. Some of the more interesting ones are on the topics of tools, constants, indirect types, strong typing, recursion, and short circuit. C++ fares well in each of these. However it is time to wrap up this post. It is interesting that C++ caught on, but Ada did not seem to. That may be ancient history as C++ loses its popularity to a number of new languages available to programmers. I hope C++ remains immortal like C is.

Fate of COBOL

Today some of the cutting edge computer programming languages are Django, Drupal, and maybe Ruby. However just 5 years ago a study found that there were over 180 billion lines of COBOL code still in use. This can become a huge problem as the number of COBOL programmers is decreasing about 5% every year. Currently there are under 100,00 COBOL programmers out there. You can do the math and see that there will not be enough of them to maintain the current code base in a few years.

There are still some new core applications being written in the COBOL programming language. The problem is that it is usually more fun to be a Java developer. And it can pay better as well. So your top developers are probably not going to be COBOL developers any more. COBOL coding is not exactly rocket science. The COBOL language is meant to be easy to read.

I heard a funny joke the other day. Some developer got seriously sick. So they froze his body. When they thawed him out, there was a lot of commotion. Apparently they needed this guy back alive and kicking pronto. It was nearing the year 3000. And they were encountering all kinds of Y3K bugs. It seems the Y2K coders only did a patch job 1000 years in the past. LOL.

A number of sources have informally estimated that only 20% of development work is coding new apps. The remaining 80% of the work is maintenance programming. In addition to COBOL, there are other legacy languages out there like FORTAN, RPG, dBase, and Mumps. These languages probably have the same problem as COBOL. However there may not be as huge of an installed code base as there is with COBOL programs.

Perhaps I should join my buddy and become a COBOL consultant. Like I said before he makes a good deal of money. There is one problem with that plan. He has to travel all over the United States to get his gigs. And they hardly ever last long. They like when he comes in and solves their problems. He takes care of the issues nobody else likes or knows how to resolve. That kind of sounds like my job. I work in C++. If you ask some people, C++ is also losing its juice and will somebody be the next COBOL. I say bring it on.

Better Programming

The Geekaholic blog by Aditya Mukherjee contained an interesting blog post recently. The title of the post was “A Faster vs. Better Approach to Reach Your Programming Goal”. Aditya had a number of insights on how to program better. He declared that a module has to work within a program. The result should be a program which works as a unit. You should write code in such a way that, no matter how much code you add, the existing code will work.

Aditya goes on to recommend you ensure new developers will be able to work with your code. It would also be best if such a new developer could pick up any piece of your code and understand it without having to go through all of your other code. Here is a list of Aditya’s additional recommendations:
  1. Make use of functions
  2. Make use of Macros
  3. Make use of procedures

This all comes at a great time for me. I am in the middle of coding the new changes in our software for next year. We have a mandated deadline for our code. I planned to attend a training class this month. So I got all my work done early. Another developed came forward and said he would not be done on time. These two facts resulted in me getting some more work.

Now I do not dislike more work, especially when it is software development. More specifically I love to code. However I have a one week to complete a task that was supposed to last a couple weeks. This is life in the software development world. I am not planning to work too many extra hours this week to cope with it. Instead I plan to change the way I work. I check in my code daily to ensure all code is integrated early. I also am coding the bare minimum required functionality first.

Here is the bad news. I may be taking some shortcuts in my coding to get the job done on time. That does not mean that I do not use functions or procedures. That would be plain evil. However I might hard code some values. And I might use the leanest methods to pass data around instead of creating classes or even structures. This is the price you pay when you get unreasonable demands and there are finite resources.

College Course Books

I used a web site to look up the books required for Computer Science courses at Stanford, Berkeley, and Princeton. Some of the titles were as expected. However there were some surprises as well. These are all respected colleges. And you would think that you could gather important information by analyzing their required college texts. I thought I would go over some of the book patterns I read about.

One thing that was apparent was that Java books outpaced all the rest by a factor of three. This is somewhat expected since recent college grads are the Java generation. You would not expect a huge emphasis on the C or even C++ programming language any more. Another no brainer was that Berkeley required a book on the BSD operating system. They are true to their own.

Stanford required a C++ text. Perhaps they are one of the last to continue teaching using this programming language. That is too bad. 10 to 15 years ago C++ was all the rage. Stanford also requires a Standard Template Library book. Being a C++ guy myself, my vote is for Standard. Finally Stanford stood out as the only of the three schools requiring a book on the Scheme programming language.

Berkeley seemed to have the longest list of required course texts. They had one course that required a book on graphics which seemed to stand out. It also required The Mythical Man Month which I would normally not expect to be presented in a college environment. This is a positive surprise. Berkeley was also the only school of the three that required a book on Design Patterns. It is surprising that more colleges do not require this to be taught. I was happy to see that Berkeley also required a book on Python.

Princeton had a couple surprising course textbooks. They required one on Artificial Intelligence. They also required a book on the ML programming language. That seemed a rare thing. There were also a number of required course books related to computer networking such as TCP/IP and UNIX. Those are all good things.

You can learn quite a bit about a college’s computer science program by studying their required course texts. If you want to learn some of the skills that top CS colleges teach, you could spend some time reading the books yourself. This is no substitute for a college degree. But it would make for interesting and useful reading nonetheless.

Chess AI

I read a most interesting blog post called “Chess Programs Are Not Smart” on zenpawn’s blog. This post was an attempt to generate discuss by providing a guest article written by Thomas Hall. I must confess that I used to play a lot of chess in the old days. Now that I am a software developer, chess programs are especially an interesting topic to me. First I plan to review what the author of the guest article stated. Then I will chime in with my own two cents on the subject.

Hall agrees that chess programs of today are indeed very successful. Two years ago one of them beat the human world champion at the time. However the problem of making a good chess program is difficult due to the number of possible moves in chess. No matter how great the hardware, the computer is not able to consider all future possibilities for any move. Therefore the computer must make some crucial decisions to arrive with a move in a timely fashion. The open and end game are especially difficult for a computer to analyze. Therefore most good chess programs rely on opening books and end game tables to determine their move. These techniques are wrote memorization and not any real insightful intelligence.

My own take mimics the initial statements by Hall. I would also add that the goal of good chess programs is to win. In that regard, they are most successful. Their goal is not to further the research of computer artificial intelligence in games. If that were the purpose, then I would imagine the programs would not be very good at winning. I am a coder. Zenpawn (the owner of the original blog) is also a software developer. My thought is that since we can code, we should ourselves write up some AI programs to get out computers to actually learn to be good at chess. I mean can’t we teach the computer the rules, let it play against itself for a long time, and make it learn?

Yes tasks like this are easier said than done. However it would prove fruitful in the sense that we would actually be trying to advance the world of computer artificial intelligence. The point here is that we should not look to commercial successful chess programs to do that. They are too busy beating the pants off grandmasters to bother with AI research. Cheers. And to close with a cheesy line, checkmate.