182 reputation
29
bio website ozemail.com.au/~markhurd
location Cherry Gardens, Australia
age 45
visits member for 4 years, 7 months
seen May 27 at 5:24

I have a background in VB and C and an Honours degree in Mathematical Sciences from Adelaide University, majoring in Computer Science.

I have over 15 years VB experience and have dealt with back-end details, including without using databases.


May
13
comment Why would Square inheriting from Rectangle be problematic if we override the SetWidth and SetHeight methods?
I effectively disagree with Eric here (not enough for a -1 though!). All those relationships are (possibly) relevant, as @supercat mentions; it's just a YAGNI issue: you don't implement it until you need it.
May
13
revised Is a 1 < 10 comparison less expensive than 1 < 1000000?
Explicitly mention the intention of the optimisation is to tokenise once.
May
13
comment When asynchronous tasks make a bad UX
I agree with this approach, except that I would still keep a ParseStarted event, in case you do want to allow the UI (or other component) to sometimes warn the user a reparse is occurring. Of course, you may want to document callers should attempt to not stop the user from using the (about to be) stale current parse results.
May
6
comment Should we define types for everything?
+1 although if you haven't yet refactored all the code of doFancyOtherstuff() into a subroutine, you might think the job.do(id) reference is not local enough to keep as a simple string.
Apr
8
comment How much work should I place inside a lock statement?
Note that given the answers, the title of this question is now effectively wrong.
Feb
18
answered How much physical memory is consumed by the stack of a .NET thread?
Feb
4
comment Are there any benefits of using this extra variable in the for loop annotation?
Note that in certain languages this code will be less performant because of compiler optimisations that are designed for the direct length retrieval only.
Feb
4
answered Is a 1 < 10 comparison less expensive than 1 < 1000000?
Jan
21
comment Is address 0000000C a special address?
Perhaps that System.Runtime.CompilerServices.RuntimeHelpers.OffsetToStringData is 12=0x0C is a reason why this offset is more common.
Jan
15
comment When should a private method take the public route to access private data?
Even for this "small" example, getA() * getB() is better in the medium and long term.
Jan
15
comment When should a private method take the public route to access private data?
I can't give you a +1 because your example to use private fields is not one IMHO, mainly because you have declare the const: I assume that means the compiler will inline a getId call anyway and it allows you to make changes in either direction. (Otherwise I fully agree with your reasons to use getters.) And in languages that do provide property syntax, there's even fewer reasons to not use the property rather than the backing field directly.
Jan
15
answered Is there any value in writing a unit test that is a subset of another test?
Dec
31
comment If MVC is “Separation of Concerns” then why was Razor Syntax introduced?
@ateri After a short while it is the large number at the top left of the answer.
Oct
29
answered Should the sender of an event always be a generic Object?
Oct
2
comment Is creating subclasses for specific instances a bad practice?
Jimbo Wales is an example of this on Wikipedia: He has his own permission set under the grouping of Founder. It is very unlikely it will ever apply to anyone else, but it is still easier to manage in the long term to have a named permission set, even though one person could have individual permissions set.
Sep
17
comment Function only returns unchanged parameter, useless?
This got my +1 because I didn't notice it was language specific, especially because of the answers.
Sep
17
comment Is it okay to use exceptions as tools to “catch” errors early?
@kevincline Now this question has no relevance to me. If the OP wasn't intending to be language specific you're doing him a great disservice, and allowing otherwise duplicate questions in C#, VB.NET, Lisp, APL, etc.
Aug
6
answered When would you want two references to the same object?
Jul
2
comment Zero behavior objects in OOP - my design dilemma
@supercat This is worthy of a separate question or a chat session, but I'm not currently interested in either :-( You say (in C#) "structures that implement interfaces behave differently from class objects that do likewise". I agree that there are other behavioral differences to consider, but AFAIK in code following Interface iObj = (Interface)obj;, the behaviour of iObj is not affected by the struct or class status of obj (except that it will be a boxed copy at that assignment if it is a struct).
May
28
comment Programming Language vs Markup Language vs Scripting Language
@Izkata I wouldn't say homoiconicity itself changes the possibility of compilation, but rather the metaprogramming it allows means much compilation needs to be deferred to runtime, if at all.