HN user

DoggettCK

129 karma
Posts1
Comments76
View on HN

I've written ~15 of the higher-level reference exercises for Elixir on Exercism, and do try to comment when I can, but my day job keeps me from it a lot of the time. Some sort of reminder system would definitely be great, especially as more people use the site.

I'd be curious to see if certain locations trigger surge pricing, too. My wife and I got sideswiped about a month ago, had to go to the ER in Austin.

Got out, had no way to get back to our truck, nor to our house an hour outside Austin. Called Uber, figuring we'd at least get a ride back to the truck to get our stuff, and see if any friends could take us the rest of the way home.

Despite nothing going on in town that night, and only being about 8:30pm, the app warned me of surge pricing, saying it would be 1.5x the usual fare. Didn't have many other options, and had been happy with Uber in the past, so went ahead.

Driver was cool, and not only took us back to the truck, but drove us all the way home, complete with a flat tire we helped him change on the side of a busy, dark toll road, and running out of gas.

Wound up being $98, and that guy really earned his tip. I still wonder if the fact that we called from the exit of the ER triggered surge pricing, though. Not a great time to experiment, but I could've probably walked a few blocks and tried again, if my wife wasn't in the shape she was in at the time.

As a friend of mine said when I was interviewing with her to escape the 100-hour-week death march at the "unicorn" I was at: "You're not a unicorn until someone buys you for $1 billion."

They may be valued at $1B+, but they're not worth that much.

A Good Vimrc 11 years ago

I use 'jf' instead of 'jk', so I can type "Dijkstra" occasionally, not to mention they're both on the home row, under your index fingers, typically have physical nubs on the keys, and no words in any language I can find contain the letters 'jf'.

Opening a new buffer. Figured I'd try :new, and wound up getting good at splits. Still don't know how to just open up a new, blank buffer in the window I'm in without specifying a filename to :e.

I've had similar problems with FluentMigrator, even though it orders things nicely using an attribute on the migration class that has a long value representing the order things should run in.

I just use timestamps for when the migration was created, like 201509010034, and for the most part, things are great. Until we got a high priority ticket, and a migration with a later timestamp got pushed ahead of an earlier one, so it never gave us the option to migrate the earlier one.

Easy fix was just to update the timestamp of the earlier migration when it finally got through QA, since they weren't dependent on each other, but things could've gotten really messy, so I'm not 100% happy with the way migrations currently work.

I got one that was my exact name and number showing up on caller ID, which should be unlisted. As in, my home phone appeared to be calling itself.

That one pissed me off enough to ask for a supervisor, which caused the guy to immediately hang up.

Agreed. Also, I'm pretty sure one of, if not the main point(s) of mocking is "How does this unit of code respond if an external dependency returns bad data?"

That was my assumption, too. They do memoize the length, but I'm sure those bytes add up, having run into OutOfMemoryExceptions building huge amounts of strings before.

That does answer an unanswered question I had on SO about string hashing. If strings are immutable, why isn't the hash code memoized? Seems like it would make HashSet/Dictionary lookups using string keys much faster.

As mentioned in another comment, I'd probably do a Levenshtein distance between the old and new passwords, and reject if they crossed some threshold. However, only knowing the plaintext of the immediately-preceding password as they enter it to authorize the change, it wouldn't do much to stop them from doing:

PasswordA SomeOtherPassword1 PasswordB SomeOtherPassword2 PasswordC SomeOtherPassword3

Just iterate on every other change, and you've beaten the requirement.

Well, they wanted 4 of 4, actually, and yes, I had to do custom validation. Everything except the upper-case character worked in JS, so everything "just worked" if I took that part out, but that wasn't an option.

Didn't in either case, because they weren't in the requirements, and the first one, while well-meaning, just further decreases entropy. I got into an email fight with our network security over trying to use a 40-character password LastPass generated that happened to have 2 identical chars in a row, and not being allowed. Not more than one identical character in a row is more secure than not more than 2, apparently.

For the second, I'd probably just do something like compute the Levenshtein distance between the username and password, and reject it if it passed some threshold.

Having recently had to implement improved password security for a customer who wouldn't read XKCD #936, the internationalization thing was a pain in the ass.

They wanted at least 10 characters, and at least one uppercase, one lower, one digit, and one special character. Easy enough with .NET's built-in membership stuff by setting:

passwordStrengthRegularExpression="(?=.{10,})(?=(.\p{Lu}){1,})(?=(.\d){1,})(?=(.*\W){1,})"

The "\p{Lu}" part handles uppercase characters even in Unicode chars, but Javascript has no equivalent, so I couldn't do client-side validation of that. Should be validating on both ends anyway, but it's still a pain.

The real part I hated was having to keep track of users' last N passwords to make sure they didn't re-use them. Since everything's hashed and salted, I just kept a table of previous hashes by user. Seems simple, but MS didn't see fit to include a HashPassword(string plainTextPassword, byte[] userSalt) method in the membership provider, so I had to reverse engineer their password-hashing method to check when they change passwords if it's something that's been used before.

Then I realized that they could just change their password N+1 times in about a minute, then re-use their expired password anyway, so we wound up having to set a minimum age of N weeks before a password could be reused as well.

The whole problem is an exploding requirements nightmare that could easily be solved by saying "Must be >32 characters and don't write it down anywhere, idiot."

The worst part is as much as I hate these types of requirements, I now perfectly understand why these systems are the way that they are.

Realtors have been using these lately. Had to let my old house go back to the bank in a deed-in-lieu earlier this year, but within days of the MLS listing expiring with our realtor, we started getting mail forwarded to our new house that looked handwritten.

All of them were offers from realtors wanting to re-list our house and try to sell it, and it wasn't until I got two identical letters, in identical handwriting, from two separate realtors, that I realized they were computer-generated.

I'm playing with replacing my Python analytics system with Elixir, piece by piece. Working on a little tool with it that'll convert our XML and JSON from two separate parts of the system to a common format.

Ctrl-F "white": 0 of 0 results

"Women" doesn't mean "white women", and as Haul4ss pointed out, all women won the right to vote in the U.S. years after minority men did.