0

Which one is better way in programmig:

  1. If you have a problem for programming, try to search solution from the Internet.

  2. Learn useful parts of the programming language by heart and learn how to apply those well. Then you can spend your days without Internet just by programming. You get your things done although someone might have put some part of the code somewhere on the Internet.

guest
  • 1
  • 4
    i got 2 college degrees in software engineering and i still Google every 15 min while programming. – A.bakker Apr 05 '23 at 07:01
  • 1
    Why are you making it an either/or choice? What about _3. All of the above_? – gidds Apr 07 '23 at 12:54
  • 3
    The silent assumption here is that there is some universal measure of superiority which is (a) discernible and (b) definitively provable. There isn't. – Flater May 10 '23 at 00:00

3 Answers3

3

Although programming languages are not like human languages. I think an analogy will fit this question.

Can you learn a foreign language by memorising phrases?

Answer: it may help, but you won't be fluent or even close. You need to learn to program. However, yes. You will have some memorised phrases. And you will look stuff up.

ctrl-alt-delor
  • 10,635
  • 4
  • 24
  • 54
2

Available code in the internet are made to be find, however Internet doenst like very much when you ask for code that are not of common use. If you "learn useful parts of the programming language by heart and learn how to apply those well" then you will be in full control and will not be in a inpass because of inflexible code/framework from the Internet.

Lucas
  • 19
  • 1
2

Is it useful to search code from the Internet?

Yes.

You won't be a good writer without reading a lot. You won't be a good programmer without reading lots of other people's code. As you gather experience, you'll get better at figuring which is good code. That's a big problem for novices in any field though.

Searching code does not mean finding it and pasting it into your project. It means reading to understand what techniques the programmer used, learning those techniques, and then applying it on your own.

Which one is better way in programming

Neither is better. You need to be fluent in both.

There's dearth of formal (as in "we paid competent people to write it") technical documentation for large systems built from disparate blocks, and many of the problems people run into are only "documented" because someone else ran into them and figured a solution, often at some pain. So searching solutions on Internet is a critically useful skill to have.

On the other hand, if all you do is search other people's solutions, you won't innovate much. So there's a balance. You read code to learn, not to copy.