Reputation
Next tag badge:
226/100 score
19/20 answers
Badges
10 155 239
Newest
 Good Answer
Impact
~1.7m people reached

Jun
26
comment Can you implement “object-oriented” programming without the class keyword?
The Linux kernel uses an emulation of several OO techniques, which all have to be coded manually without language support. This leads to plenty of opportunities for bugs, which, being Linux, is counterbalanced by a liberal application of Linus's Law. Yes, it's possible to do--Turing equivalence proves this--but my point that it's extremely difficult to get right without language support still stands. Also, why all these questions about C when the question was about Python? In C it's not possible to do the nested functions trick in the first place.
Jun
26
comment Can you implement “object-oriented” programming without the class keyword?
@overexchange: Those are structs with function pointers, not objects with methods. They're assigned at runtime, can be reassigned, can be null or corrupt if you screw up somewhere, add a dereference overhead each time they're invoked, and add sizeof(pointer) per "method" to your struct instance size. Real methods have none of the above disadvantages. (Except the dereference overhead, which applies to virtual methods.)
Jun
26
comment Can you implement “object-oriented” programming without the class keyword?
@overexchange: That's a non-OO attempt to fake it, but the compiler won't let you substitute one for the other. (You can't pass a child* to a function that takes a parent* as an argument, at least not without a typecast.) And even worse, C structs can't have methods bound to them, and there's no support for virtual methods, which are what make the magic of Liskov substitution work, so you have to construct VMTs by hand, which is a complicated process that's easy to screw up.
Jun
19
comment Database is performing slow, even all the tables are having normalization
"Sargable"? I looked at that and thought "no way that's a real word." Turns out it is. I guess I learned something new today.
Jun
15
comment How to quantify the work perfomed by a developer/programmer?
Relevant: -2000 lines of code
Jun
10
comment Basing all .NET applications on a central CORE library?
All .NET applications are based on a central CORE library. It's even part of the name: MSCORLIB. ;)
Jun
10
comment Are (basic) SQL queries semantically equivalent to Higher Order Functions?
@Bart: Then question was "is there a sound semantic equivalence that can be proven?" Implementing one thing in terms of another is a time-honored technique for proving equivalence in computer science. For example, one way to prove that a language is Turing-complete by using it to implement another language that is already known to be Turing-complete.
Jun
10
comment Are (basic) SQL queries semantically equivalent to Higher Order Functions?
@Ixrec: Like this
Jun
9
comment How to handle 50% of worse than average sprints?
Yes, what @EricKing said, especially in light of the well-known fact that people suck at estimating.
Jun
9
comment How to handle 50% of worse than average sprints?
Theoretically, 50% of everything will be below average, by definition. (Well, one of the definitions of "average", at least.) This is to be expected, and not something to worry about. It's only a serious problem to worry about if you're badly below average.
Jun
6
comment Mocking delegate constructors
...oh. Wait. That's not the type of mocking you meant?
Jun
6
comment Mocking delegate constructors
Ha ha! Look how ugly those delegate constructors are!
Jun
5
comment Why would a program use a closure?
@RobertHarvey: Technically true, but they're different mental models. For example, (generally speaking,) you expect the event handler to be called multiple times, but your async continuation to only be called once. But yes, technically anything you'd do with a closure is a callback. (Unless you're converting it to an expression tree, but that's a completely different matter.) ;)
Jun
4
comment On testing the testers
And then how do you test the tester-testers? ;)
Jun
4
comment XQL vs. XQuery vs.
@Ahmad: Thanks. And yes, I came up with the "XM-Mess" version of that old joke myself.
Jun
3
comment XQL vs. XQuery vs.
@RobertHarvey: You do know that Jamie Zawinski got that from an even earlier quote about a UNIX tool? I don't remember if it was Awk or Sed, or something like that, but either way, I'm simply carrying on a tradition with an honorable history. ;-)
Jun
3
comment XQL vs. XQuery vs.
Some people, when presented with a problem, think "I know, I'll use XML." <Problem:Worsening> <Problem:TimeDescription>Now</Problem:TimeDescription> <Problem:Posessive>they have</Problem:Posessive> <Problem:Quantity>many, many</Problem:Quantity> <Problem:WorseningDescription>more problems</Problem:WorseningDescription> </Problem:Worsening>
Jun
2
comment What stops C from being compiled/interpreted/JIT'ed?
@RobertHarvey: ...such as things as fundamental as the size of various primitives? ;)
May
28
comment What is the etymology of the “dot” operator for string concatenation?
@Doval: Again, this is a weak typing problem, not an operator problem. It does not exist in languages that don't conflate chars with numbers.
May
28
comment What is the etymology of the “dot” operator for string concatenation?
+ is an ideal choice for concatenation, because no one expects joining two strings together to be an arithmetical operation in the first place. Saying "+ is bad because it doesn't have the properties of arithmetical addition" is only a valid claim if + in this context not having the properties of arithmetical addition would violate POLS and confuse users, but since no one expects it to, it is not a bad thing. It's far more intuitively correct, producing a string that is the result of adding the contents of one string to another, than . is, which intuitively... does what?