pyramid of-developer-skills

28
Pyramid A talk by Alexandru Bolboaca Developer of @alexboly [email protected] Skills

Upload: alexandru-bolboaca

Post on 17-May-2015

134 views

Category:

Software


0 download

DESCRIPTION

How can you advance your career as a software developer? How can you assess your team as a team leader / technical lead / manager? I created a simple model to answer these questions based upon the most common need in modern software applications: the need to add features fast. All models are wrong, but some are useful. I found this model useful and I hope you will too.

TRANSCRIPT

Page 1: Pyramid of-developer-skills

Pyramid

A talk by Alexandru Bolboaca

Developer

of

@[email protected]

Skills

Page 2: Pyramid of-developer-skills

A guesstimate

80% of you are in a context where you:

1.Work on an existing codebase2.Sometimes encounter strange issues3.Have difficulties changing parts of code4.Are under pressure to add more features / fix bugs faster

Page 3: Pyramid of-developer-skills

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

Page 4: Pyramid of-developer-skills

Be aware that...

1.All models are wrong, some models are useful2.This model focuses on hard skills (but soft skills are very important!)

Page 5: Pyramid of-developer-skills

I write code but...

It doesn't work

Level 1

Page 6: Pyramid of-developer-skills

Aka...● Beginner● My grandmother● Anyone you know who's not a programmer

We all wrote this type of code...

Page 7: Pyramid of-developer-skills

Code Sampleint 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 thingSource: https://answers.yahoo.com/question/index?qid=20140126105146AAaZDSN

Wrong condition

Page 8: Pyramid of-developer-skills

Skills required for Level 1● Starting the computer● Starting a text editor● Reading● Writing on a computer● … you get the idea

Page 9: Pyramid of-developer-skills

I write code but...

It sometimes works

Level 2

Page 10: Pyramid of-developer-skills

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”

Page 11: Pyramid of-developer-skills

Code SampleON_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

Page 12: Pyramid of-developer-skills

Skills required for Level 2● Writing code● Lots of optimism● Perseverance● Passion for programming

Page 13: Pyramid of-developer-skills

I write code and...

It always works

Level 3

Page 14: Pyramid of-developer-skills

Aka...● Sr. programmer (why not just programmer?)

Page 15: Pyramid of-developer-skills

Code Sample public 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!

Page 16: Pyramid of-developer-skills

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

Page 17: Pyramid of-developer-skills

I write code and...

It's easy to change

Level 4

Page 18: Pyramid of-developer-skills

Aka...● Technical Lead

Page 19: Pyramid of-developer-skills

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

Page 20: Pyramid of-developer-skills

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

Page 21: Pyramid of-developer-skills

I can turn bad code into

Changeable code

Level 5

Page 22: Pyramid of-developer-skills

Aka...● Code cleaner● Consultant

Page 23: Pyramid of-developer-skills

Skills required for Level 5● Writing tests on existing code● Refactoring● Writing own refactoring scripts

Page 24: Pyramid of-developer-skills

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

Page 25: Pyramid of-developer-skills

Remember

1.All models are wrong, some models are useful2.This model focuses on hard skills (but soft skills are very important!)

Page 26: Pyramid of-developer-skills

Your Questions?

“The important thing is not to stop questioning”

Page 27: Pyramid of-developer-skills

I'm guilty for this talk!

Alexandru Bolboacă

Trainer, coach, polyglot programmer with international [email protected]

@alexboly

Page 28: Pyramid of-developer-skills

Photo Attributionhttp://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