384 reputation
111
bio website
location
age
visits member for 2 years, 8 months
seen 2 hours ago

Sep
17
comment Where to put database table/column names?
@user3038802 you get a complete separation of your application logic and your data structure. With a data access class, if you have a piece of your data that needs to come from a different place in your database, you need to make code changes to the class. With an ORM, you simply change the mapping and leave your application code the same. ORMs also take over some of the heavy lifting in terms of query construction and security that you'd otherwise have to do on your own. There certainly nothing wrong in going the route you've suggested, but you may have to do more rework down the road.
Feb
13
comment Is it possible to avoid enormously big switch in that case?
Now that this has been marked as a duplicate, should it be migrated to CodeReview.SE so that the OP can get an answer? The question cited as a duplicate presents an abstract case, where this is a specific instance.
Feb
13
comment Is it possible to avoid enormously big switch in that case?
I wouldn't say that a moderately sized switch statement is always a code smell, especially when there is a natural limit to the number of cases (i.e., there are only ever 8 surrounding squares).
Jan
14
comment Formalizing a requirements spec written in narrative English
...and if you create Gherkin specs, those can be used in BDD frameworks such as Cucumber (cukes.info) or SpecFlow (specflow.org) for automated testing and validation.
Nov
6
comment How to show code samples in an interview?
cross-posted at Workplace