Location of development solutions on disk – Common or upto the individual
In our team meeting today a senior member brought up the proposal that we should be having a common location/structure for our development solutions.
When should one use “out” parameters?
In Objective-C, there are several methods like initWithContentsOfFile:encoding:error:
where one passes in a reference to an NSError
object for the error:
parameter. In this example, the value of the NSError
object passed in can change based on what goes on at runtime when the method is being called and whether the body of the method was executed in a certain way successfully. In a way I think of this NSError
object as sort of like a second return value from the method, and only differs from an object anObject
in the statement return anObject;
in that when this statement is called, execution leaves the method.
What is the best practice, point of view of well experienced developers [closed]
never extends classes, use composition and interface instead because extending classes are unmaintainable and difficult to debug.
How do you balance between “do it right” and “do it ASAP” in your daily work? [closed]
Closed 9 years ago.
Is it a bad practice to include all the enums in one file and use it in multiple classes?
I’m an aspiring game developer, I work on occasional indie games, and for a while I’ve been doing something which seemed like a bad practice at first, but I really want to get an answer from some experienced programmers here.
Multiple parameters vs single parameter(object with multiple properties)
I have an Entity Student
with following properties – (name
, joinedOn
, birthday
, age
, batch
, etc.) and a function fetchStudents(<params>)
.
I want to fetch students based on multiple filters.
Is it appropriate for a class to only be a collection of information with no logic?
Say I have a class Person
that has instance variables age
, weight
, and height
, and another class Fruit
that has instance variables sugarContent
and texture
. The Person
class has no methods save setters and getters, while the Fruit
class has both setters and getters and logic methods like calculateSweetness
. Is the Fruit
class the type of class that is better practice than the Person
class. What I mean by this is that the Person
class seems like it doesn’t have much purpose; it exists solely to organize data, while the Fruit
class organizes data and actually contains methods for logic.
JavaScript and callback nesting
A lot of JavaScript libraries (notably jQuery) use chaining, which allows the reduction of this:
How does a competition like Rails Rumble Work?
I am not sure weather it is a proper question to ask out here but it is really bothering for a while. As the official website writes:
Static Tables vs Dynamic Entity Attributes Storage Configurations
I am trying to figure out a better way to decide table storage configurations whether it will use static configurations using tables or dynamic configurations using EAV (entity-attribute-value)