Reputation
53,951
Next tag badge:
167/100 score
19/20 answers
Badges
10 153 237
Newest
 Enlightened
Impact
~1.6m people reached

2h
comment How does one cycle back to previous options in a C# console application?
@PlzHelp: I edited it to give a bit more of an explanation.
2h
revised How does one cycle back to previous options in a C# console application?
added 917 characters in body
9h
awarded  Enlightened
10h
awarded  Nice Answer
16h
answered How does one cycle back to previous options in a C# console application?
1d
comment Do binary trees serve a specific purpose in storing hierarchical data? What is their canonical use?
@sw123456 Glad I could help explain it :)
1d
comment Do binary trees serve a specific purpose in storing hierarchical data? What is their canonical use?
@sw123456: That's right. As with any engineering, it comes with tradeoffs, (uses more--and more fragmented--memory than an array with the same number of elements, O(n) access to element #n of the data set rather than O(1) access, etc,) but fast search is definitely the major benefit of binary trees.
1d
answered Do binary trees serve a specific purpose in storing hierarchical data? What is their canonical use?
1d
comment Is method overriding always a violation of Liskov Substitution Principle?
Overriding isn't intrinsically a violation of LSP; it's the entire point of LSP.
Jun
27
awarded  object-oriented
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
26
answered Can you implement “object-oriented” programming without the class keyword?
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
11
awarded  Nice Answer
Jun
11
answered Binding software to one PC
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.