One of the things that is hard to grasp as a newbie, is the importance of thinking longterm.
Because it takes a while to understand the importance of:
3. Project Management
4. Error Proofing
There is probably more to the list, but most newbies, think if the app works, that's all that matters.
And I was the exact same way, give me a goal, and I couldn't wait to code.
But then begin the painful lessons:
1. This isn't exactly what I had asked for.
2. I have to change something in your code.
3. I get too many errors on this app, did you error proof it?
4. This application, 1 out of 100 gets the job done, what's happening 99% of the other times? Did you test it?
The reason why, I and other classicists/old schoolers/purists emphasize these things so much, is because you are dead on aiming for a hungry bull just ready to rip you to pieces.
We all make mistakes, and that's okay as long as we learn from them.
And to help you prevent them from the long haul, you need to take a different approach to your coding.
Take pride in your work, knowing that it is going to do it's thing for a long time 5-20 years, who knows??
However then make sure the app/project will last that long by following the methods that help make sure you get there.
Let's briefly go over these top-notch methods:
1. Commenting, Elyse over at Anticlue has a nice article on commenting, here
But simply said, commenting can be simple or complex, but the more details you put in there, the easier it will be to fix/repair in the future.
Which is the whole purpose, put in the details now, to make it easy for you later.
Also it's much more important, if people besides yourself are going to look at your code. Take pride in your code, make it look nice, neat and indented.
2. Planning, I can't say enough about planning. Planning is both the skills you develop to architech the project/app, but it's also making sure you have a clear/written and documented vision of your project.
3. Project Managmeent, it sounds like a pain in the ass, but really it's godsend. Because this prevents communication mistakes.
I don't know how many times, it's happened to me, where I thought I knew exactly what the client/customer/boss wanted for the project, only when I started coding, they said, "What the heck is this? This isn't what I wanted?"
Isn't that a pain???
So learn from this, use a simple-to-complex project management system to prevent communication mistakes, as well as not wasting anyones time until everyone knows what everyone else wants and will get done.
4. Error-Proofing, this is one of my concepts, if someone else came up with it before me, I apologize. Error Proofing simply means preparing your code to handle any possible error.
This means what copy/app changes you want to happen based on what kind of error.
Also this can mean some cool looking error reporting, Qforms has some interesting ideas on form error handling.
Also it means, knowing your incoming data, protecting your datatypes. If your app depends on results from a query, what if you get no data one time? How does your app handle it?
5. Testing, this is one the that my current boss is a master of. You give him an app, and he will break it into smithereens. :)
Which is both funny and a good thing, because it takes a lot of work to do testing, and prepare your code.
You gotta lose your ego, come up with a testing system, that always changes and evolves, and make sure your code is really PERFECT, before it gets public.
That's all for now.
Remember think longterm, do you really want to have to fix some crappy app, you did 2-3 years ago, but was written so horribly no english person can read it?
I don't think so.