We pay for user submitted tutorials and articles that we publish. Anyone can send in a contributionLearn More
I am writing this article as a sequel to the Measuring Programming Progress By Lines Of Code article. As I already stated there, software Managers want to have some metric to estimate their workers. They are always seeking for a a precise and measurable way to know the programming progress and the developers productivity and performance. If you read the previous article, you know that I don’t think that counting the lines of the program source code is an efficient metric at all. Let me please talk about another common metric – measuring the amount of extra hours a software developer has done.
Software Managers all around the globe, need to have some metric to estimate their workers. Sometimes the management event wants to create a precise and measurable way to know the programming progress and the developers productivity and performance. One of those methods is called SLOC – Source Lines Of Code. This metric is used measure the size of the software by counting the lines of the program source code. Some managers tend to love SLOC because it can be automated so it requires very little effort and the effect of it can be visualized. That is exactly what managers like! it is easy and it can be easily inserted into their reports, what could be better than that? It seems just perfect.
This is the fifteen post of the series of programming job interview challenge, 37 readers provided an answer to job interview challenge #14. As you can understand from the title, I have a little announcement to make, but lets first head on to last weeks question answers.
This time, Omar was the first one to provide an efficient and correct detailed answer:
Draw a line from the single point (any direction will do).
Count the number of times that this line intersects with lines of the polygon.
An even count (including zero) indicates that the point is outside of the polygon.
An odd count indicates that the point is inside the polygon.
Here is a nice image taken from Jon von Gillern blog post
The fourteenth post of the series of programming job interview challenge is out, 79 comments with answers were provided to job interview challenge #13. We didn’t publish a question last week due to a sever lack of time, so another week is gone and here we are again.
Mark R was the first to provide a correct and detailed answer (which I can quote here):
As you examine each character, classify it as either an opening or closing bracket. If it’s an opening bracket, push it onto a stack. If it’s a closing bracket, pop the top character off of the stack; if the stack was empty, or the character was not the matching open bracket, then return an error. At the end of input, if the stack is empty, you have a legal expression.
C++ has a built-in stack class, so this becomes a trivial problem. I’m not sure about other languages. You could always simulate a stack by appending and deleting characters from the end of a string.
So, in one word, the most efficient answer is use a stack. Here is a nice image which was crafted by David Tchepak in his blog post Brackets, braces, parentheses, and other such creatures:
During the Job Interview Challenge Series we are running here at Dev102.com, we usually get some comments from readers who think that the quality of a specific question is not good. Here are some of those comments:
On the other hand, many readers provided answers to the questions and enjoyed participating in those challenges. Some thought that the questions are very good:
Software errors, are so prevalent and so harmful that they cost the U.S. economy an estimated $59.5 billion annually. There are many examples of very serious and detrimental software errors such as:
Obviously, we would like to deliver a “bug free product” to our customers, but unfortunately, this is an un achievable goal. While some errors can be very easily eliminated, other are very evasive. What are the measures taken into consideration when we decide if an error is evasive or not? Lets create a list of software error parade and talk about it:
This one is for all you guys who are just starting to use LINQ and have no idea how to make those queries work. I have tried it and i am glad to say that it is very friendly and usable especially if you have no experience with Linq Linqpad is a very user friendly […]
Copyright © 2012 Dev102.com
Breeze : Designed by Amit Raz and Nitzan Kupererd