mdc2161's comments

mdc2161 | 1 year ago | on: JavaScript best practice: use return await

It is very much not being turned into synchronous code. There are a lot of reasons to use async code, and they're all still valid with this pattern.

For example:

- the event loop is still not being blocked

- the calling code can still be flat instead of nested callbacks (truly synchronous) or chained `.then` calls

Is it a little bit more boilerplate? Yes, definitely, and it's certainly less nice to look at. But it's linter-enforceable consistency that removes the cognitive overhead of an annoying to debug footgun.

Note: My favorite style is typed error returns instead of thrown exceptions. In that world, you only need try/catches at the boundaries of your code and for application crashing exceptions. Unfortunately most codebases aren't written like that and I'm often working in inherited code instead of greenfield.

mdc2161 | 1 year ago | on: JavaScript best practice: use return await

If the inner function is async, then its callers need to be async as well (see https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...).

Important to note that unless the inner function throws an exception, the two versions are essentially identical, even sharing (if using typescript) a return type definition of `Promise<ReturnType<InnerFunction>>`.

That's because `await` flattens nested promises, so both `Awaited<Promise<T>>` and `Awaited<Promise<Promise<Promise<T>>>>` resolve to `T`.

mdc2161 | 1 year ago | on: AI is going to hack Jira

> Engineering productivity can’t be measured by tracking new features.

Garbage in, garbage out. And as a measure of engineering productivity, story points/feature count/Jira are pretty much garbage!*

Back in 2013 when I was doing consulting for Fortune 500s, even the "Agile practitioners" on our team got carried away abusing Jira and story points to do crazy cross-team comparisons and micromanagement. And these were exactly the people that were supposed to know better! That's what they being paid for, after all.

There are many things that should be purely internal measures within a team, yet anything quantified and easily accessible is always rife with misuse. Can't imagine how much worse that will be once AI makes even more of that surface area accessible, and worse yet can gamify its output to outperform on such measures.

* Story points can have value within a team, but that's a separate discussion

mdc2161 | 4 years ago | on: ‘Misogynistic’ Apple hire is out hours after employees call for investigation

If he were a comedian, I believe he would be given more slack (assuming he changed the tenor of his jokes in the intervening years).

As a manager, as someone responsible for others' livelihoods and careers, he has to be held to a much higher bar. Even if it were purely in jest, is it fair to have his direct reports try to figure out the line between what he publicly writes and privately believes?

mdc2161 | 4 years ago | on: ‘Misogynistic’ Apple hire is out hours after employees call for investigation

> People who express disdain towards the current social structure and disparage groups like white men get hired left and right

Have you seen _any_ major tech company with close to 50% women or 40% non-hispanic white employees? In engineering roles? That's just aiming for parity with U.S. demographics, but when you consider how much of the world travels to the U.S. to work in tech, that 40% number should be much higher!

So if women and minorities are not being "hired left and right", and not all women and minorities ascribe to the viewpoint you describe, then that viewpoint cannot be being "hired left and right".

The "old social structures" may be on their way out, but their vestiges are clearly alive and well despite the moderate legal "risk" that has been added in the past few decades. The law may be an asymmetric tool, but as it stands, a tool that isn't up to the task it was designed for.

---

To reframe things, some questions:

How would you define "the old social structures".

Do you think they are good/bad/benign.

Do you they are still present/fast fading/already gone?

mdc2161 | 7 years ago | on: Ask HN: Freelancer? Seeking freelancer? (May 2018)

SEEKING WORK | NYC or REMOTE | FULL-STACK, REACT NATIVE

My preferred stack is Typescript, React Native, Node Koa, and PostgreSQL, but I'm productive in a number of other technologies.

I've spent the last few years building React Native apps, both as a freelancer and as a senior developer at a venture-backed startup.

Before that, I had a range of experiences including working for McKinsey Digital and founding a startup (500 Startups Batch 13).

Here's a work sample from one of my side projects: http://emersonjournal.com/

Email [email protected]

mdc2161 | 8 years ago | on: Apple Buys Shazam to Boost Apple Music

It's definitely not just the top charts. Notably it has picked up when someone near me was playing Chopin on a piano as well as the occasional KPop tune my girlfriend is listening to.

My guess is it supplements the data with songs from your Google Music and youtube history.

mdc2161 | 8 years ago | on: Why do so few people major in computer science?

Personal anecdote: I didn't major in it because I had no idea I would enjoy it.

I was fortunate that my engineering program had two semesters of Java. We spent more time hand drawing logic gates than coding in the intro course and so it wasn't until the second (data structures) that I realized it was something I wanted to pursue. It was too late for me to change majors at that point, but not too late to take internships and then a job as a programmer.

mdc2161 | 8 years ago | on: International Travel Guide for Basecamp employees

I ran into this a lot while crossing the border into Canada as a consultant, I presume it is similar crossing the border in the other direction.

Internal business meetings did not require a work visa, while meetings with one of our clients did.

mdc2161 | 9 years ago | on: Airbnb raises $1B at $31B valuation, became profitable in 2016

Dealt with similar issues as both a host and a guest.

The biggest problem to me is poor expectation setting. There are hosts that run BnB quality services, ones that run a mock-hotel like you described, and ones that just rent out a spare room in their apartment.

As a guest, it'd be great to know what I'm walking into. As a host, having guests that understand they are staying in my home and NOT a hotel would be great.

My guess is, dividing up the listings into service tiers would lead to legal issues (like you saw last year in NYC), but it would surely help with the guest-host relationship.

mdc2161 | 9 years ago | on: Enter your address and find out everyone who represents you in U.S. government

If you like whoaremyrepresentatives, we would love feedback on [Act On This](https://www.actonthis.org/) as well.

We don't go down to as local of a level yet, but are more focused on giving information about specific actions you can take related to issues you care about.

While the current list of issues comes from us, we're on-boarding a couple of non-profits so they can use the tool to help organize volunteers at a state and local level.

mdc2161 | 9 years ago | on: “Oculus removed the headset check from the DRM in Oculus Runtime 1.5”

A few counter points:

- hardware exclusives may be a better business model, but consumers (at least a vocal subset) clearly don't like them

- Microsoft seems to be moving towards having all Xbox games run on pc so console exclusives may be on their last legs

- the vr market is relatively tiny, so splitting it up with exclusives will make it harder for devs to justify making content

- game margins are much higher than vr hardware, and do it may be better to have store exclusives rather than hardware (something steam is doing without the backlash)

mdc2161 | 10 years ago | on: Two Weird Tricks with Redux

I just started with redux-saga which uses ES6 generators to handle app control flow.

After first impressions, I'd say it's worth a look if you're running into anything near as complicated as talked about here. It's very easy to reason about and test. gaearon - the creator of redux - seems to approve of it as well.

https://github.com/yelouafi/redux-saga

page 1