Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
palata
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
44 ms
·
931.
▲
by
palata
8mo ago
Programming languages are non-ambiguous, in the sense that there is no doubt what will be executed. It's deterministic. If the program crashes, you can't say "no but this line was a joke, you should have ignored it". You
932.
▲
by
palata
8mo ago
> Redundancy is a feature. Mismatches are information. Consider this: Respectfully, if someone wrote code like this, I wouldn't want to work with them. I mean next step is "I copy paste code instead of writing functions, and in
933.
▲
by
palata
8mo ago
The risk with that is that because it was not obvious to you does not necessarily mean it's not obvious to others. Over the years, I have seen many, many juniors wrapping simple CLI invocations in a script because they just learned abo
934.
▲
by
palata
8mo ago
> It's professionalism and respect. If someone gives me code full of superfluous comments, I don't consider it professional. Sounds like an intern who felt the need to comment everything because ever single line seemed very com
935.
▲
by
palata
8mo ago
Literate programming is not about documenting the public API, it's about documenting the implementation details, right? Otherwise no need for a new name, it's just "API documentation". > if you need to e.g. make a qui
936.
▲
by
palata
8mo ago
> an argument for protecting that test suite and API specification under copyleft terms. If we protect API under copyright, it makes it easier to prevent interoperability. We obviously do NOT want that. It would give big companies even m
937.
▲
by
palata
8mo ago
My understanding is that "literate programming" doesn't say "you should document the public API". It says "you should document the implementation details, because code is hard to understand". My opinion is
938.
▲
by
palata
8mo ago
Again, if it's a comment saying "we need this hack because the hardware doesn't support anything", I don't call it "literate programming". Literate programming seems to be the idea that you should write pr
939.
▲
by
palata
8mo ago
What do you mean by "poorly documented"? I have been using it for 20 years, I have yet to find something that is not documented. As for convoluted, I don't find it harder than the other build systems I use. Really the problem
940.
▲
by
palata
8mo ago
> even during the window of opportunity with Scala on Android. I don't understand this. You can run any pure Java jar on Android, pretty sure you can do that with Scala too? It's not exactly a "different platform" in
941.
▲
by
palata
8mo ago
I would call your example "bad code". Do you disagree with that?
942.
▲
by
palata
8mo ago
> Programming languages are natural and ambiguous too, what does READ mean? "READ" is part of the "documentation in natural language". The compiler ignores it entirely, it's not part of the programming language p
943.
▲
by
palata
8mo ago
IMHO, you shouldn't have to justify yourself ("yeah yeah, this is not optimal, I know it because I am not an idiot"). Just write your code in O(n) if that's good enough now. Later, a developer may see that it needs to be
944.
▲
by
palata
8mo ago
Do you have an example of such knowledge that you need to get from the comments? I have been programming for 20 years, and I genuinely don't see that much code that is so complex that it needs comments. Not that it doesn't exist;
945.
▲
by
palata
8mo ago
Agreed. Tests are documentation too. Tests are the "contract": "my code solves those issues. If you have to modify my tests, you have a different understanding than I had and should make sure it is what you want".
946.
▲
by
palata
8mo ago
My point is that if your code is well written, it is self-documenting. Obviously Class1 and var2 are not self-documenting.
947.
▲
by
palata
8mo ago
Difficult to say without an example, but "code isn't enough" is just one possible conclusion in this case. Another one could be that the code is not actually as good as expected, and another one is that the colleagues may nee
948.
▲
by
palata
8mo ago
> JetBrains also wants to make Kotlin target every platform under the sun So did Scala long before. It's just that Kotlin got a lot more traction for different reasons.
949.
▲
by
palata
8mo ago
I am not convinced. - Natural languages are ambiguous. That's the reason why we created programming languages. So the documentation around the code is generally ambiguous as well. Worse: it's not being executed, so it can get out
950.
▲
by
palata
8mo ago
Well many times it does. bool isEven(number: Int) { return number % 2 == 0 } I would say this expresses the intent, no need for a comment saying "check if the number is even". Most of the code I read (at work) is not documented,
951.
▲
by
palata
8mo ago
Well many languages are memory safe. Java has been memory safe forever. Rust is the one that is memory-safe with zero-cost abstractions, right?
952.
▲
by
palata
8mo ago
> I had some Scala 3 feelings when reading the vision, I hope Rust doesn't gets too pushy with type systems ideas. I don't know if it is true or not, but my feeling is that Scala brought a lot of new ideas. But as I read somewh
953.
▲
by
palata
8mo ago
How does it compare to Kotlin async? I find Kotlin generally hits a good balance across the board.
954.
▲
by
palata
8mo ago
I have been reading HN for a few years, and my feeling is that I find fewer and fewer interesting articles. Maybe it's just me, and the average articles are the same quality. Now I tend to skim through it to see if a title looks like i
955.
▲
by
palata
8mo ago
Many students nowadays may say "why would you need anything other than an iPad?" :-)
956.
▲
by
palata
8mo ago
Well the trains go with the rails. It makes no sense to compete on the same rails...
957.
▲
by
palata
8mo ago
I don't understand what you say, but you sound like you did not like my question. I was merely pointing out that "buying used" is not necessarily better than "buying new but keeping for 8 years". Many people "b
958.
▲
by
palata
8mo ago
When the complaint people have about a product is "I can't use it and I really wish I could", I feel like it's a good problem :-). > Running GraphineOS without all the security features they want would be better for m
959.
▲
by
palata
8mo ago
I denied the contacts permission to the Play Services. It just shows a notification when it tries to access them, which is actually not common at all.
960.
▲
by
palata
8mo ago
My opinion is that trains are a natural monopoly, they should belong to the government. Fine if some trains go through it (e.g. a TGV between Paris and Berlin).
More ›