Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Better Developers
Technical Presentation, 2014
Mikaël Donikian
Introduction
As a Developer you are mainly in charge of conception:
Transform business functionalities into code.
Had to d...
Summary
1)
2)
3)
4)
5)
6)

Introduction
Definition
Common Algorithms
Few Examples
Complexity
Questions

© 2014 Mikaël DONI...
Definition: developer
• The coder, the programmer
and the developer
• Tasks:
–
–
–
–
–
–
–
–

Write code
Spec documents
Co...
Definition: Algorithm 1/2
• “An algorithm is a sequence of unambiguous instructions for
solving a problem”[1] As it is sup...
Definition: Algorithm 2/2
• Programming is the process of writing programs in a
logical way. Programs are implementing alg...
Common Algorithms
• Shortest Path (Dijkstra,
Graph theory, Trees …)
• Binary Search
• Merge, Quick, Insertion &
Bubble Sor...
Complexity
• Runtime analysis of an algorithm
• Need to estimate the relative time cost of an
algorithm (efficiency)
• Big...
Complexity - Example
• Given T(n) = 4n2 − 2n + 2
• As n grow large the term n2 will dominate
therefore T(n)=O(n2)

© 2014 ...
Complexity - order of growth
Notation

Name

O(1)

Constant

O(log n)

Logarithmic

O(n)

Linear

O(n log n)

Linearithmic...
Fibonacci Algorithm
• Fn = Fn-1 + Fn-2

with seed value

F0=0 and F1=1

• This is a recursive algorithm
def fib(n):
if n==...
Bubble sort
• Complexity O(n2)
• This algorithm is not the best when “n” is very
large
• It compares in a list each pair o...
Questions & Answers

N.B. Algorithms are used everywhere and very early

in biology to simulate the process of natural
sel...
References
•
•
•
•
•
•
•
•
•
•
•

Donald E. Knuth, “The Art of Computer Programming Vol.1 Fundamental
Algorithms”, Addison...
Upcoming SlideShare
Loading in …5
×

Better Developers

656 views

Published on

A presentation as an introduction to Algorithm Fundamentals and their importance to be better developers. Write better code by improving conception. Find the best algorithm so the code is more robust and efficient. Master algorithm fundamentals and you will master your code.

Published in: Technology
  • Be the first to comment

Better Developers

  1. 1. Better Developers Technical Presentation, 2014 Mikaël Donikian
  2. 2. Introduction As a Developer you are mainly in charge of conception: Transform business functionalities into code. Had to deal with pieces of messy code before? © 2014 Mikaël DONIKIAN 2
  3. 3. Summary 1) 2) 3) 4) 5) 6) Introduction Definition Common Algorithms Few Examples Complexity Questions © 2014 Mikaël DONIKIAN 3
  4. 4. Definition: developer • The coder, the programmer and the developer • Tasks: – – – – – – – – Write code Spec documents Configuration management Code reviews Testing Automated tests Documentation Solving tough customer problems © 2014 Mikaël DONIKIAN 4
  5. 5. Definition: Algorithm 1/2 • “An algorithm is a sequence of unambiguous instructions for solving a problem”[1] As it is supposed to be followed with pencil and paper. It is usually expressed in pseudo-code. • Algorithm comes from Al-Khowarazmi the mathematician who introduce around the year 825, the use of Hindu-Arabic numerals. • Some algorithm are intuitive as we can find them trough logical thinking but the most complex ones need to be learned so they can be used to improve the efficiency of problem solving. [1] A. Levitin, Introduction to The Design & Analysis of Algorithms , Addison-Wesley, 2003 © 2014 Mikaël DONIKIAN 5
  6. 6. Definition: Algorithm 2/2 • Programming is the process of writing programs in a logical way. Programs are implementing algorithm. • Despite programs, algorithm are finite. © 2014 Mikaël DONIKIAN 6
  7. 7. Common Algorithms • Shortest Path (Dijkstra, Graph theory, Trees …) • Binary Search • Merge, Quick, Insertion & Bubble Sort • • • • Collections Recursively Concurrency Graph theory (Trees…) © 2014 Mikaël DONIKIAN 7
  8. 8. Complexity • Runtime analysis of an algorithm • Need to estimate the relative time cost of an algorithm (efficiency) • Big O notation: infinite approximation of infinite growth of a particular function in infinite asymptotic notation. © 2014 Mikaël DONIKIAN 8
  9. 9. Complexity - Example • Given T(n) = 4n2 − 2n + 2 • As n grow large the term n2 will dominate therefore T(n)=O(n2) © 2014 Mikaël DONIKIAN 9
  10. 10. Complexity - order of growth Notation Name O(1) Constant O(log n) Logarithmic O(n) Linear O(n log n) Linearithmic O(n2) Quadratic O(nc), c >1 Polynomial O(cn), c >1 Exponential O(n!) Factorial Big O cheat sheet can be found here: http://bigocheatsheet.com/ © 2014 Mikaël DONIKIAN 10
  11. 11. Fibonacci Algorithm • Fn = Fn-1 + Fn-2 with seed value F0=0 and F1=1 • This is a recursive algorithm def fib(n): if n==0: return 0 elif n==1 return 1 Else return (fib(n-1)+fib(n-2)) © 2014 Mikaël DONIKIAN 11
  12. 12. Bubble sort • Complexity O(n2) • This algorithm is not the best when “n” is very large • It compares in a list each pair of adjacent items and swap them if they are not in the right order. Every iteration, the last value is considered sorted and then the number of values checked is decreased by one. © 2014 Mikaël DONIKIAN 12
  13. 13. Questions & Answers N.B. Algorithms are used everywhere and very early in biology to simulate the process of natural selection. © 2014 Mikaël DONIKIAN 13
  14. 14. References • • • • • • • • • • • Donald E. Knuth, “The Art of Computer Programming Vol.1 Fundamental Algorithms”, Addison Wesley, (3rd Ed.) 1997 http://www.software.ac.uk/blog/2011-04-14-coder-programmer-or-softwaredeveloper-spot-difference http://www.ericsink.com/No_Programmers.html Robert C. Martin, ‘’Clean Code’’, Pearson, 2009 http://www.topcoder.com/tc?d1=tutorials&d2=alg_index&module=Static http://www.cut-the-knot.org/WhatIs/WhatIsAlgorithm.shtml http://www.matrixlab-examples.com/algorithm-examples.html http://www.quora.com/Programming-Interviews/What-are-fundamentals-youshould-know-before-a-technical-interview http://www.careercampus.net/resources/programming_fundas.htm http://en.wikipedia.org/wiki/Big_O_notation http://en.wikipedia.org/wiki/Analysis_of_algorithms © 2014 Mikaël DONIKIAN 14

×