4,153 reputation
11024
bio website code.google.com/p/…
location San Diego, CA
age 30
visits member for 4 years, 1 month
seen Aug 4 at 20:18

I'm passionate about coding and researching the history of technology as well as exploring where technology is leading.

I used to work in flight simulation doing both hardware implementation (electrical design, wiring), web development (design, development, webmaster), as well as software development (desktop development in C#).

I'm a big fan of both using and contributing to Open source projects.

I am the creator of the pypreprocessor library that can be found on PYPI as well as Google code.


Oct
21
comment Class Design — Multiple Calls from One Method or One Call from Multiple Methods?
@Lucas The names used are purely subjective. The point is, the helper methods will never be exposed publicly -- as in they will never be used outside the class definition -- so the naming scheme only needs to make sense to the developer(s) implementing the class. The simple rule being, don't obsess too much over naming/structure when it comes to code private/helper code.
Sep
11
awarded  Yearling
Aug
8
awarded  Revival
Jul
22
awarded  Nice Answer
May
22
comment Why is it a good idea for “lower” application layers not to be aware of “higher” ones?
Ding Ding Ding!!! I think the word you were looking for is 'decoupling'. That's what good APIs are for. Defining the public interfaces of a module so it can be used universally.
May
22
comment Optimal communication pattern to update subscribers
It sounds like you're thinking in 'math' terms. When you're talking about computer scale think bigger. I mean really really big.
May
22
revised Optimal communication pattern to update subscribers
added 852 characters in body
May
22
answered Optimal communication pattern to update subscribers
May
21
comment Is static universally “evil” for unit testing and if so why does resharper recommend it?
let us continue this discussion in chat
May
21
comment Is static universally “evil” for unit testing and if so why does resharper recommend it?
@RobertHarvey The point is, non-static methods can be written in a way where they're completely isolated and free of side-effects. The benefit of static methods is that they're globally accessible. I'm not saying that's a bad thing but from a testing standpoint, it's a definite weakness that needs to be taken into consideration.
May
21
comment Is static universally “evil” for unit testing and if so why does resharper recommend it?
(Cont) Of course, you could always test static methods before instance methods to fix the issue, but what about static methods that call other static methods. Forcing a constraint that tests must be run in a specific order is a serious code smell in the world of TDD. Theoretically, static methods are terrible for testing but in practice people very rarely ever provide 100% test coverage anyway so YMMV.
May
21
comment Is static universally “evil” for unit testing and if so why does resharper recommend it?
As a fan of using static methods I previously lost this argument to a TDD-oriented developer. Let's say you have a static helper method that does a simple task (in a completely stateless mannner). That method is used in 15 different places throughout other methods, it also has a bug causing every other method that uses it to fail their tests. The primary goal of TDD is to isolate code for testing without side-effects. A static method that gets called inside another method will always be a side effect.
May
17
comment is this javascript property defaulting pattern a code smell?
Here, FTFY thisBool = (typeof(thisbool) === 'undefined') ? true : thisBool;
May
17
comment Re-architecting a classic inheritance design
@pdr Isn't that what namespaces are for? Defining everything in the global namespace is no different than creating mega-monolithic classes. While interfaces can make code organization messy if misused, it's a lot harder to code yourself into a corner the same way a lot of people manage to do with class inheritance.
May
17
comment Are regular expressions a programming language?
@Tacroy Nice to see somebody chimed in to parrot advice about parsing HTML with regex. While not for the faint-of-heart, combining regexes like the one above with a stack is a basic (and efficient) recipe for building a context-free parser.
May
17
comment Are regular expressions a programming language?
Not all programming languages are turing complete. For example, purely context-free declarative languages like XML that aren't turing complete without being paired with an interpreter could be considered programming languages. It all depends on your definition of 'programming language'. All you need to transform a 'regular' language to a 'context-free' language is a push-down stack. Then it's turtles all the way down.
May
17
comment Re-architecting a classic inheritance design
Nice, I came to mention Step 4 but your answer says it all and more. Interfaces are the key to escaping inheritance hell.
Mar
15
comment What's the difference between syntax and semantics?
@SK-logic I guess I read your comment to mean the opposite of what you intended. I thought you were talking about cases where only a lexer is needed - like in purely 'regular' or 'context-free' languages. In higher level languages a lexer may not be necessary but it provides a quick way to run a single pass syntax validation. I completely agree that there are many cases where it would be beneficial to turn off or completely eliminate the lexer stage.
Mar
15
comment What's the difference between syntax and semantics?
@SK-logic Only in purely context-free languages is the parser unnecessary. As soon as another level of context is added the parser becomes necessary. For example access levels (private/public/protected), inheritance, preprocessing, etc all require additional context to determine the semantics - therefore the code that implements them is broken/useless after performing just the lexer stage. Some code may be available in a pre-parsed state (ie dlls, bytecode) but it had to go through the lexer/parser/compiler stage at some point.
Mar
15
comment What's the difference between syntax and semantics?
@Ptharien'sFlame I'm just going to pull this discussion back out of the clouds for a second by highlighting the 'in theory' part of your statement. In practice, enforcing semantics in code requires additional syntax to give the compilers cues as to the functionality. Additional semantic checking comes as a cost (ie complexity/readability). Stating that a language can be powerful enough to check all semantic errors is like saying a legal system can be perfect enough to prevent all crime. Personally, I prefer freedom over safety but that's what makes this a 'religious' topic.