Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

How Does One Start Thinking Like a Programmer?

Hello fellow TreeHousers,

I'm having trouble getting into the right mindset to solve programming problems.

I started codeing with JavaScript about 4 weeks ago. I hopped on the Beginning JavaScript Track right after completing the Digital Literacy Track. Before starting with Treehouse, I'd never written any code before.

I've really enjoyed learning JavaScript, and reached the end of the 'JavaScript and the DOM' course yesterday. I felt like I have a firm grasp on the very basics of JavaScript by this point, but then, when it came to the extra challenge at the end of course, I wasn't able to complete the challenge on my own.

The challenge sounded fairly simple, just adding additional responsiveness to a very basic application. But like I said I wasn't able to complete the challenge on my own.

My problem, I think, is that while I'm able to understand all the syntactical aspects covered in the Beginning JavaScript Track, I obviously do not have the ability to put small chunks of code together to do something more complex.

How do I train my mind to think in terms of building chunks of code that fit together for a greater purpose?

Thank you all,

God Bless, -Daley

5 Answers

I had this long comment originally but I felt like it was going way too deep. Just know that it will get much better with time. A lot of problems that I solve in programs I am able to do so because I have practiced and solved similar problems in the same way. If I hadn't solved similar problems before I would be lost, and would have to look up how to do it online, in a book, or maybe re-watch a tutorial video. I have been programming for almost a year it feels like the deeper I go down the rabbit hole the less I understand haha. IDK if this answered your question or not but I hope it helped somehow.

Alan Ayoub
Alan Ayoub
40,294 Points

Just like Tyler, I wrote paragraphs and paragraphs....and I decided to delete it all.

I found this article and it pretty much nails everything I wanted to communicate!

How to think like a programmer — lessons in problem solving

https://medium.freecodecamp.org/how-to-think-like-a-programmer-lessons-in-problem-solving-d1d8bf1de7d2

Tyler: That definitely helps! Thank you!

I have the feeling that I'll experience the same 'rabbit-hole effect' that you have, as I go forward. It's a good thing there are some solid tutorials and learning programs (Like Treehouse) out on the web.

Alan: That article covers solutions to pretty much all the issues I've faced in these first 3 weeks. I have to say, I've pretty much been doing the opposite of most of these suggestions. I'm really glad that Coders generally seem to be cut from the cloth of experience sharing/knowledge sharing. I'll have to reference this article next time I get stuck. Thank you!

There's a book called Think Like a Programmer I highly recommend it. (Alas, it is in C++—so you might need a fundamental grasp on C++ first—but after reading this book it can apply to any language)

It takes a lot of practice. I've been programming for 4 years every day for over 2 hours and I barely mastered thinking like a programmer. I've also taken a lot of computer science classes.

Thanks Alexander! I'm probably gonna pick that one up! All the help I can get, I'm gonna take!

Mike Hatch
Mike Hatch
14,940 Points

Daley, funnily enough, I'd been researching this topic since I came across that same article that Alan posted. I then also came across the same book that Alexander just posted. (We're all zombies walking the same path. Heh.) But... then just last night I found THIS right here on Treehouse. It's a two-part series using Object-Oriented JavaScript that teaches you step-by-step how to think while building a maze using JS.

This. This is what I need! Thanks Mike! This doesn't have to be a Lonesome Road after-all, eh?

I should pick up an Apple Tablet one of these days, if I can get one used or something, because I'd like to learn IOs development! When/If I do, I'll check it out. Sounds like something like that would provide structured practice, which is my favorite way to learn!

Thanks Terese!

HIDAYATULLAH ARGHANDABI
HIDAYATULLAH ARGHANDABI
21,058 Points

It is something that you will gain with the time. You will start to think algorithmic-ally and fast.

Enjoy Coding Stay Patient.

Patience seems to be one of the most important concepts in programming! I actually think that programming is helping me to be patient, because frustration doesn't help with debugging!

Thanks Hidayatullah!