Thoughts

A few site improvements

Over the last few days, I’ve been making small changes to the site design. You may or may not have noticed them. Here are a few:

  • Made the header graphics smaller, to reduce page height. This change was subtle, but it did save about 80 pixels.
  • Moved the byline and feed flares to the top of each post. They were previously located at the bottom. The feed flares are the links that allow you to share posts with others via social networking sites or email, should you find them interesting. If you do, I encourage you to use them. I put a LOT of time and effort into my blog every day, and it means a lot to me when others find value in my content and spread the word about it.
  • Removed certain sections from the sidebar, to reduce clutter.
  • Moved the translation links from the sidebar to the footer. These links allow you to do a one-click translation of whatever page you’re on into another language, using Google’s Language Tools. If you speak another language, try them out, and let me know if you’re happy with the accuracy of the translation.

I finished upgrading the site to WordPress 2.2.2 tonight. It took a couple of hours, but I like the new admin interface, and the new built-in caching capabilities should help as the site traffic continues to grow. I highly recommend WP’s extended upgrade instructions, in case you’re thinking about upgrading your own WP installs.

I’ll continue to make various improvements to the site here and there to ensure a good user experience. If you have any suggestions about making the site easier to read, or making content easier to find, or some other feedback about my blog, please let me know.

Standard
Events

Accident on I-495

Ligia and I were taking a leisurely walk on Beach Drive last night (Friday), when we were confronted with the overpowering smell of spilled fuel. On our way there, we’d seen a fire engine, but we didn’t think twice about it. This time, I thought I’d inquire, camera in hand. After walking through 100 yards full of fuel fumes, we were both a bit nauseous, but I pushed on, curious. By this time a few police cars had gathered as well, and I could see that there were two fire engines and more policemen on I-495, which runs parallel to Beach Drive on that portion of the road. Something big had happened.

Accident on 495 (1)

I walked up to a policeman’s car, waved, and he rolled down his window. “What happened?”, I asked. He lifted his eyes from the keypad of his laptop. “We got one death, and an overturned tanker,” he said, then looked back down at the keys. “That’s why the fuel smell…” offered I. “Yeah.” I thanked him, walked forward, took a few photos, then turned to join Ligia. It was then that the mention of death registered with me. Oops, I was more concerned with the stench of fuel than someone’s death… Shame on me. It’s sad how only the things that affect us personally register properly in our span of attention.

I don’t know who died up on that highway, and how he or she died, and truth be told, death always leaves me speechless. Don’t look to me for consolation when someone dies, because I won’t know what to say. I’ll just give you a blank stare, followed by an awkward pause and the usual, trite phrases.

Accident on 495 (2)

What I did want to say tonight is this: please be careful when you’re driving. That person that died out there was probably on the way home after a long work week. They were probably looking forward to the weekend, perhaps spending time with the one they loved. Now, they’re not here anymore. When you’re out on the highway, barreling down the lanes in your car, upset that the people in front of you are too slow, think about that. It may be your mistake or someone else’s, but you may end up dead. Keep your eyes peeled, put that phone down, and drive safely.

Accident on 495 (3)
Standard
Thoughts

Talk about screwing up

I get digest emails from the Economist every Thursday, on politics and business. Two things caught my eye in today’s edition.

  1. Chrysler appointed Robert Nardelli as its CEO. This is the same guy that left Home Depot after employee and investor dissatisfaction with his management and personal style, with a severance package worth about $210 million. So the guy pisses off people at Home Depot left and right, is run out of the company, but gets hundreds of millions in bye-bye pay… and then Chrysler hires him? Isn’t Chrysler supposed to be in trouble as a company? What do they see in him?
  2. Trump Entertainment Resorts reported a second quarter loss that was more than double that of last year’s. So they’ve been losing money all along, just like all of the other business ventures run by Trump, and yet their share price surged when they released their earnings report?! Are the investors sane?!

I’m going to rant a bit now, because I’ve wanted to say this for a long time. Donald Trump has to be one of the most overrated businessmen ever. On the whole, his career and life are an exercise in ridicule.

Take business: for years, he’s managed to do poorly in his ventures. He’s had a few successes, but on the whole, he’s run project after project into the ground. The ones that are still standing are so heavily in debt that they should be dead by rights. Yet investors continue to sink money into his ventures in spite of all evidence to the contrary. The guy cannot run a business in the black. He’ll run them all in the red, and he’ll pay himself tens of millions while his companies wither away.

Take life: he managed to get a TV show that was a hit with the general populace — that in itself was incomprehensible. He, the clueless, poorly performing CEO, dared to dole out business advice to others, and to act as a role model for other businessmen. If Trump is a model for American business and leadership, then God help us, because we’re headed for the crapper!

Take style: the man looks like he’s got a dead cat on his head. Over the years, he’s persisted with that cockamamie hairstyle to the chagrin of decent people everywhere.

Trump seems to be rubbing it in our faces: he’s ridiculing us. He may be saying something else, but his actions say, “Look, I’m going to thumb my nose at all of you. I’ve got you all eating out of my hand even though I can’t run a business to save my life.” In spite of this, people clamor to kiss his behind and stand in line to invest in his businesses. I don’t get it.

It seems to me that greedy losers do best in modern business, and Americans on the whole love to celebrate them. The two people I mentioned in this post are just a few of the guilty parties. But then, is that any wonder when almost every CEO has ridiculous compensation packages regardless of their job performance, and when companies (especially those that deal in non-physical assets) are stupidly overvalued? I think we’re headed for the crapper, and Trump and others like him are the icing on the cake that’s going to give us the runs.

Standard
Places

Dog under window

This photo was taken at the house of Ion Creanga, near Iasi, Romania. He was a famous and dear writer of folklore and fairy tales, among other things (see Wikipedia for more details). This was his country cottage. It’s called “Bojdeuca lu’ Creanga” in Romanian. I took it last summer during a whirlwind tour of Iasi and its surroundings.

Dog under window

Standard
How To

Automatic redirect from HTTP to HTTPS

IIS (Internet Information Server) doesn’t have a way to automatically redirect HTTP traffic to HTTPS if SSL encryption is enabled for a site. So if you’ve got a site that users are supposed to access by typing in https://www.example.com, but they type in http://www.example.com or http://www.example.com or just example.com, they’re going to get a pretty ugly error message that looks like this:

What can you do? Well, there are two ways of going about it, and both of them are hacks, but they do the job just fine. I prefer method 2 myself.

Method 1:

Make sure the original site (the one with SSL encryption) is listening only on port 443 for the IP address you’ve assigned to it. Now create a separate site using that same IP address, and make sure it only listens on port 80. Create a single file at the root level and call it default.htm or default.asp. If you want to use HTML, then use a meta refresh tag. If you want to use ASP, use a redirect. I’ll give you examples for both below.

<meta http-equiv="Refresh" content="0;URL=https://www.example.com" /> 

or

<% Response.Redirect("https://www.example.com") %>

Don’t forget to enclose each line in its proper brackets. This method works great, but it has one shortcoming. If the site visitor chooses to go to http://www.example.com/somepage.htm, they’re going to get forwarded to the root-level of the HTTPS site, because that’s the nature of the script. It doesn’t differentiate between the page addresses. So you may ask yourself, isn’t there some other way of doing this? Yes, there is.

Method 2:

This method doesn’t require the creation of an additional site. All that you need to do for this is to create an HTML file — I call mine SSLredirect.htm — then point IIS to it using a custom error capture. First, here’s the code that you need to paste in that HTML file:


<script language="JavaScript">
<!-- begin hide

function goElseWhere()
{
var oldURL = window.location.hostname + window.location.pathname;
var newURL = "https://" + oldURL;
window.location = newURL;
}
goElseWhere();

// end hide -->
</script>

Once you’re done editing the file, save it to the root level of your site, or to the root level of IIS (c:\inetpub\wwwroot\). Saving it to that general location lets you use that same file to fix the HTTPS redirection problem for all of the sites you host on a single server.

Now, in IIS 6, right-click on the site in question, go to Properties >> Custom Errors, and double-click on 403;4. Select File for Message Type, then browse for the file you’ve just created and click on OK. In IIS 7, click on your site, then double-click on Custom Errors, locate the Add link in the top right-corner, and add an error for 403;4, as shown in the image below.

IIS 7 Error Configuration

Once you’ve done this, your sites should automatically transfer HTTP traffic to HTTPS when it’s required, and the visitors won’t be forwarded to the root-level of the site. Instead, the URL will be remembered, and the page will simply be re-loaded using the HTTPS protocol. Come to think of it, you could write this in ASP as well, and avoid potential problems caused by browsers that have JavaScript turned off, but this code should work just fine for a lot of people.

Standard