Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Here's the thing: I have been learning to code in jQuery (not raw JS) and PHP for about 3 months now. During this time, I have learned a lot of different things, discovered how a web application is built, how web servers work, how databases work, and how I should really learn JavaScript rather than leaning on jQuery. But, I have found myself depending on tutorials and online guides to accomplish a given task; and this really affects my sense of accomplishment, so to speak. I'd never be content with myself, even after building the whole script, because someone had to point it out to me. Because I couldn't get it right by myself.

Basically, I have no clue how to "begin" building something from scratch unless I see someone else's implementation first. How do I achieve such a mindset where I will be able to recognize which steps do I have to take in order to go about coding an idea, application, function, etc., without any need of tutorials or examining foreign code. How to move on to the next step, so to speak.

TL;DR: How to stop depending on tutorials and write code without someone telling you what to do.

share|improve this question
2  
As a new programmer, you have two choices. You can either: 1. Re-invent everything yourself, or 2. Stand on the shoulders of giants, like Isaac Newton did. –  Robert Harvey Jan 22 '13 at 19:03
1  
Practice, practice, practice. Programming is no different from learning to cook. Start small. –  James Jan 22 '13 at 19:03
    
Why would you want to do that? Many professional programmers never code for themselves. –  kevin cline Jan 23 '13 at 5:27
    
@kevin cline, you can't really mean that. nobody gets to be a professional programmer if theyve never coded. perhaps they code less, now that they know which libraries are good for what, but not never. –  Octopus Mar 27 '13 at 20:49
    
@Octopus: The question was facetious, but the statement is true. –  kevin cline Mar 28 '13 at 21:00

2 Answers 2

First off, you should never stop seeking knowledge from others to help cultivate new skills.

That said, it is good to learn to create things from "scratch". As you are following your tutorials, try playing with the code and combining different concepts you've learned to go beyond what the author has written. This will deepen your understanding of the subject.

Then, think of a "simple" project. It doesn't have to be unique; it could be something that's already been done 1000 times. Think of all the different pieces required to make it work, and think of how to implement each piece. When you hit roadblocks, search for help or ask a specific, detailed question on a forum. Start as simple as possible and gradually add functionality.

For example, create a calendar program. Start by just displaying the current month to the user. Then add the ability to select a month to display. Then add the ability to create events on certain days. Then make the events persist after closing and re-opening the program.

Whatever you do, keep reading tutorials and books. These will give you more tools for your toolbox so you can create ever more complex projects.

share|improve this answer

Stick with it! When learning something new it can often feel like you're getting nowhere when actually you're taking on a lot more than you think. A few things I'd suggest:

Become a better problem solver

One thing I've found invaluable in being able to approach new projects from scratch is developing your problem solving skills.

Similar to Chris' advice, identify a basic problem that can be solved with a website (something as simple as a to-do list, for example), now how would you solve it if you were given pens and sticky notes?

Once you've thought of that (or even actually done it!) think about the following:

What's good about that system? (e.g. it's simple to understand, I can move things around / prioritise easily)

What could be improved? (e.g. I'd like to be able to edit a to-do without throwing away the note and rewriting it)

What information are you collecting? (e.g. Dates, times, places, instructions)

How are you interacting with that information? (e.g. Adding new to-dos, ticking completed ones)

Suddenly you've identified a basic requirements list!

Once you reach this stage you can start referring back to all those tutorials you did for the specific 'how tos' - "Tutorial X had a section on adding things to databases with PHP", "Tutorial Y covered sorting things with PHP" etc. Being able to take snippets of what you've learnt and link them together is a great start.

This 'problem solving with pens and paper' approach isn't just limited to basic things either; I've started designing huge, complex PHP systems by fist thinking about how I'd do it without a computer!

Specialise

I see you're just starting out with both PHP and Javascript, while both are very important I'd maybe consider picking one or the other to first get comfortable with (my recommendation would be PHP). The two languages are similar enough that actually learning and remembering the subtle differences could be a hindrance.

Once you've gotten comfortable with basic problem solving and scripting with PHP on your own, you'll be surprised how much that translates into Javascript, it's just a slightly different syntax.

Jump in at the deep end

I'd also fully recommend picking a project that you feel is above your ability level and just going for it! It may take you ages and it may be infuriating at times, but having a goal is a great way to motivate yourself and learn from your mistakes.

Don't worry about using tutorials (and read the manual!)

No matter how good you get at web development, you will always need a tutorial at some point, there's always something new to learn or a better way to accomplish something! Just make sure you think about what you've learnt after every tutorial and purposely try to identify bits you can use again. Try taking one tutorial and changing it slightly using things you've learnt in others (e.g. If you've built a basic blog, could you add a calendar or comments to it?).

Remember as well that official docs are often the best place to look for language-specific help, the PHP Manual (http://php.net/manual/en/langref.php) is especially good if you need help using a particular function or something isn't working how you expected. You'll quickly start to recall that information automatically, without a tutorial guiding you.

Hope some of that helps, and good luck :-)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.