learning programming with erlang or learning erlang with...
TRANSCRIPT
![Page 1: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/1.jpg)
university-logo
Learning Programming with Erlangor Learning Erlang with Ladybirds
Frank Huch
Christian-Albrechts-University of Kiel
15. Oktober 2007
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 1 / 18
![Page 2: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/2.jpg)
university-logo
Learning Erlang with Ladybirds
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 2 / 18
![Page 3: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/3.jpg)
university-logo
Computer Science in Germany
students in computer science in Germany (also Kiel):less than 20% girlscomputer science not taught in every school
Our approach for improvement:One week course introducing computer scienceTalks of research groups, information about studyingcomputer science, discussion with students and femalecomputer scientist from industry, a trip to an IT company, anda programming course with a final project.
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 3 / 18
![Page 4: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/4.jpg)
university-logo
Teaching Programming
Excercises in a nice programming environmentZurich: Programming environment KaraSolve tasks by programming a little ladybird
Advantages: Attractive task, good identification
Programming with: Finite Automata, JavaOur approach: Erlang
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 4 / 18
![Page 5: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/5.jpg)
university-logo
Teaching Programming
Excercises in a nice programming environmentZurich: Programming environment KaraSolve tasks by programming a little ladybird
Advantages: Attractive task, good identification
Programming with: Finite Automata, JavaOur approach: Erlang
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 4 / 18
![Page 6: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/6.jpg)
university-logo
Teaching Programming
Excercises in a nice programming environmentZurich: Programming environment KaraSolve tasks by programming a little ladybirdAdvantages: Attractive task, good identification
Programming with: Finite Automata, JavaOur approach: Erlang
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 4 / 18
![Page 7: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/7.jpg)
university-logo
Teaching Programming
Excercises in a nice programming environmentZurich: Programming environment KaraSolve tasks by programming a little ladybirdAdvantages: Attractive task, good identification
Programming with: Finite Automata, JavaOur approach: Erlang
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 4 / 18
![Page 8: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/8.jpg)
university-logo
Teaching Programming
Excercises in a nice programming environmentZurich: Programming environment KaraSolve tasks by programming a little ladybirdAdvantages: Attractive task, good identification
Programming with: Finite Automata, JavaOur approach: Erlang
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 4 / 18
![Page 9: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/9.jpg)
university-logo
Lessons
basics: sequences, simple commands, case, recursionparameters (variables, integers, booleans)data structures (tuples, lists)modules, concurrency, distributionproject: design and implementation of chat
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 5 / 18
![Page 10: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/10.jpg)
university-logo
Basic Language
Prg ::= Rule Prg| Rule
Rule ::= Func() -> Cmds .Cmds ::= Cmd , Cmds
| CmdCmd ::= go() | take() | mark() | nothing()
| turn(Dir) | Func()| case Dir() of
Pat1 -> e1;. . .
Patn -> enend
Dir ::= left | rigth | frontPat ::= free | shamrock | agaric | tree | border
| _Func ::= [a− z] [a− z,A− Z,0− 9]∗
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 6 / 18
![Page 11: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/11.jpg)
university-logo
Excercises 1
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 7 / 18
![Page 12: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/12.jpg)
university-logo
Excercises 2
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 8 / 18
![Page 13: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/13.jpg)
university-logo
Excercises 3
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 9 / 18
![Page 14: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/14.jpg)
university-logo
Excercises 4
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 10 / 18
![Page 15: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/15.jpg)
university-logo
Non-Tail Recursion
start() -> case front() ofshamrock -> go(), take(),
start(),mark(), go();
_ -> go()end.
Recursion is not difficult.
Recursion is cool!
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 11 / 18
![Page 16: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/16.jpg)
university-logo
Non-Tail Recursion
start() -> case front() ofshamrock -> go(), take(),
start(),mark(), go();
_ -> go()end.
Recursion is not difficult.
Recursion is cool!
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 11 / 18
![Page 17: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/17.jpg)
university-logo
Excercises 5
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 12 / 18
![Page 18: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/18.jpg)
university-logo
Excercises 5
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 12 / 18
![Page 19: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/19.jpg)
university-logo
Excercises 5
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 12 / 18
![Page 20: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/20.jpg)
university-logo
Excercises 5
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 12 / 18
![Page 21: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/21.jpg)
university-logo
Lessons
basics: sequences, simple commands, case, recursionparameters (variables, integers, booleans)data structures (tuples, lists)modules, concurrency, distributionproject: design and implementation of chat
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 13 / 18
![Page 22: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/22.jpg)
university-logo
Excercises 7
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 14 / 18
![Page 23: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/23.jpg)
university-logo
Lessons
basics: sequences, simple commands, case, recursionparameters (variables, integers, booleans)data structures (tuples, lists)modules, concurrency, distributionproject: design and implementation of chat
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 15 / 18
![Page 24: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/24.jpg)
university-logo
Excercises 7
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 16 / 18
![Page 25: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/25.jpg)
university-logo
Lessons
basics: sequences, simple commands, case, recursionparameters (variables, integers, booleans)data structures (tuples, lists)modules, concurrency, distributionproject: design and implementation of chat
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 17 / 18
![Page 26: Learning Programming with Erlang or Learning Erlang with Ladybirdserlang.se/workshop/2007/proceedings/12huch.pdf · 2007. 10. 15. · university-logo Learning Programming with Erlang](https://reader033.vdocuments.net/reader033/viewer/2022060100/60b062a775d12a7aed0a1821/html5/thumbnails/26.jpg)
university-logo
Opportunities of Using Erlang in Our Approach
only one programming languagesimple syntaxno confusing typesabstraction (reuse of function definitions)only recursionavailability of Erlang
Problems:error messagesold-fashioned GUI
Frank Huch (CAU Kiel) Learning Erlang 15. Oktober 2007 18 / 18