29 August 2007

Seagate's AAK-firmware

Seagate's AAK-firmware
firmware speed graph

I bought one of these perpendicular-recording drives for a friend of mine a while back after his original hard drive had gone kaput.

I've got to tell you, the thing was fast. The damn thing's speeds were up there with some 10,000 rpm drives -- it was incredible.

Now, if you're a company that also sells faster drives than most 7200 rpm ones (say, very expensive 15,000 rpm SCSI drives), then there's a chance that these super-fast 7200 rpm drives might start cutting into your other, very lucritive business...

I sincerely hope this doesn't turn out to be another case like Intel's that I talked about in my other article -- I can't stand companies holding back superior technology from its customers simply because of greed, you know?

24 August 2007

BitTorrent Admin Monitored by US Government, Forced to Dump Linux

BitTorrent Admin Monitored by US Government, Forced to Dump Linux | TorrentFreak

While this is kinda shitty, I have to admit I'm somewhat happy that evil government monitoring software doesn't run on Linux. ;)

Still, I am kind of surprised that the government doesn't have any capability to run something like this on Linux -- didn't they create things like SELinux, for example?

And anyway... it's not like Windows really costs anything, remember?

22 August 2007

Teen Pleads Guilty in Rare Theater Filming Case

MPAA Anti-piracy poster
Teen Pleads Guilty in Rare Theater Filming Case - Wired Blogs

Okay, so let me get this -- I can physically steal a movie from a store, and get off with a slap on the wrist, but if I record some of that movie on my cell phone, it's a possible year in Federal Prison?


Anybody else smell the stinky work of the MPAA's lobbyists here?

20 August 2007

Intel 45nm Processors Waiting to Clobber AMD's Barcelona?

Intel 45nm Processors Waiting to Clobber AMD's Barcelona?

"It reminds me of the days of the AMD K6. Intel was "stuck" at 266 Mhz. Reaching beyond that was "impossible". Then, suddenly AMD released a K6 at 300Mhz. Within a week, Intel released the 300 and 333Mhz Pentiums (P-IIs I think). That kind of pissed me off. How much sooner could Intel have released the 300? How much further could they have gone? How many people were forced to pay top dollar while Intel sat back and quietly raked in the cash, knowing that they were selling an inferior product marketed as "the best we can do", when, quite frankly, it wasn't."

This post on Slashdot sums up exactly how I feel about the entire "Intel vs. AMD" processor issue. It's not that Intel is richer, or bigger, or has a larger market share, it's that we could all be benefiting so much more if they weren't so greedy. We wouldn't have to wait years for faster chips -- they'd be releasing them all the time.

Federal ID plan raises privacy concerns - CNN.com

Skeletor Look-alike Michael Chertoff
Federal ID plan raises privacy concerns - CNN.com
: "Americans may need passports to board domestic flights or to picnic in a national park next year if they live in one of the states defying the federal Real ID Act."

You know, it's not even the political aspect of this that pisses me off, it's the gross inability of the government to see the possibilities for corruption when you start putting all relevant data dealing with a person's life into a singular database like this. I'm not even talking about the human kind of corruption, either -- even though that is a distinct possiblity -- it's the matter of computer corruption that I'm worried about.

What happens if, in this massive database, a singular bit of data regarding your status as "living" gets corrupted? What do you do then? Go to the government and complain? Think about it -- to them, according to their database, you're dead. That means you're trying to masquerade as a dead person, and you'll most likely be arrested on the spot.

I'm sure -- well, I'm not so sure, but I hope -- they'll set up some sort of replication system regarding this database, but even that doesn't make it fool-proof. What if the error gets replicated before it can be corrected to any backup databases that have been set up? What then?

The only way to make this foolproof would be to add some sort of unique marker that would identify you as who the database said you were, whether you were dead or alive...

Kinda like your DNA? Wow, now there's a scary thought. I haven't seen anything like that in regards to this "Real ID" act, however.

Fortunately, most states are rebelling against this new law, however, they're not doing it on the grounds of "protecting your information," they're just complaining about the cost. That'll hold it off for a little while, but eventually, the money's going to show up, and you can look for your "Real ID" real soon after that.

16 August 2007

Windows Is Free (A TLUG Article)

Windows Is Free (A TLUG Article)

"I'm not one for conspiracy theories, but the next logical question is, assuming I've made some sense up to now, isn't it in ultimately in Microsoft's interest to allow pirated copies of Windows to be out there?"

And with that quote, the author hits the nail right on the copyrighted head.

In a speech at the University of Washington back in 1998, Bill Gates was famously quoted as saying (about China's booming PC market), "And as long as they're going to steal it, we want them to steal ours. They'll get sort of addicted, and then we'll somehow figure out how to collect sometime in the next decade." [Source]

It's a pretty long read, this article about Windows technically being just as "free" as Linux, but it's very well written.

15 August 2007

Bluetooth on an Apple ][?

Byte Cellar: BlueFlash: Apple II Bluetooth/Disk Controller/Disk Archive Card

An absolutely amazing achievement for hobbyists fond of the old Apple ][ computer. The actual creator of this device runs a website about it at http://vinchysky.angelfire.com/.

14 August 2007

See Who's Editing Wikipedia - Diebold, the CIA, a Campaign

See Who's Editing Wikipedia - Diebold, the CIA, a Campaign - Wired Blogs

"On November 17th, 2005, an anonymous Wikipedia user deleted 15 paragraphs from an article on e-voting machine-vendor Diebold, excising an entire section critical of the company's machines. While anonymous, such changes typically leave behind digital fingerprints offering hints about the contributor, such as the location of the computer used to make the edits.

In this case, the changes came from an IP address reserved for the corporate offices of Diebold itself. And it is far from an isolated case. A new data-mining service launched Monday traces millions of Wikipedia entries to their corporate sources, and for the first time puts comprehensive data behind longstanding suspicions of manipulation, which until now have surfaced only piecemeal in investigations of specific allegations.

Sad, just plain sad. But it's good to have this information out in the open in a readily accessible manner now.

08 August 2007

Being Unhealthy Could Cost You -- Money

Being Unhealthy Could Cost You -- Money :: Yahoo! Personal Finance

"In late June, the Indianapolis-based hospital system announced that starting in 2009, it will fine employees $10 per paycheck if their body mass index (BMI, a ratio of height to weight that measures body fat) is over 30. If their cholesterol, blood pressure, and glucose levels are too high, they'll be charged $5 for each standard they don't meet. Ditto if they smoke: Starting next year, they'll be charged another $5 in each check."

Though I personally think BMI is a terrible determination of a person's fitness (for instance, most bodybuilders fail BMI's, even though they're very fit), I still think this is a great idea!

If you have to pay more for car insurance because of bad life decisions (speeding tickets, etc.), why shouldn't you have to pay more for health insurance for bad health decisions?

OF COURSE, this would only be fair if health insurance companies stick to objective determinations of a person's healthiness, such as cholesterol level, blood pressure, tobacco use, etc.

06 August 2007

Lenovo, Novell partner to offer Linux on the ThinkPad

Lenovo, Novell partner to offer Linux on the ThinkPad - Ars Technica

Well, even if it is dealin'-with-the-devil Novell, any Linux is better than no Linux. This'll open up a bunch of new corporate-grade Linux-compatible drivers, hopefully.

02 August 2007

The Ultimate JavaScript Date Validator

function checkDate(dateStr)
return (!(
(((new Date(dateStr)).getMonth() + 1) != dateStr.substr(0, 2))

And that's it -- just one line of regex and a little funky JavaScript date parsing.

Try passing it a date of format "MM/DD/YYYY" and then see what happens. It even checks to see if the dates are out of range (such as June the 31st), as well as checking to see if an entered leap-year's date is valid (February the 29th, 2007 wouldn't be).

I've seen functions in JavaScript that can do all of this before, but none that spanned less than half a page!

How does it work? Well, first there's the long string of regex:


That regex string checks
  1. If the date is formatted MM/DD/YYYY

  2. If the separators are forward slashes

  3. If the month is between one and twelve

  4. If the day is between one and 31.
Now, at this point, you still have a pretty thorough date validator. At this point, many (including myself), would feel free to stop trying to further check the date. As I say, if someone's too stupid to know that there's no such date as "June 31st," then they've got bigger problems than just entering appropriate things into an online form.

But, in the interest of completeness (and upper management's wishes), this function needed to be taken a little further.

There are all sorts of functions you can use to check to see if the chosen day number for a particular month is valid (most involving some sort of hash with the dates' names and month amounts), and there are even functions that can see if an entered year happens to be a leap year (if a year is evenly divisible by four and not by 100, unless also divisible by 400 it's a leap year -- see, now you know). However, these are cumbersome to use, and more importantly they just aren't very pretty looking, damnit! :P

I wanted something a bit quicker and easier to understand at a glance. I've always thought of using JavaScript's built-in date class in some way, and that's how I came up with this line of code:

(((new Date(dateStr)).getMonth() + 1) != dateStr.substr(0, 2))

If a date string (MM/DD/YYYY) can't be passed into this formula (via the "dateStr" variable) such that it returns "true," then it's not valid. End of story.

How does it work?

First of all, JavaScript makes a date object out of the string with the command "(new Date(dateStr))" -- all this does is create a date object temporarily in the buffer; nothing is assigned to a variable.

(You may have wondered why my regex insisted that I have forward slashes as date separators instead of anything else -- any other kind of separator in a date string won't be recognized by JavaScript's date constructor, and will return an error.)

You then use the method ".getMonth()" to get the number equivalent of the current month in the JavaScript date object -- this is important. You're not getting the number of the month that the user has entered -- you're getting the internal month number of the JavaScript date object.

Why is this important? Because, at this point, JavaScript may have a different month assigned to the date object than what the user entered. As I found out, if you input an invalid date such as "06/31/2007" into a JavaScript date object, it automatically increments the various parts of it to make it valid. For instance, "06/31/2007" would be stored internally as "07/01/2007". (Apparently, the programming language is trying its best to clean up after us screwy humans. I'm guessing it usually has its hands full.)

At this point, validation is easy. All you have to do is use ".getMonth()" to get the internal date object's month (remember to increment it by one -- "January" is stored as zero, not one, internally) and check it against the parsed month from the date string via "dateStr.substr(0, 2)". If the two numbers match, the date is valid -- if they don't, it's not. You only need to check the month subset of the date -- it will reflect an invalidity present in any other part.

This will work for incorrect leap year designations, as well (since JavaScript would store an invalid leap year date such as "02/29/2006" as "03/01/2006" internally).

It's really as simple as that.

[Thanks to Jan Goyvaerts at RegularExpressions.info for making such a great reference site on regex.]