Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
hbrn
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
30 ms
·
331.
▲
by
hbrn
4y ago
> Confirmation dialogs take about 2 minutes to implement. Undo, while there’s the odd problem where it’s easy, very often it’s a massive amount of work to implement, like many months. UX is a feature. Might be irrelevant for yet another
332.
▲
by
hbrn
4y ago
My examples are just personal anecdotes, you can dismiss them by saying "our team won't make the same mistake". If your goal is 100% coverage then it will turn testing into ritual and only give you the illusion of quality. In
333.
▲
The Zen of Java
(medium.com)
2 points
by
hbrn
4y ago
|
0 comments
334.
▲
by
hbrn
4y ago
> Nowadays, the speed of development for statically typed languages is much faster, thanks to improvements in tooling What you static camp guys don't seem to understand is that tooling is not that important, it's just a minor m
335.
▲
by
hbrn
4y ago
You seem to be quite close-minded, every piece of evidence is not good enough. Are you only going be satisfied by a 20-year long peer-reviewed independent study? How about this: Python is only ~1.5 times more popular than Java, and Ruby is
336.
▲
by
hbrn
4y ago
It is not easier, but in order to understand why it's not easier, writing from scratch is one of the best options. And without understanding, what are the chances you'll come up with a good solution (either yourself, or through
337.
▲
by
hbrn
4y ago
> I went through long recruitment processes Sadly a lot of startups are still doing that. I was too, but I learned from my mistakes. You're not freaking Google, good candidates (the ones you should hire) have multiple offers and a
338.
▲
by
hbrn
4y ago
You do realize nobody writes code like that, right? Even in static typing land people rely on type inference. list[SomeAPIResult] in your example is redundant. You can get all the benefits of types without it.
339.
▲
by
hbrn
4y ago
True. A lot of overcomplicated solutions start from good intentions. Funny thing is, I found it much easier to challenge the original framing with upper management than with my peers. - (me) Hey, if we sacrifice this feature, we can ship th
340.
▲
by
hbrn
4y ago
I'm confused. You wrote an article about how somebody else chose Java, but you're using the term "we", but it doesn't include you? The article unquestionably leaves the impression that you were there when the choice
341.
▲
by
hbrn
4y ago
On Amazon, sorting by anything other than "Featured" is absolutely useless. Instacart will show a couple of relevant items, and then a bunch absolutely random results, some of them being the opposite of what I asked for. A lot of
342.
▲
by
hbrn
4y ago
No offense, but it's like a textbook on awful debates. Your best arguments are: "big guys are doing it therefore it's good for me too" (argument from authority) and "I tried both and decided only one is good" (
343.
▲
by
hbrn
4y ago
> I don't have to try to guess what something is, based on its name It's probably just a bad example, but in case it isn't: Sounds like you ended up at the same place. You went from guessing what is some_api.get_results(),
344.
▲
by
hbrn
4y ago
> How? With “raise from”, Python shows you not only the stack trace of the error, but also the stack trace of the original exception, IIRC. Because you can't catch the original exception, you're stuck with weird module.Error wh
345.
▲
by
hbrn
4y ago
You sound very condescending. How do you know you are not the one staying in the comfort zone?
346.
▲
by
hbrn
4y ago
> A competent Java programmer is not slower than a competent Python programmer. Time to market won't suffer. A fast horse is not slower than a fast car. Languages and ecosystems shape how people think. For example, you will find tha
347.
▲
by
hbrn
4y ago
Author credentials: Java Champion I mean, it's perfectly fine to pick language you're most familiar with, but maybe let's not pretend you're not biased? I wouldn't want to work for a leader that is full of BS.
348.
▲
by
hbrn
4y ago
> But how is there a deviation; being an Iterable is part of being a list, not a deviation from it. Because I'm a human, not a robot. If I can describe something with fewer words by sacrificing a little bit of accuracy, I might go f
349.
▲
by
hbrn
4y ago
Ugh. You should never call something "RetryableException". 1. You are in no position to decide for your customer whether exception is "Retryable". 2. For cases where you are in that position, you should just retry automa
350.
▲
by
hbrn
4y ago
Read it carefully. Complicated is not the same as complex .
351.
▲
by
hbrn
4y ago
Your code example essentially renames a regular wildcard Exception to module-specific wildcard exception. But here's a thing: For direct callers of your module, regular wildcard and module wildcard are exactly the same. There's ab
352.
▲
by
hbrn
4y ago
> Since all lists are Iterables but not all Iterables are lists, Iterables are necessarily more ubiquitous than lists. Yeah, that's what I meant by being pedantic :) Here's a question: you receive a JSON payload that contains a
353.
▲
by
hbrn
4y ago
What I meant is argument marked as Iterable is compatible with list being passed. > Iterable is better as an argument type unless you have a reason to force consumers to use lists See, I feel the exact opposite: I use Iterable only if I
354.
▲
by
hbrn
4y ago
typing.List is deprecated. https://docs.python.org/3/library/typing.html#typing.List > Deprecated since version 3.9: builtins.list now supports subscripting ([]). See PEP 585 and Generic Alias Type.
355.
▲
by
hbrn
4y ago
This really depends on the workflow. Sometimes I still sneak in minor changes after I opened a PR. Sometimes I open PR early because CI has integration/e2e tests that are hard to run locally. Sometimes I want feedback on certain parts
356.
▲
by
hbrn
4y ago
Whether something is generic/specific depends on the context. As an argument type, Iterable is permissive (generic). As a return type, Iterable is restrictive (specific).
357.
▲
by
hbrn
4y ago
Iterable is an import away, while list is already at my fingers. There's zero harm in using list in private interfaces: I know I'm the only one passing the value, I know it is always a list. As an argument type, Iterable is compat
358.
▲
by
hbrn
4y ago
> Code coverage starts to be useful once you let go of it as a goal and ignore the total percentage number When a measure becomes a target, it ceases to be a good measure. It takes immense discipline to actually let go of a metric to kee
359.
▲
by
hbrn
4y ago
> It's easy and rises code quality Absolutely not. This leads to testing being invasive and driving the design of your software, usually at the cost of something else (like readability). Testing is a tool, you can't let it turn
360.
▲
by
hbrn
4y ago
If you use feature branches, it is quite annoying that can't push two consecutive commits because CI changed something in your branch and now you have to resolve conflicts.
More ›