Hacker News new | past | comments | ask | show | jobs | submit | renlo's comments login

    function x() {/* ... */}
    const x = function() {/* ... */}
    const x = function foo() {/* ... */}
    const x = (function() {/* ... */}).bind(this)
    const x = (function foo() {/* ... */}).bind(this)
    const x = () => {/* ... */}
    const x = () => /* ... */


Apart from hoisting (which has little to do with functions directly) and `this` these are all equivalent


Agree that the repository/service pattern is a good way to adhere to separation of concerns and make refactoring and readability easier.

That said, I really disagree with any precommit checks. Committing code should be thought of as just saving the code, checks should be run before merging code not saving code. It'd be like Clippy preventing you from saving a Word document because you have a spelling error. It's a frustrating experience.

I can make sure my code is good before I submit it for review, not when I'm just trying to make sure my work has been saved so I can continue working on it later (commit).


Most pre-commits I’ve seen are usually formatting/prettier.

But if need be, I will spam my commits locally with `—no-verify`. Once the code is ready, I reset to head and remake them as nice, conventional commits.


While I like abstracting storage into a repository class of sorts, this crap of "userService" needs to die already. I've seen too many bad codebases that stick everything user related into that one service that ends up having 8+ completely noncohesive functions.


Usually you have those checks when pushing, not committing.


He was saying that Uber will no longer operate in NL/EU, the pining was for "equal access to US services", not your data. FWIW, I am annoyed myself about having to accept GDPR popups on every website I visit, so I too pine for a day where US companies have nothing to do with "EU citizens".


Right, but the reason EU citizens don't have equal access to US services is because EU citizens decided that the services they use need to be careful with the EU citizens' data. US services said "nah, that sounds too hard, I'm outta here" instead.


What US services left? Only ones I know of are a couple of US centric newspapers. Virtually everyone stay in the EU market.


Hahaha, that will not happen. And if Uber against all odds actually leaves some other company will swoop in and take their market. Personally I prefer Bolt over Uber for rides here in Sweden.


Imagine how much poorer the world will be when one fewer jitney cab company operates in the Netherlands.


As was LinkedIn, who was forced to rate stop limiting / IP-banning scrapers for public pages.


Many other websites enforce rate limiting or IP banning for public pages (using products like Cloudflare). Why is this not legal?


Really? That seems strange.


Not to be pedantic but I was genuinely confused by this statement:

> He lived and wrote in the late 200s and early 100s BCE

Shouldn't this instead be phrased as:

> He lived and wrote in the early 200s and late 100s BCE

He was born in 254 BCE and died in 184 BCE, he lived from the mid 200s BCE, started writing in the _early_ 200s BCE, and died in the _late_ 100s BCE.


No. The English terms "earlier" and "later" refer to the progression of time from the past (earlier) towards the present and future (later); they do not refer to the number itself being larger except incidentally. (The etymologies here are that "earlier" comes from "ere" meaning "before" or "soon", "later" comes from various "lat-" roots meaning "sluggish" or "lazy" hence starting after their appointed time.)

So for example the Wikipedia article on Hellenistic Palestine contains the opening line,

> The region came first under Ptolemaic rule beginning in the late 4th century BCE with Ptolemy I Soter, followed by Seleucid rule beginning in the early 2nd century BCE with Antiochus III the Great.

It then clarifies that the events of the late 4th century BCE include events in ~320 BCE, and that the early 2nd century stuff happened in ~198 BCE. This is a standard usage of those terms "early" and "late" as applied to those centuries, the 4th (400 BCE - 301 BCE) and 2nd (200 BCE - 101 BCE).


I think the issue primarily is that there are two frames of reference used: "earlier" / "later" terms use the absolute frame of reference (time progressing forward), the numerical terms ("100s" / "4th century") are relative to the common era (higher BCE numbers mean further back in time).

To me it is confusing that they've mixed the two, even though it is convention to do so.


Who ever answers these questions truthfully though? It seems that this just tests for the ability to spin yarn at the interviewer.

I was recently asked this question, and while I've had some disagreements with coworkers over minor things, I've never had a major disagreement that was noteworthy, so I (to my inevitable detriment) said: "Nothing really comes to mind at the moment but if something like that were to happen, I'd do X, Y, and Z". Given the reaction from the interviewer I doubt I passed. I still have 2 more interviews with this company.


Preparing for such behavioral questions is part of the standard interview prep process. It's always been part of the interview game and it's really not that hard to come up with something you disagreed with someone on, negotiated with, and resolved.

If you don't disagree with your coworkers on some part their technical decisions on a regular basis, then you probably don't review their code

> some disagreements with coworkers over minor things

Handling minor everyday disagreements gracefully is a valuable soft skill


> interview game

Yes, mediocre people like to select the same.

> Handling minor everyday disagreements

is a skill that does not need to be "prepared for" in an interview. And naturally the mediocrities that think asking the standard question and getting the standard answer back are also in for a surprise.


> Preparing for such behavioral questions is part of the standard interview prep process

Ah the classic "it's not wrong if everyone's doing it" argument. But to me the op wasn't complaining about the content of the question, just the banality of answering it over and over.


> Who ever answers these questions truthfully though?

It's surprising how many candidates will say batshit crazy things not realizing they're bat shit crazy.

It's like fizzbuzz at this point, just cuts out a surprisingly large chunk of the cruft out.


I answer these types of questions as truthfully as possible. To my knowledge, it's never been these answers that hurt me in an interview. But, of course, there's never any real feedback in the hiring process, so it's borderline impossible to improve one's performance in that area.

When it comes to disagreements not being noteworthy, it could also be that you've internalized "disagree and commit." That's not a failing; that's just moving the fuck on and not dwelling on past decisions, unless they actually bear revisiting.


I literally had a guy who was giving off really hostile vibes in the interview talk about shouting at someone when he didn't agree on the solution. Given this was a workplace where people argued a technical approach with cussing and yelling I didn't need more of that.

I agree you'd think this is the dumbest question, and most people will make up something minor, but it does weed people out.


A lot of those are really a test of how well you can bullshit your way through. They probably have a fill-in-the-blanks form ready to complete with your answers, with some scoring derived from it, and your answer didn't fit in the form, so they'll pass until they find someone who can make up a good story on that particular topic.



Where in the data does it indicate that it's possible to "break the cycle"?


In the presentation it talked about college, even a short amount, can give better outcomes.

But the presentation was more of an overview of the issue, and I don't think it's fair to argue that, because it doesn't go deeply into every data point, that it's not valid. It more about bring awareness to the issues, and grounds for further research.


It shows that family/environment influences life outcomes (it should be obvious); it's not conclusive (in establishing causation), it does show a correlation. I really think it's almost obvious this is true, but it's important reinforcing with data nonetheless.

So you can break (or weaken) the cycle if you improve those conditions, and this improvement propagates.


> It shows that family/environment influences life outcomes

Not to nitpick but this statement implies causation (family environment causes life outcome) which you contradict right after.

Sorry to sound obtuse, but, I asked because it may seem obvious to you, but it's not so obvious to me that there will be much improvement. I've seen data that indicates that outcomes are not changed (much) when those early interventions / "investments" are made. There is _an_ improvement, but not to the level people expect. Like a person's height, access to high quality food will only do so much; some people are just going to have short stature however much money you invest into making sure they have access to nutritious meals.


if `twitter.com` is mapped to `x.com`, then a link `carfatwitter.com` will go to the non-malicious `carfax.com`, so registering `carfatwitter.com` seems to be just a stunt. When would `carfax.com` redirect to `carfatwitter.com`? Urls with `twitter.com` in the name are affected, not urls with `x.com` in the name.

edit: from the responses looks like I was wrong; the urls still point to `carfatwitter.com`. Leaving my comment up in case others were confused like me.


It appears the substitution only affected the text of the link, not the destination.


It's not redirecting but rather rewriting of the URL.

e.g "https://twitter.com/{acc}/status/{id}" -> "https://x.com/{acc}/status/{id}".

So if you post "https://carfatwitter.com/scam" it will be rewritten to "https://carfax.com/scam". Essentially search and replace of twitter.com -> x.com, 's/x.com/twitter.com/g'.


I infer that the display was getting rewritten, but the underlying target of the link would not. So if you posted "carfatwitter.com", the UI would display "carfax.com" but the underlying link would still go to "carfatwitter.com".

Note I have no direct experience with this, it's just the only way this makes sense as a phishing vector. The alternative is that it is being presented as a phishing vector, but was never actually useful as such, and people are just jumping up to yell about a security issue without it actually being one. That happens too.


The links themselves are unchanged, just how they display. So if you type carfatwitter.com in a tweet, then it will display as carfax.com, but if you click on the link, it will still redirect you to carfatwitter.com.


Much easier now though, with a web based medium where the content host can "revise" the content for everyone without needing to physically go out and find old copies to burn.


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

Search: