Yay, RIAA Propaganda!

Have you had a chance to see this RIAA training video (torrent at thepiratebay, I’ll try to link to an online version when I can find one)? The history of it is apparently that it was sent to prosecutors in order to teach them how to bust more people for music piracy. It goes as far as to equate theft of music with “connections to drugs, guns, and in some cases even terrorist activities.” On top of that, it suggests that drug officers should also be on the lookout for pirated music during stops, in order to give more opportunities to arrest someone. That’s absolutely what we need – more people in our legal system for no good reason.

What’s really going on here is that the music industry can’t seem to figure out how to run a business around an infinite good, so they’re trying to criminalize their BEST CUSTOMERS. If I’m in business, I know nothing good can come from me pissing off the people that have helped line my pockets for so many years. There’s a simple solution, though. Come up with a subscription model for those who prefer online distribution (maybe with a few tiers, and some free content), make a decent optional portable player that allows you to download on demand, and, of course, STOP SUING YOUR CUSTOMERS! You’re losing in a fight you shouldn’t have started.

Why is Congress Investigating Baseball?

Does it seem like a ridiculous waste of time to anyone else for Congress to investigate Major League Baseball over steroid abuse? I can understand that there are perfectly valid legal reasons that the House of Representatives is allowed to investigate baseball, but what I can’t figure out is why it is an effective use of their time. Baseball is a private enterprise and they were pretty lax about allowing steroid abuse to become the problem it is today, but in the end, it’s still not a problem that needs to be investigated by the highest legislative body in the United States.

It’s an election year, though, so I guess we can’t count on our priorities being on the real issues that we’re facing as a nation. Personally, that’s disturbing – that when we should be debating about important issues, we get steroids in baseball, a problem that affects one of the slimmest slivers of society. The whole premise that this is ‘for the children,’ that allowing steroid abuse to occur makes steroids appealing to young people, is pretty thin, too. Legislation is no substitution for responsible parenting. If it were up to me, I’d see that this farce ended as soon as possible. Hopefully, my representatives are ferretarmy.com fans!

Update 3/3 – Pretty interesting stuff coming out here, with Roger Clemens facing potential Congressional perjury charges in relation to his testimony that he has never used steroids/HGH. I may not approve of the investigation, but regardless, I’m pretty sure you should never lie to Congress – that’s just not a good idea.

Introducing blaq design!

blaq design logo

I have an exciting announcement on something that I’ve been working on over the past few months. A few others and I are working on starting a bike component and apparel company called blaq design. In addition, from February 8-10 (tomorrow, yikes!), we’re going to be debuting our company at Ray’s MTB during their B.I.K.E./Ride w/the Pros event. We are going to have a table setup with a few shirts for sale, a few parts for display, and a decent amount of free stuff for all. If you’re local to Cleveland, OH, you should come check us out at the event!

The company is still in it’s infancy, and my main job with it is I’m the webmaster/IT guy. The website is a labor of a lot of hours of tiring work and is all handcrafted, and it’s coming along great. It’s written in ASP.NET, and it looks pretty decent for someone who isn’t the most well versed in web design. On top of the website, I’m also doing some of the real labor of the business, making parts and running the ‘office’ too.

If you’re ever in the market for bike components or anything, hopefully sooner or later we’ll be able to hook you up with some great gear. We’ve got a lot of products we’ll be debuting over the next few months, and you’ll be able to buy them direct from us through the website (as soon as I figure out how a shopping cart works!).

Hacker Email Address Parsing

It’s pretty common nowadays to see any type of email addresses that are publicly posted on the web to be formatted so that they are hard to spot by spambots that just rip through pages, parsing addresses out and adding them to various nefarious mailing lists. Such addresses often look a lot like “myaddress @ mysite . com” or a variation of such.

One thing that’s always struck me as funny is that a halfway decent programmer can pretty easily use Regular Expressions to parse through text and still be able to grab ‘hidden’ addresses. The idea is that even though these addresses are not traditionally formatted, they must still follow a pattern to be readable/understandable. If there’s a pattern you should be able to model it to some degree of accuracy using regular expressions – that’s exactly what the purpose of regex is. To that end, I decided to see how much effort would be entailed in writing said regular expressions, and how accurate I could make them. It’s important to note that I didn’t spend a lot of time optimizing my regex or getting the kinks out – this was just a toy project. All the regex that follows is C# flavored regex too, so if you use the Perl/JavaScript/whatever other flavor, you’ll have to rewrite them to suit your needs.

Here’s a good regex string that validates email addresses, which I used as a base for my modifications:

w+(?:[-+.]w+)*@w+(?:[-.]w+)*.w+(?:[-.]w+)*

Here was my first address to validate:

webaddress @ somesite . com

I modified my regex as such to allow spaces in an email address:

w+s*(?:[-+.]s*w+)*s*@s*w+s*(?:[-.]s*w+)*.s*w+(?:s*[-.]s*w+)*

Sweet, that worked! The above regex just allows whitespace in the address, and it works remarkably well. Next task:

webaddress dot somethingelse @ blah dot something . com

This address substitutes ‘.’ with the word ‘dot’, but it should still be pretty easy to overcome:

w+s*(?:[-+.'dot']s*w+)*s*@s*w+s*(?:[-.'dot']s*w+)*[.'dot']s*w+(?:s*[-.'dot']s*w+)*

Again, easy as pie. All you have to do is look for ‘dot’. It is trivial to extend this to include things like ‘dash’ and ‘plus’ and ‘period’. Now, let’s throw some illegal characters in there too:

<webaddress>@somesite.com dot au

Here’s the regex I created to solve this one:

w+[sW]*(?:[-+.'dot'][s]*w+)*[sW]*@[sW]*w+[sW]*(?:[-.'dot'][sW]*w+)*[.'dot'][sW]*w+(?:[sW]*[-.'dot'][sW]*w+)*

Hmmm… that regex is getting kind of ugly, but it does what I asked of it (for now). I assume that since I used W, which matches any non-word character, I’m opening myself up for some false positives. Next one up:

webaddress dot blah at findme dotcom

Here’s the regex for that one:

w+[sW]*(?:[-+.'dot'][s]*w+)*[sW]*(?:@|at)[sW]*w+[sW]*(?:[-.'dot'][sW]*w+)*[.'dot'][sW]*w+(?:[sW]*[-.'dot'][sW]*w+)*

There’s only one minor, seemingly trivial difference between this one and the last – it just adds the word ‘at’, much like when I added ‘dot’ earlier. No big deal, right? Well, if I think I may have had some false positives before, let me tell you, it’s really starting to break down now! The word ‘at’ is so ubiquitous in the english language that I ended up with so many false positives when this regex was embedded in random text that the results became almost meaningless. An example of text that would show a false positive now is ‘I met my brother at nine. He was…’, which would find the email address ‘brother@nine.He’ At this point I called it a day – that was a lot of regex to work through!

So, I know that my regex could be formatted much better, and that would help with false positives. If I was getting paid to write these, they would definitely be more polished. However, one thing that I did find is that if you’re really into using obfuscation to hide your email address, using ‘at’ instead of ‘@’ is probably one of the best obfuscation techniques. Take note so you can protect yourself from the evil spambots. Here is a copy of the text that I was working with, if you want to try these techniques on your own.

5 Great New Albums – Winter 2008 Edition

Tiger Army - Music From Regions Beyond

Tiger Army – Music from Regions Beyond

Tiger Army is a Rockabilly group, and they exemplify a great entry into said genre. The album itself is very well put together, and even has a few songs sung in (what I assume is) Spanish. If you have a chance, read their Wikipedia entry – it’s very interesting (and kind of sad).

The Living End - Modern Artillery

The Living End – Modern Artillery

This is a bit of an older album – it came out in 2004. Regardless, it’s a great punk album, and I like to showcase material that may have gotten looked over a bit when it was initially released.

Blaqk Audio - Cexcells

Blaqk Audio – Cexcells

Blaqk Audio is made up of two of the members of AFI, but that’s about where the similarities between the two bands ends. This album is very techno influenced and catchy, definitely worth a listen.

H.I.M. - Venus Doom

H.I.M. – Venus Doom

Another stellar album by His Infernal Majesty, who never seems to disappoint. I saw H.I.M. in concert last year as a part of Projekt Revolution, and I must say I was unimpressed live. However, the studio stuff is still of high quality – some acts just are unable to recreate their sound live.

Avenged Sevenfold - Avenged Sevenfold

Avenged Sevenfold – Avenged Sevenfold

The latest Avenged Sevenfold rocks like all of them, with still enough mainstream appeal that I’m sure the band will make a boatload of money (good for them!). Still very dark and creepy – if you’re not too squeamish, read the story behind one of the songs on this album, A Little Piece of Heaven.