190 likes | 194 Views
What Makes a Professional Programmer?. Adair Dingle CSSE Dept Seattle University dingle@seattleu.edu. Themes. Common Learning Obstacles DOCUMENTATION Bounds Memory Management Consistency in Design Personal Characteristics Successful Training. Classic Curriculum.
E N D
What Makes a Professional Programmer? Adair Dingle CSSE Dept Seattle University dingle@seattleu.edu
Themes • Common Learning Obstacles • DOCUMENTATION • Bounds • Memory Management • Consistency in Design • Personal Characteristics • Successful Training
Classic Curriculum • Introduction to Programming • Data Structures • Algorithms • Computer Architecture • Operating Systems • Automata • Programming Languages
Common Curriculum • Introduction to Programming • ( Data Structures ) • Algorithms • ( Computer Architecture ) • Database • Software Design • Software Engineering
Overflow x++; myClassStatic++; (lo + hi)/2; // binary search lo + (hi-lo)/2; Array[index++]; Array[++index]; Array[++index]++;
Binding Base myObject; Base* basePtr; basePtr = GetObject(); basePtr->runTbound(); myObject.runTbound(); basePtr->compileTbound();
Conceptual Overlap:Binding & Accessibility Base* basePtr = GetObject(); basePtr->vfunc(); // vfunc public in Base // vfunc private in Derived // behavior understood // IF process understood // explain vtab
Memory Management • Low-level perspective • “Every new has a matching delete” • Issue of ownership neglected • Aliases!! • “MM cannot be done correctly so we need to use a garbage collector” (Java) • “Garbage collection solves all problems”
Ownership Transfer //assumption constructor myClass(yourClass*& s) { myHandle = s; s = 0; }
Ownership Transfer // caller must assume responsibility MyClass* localFn(MyClass* ptr) { MyClass* heapPtr = new MyClass; … ptr = heapPtr; … return ptr; }
Ownership Transfer // indirect handle obscures error MyClass* localFn(MyClass* ptr) { MyClass localObject; … ptr = &localObject; … return ptr; }
Aliases int& MyClass::subvert() { return privateHandle; } int& alias = array[10]; int DB[10]; int* ptr = &DB[9]; ptr++;
class Fixed: public Base {}; // handle can be zeroed out // array of Base objects // address of Base descendant class Flow { Base* handle; … };
Composition versus Inheritance • Interface • Language Support • Overhead • Flexibility • Polymorphic subobject • Cardinality • Ownership • Impact on extensibility
Interface/Expectations (x < y) (y > x) x.operator<(y); y.operator>(x); (x <= y) !(x > y)
Personal Characteristics • Love of Learning • Constant self-education • Curious: how do things work? • Reflective: identify patterns • Analytical • Egalitarian • No silver bullet • Not wedded to single language, tool, platform
Personal Characteristics • Independent • Compile, run, test: play • Seek answers online, references, samples • Collaborative • ASKs for HELP when necessary • helps others without rancor • BALANCE • Not always a lone ranger • Not a pest
Plugs • Senior Capstone Project (Seattle University Project Center) • Sponsored by industry • “real” work • Literature with Analysis • C++: Memory First (Dingle & Hildebrandt, 2006) • Study beyond syntax • K-12 math (analytical skills) www.wheresTheMath.com
Thanks to: • Roger Ball, manager Zilog • Robert Field, software consultant • Thomas Hildebrandt, software consultant