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 trialMarc Casavant
Courses Plus Student 7,417 PointsGetting better with code
Hi there,
Learning to code with languages like JavaScript and PHP has always been difficult for me. Thanks to treehouse and more free time as of late, ive got the basics down. My question is, where do I go from here? How do I plan and write my own scripts? How do learn to QA my own code to make sure it is not rubbish, as in it runs slow, is insecure, or just horrible programming logic?
-Marc
6 Answers
Joe Hirst
Courses Plus Student 6,489 PointsLike anything, practice.
I'm not vastly versed in PHP but I'm sure myself and the community are willing to help.
One suggestion I have. Once you have built your JavaScript and PHP, offer them on your blog or website as freebeis and ask for feedback.
This way they are tested for you and users can implement changes and tweaks while hopefully the share ideas with you.
Matt West
14,545 PointsTry to build a little project using your new skills and put the code up on GitHub.
If you're a little overwhelmed, find an open source project on GitHub or Google Code and start contributing small fixes to the project. A lot of projects have 'bite-size' bugs in their issue trackers that are perfected for new programmers to tackle. You will learn a lot about how full applications can be structured. If it's a good project you should also get feedback on your contributions which helps to make you a better programmer.
If you get stuck with anything just ask for some help. There are plenty of people in this forum that would be happy to help.
:)
Kai Nightmode
37,045 PointsOne of my favorites ways of getting better is embarking on a personal coding quest.
I usually start by choosing a very small focused goal. Only requirement is that it has to be exciting.
Don't worry about sharing, reusing or even usefulness at this point. These all fall into place later.
Next I proceed to build a duck taped, paper clipped, MacGyver version of the software. The only priority is to get it working, no matter how hacky. The idea is to keep moving forward and reward yourself with frequent progress.
Once your creation works you'll be pretty high and have learned a lot of things in the process!
Now here is where it gets really fun for me. I'll proceed to refactor the code once, twice, three times or more until it feels as good as I can make it.
This is an enjoyable time because I will literally go line by line and deep dive into any minutiae that interests me. Like reading up on simple PHP or JS functions I use all the time but never really understood how they worked. Much more reading and thinking than code writing.
Once you are ready to write code you feel empowered by all the collective knowledge you've absorbed. Confident that you are making the right decision for that particular piece of your masterpiece.
By the time you've refactored your code a few times you will literally feel light years ahead of your previous self. If you spent two weeks on the project you may feel more like it was two months or more.
At this point you might be aware that your new creation is literally, the best thing that you have ever written. Wow!
Will your code will be outdated in two weeks when your future self sees it? Hope so because that means we are constantly learning new things. One of the best things about our field.
Cheers!
Matt West
14,545 PointsFantastic suggestion Dan!
Marc Casavant
Courses Plus Student 7,417 PointsWow, thanks for all the great support, and advice! I will certainly have to sign up for github, and get crackin' on some projects. I'll be sure to post my first breakthrough on here.
You guys rock!
-Marc
Jody Albritton
Courses Plus Student 5,497 PointsProjects. But don't just build a hello world project. Be ambitious and solve a problem you really care about. If you build something that you want to use everyday, you will stay motivated to get it done.