- Fela Winkelmolen
- 2010-07-13 @ 22:39
Hi, here are some ideas about how the lessons will behave and be written.
=== A quick look, for comparision, at what currently exist:
1. I had a look at the lessons in hh 0.5 (pre-shoes) and those are pretty
simple, but still did their job quite well:
- the lessons are shown in the top part of the window, and are "static", in
the way that they are not aware of what is happening in the app
- to go to the next page the user has to push the continue link; additionally
some navigation is provided to jump to any arbitrary place in the lessons.
Totally independently from the lessons the user can move around and use the
- there was only one lesson set, each lesson (mostly like a chapter) has a
certain number of pages
2. There currently are the Try Ruby lessons that are able to automatically
skips to the next page when they detects the instructions of a page are done,
but these lessons do not allow for easy navigation.
I think it would be best to have a lesson architecture that allows for both
console (try ruby) lessons and lessons for code to be written into the editor.
So lessons need to somehow know when events happen, but also have a way to
skip to wherever the user wants. I imagine the lessons being written in a DSL
similar to the following:
lesson_set "Start learning Ruby"
lesson "The basics"
# each lesson could be a block but I personally don't like
# to have to many unneeded indentation levels....
f = create_file :content => "say 'Hello, World!'", :name => "hello"
para "Execute the hello world that has been opened in the editor"
# go to the next page when a program containing say has correctly
# been run from the editor
# another page ...
para "nice job! you executed a program.."
next_when is optional, when it isn't used a continue button is shown, the user
should imho always have the ability to navigate the levelsets.
I hope the idea isn't "over-engineered", but I think the implementation is
quite modular, and for 1.0 not all features need be implemented.
The features absolutely needed are:
- displaying the lessons
- saving the state of the lessons
- support for console execution events (go to the next page when a specific
command is run in the console)
I think that the lessons would fit best on the right of the app, as the
application currently doesn't use very much horizontal space. I would add a
lessons tab to the main interface, with the various lesson sets sorted by
category. When a lesson is started for the first time it starts from the
beginning, otherwise it starts from where the user left off.
Let me know what you think..