Well, it has finally come down to finding an open source source code revision control. But, what do I choose, git or something else? This will be interesting.
Nothing lasts forever, so a new task for 2015. Replace our source code control.
Aside from having enough disk space to defragment a disk, choosing a slower time of the day to defragment a disk, and perhaps running the disk check utility before you defragment, I want to know if it is okay to defragment a Windows server or workstation using Microsoft’s disk defragmenter.
A consultant we use happened to see the Microsoft disk defragmenter running on several of our servers, and said running the defragmenter could cause problems. However, the consultant offered no reasons why or any corroborating evidence. I’ve been defragmenting disks for over a decade with no apparent negative results. More or less the Microsoft Devnet community said it’s OK, but I am still looking for the definitive answer to this question.
With the exception of one Linux server, which performs URL routing, all our Linux servers have jobs to do, and send email out when their jobs have completed. All our Linux servers run sendmail, but sendmail is being used in its crudest form. It’s not serving in its full capacity, but its only job is to move email off each Linux server to our email server, and does so with a Perl shim that logs into our email server using a valid user name.
Over the past few years, our email server has needed replacing. Its disks get full, and it cannot accept more incoming mail. I’ve never bothered to tune sendmail, but have now resorted to something crude that I hope will prevent our Linux servers from many, many retries, and hanging due to one of many conditions, including running out of memory.
# A $? -eq 1 means the mail server is running. That is ?Invalid command was not found. (echo open mailserver.arlington1.local 25; sleep 1; echo EHLO; echo quit) | telnet | grep "?Invalid command" if [ $? -eq 1 ]; then if [ -r /tmp/sendmail_stopped ]; then rm /tmp/sendmail_stopped /etc/init.d/sendmail start mail -s "sendmail has started back up." firstname.lastname@example.org << /dev/null else echo "sendmail OK" fi else if [ ! -r /tmp/sendmail_stopped ]; then touch /tmp/sendmail_stopped /etc/init.d/sendmail stop else echo "sendmail still not OK" fi fi
So far, so good. I’m hoping to shutoff sendmail and hence shutoff retries, so I don’t have to force reboot our Linux servers.
I have written a new, small Clojure program to compare this month’s and last month’s insurance report. This is similar to a project I did a year ago, except it involves one report our personnel department gets once a month, not two different reports.
The program involves using Clojure’s jdbc interface, and is very much a typical database report that could have been written in Perl, or if the database had been Informix, in Informix 4GL. There’s nothing special about the program, except the code base was already in Clojure, and I wanted to keep the code base the same.
The only roadblock I ran into was setting status from the result of certain difference tests between last and this month, like whether a record wasn’t there this month, last month, whether or not the insurance product or premium had changed, or if someone had gone from an active to a retired status.
I tried figuring out a way to have a let binding contain return status from these different tests, so that these status values could be written into the report. After a while, I settled on a ref and dosync to set one global flag, so that later on in the program, had their been no errors, an appropriate message could be written to the file.
I don’t know whether I crossed into the mutable dark force, but, for one, I’m not convinced that carefully used mutable variables are a bad thing, especially, if you’ve designed the rest of your program not to take these shortcuts, because of coding laziness. Can you tell I’ve absorbed guilt from Clojure’s being immutable?
I do not think of Python or Java as functional languages, and I have written a medium-sized project in Python and sustained the configuration application for Vinca’s old CoStandbyForWindows. Haskell is labelled a pure functional language, and the word pure is sometimes used as if Haskell were organic food. Yet, both Python and Java (and perhaps other languages) seem to be caught up in the new functional craze. I am basing my theory on seeing a lot of new books cropping up, while looking for a good algorithm descriptive meta language.
Using Clojure on three small projects taught me that I had to re-orient my mind radically for Clojure’s almost pure functional approach versus the traditional C/Java/VB modifiable, iterative loop approach. For example, you’ve received two water bills with estimated reads. Finally, you get an electronic endpoint associated with your account and/or get a verified meter read into the water department. You have -170 ccfs to credit across two, successive, estimated 100ccf bills. The bills are calculated by binning consumption into three tiers, 0-30ccf, 31-60ccf, and 61+ccfs. When the account is credited, the credit has to be applied starting at the highest tier at which the original bill was generated.
The code I had to re-write was written in Informix 4GL, definitely an imperative language. How I would model this algorithm functionally would be an interesting exercise. Is it worth it to provide 4GL with functional extensions to the language? The program runs in a single process, and works against a database — Informix SE — that itself is protected by and supports synchronization primitives.
Now, I see there are types being added to Clojure. I cannot comment, having never worked on a large symmetrical multi-processing team responsible for a social media site or similarly complex project. I can understand why ascertaining the correct type is important. Are adding functional features to Java going to make the language better or people want to implement in it more?
I remember when Java was introduced, and a programmer allocating memory was not a good thing. C++ chugged right along, and C was almost universally adopted for device driver work, at least on Windows. Those languages are still being used, and there is a lot of useful Java code out there; at least the companies that paid for that code think so.
The best I can do is keep reading what is out there, whether I agree or not, lest I be lost in the swirl of the latest attempt of the holy grail of never having a program encounter errors.