Archive for July, 2006

Search engines reacting to a new WordPress permalink structure

Tuesday, July 18th, 2006

This blog originally started with the default permalink structure: to reach a post, the URL would contain the ID number of that post, like this: http://www.randomsynapses.org/?p=43 . Actually, it started with a different URL, as a subdomain. It’s only been 11 months since the blog got its own domain name. Anyway, the links are only examples, take ‘em that way.

After the first few posts, I decided on using a more intuitive structure which included the date and the post “slug” (the title in lowercase, with dashes instead of spaces), like this: http://www.randomsynapses.org/2005-10-23/fixing-western-digital-scorpio-clicking-noise/ .

This is how Google and the other search spiders indexed this site, and how I posted links to my own contents on various sites and forums over nearly two years (one year, considering the current domain name).

About a week ago I became annoyed with the date being included in the link. Ok, it helps having it there as an obvious indicator of how old a post is; but it really looks ugly. So I thought, why not just change the permalink structure? What can go wrong? My two “fans” subscribed to this blog in BlogLines not finding my posts? The forums that don’t draw many visitors here having wrong URLs? I had little to lose, but a lot to learn: let’s see how fast search engines catch up with the new structure, which now looks like: http://www.randomsynapses.org/fixing-western-digital-scorpio-clicking-noise/ .

By the way, all three URLs exemplified so far point to the same post. The second one no longer works because of the new permalink structure in WordPress, but I’ll get to that a bit later.

To make things more complicated, I have a custom 404 page that redirects the browser to the main “index”, so to speak, in case a visitor tries to access an inexistent address. Although the web server should clearly indicate this with the 404 message header, I’m not exactly sure if search engines pick it up or just follow the redirect in a meta tag. Normally, search engines should identify 404 messages and drop those pages from the database. So my old URLs should disappear from Google fairly quickly, while the new URLs are being added. Just to make sure, to force search engines to drop the old URLs from the index, I added specific lines in robots.txt file to deny access to /2006-*-*/ for instance — that would match all URLs for posts published this year.

But I didn’t stop here. Google has a really neat service for webmasters, Webmaster Help Center, where you can get some neat stuff done with the sites you manage. I had interest in the way Google used my robots.txt file to decide what to index and what to skip, and in the Google Sitemaps service, as well as some statistics about what Google “sees” on your site. So I added my site to Sitemaps, confirmed it by placing a meta tag in the head section as instructed, installed Google Sitemaps Generator plugin for WordPress, generated a sitemap file and had Google use it.

And then, I waited, watching my web host’s recent access log every couple of days and Google’s tools for webmasters.

At first, the blog would get a lot of hits on old URLs with the former permalink structure, including the date. Because of WordPress’ current design, once I changed the permalink structure it no longer recognizes the parameters passed through the old structure, so all visits to old URLs were getting the 404 page and getting redirected to the main page of the blog. This probably has pissed off or turned away some people which were not getting the contents they were looking for.

It was search spiders I was interested in, not real visitors. Google, MSN and Yahoo seemed determined to hit, verify and reindex URLs with the old permalink structure. But a day or two after the switch, they all started requesting my robots.txt like mad, and indexing the most recent posts with the new permalink structure. Day after day, they kept requesting old and new URLs, with a clear trend of increasing frequency for new structure and decreasing frequency to old URLs. A promising start, isn’t it?

It’s true that Google still shows the old structure in search results and keeps a cached copy, although I added a meta tag to prevent that. It will take some time for this to sink in, apparently. See for yourself, search for wd400ve-75hdt0 — the post linked above appears 8th from the top.

Curiously enough, Google’s stats show me that it got over 25 “Page not found” (404) messages for old URLs, but also that on its most recent visit it could not find the robots.txt file on the site. Say what?

Before I close, I’m curious if there is a WordPress plugin of sorts that helps smoothing out the transition to a new permalink structure. I imagine I could do it by fiddling with the .htaccess rewrite rules, but is there a neat, clean, easy way of doing it by extending WordPress’ permalink functionality with a plugin?

[Edit] Yes, there is: Dean Lee’s Permalinks Migration Plugin. Now you don’t have to go through my pain.

Networking basics, tools and principles

Sunday, July 9th, 2006

One of my older interests, computer networking, has finally received a recent “upgrade” by rounding up my toolbox.

Previously in my toolbox: RJ11 and RJ45 crimping tools.
Added to the toolbox: 110 and Krone punch-down tools, intelligent cable tester with LCD display.
Near future needs: cable tracer/identifier, either purchased (kind of expensive and little used) or DIY (dirt cheap, more time involved, unprofessional look).
Long-term possible purchases: better cable tester, including Time Domain Reflectometer function to locate where a wire is interrupted. Expensive and not needed at this time.

With the new tools I was able to find out that the cables I installed in this apartment last summer were pretty badly done. Back then, I crimped the wall cable and, in one year, nearly half of the electrical connections were interrupted or intermittent. Now, after installing proper wall jacks and patch cables, only one pair of a cable is still interrupted somewhere in a wall, but it’s not influencing the network.

Why did I need all these tools and how are they used? Here’s a brief network cabling primer.

It all starts with intelligent wiring of your location. Think ahead of your needs and, if you’re still going to make a mess with running cables through walls, do it properly and with sufficient room to grow in the future without having to take the walls apart again. Find an out of the way, central location for the networking equipment; you’ll install a 19″ rack here, where the patch panel, switches and other equipment will be locked in. Determine where network connectors are needed now and where it might be a good idea to have them in the future. Figure out how to run the cables from the central location to each socket. Decide if the cables are far enough (at least one meter) from sources of electromagnetic interference (power wires, motors, fluorescent lights); if yes, use unshielded cable (UTP), otherwise go for shielded cable (FTP). If running cables over false ceiling tiles, you might need to use special cable type whose insulation doesn’t produce toxic fumes in case of fire.

Run CAT5e cable for each socket. Use “wall” cable for this, it has a single copper strand for each wire and, as a result, it’s pretty stiff. If ran horizontally, install supporting brackets one meter apart; the cable being rigid, it will support its own weight easily. If you tie cables together (with cable ties or whatever), don’t squeeze cables together too hard, let them slightly loose. Don’t bend cables at sharp 90 degrees, give them a small bend radius. Don’t pinch, tear, cut or punch cable insulation. Label all cables. Leave extra cable at each end before cutting it.

Hint #1: Run two network cables (CAT5e) and a voice cable (CAT3, one or two pairs, one pair per phone line) for each wall socket location. This will make it easy to double the number of computers installed and easily add/move phones around, or use the second cable in case something goes wrong with the first.

Wall cable doesn’t get crimped because the thin, metallic fins in the RJ45 connector can’t cut through the single copper strand in each wire, so they get bent and only make partial contact in most cases. The only kind of cable that gets crimped is “patch” cable, which has each wire made of several, thinner strands of copper wound together, giving flexibility to the cable and allowing the metallic fins in the connector to pass between these strands in each wire, ensuring better electrical connections.

Wall cable is connected at one end to a network socket mounted in or on a wall, and into a patch panel at the other end, where the central networking equipment is. Basically, each wire in the cable is punched through a metallic Y-shaped contact which cuts through the insulation. There are two types of connectors: 110 and Krone. Krone has the metallic contact at 45 degrees to the wire, while 110 has a right-angle position. Each type of connector needs a different punch-down tool. Decide which you want to use and buy the appropriate punch down tool, wall sockets and patch panel.

Note: Wall sockets with screws for wires look the same as Ethernet sockets, but they’re not; they are designed for ISDN telephone wires, and not appropriate for networking.

Hint #2: Get both kinds of punch-down tools if you want, they’ll be handy and not expensive. Some patch panels and wall sockets are dual, having connectors both for 110 and Krone. 110 is more widely used in telephone systems.

Decide on the color coding to use for connecting wires: TIA/EIA 568A or 568B. Connect wires to sockets, mount sockets in walls or apply them on walls, connect wires to the patch panel. Label each socket and connector and its corresponding port in the patch panel. If you used shielded cable, the shield foil will be a bit of pain, but you need to connect it as well — and all cables in the network must be shielded, otherwise it’s useless. Make sure you don’t untwist wire pairs for more than 2.5 centimeters (one inch).

Hint #3: Most people prefer 568B color scheme. It’s up to you, just be consistent so fault finding and upgrades/replacements are much easier and less time consuming.

Hint #4: Help yourself (and others) understand what port in the patch panel goes where, by using a simple naming convention. Number wall sockets and assign letters to each port. For a two-connector wall socket, name them 1A and 1B, for the next wall socket go with 2A and 2B, and so on. Keep numbers tidy, group them by location in the building. You could have a name like 245A, indicating left connector (A) on the wall socket number 5 in office/room/work area number 4 on 2nd floor. Leave room in the numbering system for growth, use sequential numbers only for small groups of outlets.

With cables connected to patch panel and wall sockets, test all cables at least with a cable tester, to make sure you have the right cables and labels, you have continuity and proper wire pairing. Professionals will go as far as test the signal quality, certify the wiring for certain speeds and guarantee performance of this infrastructure.

You should now have a patch panel (or more) with lots of ports connected to sockets throughout the building. It’s not surprising to have 48 ports wired up for a network that will start with 6 or 10 PCs, but with a high probability of increasing the computer infrastructure in a few years. The many ports gives you flexibility to move computers around, there’s always a network socket nearby, no need to run long cables across the floor and tell people “don’t trip over the cable” a hundred times a day.

A network switch is mounted in the rack. You’ll use short (30 centimeters), pre-made patch cables, to connect the ports in the switch with the ports in the patch panel corresponding to wall sockets being used. If the switch has management capabilities, make note which port is connected to which wall socket, so you know whose computer is connected to which switch port in order to assign access rights to the network. In the building, connect the computers to nearby wall sockets with pre-made patch cables — they come in various lengths: 1, 3, 5, 10 meters.

Voice cables connect to phone jacks in the office and something similar to a patch panel at the central location, from where other cables will make the connections to the PABX or the lines from the phone company.

So, there — all done. Notice that I haven’t used the crimping tools. That’s because they are normally used to crimp patch cables. It’s cheaper to just buy pre-made and certified patch cables to the desired length and color, than to buy a roll of cable and build your own cables. The crimping tools are handy in emergency situations, though.

Self-discovery through work

Friday, July 7th, 2006

So I’ve been a truly working man for little over a month. I’m still trying to adjust, got so much to learn and catch up on. But after a month of work, I definitely discovered some equally interesting and somewhat useless facts.

I can drink far more coffee than I ever did, even when staying up at night studying for exams, and not get sick or feel any — ANY — effect. It’s not decaf, I checked. And I still get sleepy after lunch.

I am more efficient at work in the afternoon than in the morning. Some people move mountains before lunch, then relax during the afternoon. I only get into high gear after 3:30 in the afternoon. Then, before I know it, everyone gets ready to go home and it looks like I’m doing overtime, typing away in a frenzy. Don’t effin’ interfere with my productivity cycles.

Sitting all day in front of a computer, I’m starting to miss interacting with humans more often. Many times I won’t just go to a colleague two desks behind me to interrupt his/her work to ask a question, I’d send him or her an instant message. So impersonal, so annoying, so bare and stripped of non-verbal communication, such an easy path towards smiley abuse. :):):)

Days are useful only for scheduling meetings. My time is counted in weeks, divided into “work” and “week-end.”

My beard has a mind of its own. It grows in irregular patches, has different growth speeds, some days it’s smooth and coarse in others. Shaving once a day is too often, once every other day is not frequent enough. It’s freaking annoying.

I’m good and fast at ironing shirts. No, I won’t do yours. I’m not interested in your money either. Get a girlfriend, she’ll make you iron your shirts, she’ll spend your money, and you’ll be really happy about the whole situation, too.

I’m not paying attention at the people around me on the subway. So many of them, why would I show any interest. And just when I don’t pay attention, someone I know taps on my shoulder and says, “hey, what’s on your mind, I’ve been standing next to you for 10 minutes and you didn’t notice.” Dude, I ain’t using the subway to socialize, I just need to get from point A to point B like the other million people doing it every day. Get over it.

Bah.