223 reputation
28
bio website
location Seattle, WA
age 24
visits member for 1 year, 10 months
seen Aug 7 at 9:09

Software Developer / Full Time Student


Feb
6
awarded  Notable Question
Feb
6
awarded  Editor
Oct
18
awarded  Yearling
Aug
26
comment Hashing Algorithm: Deleting an element in linear probing
@duros It would work in that situation, but the point of the counter-example is to show it does not work in all situations
Aug
23
awarded  Teacher
Aug
23
answered Hashing Algorithm: Deleting an element in linear probing
Aug
16
awarded  Citizen Patrol
Jul
11
comment Coding convention regarding the usage of underscores
@RobertHarvey the suffix is commonly used in Java for construction arguments that have the same name as the field: class X { public X(int field_) { field = field_; } private int field; }, I prefer my member variables with m_fieldName, but that is just me.
Jun
26
awarded  Popular Question
Jun
10
awarded  Critic
Nov
13
awarded  Scholar
Nov
13
accepted C++ - Constructor or Initialize Method to Startup
Nov
12
awarded  Supporter
Nov
12
comment C++ - Constructor or Initialize Method to Startup
so you are in the Constructor for initialization, and to also use the Factory pattern for anything that a constructor shouldn't do...
Nov
12
comment C++ - Constructor or Initialize Method to Startup
I was playing devil's advocate... Constructors w/ exceptions is the best way to go, error codes are bad and very evil (checking for error codes cost time, try/catch is at most the same amount of cost, if not less)
Nov
12
comment C++ - Constructor or Initialize Method to Startup
In this case, wouldn't the constructor initialize with the name of the file, then more real names would be used (not init) for the methods that process/load/show the video content?
Nov
12
comment C++ - Constructor or Initialize Method to Startup
Also how does errors during initialization factor in? Constructors require exceptions to be thrown, which most people don't know when/how to catch if they want to handle errors. An Initialize method could be a bool and therefore be more straight forward that errors should be handling (but then we get into the whole error codes suck and exceptions rule thing...)
Nov
12
awarded  Student
Nov
12
asked C++ - Constructor or Initialize Method to Startup