742 reputation
410
bio website 127.0.0.1
location Richmond, VA
age 39
visits member for 4 years, 4 months
seen 2 days ago

I mostly do web apps these days. E-commerce backends in PHP, Perl, and/or Interchange (an open-source Perl-based app server), or small ASP.net sites. I still remember enough Javascript, VB.net, C#, C++, C, Java, and x86 assembler language to get by, and i like to think i'm pretty good with MySQL or MS SQL Server.


Jan
21
revised class in OOP language and type
added 108 characters in body
Jan
21
revised class in OOP language and type
added 108 characters in body
Jan
21
revised class in OOP language and type
added 108 characters in body
Jan
21
revised class in OOP language and type
deleted 168 characters in body
Jan
21
answered class in OOP language and type
Jan
13
comment What does SVN do better than Git?
I love how "you can fiddle around with history" is allegedly a feature. I'd consider it a bug if it weren't intentional.
Jan
12
comment How do I avoid cascading refactorings?
If you're truly refactoring, though, other code shouldn't have to concern itself with the changes right away. (Of course you'll eventually want to clean up the other parts...but that shouldn't be immediately required.) A change that "cascades" through the rest of the app, is bigger than refactoring -- at that point it's basically a redesign or rewrite.
Jan
8
comment Why would a program require a specific minimum number of CPU cores?
Linux has /proc/cpuinfo and sysconf(_SC_NPROCESSORS_ONLN) (the latter being mentioned in POSIX). Using the info to enforce a minimum performance threshold is still pretty bad form, though.
Dec
16
comment How would you design a programming language?
OOP's failure, frankly, is that hardly any "object oriented" language actually implements it. Most simply shoehorn an object model into a procedural language and call it a day. I do wish Smalltalk had caught on more itself, rather than prompting every procedural-language weenie to say "Eh, we can do something kinda-sorta-maybe like that" and manage to miss the point of OOP entirely.
Dec
2
comment Why aren't there code overviews for open-source projects?
For what it's worth, i've seen enough profiteering off of shoddy documentation to at least wonder whether it's intentional. When the same groups putting half-assed documentation online are more than happy to sell you a book or a training class, it doesn't take much cynicism at all to reach that conclusion.
Nov
28
comment Should I accept empty collections in my methods that iterate over them?
@supercat: If no answer would make sense, then an exception could be reasonable. If an exception would already be thrown, though, it's usually better IMO to just let it be thrown than to preemptively fail. For the file case, you could open the file before starting processing. You'll not only know the file exists, but in Windows, having the file open can keep other processes from messing with it, thereby avoiding the race condition altogether.
Nov
27
comment Should I accept empty collections in my methods that iterate over them?
One could even argue that the whole concept of checking for a file's existence before reading or writing it, is flawed anyway. (There's an inherent race condition.) Better to just go ahead and try to open the file, for reading, or with create-only settings if you'for writing. It'll already fail if the filename is invalid or doesn't exist (or does, in the case of writing).
Nov
27
comment Should I accept empty collections in my methods that iterate over them?
An average of 0 items is already going to either return NaN or throw a divide-by-zero exception, just because of how the function is defined. A file with a name that can't possibly exist, either won't exist or will already trigger an error. There's no compelling reason to handle these cases specially.
Nov
2
comment Which HTTP verb should I use to trigger an action in a REST web service?
Cross-site duplicate: stackoverflow.com/q/15340946/319403
Oct
29
comment Is vanilla JS still considered a library?
@AndrewHoffman: The differences between implementations aren't nearly as big as they used to be; now that IE gives a damn about standards, one can easily write cross-browser-compatible code these days.
Oct
4
comment Inheritance is a null property in the parent a bad practice?
@Jon: Because setters that don't actually set anything violate the Principle of Least Surprise. Most people expect a read/write property to act at least superficially like a field; if they can say o.Prop = 1;, then a subsequent o.Prop == 1 should be true. A do-nothing setter breaks that expectation, and makes it harder to know what stuff like navigation.Amount = 1; actually does.
Oct
4
comment Inheritance is a null property in the parent a bad practice?
@Jon: At the very least, IMO the property in the base class should not have a setter. But yeah, if Amount only really makes sense for c3 and c4, then it should probably only exist on those classes.
Oct
4
comment Inheritance is a null property in the parent a bad practice?
Let me answer your question with a question. How would you like it if your TV's remote had buttons that never do anything...just because the TV makers planned on building a TV that they would work on?
Aug
27
comment Does a prose to code compiler exist?
Just thought i might mention osmosian.com. They have a whole crappy-but-eh environment built. It's not really a "prose to code", though, as much as it is a programming language that resembles English.
Aug
26
comment Is method overloading anything more than syntactic sugar?
@supercat: Right. That was pretty much my point. The question (although it includes Java code) is largely language-agnostic, so we can't say any particular feature is or isn't "sugar". But in the end, it's all an abstraction over machine language anyway.