Coder Social home page Coder Social logo

koans's Introduction

Next Level Koans build status Coverage Status

Next Level Koans is an HPI project to improve teaching of Smalltalk and Squeak to students in the lecture series Software Architecture. Koans consist of testsuites, introducing idioms and basic concepts through coding exercises within a graphical user interface.

How to Install

The Koans are compatible with either Squeak 5.1 or Squeak trunk (check Travis for more information). The easiest way to install the Koans is by getting Metacello and then executing the following snippet:

Metacello new
  baseline: 'Koans';
  repository: 'github://hpi-swa-teaching/Koans/src';
  load.

How to Start

  1. In the menu bar click on Apps>>Koans.

    Picture of the Apps Menu

  2. This should open the KoanBrowser. The KoanBrowser shows all the available chapters on the left, a description of the selected chapter in the top richt and the list of Koans inside the selected chapter on the bottom right.
    Note: The chapters are sorted by priority / the order they are meant to be solved.

    Picture of the Browser

  3. To start a specific Koan, first select its chapter on the left and then click the corresponding entry in the list on the right. This opens the KoanEditor. The KoanEditor consists of the statusbar at the top, the code panel in the center and a row of buttons at the bottom.

    Picture of the Editor

Editing Koans

  • You can navigate through the chapter of the currently opened Koan via the 'Previous' and 'Next' buttons. To change the chapter you have to return to the KoanBrowser via the 'Overview'-button.

  • The status of the opened Koan is represented by the status bar. It changes color depending on wheter the Koan is solved (green), failing (yellow) or erroring (red). In case the Koan is not successfully run, the bar also shows additional information about what went wrong.

    Picture of a green status bar Picture of a yellow status bar Picture of a red status bar

  • By default the Koan is tested (and the status bar updated) whenever changes to the opened Koan (or the Koan's required classes) are saved. This can be turned off (globally) via the editor's window menu.

    Picture of a window menu

  • If the test on save functionality has been turned off, the only way to test the opened Koan is through the 'Test'-button. It also saves the currently made changes.

  • The opened Koan can be returned to its original state through the 'Reset Koan'-button.

  • The 'Debug'-button opens a debugger on an execution context of the currently opened Koan.

  • Some Koans require the user to edit or look at specific classes. These classes can be easily accessed through a browser opened by the 'Browse Project'-button.

    Picture of a project browser

Contributors

Over the years, the following people have contributed to the Koans project:

Robin Schreiber, Patrick Rein, Eric Seckler, Daniel Stolpe, Tobias Pape, Jakob Reschke, Willi Müller, Daniel Kurzynski, Wenzel Pünter, Stephan Lutz, J-L-O, Jeilef, Fabio Niephaus, Robert Hirschfeld, Marcel Taeumel

History

You can find previous versions of the Koans project on the previous documentation page.

koans's People

Contributors

codezeilen avatar ekrebs5 avatar fniephaus avatar j-l-o avatar jeilef avatar marceltaeumel avatar stlutz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

koans's Issues

Making error catching less strict

In case a new line causes an exception it should not be caught. Currently most exceptions are caught (e.g. ZeroDivision). Opening a debugger is a valuable lesson at that point.

Prevent Felix's Problem

If there is an infinite loop in a Koan using the KoanEditor becomes really slow. The major cause for this is the repeated execution of Koans when updating the editor. This can be prevented with less repetitions of Koan executions and a shorter timeout.

Modulo operator

In KoanAboutCollectionProtocol, test04select includes

self assert: {2 . 4 . 6} equals: ({1 . 2 . 3 . 4 . 5 . 6} select: xx)

This to me looks like [:aNumber | aNumber \\ 2 = 0] or similar. However, \\ as the modulo operator is rather unusual compared to other programming languages the students might already know (most use %, mod or similar). Maybe a hint regarding the operator could be added?

If looking for the operator in Number or SmallInteger as part of the solution finding process is intended, I'm happy to close.

Prevent Christoph's Problem

Christoph created a method which used random. As a result the Koan returned different results on every run. As the different parts of the user interface of the KoanEditor all depend on their own execution of the Koans, the KoanEditor can get into an inconsistent ui state. This should be prevented by:
1.) Less reptitions (see #9)
2.) Setting the random seed to the same value

Symbols with spaces test ordering

In KoanAboutSymbols, test05symbolsCanBeMadeFromStrings and test06symbolsWithSpacesCanBeMade both show the creation of symbols with spaces (#'Cats and dogs'). The syntax (#'...') is first shown in the latter, leaving the student alone in figuring it out in the former. Also, the two tests are almost redundant.

A potential fix might be showing the creation of symbols without spaces from strings in the former (e. g. #Cats == 'Cats' asSymbol), while keeping the latter as it is. This way, the student doesn't need to figure out new syntax, because #Smalltalk (no space) is shown in the first test, and the symbol-with-spaces syntax is still shown in the latter for completeness.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.