3

DEVIANTS!! NEED ADVICE...

I have been focusing on learning and implementing data structures and algorithms through participating in competitive programming sites...

Whenever I face an issue and struggle to find an answer (which is more often than not), I ask the forum about the fundamental principles involved in the question...

I avoid looking at the solution, as much as possible.. And, when I do look at them, I still question the author of the code about the reasoning behind a particular section of code which I don't understand...

I don't wish to copy and paste code, but sometimes, I wait for days on end, but I don't use the code until I receive an answer...

Is this the right way or are there any other way which I could implement to strengthen my algorithmic thinking??

Comments
  • 0
    I find looking at someone else's code on one half of the screen and then re-writing it on the other helps. I don't mean copying it verbatim, but writing it in your own style so that you understand it.
  • 3
    Please note, the people here are developers, not deviants like he people on https://www.deviantart.com/ ;D

    Joke aside, Whenever I faced the same problem I don't ask what it does, I stare at it until i know it for sure. Once I understand it, I'll use it.
  • 0
    @OfficerHalf Thank you for this useful advice... Will definitely comeback to you once I have tried it...

    I do this method, but mainly for learning new languages or checking out new libraries, etc...
  • 1
    @Awlex I'll keep your advice about 'deviants' in mind, while posting my future rants...

    I do know about Deviant.. In fact, my sister is a frequent user...

    I also tend to do the same... Stare at the code, trying to make sense.. Most times, it does the trick but sometimes, the manner in which a solution is derived or the main logic behind it confuses me... And, I am unable to connect the implementation with anything I know..
  • 0
    You could use the documentation for that programming language to find out how the code works. Or just try it out and see what it does. As long as you experiment with it to see how it behaves, you should be good. Just don't push stuff to master that you don't understand.
  • 1
    Google "Google university github". GitHub link has very good learning resource!
  • 0
    @code-god Will definitely check it out...
  • 0
    @jkrzefski So, what you are trying to convey here is to continuously try to solve problems on my own...

    And, if I am stuck, then I might some time with it, but if I still find myself clueless regarding the situation or fundamental principles of the problem, then I should mark it in 'red'...

    Discuss my problem with my peers or teachers, or ask people in the forum.. But, in the meantime, I should move on to the next problem...

    And, in the free time, should check for alternatives for the 'red marked' question..

    Just like we practice Maths...

    Is this what you are suggesting or am I perceiving it wrong...
  • 1
    @SuyashD95 Not quite. My comment was meant more like an addition to your current way. So when you get an answer that you don't understand, you should still ask the author about the principles behind it, but you should not strictly keep away from that piece of code. Instead of not using it until you get an answer, it might help to experiment with it and see how it reacts when you change small bits of it. In general, looking at other peoples code is rather good, because it might give you a new perspective on things. Of course you shouldn't use code you don't understand, but instead of waiting for a reply for days, you might as well try to understand it yourself.
  • 0
    @jkrzefski Okay... Thanks for clearing it up...
Add Comment