Cooking Software 101
      Pere Urbon-Bayes
     purbon@purbon.com

      Software Architect
     Belectric ITS GmbH
       Jena, Germany
Cooking Software 101

●   History of Software.
●   Basics of Algorithms.
●   The algorithms toolbox.
        –   Sort and Search.
        –   Recursion.
        –   Data structures.
History of Software
History of Software

●   Ramon Lull (Mallorca, Catalan Kingdom 1232-
    1315)
       –   Writer, Philosopher, Logician and Franciscan
            tertiary.
       –   Influence Leibniz, Newton, Darwing, ...
       –   1274 Ars Magna. 1308 Ars Generalis.
       –   Father of Artificial Intelligence, Computational
            Calculus and Combinatorics.
       –   http://ca.wikipedia.org/wiki/Ars_magna
       –   http://ca.wikipedia.org/wiki/Ramon_Llull
History of Software

●   Gottfried von Leibniz (Leipzig 1646-1716)
       –   Mathematician and Philosopher.
       –   Develop Infinitesimal Calculus, Binary System.
       –   Prolific inventor in mechanical calculators.
       –   Anticipated Information Theory, Lagrange
            Interpolation and aspects of the Turing
            Machine (Calculus ratiocinator).
       –   http://en.wikipedia.org/wiki/Gottfried_Wilhelm_
             Leibniz
History of Software

●   Alan Turing (UK 1912-1954)
       –   Mathematician, Logician, Cryptanalyst and
            computer scientist.
       –   Father of Computer Science, Algorithms and
            Computation (Turing Machine)
       –   Broke Enigma Machine Codes during WW2.
       –   ACE (1947 Manchester) stored prog computer
       –   Turing Test and Father of Artificial Intelligence
       –   http://en.wikipedia.org/wiki/Alan_Turing
History of Software
   (Programing Eniac)
History of Software
(Programing Punched Cards)
History of Software
  (Programing Assembly)
History of Software
  (Programing nowadays)




           b
History of Software
                 (References and Buzzwords)

●   Software Engineering
        –   Agile Software Development.
●   Imperative Programing (C/Pascal/...)
●   Object Orientation (C++/Java/...)
●   Logical Programing (Prolog/ML/...)
●   Functional Programing (Lisp/Erlang/Scala/...)

●   (Book) History of Computing: Software Issues:
    Conference on the History of Computing, ICHC 2000.
Basics of Algorithms
Basics of Algorithms
                        (Data Types)


●   Classics:                   ●   Sophisticated:
       –   Integers                    –   Linked Lists
       –   Doubles                     –   Tuples
       –   Floats                      –   Complex
       –   Characters                       numbers
       –   Strings
                                       –   Rational numbers
       –   Booleans
                                       –   Hash tables
       –   References
                                       –   1rst class
                                             functions
Basics of Algorithms
                            (Operations)


●   Basic mathematics:
       –   ++, –, +, -, *, /, %, += -= *= /= %=.
●   From logics:
       –   &, &=, &&, ||, ^, ^=, ~, !, !=, <<, >>.
●   Comparators:
       –   < <= > <= ==.
●   References and Assignations:
       –   (), [], →, :=.
Basics of Algorithms
                            (Operations)


●   Basic mathematics:
       –   ++, –, +, -, *, /, %, += -= *= /= %=.
●   From logics:
       –   &, &=, &&, ||, ^, ^=, ~, !, !=, <<, >>.
●   Comparators:
       –   < <= > <= ==.
●   References and Assignations:
       –   (), [], →, :=.
Basics of Algorithms
                    (Data structures)


●   Classics:                 ●   Sophisticated:
       –   Arrays                       –   Trees
       –   Lists                        –   Graphs
       –   Stacks                       –   Hash tables
       –   Queue                        –   Bitmaps
       –   ….                           –   Heaps
                                        –   Sets
                                        –   Dictionaries
                                        –   ….
Basics of Algorithms
                      (Flux control)

If (condition) then
   do something               If (condition) then
end                             do something
                              else if (condition) then
If (condition) then             do something more
  do something                else
else                            do something else
  do something else           end
end
Basics of Algorithms
                  (Flux control)

while (condition) do
 do something
end                  for (i:=0 to 100) do
                      Do something
                     end
do
 do something
while (condition) end

Notice some use until together with while
Basics of Algorithms
 (Functions and Procedures)
Basics of Algorithms
 (Functions and Procedures)
Algorithms toolbox
Algorithms toolbox
      (Sorting)
Algorithms toolbox
                          (Searching)


●   Linear search                ●   Binary search
       –   [3,7,4,2,10,1,11,9]           –   [1,2,3,4,7,9,10,11]
       –   [9]                           –   [9]
●   Cost: O(n)                   ●   Cost: O(log(n))
●   Other methods
       –   A*, B*,...
       –   Backtracking
       –   Combinatorial search
       –   Alpha-Beta pruning
Algorithms toolbox
            (Recursion)




function factorial(n) do
  If (n==0) then
      return 1;
  else
      return n * factorial(n-1);
  end
end
Algorithms toolbox
 (Data structures – Matrix )
Algorithms toolbox
 (Data structures - Lists)
Algorithms toolbox
(Data structures – Stack - Queue)
Algorithms toolbox
(Data structures – Hash Table )
Algorithms toolbox
(Data structures – Graph – Binary Tree )
Algorithms toolbox
(Data structures – Bitmap )
Cooking Software 101


 Ingredients+Methods <=> Data + Methods
Cooking Software 101


Thanks! Questions?
     Pere Urbon-Bayes
    purbon@purbon.com

     Software Architect
     Belectric ITS Gmbh
      Jena, Germany

Cooking Software101

  • 1.
    Cooking Software 101 Pere Urbon-Bayes purbon@purbon.com Software Architect Belectric ITS GmbH Jena, Germany
  • 2.
    Cooking Software 101 ● History of Software. ● Basics of Algorithms. ● The algorithms toolbox. – Sort and Search. – Recursion. – Data structures.
  • 3.
  • 4.
    History of Software ● Ramon Lull (Mallorca, Catalan Kingdom 1232- 1315) – Writer, Philosopher, Logician and Franciscan tertiary. – Influence Leibniz, Newton, Darwing, ... – 1274 Ars Magna. 1308 Ars Generalis. – Father of Artificial Intelligence, Computational Calculus and Combinatorics. – http://ca.wikipedia.org/wiki/Ars_magna – http://ca.wikipedia.org/wiki/Ramon_Llull
  • 5.
    History of Software ● Gottfried von Leibniz (Leipzig 1646-1716) – Mathematician and Philosopher. – Develop Infinitesimal Calculus, Binary System. – Prolific inventor in mechanical calculators. – Anticipated Information Theory, Lagrange Interpolation and aspects of the Turing Machine (Calculus ratiocinator). – http://en.wikipedia.org/wiki/Gottfried_Wilhelm_ Leibniz
  • 6.
    History of Software ● Alan Turing (UK 1912-1954) – Mathematician, Logician, Cryptanalyst and computer scientist. – Father of Computer Science, Algorithms and Computation (Turing Machine) – Broke Enigma Machine Codes during WW2. – ACE (1947 Manchester) stored prog computer – Turing Test and Father of Artificial Intelligence – http://en.wikipedia.org/wiki/Alan_Turing
  • 7.
    History of Software (Programing Eniac)
  • 8.
  • 9.
    History of Software (Programing Assembly)
  • 10.
    History of Software (Programing nowadays) b
  • 11.
    History of Software (References and Buzzwords) ● Software Engineering – Agile Software Development. ● Imperative Programing (C/Pascal/...) ● Object Orientation (C++/Java/...) ● Logical Programing (Prolog/ML/...) ● Functional Programing (Lisp/Erlang/Scala/...) ● (Book) History of Computing: Software Issues: Conference on the History of Computing, ICHC 2000.
  • 12.
  • 13.
    Basics of Algorithms (Data Types) ● Classics: ● Sophisticated: – Integers – Linked Lists – Doubles – Tuples – Floats – Complex – Characters numbers – Strings – Rational numbers – Booleans – Hash tables – References – 1rst class functions
  • 14.
    Basics of Algorithms (Operations) ● Basic mathematics: – ++, –, +, -, *, /, %, += -= *= /= %=. ● From logics: – &, &=, &&, ||, ^, ^=, ~, !, !=, <<, >>. ● Comparators: – < <= > <= ==. ● References and Assignations: – (), [], →, :=.
  • 15.
    Basics of Algorithms (Operations) ● Basic mathematics: – ++, –, +, -, *, /, %, += -= *= /= %=. ● From logics: – &, &=, &&, ||, ^, ^=, ~, !, !=, <<, >>. ● Comparators: – < <= > <= ==. ● References and Assignations: – (), [], →, :=.
  • 16.
    Basics of Algorithms (Data structures) ● Classics: ● Sophisticated: – Arrays – Trees – Lists – Graphs – Stacks – Hash tables – Queue – Bitmaps – …. – Heaps – Sets – Dictionaries – ….
  • 17.
    Basics of Algorithms (Flux control) If (condition) then do something If (condition) then end do something else if (condition) then If (condition) then do something more do something else else do something else do something else end end
  • 18.
    Basics of Algorithms (Flux control) while (condition) do do something end for (i:=0 to 100) do Do something end do do something while (condition) end Notice some use until together with while
  • 19.
    Basics of Algorithms (Functions and Procedures)
  • 20.
    Basics of Algorithms (Functions and Procedures)
  • 21.
  • 22.
  • 23.
    Algorithms toolbox (Searching) ● Linear search ● Binary search – [3,7,4,2,10,1,11,9] – [1,2,3,4,7,9,10,11] – [9] – [9] ● Cost: O(n) ● Cost: O(log(n)) ● Other methods – A*, B*,... – Backtracking – Combinatorial search – Alpha-Beta pruning
  • 24.
    Algorithms toolbox (Recursion) function factorial(n) do If (n==0) then return 1; else return n * factorial(n-1); end end
  • 25.
    Algorithms toolbox (Datastructures – Matrix )
  • 26.
    Algorithms toolbox (Datastructures - Lists)
  • 27.
  • 28.
  • 29.
    Algorithms toolbox (Data structures– Graph – Binary Tree )
  • 30.
  • 31.
    Cooking Software 101 Ingredients+Methods <=> Data + Methods
  • 32.
    Cooking Software 101 Thanks!Questions? Pere Urbon-Bayes purbon@purbon.com Software Architect Belectric ITS Gmbh Jena, Germany