Whats everyones opinions on coding something really sloppily, but still maintaining security and having it done really quick, against doing it very well done but taking a long time. At the end of the day, each will have the same functionality, does it matter that the former is coded really badly?
When it comes to maintainability and optimization, then yes it matters. If you're just making scripts for yourself, it probably won't matter as much as long as you can deal with your own code.
hmm, good question actually. If it's for a client that's important to you and you want further work, or an application that you know you'll be updating - then yes, take your time if it's a quick personal task of some sort, cut all the corners you want!
Well that depends on the circumstance. We often have cases at job where the problem needs to be fixed, and now, since the client and authorities are waiting after us. Let's worry about the nice code later... But if you're building something that's going to be used again and again, better make it as robust as possible.
one more thing affects quality of code is price ...while we are working on client projects our seniors want to get rid of smaller projects early because client is not paying enough for documentation... but if clients are good enough and want good quality with competitive price we deliver best documentation and quality codes.
I disagee, price should not reflect the quality of the code, if the client isn't paying enough it is because you are not charging him enough. Quality speaks volumes, I rarely bid for work anymore because most of my jobs come through referals from customers who are happy with the quality of the job.
You can never justify poor quality coding for a client. Obviously, if a quick fix can solve a problem that's stopping a live site from working, use the quick fix asap but then later do it properly. I've worked on sites where the coding is so awful it's taken me twice as long to sift through the crap, often needing to effectively start from scratch since the existing code is impossible to extend or re-use. If it had been me that had paid for the original code in those cases, I would demand my money back and I will always advise a client to try that. If the client is unwilling to pay for the necessary time, I'll try to explain the significant savings on long-term cost if they pay for good, readable and maintainable code now, should they ever wish to further develop the site. If they still refuse to pay a reasonable amount, I'm not going to work for peanuts, nor create crap quality work - I'll just have to turn down the work and move on.
I think you should never do anything quickly. If it's your site or not, your sloppiness may cause other security issues with other sites on the same server, if you are on a shared server. Example: Not validating uploaded files, can cause an exploit to be slipped in and gain access to everyone sites that's on the same box. Always do your best,
In most cases good coding is easily maintainable, upgradeable, and easily expanded upon. It's always good to do something right the first time.
Best bet would be to put the time in. Bad coding could mess up if you want to expand it and make you invest more time anyway.