Next privilege 2,000 Rep.
Edit questions and answers
5 12
~91k people reached

  • 0 posts edited
  • 0 helpful flags
  • 35 votes cast
comment Is the test, which touches the filenames under directory, a kind of unittest?
One resource that has been really helpful for me is Roy Osherove's book The Art of Unit Testing.
comment What is the logic behind filtering/sanitizing input?
If I had to venture a guess it is probably because they want something like that locked down by default, to prevent less experienced developers from causing huge security problems. I think back to the developer I was at the very start of my career and chances are I would have made a mistake like that. Framework makers have to sometimes write for the lowest common denominator, which causes some headaches for the more experienced developers.
comment Storing IEnumerable as instance variable - is it a code smell to expect it to change?
Returning the list as IEnumerable is separating code through interfaces, which is always a big plus for me.
comment What if globals make sense?
In the example I gave the singleton only existed in one area of the code, the service layer. All other layers accepted it as a parameter, which allows the code to be decoupled. The other layers do not care how the object was instantiated, all it cares about is that it was instantiated at some point. If other areas of the service layer need it they can certainly use it, but when passed to the other layers of the application it would be seen as any other variable. However if other layers change it then a singleton could end up being a large headache, and code should be in place to prevent it
comment Automated tests for differencing algorithm
Automated tests typically deal with static data. If your source text is static, and your modified copy is static, shouldn't the end result always be the same?
comment Should i expect real world questions from interviewing agency ?
That is good to hear! Good luck!
comment How to get motivation and time to learn outside of work?
I agree. Plus you become a more well-rounded person.