Better HN
topnewbestaskshowjobs
Log inSign up

eskil

28 karma · joined May 17, 2010 (16y ago) · 13 submissions

Submissions

comment 9y ago · link · parent

One suggestion you can make to the founders is early exercise. Some companies offer this. That at least gives the employer the benefit that people put money on the table and "invest" in the company by buying their options before they vest. It shows some belief and financial commitment.

Of course, in a very early startup, that investment might be so small they won't care, and there's a tax implication for the employee you'll want to be aware of.

comment 9y ago · link · parent

Here's a relevant post from Basho about that and their take on it. http://basho.com/posts/technical/erlang-at-basho-five-years-...

comment 9y ago · link · parent

Possibly, like driving for Uber/Lyft, shopping for Instacart or dogwalking in the time between since they have their own cars at the depot.

But the problem would still be the extremely long day. Ending with them having to drive a bus at the end of the shift, utterly exhausted.

comment 9y ago · link · parent

Robert, I think it's great you comment here now and then. It's awesome to occasionally get access to the original authors of erlang.

The proposed refactor in the article doesn't look like idiomatic erlang to me. How would you refactor the code in the article?

I'd do something like this;

  validate(_DbConn, {error, Reason}) ->
    {error, Reason};
  validate(DbConn, #req{body = ReqJsonStr}) ->
    validate(DbConn, json:decode(ReqJsonStr));
  validate(DbConn, {ok, #login_request{username = Username, password = Password}}) ->
    validate(DbConn, {hash_password(Password), db:find_user(DbConn, Username)});
  validate(_DbConn, {HashedPassword, {ok, #user_details{username = Username, hashed_password = HashedPassword}}}) ->
    % Hashed password matches the found user record hashed password
    % by the power of function pattern matching.
    {ok, "hello " ++ Username};
  validate(_DbConn, {_HashedPassword, _UserLookupResult}) ->
    % Hashed password did not match or user not found.
    {error, "wrong name or password"}.
Splitting into exported and "private" functions in module would leave a less messy api. This simply removes the case usage, coupling, highlights function pattern matching and makes for easily testable small functions.

comment 10y ago · link · parent

Here's one, https://eng.uber.com/dockerizing-mysql/

comment 12y ago · link · parent

Obligatory joke about danish summers goes here.

comment 12y ago · link · parent

Did your drivers ed/school teach you how to drive with a hood that's flipped up at highway speed? Mine didn't, then it happened to me.

(but yeah you're right)

comment 12y ago · link · parent

I worked for Andy Hertzfeld once, it was awesome in many ways, but the anecdotes... so good.

comment 12y ago · link · parent

Mensch, an older code/terminal font. http://robey.lag.net/2010/06/21/mensch-font.html

comment 12y ago · link · parent

You wouldn't want to rely on a happening upon a cargo ship anyway. You'd rely on an EPIRB.

comment 12y ago · link · parent

Amex has a credit card called Blue Sky. Now I kind of want one.

comment 16y ago · link · parent

I'm having flashbacks to the nineties and working with CORBA and it's C bindings.

"Those who do not know history are doomed to reinvent CORBA_Environment."

(Although there are few new details, such as the aborting if the dtor determines it wasn't checked.)

comment 16y ago · link · parent

What's the type for "can't be bothered with personality tests" ?

If you were a pizza, which topping would you have ?