We all know that there is good code and bad code.
We also know that a lot of bad code is written every day.
The following little test is a combination of a joke and some very serious points about bad code.
Note that the rules apply to all languages. It is not just the languages known for well structured programs like Pascal, C++, Java, C# etc.. It is also for languages with a tradition for a more relaxed attitude and lots of developers with no formal education in software development like VB, PHP etc..
The test questions are for server side part of web applications. That is probably where most bad code is seen. You will need to sligtly interpret questions for different types of applications.
There may be questions where you are not fully in one or another answer, but you can try both answers and see how you score with each.
And yes the bar is set rather high. :-)
Question: how are different aspects of the application separated?
Question: do you use any frameworks/libraries?
Question: how long are your functions/subroutines/methods?
Question: do you use global variables instead of passing everything as arguments to functions/subroutines/methods?
Question: do you use prepared statement/parameters?
Question: what would it take to change from one database to another (like from MySQL to SQLServer)?
Question: how do you handle errors/exceptions?
Question: do you use unit testing?
Question: how do you design your application?
Question: how is your approach to performance?
|1.0||September 2nd 2016||Initial version|
|1.1||October 8th 2016||Add content overview|
See list of all articles here
Please send comments to Arne Vajhøj