Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
formulathree
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
31.
▲
by
formulathree
3y ago
>A Python instance is effectively a dictionary. The contents of that dictionary can be mutated at runtime to disagree with the type that is specified. This is perhaps an antipattern but it’s not uncommon. Yes I know. but the you will see
32.
▲
by
formulathree
3y ago
This is possible. But I did do an interview with HR screening and they passed me which gave me access to this takehome. I know I seem a little abrasive in my replies here, but I'm being genuine... a lot of the criticism I'm seeing
33.
▲
by
formulathree
3y ago
>I won't say any more on the subject. Yeah don't bother. >We're not considering language extensions (which are built in BTW, on par with using the stdlib), but we're considering completely separate ecosystem plugin
34.
▲
by
formulathree
3y ago
>Even at companies that do use type hints, there’ll be tons of legacy code that won’t (and probably tons of new code as well if we’re being realistic). The first part is true, I agree with that assessment and I never made a contrary clai
35.
▲
by
formulathree
3y ago
I've likely worked for more companies then you in the last 5 years or so due to my personality. I don't stay at one place for long. Actually I've probably worked for more in my entire career, but only the last 5 years should
36.
▲
by
formulathree
3y ago
It's changed a lot recently. I would say the majority of companies now use type checking. It's def not as pervasive yet as Typescript.
37.
▲
by
formulathree
3y ago
>The problem is less the language and more the culture around it. Typing will always be second-class, culturally. Additionally, mypy feels much slower to use versus something like Rust’s ‘cargo check’. Agree with mypy being slow. As for
38.
▲
by
formulathree
3y ago
monkey patching is rarely done. In practice, your rebuttal almost never occurs. I believe these type checkers can detect monkey patching and trigger a type error or warning.
39.
▲
by
formulathree
3y ago
Yes this is probably it. The biggest flaw in the code. I will note, only one person pointed this out in the entire thread and that's you. If there's any raw legitimate claim to a rejection it's this. Literally everyone else c
40.
▲
by
formulathree
3y ago
modern python development is used in conjunction with an external type checker. That's what I meant. My mistake for not being clear. Obviously the python interpreter itself does not do any type checks. It's sort if like how modern
41.
▲
by
formulathree
3y ago
Yes I mentioned this.
42.
▲
by
formulathree
3y ago
What ide are you using? Also what are you using for the build? Cmake? Just curious. I found in general most ides don't work well for embedded. There's always some really annoying flaw.
43.
▲
by
formulathree
3y ago
Modern python is no longer dynamic. Type checking is a big part of python now. Python also has ADTs which match it in power to rust.
44.
▲
by
formulathree
3y ago
>Ah OK, so this is where I think that we're talking past each other. When I say "testing", and the reason I focus on making them automated is that when I sit down to write tests, if I'm really up to it I get myself in
45.
▲
by
formulathree
3y ago
>Again, here you seem to be arguing against a strawman that doesn't know that blocking the IO loop is bad. Try arguing against one that knows ways to work around that. This is why I'm saying this rule isn't true. Extensive
46.
▲
by
formulathree
3y ago
>You literally had a bug in your code that would have been caught with testing, and it did not have to do with the logic but with input sanitization, which has to do with your integration with what the framework provided you. No this bug
47.
▲
by
formulathree
3y ago
>The hot path is worth optimizing first, in my mind -- giving up perf there for stats which will be called much less doesn't make sense to me. You aren't getting what I'm saying. logN is already a huge optimization for a h
48.
▲
by
formulathree
3y ago
Solid tip. Will follow. Thanks.
49.
▲
by
formulathree
3y ago
>Well, if making sure to include automated testing for APIs and error handling is junior, I look forward to staying a junior engineer for my whole life. I don't think I'd submit a take home coding test without tests. Error hand
50.
▲
by
formulathree
3y ago
>If your argument is that the lambda gets optimized out, or that the benchmarked difference is insignificant (it very well could be!), then I could understand that. In interpreted languages I believe the thing that gets saved to mem is a
51.
▲
by
formulathree
3y ago
Good call. I think I'll be following this advice for the future.
52.
▲
by
formulathree
3y ago
I ran the default formatter in pycharm. Oh man someone who grades on formatting is a nightmare. I addressed the unit testing thing in other comments. First I'm not an adherent to unit testing much of the code is io based and very littl
53.
▲
by
formulathree
3y ago
The wildly mixing is because sometimes I want to use quotes within quotes: ' "a string" '. I default to this " ". But I switch around when needed. This is standard python methodology. Anyway.. This kind of thin
54.
▲
by
formulathree
3y ago
This mirrors my current feeling. Just wanted to be sure and not biased. I will say from the perspective of the reviewer he is likely to not be aware of this. Likely he thinks his pet preferences should be standard practice as do most progra
55.
▲
by
formulathree
3y ago
>what's in settings.py should probably be in an env file Have you used Django? Django follows the pattern of a settings file. No environment variables. A global env file imo is definitively worse. It forces you to write code outside
56.
▲
by
formulathree
3y ago
No. If the candidate spends four hours on a take-home it is basically a moral obligation that you give feedback. The exchange is literally unbalanced here. You ask for four hours from the candidate. The candidate asks for 1 hour from you fo
57.
▲
by
formulathree
3y ago
>I'd ask about your submission's lack of tests (getting at unit tests here) Every commenter hit on this. I have my reasons. But it's so common that next time I'll be for sure doing it. Lesson for me and everybody: for
58.
▲
by
formulathree
3y ago
There's a problem you're not seeing here. This solves it partially but in the end doesn't fix anything. The key thing here is redis is IO and it can't be tested. Think of IO as a virus it pollutes the outer scope of anyt
59.
▲
by
formulathree
3y ago
>Is there a reason for this? I would think this was a good chance to show off your ability to write succinct/standardized documentation w/ sections that anyone else would be glad to read/see. I threw the docs in the README
60.
▲
by
formulathree
3y ago
>There's some nitpicky bits (like how "utils.py contains two utility functions" is then followed by _three_ bullet points :P ) There are three functions: https://github.com/anonanonme/takehome-sample&
More ›