On Tue Nov 22, 2005 at 23:10:02 +1100, Ken Foskey wrote: >I have learnt C second language 26 years ago and have constantly used it >since despite this I am currently instituting a NO C policy at work. >Most (all) of our code does not need the performance of C and generally >the code is not optimal anyway and leaving the decisions to an optimised >scripting language is quite probably going to run faster than poor C >code written in a hurry. > >If we work on numbers. My code generally runs on a 2% error rate (all >right I am making 2% up but the number is not important...). I rewrote >an application of 2,300 lines of C code (not a comment in sight) into >230 lines of perl code (with lots of comments). Now with my 2% error >rate I had 5 errors in my code (about right). Now the 2,300 lines would >have had 50 errors given the same error rate. Don't use C because you >will create more code, more code equals more bugs.
Well, this isn't exactly scientific because you have a nice second system effect, but these kind of results have been reproduced in more controlled conditions in software engineering studies. But you are write when it comes down to it, in general, the bug density and just and just as importantly the LOC/hour is fairly constant across programming languages. So if you can do more per line of code the you are going to end up with a better program. And all that was generalisation, but I know at least it is true *for me*, wchih noone can dispute, and therefore that is why *I* prefer higher-level languages. YMMV. (Man this writing style of having to qualify everything you say gets tedious pretty quickly... ) >The moral is use the correct language for the job. Yep. >Performance is just >a few thousand dollars in hardware away. Take $40K as your base (for >example) and a server of $5K you need to save about 7 weeks work to pay >for it. It is not a lot of time with 10 times the number of errors in >your code. Bugs cost the time in development, correcting bugs in >production code is far far worse. But that is because you are using a closed source model. In open-source bugs are free! ;) >Sounds like a talk coming one here... Yeah sounds like fun. Possibly for a codefest? Or are there enough people coming to slu meetings interested in programming to warrant one at a meeting? -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
