Please!!!
Programmers really should know the basics of a language and platform before coding something that is used in a production environment. Knowing the cool tricks of a language is nice but not knowing how the basics work is just irritating.
Take for instance a little optimization I just finished... A SQL query was returning about 800,000 rows where about 799,700 were duplicates. Adding a distinct to the SQL made the page load about 80% faster. Why did the programmer not use that distinct keyword??? Maybe because they didn't know the basics. Maybe because the programmer was sloppy. Maybe the programmer didn't completely understand what was requested. Don't know.
Then, while looking at the rest of the code I saw several string arrays defined; arrays that, after populated, contained hundreds of items. To build these arrays, Array.Resize was used to add items. Now THAT just might be inefficient. Array.Resize copies the entire array and adds another element. The programmer probably should have used a List<> or some other dynamic structure.
Hmmm... now I am curious...
No comments:
Post a Comment