5,224 reputation
11023
bio website
location Pretoria, South Africa
age 34
visits member for 3 years
seen 14 hours ago

I am a software developer during the day and hobbyist developer during the night (when time permits). Interested in all aspects of software development, although experienced mainly in the MS environment and languages.

C#, SQL Server, ASP.Net / MVC3, WinForms / WPF, WCF, Object Orientation, Code Generation, CSLA and other business frameworks.


Sep
13
awarded  Yearling
Aug
15
answered How to get a database on my filesystem that I can use in my application
Jun
20
comment What is the ideal length of a method?
@Calmarius agreed, but both of those statements are an argument against 6000 LOC functions.
Jun
20
comment What is the ideal length of a method?
@Calmarius the difference is usually that 6000 line functions tend to contain local variables which were declared very far away (visually), making it difficult for the programmer to build up the mental context required to have high confidence about the code. Can you be sure about how a variable is initialised and built up at any given point? Are you sure nothing is going to mess with your variable after you've set it on line 3879? On the other hand, with 15 line methods, you can be sure.
May
27
comment Is backing up a MySQL database in Git a good idea?
@AlbertoSolano I see; but reading the question ("can I backup my DB in in GIT?") and then your first statement ("it's fine to store the backup file..."), it seems like you're saying the opposite. The rest of the answer seems to be saying that it's neither here nor there, while I suspect most people think it's a train-wreck waiting to happen.
May
26
comment Is backing up a MySQL database in Git a good idea?
Not the downvoter, but I think this approach introduces an ever present merge conflict which is not particularly conducive to the branch-often, merge-often workflow that most git users prefer.
May
26
comment Is backing up a MySQL database in Git a good idea?
By "can't diff it", I mean "meaningfully".
May
26
comment Is backing up a MySQL database in Git a good idea?
@wobbily_col A non-text, binary based format has limited value in the context of source control. You can't diff it, you can't branch / merge it, etc. So, while you certainly CAN use git to store the DB, most people prefer to script the DB structure as well as the necessary data. It's a compromise between having a bit more work, but providing the above list of features. You'll have to weigh up whether or not this is a good idea for your solution. Otherwise, you can probably get GIT to store the DB directly, it's just not exactly the best fit for the task.
May
21
comment Why encapsulate container variables?
@ElectricCoffee a good rule of thumb is to always use them, unless you're sure you won't ever need them in the future (which should be rare), AND there's a critical performance requirement (which is rare in many environments). Software engineering considerations generally trump (premature?) optimisation, until proven otherwise.
May
16
comment Benefits of Java in education?
@Jasper I think it's important to understand that everyone's definition of "pretty" will vary depending on a variety of things (personal history, level of proficiency, types of projects attempted). Without keeping that in mind, I doubt you'll be satisfied with any answer. As a sidenote, I'm slightly curious how it is that you were happy with both Pascal as well as Python, since they are nothing alike (IMHO).
May
5
comment How to determine what throws an exception
@Mark unfortunately, since .Net doesn't really have a "throws" declaration which would formalise the exception contracts, we're left with searching source code / extracting the information you'd like. Kirie's answer is a good start, you could also just download the source and grep it yourself. Having said this, an exception like "NotSupportedException" is extremely broad by its nature, so you're unlikely to get narrow, specific pointers. It literally just says "you did something illegal that we couldn't express via the type system itself". So basically, almost anything.
Mar
20
comment Is a genetic algorithm needed when computation is infinitely fast?
I'd say there's a bit more to it than just this; firstly, while the question presupposes "unlimited computation resources", GAs are typically used where exhaustive search is completely infeasible (we're talking "wait for the universe to end" infeasible here, which you approach rapidly with any interesting problems). Secondly, GAs have a crossover operator, in addition to plain old mutation; for certain types of problems (NFL holding), this is a very good heuristic, and far better than exhaustive search. The rest, I'd largely agree with.
Feb
12
comment What is the aim of software testing?
@Tarun you could definitely go that route. The word bug is very easily misunderstood though (usually along the lines of "programmer messed up"), so perhaps it's not the best terminology. Regarding the "UI too slow" issue, I was leaning towards a qualitative measure which is often not specified, yet implicit and expected by clients. In this case, it could almost be both a "usability bug" and a "requirements bug".
Dec
19
comment Why do dynamic languages make it more difficult to maintain large codebases?
Thanks, @Phoshi, that's exactly what I was after. In retrospect, it makes sense that the *lints would take on this type of responsibility.
Dec
19
comment Why do dynamic languages make it more difficult to maintain large codebases?
@Phoshi I understand; to elaborate on my question, let me rephrase it like this: if we assume that I want to neither exhaustively regression test a system by hand after every change, nor do I want to write exhaustive unit tests asserting the exact spelling of every field / property, is there any way to get a level of assurance similar to what a static compiler typically gives? Given that modern IDEs are getting pretty good at guessing what's going on in dynamic languages, shouldn't there be some automated assistance (even if it's a "looser" check than for statically typed languages)?
Dec
17
comment Why do dynamic languages make it more difficult to maintain large codebases?
@Phoshi agreed, but even that joke of a type system catches many menial issues which happen day to day (especially when working with large, boring applications). I'm genuinely curious what exactly takes the place of a type system for dynamic languages, and I'm guessing Jörg has some pointers or counter-arguments.
Dec
17
comment Why do dynamic languages make it more difficult to maintain large codebases?
Just to add to the above comment, I mean: the nature of many (medium / large) problems is such that you will need a couple of hundred entities to model it, expressive language or not. An expressive one might cut down the code by a factor of 10x or more, but it will still not be manageable without additional tooling; I'm wondering what this tooling is.
Dec
17
comment Why do dynamic languages make it more difficult to maintain large codebases?
An interesting way of looking at it. Personally, I find that for large projects, type-checkers can be a life saver. They implicitly provide an extremely basic kind of unit-testing (if we can call it that - it's simply testing whether the structures agree or not). This is the kind of testing I have no time to write manually, but needs to happen when the project grows beyond what you can easily hold in your head. I suspect this happens fairly rapidly for most systems, regardless of expressiveness; how is this problem typically solved in the dynamic world?
Dec
11
comment Is there a downside to using Access as a database?
@OSKM I believe the ldb file is used when a write is happening (to clarify - it's used all the time, but will typically only "lock users out" when a write is happening). This question on SO about MS Access (MDB) concurrency goes into a lot more detail. In general, the "file share over network" model can work, but has many issues as the number of users scale.
Dec
4
comment Is navigate between more than one class a bad practice?
@DavidJiménezMartínez posted an answer, with a bit of additional info.