Hacker News new | past | comments | ask | show | jobs | submit login

This is one of the things I love about OCaml. Since answers are not a stackoverflow search away, it forces me to actually understand what I'm trying to do. Everything takes longer at first but I end up building a deeper understanding than if I was using JS or Python. It's something I could force myself to do in those two languages, but it's hard. Artificial limitations like not having that possibility in the first place can sound silly at first, but it's something that people use all the time. It's the idea of using a system instead of relying on willpower to force yourself to do the right thing and set yourself up for success.



It actually does sound silly to me. I just don't understand what you mean. Not in general, but in this particular case. If I'm searching for "reverse a list in python" — rest assured, I do know how to reverse a list, most likely in Python too, I'm just looking for most idiomatic way to do that (so, standard library function or syntax construct) and it just so happens that the answer on StackOverflow is usually more straightforward and easier found (by search engine, at least) than in the docs (and in Python it would be a syntax construct indeed, which usually complicates finding what you need in the docs even for the languages with much better docs than Python). So why would I care if I wasn't forced to invent my own way to reverse a list? I'm glad I was able to google it!

If it's actually something relatively high-level or language agnostic — which is when I would have to "understand what I'm trying to do" — chances are indeed higher that I'll find a solution in Python, than that I'd find a solution in OCaml, but the thing is, I don't really care what language I'll find it in, as long as I am able to read it. I just have to get the idea, then I'll write it in any language I can write.

One might respond that "well, not being able to copy-paste it is the all difference it makes", but, seriously, there might have been like 2 cases in my entire life (that's 15+ years of programming) when I just copy-pasted something from stackoverflow (I think I actually remember those cases — these were indeed very specific situations, some stupid language quirks, and workarounds for them really should've been implemented in the standard library; and TBH, I didn't even really care how they work, as long, as they work — these were not your typical programming problems). Otherwise, I just don't find it very applicable: there's always some difference between stackoverflow solution and what/how you want to do. So you read the code to get the idea, then you go and write it yourself.

Ok, there are also CSS problems, I copied styles plenty of times. But that's different. And I have to change colors and stuff in the end anyways.


It is silly, I agree with that. When I find a solution with stackoverflow or a forum or whatever, I tend to not remember well the next time I have this problem. On the other hand, if I'm forced to understand what's happening and what should I do, I will remember it and learn something. I don't know if it's a character flaw or a memory issue, but that's how I work. You don't seem to work the same way and that's fine, it's just how things are.


You might be talking about solutions to popular problems are you? I can't imagine having to figure out the language's syntax or what the interface of packages/libraries is without searchable documentation.




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

Search: