Do you have the time?

I’ve been running an NTP server on this host for quite some time now. But as of yesterday, I’m a member of the pool.ntp.org group. pool.ntp.org is a round-robin-ish DNS service where requests for pool.ntp.org are given IPs from a huge block of listed nameservers, balancing the load across a pool of about 1,500 NTP servers across the world. The official “entry” for this server is my IP (72.36.178.234), but ntpd is actually listening on all IPs right now, so using blogs.n1zyy.com or ttwagner.com will work.

I’m currently synced to Stratum 2 servers, but I think that, after I finish up some open tasks (“real work,” versus playing with time servers), I’m going to look at requesting permission to sync to Stratum 1 servers. (Stratums, err, strata, are basically tiers. “Stratum 1” refers to a server directly connected to something like a GPS (which obtains extremely accurate time: having the correct time is an important part of how GPS works, so GPS actually broadcasts the time from the atomic clock) or from WWV (transmitted over HF radio). Stratum 2 servers get their time from Stratum 1 servers, and so on. As I sync to a network of stratum 2 clocks, I become a stratum 3 server. Moving up a stratum generally implies more accurate time, as there are fewer intermediaries to skew results. (Although we’re talking milliseconds of difference.) There aren’t an awful lot of stratum 2 servers, so syncing to a stratum 1 server would help to round out the stratum 2 list. (It would be fun to become a stratum 1 server, but as a stratum 2 host says of his data center, “they’re not going to let me drill a hole in the ceiling to run an antenna [for the GPS] to the roof.”)

For those of you with UNIX systems, take advantage of this! You can sync to me directly (72.36.178.234), or indirectly (the pool.ntp.org cluster). (Windows can sync to an NTP server as well, it’s just not a standard feature.)

A Big Day

John Edwards has dropped out, leaving the Democratic race between Obama and Hillary.

The news from today that really shocks me, though, is that Giuliani:

  • Dropped out of the race, and
  • Endorsed McCain (!)

Giuliani scared me the most, but I think McCain is the one Republican that stands a chance of winning in 2008, which is equally as scary.

If the race had come down to Obama versus, say, Giuliani, I think it would be a landslide victory for Democrats. But if it comes down to Clinton versus McCain as early signs are showing? Clinton’s disliked enough, and McCain’s moderate enough, that he might just win it.

McCain is a rather interesting candidate. On one hand he’s taken many issues I like, such as speaking out against torture, among others. On the other hand, he’s part conservative, part lunatic…

State of the Union

Tonight is the State of the Union address.

As an aside, if I’m ever President, I think I’m going to direct those familiar with the speech to keep mum. I know that the State of the Union isn’t exactly the place for suspense and drama, but it’s kind of upsetting, in some way, to know exactly what he’s going to say before he says it. USA Today comments that Obama and Hillary will both be present, and ads, “Those two alone will draw most of the reaction shots shown on television.” So not only do we know what will be said, but we seem to know, as fact, what the cameras will be focusing on.

I hope Congress will vehemently oppose his push for permanent codification of warrant-less wiretaps into law, and am pretty leery of him being the one behind tax cuts (they seem to be given to the wrong people), but I do support (strongly!) his plan to curb earmarks.

The frequent Reagan comparisons (on the part of USA Today) are borderline creepy, by the way.

Web Design

I’ve redone ttwagner.com. It’s no longer a random integer between 0 and 255, but instead, a decent-looking site. I’ve integrated some of the cool things I’m hosting there as well. I came across a few interesting things I wanted to point out.

The world DNS page is incredibly intensive, and, since it’s not dynamic, there’s no sense in “generating” it each time. So I used the command wget http://localhost/blah/index.php -O index.html to “download” the output, and save it as index.html in the web directory. Viola, it serves the HTML file rather than executing the script.

But the HTML output was frankly hideous. The page was written as a, “You know, I bet I could do…” type thing, written to fill some spare time (once upon a time, I had lots of it). So I’d given no attention to outputting ‘readable’ HTML. It was valid code and all, it just didn’t have linebreaks or anything of the sort, made it a nightmare to read. But I really didn’t want to rewrite my script to clean up its output so that I could download it again….

So I installed tidy (which sometimes goes by “htmltidy,” including the name of the Gentoo package). A -m flag tells it to “modify” the file in place (as opposed to writing it to standard output). The code looks much cleaner; it’s not indented, but I can live with that!

I also found that mod_rewrite is useful in ways I hadn’t envisioned using it before. I developed everything in a subdirectory (/newmain), and then just used an htaccess override to make it “look” like the main page (at ttwagner.com/ ). This simplifies things greatly, as it would complicate my existing directory structure. (It’s imperfect: you “end up” in /newmain anyway, but my goal isn’t to “hide” that directory, just to make the main page not blank.)

I’ve also found I Like Jack Daniel’s. (Potential future employers: note the missing “that” in that sentence, which changes the meaning completely!) The site is a brilliant compendium of useful information, focusing on, well, Apache, PHP, MySQL, and gzip, generally. The “world DNS” page was quite large, so I decided to start using gzip compression. He lists a quick, simple, and surefire way to get it working. (The one downside, and it’s really a fundamental ‘flaw’ with compression in general, is that you can’t draw the page until the whole transfer is complete. This has an interesting effect as you wait for the page to load: it just sits there not doing much of anything, and then, in an instant, displays the whole page.) It may be possible to flush the ‘cache’ more often, resulting in “progressive” page loading, but this would be complicated, introduce overhead, and, if done enough to be noticeable, also defeat the point of compression. (Extreme example: Imagine taking a text file, splitting it into lots and lots of one-byte files, and then compressing each of them individually. Net compression: 0. Net overhead: massive!)

Gnome’s Trash Folder

Gnome (the desktop environment, not the creepy garden fixtures) has a “Trash Folder,” which is the functional equivalent of the Windows Recycle Bin. This is slightly problematic for those of us who are used to file “deletion” on Linux instantly unlinking the file, who don’t expect that the files are being moved somewhere. Especially as the developers made the icon a little more obscure, putting it in the very bottom right corner of the taskbar, where I overlooked it for quite some time. Now that I know it’s there, it’s easy to purge, just like I empty the trash bin.

But for geeks like me, you’ll be happy to know that the “Trash Bin” is nothing more than a directory, ~/.Trash. Thus you can empty it fairly easily, with “rm -rf ~/.Trash/*”  And you can use all the routine Linux filesystem tools: “ls” to show what’s in it, and “du -sh ~/.Trash” to list its contents and show the total size.

Update: Newer distros are putting it in ~/.local/share/Trash/files/ instead of ~/.Trash

Flash Plugin for Ubuntu

In the hopes of helping someone else…  Ubuntu has two options for a plugin for Firefox to play Flash. There’s the open-source Gnash and “the real thing” from Adobe. Of course what Adobe provides is closed-source, so there seems to be a tendency to push Gnash. But having used Gnash, it’s awful. I give them enormous credit for their work, but when I have a load average of 2.5 playing a 2-minute YouTube video, get lots and lots of dropped frames, and have random 0’s (a big ‘zero’) superimposed over the video, it’s alpha-level code. It’s not usable.

In theory, Ubuntu makes it easy to install the proprietary one, too. They can’t distribute the player itself, per Adobe’s license terms. So they have a package, flashplugin-nonfree, which downloads it from Adobe. The problem is that Adobe updated their version, so the script fails, citing an MD5 mismatch. (The file’s signature has changed, since it’s, you know, a different version.) Worst of all, it doesn’t handle this error appropriately: it tells you that the package installed successfully, when, in actuality, it aborts due to the error.

This happened in early December. The Ubuntu developers have been squabbling, yet to release an update: apparently the new version doesn’t work in Konquerer. As one person on the developers’ list points out, status quo is the worst case: Flash doesn’t work for anyone. But the developers seem unwilling to use a simple patch to handle the new version, because then Konqueror wouldn’t work. So some grandiose task is under way to try to integrate it with Konqueror, apparently. Meanwhile, no one can use Ubuntu’s package manager to install Flash player.

Fortunately, it’s easy to do yourself. Download the .tar.gz file here, and extract it somewhere. Pull up a terminal, go into the extracted directory, and type “sudo flashplayer-installer,” and follow the on-screen instructions. It’ll take about fifteen seconds. When asked for the location, you probably want /usr/lib/firefox (assuming you use Firefox, and are on Gutsy). You have to close your browser to do this.

Photography

An awesome comment on Ask MetaFilter gives some incredibly well-worded advice:

The camera matters not a whit.
The lens matters quite a bit.
The flash matters most in the kit…
…if you expect your models to be well-lit.

Of course, I have a good camera and a pretty good lens, but just the on-camera flash. I’ve had some pretty good luck with it, mostly with improvised solutions (that’s almost identical to mine: similar camera, exact same gold foil) to bounce light off the ceiling / walls. It looks dorky, sure, but it works.

But you should check this out. Not only is this guy an amazing photographer, but he gives a lot of great tutorials. I think my future photo-taking is going to work on finding skillful ways to use the flash for lighting. I’m sure there’s lots more that can be done with high-end flashes and radio slaves, but I want to start by mastering the built-in flash.

Letters to the Editor

In the local newspaper that mysteriously appeared on our kitchen counter, there are two letters to the editor in a row. (Actually, the second reads more like an article and has no name signed, but is under the “Letters to the Editor” section.)

The first starts off, “Granite Staters have always been among the first to stand up against discrimination of any kind, including opposing slavery, expanding women’s suffrage and supporting the Equal Rights Amendment. Adopting civil unions continues this proud tradition of standing up for what is just and fair.” It’s short, concise, and just praises voters for standing up for the rights of same-sex couples.

The next is about a Right to Life march. What an ironic pair of letters!

What I find strange is that the second letter/article never once mentions, “Killing unborn babies is wrong,” but is instead comes across as a rant on a slew of unrelated issues. One person is quoted as saying, “We’ve got to put the moral order back the way it should be… Reverse Roe v. Wade. Reverse civil unions…” He goes on to add, “There are more people coming in from Mexico and other places, and we’re killing ourselves off. That changes the voting demographic… They’ll wipe out the Constitution.” He goes on to complain about how “birth control has been proven to be extremely detrimental to those who use it… You have sex to have babies. If you don’t want  babies, don’t have sex.”

A second person mentions, “I heard on EWTN that after an abortion, females can get sick–cancer of the breast, cancer of the uterus.” The problem is that she says this right after the article includes a big paragraph about how no one has ever found a link between cancer and abortions.

Reasons to oppose abortion, then:

  • Gay marriage is immoral.
  • We need lots of babies to dilute the effects of those darned Mexicans who are coming into our country so that they can destroy our Constitution.
  • People who use birth control go on to lead miserable lives.
  • Despite a lack of any evidence claiming this, you might get cancer if you have an abortion.

Never mentioned:

  • They think abortion is killing babies and should thus be stopped.

To me, the latter argument would be a little more convincing. I really can’t understand what they were thinking with this letter. It’s also not as if I skipped over the section with the good arguments. I’ve basically given you a recap of the article, minus peoples’ personal backgrounds (neither of which involve abortion.) They just rant about irrelevant stuff, throw in a lot of incorrect statements, and even resort to some arguments dripping with racist sentiment. And yet, it’s very easy to present a strong case against abortion. They just fail–miserably–to do so.