1,161 reputation
914
bio website
location Charlotte, NC
age 37
visits member for 3 years, 11 months
seen Sep 18 at 21:42

I am a developer working for one of the big banks, and am presently working on internal-use ASP.NET application written in C#.


Sep
27
awarded  Yearling
May
31
comment How Much Of A (Broken) Legacy Framework To Keep
You might want to get a copy of Working Effectively With Legacy Code.
May
29
comment I don't understand how TDD helps me get a good design if I need a design to start testing it
If you have read Robert C. Martin's work or maybe watched one of his videos, you'll see that he often has a design in mind but he isn't married to it. He believes that his pre-conceived notion of the right design will emerge from his tests, but he doesn't force it to. And in the end, sometimes that design does, and sometimes it does not. My point here is that your own prior experience will guide you, but the tests should drive you. Tests should be able to develop or debunk your design.
May
24
comment Is there a specific name for the “Square inherits from Rectangle” paradox?
@gnat, if a method had a rectangle, it might assume mutating the width would have no effect on the length. Maybe it doubles with width and expects the area to similarly double. When given a square, that assumption is out the window, provided that the square is correctly implemented. Double the width, the area quadruples. It also begs the question of whether the square needs separate width and length accessors/mutators.
May
24
awarded  Nice Answer
May
24
comment Most human-friendly way to order class method definitions?
Related: programmers.stackexchange.com/questions/186418/…
May
23
comment Agile MVP (Most Valuable Player/Programmer)
If my team ever did this, I would want the option to kindly opt out of such nonsense. I don't want a biweekly pat on the back.
May
23
comment Should I write compact code or code with lots of spaces?
"I have noticed that when I look at the Javascript code of most professional websites, they usually use the second style, so there might be something to it." What you need to understand is most professional developers are terrible.
May
14
comment Why do people consider Python a weak language?
Don't switch. Add. Either (or both) of C# or Java would be good to have in your repertoire. As would other languages and paradigms. However, from a pragmatic standpoint, become an expert in the languages and tools that you think are going to get you where you want to be.
May
10
comment Hallway usability testing and quiet working environment together
@hus787, in all honesty, I also sit in a cubicle at work and it is the first in the row, so conversation typically happens nearer to me than I would often like and it does annoy me greatly. But then, my workplace would probably score a 2 (ok, maybe a bit higher) on the Joel Test. I use earphones while at work to block that out, and work from home 3 days per week. At home is no better. I have to pump the music just to drown out those infernal birds outside the window.
May
10
comment Hallway usability testing and quiet working environment together
I try not to have my desk in the hall.
May
10
comment Scratch - why do schools teach students a language that is not used anywhere else?
Schools teach a lot of things that aren't used anywhere, programming and otherwise. Heck, a lot of people's favorite languages aren't used that many places, all things considered. Schools (good ones, at least) are teaching you how to think. How you apply it is up to you.
May
8
comment How to unit test method that returns a collection while avoiding logic in the test
Osherove would have your head on a platter for having 3 asserts. ;) The first one to fail means you never validate the rest. Note also that you didn't really avoid the loop. You just explicitly expanded it out into its executed form. Not a hard criticism, but just a suggestion to get some more practice isolating your test cases to the minimum amount possible, to give yourself more specific feedback when something fails, while continuing to validate other cases that could conceivably still pass (or fail, with their own specific feedbacks).
May
7
comment How to unit test method that returns a collection while avoiding logic in the test
@Izbata, his question specifically mentions that ordering is important. His words: "others will be set to a value which is dependent on their position in the collection." There are plenty of collection types in C# (the language he references) that are insertion ordered. For that matter, you can also rely upon order with lists in Python, a language you mention.
May
7
comment How to unit test method that returns a collection while avoiding logic in the test
I recommend not looping. If your test is that the third thing has its Bar set to Frob, then write a test to specifically check that the third thing's Bar is Frob. That's one test by itself, go straight to it, no loop. If your test is that you get a collection of 5 things, that's also one test. That's not to say you never have a loop (explicit or otherwise), it's just that you don't often need to. Also, treat Osherove's book as more guidelines than actual rules.
May
3
comment Are there any statistics on how often code is read?
"If you spent five minutes writing a comment, you should have spent five minutes making the code so obvious that it didn't need that comment."
Apr
24
comment Is it OK to split long functions and methods into smaller ones even though they won't be called by anything else?
@exizt, if those functions are completely coupled to your workflow, then other potential callers wouldn't find them useful. Problem almost solves itself. But depending upon the language you are using, there are mechanisms for hiding that functionality from callers that wouldn't find it particularly useful, either by way of modifiers in the class file, or in the package or assembly. And perhaps you have more refactoring and organization to do. But in general, smaller, reusable methods are good things.
Apr
24
comment Is it OK to split long functions and methods into smaller ones even though they won't be called by anything else?
@exizt, what's wrong with that implication? If multiple other functions find that extracted function useful, they they should absolutely call it. Refactoring and extracting methods promotes code reuse, and this is not a bad thing.
Apr
16
comment Is reverse debugging possible?
Reverse debugging is putting the bugs back in.
Apr
16
comment Why doesn't C# have local scope in case blocks?
See Eric Lippert's answer on this related SO question. stackoverflow.com/a/1076642/414076 You may or may not come away satisfied. It reads as "because that's how they chose to do it in 1999."