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

I that once in a technical interview and got the job (just paused for 30 seconds until the answer came to me). I think they expected a 15 minute process of problem solving.

If I recall correctly the question was something like:

You are sitting recording cars by their license plate as they drive down a road. You only have N spots on your worksheet. You can overwrite spots as many times as you need to. By the end of the day you must have an unbiased sampling of cars that have driven by you. How do you record the cars?


Nice statistical problem! I only thought of a solution that is valid for many cars and few worksheet spots. Were you able to fully solve it on the spot?

What other situations are you concerned with that your solution doesn’t handle?

The best solution I could think of on the spot was this: First write down every license place until it fills up. Then for each time a car drives by, give it a 1/2 chance to write it down. Moving down the list regardless of the outcome. Then once the bottom is reached, do it again but with 1/3 a chance. Over and over again, decreasing the chance each time.

I checked for which situations it is valid, and it surprisingly was when there are many more cars than the list size. But it is not valid when there are just a few more cars than the list size.


Mine was to roll a number between 1 and N once N is greater than M (N being cars seen so far, M your slots available). If you get a number that is less than or equal to M, replace that slot. If it is greater than M, that sample is dropped.


Don’t use a library unless you really need it. Someone recently recommended I add Zod to a project where I am only validating two different JSON objects in the entire project. I like Zod, but I already wrote the functions to progressively prove out the type in vanilla JS.

Less is more, including other people’s libraries.


Go Proverb:

A little copying is better than a big dependency.


100% agree. This actually makes AI-aided development a big improvement (as long as you’re careful). You can have an LLM write you a little function, or extract the correct one from a big library, and inline it into your module.

Agreed.

Any time I see a product like Firebase that rolls auth and other major features into a database I roll my eyes.

Are you saying that because you fundamentally just don’t believe the db is a good place for auth, or because these low-code frameworks tend to roll it in and as such you see a lot of low quality implementations of auth from these systems simply because using them is within reach of someone who has no idea what they are doing?

To me it’s important to make this disambiguation. One take says that auth in db itself is a problem. The other take says “auth in db is a symptom of low code garbage”


I like to separate concerns. Unix philosophy and all that. That was the primary concern on my mind when writing my comment above.

I think the feature is there not necessarily because it’s the best technical idea but instead because of its ability to pull in less educated developers. That makes sense financially because there are fewer people out there with a higher degree of expertise. But from my perspective it shows that it’s not meant for me.


FWIW firebase auth and firebase DB are two separate things, and you can use them completely separately. However "Firebase" is a PaaS so I see how it gets confusing.

Fair call out but if I am a firebase customer, as I have been in the past but less frequently so, I treat them as a singular entity. In other words, there’s no situation I would use firebase and not use its auth, because the reason I might use firebase is Because Of the auth, not In Spite Of. There’s no world for me where firebase is the preferred option that doesn’t use auth, the integration like that is literally the only reason I would ever consider ClosedSourceOwnedByGoogle over alternatives

Convex has been quite good so far

Anyone doing this should be fired. Both for the lack of trust they bring to the team but also because they’re just making themselves a middle man to an LLM. Why not cut out the middle man?

People who make things don't make any money.

People who claim that they are disrupting with disintermediation, but actually simply replace the old intermediary with their own?

Those people get filthy rich.

People who _should_ be making things but are trying this intermediation technique themselves will most likely find that it's like other forms of lying. Go big or go home.


They care - but only for how the tech stack affects the product quality. Show someone a bloated React site on 3G and compare their experience to an SSR competitor.

99% of the US population have access to 4G, caring about 3G is a wasted effort. The point I’m trying to make about tech stack is users don’t care if you used Gemini, ChatGPT or Claude to generate code.

As someone who hasn’t converted to SSR yet. My main reason why I am switching is SEO, the performance increase is a plus though.


A big use case will be to tell the LLM what the type of an expression is.

They’re good for getting you from A to B. But you need to know A (current state of the code) and how to get to B (desired end state). They’re fast typers not automated engineers.

Work for an unproven startup and odds are no one is getting rich!

It only supports Helvetica!

I find it a nice feature.

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

Search: