HNHacker News
TopNewBestAskShowJobs

DoggettCK

129 karma · joined June 3, 2012

submissionscomments
DoggettCK··on Exercism – Level up your programming skills
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.
DoggettCK··on Uber users with low phone batteries more likely to accept surge pricing
Thankfully, it wasn't sputtering on the side of the road out of gas, just the dashboard light coming on indicating that that was 10-30 minutes away.
DoggettCK··on Uber users with low phone batteries more likely to accept surge pricing
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.

DoggettCK··on 90% of the billion dollar unicorn startups are in trouble
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.

DoggettCK··on A Good Vimrc
That's when I switch over to emacs and ikea-mode.
DoggettCK··on A Good Vimrc
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'.
DoggettCK··on Unsupervised Feature Learning and Deep Learning Tutorial
Definitely worth it. I had to drop out around week 5 due to a lack of time, but just started a new job that'll take me back to 40-hour weeks (down from 80-100), so I'll give it another shot next time they run the course.
DoggettCK··on To Master Vim, Use It Like Language
Just what I needed. Thanks!
DoggettCK··on To Master Vim, Use It Like Language
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.
DoggettCK··on To Master Vim, Use It Like Language
One of the best things I've done, though I personally use 'jf', since they've both got little nubs on the keys, and I occasionally have to spell "Dijkstra".
DoggettCK··on Fragments of World's Oldest Koran May Predate Muhammad
I seem to remember reading they re-used paper a lot back then, scraping off old ink. Paper could've been much older than the author.
DoggettCK··on PostgreSQL Migration Tool
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.

DoggettCK··on Why Phone Fraud Starts with a Silent Call
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.

DoggettCK··on Business Can Pay to Train Its Own Work Force
I remember some motivational poster from my old tech recruiter's FB feed that seems appropriate here:

"What if we invest in training and our employees leave?"

"What if we don't, and they stay?"

DoggettCK··on Parallel Map in Elixir
Not just efficiently parallel, but easily distributable to multiple nodes.
DoggettCK··on Dependency Injection is Evil (2011)
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?"
DoggettCK··on Ask HN: What code do you frequently read?
If you're not already following it, check out Handmade Hero (https://handmadehero.org/). Great, free video series from Casey Muratori that guides you through building a game from scratch.
DoggettCK··on ‘Braid’ creator sacrifices his fortune to build his next game
I highly recommend it, even if you just want a refresher on C.
DoggettCK··on CoreCLR is now open source
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.
DoggettCK··on CoreCLR is now open source
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.
DoggettCK··on Authentication Cheat Sheet
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.

DoggettCK··on Authentication Cheat Sheet
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.
DoggettCK··on Authentication Cheat Sheet
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.

DoggettCK··on Authentication Cheat Sheet
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.

DoggettCK··on How to tell when a robot has written you a letter
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.

DoggettCK··on Elixir v1.0.0 released
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.
DoggettCK··on Likely the most painful password hashing discussion you'll ever read
Credit, blame, what's the difference, really?
DoggettCK··on Likely the most painful password hashing discussion you'll ever read
I really want to suggest XORing the password with itself, as a goof, but it seems like the type of thing that will bite me in the ass later in life.
DoggettCK··on We Will Fight Until The End
I would, but as a scientist, I don't feel you would accept the veracity of my response.
DoggettCK··on Announcing The Fog Creek Fellowship
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.

Page 1 of 3Next →