back in my day…

floppythought1

In this post I am going to sound like an old man, so be prepared…

Over the weekend, I bought some new hard drives for my computer. They weren’t just any drives, they were the golden fleece of computer storage, TERABYTE DRIVES! My grand total at the check out stand was about $200. $100 per drive, on sale. You might be thinking, “big deal, who care, you can get those any where. whats so special?”. Let me take you on a short journey down my memory lane.

I really got into computers in 1993 (despite the fact that I wrote my first program in 1986). I started to tinker on a pre-built compaq presario that my grandpa had bought me for school. By 1996 I had started to build my own computers, and decided I was going to major in computer science. My physics teacher, Bruce Downey, was some what of a mentor to me in the field of computers. I worked for him as a teachers assistant my senior year. Instead of grading papers, many class periods were spent talking about the latest and greatest computer parts and what we would build if we had enough money. I can clearly remember looking at the back of computer magazines and saying,

I would build a computer that had a terabyte of drive space!

A terabyte was the holy grail of storage. In 1997, a terabyte looked like  a refrigerator, was about 6 feet tall, and required a server room environment to operate in. Not to mention the price tag of over $10,000 dollars. Definitely not for home use, and not something that a 15 year old could afford.

1997_tb

Fast forward to last weekend. It’s early 2009, 14 years after I was drooling over a massive (in size and price) piece of equipment that cost 10x my first car, and there I was, holding not one but 2 of the modern equivalents in my hand, and its common place. Today’s price and weight are a fraction of what a terabyte was in 1997.

2009_tb

The terabyte drive is the first piece of equipment that I can clearly remembering using the phrase, “one day I will own one of them”, with. The impressive part is that a terabyte for $100 is not impressive! The tech industry doesn’t slow down. I’m excited for the future, it’s going to be a whole new game.

So there it is. I am officially old now. I am blogging about the good ‘ol days when hard drives took up rooms, 56k was a “fast” connection, and the portable media was floppy!

I suppose I should shift my dreams to the monster petabyte drives that dominate the server rooms today 🙂
petabyte

JQuery 1.3 domination through deprecation

jquery 1.3

On a project I maintain, we recently rolled up to JQuery 1.3.1 from JQuery 1.2.6. Upon doing so, several things instantly broke.

I started seeing errors on lines like this:

if($('input[@name=username]').val() != "")

I decided to check the JQuery 1.3 relase notes to see what had changed.

The first bullet point answered my problem:

The ‘@’ in [@attr] has been removed. Deprecated since 1.2 this old syntax no longer works. Simply remove the @ to upgrade.

As it turns out, the @ style selector was depricated and wasn’t suggested for use when JQuery 1.2 was released, but it was still supported. At 1.3 the @ style selector was removed all together, and as a result broke our code!

Following the upgrade instruction I removed the @ symbol from the selectors, and the code started running again.

The result:

if($('input[name=username]').val() != "")

A simple and effective upgrade, and a reason to closely pay attention to release notes

Finally, a standardized cell phone charger

micro-usb

I have always been bothered by the fact that every cell phone I have ever owned has its own unique charger to go with it. When I buy a cell phone, like most people, I eventually buy a car charger for it. Over the years I have amassed a huge tangled mess of obsolete chargers. I’ve always wondered why the cell phone makers didnt agree on a single standard interface for chargers. It would make life so much simpler for everyone involved. No need for user to hunt for the right charger, or for stores to stock 30+ models, no need for the cell phone makers to re-tool their manufacturing equipment. It just makes sense to standardize.

Today I was happy to read an article announcing that cell phone makers and service providers have reached an agreement to standardize cell phone chargers by January of 2012, according to the GSM Association, which is leading the initiative.

The standardizations initiative backed by both mobile phone manufacturers and service providers and will result in a universal charger based on the Micro-USB interface for new mobile phones.

There are also environmental benefits to standardizing since fewer chargers have to be thrown away. One of the drawbacks will possibly be that when you buy a new phone they won’t get a new charger. Let’s hope that this will reduce the prices all the way around.

So far the mobile phone makers that have agreed to the new Micro-USB standard are

  • LG
  • Motorola
  • Nokia
  • Qualcomm
  • Samsung
  • Sony Ericsson

Lets hope some other companies jump onboard with this and it truly does become a universal standard.

Manually reset your WordPress password

lost-wordpress-password

It doesn’t matter what application your working with, losing your password is always a pain in the ass. Luckly if you are working with wordpress (man, I blog a lot about wordpress these days), on your server and you have access to the MySql database, resetting your password manually is a snap.

  • Login to your PhpMyAdmin
  • Select your WordPress database and click on the “SQL” button to open the SQL query window.

wordpress-phpmyadmin

  • Paste the following code in the window textarea. (Don’t forget to modify the password and username before executing it)

UPDATE ‘wp_users’ SET ‘user_pass’ = MD5(‘PASSWORD’) WHERE ‘user_login’ =’admin’;

That’s it! Your password has been reset, and you should be able to login to your wordpress admin area once again.


			

WordPress Security

wordpress-lock

I love WordPress. Of all the blogging and web content management systems I have tried WordPress wins hands down. I’ve moved several of my clients sites and my personal sites to the WordPress platform over the last few months.

As a web developer with a checkered past, security is always a concern of mine when using an out of the box solution that I didn’t write.  I think that anyone who takes the time to develop a nice website would want to help protect it from those who would want to vandalize it.

WordPress is very stable and fairly secure (one of the benefits of open source software), but I have found a few places in the software that I beef up through a few simple steps that I believe everyone should take.

Security point 1: wp-config.php
wp-config.php is the key to the wordpress operation. This file hold usernames and passwords to your databases. Scary stuff if it fell into the wrong hands. By default this file is protected from direct web access because it has a .php extension, and doesn’t output anything. This is a common practice and is fairly secure. Suppose this, there is a problem with your php install of your web server, and instead of the .php file getting processed, it just gets served out and anyone who wanted to could download the passwords to your database. scary stuff! An easy way to fix this is through your .htaccess file.

open the .htaccess file in the root of your wordpress install, and add the following lines:

<FilesMatch ^wp-config.php$>
deny from all
</FilesMatch>

This will tell the web server to NEVER serve out the wp-config.php file. Sure its a long shot that your server would server this file out, but an ounce of prevention is better then a pound of trouble!

Security point 2: browsable plugins directory by default
Do this on your server, go to http://www.your-domain.com/wp-content/plugins/
did you see the plugins that you have installed? What if one of those plugins has a security hole in it? A hacker could lurk around for sites with an exploitable version of a plugin installed, and then have their way with your site. The solution to this is SO SIMPLE, I dont know what wordpress doesnt to this by default.

create a blank file named “index.html” and place it in the /plugins directory. Now try to navigate to http://www.your-domain.com/wp-content/plugins/
The plugins list should not show up, and would-be-hackers have no way of knowing all the plugins you have installed. A simple and elegant solution.

Conclusion:
wordpress is a great piece of software and with age, it will get more secure and more stable. The community of wordpress users are the people who make wordpress truly powerful. As I find things that I believe need changed, I will continue to blog about them, and submit changes to the wordpress project.