SlideShare une entreprise Scribd logo
1  sur  28
Télécharger pour lire hors ligne
Pyram
id
A talk by Alexandru Bolboaca
Developer
of
@alexboly
alex.bolboaca@mozaicworks.com
Skills
A guesstimate
80% of you are in a context where you:
1.Work on an existing codebase
2.Sometimes encounter strange issues
3.Have difficulties changing parts of code
4.Are under pressure to add more features / fix
bugs faster
A model
1. My code doesn't work
2. My code sometimes works
3. My code always works
4. My code is easy to change
5. Bad code => changeable code
Be aware that...
1.All models are wrong, some models are useful
2.This model focuses on hard skills (but soft skills
are very important!)
I write code but...
It doesn't work
Level 1
Aka...
● Beginner
● My grandmother
● Anyone you know who's not a programmer
We all wrote this type of code...
Code Sample
int main(){
string teststring;
getline(cin, teststring);
cout << teststring << endl;
int b;
for (int b = teststring.length();b <= 0; b--){
cout << teststring.at(b) << endl;
}
cout << "n" << endl;
}
Expected: “code” => “edoc”
Loop starts after the end of the stringVariable 'b' re-declared
“n” and endl are the same thing
Source: https://answers.yahoo.com/question/index?qid=20140126105146AAaZDSN
Wrong condition
Skills required for Level 1
● Starting the computer
● Starting a text editor
● Reading
● Writing on a computer
● … you get the idea
I write code but...
It sometimes works
Level 2
Aka...
● Jr. programmer
● “It works on my computer”
● “You didn't say the server is not always named
Jane!”
● “It worked yesterday”
● “It's 90% done”
Code Sample
ON_NOTIFY( wNotifyCode, idControl, memberFxn )
afx_msg void memberFxn( NMHDR * pNotifyStruct, LRESULT *
result );
typedef struct tagNMHDR {
HWND hwndFrom; // handle of control sending message
UINT idFrom;// identifier of control sending message
UINT code; // notification code; see below
} NMHDR;
Careful with the types. I searched 6 months for
a bug because I used INT instead of UINT
Source: http://msdn.microsoft.com/en-us/library/9c4xka2b.aspx
Skills required for Level 2
● Writing code
● Lots of optimism
● Perseverance
● Passion for programming
I write code and...
It always works
Level 3
Aka...
● Sr. programmer (why not just programmer?)
Code Samplepublic ResultsdotNet CalculateThreadpool(ResultsdotNet total){
ManualResetEvent[] events = new ManualResetEvent[Environment.ProcessorCount];
List<ResultsdotNet> results = new List<ResultsdotNet>();
for (int i = 1; i <= Environment.ProcessorCount; i++){
ResultsdotNet batchResult = new ResultsdotNet() { Iterations = total.Iterations / Environment.ProcessorCount, ManualResetEvent = new
ManualResetEvent(false) };
results.Add(batchResult);
events[i - 1] = batchResult.ManualResetEvent;
ThreadPool.QueueUserWorkItem(new WaitCallback(CalculateCallback), batchResult);
}
WaitHandle.WaitAll(events);
foreach (ResultsdotNet batchResult in results){
total.dW += batchResult.dW;
total.dX += batchResult.dX;
total.dY += batchResult.dY;
total.dZ += batchResult.dZ;
total.W += batchResult.W;
total.X += batchResult.X;
total.Y += batchResult.Y;
total.Z += batchResult.Z;
total.Iterations += batchResult.Iterations;
}
total.dW = total.dW / results.Count;
total.dX = total.dX / results.Count;
total.dY = total.dY / results.Count;
total.dZ = total.dZ / results.Count;
total.W = total.W / results.Count;
total.X = total.X / results.Count;
total.Y = total.Y / results.Count;
total.Z = total.Z / results.Count;
return total;
}
http://www.codeproject.com/Articles/767997/Parallelised-Monte-Carlo-Algorithms-sharp
Parallelised Monte Carlo
Algorithm
Long method
What is parallelised?
Unclear intent
But it works!
Skills required for Level 3
● Understanding requirements
● Clarifying requirements
● Identifying local technical risks
● Testing his/her own code; writing automated tests
for own code help
● Involving team mates for a code review, pair
programming
I write code and...
It's easy to change
Level 4
Aka...
● Technical Lead
Code Sampledef upload() {
def problemId = params.problemId
def problem = Problem.get(problemId)
def uploadedFile = request.getFile('solution')
if (uploadedFile.empty) {
flash.message = 'Please select a file'
forward(controller: "profile", action: "index")
return
}
createSolution(problem, uploadedFile)
redirect(action: "index")
}
def createSolution(problem, uploadedFile) {
def filename = "${userService.getUser().id}/${uploadedFile.originalFilename}"
def destinationPath = new File(filename)
destinationPath.mkdirs()
uploadedFile.transferTo(destinationPath)
new Solution(user: userService.getUser(), problem: problem, pathToSolution:
filename).save()
}
Source: I TAKE Unconference Contest application
Skills required for Level 4
● Clean code
● Changeable design principles (eg. SOLID)
● Design patterns
● Automated developer testing (includes unit,
integration, end to end, acceptance testing)
● Identifying risks
I can turn bad code into
Changeable code
Level 5
Aka...
● Code cleaner
● Consultant
Skills required for Level 5
● Writing tests on existing code
● Refactoring
● Writing own refactoring scripts
The model
1. My code doesn't work
2. My code sometimes works
3. My code always works
4. My code is easy to change
5. Bad code => changeable code
Remember
1.All models are wrong, some models are useful
2.This model focuses on hard skills (but soft skills
are very important!)
Your Questions?
“The important thing is
not to stop questioning”
I'm guilty for this talk!
Alexandru Bolboacă
Trainer, coach, polyglot
programmer with international
experience
alex.bolboaca@mozaicworks.com
@alexboly
Photo Attribution
http://i.images.cdn.fotopedia.com/flickr-3873843704-
hd/Paris/Main_sights/Paris__Louvre_Pyramid.jpg
http://www.quotes.jotoexplorer.com/wp-
content/uploads/2012/10/Albert%20Einstein%20Quotes%205.jpg
http://youthjoint.com/alpha/wp-
content/uploads/2014/04/blackboard-with-chalk2.jpg

Contenu connexe

Tendances

Tendances (19)

Java Presentation For Syntax
Java Presentation For SyntaxJava Presentation For Syntax
Java Presentation For Syntax
 
Core Java Certification
Core Java CertificationCore Java Certification
Core Java Certification
 
Clean code coding like a professional
Clean code   coding like a professionalClean code   coding like a professional
Clean code coding like a professional
 
Introduction to java Programming
Introduction to java ProgrammingIntroduction to java Programming
Introduction to java Programming
 
Java Tutorial
Java Tutorial Java Tutorial
Java Tutorial
 
Introduction to JavaScript Programming
Introduction to JavaScript ProgrammingIntroduction to JavaScript Programming
Introduction to JavaScript Programming
 
TypeScript 2 in action
TypeScript 2 in actionTypeScript 2 in action
TypeScript 2 in action
 
C++ exception handling
C++ exception handlingC++ exception handling
C++ exception handling
 
Java Tutorial | My Heart
Java Tutorial | My HeartJava Tutorial | My Heart
Java Tutorial | My Heart
 
Typescript Basics
Typescript BasicsTypescript Basics
Typescript Basics
 
Java tutorials
Java tutorialsJava tutorials
Java tutorials
 
Java Notes
Java Notes Java Notes
Java Notes
 
TypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the painTypeScript: coding JavaScript without the pain
TypeScript: coding JavaScript without the pain
 
All You Need to Know About Type Script
All You Need to Know About Type ScriptAll You Need to Know About Type Script
All You Need to Know About Type Script
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Java training in delhi
Java training in delhiJava training in delhi
Java training in delhi
 
Type script - advanced usage and practices
Type script  - advanced usage and practicesType script  - advanced usage and practices
Type script - advanced usage and practices
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
 
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
Functional Patterns for C++ Multithreading (C++ Dev Meetup Iasi)
 

En vedette

高崎経済大学の受験生への情報発信に関する調査プレゼン資料
高崎経済大学の受験生への情報発信に関する調査プレゼン資料高崎経済大学の受験生への情報発信に関する調査プレゼン資料
高崎経済大学の受験生への情報発信に関する調査プレゼン資料
rhmnsjkkk29
 
Spelarenkät 2010
Spelarenkät 2010Spelarenkät 2010
Spelarenkät 2010
Jan By
 
Social Media: World in Your Hands Presentation
Social Media: World in Your Hands PresentationSocial Media: World in Your Hands Presentation
Social Media: World in Your Hands Presentation
Ray Hiltz
 
dental_emerg 2013
dental_emerg 2013dental_emerg 2013
dental_emerg 2013
massican
 
דיווח לוועדת התרבות מרץ 2015 (2)
דיווח לוועדת התרבות  מרץ 2015 (2)דיווח לוועדת התרבות  מרץ 2015 (2)
דיווח לוועדת התרבות מרץ 2015 (2)
Anochi.com.
 

En vedette (20)

Proyecto PP Grupo 3
Proyecto PP Grupo 3Proyecto PP Grupo 3
Proyecto PP Grupo 3
 
Why a dam building is profitable
Why a dam building is profitableWhy a dam building is profitable
Why a dam building is profitable
 
高崎経済大学の受験生への情報発信に関する調査プレゼン資料
高崎経済大学の受験生への情報発信に関する調査プレゼン資料高崎経済大学の受験生への情報発信に関する調査プレゼン資料
高崎経済大学の受験生への情報発信に関する調査プレゼン資料
 
Viva Chevrolet Year End Sell Off
Viva Chevrolet Year End Sell OffViva Chevrolet Year End Sell Off
Viva Chevrolet Year End Sell Off
 
Build a great Technical Team
Build a great Technical TeamBuild a great Technical Team
Build a great Technical Team
 
Digital marketing and Employee Advocacy
Digital marketing and Employee AdvocacyDigital marketing and Employee Advocacy
Digital marketing and Employee Advocacy
 
SEO vs. PPC
SEO vs. PPC SEO vs. PPC
SEO vs. PPC
 
Susan alex july
Susan alex julySusan alex july
Susan alex july
 
Waer through the lens of the ifm help desk and the investment
Waer through the lens of the ifm help desk and the investmentWaer through the lens of the ifm help desk and the investment
Waer through the lens of the ifm help desk and the investment
 
Applied craftsmanship
Applied craftsmanshipApplied craftsmanship
Applied craftsmanship
 
Spelarenkät 2010
Spelarenkät 2010Spelarenkät 2010
Spelarenkät 2010
 
Integrated Water Resource Management (Iwrm)
Integrated Water Resource Management (Iwrm)Integrated Water Resource Management (Iwrm)
Integrated Water Resource Management (Iwrm)
 
2010 Chevy Camaro in El Paso, TX
2010 Chevy Camaro in El Paso, TX2010 Chevy Camaro in El Paso, TX
2010 Chevy Camaro in El Paso, TX
 
Costs of oil impacts and equilibrium of oil price
Costs of oil impacts and equilibrium of oil priceCosts of oil impacts and equilibrium of oil price
Costs of oil impacts and equilibrium of oil price
 
Social Media: World in Your Hands Presentation
Social Media: World in Your Hands PresentationSocial Media: World in Your Hands Presentation
Social Media: World in Your Hands Presentation
 
Joe & The Museum of London
Joe & The Museum of LondonJoe & The Museum of London
Joe & The Museum of London
 
09082010 gramina banks to mdgs
09082010 gramina banks to mdgs09082010 gramina banks to mdgs
09082010 gramina banks to mdgs
 
dental_emerg 2013
dental_emerg 2013dental_emerg 2013
dental_emerg 2013
 
דיווח לוועדת התרבות מרץ 2015 (2)
דיווח לוועדת התרבות  מרץ 2015 (2)דיווח לוועדת התרבות  מרץ 2015 (2)
דיווח לוועדת התרבות מרץ 2015 (2)
 
Louise troy alice_nov11
Louise troy alice_nov11Louise troy alice_nov11
Louise troy alice_nov11
 

Similaire à Pyramid of-developer-skills

Productivity Enhencement with Visual Studio
Productivity Enhencement with Visual StudioProductivity Enhencement with Visual Studio
Productivity Enhencement with Visual Studio
Ahasan Habib
 

Similaire à Pyramid of-developer-skills (20)

Pyramid of-developer-skills
Pyramid of-developer-skillsPyramid of-developer-skills
Pyramid of-developer-skills
 
Mobile Weekend Budapest presentation
Mobile Weekend Budapest presentationMobile Weekend Budapest presentation
Mobile Weekend Budapest presentation
 
Introduction to Software Development
Introduction to Software DevelopmentIntroduction to Software Development
Introduction to Software Development
 
How to drive a malware analyst crazy
How to drive a malware analyst crazyHow to drive a malware analyst crazy
How to drive a malware analyst crazy
 
44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - How to drive a malware analyst crazy44CON London 2015 - How to drive a malware analyst crazy
44CON London 2015 - How to drive a malware analyst crazy
 
PVS-Studio and static code analysis technique
PVS-Studio and static code analysis techniquePVS-Studio and static code analysis technique
PVS-Studio and static code analysis technique
 
Introduction to C3.net Architecture unit
Introduction to C3.net Architecture unitIntroduction to C3.net Architecture unit
Introduction to C3.net Architecture unit
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone Civetta
 
IDA Vulnerabilities and Bug Bounty  by Masaaki Chida
IDA Vulnerabilities and Bug Bounty  by Masaaki ChidaIDA Vulnerabilities and Bug Bounty  by Masaaki Chida
IDA Vulnerabilities and Bug Bounty  by Masaaki Chida
 
Static code analysis: what? how? why?
Static code analysis: what? how? why?Static code analysis: what? how? why?
Static code analysis: what? how? why?
 
IDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentIDE and Toolset For Magento Development
IDE and Toolset For Magento Development
 
Wtf per lineofcode
Wtf per lineofcodeWtf per lineofcode
Wtf per lineofcode
 
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
Patching Windows Executables with the Backdoor Factory | DerbyCon 2013
 
Java Chapter 2 Overview.ppt
Java Chapter 2 Overview.pptJava Chapter 2 Overview.ppt
Java Chapter 2 Overview.ppt
 
Java Chapter 2 Overview.ppt
Java Chapter 2 Overview.pptJava Chapter 2 Overview.ppt
Java Chapter 2 Overview.ppt
 
Behaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About TestingBehaviour Driven Development and Thinking About Testing
Behaviour Driven Development and Thinking About Testing
 
Bdd and-testing
Bdd and-testingBdd and-testing
Bdd and-testing
 
Power Leveling your TypeScript
Power Leveling your TypeScriptPower Leveling your TypeScript
Power Leveling your TypeScript
 
Productivity Enhencement with Visual Studio
Productivity Enhencement with Visual StudioProductivity Enhencement with Visual Studio
Productivity Enhencement with Visual Studio
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 

Plus de Alexandru Bolboaca

Plus de Alexandru Bolboaca (20)

Refactor legacy code through pure functions
Refactor legacy code through pure functionsRefactor legacy code through pure functions
Refactor legacy code through pure functions
 
Design Without Types
Design Without TypesDesign Without Types
Design Without Types
 
Thinking in Functions
Thinking in FunctionsThinking in Functions
Thinking in Functions
 
Raising the Bar
Raising the BarRaising the Bar
Raising the Bar
 
The Journey to Master Code Design
The Journey to Master Code DesignThe Journey to Master Code Design
The Journey to Master Code Design
 
What is good software design? And why it matters?
What is good software design? And why it matters?What is good software design? And why it matters?
What is good software design? And why it matters?
 
Functional programming in C++
Functional programming in C++Functional programming in C++
Functional programming in C++
 
Agile Technical Leadership
Agile Technical LeadershipAgile Technical Leadership
Agile Technical Leadership
 
TDD As If You Meant It
TDD As If You Meant ItTDD As If You Meant It
TDD As If You Meant It
 
Usable Software Design
Usable Software DesignUsable Software Design
Usable Software Design
 
Hidden loops
Hidden loopsHidden loops
Hidden loops
 
Removing structural duplication
Removing structural duplicationRemoving structural duplication
Removing structural duplication
 
Continuous delivery
Continuous deliveryContinuous delivery
Continuous delivery
 
Why You Should Start Using Docker
Why You Should Start Using DockerWhy You Should Start Using Docker
Why You Should Start Using Docker
 
Stay focused
Stay focusedStay focused
Stay focused
 
Kanban intro
Kanban introKanban intro
Kanban intro
 
Unit testing-patterns
Unit testing-patternsUnit testing-patterns
Unit testing-patterns
 
Incremental design, simply explained
Incremental design, simply explainedIncremental design, simply explained
Incremental design, simply explained
 
Exploring design-alternatives-using-tdd
Exploring design-alternatives-using-tddExploring design-alternatives-using-tdd
Exploring design-alternatives-using-tdd
 
Feedback - The Lost Art of Agile
Feedback -  The Lost Art of AgileFeedback -  The Lost Art of Agile
Feedback - The Lost Art of Agile
 

Dernier

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Dernier (20)

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 

Pyramid of-developer-skills

  • 1. Pyram id A talk by Alexandru Bolboaca Developer of @alexboly alex.bolboaca@mozaicworks.com Skills
  • 2. A guesstimate 80% of you are in a context where you: 1.Work on an existing codebase 2.Sometimes encounter strange issues 3.Have difficulties changing parts of code 4.Are under pressure to add more features / fix bugs faster
  • 3. A model 1. My code doesn't work 2. My code sometimes works 3. My code always works 4. My code is easy to change 5. Bad code => changeable code
  • 4. Be aware that... 1.All models are wrong, some models are useful 2.This model focuses on hard skills (but soft skills are very important!)
  • 5. I write code but... It doesn't work Level 1
  • 6. Aka... ● Beginner ● My grandmother ● Anyone you know who's not a programmer We all wrote this type of code...
  • 7. Code Sample int main(){ string teststring; getline(cin, teststring); cout << teststring << endl; int b; for (int b = teststring.length();b <= 0; b--){ cout << teststring.at(b) << endl; } cout << "n" << endl; } Expected: “code” => “edoc” Loop starts after the end of the stringVariable 'b' re-declared “n” and endl are the same thing Source: https://answers.yahoo.com/question/index?qid=20140126105146AAaZDSN Wrong condition
  • 8. Skills required for Level 1 ● Starting the computer ● Starting a text editor ● Reading ● Writing on a computer ● … you get the idea
  • 9. I write code but... It sometimes works Level 2
  • 10. Aka... ● Jr. programmer ● “It works on my computer” ● “You didn't say the server is not always named Jane!” ● “It worked yesterday” ● “It's 90% done”
  • 11. Code Sample ON_NOTIFY( wNotifyCode, idControl, memberFxn ) afx_msg void memberFxn( NMHDR * pNotifyStruct, LRESULT * result ); typedef struct tagNMHDR { HWND hwndFrom; // handle of control sending message UINT idFrom;// identifier of control sending message UINT code; // notification code; see below } NMHDR; Careful with the types. I searched 6 months for a bug because I used INT instead of UINT Source: http://msdn.microsoft.com/en-us/library/9c4xka2b.aspx
  • 12. Skills required for Level 2 ● Writing code ● Lots of optimism ● Perseverance ● Passion for programming
  • 13. I write code and... It always works Level 3
  • 14. Aka... ● Sr. programmer (why not just programmer?)
  • 15. Code Samplepublic ResultsdotNet CalculateThreadpool(ResultsdotNet total){ ManualResetEvent[] events = new ManualResetEvent[Environment.ProcessorCount]; List<ResultsdotNet> results = new List<ResultsdotNet>(); for (int i = 1; i <= Environment.ProcessorCount; i++){ ResultsdotNet batchResult = new ResultsdotNet() { Iterations = total.Iterations / Environment.ProcessorCount, ManualResetEvent = new ManualResetEvent(false) }; results.Add(batchResult); events[i - 1] = batchResult.ManualResetEvent; ThreadPool.QueueUserWorkItem(new WaitCallback(CalculateCallback), batchResult); } WaitHandle.WaitAll(events); foreach (ResultsdotNet batchResult in results){ total.dW += batchResult.dW; total.dX += batchResult.dX; total.dY += batchResult.dY; total.dZ += batchResult.dZ; total.W += batchResult.W; total.X += batchResult.X; total.Y += batchResult.Y; total.Z += batchResult.Z; total.Iterations += batchResult.Iterations; } total.dW = total.dW / results.Count; total.dX = total.dX / results.Count; total.dY = total.dY / results.Count; total.dZ = total.dZ / results.Count; total.W = total.W / results.Count; total.X = total.X / results.Count; total.Y = total.Y / results.Count; total.Z = total.Z / results.Count; return total; } http://www.codeproject.com/Articles/767997/Parallelised-Monte-Carlo-Algorithms-sharp Parallelised Monte Carlo Algorithm Long method What is parallelised? Unclear intent But it works!
  • 16. Skills required for Level 3 ● Understanding requirements ● Clarifying requirements ● Identifying local technical risks ● Testing his/her own code; writing automated tests for own code help ● Involving team mates for a code review, pair programming
  • 17. I write code and... It's easy to change Level 4
  • 19. Code Sampledef upload() { def problemId = params.problemId def problem = Problem.get(problemId) def uploadedFile = request.getFile('solution') if (uploadedFile.empty) { flash.message = 'Please select a file' forward(controller: "profile", action: "index") return } createSolution(problem, uploadedFile) redirect(action: "index") } def createSolution(problem, uploadedFile) { def filename = "${userService.getUser().id}/${uploadedFile.originalFilename}" def destinationPath = new File(filename) destinationPath.mkdirs() uploadedFile.transferTo(destinationPath) new Solution(user: userService.getUser(), problem: problem, pathToSolution: filename).save() } Source: I TAKE Unconference Contest application
  • 20. Skills required for Level 4 ● Clean code ● Changeable design principles (eg. SOLID) ● Design patterns ● Automated developer testing (includes unit, integration, end to end, acceptance testing) ● Identifying risks
  • 21. I can turn bad code into Changeable code Level 5
  • 23. Skills required for Level 5 ● Writing tests on existing code ● Refactoring ● Writing own refactoring scripts
  • 24. The model 1. My code doesn't work 2. My code sometimes works 3. My code always works 4. My code is easy to change 5. Bad code => changeable code
  • 25. Remember 1.All models are wrong, some models are useful 2.This model focuses on hard skills (but soft skills are very important!)
  • 26. Your Questions? “The important thing is not to stop questioning”
  • 27. I'm guilty for this talk! Alexandru Bolboacă Trainer, coach, polyglot programmer with international experience alex.bolboaca@mozaicworks.com @alexboly