Jun 082020

Long overdue, but I just finished preparing the latest Maxima release, version 5.44.

I am always nervous when I do this. It is one thing to mess with my own projects, it is another thing to mess with a project that is the work of many people and contains code all the way back from the 1960s.

 Posted by at 2:11 am
May 222020

I am one of the maintainers of the Maxima computer algebra system. Maxima’s origins date back to the 1960s, when I was still in kindergarten. I feel very privileged that I can participate in the continuing development of one of the oldest continuously maintained software system in wide use.

It has been a while since I last dug deep into the core of the Maxima system. My LISP skills are admittedly a bit rusty. But a recent change to a core Maxima capability, its ability to create Taylor-series expansions of expressions, broke an important feature of Maxima’s tensor algebra packages, so it needed fixing.

The fix doesn’t amount to much, just a few lines of code:

It did take more than a few minutes though to find the right (I hope) way to implement this fix.

Even so, I had fun. This is the kind of programming that I really, really enjoy doing. Sadly, it’s not the kind of programming for which people usually pay you Big Bucks… Oh well. The fun alone was worth it.

 Posted by at 12:16 am
Sep 132019

My favorite cartoons are Kliban’s cats, but the Dilbert comic strips represent a close second.

Today’s Dilbert offers a perfect demonstration why.

I could actually be the consultant that Dilbert’s pointy-haired boss is looking for. Over the years, I learned one very important thing about this business: As a consultant, my job is to offer my best advice to my customer, but then whatever decision they make, it’s theirs to make, not mine. My job is to continue supporting them to the best of my abilities.

In my career, I have seen customers make bad decisions that destroyed their projects. I offered my advice. When it was ignored, I did not take it personally. Neither that nor judging the customer are part of my job description. That is not to say that I do not feel regret, or that I did not often second-guess myself: Could I have offered better advice? Could I have been more convincing? Why was my advice not accepted?

But judging? Nope. That would be rather unprofessional.

 Posted by at 12:02 am
Jun 052019

And before I forget: Last week, wearing my release manager hat I successfully created a new version of Maxima, the open-source computer algebra system. As a result, Maxima is again named one of SourceForge’s projects of the week, for the week of June 10.

The release turned out to be more of an uphill battle than I anticipated, but in the end, I think everything went glitch-free.

Others have since created installers for different platforms, including Windows.

And I keep promising myself that when I grow up, I will one day understand exactly what git does and how it works, instead of just blindly following arcane scripts…

 Posted by at 1:50 pm
Mar 302019

Content management software that I use, Joomla! and WordPress in particular, have been complaining for a while now that the PHP version that runs on my servers is outdated and potentially unsecure. Not exactly true, as PHP 5.4 remains part of the official Red Hat/CentOS release, but it would certainly be prudent for me to attempt an upgrade.

I tried to do just that last night, on a test server. And it was a miserable failure, a waste of many hours that I will never get back, to make no mention of the heightened risk of cardiovascular disease due to my elevated blood pressure caused by all that frustration.

The relatively easy part? PHP 7 complaining that its just-in-time compilation feature ran out of memory. Easy-peasy, I can disable JIT. Check.

But then: several of my Joomla! sites refused to run, with a cryptic and ultimately meaningless error message and nothing in the logs. And at least one Joomla! site just got itself into an infinite redirect loop. But why?

I tried many things. I kept looking for answers on Google. Nothing worked. Eventually I took two of my Joomla! sites that are very similar in nature, and began comparing their settings, side-by-side. One worked, the other didn’t. Why?

I then stumbled upon a custom Joomla! module, one that I wrote to support some ads that appear on my sites. This module was installed on the site that failed, but not used on the other. I disabled the module and, presto, the site was working with PHP 7. I re-enabled the module and the site was dead again. So… why?

Well, the module contains some PHP code. Which, after some preamble that allows it to connect to the internal data structures of Joomla!, begins the real work by accessing the MySQL database that contains the actual ads:

$conn = mysql_connect("localhost");
$res = mysql_query("SELECT PAGEID,ADTEXT FROM ...


You see, mysql_ calls have been deprecated and REMOVED from PHP starting with version 7.

And I have hundreds, if not thousands of lines of legacy code* (including, e.g., my calculator museum at rskey.org) that rely on this old library.

So I guess that PHP 7 upgrade will have to wait a while longer. Looks like I have no choice but to rewrite the affected pieces of code everywhere, as there is no other long-term solution. (Even if I find a third-party PHP plugin that re-enables mysql_ codes, how long will that continue to work? How reliable will it be?)

What a muckup. Grumble. And I do have other work to do.

 Posted by at 10:40 am
Mar 252019

The other day, I started listening to Google Music’s personalized music stream.

I am suitably impressed. The AI is… uncanny.

Sure, it picked songs that I expressed a preference for, such as songs from the golden age of radio that I happen to enjoy. But as I continue listening, it is presenting an increasingly eclectic, enjoyable selection. Some of it is quite new, from artists I never heard about, yet… it’s music I like. For some reason (maybe because I am in Canada? Or because it knows that I am trying to improve my French? Or was it a preference I once expressed for Édith Piaf?) it started presenting a whole bunch of French music, and again… some of it is quite likable. And now that I purposefully sought out a few classical composers, the AI realized that it can throw classical pieces at me as well, which is how I am suddenly listening to Schubert’s Ave Maria.

As a matter of fact, the eclectic choices made by Google’s AI remind me of two radio programs from the CBC’s past, long gone, long forgotten by most: Juergen Goth’s Disc Drive and Laurie Brown’s The Signal. Both these shows introduced me to music from excellent artists that I would otherwise never have heard about.

And now Google’s AI is doing the same thing.

I am also getting the sense that the more I listen, the bolder the AI becomes as it makes its choices. Instead of confining me to a bubble of musical genres of my own making, it is venturing farther and farther away from my presumed comfort zone.

Which is quite impressive. But also leaves me wondering how long before our machine overlords finally decide to take over.

 Posted by at 7:27 pm
Mar 012018

I am playing with JavaScript and HTML5. Three-dimensional transformations.

Cable News Network

It's more fun than I thought. And gives a whole new meaning to the word, "spin", as I am listening to CNN.

 Posted by at 9:20 pm
Dec 252016

Today, I was trying to explain to someone the difference between entering a Web site’s address in the address field of a Web browser, vs. entering a search term in Google. I was not very successful. In the end, it doesn’t really matter… Google happily accepts a Web site address in its search field, and all modern browsers accept search terms in the address field, passing it on to the preconfigured search provider.

But this experience reminded me of a clip from Star Trek IV: The Voyage Home. It’s when Scotty and McCoy talk to a factory manager and Scotty tries to show the chemical formula for “transparent aluminum”. When McCoy suggests the use of a computer, on old Mac sitting on a desk nearby, Scotty first tries to talk to it; and when McCoy helpfully points at the mouse, Scotty picks it up as though it was a microphone tries talking into it.

What I realized is that thirty years later, we basically gave up on the idea of trying to educate users. If that computer was built today, with users like Scotty in mind, we’d just put a damn microphone into the bleeping mouse. It’s just easier that way.

 Posted by at 10:09 am
Feb 062016

I just came across this gem of an example of bad coding in the C language.

Most C implementations allow arrays as function arguments. What is less evident (unless you actually bothered to read the standard, or at least, your copy of Kernighan and Ritchie from cover to cover) is that array arguments are silently converted to pointers. This can lead to subtle, difficult-to-spot, but deadly programming errors.

Take this simple function, for instance:

void fun(int arr[100])
    printf("REPORTED SIZE: %d\n", sizeof(arr));

Can you guess what its output will be? Why, arr is declared as an array argument of 100 ints, so the output should be, on most systems, 400 (ints being 4 bytes in length), right?

Not exactly. Let me show you:

int main(int argc, char *argv[])
    int theArr[100];

    printf("THE REAL SIZE: %d\n", sizeof(theArr));
    return 0;

On a 64-bit Linux box, this program compiles cleanly, and produces the following output:


Similarly, on Windows, using a 32-bit version of Microsoft’s C compiler, I once again get a clean compile and the program outputs this:


The morale of this story: Array arguments are pure, unadulterated evil. Avoid them when possible. They offer no advantage over pointer arguments, but they can badly mislead even the most experienced programmer. Compilers still allow array arguments, mainly for historical/compatibility reasons I guess, but it is unconscionable that they don’t even provide a warning when this abuse of syntax happens.

 Posted by at 9:45 am
Nov 272015

Fourteen years ago, I embarked on a small hobby project: A compiler for an ultra-simple programming language I called W, a language specifically designed to produce short 16-bit DOS programs. It has the distinguishing characteristic of having neither keywords nor types. The only data type on which it operates is a 16-bit machine word (hence the name, W).

I then wrote a few pages about this language that are still featured on my Web site.

Today (not for the first time) my project was rediscovered. Apparently not everyone realized that this was an old project (I now changed the configuration of the project page to make sure its creation date is visible.) The link went a little viral, as it was featured on both Reddit and Y Combinator. Which explains why, when I woke up this morning, I saw my server under a far heavier load than usual.

It was interesting to look at the comments on these two sites. Some liked what I have done. Others were critical, not sure why; it was a hobby project, after all, I wasn’t trying to win any accolades. But there was one particular comment on Reddit, by user MarshallBanana, that I really liked:

“What a bastard, making something for himself for fun. He sure deserves some shit for that.”

 Posted by at 7:18 pm
Sep 212015

Back in my misguided youth, I spent a couple of years developing game programs for the Commodore 64.

It all started in 1982, when a friend of mine and I dropped by at the office of a newly formed company, Novotrade. We heard somewhere that these folks have a new personal computer in their possession, one with a whopping 64 kilobytes of random access memory (an almost unheard-of amount at the time), and they are looking for programmers.

It was all true. The Commodore 64 was there and they were indeed looking for talented programmers. Thus we got to meet Ferenc Szatmári (a physicist-inventor who later on had a profound influence on my life) and others, who explained the deal: Novotrade was about to enter into a business relationship with a British company, the idea being that Hungarian programmers will be writing game software for Commmodore’s brand new personal computer. As part of this arrangement, a prototype Commodore 64 (of West German manufacture, with serial number 000002) was already there, available for us to study.

As it is well known, the Commodore 64 went on to become one of the most successful personal computers of all time. Our games did not fare that well; truth to tell, they weren’t that great. The games we ended up developing were “chosen by committee,” so to speak, from game ideas sent in by the public in response to a Novotrade-managed contest. Still… we were proud of introducing some rather novel programming techniques. Specifically, highly efficient graphic algorithms were developed by two of our teammates, Imre Kováts and Márton Sághegyi, which allowed us to create 3D-ish full screen animations like a moving horizon or a floating iceberg.

Floating iceberg? Yes… one of our games was called Arctic Shipwreck, and it required the player to balance an iceberg by moving a friendly mammoth around while trying to avoid stepping on some poor survivors of a shipwreck… until rescue arrived. Oh, and there was a rather nasty bird of prey, too, that occasionally came and plucked a survivor for lunch.

Not very entertaining, to be honest. Yet for some reason, this game remains much liked by the dwindling community of Commodore 64 enthusiasts. Most recently, it was featured in a nice German-language article on TrueGamer.de; the author of that article, Boris Kretzinger, also interviewed me via e-mail for C64 Scene, an electronic magazine published in the form of Commodore 64 disk images (!).

 Posted by at 6:55 pm
Jan 072015

For years, I’ve been using the online TV guide provided by ZAP2IT to check what’s on TV. Generally speaking, I’ve been satisfied with their service.

Until last year, when they introduced a whole new layout. Which, in my considered opinion, was a significant downgrade (makes me wonder if they were perhaps inspired by Windows 8).

Today I noticed, to my considerable pleasure, that the old layout is back. I now have the option to “Switch to Classic View”. Which I promptly did, without hesitation and with no plans to change my mind.

Now I am no usability or ergonomics expert, but I do have 30-odd years of experience in IT, and I know a thing or two about user interface design. Here are two illustrations that show why, in my considered opinion, the old format is far superior to the new one. First, the new version, with some of its shortcomings highlighted:

And now here are the same shows, in the old format:

So much easier to view! So much easier to find things of interest!

When they switched to the new format, I wrote an e-mail to complain. I did not expect a meaningful response. Noticing the link today, inviting me to switch back to the old format, was a most pleasant New Year’s surprise. I wrote to them again, thanking them for making the old format available. I hope it stays that way.

I know, I know, let this be the biggest problem in my life, when people are suffering and dying in various corners of the world. For what it’s worth, I never for one moment forget how lucky I am to be able to enjoy the luxury of life in a country like Canada. But this stupid TV guide still bugged me :-)

 Posted by at 9:17 pm
Nov 192012

I am reading articles about the slow sales of Windows 8 and complaints about its user interface. All valid, I think. Indeed, there is an easy way to explain in two points why I would not recommend anyone to upgrade to Windows 8 on the desktop:

  1. Value added by Windows 8 over Windows 7 for the typical desktop user: None. (To be sure, there are some minor improvements, including speedups. But they are more than offset by the incomprehensible removal of the Start button and the equally incomprehensible move away from the Aero interface, which is actually quite nice.)
  2. Difficulties created by the schizophrenic nature of Windows 8 (“Modern” vs. “desktop”) and the cumbersome nature of a touch-oriented interface on a desktop computer: Lots.

In other words, you are paying a huge price (not the dollar cost of a Windows 8 license but price in the form of re-training yourself or your employees, and the inevitable productivity loss due to a very confusing schizophrenic interface) and you essentially get nothing in return.

Maybe Microsoft will fix all this with Windows 9. Maybe Ballmer has to go first.

 Posted by at 8:57 pm
Sep 272012

Earlier this morning, I came across the following headline on Google News: “Fewer crashes when docs report bad drivers, study finds“.

The headline almost made sense. Yes, bad drivers cause crashes, indeed the main reason why modern operating systems crash these days is bad third-party drivers. So being able to identify and report a bad driver kind of makes sense, but how would you do that? And what does it have to do with your docs? Did the author mean perhaps that a document, say, an HTML page, could display a warning about a bad driver instead of invoking the driver (e.g., to display video) and risk crashing the browser or the computer?

Then, about three tenths of a second later, I realized that the headline was about road accidents and medical doctors.

 Posted by at 5:40 pm
Aug 102012

It was over thirty years ago, back in 1979-1980, that I first earned money from a software development contract. My first assignment? Aircraft simulation, specifically tabulating the minimum safe take-off distance of TU-154 aircraft at Budapest airport under various loads and weather conditions.

Alas, the Hungarian national airline, MALÉV, is no more. But as of today, I became the proud owner of a MALÉV TU-154 B-2, with the original MALÉV markings.

No, not the real thing, I’m not that rich (and even if I were that rich, I’d not be spending my money on obsolete Russian aircraft), just a beautiful diecast model. Still, it’s a nice reminder.

 Posted by at 6:15 pm
Aug 082012

I am reading with astonishment an article in IEEE Spectrum on the origins of DOS. The author, a self-proclaimed expert on software intellectual property analysis, describes his attempt at a forensic comparison of early versions of MS-DOS and CP/M, to prove or disprove once and for all the allegation that MS-DOS was a result of theft.

But I find the article poorly researched, and also a thinly veiled attempt to plug the author’s company and analysis tools. Childish comparisons of identifier names and code fragments… really? The issue was never verbatim copying but the extent to which QDOS (which is the operating system Microsoft purchased and renamed) was derived from CP/M. It is clear that it was heavily influenced by CP/M, just as CP/M was heavily influenced by its predecessors, including operating systems written for the PDP-11. Does this constitute infringement? I certainly do not believe so. Indeed, something very similar (albeit more formal) occurred a little later, when the first IBM-compatible “clones” hit the market, and companies like American Megatrends, Award and Phoenix created binary-compatible versions of the IBM PC BIOS using “clean room” reverse engineering.

Some online commenters went so far as to ascribe ulterior motives to the author and question his sincerity. I think that is uncalled for. However, I do believe that this article should not have been published in its present form. At the very least, the author should have been advised by competent editors to tone down the plugs; to do a little bit more research on the topic; and to shift the emphasis from meaningless code comparisons to an analysis of the functional similarities between the two operating systems, the possible origin of these similarities, and the question of whether or not they might constitute infringement (and the extent to which the law may have changed, if at all, in this regard between 1982 and 2012).

 Posted by at 5:40 pm
Aug 062012

Today, I spent an inordinate amount of time messing with IMAP.

IMAP is a protocol that allows e-mail clients to access e-mail stored on a server. Unlike the more popular POP3 (Post Office Protocol version 3), IMAP (Internet Message Access Protocol) allows the messages to stay on the server, and allows clients to establish a folder structure on the server.

This makes it possible, in principle, to access the same mailboxes from multiple client devices like a desktop computer, a smartphone, or a tablet.

Don’t we already have this with any Webmail provider, such as Gmail, Yahoo! Mail, or the new Outlook.com? Well, yes, but… with all these services, your mail actually physically resides on computers that do not belong to you. I’d be less concerned about this were it not for a case that happened just the other day, a hacker using social engineering to gain access to a journalist’s iCloud account and through that account, everything else (including the journalist’s phone, laptop, and other accounts.)

If Apple can fall victim to social engineering, so can Google or Microsoft. So for this reason alone, I prefer to keep my e-mail on servers that I physically own. But I still like the convenience of accessing my e-mail from anywhere without having to copy bulky mail files or worry about synchronizing them.

This is where IMAP comes in. Except that it turned out to be a much more difficult task than I anticipated.

The basic setup is easy… enable IMAP and go. But then… the University of Washington IMAP server that is included with Slackware Linux has some quirky settings (such as showing all my folders on the server, not just my mail folders) that can only be corrected by recompiling. It took a while before I realized this, and therefore I wasted a lot of time with bugs in the various Android IMAP clients I tried, bugs that just went away once I recompiled the IMAP server. Outlook (which I plan on continuing to use on my main desktop computer) has its own quirks, not the least of which is the insanely difficult nature of seemingly trivial tasks, such as relocating built-in folders like the junk e-mail folder.

In the end, I won. There are still some quirks to be worked out, but I can now access my e-mail from Outlook, the Web (with Squirrelmail) and from my Android phone and tablet just fine. Still, it was a much harder battle than it should have been. I honestly expected this technology to be more mature in the year 2012.

 Posted by at 6:36 pm