Reputation
54,018
Next tag badge:
189/100 score
17/20 answers
Badges
10 153 237
Newest
 Enlightened
Impact
~1.7m people reached

1d
comment What high level languages are the most performant?
A language isn't performant; an implementation of the language is. It's entirely possible to create a C++ implementation that would run normally-fast code slower than Python.
Jul
1
comment How does one cycle back to previous options in a C# console application?
Some more constructive advice than rwong gave: The first few times I tried to build a game, I did what you're doing, trying to code all the content directly into the source code. What I learned is that that becomes an unmanageable mess very quickly. There's a better way, especially for a story-heavy game like you're doing: your source code should describe the basic rules, and then the content should go in data files, with scripts to handle special-case logic that doesn't belong in the main source code. Doing the game source this way is called a "game engine," and it's much more effective.
Jul
1
awarded  Enlightened
Jul
1
awarded  Nice Answer
Jun
29
comment Do binary trees serve a specific purpose in storing hierarchical data? What is their canonical use?
@sw123456 Glad I could help explain it :)
Jun
29
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.
Jun
29
answered Do binary trees serve a specific purpose in storing hierarchical data? What is their canonical use?
Jun
29
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.
Jun
10
comment Are (basic) SQL queries semantically equivalent to Higher Order Functions?
@Ixrec: Like this