Reputation
4,384
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 10 27
Newest
 Nice Answer
Impact
~279k people reached

Feb
19
comment Where does this concept of “favor composition over inheritance” come from?
@MasonWheeler The problem with inheritance is that it bleeds implementation-specific details across class boundaries. Most people are mistakenly taught in school to use inheritance for polymorphism. Interfaces work just as well and support multiple inheritance. Composition here simply means, design a consistent API and enforce it via interface contracts. Inherit only where it makes sense.
Feb
19
comment Where does this concept of “favor composition over inheritance” come from?
-1 Why does Java's Stack implementation inherit from Vector? Because somebody used inheritance when an interface would have been more appropriate. Now that people depend on Stack and its expected functionality including the parts inherited from Vector. The problem with inheritance is that it bleeds implementation details across functional boundaries when it isn't applied correctly. Worse yet, a lot of eager comp sci grads came out of school with a shiny inheritance hammer looking for nails to pound.
Feb
19
comment Where does this concept of “favor composition over inheritance” come from?
@Bevan That's why the statement mentions 'composition'. By relying on interfaces, objects can be polymorphic but without the complex parent/child dependency hierarchy. The greatest flaw of inheritance is that it creates dependencies across internal implementations. Fragile/brittle code is code that can't be changed without breaking other code.
Feb
19
comment Why do people fork repositories on GitHub?
It's a simple one-step process to setup a remote tracking branch. Anybody who has tried to contribute to a git repository outside of GitHub knows how tedious it can be. Plus, if the original author goes AFK, you can follow the development graph to find forks that are still actively developed. Hopefully, it'll keep GitHub from degenerating into a wasteland of dead projects the same way SourceForge did.
Feb
18
comment Why did Alan Kay say, “The Internet was so well done, but the web was by amateurs”?
(cont) How about checksums. Let's add one to the IP layer, and another one to the TCP layer but require that it includes a pseudo-header from the IP layer because creating protocol interdependencies is a great idea /s. Don't even get me started on the RFC system. Instead of creating a sane version control mechanism for documentation, anybody who wants to parse the lower protocols has to search through dozens of documents and attempt to discover the intent of the original protocol designers. I gleaned a lot of knowledge about how not to design an API from the TCP/IP specs.
Feb
18
comment Why did Alan Kay say, “The Internet was so well done, but the web was by amateurs”?
I have a lot of respect for Alan Kay's work but he's talking out of his backside if he truly believes this. As a person who has spent a significant amount of time actually implementing low level network parsers I can confidently say the APIs for TCP/IP were equally amateurish and naive. Sure, implement a variable length of options extensions (that nobody ever used) but make the address space fixed and limit it to a 2 byte length, because that wasn't idiotic.
Feb
18
comment Why did Alan Kay say, “The Internet was so well done, but the web was by amateurs”?
In an ideal world that would work and frameworks like Java applets and Flash attempted to make it a reality. When you take into consideration the security aspects, cross system compatibility, ability to scale, and work it takes to maintain state between requests. It's no wonder why it has taken so long to advance. Some very smart/talented people have spent years working out the fundamental flaws/weaknesses of a naive specification.
Feb
18
comment Studies on how well can a programmer understand code in unfamiliar languages?
Good API design and naming conventions help but even language-based naming conventions are often 'opinionated' in a way that only applies to that language. Beside C#/Java (which are nearly identical) most languages operate on different principles that have unique workflows and implementations specific to that language. For instance, in languages that don't follow the mega-monolithic core framework model you'll usually find a huge ecosystem of packages that tie together using a common package manager.
Feb
18
comment Studies on how well can a programmer understand code in unfamiliar languages?
How easy is it for somebody who understands Algebra for them to pick up Trigonometry vs somebody who understands Calculus? It depends on the language and paradigm. Detecting and isolating the differences across languages is hard enough, especially since the languages are constantly evolving. I seriously doubt anybody could assess understanding with any reasonable amount of accuracy.
Feb
18
comment How to manage accidental complexity in software projects
(cont) BTW, don't take the 'dumb' remark an ad-hominem attack. By 'dumb' I mean your approach is naive. Jumping onto the latest methodology like 'Spiral Development' is the equivalent to skipping step 1 & 2. The spinning 3D animations of spirals are good if you're looking to give the 'business types' a 'warm and fuzzy' and a general idea of how to setup a development cycle. If you want to see some truly inspiring examples, just take a look at how Open Source projects manage release cycles.
Feb
18
comment How to manage accidental complexity in software projects
@CortAmmon Not to be mean but that sounds like a pretty dumb insight. 99% of what developers know was learned at some point through your so-called 'on-the-fly growth'. It takes a good problem solver to make a good programmer. Solving problems is something we're inherently drawn to. If your developers are't growing they're probably doing a lot of boring repetitive work. The type of work that will make any reasonably talented developers unhappy and depressed. And... 'Spiral Development' is nothing but a re-hashing of the basic concept of iterative development with waterfall milestones.
Feb
18
revised Difference between an architecture and a framework
deleted 56 characters in body
Feb
18
revised Difference between an architecture and a framework
added 857 characters in body
Feb
18
answered Difference between an architecture and a framework
Jan
28
comment Is there a canonical book on mathematics for programmers?
+100 KhanAcademy is great for strengthening math foundations. There's nothing wrong with starting from the basics. The self-paced learning removes the 'humiliation factor' of not knowing some of the simple math fundamentals. The assessment system does a good job identifying weaknesses and quickly moving beyond weaknesses.
Jan
28
comment Is there a canonical book on mathematics for programmers?
The only problem with trying to 'learn' math using project Euler is, a lot of optimal answers are based on well known algorithms learned in higher-level math courses. For instance, anything that involves calculating primes can be optimized using an Eratosthenes Sieve. It's great for discovering new algorithms and thinking about managing complexity but not very useful for foundational math.
Nov
6
comment Getting humiliated by your senior programmer
+1 Ding ding ding. Grow a thicker skin and make twice the effort on the next go around. In engineering, respect is earned not given. This guy was probably just sore after some 'brilliant' idea of his was shut down by the senior staff.
Oct
22
awarded  Necromancer
Oct
22
comment Can the csv format be defined by a regex?
@c69 Edge cases are illustrated here tools.ietf.org/html/rfc4180.
Oct
22
revised Can the csv format be defined by a regex?
added 204 characters in body