Month: October 2014

The Latest Wave Status – Past and Future

In case you hadn’t read the article on creating wave plots using NOAA data, here is the latest version of the same plot. To the things mentioned in the article, I added wave forecast including a highlight of the waves in my preferred range, 1 to 2 meters (waist high to overhead). Enjoy!

Latest Plot

SQLite Support in Joomla

It’s been a while now that I’ve been eyeing the SQLite implementation of Joomla. There have been lots of teasers, so far, but never could I ever click on the “Select Database Type” field and enter, sqlite. Finally, I got sick of waiting on a release and decided to go solo. I would find out who was working on SQLite for Joomla, track them down, offer them encouragement and help, if needed cajole or threaten, and finally get a SQLite implementation that “just works.”

Why Joomla and SQLite?

At first, I was hesitant to want that combination. After all, installing Postgres or MySQL is not really a big deal, especially considering that installation of Apache is still orders of magnitude worse. But then I found that I can start a Joomla instance just by invoking the php server process in the Joomla main directory – suddenly life on development servers was much easier.

If you don’t know what I mean, here the skinny: you can just unzip the Joomla download into any directory, change into it, and type: php -S localhost:XXXX. XXXX has to be a number above 1024, something like 8000. Then you can simply go to your browser, type in localhost:XXXX (again, same number as before) and you can start installing Joomla. Once you are done installing, you can simply go there again and test and test.

That means that if you had a way to store your database locally, with your Joomla files, you could simply copy the whole tree and have a different instance running. You would go to the copy, change the paths in the configuration file, type in php -S localhost:YYYY and off you go with your new instance.

Can’t run MySQL on your web host? Problem solved. Don’t want to install a database server just for the occasional glimpse at your files? No problem. Want to see how a change to your site is reflected on your underlying files? There you go!


The Most Important Invention of the 20th Century

Ladies and Gentlemen! Please join me in honoring the winner of the World’s Most Important Invention of the 20th Century!

Our candidates, first. In no particular order, I give you:

  • Automobiles
  • Airplanes
  • Antibiotics
  • Computers
  • The Internet

And the winner is…

A write-in candidate! It is the Fast Forward button on the remote!


DYMO LabelWriter 4XL on Ubuntu

Call me a freak: I don’t like writing on envelopes. I dislike the way it feels when you push on an envelope already stuffed and sealed, I don’t like making a mistake and having to unseal and restuff. And let’s not even talk about the days when you have to send out a bunch of mailers – thankfully that’s become less common these days.

So I got myself a Brother label printer. It’s one of those dual purpose printers you can use to label, say, an envelope, but you can also print the address on an envelope. The problem: I had to enter every single label by hand, print it, and then go on to the next one.

There was a USB connection, and there was software that allowed you to print to the label printer. But of course it ran only under Windows. I could have used Wine… Wait, no: I used Wine to make it print, but it crashed consistently, like a great many hardware-dependent software does in an emulation.

Enters Woot, that had a phenomenal sale on one of the top model label printers, the DYMO LabelWriter 4XL. Where 4XL stands for 4 (their top series of personal label printers) and XL (as in the size of labels that thing can print – which also happens to be 4″).

I had already researched enough to know that DYMO was open-source friendly-ish. There was a published CUPS driver, and software floating around. Woot is an Amazon company, so I trusted them to take the thing back if it didn’t work as promised.

Well, the printer arrived today and I am already writing an article about it. So you already know how hard it can be to get it to work: less than 30 minutes. Even less if you read this article!


Adding Tides to Wave Chart

Will I ever be able to rest on my laurels? I was barely finished with my wave chart that I decided it would be even more awesome if it showed me the tides. Of course, the tides for the past are not all too exciting, but if you want to know when to go, today’s tides are mighty fine.

So, to adjust the chart, I needed to find a library that handles tide. There are probably more than just one, but this one seemed to do the job just fine, so I used it. Figuring it out was not hard, thanks to examples provided, and adding the functionality to the chart was mostly trivial. Here is the 411.

The library I used is called pytides. You can simply install it by running

sudo pip install pytides

It will run off after you provide it with your password and gather all dependencies and then install them onto your system. If you already installed matplotlib, then you have numpy already on your system. If not, pip will install numpy along with pytides, which can take forever. If you are on a Debian/Ubuntu system, you are better off installing numpy first, and then using the line above.

The changes to the code are in several places:


Flying Spirit

Spirit LogoSo, I took the plunge and booked a flight with Spirit Airlines. For those not in the know, Spirit is a low-cost airline with tons of extra charges, like the ones that had been popping up in Europe, and not unlike its competitor Frontier.

The basic idea is that you pay a “base price” that is much lower than other airlines’ fare. Then you have to pay for extras that are free-ish on other airlines. For instance, on Spirit you pay for carry-on luggage. Also, you pay for drinks on the plane (even soda!). You even pay if you lost your boarding pass or didn’t bother printing it at home.

Also, the flights themselves are very bare-bones. I am not the tallest guy in the world, but even for me the seats were uncomfortably close to each other. Sitting with the back glued to the chair, I barely had two inches of room in front of my knees. Also, the seats don’t recline – which is a must because every degree of inclination gets part of a chair into your knee.

There is no on-board entertainment system. The seats look worn and old. When we got onto the plane, there were pepitas strewn on several seats. All in all, not the best experience.

BUT! I paid about half as much as I would have on any other airline. That was absolutely worth it, and I would have considered upgrading to make my flight more comfortable. I could have done so on my first flight, but I wanted to see how Spirit does with bare bones. And it does well: it delivers as promised, and the flight experience is more than OK.


L’America: The Supreme Court on Gay Marriage

A few have asked me to explain the meaning of the refusal of the Supreme Court to review gay marriage again.

Let’s start with the technicalities: The Supreme Court of the United States, unlike many Constitutional Courts around the world, is the overall ultimate instance and doesn’t just decide matters of constitutionality, it has broad sweep of the legal landscape and its rulings are binding on everyone in this country. It is also free to choose the matters it wants to tackle. Technically, it is limited to reviewing lower court opinions, but since anyone with a chance to appeal, does, it gets to see pretty much everything that goes on in the legal landscape.

The Supreme Court (of the United States, short SCOTUS) heard a case last year. It was about a woman who had married another woman in a state where it was legal. The woman’s wife died, leaving behind a considerable estate. Since the couple were not legally married in the eyes of the Federal Government, the tax office wanted to collect estate tax as if the two were completely unrelated strangers, instead of the much lower tax rate for married couples.

This case, styled United States v. Windsor, was a particularly good case for the cause of gay marriage. Here we had a couple who had been married in the state they lived in for years, who was denied a substantial Federal benefit because the government chose not to recognize their marriage. This had all sorts of ominous undertones for conservatives and liberals alike: what was the Federal government’s business picking what marriages it liked?

SCOTUS decided the law on which this discrimination was based had to go. With the slimmest of possible majorities (5-4) it declared the law unconstitutional. Dissenting opinions (from three judges) focused on the legalistic argle-bargle, the confusing nature of the Court’s finding. In that, they were absolutely right: just as was the case in the Prop 8 case, the Court refused to be clear about its intent. Which is precisely what they wanted, the thing you would expect from a bunch of Catholics trying to do the right thing and not run afoul of church teaching.

After the ruling in United States v. Windsor, lower courts knew what SCOTUS meant. One after another, court cases on invalidation of same-sex marriage bans were decided, and virtually all of them were in favor of allowing gay marriage. More than that, every single appellate court decided in favor of same-sex marriage.