Hacker Newsnew | past | comments | ask | show | jobs | submit | mdc2161's commentslogin

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.


I think my point is that awaits are often used because the coder can't work out or can't be bothered to work out how to treat promises more intelligently.


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`.


Strong agree based on my experience.

Worth noting that this is easily enforceable with eslint: https://typescript-eslint.io/rules/return-await/


> 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


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?


> 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?


> Have you seen _any_ major tech company with close to 50% women or 40% non-hispanic white employees? In engineering roles?

Depends on what you'd consider close. Apple, for example, reports 47% white non-Hispanic employees overall and 44% in engineering. (https://www.apple.com/diversity/) From my personal experience, I've never worked on a team where white people were a majority, although in one case I think the company as a whole was.


Apple's numbers here are a lot better than I expected!

For comparison, many of the other FAANG companies fare much worse, and many of the smaller companies I saw when consulting and doing a startup looked even less diverse than big tech.

https://www.cnbc.com/2020/06/12/six-years-into-diversity-rep...


> How would you define "the old social structures"

They're social and cultural beliefs that used to be accepted by corporations and the media but are now not. For example, unequal outcomes doesn't imply discrimination. Some cultures are better than others. There are widespread physical and psychological differences between men and women. These are common beliefs that are still common, but people are afraid to voice them.

> Do you think they are good/bad/benign.

Any extreme ideology is bad. Requiring strict gender roles or saying whites are superior is extremely harmful. But so is flagrant discrimination against whites or other similar things. What is bad is allowing one extreme while suppressing the other.

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

I read some studies somewhere that stated that conservatism and liberalism are inate character traits that never really go away in a population. This means that changes in the visibility of such traits is largely a function of how much power one side or the other can gain. This means that in the 50's, liberalism was just as popular as now but they didn't have the power.

Now its swapped. Liberalism has the power, the corporate support, the narrative. But that doesn't mean that conservatism is any rarer than before. This power asymmetry increases the chances of conflict. See the affect of the Culture Wars on our political system.

I want to emphasize that my personal opinions don't matter much at all here. But if corporations continue asymmetric political pressure, there will be pushback. What will the repercussions of such pushback be?


Git push and pull on gitlab repos is down, returning 403s. This is breaking CI pipelines as well.


Seems similar to the guide-wheel system shown in the Boring Company's demo yesterday: https://www.wired.com/story/elon-musk-boring-company-car-fli...

It seems the Boring Company expects much higher top-end speeds, however. Perhaps smaller vehicles and autonomous driving will help with that.


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]



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: