Hacker News new | ask | show | jobs
by canicode 3892 days ago
That makes sense. I do want to make sure I'm not just memorizing strategies though. I want to be able to figure things out independently, with my own logical thought.

I'll continue learning. Getting problems right and watching those tests light up green on Codingbat is a very nice feeling. I do get genuinely upset and frustrated when I can't figure out a problem, though. I'm not sure whether that means I hate coding or like it deep down.

3 comments

Memorizing can take you pretty far. Mastering and extending a body of knowledge doesn't have to come from independently postulating a few principles and working things out from there (though that can be very fun and satisfying). Focus first on imitation, memorization, then figure out how to apply it. After you can apply it, figure out how to adapt it in certain circumstances. You might even evolve and extend the knowledge, especially as you integrate other things.

One hack I'd suggest for fulfilling the craving of doing things "from scratch" when you're frustrated at a particular problem is to go back to one you already solved, but pick some class or method or set of methods of Java's library you used and make your own version. New problem! Data structures can be the most common. Used a java.util.Stack object? Write your own Stack class. Instead of `int Integer.parseInt(String);`, write your own. Try a hash map when you're a little more experienced. Pretty much everyone with the hunger writes their own string class eventually (usually in C++). Or try to solve the whole problem again in a language that gives you less, like C. It's good practice for college and tech interviews too. Too boring? Waste of time? Good, you'll appreciate it's there next time so that you don't have to keep reinventing the wheel and can just use it as you go about inventing some new thing made of wheels. The only danger is if your appetite is totally consumed, you'll swing the other way always searching and waiting for the right set of already-built dependencies you just have to glue together, and even then you could just hope for a framework that does that, your tolerance for exerting any programming effort for 'boring' stuff will go away, and everything will be 'boring'. That's not a great state to be in if you have aspirations of building rather than simply using.

Codingbat looks cool, hadn't heard of it before. You might also try Project Euler, another programming/math-problem solving site where "the problems range in difficulty and for many the experience is inductive chain learning. That is, by solving one problem it will expose you to a new concept that allows you to undertake a previously inaccessible problem. So the determined participant will slowly but surely work his/her way through every problem."

https://projecteuler.net/

I don't think that's related to liking or hating coding.

I get the same feeling, but I get it about plenty of other things.

I love coding, but I don't love it on a daily basis while I'm working, and I certainly don't love getting stuck on a problem I can't solve. I do love the moment I get it working, though.