Subscribe to RSS Subscribe to Comments

Alan Blaine Whitney

Decade

So I have been at the web thing for a decade now.  That’s a long time, over a third of my life.  More than likely, the next decade will include me working on web related technology. So I wanted to make some predictions about the future of the web.

SEO will be less important

SEO really started to get some commercial traction around 2002.  At first it was not a front and center thing, by 2005 everybody who was anybody was doing it.  The SEO industry was starting to get over the top, link baiting, keyword densities so high, they were unreadable, showing google a different version of the webpage than normal folk, etc.

So much of mainstream web development is doing keyworded URL’s, XML sitemap and rich keywords in title/meta/content.  So many good tools are available to everybody, including google webmaster tools and the like.  I just don’t see SEO existing as an extra anymore, but just a simple standard.

Location based web is going to be huge

Over the next decade as devices that are location aware are more mainstream, more web items will become aware of it.  At this point, I can’t envision all of the possibilities of this, but apps like foursquare could be the next big thing.

Network Recommendations

Instead of searching for what you need, say a plumber, I think recommendation engines based on social media input may replace traditional search.

Also, as SEO disappears, I think will will Social Media Optimization grow.

gzip compression

A very typical sql file

~# mysqldump -u root -p db > ~/sql
~# du -h sql 
45M	sql
~# gzip sql
~# du -h sql.gz 
11M	sql.gz

PHP Oddity

This was tested on PHP 5.2.6 and 5.2.10, you mileage may actually vary.

 <?php
$number = 20864.01;
$num = $number * 100;
echo intval($num);
?>

If such a piece of code was ran, but would one expect, 2086401 maybe. I would, but you actually get 2086400. Strange.

<?php
$number = 20864.01;
$num = $number * 100;
echo intval(round($num));
?>

That will give you 2086401.

UPDATE: I guess this problem is not a PHP per se but a glibc issue.

Reloading Information

The other day I was thinking some about reloading shells. The process of taking spent rifle brass, and making them ready to go again. I am reloading for .270 winchester. The load my rifle has fellen in love with is 130 grain hornady SST in front of 55 grains of IMR-4350, touched off by a CCI 200 primers. Rifle groups pretty good with them.

Just thought I would share my cost. For 100 rounds, I need about 3/4 of a pound of powder, 100 bullets, 100 primers. I have plenty of brass, so this assumes that is not an issue. Plus 30.06 brass is easy to come by, which is one trip in the resizing die and becomes 270 brass.

Here are the cost of making 100 rounds of ammo.

Van Raymonds Midway Cabelas
100 x CCI 200 large rifle primers $4.50 $3.09 $3.29
1 lb x IMR-4350 $33.99 $22.99 $24.99
100 x 130 grain hornady SST $37.99 $26.99 $26.99
total reloading cost per 100 $76.48 $53.07 $55.27
100 rounds of purchased live ammo $179.95 $124.95 $129.95

So midwayusa is the cheapest, but it cost about 30 to ship the stuff. Cabelas is pretty good too, but about a three hour drive away. Even buying components locally at van raymonds is cheaper than buying pre-loaded ammo at cabelas.

So in theory reloading saves about 55% the cost of buying pre-loaded factory ammo. It’s generally more accurate to boot and you can customize loads to your gun. Reloading is fun too.

The down side of reloading, you actually don’t save a penny. I am not even talking about the up front equipment cost. I mean, you will shoot twice as much as before, and you shoot away any savings you may of had, but it’s fun.

Debian Etch to Lenny Migration

At my place of employment, sephone internet solutions, we just finished our debian upgrades. Overall I have huge respect for debian and the apt package tool. Overall the migration from etch to lenny across several servers was easy, except for one back.

One server required the bnx2 firmware for a Broadcom NetXtreme II NIC. For one reason or another, the bnx2 driver was not found after doing a standard debian upgrade. This was quite a problem. After apt finished with what looked like a flawless upgraded, I rebooted the box and it had no network interfaces.

After messing with udev and dmesgs for a while, I was able to find this in a log file

Feb 15 14:29:34 sentry kernel: [ 1856.770927] Broadcom NetXtreme II Gigabit Ethernet Driver bnx2 v1.7.5 (April 29, 2008)
Feb 15 14:29:35 sentry kernel: [ 1857.257121] firmware: requesting bnx2-06-4.0.5.fw
Feb 15 14:29:35 sentry kernel: [ 1857.450033] bnx2: Cant load firmware file bnx2-06-4.0.5.fw
Feb 15 14:29:35 sentry kernel: [ 1857.450033] bnx2: probe of 0000:05:00.0 failed with error -2
Feb 15 14:29:35 sentry kernel: [ 1857.833817] firmware: requesting bnx2-06-4.0.5.fw
Feb 15 14:29:35 sentry kernel: [ 1858.185818] bnx2: Cant load firmware file bnx2-06-4.0.5.fw
Feb 15 14:29:35 sentry kernel: [ 1858.185818] bnx2: probe of 0000:09:00.0 failed with error -2

After finding that, I asked a co-worker to manual download the package through a browser on a different machine, put it on a CD, and manually place the file as /lib/firmware/bnx2-06-4.0.5.fw.

With the file now there I needed to try to reload that module

modprobe -r bnx2
modprobe bnx2
/etc/init.d/networking restart

Lo and behold, I now had network. With the network working, I wanted to install the proper debian package: firmware-bnx2, which is found in non-free, which I already had in /etc/apt/sources.list, but first, I needed to get rid of the file I put in there, in case it messed anything

rm /lib/firmware/bnx2-06-4.0.5.fw
apt-get install firmware-bnx2

I rebooted to make sure that it was going to work. Later it came to me that there was a much simpler solution to this problem, reboot, and in the grub menu, pick the etch kernel, it should boot with network, install firmware-bnx2 and reboot to the new kernel. I had not thought of that until later though.

Server Admin Errors

Every sysadmin loves seeing these errors

hdd: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdd: dma_intr: error=0x40 { UncorrectableError }, LBAsect=95559021, sector=95559015
ide: failed opcode was: unknown
end_request: I/O error, dev hdd, sector 95559015
Buffer I/O error on device hdd1, logical block 11944869

SQL CSV Export

Nothing new here, but had forgot how easy it is to export to csv in mysql

SELECT * INTO OUTFILE 'result.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FROM my_table;

Note that this file will be created on the mysql server, not the client.

Register.com

I let a domain expire by accident. I thought it had some type of auto-renew on it, which it did not, so it expired. I really wish they would have sent me a notice a few days before giving me a heads up, but that’s even okay.  My bad for not making sure that it would auto-renew and charge my credit card.

Here is why register.com did that really surprised me. Once my domain expired, they listed the name servers as ns2.expireddomains.register.com and ns1.expireddomains.register.com. These name servers will serve everything as 74.54.82.222, even www.google.com, with a one hour time to live. This is problematic for several reasons. One is that it can give the impression that something is resolving when it is not. Another is that records that once did not exist, now do.

The thing that really frustrated me though, was mail.  The listed name servers will give everything a MX record of grey-area.mailhostingserver.com.  This is a real mail server that accepts all mail.  So somebody can email you, and instead of getting a bounce, the email just disappears into the ether.  More than that they give it a 2 day time to live.  So even after you do renew the domain, your email is screwed up for two days.

I would imagine that at least one-third of expired domains are accidents and they get renewed.  So register.com in their wisdom, hose your email for two days for making a mistake.  More than that, I have given register.com $35 for 7 years on that domain, and use them for nothing other than pointing the dns to another’s name servers.

So I have left register.com and switched to another company.  Thanks register.com for nothing.

Really Bad Code

I just fixing up a reported bug of a really old application.  In trying to fix the code I ran across this piece of code.

return ( floor((  146097 * $century)    /  4 ) +
                floor(( 1461 * $year)        /  4 ) +
                floor(( 153 * $month +  2) /  5 ) +
        		$day +  1721119);

Zip Codes

I nearly never have been able to find a good zip code database, just simple SQL with zips, towns latitude and longitude. The closest I have found is boutell’s Free Zip Code stuff.  Which is still not right, it’s in CSV format, which is easy enough to change, but I want SQL.  So I made it into SQL.

Download Zip Codes in SQL

It nearly goes without saying, but I accept no responsibility for the quality or accuracy of the database or any implications from using it.

Published under the Creative Commons Attribution-ShareAlike license.

Next Page »

Based on FluidityTheme Redesigned by Kaushal Sheth Sponsored by Send Flowers