| ▲ | kens 8 hours ago | ||||||||||||||||
My knowledge-gap confession: even after many years with the languages, I can't write a main() in Python or Java without looking up the format. | |||||||||||||||||
| ▲ | kbelder 7 hours ago | parent | next [-] | ||||||||||||||||
So many things like that! I don't know if I could tell you with confidence the proper way to get a string length in any language. Is it a global function or an object method or property? Is it length or count or size? I have to look it up or rely on intellisense every time. I do too much bouncing between languages. Well, I know it in BASIC. Len(). | |||||||||||||||||
| ▲ | DrewADesign 5 hours ago | parent | prev | next [-] | ||||||||||||||||
No purpose in memorizing something that doesn’t meaningfully improve your understanding of the language, you only need it every now and then, and you can find it nearly instantly. | |||||||||||||||||
| ▲ | p2detar 7 hours ago | parent | prev | next [-] | ||||||||||||||||
With Java 24 it’s now: | |||||||||||||||||
| |||||||||||||||||
| ▲ | another_twist an hour ago | parent | prev | next [-] | ||||||||||||||||
IntelliJ completes the format for me. I never write it by hand. Also I have never coded in something other than an IDE. | |||||||||||||||||
| ▲ | vunderba 7 hours ago | parent | prev | next [-] | ||||||||||||||||
I’ve spent so much time in both the .NET and JS worlds that I can't even begin to count how many times I’ve typed `Where` when I meant `filter` or vice versa. | |||||||||||||||||
| ▲ | stavros 7 hours ago | parent | prev | next [-] | ||||||||||||||||
What, `def main():`? Or do you mean the __name__ == "__main__" thing for distinguishing whether the code was imported? | |||||||||||||||||
| |||||||||||||||||
| ▲ | vjvjvjvjghv 7 hours ago | parent | prev | next [-] | ||||||||||||||||
I set up some .NET services years ago. Since then it was just adding new stuff. If I was asked how to set up another service, I would have no idea how to do it | |||||||||||||||||
| |||||||||||||||||
| ▲ | the__alchemist 6 hours ago | parent | prev | next [-] | ||||||||||||||||
In python, it's trivial: def main(): # code The dunder syntax you see around isn't required. | |||||||||||||||||
| ▲ | mulquin 7 hours ago | parent | prev | next [-] | ||||||||||||||||
Continuing the confessions: I do php.net/<function_name> at least twice a day | |||||||||||||||||
| |||||||||||||||||
| ▲ | nicoburns 7 hours ago | parent | prev | next [-] | ||||||||||||||||
It's the main benefit of Rust ;) (obviously it's not but it is super nice that main in Rust is just:) | |||||||||||||||||
| ▲ | dboreham 6 hours ago | parent | prev | next [-] | ||||||||||||||||
LLMs are wonderful for this. I can't write hardly a line of shell script without looking something up. And then there are three different ways to do <thing> so I spend time beard-tugging as to which way to do it. Now I just tell the LLM what I want changed about this shell script and look at what it comes up with. 100% of the time it's fine. | |||||||||||||||||
| ▲ | croes 7 hours ago | parent | prev | next [-] | ||||||||||||||||
"Knowledge means knowing where it is written down." | |||||||||||||||||
| ▲ | andrewmcwatters 7 hours ago | parent | prev [-] | ||||||||||||||||
[dead] | |||||||||||||||||