Skip navigation

When I was working on the jdupes file duplicate scanner, I noticed that the program from which it was derived was using the MD5 secure hash algorithm to compare files and file pieces for fast exclusion. Unfortunately, while MD5 does a reasonable job of minimizing collisions for a given pair of data sets, MD5 is a pretty terrible hash choice for most programming choices. I wanted to use a faster hash algorithm. There is no shortage of algorithms and there is also no shortage of people testing them and talking about it, but I wanted to be bold and try making my own before using someone else’s, especially since I was willing to increase the chance of collisions in exchange for a super fast algorithm. I also wanted something that was specifically designed to use primitive operations such as XOR, rotation, and addition that would compile directly down to the corresponding CPU instructions. I had written a primitive hash function in my Windows registry filesystem project (“winregfs”) but that hash function was not very good.

I experimented with combinations of rotations, XORs, bit masking, and adding, using my imagepile project as a test bed since piles of disk images double as a nice large data set. I eventually found a combination of primitive operations that had a much lower collision rate than the winregfs hash function and in early 2015 I changed the jdupes (technically still just a modified fdupes at the time) (and winregfs and imagepile) hash algorithms over to the first version of jodyhash. After three more improvements I created today’s version of jodyhash, a low-collision super-fast algorithm.

An example of usage can be seen in the utility’s main.c file. Simply #include “jody_hash.h” and put the jody_hash.[ch] files into your source code directory, then use the jody_block_hash() function on the data you want to hash. The only restriction on input is that it must be done in 8-byte-wide pieces until the last 1-8 byte piece because the hash algorithm operates on 64-bit words at a time.

How fast is it? On an AMD A8-7600 system, I cached a 3.6GB file in RAM and hashed it five times with these algorithms to illustrate why secure hashes aren’t a great choice for speed. Best run times were as follows (in order of performance):

  • jodyhash: 1.601s
  • md5sum: 7.681s
  • cksum: 10.897s
  • sha512sum: 13.235s
  • sha1sum: 13.661s
  • sha256sum: 19.397s

How low is the rate of collisions? I tested against a list of 216,553 English words in upper case and had a single pair collide. The same list in lower case had zero collisions. A list of ASCII decimal numbers from 0..216553 generated (using the command seq 0 216553) had zero collisions. I have tested against registry key name strings, partial and full files (using jdupes with debug stats enabled), and full disk blocks and find that hash collisions for differing input data are so rare that I practically never have any, even with fairly large data sets.

If you are a programmer searching for a very fast hash function with a low collision rate, I’d like to invite you to try out jodyhash. I think you’ll be happy with it.

I got unsolicited bulk commercial email (otherwise known as spam) from “Flix Premiere” at an email alias I don’t actually use for anything these days. I unsubscribed without really reading it because it’s spam so as far as I’m concerned they can go get fucked with a rake, but as I waited for the unsubscribe page to load over my blazing fast connection, I glanced at the email once again to see what they were trying to do to gently separate me from my money without wining and dining me first.

flix_premiere_spam

Behold our sales pitch…now with 93% less lube and 78% more anus crowbar!

I have to admit that for sketchy spammy email this looks more convincing than usual…so I checked to see if they’re a real company with real products and no apparent malicious intent. They are indeed real, though that’s not going to save them.

Strike 1: Send me random opt-out spam like this and I’m already not interested.

Strike 2: I’ll let them tell you themselves.

flix_premiere_header

Half the price of Netflix! Right Guys? …..guys?

Netflix has seen a nasty subscriber churn hit since they decided it’d be brilliant to jack up the cost for existing customers by yet another dollar per month. Netflix (as of today) now costs everyone $9.99 a month for a typical subscription. We’ll round up everything from here by one cent because that missing one cent is a single penny that represents a long-time pet peeve of mine with such deceptive pricing; yes, you weasely marketer assholes, $9.99 actually IS $10 in our minds, but thanks for insulting our intelligence right out of the gate!

So, in actual sane person dollars, Netflix is $10 a month. The header for Spamalot Films…er, *cough* I mean Flix Premiere…is (in sane person dollars) “just $5.” FLIX PREMIERE LETS ME WATCH ALL THE HIGH QUALITY INDIE FILMS THEY CAN CONTRACTUALLY CHOKE OUT EXCLUSIVE RIGHTS TO FOR $5 A MONTH?!

Flixy Downer replieth sternly: “Hold your horses, kid. It ain’t Netflix. It’s Flix Premiere, where we think we’re a cable television provider in 2001! It’s $5 to watch one film.”

Holy shit, Flix Premiere is expensive.

What the fuck were these people thinking? Netflix already has tons of indie films and they let you watch as much as you can cram into your face for $10 a month, be it one film or 100 films. Some brilliant idiot actually thought “we can ‘curate’ films no one has heard of from production companies no one has heard of and charge the same amount per two films that Netflix charges for a la carte viewing of both no-name and big-name films and television shows and make plenty of money doing so!

No. No no no. The genie is out of the bottle, guys. A la carte streaming for single-digit monthly subscription prices is here to stay. You’re not going to convince the cord cutting revolution to go all the way back to five-dollar on-demand movies, especially when they’re not big-name films in the first place! Redbox rents physical Blu-Ray discs to people and still does it at 40% lower cost than your no-name streaming movies. What are you venture capital hemorrhaging execs smoking, and can you please keep it very far away from me?

On a positive note, it’s nice to see an interest in independent film. If it were $10 a month a la carte with a one-month free trial just like Netflix, I’d seriously consider joining up and sticking around if I liked it, despite the fact that they came to me under the seedy cloak of being cunty filthy spammers. At $5 a pop, you’re fucked in the head, out of your mind, and there’s no way in hell that I’ll even give them that one little sanity cent I’ve generously added to their prices this whole time.

Flix Premiere also runs around the Internet replying to comments to do damage control as any remotely functional company does, but they suck at it. I’m such a generous lord that I shall paste one of their comments here as a response so they don’t have to. I’ll even respond to that!

Flix Premiere squawked: “the great thing about Flix Premiere is that we’re building a carefully screened and curated selection of good films that might never have been seen anywhere else. All the content is also exclusive to Flix Premiere for at least a year! So if you are hoping to catch these films on Netflix you’ll have to wait somewhat longer.”

First off, I have no way of knowing if your “carefully screened and curated selection” or your definition of “good films” match up with my own subjective tastes, so that statement is meaningless. If you mean “we don’t offer up first year film school student films for $5 apiece” then congratulations, you’ve set the bar very near the ground! Anything beyond that is so subjective that you can’t make objective statements about your collection like that. Exclusive for at least a year? Sounds like you could be screwing over indie filmmakers to me; I want to know how much of that exorbitant $5 you’re really giving them. Yes, I know that my grubby a la carte demands may mean less money available in the pool to pass along, but that would require your members to rent more than two movies a month on average every single month and you’d have far more members on a subscription plan in the first place.

That last jab of yours is your only direct stab at getting customers from Netflix, so let’s address it as clearly as possible right now. I’ll have to wait to see it on Netflix?

Guess what?

I can wait.

Sorry, indie folks. You really shouldn’t have signed away the rights to your own films to a grossly overpriced platform if you wanted me to see it. Having made some short films myself, I can sympathize with your plight, but this is the path you chose. As for Flix Premiere, feel free to leave a comment or two. I am a tough god, but I am a fair god.

tl;dr: Flix Premiere is a nice idea that costs way too much and they sent me spam, so fuck them with a rake.

I was checking out the “learning management system” platform called Teachable. I found my way to their plan pricing page. After being there for a bit and looking over the prices, THIS happened when I scrolled back up:

fuckyoulightbox

I’ll enter my foot in your asshole before I enter my email address

In modern web design parlance, this obnoxiously annoying shit is called a “lightbox.” The more generic name for a user interface element that functions this way is a “modal window” or “modal popup.” This renders the main functions of the site unusable until the modal window is closed…and THERE’S MY PROBLEM WITH IT.

Modal popups, modal windows, or “lightboxes” are the most frustrating thing imaginable on a website. Some deluded designers and marketing weasels think that modal popups are a great way to “maximize conversions” (marketing code for “some dumbass signed up for our useless email list! Hooray!”) but the reality is that if the Internet was a piece of skin, modal popups are an inflamed skin tag that wasn’t there yesterday and that we want so desperately to chop off with a rusty utility knife and never have it come back.

Let’s get down to the business end of this problem. If someone accidentally types (or is deceptively coerced into typing) their email into your greedy marketing lightbox, they’re not actually interested in your emails and will resent the fact that they are now on yet another spam factory mailing list they’ll never read. They won’t visit you again. They will flag your email as spam. They will hate you forever for being yet another giant dick in a sea of dicks made of spam. What about people who might be interested in your stuff? Well, there’s already a thing that such people can use to make sure they can come back…it’s called a “bookmark.” You know, that technology from the 1990s that lets someone return to your website quickly? Yes, it’s a real thing and people still use them!

For everyone who visits your site and who might do the thing that makes you a little money for your troubles, that clever marketing lightbox just rendered your entire site unusable to whore out for email addresses. Do you know what normal people do when a website becomes unusable due to a random popup that blacks it out?

We leave. We never return.

If you use a modal popup of any sort on your website and it’s not for very specific purposes that fit with your site UI in a critical way from a usability standpoint, you’re running your customers off. We hate you and we will not come back for as long as we can remember that you’re yet another one of the assholes that thinks interrupting our site experience to beg for our email addresses is the way to win our trust and establish a customer relationship.

Think about it this way: what do you do when the high-pressure sales pitch douchebags show up at your door and try to sell you something you don’t necessarily want in the first place? That’s right…you tell them to go away.

You just gave us a reason to avoid you.

We’re happy to oblige.

Get rid of the lightbox popups on your website or we’ll be happy to see you die.

Yes, I’m pissed off and I hope the people who put this crap on websites go unemployed for the next five years. For a more level-headed discussion about the problem with the lightbox popup, check this article out.

Follow

Get every new post delivered to your Inbox.

Join 74 other followers

%d bloggers like this: