Gang Of Coders
Home
About Us
Contact Us
All Oop Solutions on Gang of Coders
Total of 574 Oop Solutions
How do I remove a property from a JavaScript object?
Javascript
Object
Oop
Properties
What are metaclasses in Python?
Python
Oop
Metaclass
Python Class
Python Datamodel
Difference between @staticmethod and @classmethod
Python
Oop
Methods
Python Decorators
Understanding Python super() with __init__() methods
Python
Class
Oop
Inheritance
Super
Static class variables and methods in Python
Python
Class
Oop
Static
Class Variables
What is Inversion of Control?
Oop
Design Patterns
Inversion of-Control
When should I use 'self' over '$this'?
Php
Class
Oop
Scope
What's the difference between a method and a function?
Oop
Language Agnostic
Terminology
What is the difference between an interface and abstract class?
Oop
Interface
Abstract Class
Prefer composition over inheritance?
Language Agnostic
Oop
Inheritance
Composition
Aggregation
Meaning of @classmethod and @staticmethod for beginner?
Python
Oop
Static Methods
Class Method
Why use getters and setters/accessors?
Java
Oop
Setter
Getter
Abstraction
What is the difference between an abstract method and a virtual method?
Oop
Language Agnostic
Abstract
Virtual Functions
What is the meaning of single and double underscore before an object name?
Python
Oop
Naming Conventions
Identifier
Why not inherit from List<T>?
C#
.Net
List
Oop
Inheritance
Why do Python classes inherit object?
Python
Class
Oop
Object
Inheritance
Interface vs Abstract Class (general OO)
Oop
Interface
Abstract Class
What are the differences between type() and isinstance()?
Python
Oop
Inheritance
Types
Naming Classes - How to avoid calling everything a "<WhatEver>Manager"?
Design Patterns
Oop
Naming Conventions
Naming
What is the difference between a field and a property?
C#
Oop
Properties
Field
What is the purpose of the word 'self'?
Python
Class
Oop
Self
What is a mixin and why is it useful?
Python
Oop
Multiple Inheritance
Mixins
When should you use a class vs a struct in C++?
C++
Oop
Class
Struct
Ooad
What is an example of the Liskov Substitution Principle?
Oop
Definition
Solid Principles
Design Principles
Liskov Substitution-Principle
Does functional programming replace GoF design patterns?
Oop
Design Patterns
Functional Programming
What is the difference between public, private, and protected?
Php
Oop
Private
Public
Protected
What is the difference between old style and new style classes in Python?
Python
Class
Oop
Types
New Style-Class
Usage of __slots__?
Python
Oop
Python Internals
Slots
How to get a JavaScript object's class?
Javascript
Oop
What do __init__ and self do in Python?
Python
Oop
Self
What does it mean to "program to an interface"?
Language Agnostic
Oop
Interface
Monad in plain English? (For the OOP programmer with no FP background)
Oop
Functional Programming
Monads
Functional programming vs Object Oriented programming
Oop
Functional Programming
Paradigms
Interface vs Base class
Oop
Interface
Language Agnostic
Base Class
Static Typing
Adding a method to an existing object instance
Python
Oop
Methods
Monkeypatching
How do I call a parent class's method from a child class in Python?
Python
Class
Oop
Object
Inheritance
How to call a parent class function from derived class function?
C++
Oop
Inheritance
What is the difference between __init__ and __call__?
Python
Class
Oop
Object
Callable Object
What does 'super' do in Python? - difference between super().__init__() and explicit superclass __init__()
Python
Oop
Inheritance
Multiple Inheritance
Super
What techniques can be used to define a class in JavaScript, and what are their trade-offs?
Javascript
Oop
Class
Examples of GoF Design Patterns in Java's core libraries
Oop
Design Patterns
Java
What is polymorphism, what is it for, and how is it used?
Oop
Polymorphism
Computer Science
Can we instantiate an abstract class?
Java
Oop
Class
Object
Abstract
Difference Between Cohesion and Coupling
Oop
Architecture
Theory
Software Design
Ooad
How should a model be structured in MVC?
Php
Oop
Model View-Controller
Architecture
Model
How would one write object-oriented code in C?
C
Oop
Object
JavaScript private methods
Javascript
Oop
Private Methods
JavaScript: Class.method vs. Class.prototype.method
Javascript
Oop
Prototype Programming
How should I have explained the difference between an Interface and an Abstract class?
Java
Oop
Inheritance
Interface
Abstract Class
What is the difference between association, aggregation and composition?
Oop
Uml
Associations
Aggregation
Composition
When to use an interface instead of an abstract class and vice versa?
Oop
Inheritance
Interface
Abstract Class
Explaining Python's '__enter__' and '__exit__'
Python
Oop
With Statement
Contextmanager
Use of .apply() with 'new' operator. Is this possible?
Javascript
Oop
Class
Inheritance
Constructor
What are the differences between struct and class in C++?
C++
Oop
Class
Struct
C++ Faq
Why Doesn't C# Allow Static Methods to Implement an Interface?
C#
Oop
Language Features
Should we @Override an interface's method implementation?
Java
Oop
Interface
Annotations
What does the 'static' keyword do in a class?
Java
Static
Oop
Language Features
Restriction
What is the difference between class and instance methods?
Objective C
Oop
Methods
Class Method
Instance Methods
Constructors in JavaScript objects
Javascript
Oop
Does JavaScript have the interface type (such as Java's 'interface')?
Javascript
Oop
What's wrong with overridable method calls in constructors?
Java
Oop
Inheritance
Constructor
Overriding
Is there a performance difference between i++ and ++i in C++?
C++
Performance
Oop
Post Increment
Pre Increment
Difference between abstraction and encapsulation?
Oop
Encapsulation
Abstraction
When should you use 'friend' in C++?
C++
Oop
Encapsulation
Friend
Polymorphism vs Overriding vs Overloading
Java
Oop
Polymorphism
Overloading
Overriding
How do I copy items from list to list without foreach?
C#
Oop
List
Foreach
Copy
Interface or an Abstract Class: which one to use?
Php
Oop
Interface
Abstract Class
Use of alloc init instead of new
Objective C
Oop
What is the difference between loose coupling and tight coupling in the object oriented paradigm?
Oop
Object
Coupling
When should I use a struct instead of a class?
.Net
Oop
When should I use "this" in a class?
Java
Oop
This
What is the difference between private and protected members of C++ classes?
C++
Class
Oop
Private
Protected
Advantages of using prototype, vs defining methods straight in the constructor?
Javascript
Oop
Prototype
Why is it necessary to set the prototype constructor?
Javascript
Oop
Inheritance
Why are unnamed namespaces used and what are their benefits?
C++
Oop
Namespaces
Explanation of the UML arrows
Oop
Uml
How do I implement interfaces in python?
Python
Oop
How do you create a static class in C++?
C++
Oop
Class
Syntax
Static
How can I create a copy of an object in Python?
Python
Oop
Object
Copy
How to compare objects by multiple fields
Java
Oop
Chain-calling parent initialisers in python
Python
Oop
Inheritance
Constructor
When should I be using classes in Python?
Python
Oop
Abstract class in Java
Java
Oop
Interface
Abstract Class
Benefits of prototypal inheritance over classical?
Javascript
Oop
Inheritance
Language Design
Prototype Programming
What does it mean to hydrate an object?
Java
Oop
Calling parent class __init__ with multiple inheritance, what's the right way?
Python
Oop
Inheritance
Multiple Inheritance
Super
Python function overloading
Python
Class
Oop
Overloading
Multiple Dispatch
Do subclasses inherit private fields?
Java
Oop
Inheritance
Private
difference between variables inside and outside of __init__()
Python
Class
Oop
Constructor
What is the difference between aggregation, composition and dependency?
Oop
Uml
Class vs. static method in JavaScript
Javascript
Oop
Is it bad practice to make a setter return "this"?
Java
Oop
Design Patterns
How to get the parents of a Python class?
Python
Oop
What does it mean that Javascript is a prototype based language?
Javascript
Oop
Inheritance
Prototype Programming
Constructors in Go
Oop
Constructor
Go
How do I get a PHP class constructor to call its parent's parent's constructor?
Php
Class
Oop
Inheritance
Constructor
Understanding the difference between __getattr__ and __getattribute__
Python
Oop
Encapsulation
Getattr
Getattribute
Object Oriented Javascript best practices?
Javascript
Oop
Why should I prefer to use member initialization lists?
C++
Oop
Object Construction
OOP vs Functional Programming vs Procedural
Oop
Functional Programming
Paradigms
Procedural Programming
Using property() on classmethods
Python
Oop
What is the best method to merge two PHP objects?
Php
Oop
Object
What is the point of interfaces in PHP?
Php
Oop
Interface
Theory
How do you design object oriented projects?
Architecture
Oop
Class Design
Difference between Inheritance and Composition
Java
Oop
Inheritance
Composition
Print all properties of a Python Class
Python
Oop
Are getters and setters poor design? Contradictory advice seen
Java
Oop
Setter
Getter
Accessor
How to mark a class as Deprecated?
C#
.Net
Oop
Deprecated
Why does Python code use len() function instead of a length method?
Python
Function
Oop
Methods
String Length
prototype based vs. class based inheritance
Javascript
Oop
Inheritance
Prototype Programming
How do I declare class-level properties in Objective-C?
Objective C
Cocoa
Oop
String, StringBuffer, and StringBuilder
Java
String
Oop
Stringbuilder
Getter and Setter?
Php
Oop
Coding Style
Aspect Oriented Programming vs. Object-Oriented Programming
Oop
Aop
Paradigms
C++ equivalent of java's instanceof
Java
C++
Oop
Instanceof
Why is the C++ STL is so heavily based on templates? (and not on *interfaces*)
C++
Oop
Templates
Stl
Thou shalt not inherit from std::vector
C++
Oop
Inheritance
Stl
Vector
Why does C# not provide the C++ style 'friend' keyword?
C#
C++
Design Patterns
Oop
Friend
Why do you need explicitly have the "self" argument in a Python method?
Python
Oop
Methods
Self
DDD - the rule that Entities can't access Repositories directly
Oop
Domain Driven-Design
Repository Pattern
S#arp Architecture
Iterate over object attributes in python
Python
Oop
Attributes
Iteration
Clone Object without reference javascript
Javascript
Oop
Object
Difference between Repository and Service Layer?
asp.net Mvc
Oop
Repository Pattern
Service Layer
Difference between virtual and abstract methods
C#
Oop
Virtual Functions
Abstract Function
Separating class code into a header and cpp file
C++
Oop
Class
What does 'low in coupling and high in cohesion' mean
Oop
Ooad
How can I access "static" class variables within methods in Python?
Python
Oop
Static Variables
How to call a parent method from child class in javascript?
Javascript
Oop
Methods
Parent
Creating the Singleton design pattern in PHP5
Php
Oop
Design Patterns
Singleton
What is Serialization?
Java
Oop
Serialization
Marshalling
Using the "final" modifier whenever applicable in Java
Java
Oop
How will I know when to create an interface?
Design Patterns
Oop
Interface
Class Design
What is the dependency inversion principle and why is it important?
Oop
Solid Principles
Glossary
Principles
Dependency Inversion
Constructors vs Factory Methods
Oop
Ooad
Struct like objects in Java
Java
Oop
Struct
What is the main difference between Inheritance and Polymorphism?
Java
Oop
Inheritance
Polymorphism
Mutable vs immutable objects
Oop
Immutability
Mutable
Missing return statement in a non-void method compiles
Java
C#
Oop
What is difference between functional and imperative programming languages?
Oop
Functional Programming
What is "loose coupling?" Please provide examples
Oop
Language Agnostic
Loose Coupling
Does ECMAScript 6 have a convention for abstract classes?
Javascript
Oop
Abstract Class
Ecmascript 6
PHP method chaining or fluent interface?
Php
Oop
Method Chaining
Fluent Interface
Class with single method -- best approach?
C#
Java
Oop
Static Methods
Why is there no multiple inheritance in Java, but implementing multiple interfaces is allowed?
Java
Oop
Inheritance
Interface
Language Design
Why should I avoid multiple inheritance in C++?
C++
Oop
Multiple Inheritance
Constructor function vs Factory functions
Javascript
Oop
Differences between Proxy and Decorator Pattern
Oop
Design Patterns
Decorator
Proxy Pattern
Checking if an instance's class implements an interface?
Php
Interface
Oop
Is the PIMPL idiom really used in practice?
C++
Oop
Pimpl Idiom
When to use static vs instantiated classes
Php
Oop
Class
What does "program to interfaces, not implementations" mean?
Oop
Design Patterns
Interface
Software Design
Ooad
Object-orientation in C
C
Oop
Object
Method chaining - why is it a good practice, or not?
Oop
Fluent Interface
Method Chaining
Can I extend a class using more than 1 class in PHP?
Php
Class
Oop
Extends
Understanding prototypal inheritance in JavaScript
Javascript
Oop
Inheritance
Constructor
Prototype Programming
List all base classes in a hierarchy of given class?
Python
Class
Inheritance
Oop
Introspection
How to declare Return Types for Functions in TypeScript
Javascript
Typescript
Oop
Java Multiple Inheritance
Java
Oop
Multiple Inheritance
Diamond Problem
Multiple Interface-Implem
When to use nested classes and classes nested in modules?
Ruby
Oop
How do I prevent the modification of a private field in a class?
Java
Arrays
Oop
Class
Get PHP class property by string
Php
String
Oop
Properties
What is the difference between self::$bar and static::$bar in PHP?
Php
Oop
Php 5.3
How do you implement a class in C?
C
Class
Oop
Embedded
What is Delegate?
Oop
Delegates
Singleton with Arguments in Java
Java
Oop
Singleton
Anti Patterns
Declaring javascript object method in constructor function vs. in prototype
Javascript
Oop
Is there more to an interface than having the correct methods
Java
Oop
Language Features
Interface
How do you effectively model inheritance in a database?
.Net
Sql Server
Oop
Inheritance
Database Design
Why doesn't Java Map extend Collection?
Java
Oop
Collections
How do I initialize the base (super) class?
Python
Oop
Private vs Protected - Visibility Good-Practice Concern
Oop
Language Agnostic
Coding Style
Why are private fields private to the type, not the instance?
C#
Oop
Language Design
Language Features
Private Members
JavaScript pattern for multiple constructors
Javascript
Design Patterns
Oop
Static and Sealed class differences
C#
.Net
Oop
Static
Sealed
Inheritance vs. Aggregation
Oop
Inheritance
Language Agnostic
Aggregation
Override ActiveRecord attribute methods
Ruby on-Rails
Oop
Activerecord
Java `final` method: what does it promise?
Java
Oop
Final
Method Overloading for null argument
Java
Oop
Null
Overloading
When to use 'raise NotImplementedError'?
Python
Oop
Is MATLAB OOP slow or am I doing something wrong?
Matlab
Oop
Profiling
Benchmarking
Matlab Class
Real world example about how to use property feature in python?
Python
Oop
Properties
Python Decorators
Creating anonymous objects in php
Php
Oop
Object
What is the point of a private pure virtual function?
C++
Oop
Inheritance
Non Virtual-Interface
How do I design a class in Python?
Python
Oop
Class Design
Default constructor vs. inline field initialization
Java
Oop
Constructor
Is it possible to create static classes in PHP (like in C#)?
Php
Design Patterns
Oop
Static
What is the __del__ method and how do I call it?
Python
Oop
What is an abstract class in PHP?
Php
Oop
Abstract Class
Encapsulation vs Abstraction?
Java
Oop
Difference between a Factory, Provider and a Service?
Oop
Design Patterns
Repository Pattern
How to check if an object implements an interface?
Java
Oop
Interface
Why should the "PIMPL" idiom be used?
C++
Oop
Information Hiding
Pimpl Idiom
PHP abstract properties
Php
Oop
Abstract Class
In PHP, can you instantiate an object and call a method on the same line?
Php
Oop
Should __init__() call the parent class's __init__()?
Python
Oop
Superclass
Is there a use-case for singletons with database access in PHP?
Php
Oop
Design Patterns
Singleton
Modelling an elevator using Object-Oriented Analysis and Design
Oop
Design Patterns
Language Agnostic
What does it mean to start a PHP function with an ampersand?
Php
Oop
What is the definition of "interface" in object oriented programming
Oop
Interface
Definition
Is returning null bad design?
Oop
Null
Return Value
What is the difference between dynamic and static polymorphism in Java?
Java
Oop
Polymorphism
Overloading
Overriding
What is the use of making constructor private in a class?
Oop
What does "S3 methods" mean in R?
R
Oop
R Faq
R S3
R S4
Must Dependency Injection come at the expense of Encapsulation?
Oop
Dependency Injection
Inversion of-Control
Encapsulation
Why we should not use protected static in java
Java
Oop
Inheritance
Static
Protected
Java: Static Class?
Java
Class
Oop
Static
Utility
Why java.lang.Object is not abstract?
Java
Oop
Abstract Class
Difference between Encapsulation and Abstraction
Oop
Encapsulation
Abstraction
Default visibility of class methods in PHP
Php
Oop
Visibility
Nested or Inner Class in PHP
Php
Class
Oop
Nested
Inner Classes
How do I create an abstract base class in JavaScript?
Javascript
Oop
Abstract
When should I use C++ private inheritance?
C++
Oop
What is the exact problem with multiple inheritance?
Oop
Multiple Inheritance
Language Theory
Managing relationships in Laravel, adhering to the repository pattern
Oop
Laravel
Laravel 4
Repository Pattern
Eloquent
What's the point of OOP?
Language Agnostic
Oop
Is there a benefit to defining a class inside another class in Python?
Python
Oop
Overloaded method selection based on the parameter's real type
Java
Oop
Mixin vs inheritance
Oop
Inheritance
Mixins
JavaScript OOP in NodeJS: how?
Javascript
node.js
Oop
Inheritance
Mongoose
Why does PHP 5.2+ disallow abstract static class methods?
Php
Oop
Static
Abstract
Best practice: ordering of public/protected/private within the class definition?
Oop
Coding Style
Class Design
Should I use a class or dictionary?
Python
Oop
Class
Dictionary
Plotting with seaborn using the matplotlib object-oriented interface
Python
Oop
Matplotlib
Seaborn
Abstract attributes in Python
Python
Oop
Scala
Abstract Class
What is the difference between an interface and a class, and why I should use an interface when I can implement the methods directly in the class?
C#
Class
Oop
Interface
Abstraction
Amazon Interview Question: Design an OO parking lot
Oop
What does the variable $this mean in PHP?
Php
Class
Oop
This
Is there an alternative to bastard injection? (AKA poor man's injection via default constructor)
C#
.Net
Oop
Dependency Injection
Constructor
How to use class methods as callbacks
Php
Oop
Callback
Why is the clone() method protected in java.lang.Object?
Java
Oop
Clone
What is the rationale behind having companion objects in Scala?
Oop
Scala
Companion Object
What is a covariant return type?
Java
Oop
Covariance
Is it possible to get the non-enumerable inherited property names of an object?
Javascript
Oop
Object
Properties
Why not abstract fields?
Java
Oop
Methods
Field
Abstract
What is the advantage of using static methods?
Python
Oop
Static Methods
Why can't I overload constructors in PHP?
Php
Oop
Overloading
Constructor
Typescript: How to extend two classes?
Javascript
Oop
Typescript
Extends
How can I call the 'base implementation' of an overridden virtual method?
C#
Oop
In a PHP project, what patterns exist to store, access and organize helper objects?
Design Patterns
Oop
Php
When and why would you seal a class?
C#
.Net
Oop
C++ Cli
What is the purpose of Serialization in Java?
Java
Oop
Object
Serialization
Stream
What is the difference between an Instance and an Object?
Oop
Object
Instance
Overriding class constants vs properties
Php
Oop
Inheritance
Overriding
Constants
C# : assign data to properties via constructor vs. instantiating
C#
Oop
Constructor
Properties
simple explanation PHP OOP vs Procedural?
Php
Oop
Procedural Programming
Procedural
Inner class within Interface
Java
Oop
Interface
Inner Classes
Where and how is the term used WRAPPER in programming, what does it help to do?
Oop
Terminology
Function pointer to member function
C++
Oop
Function Pointers
Mediator Vs Observer Object-Oriented Design Patterns
Oop
Design Patterns
Observer Pattern
Mediator
Javascript dynamically invoke object method from string
Javascript
Oop
Dynamic
Methods
Invoke
Where do I use delegates?
Oop
Design Patterns
Delegates
What is the purpose of python's inner classes?
Python
Class
Oop
Language Features
What is polymorphism in Javascript?
Javascript
Oop
Functional Programming
Polymorphism
Parametric Polymorphism
What are public, private and protected in object oriented programming?
Class
Oop
Definition
Access Modifiers
Sorting objects by property values
Javascript
Arrays
Sorting
Oop
Properties
How should I declare default values for instance variables in Python?
Python
Class
Oop
Why an interface can not implement another interface?
Java
Oop
Inheritance
Interface
Why do we assign a parent reference to the child object in Java?
Java
Oop
Inheritance
Casting
Upcasting
Access private field of another object in same class
Java
C++
.Net
Oop
Why there's a separate MutableLiveData subclass of LiveData?
Android
Oop
Android Architecture-Components
Android Livedata
How would you access Object properties from within an object method?
Java
Php
Oop
Theory
Why all the Active Record hate?
Ruby on-Rails
Design Patterns
Oop
Activerecord
How to inherit from a class in javascript?
Javascript
Oop
Creating an empty object in Python
Python
Oop
When to implement and extend?
Php
Oop
Extend
Should you ever use protected member variables?
Oop
Protected
Object vs Class vs Function
Javascript
Class
Oop
Multiple Inheritance in PHP
Php
Oop
Inheritance
Factory pattern in C#: How to ensure an object instance can only be created by a factory class?
C#
Design Patterns
Oop
Factory
downcast and upcast
C#
Oop
Downcast
Upcasting
Dependency Injection & Singleton Design pattern
Design Patterns
Oop
Dependency Injection
Prevent creating new attributes outside __init__
Python
Python 3.x
Class
Oop
Python Datamodel
base() and this() constructors best practices
C#
Oop
Inheritance
Constructor
Instantiation
Can you explain Liskov Substitution Principle with a good C# example?
C#
.Net
Oop
Solid Principles
Liskov Substitution-Principle
JavaScript override methods
Javascript
Oop
Overriding
How to create the perfect OOP application
C#
Oop
How can I implement an Access Control List in my Web MVC application?
Php
Oop
Model View-Controller
Acl
Classes vs. Functions
Class
Function
Oop
Aggregation versus Composition
Java
Oop
Uml
Should methods that throw RuntimeException indicate it in method signature?
Java
Exception
Oop
Exception Handling
Building big, immutable objects without using constructors having long parameter lists
Java
Oop
Scala
Immutability
How do I access Class member variables in Python?
Python
Class
Oop
Methods
Class Variables
How can I get the classname from a static call in an extended PHP class?
Php
Oop
Inheritance
If Singletons are bad then why is a Service Container good?
Php
Oop
Design Patterns
Frameworks
What is a Pythonic way for Dependency Injection?
Python
Oop
Authentication
Dependency Injection
Frameworks
How do functional programming languages work?
Oop
Programming Languages
Haskell
Functional Programming
Paradigms
adapter-Any real example of Adapter Pattern
Oop
Design Patterns
Adapter
Software Design
What is the difference between casting and coercing?
C#
Oop
Get functions (methods) of a class
Javascript
Oop
Ecmascript 6
How can I practice better object-oriented programming?
Oop
The value of "this" within the handler using addEventListener
Javascript
Oop
Dom Events
Difference between object and instance
Oop
Pass arguments to Constructor in VBA
Vba
Class
Oop
Constructor
Factory
Type hinting in PHP 7 - array of objects
Php
Arrays
Oop
Type Hinting
Php 7
Preserving a reference to "this" in JavaScript prototype functions
Javascript
Oop
Scope
This
Prototype Programming
Alternatives to Object-Oriented Programming?
Oop
Programming Languages
Paradigms
How to create a new instance from a class object in Python
Python
Oop
How to define interfaces in Dart?
Oop
Inheritance
Dart
Interface
ES6 - Call static method within a class
Javascript
Oop
Ecmascript 6
What exactly is the singleton class in ruby?
Ruby
Oop
Singleton
Using $this inside a static function fails
Php
Oop
This
Static Methods
When do I have to use interfaces instead of abstract classes?
Java
Oop
Inheritance
Interface
Abstract Class
Call an overridden method in base class constructor in typescript
Oop
Typescript
typescript1.4
Abstraction vs Encapsulation in Java
Java
Oop
Concept
C++ error 'Undefined reference to Class::Function()'
C++
Oop
Undefined
Closures in PHP... what, precisely, are they and when would you need to use them?
Php
Oop
Closures
Polymorphism - Define In Just Two Sentences
Oop
Polymorphism
Terminology
Object Oriented Design for a Chess game
Chess
Oop
In Javascript, what does this underscore mean?
Javascript
Oop
backbone.js
Why PHP Trait can't implement interfaces?
Php
Oop
Interface
Traits
What are Mixins (as a concept)
C++
Oop
Templates
Mixins
Why don't associated types for protocols use generic type syntax in Swift?
Oop
Generics
Swift
Syntax
Is it a bad practice to have multiple classes in the same file?
File
Class
Oop
Language Agnostic
Semicolon after class declaration braces
C++
Class
Oop
Declaration
Calling protocol default implementation from regular method
Swift
Oop
Protocols
Swift2
Learning/Implementing Design Patterns (For Newbies)
Oop
Design Patterns
Python - why use "self" in a class?
Python
Oop
What is the difference between the override and new keywords in C#?
C#
.Net
Oop
Good challenges/tasks/exercises for learning or improving object oriented programming (OOP) skills
Oop
How much abstraction is too much?
Language Agnostic
Oop
Abstraction
R: what are Slots?
Oop
R
S4
Slot
R Faq
When should I choose inheritance over an interface when designing C# class libraries?
C#
Oop
Design Patterns
Inheritance
Interface
How do you plan an application's architecture before writing any code?
Language Agnostic
Architecture
Oop
Abstract classes vs. interfaces vs. mixins
Oop
Interface
Terminology
Abstract Class
Mixins
What’s the point of inheritance in Python?
Python
Oop
Inheritance
Should one interface inherit another interface
.Net
Oop
Inheritance
Private members in CoffeeScript?
Oop
Instance Variables
Private Members
Coffeescript
How to ensure thread safety of utility static method?
Java
Oop
Thread Safety
Static Methods
Utility
How do I make JavaScript Object using a variable String to define the class name?
Javascript
Oop
How can I access a private constructor of a class?
Java
Oop
Constructor
Instance
How can I programmatically obtain the max_length of a Django model field?
Python
Django
Django Models
Oop
Is it possible to have an interface that has private / protected methods?
Php
Oop
Interface
Large Switch statements: Bad OOP?
C#
Oop
Design Patterns
Why do we use Interface? Is it only for Standardization?
Oop
Interface
Ooad
Private members in Python
Python
Class
Oop
Member Variables
Examples of practical javascript object oriented design patterns
Javascript
Jquery
Design Patterns
Oop
Class with too many parameters: better design strategy?
Python
Oop
Neuroscience
The difference between virtual, override, new and sealed override
C#
Oop
Overriding
Virtual
New Operator
R and object oriented programming
Oop
R
JavaScript Extending Class
Javascript
Oop
Object
Inheritance
Ecmascript 6
What is the difference between dynamic dispatch and late binding in C++?
C++
Oop
Auto-implemented getters and setters vs. public fields
C#
Oop
Properties
Field
How should one unit test the hashCode-equals contract?
Java
Unit Testing
Oop
Passing hashes instead of method parameters
Ruby
Oop
Coding Style
Do PHP interfaces have properties?
Php
Oop
Interface
Methods
When to use mixins and when to use interfaces in Dart?
Oop
Interface
Dart
Abstract Class
Mixins
Are nulls in a relational database okay?
Database Design
Oop
Null
How can I simulate OO-style polymorphism in C?
C
Oop
Polymorphism
Is it OK to have a class with just properties for refactoring purposes?
C#
Oop
Refactoring
Why to use Interfaces, Multiple Inheritance vs Interfaces, Benefits of Interfaces?
Java
Oop
Inheritance
Interface
Multiple Inheritance
Simple way to understand Encapsulation and Abstraction
Oop
Language Agnostic
Encapsulation
Abstraction
How abstraction and encapsulation differ?
C#
Oop
Encapsulation
Abstraction
Replacing if else statement with pattern
Java
Oop
Design Patterns
Why should I use the "using" keyword to access my base class method?
C++
Oop
Inheritance
Using
Are C# properties actually Methods?
C#
.Net
Oop
Why would I want to use Interfaces?
Oop
Interface
Will an 'empty' constructor or destructor do the same thing as the generated one?
C++
Class
Oop
Constructor
Destructor
Can you get a method name from within a method in PHP?
Php
Methods
Oop
Is it bad practice for a class to have only static fields and methods?
Oop
Class
Static
How to call super in PHP?
Php
Oop
Does JavaScript have classes?
Javascript
Oop
Class
How to check if class exists within a namespace?
Php
Oop
Namespaces
Can you alter a Javascript function after declaring it?
Javascript
Function
Oop
Wrapper
Modifier
Variable scopes in Python classes
Python
Oop
Scope
Fields in interfaces
Java
Oop
Interface
How do you find a needle in a haystack?
Oop
Class Design
Program Structure
Coupling and cohesion
Oop
Architecture
Theory
Software Design
Ooad
When does it pay off to use S4 methods in R programming
Oop
R
Methods
S4
Are FP and OO orthogonal?
Oop
Scala
Programming Languages
Functional Programming
Paradigms
Is it possible to declare a method static and nonstatic in PHP?
Php
Oop
Why would I ever use a Chain of Responsibility over a Decorator?
Oop
Design Patterns
Decorator
Chain of-Responsibility
When do I use static variables/functions in php?
Php
Oop
Static
Compilation Error: "The modifier 'public' is not valid for this item" while explicitly implementing the interface
C#
.Net
Oop
If a "Utilities" class is evil, where do I put my generic code?
C#
Oop
Global Variables
Utility Method
What is composition as it relates to object oriented design?
Oop
Design Patterns
Language Agnostic
Composition
Calling a base class' method
C#
Oop
PHP class instantiation. To use or not to use the parentheses?
Php
Oop
Class
Instantiation
"public" or "private" attribute in Python ? What is the best way?
Python
Oop
Properties
Encapsulation
Any good examples of inheriting from a concrete class?
Java
Oop
Inheritance
Liskov Substitution-Principle
What is method hiding in Java? Even the JavaDoc explanation is confusing
Java
Oop
Method Hiding
PHP traits - defining generic constants
Php
Oop
Traits
PHP : 'use' inside of the class definition
Php
Oop
Namespaces
Multiple Inheritance
Force subclasses of an interface to implement ToString
C#
Oop
How can you organize the code for a game to fit the MVC pattern?
Java
Oop
Design Patterns
Model View-Controller
When should I use stdClass and when should I use an array in php oo code?
Php
Oop
Stdclass
Attaching a decorator to all functions within a class
Python
Class
Oop
Decorator
Class Method
Should I recommend sealing classes by default?
C#
Java
.Net
Oop
Why doesn't PHP permit private const?
Php
Oop
Constants
Private
Encapsulation
How is almost everything in Javascript an object?
Javascript
Oop
Benefit of Polymorphism
Java
Oop
Jakarta Ee
Polymorphism
DDD - Persistence Model and Domain Model
Oop
Model
Repository
Domain Driven-Design
Repository Pattern
Is deriving square from rectangle a violation of Liskov's Substitution Principle?
Oop
Liskov Substitution-Principle
Why are circular references considered harmful?
.Net
Oop
HAS-A, IS-A terminology in object oriented language
Oop
Can you pass-by-reference in R?
R
Oop
Parameter Passing
Pass by-Reference
What is the difference between a function, an unbound method and a bound method?
Python
Oop
Function
Methods
is it possible to call overridden method from parent struct in Golang?
Oop
Inheritance
Go
Overriding
Laravel: Difference App::bind and App::singleton
Php
Oop
Laravel 4
Ioc Container
Facade
Spring and the anemic domain model
Spring
Oop
What is so special about Smalltalk?
Programming Languages
Oop
Smalltalk
How to force overriding a method in a descendant, without having an abstract base class?
C#
.Net
Oop
"Closures are poor man's objects and vice versa" - What does this mean?
Functional Programming
Object
Oop
Closures
What exception to throw when an important parameter/dependency is missing?
Java
Oop
Exception
What is wrong with making a unit test a friend of the class it is testing?
C++
Unit Testing
Oop
Encapsulation
Friend
calling setters from a constructor
Java
Oop
Accessing parent class in Backbone
Javascript
Oop
Class
Inheritance
backbone.js
MVC for advanced PHP developers
Php
Oop
Model View-Controller
Coupling, Cohesion and the Law of Demeter
Oop
Refactoring
Coupling
Law of-Demeter
Cohesion
Why does this polymorphic C# code print what it does?
C#
.Net
Oop
Inheritance
Polymorphism
If-less programming (basically without conditionals)
Oop
Polymorphism
Conditional
How to Check for a Specific Type of Object in PHP
Php
Oop
Object Type
Difference between OOP interfaces and FP type classes
Oop
Haskell
Interface
Functional Programming
Typeclass
In SOLID, what is the distinction between SRP and ISP? (Single Responsibility Principle and Interface Segregation Principle)
Oop
Design Patterns
Solid Principles
Single Responsibility-Principle
Interface Segregation-Principle
C# : Converting Base Class to Child Class
C#
Oop
Class
How to handle the pylint message: Warning: Method could be a function
Python
Oop
Pylint
SOLID vs. YAGNI
Oop
Yagni
Solid Principles
Adding custom properties to a function
Javascript
Function
Oop
Object
Custom Properties
Can we cast a generic object to a custom object type in javascript?
Javascript
Oop
Object
Why can't a derived class call protected member function in this code?
C++
Oop
How do you know when to use design patterns?
Design Patterns
Oop
When should I use static methods in a class and what are the benefits?
Oop
Static Methods
Static Variables
Why is it impossible to change constructor function from prototype?
Javascript
Oop
Prototype
Get parent class name?
Python
Oop
Underscores or camelCase in PostgreSQL identifiers, when the programming language uses camelCase?
Oop
Postgresql
Database Design
Naming Conventions
Camelcasing
Performance of static methods vs. functions
Php
Performance
Oop
What is an abstract data type in object oriented programming?
Oop
Object
Abstract Data-Type
Should Java methods be static by default?
Java
Oop
Object oriented javascript with prototypes vs closures
Javascript
Oop
How exactly do static fields work internally?
C#
Java
Php
Oop
Static Members
Proper way to implement ICloneable
C#
.Net
Oop
Icloneable
Why can't I declare C# methods virtual and static?
C#
Oop
'Shadows' vs. 'Overrides' in VB.NET
.Net
vb.net
Oop
Overriding
Shadows
Magic __get getter for static properties in PHP
Php
Oop
Properties
Getter
interface as a method parameter in Java
Java
Oop
Interface
Why use inheritance at all?
Java
Oop
Language Agnostic
Inheritance
Composition
Why doesn't Rust support trait object upcasting?
Oop
Rust
Language Design
Liskov Substitution-Principle
Static and Instance methods with the same name?
C#
.Net
Oop
Why can't I create an abstract constructor on an abstract C# class?
C#
Inheritance
Oop
Constructor
Abstract Class
Avoiding 'instanceof' in Java
Java
Oop
Instanceof
How can a class have a member of its own type, isn't this infinite recursion?
Java
Oop
Class
Is polymorphism possible without inheritance?
Java
Oop
Inheritance
Polymorphism
Understanding IoC Containers and Dependency Injection
Php
Oop
Inheritance
Dependency Injection
Inversion of-Control
Object Oriented Programming - how to avoid duplication in processes that differ slightly depending on a variable
C#
Oop
Why is Python not fully object-oriented?
Python
Oop
Achieving polymorphism in functional programming
Oop
Language Agnostic
Prototype
Functional Programming
Polymorphism
What does it mean to set the declaration of a function equal to 0? How can you assign an integer to a function?
C++
Windows
Oop
Winapi
Pure Virtual
Using the __call__ method of a metaclass instead of __new__?
Python
Oop
Metaclass
Modify Twitter Bootstrap collapse plugin to keep accordions open
Javascript
Jquery
Oop
Twitter Bootstrap
Class views in Django
Python
Django
Views
Oop
Do fluent interfaces violate the Law of Demeter?
Language Agnostic
Oop
Api Design
Closures: why are they so useful?
Oop
Functional Programming
Closures
Distinguishing between delegation, composition and aggregation (Java OO Design)
Java
Oop
Aggregation
Composition
Delegation
Single Responsibility Principle vs Anemic Domain Model anti-pattern
Oop
Solid Principles
Single Responsibility-Principle
Anemic Domain-Model
When should one use interfaces?
Oop
Interface
Duck Typing in Javascript
Javascript
Oop
When to use Final in PHP?
Php
Oop
Final
What is the real difference between "Bastard Injection" and "Poor Man's Injection"
Oop
Dependency Injection
Architecture
Why doesn't generic ICollection implement IReadOnlyCollection in .NET 4.5?
C#
Oop
Design Patterns
.Net 4.5
C# 5.0
Problems with circular dependency and OOP in AngularJS
Javascript
Oop
Angularjs
Julia: OOP or not
Class
Oop
Struct
Julia
Chaining Static Methods in PHP?
Php
Oop
Method Chaining
Try to describe polymorphism as easy as you can
Language Agnostic
Oop
Polymorphism
Is DDD a waste of time?
Oop
Domain Driven-Design
Calling one prototype method inside another in javascript
Javascript
Oop
Prototype
How define constructor implementation for an Abstract Class in Python?
Python
Python 2.7
Oop
Abstract Class
How can I design a Java web application without an ORM and without embedded SQL
Oop
Design Patterns
Orm
Can I include code into a PHP class?
Php
Oop
Class
In what areas does F# make "absolute no sense in using"?
C#
Oop
F#
Functional Programming
Composition, Inheritance, and Aggregation in JavaScript
Javascript
Oop
Inheritance
Composition
Encapsulation vs Data Hiding - Java
Java
Oop
Encapsulation
Software Design
Data Hiding
Should all member variables be initialized in __init__
Python
Oop
Instance Variables
Java Design Issue: Enforce method call sequence
Java
Oop
Design Patterns
How do you deal with polymorphism in a database?
Database Design
Oop
C++ virtual function from constructor
C++
Oop
Class
Constructor
Virtual
What is immutability and why should I worry about it?
Oop
Immutability
Why use PHP OOP over basic functions and when?
Php
Oop
Why should constructors on abstract classes be protected, not public?
C#
.Net
Oop
Inheritance
Access Modifiers
Can you create instance properties dynamically in PHP?
Php
Design Patterns
Oop
Class
Why are Haskell algebraic data types "closed"?
Oop
Haskell
Types
Functional Programming
Type Systems
What is the difference between a concrete class and an abstract class?
C++
Oop
Class
Practical example of Polymorphism
Python
Oop
Polymorphism
Call method by string?
Php
Oop
Not sure when to use an abstract property and when not
C#
.Net
Oop
Properties
Abstract
Should I use nested classes in this case?
C++
Oop
Class
Nested Class
Access parent's parent from javascript object
Javascript
Oop
mocking a singleton class
Java
Unit Testing
Oop
JavaScript: The Good Parts - How to not use `new` at all
Javascript
Oop
Constructor
New Operator
Empty class object in Python
Python
Oop
Empty Class
Inheriting methods' docstrings in Python
Python
Oop
Inheritance
Docstring
Template Method-Pattern
What are the purposes of inner classes
Java
Oop
Class
Inner Classes
Can't seem to understand SOLID principles and design patterns
Oop
Design Patterns
Solid Principles
typescript interface initialization
Oop
Typescript
Do constructors always have to be public?
Java
Oop
Design Patterns
Constructor
Access Modifiers
What is the difference between inheritance and Categories in Objective-C
Objective C
Oop
Inheritance
Categories
When should I declare variables in a PHP class?
Php
Oop
Static Method of a Static Class vs. Static Method of a Non-Static Class ( C# )
C#
Oop
Static
Methods
How to auto register a class when it's defined
Python
Oop
Design Patterns
Decorator
Metaclass
Aggregation vs Composition vs Association vs Direct Association
Oop
Uml
Aggregation
Composition
Model Associations
Creating Classes in R: S3, S4, R5 (RC), or R6?
R
Oop
How many constructors does the class have?
C++
Oop
Constructor
Kotlin calling non final function in constructor works
Java
Oop
Kotlin
What is the best way to create a sparse array in C++?
C++
Oop
Data Structures
Hash
Maps
Alternative to the visitor pattern?
Oop
Design Patterns
Visitor Pattern
How can Inheritance be modelled using C?
C
Oop
Inheritance
Purpose of PHP constructors
Php
Class
Oop
Constructor
Ruby on rails - Static method
Ruby
Oop
Static Methods
Does instanceof return true if instance of a parent?
Java
Oop
Inheritance
Polymorphism
Instanceof
default parameters in .h and .cpp files
C++
Oop
Header Files
Whats the difference between objects and data structures?
Java
Oop
Object
Data Structures
Language Agnostic
What is the meaning and reasoning behind the Open/Closed Principle?
Oop
Definition
Solid Principles
Design Principles
Open Closed-Principle
Is JavaScript object-oriented?
Javascript
Oop
Why can't I seem to grasp interfaces?
Oop
Interface
Getting static property from a class with dynamic class name in PHP
Php
Oop
Dynamic
Static
Properties
Object oriented programming in C
C
Oop
setTimeout() inside JavaScript Class using "this"
Javascript
Oop
Closures
Python - Testing an abstract base class
Python
Oop
Testing
Abc
What does classname.class return?
Java
Oop
When should objects be used in OCaml?
Oop
Object
Ocaml
angularjs with oop inheritance in action
Oop
Angularjs
Difference between methods and functions, in Python compared to C++
Python
Function
Oop
Methods
What's the difference between abstraction and encapsulation?
Oop
Encapsulation
Abstraction
How to call non-static method from static method of same class?
Php
Oop
How do I call a static method of another class
C++
Windows
Oop
Mfc
Static Methods
What exactly is an instance in Java?
Java
Oop
Object
Reference
Instance
Why do I get an error instantiating an interface?
C#
Oop
Class
Interface
Instantiation
What are some best practices for OpenGL coding (esp. w.r.t. object orientation)?
C++
Opengl
Oop
When to use delegation instead of inheritance?
Oop
Inheritance
Delegation
How can I require a method argument in Java to implement multiple interfaces?
Java
Oop
Multiple Inheritance
Can an object automatically delete itself in javascript once it has achieved its purpose?
Javascript
Oop
What's the difference between entity and class?
Oop
Class
Entity
Elgg
__init__ and arguments in Python
Python
Class
Oop
Instance
What are classes, references, and objects?
Java
Oop
Class
Object
Reference
Is self.__dict__.update(**kwargs) good or poor style?
Python
Oop
Dictionary
Abstract Method in Non Abstract Class
C#
Oop
Compiler Construction
Factory classes
Java
Oop
Object
Factory
Passing whole object vs passing object's property
Java
Performance
Oop
Pass by reference or pass by value?
Language Agnostic
Oop
Parameters
Pass by-Reference
Pass by-Value
Why are we not allowed to specify a constructor in an interface?
C#
.Net
vb.net
Oop
How to force sub classes to implement a method
C#
Oop
Inheritance
Do write-only properties have practical applications?
Oop
Properties
Language Agnostic
Abstract class with final uninitialized field
Java
Oop
Why "private" methods in the object oriented?
Oop
Encapsulation
Why can't you call abstract functions from abstract classes in PHP?
Php
Oop
Static
Methods
Abstract
$stmt->execute() : How to know if db insert was successful?
Php
Oop
Mysqli
What is the difference between a fluent interface and the Builder pattern?
Java
Oop
Design Patterns
What's the size cost of Java inheritance?
Java
Oop
Inheritance
Jvm
Internal Representation
Default implementation of a method for C# interfaces?
C#
Oop
Interface
Initialize multiple constant class members using one function call C++
C++
Oop
Constructor
Constants
Initializer List
How do you get a reference to the enclosing class from an anonymous inner class in Java?
Java
Oop
How much work should be done in a constructor?
Oop
Constructor
Should an object write itself out to a file, or should another object act on it to perform I/O?
C#
Design Patterns
Oop
Io
Allen Holub wrote "You should never use get/set functions", is he correct?
Language Agnostic
Oop
Immutability
Setter
Getter
PHP: Real world OOP example
Php
Oop
What are good JavaScript OOP resources?
Javascript
Oop
Closures
Why declare an interface as abstract?
Java
Oop
Interface
When should methods be made private?
Oop
When to make a method static?
Language Agnostic
Oop
Static Methods
Why aren't static methods considered good OO practice?
Java
Scala
Oop
Static Methods
Language Concepts
Returning a value in constructor function of a class
Php
Oop
Class
Constructor
Accessing Class Properties with Spaces
Php
Oop
Class
Codeigniter
Properties
parent::parent in PHP
Php
Oop
Parent
Can a simple difference in Python3 variable names alter the way code runs?
Python
Oop
Python 3.x
Finalizer
Why private method can not be final as well?
Java
Oop
Methods
Final
When should I use static methods?
Php
Oop
PHP: cannot declare class because the name is already in use
Php
Oop
C++ inheritance and member function pointers
C++
Inheritance
Oop
Member Function-Pointers
Is the C programming language object-oriented?
C
Oop
Standards
Calling a super method in PHP
Php
Oop
What's the Python version for “Code against an interface, not an object”?
Python
Oop
Interface
Inversion of-Control
How to dynamically set a function/object name in Javascript as it is displayed in Chrome
Javascript
Oop
Google Chrome
Joose
How do I inherit javascript functions ?
Javascript
Oop
Function
Inheritance
Prototypal Inheritance
C# Interface Inheritance to Abstract class
C#
Oop
Interface
Abstract Class
Concrete
What's the difference between an abstract class and an interface?
C#
Oop
Interface
Abstract Class
C# inheritance and default constructors
C#
Oop
Constructor