[Gambas-user] Restructuring the official Gambas examples

Matti math.eber at ...221...
Sun Apr 28 21:04:39 CEST 2013


Tobi, I think this is a very good idea.

I remember when I started with Gambas: I looked at the examples, but I didn't
want to play games - I wanted to learn how to use a piece of code for this or
that purpose. I missed the very basics, sometimes I found something, but
sometimes not. It is surely all there, but buried in applications where a
beginner won't find it.

There are two classes of examples now:
- one that answers questions from the mailing list, like: how can I use an array
of controls, how can I use the Wizard, and so on, giving just a little
information. They are silly programs with no use, but the beginner can learn how
to use the language.
- the others show "look what all can be done with Gambas!", and are
ready-to-use, but a beginner will find them too complex to find anything useful
in them.

So, little step-by-step examples would be very useful.

Tobi, if I could write some little examples for that project, just tell me.

Matti

Am 28.04.2013 19:30, schrieb Tobias Boege:
> Hi folks,
> 
> I'm finally going to write my last A level exam tomorrow. Except the oral
> exam in June, I have ca. 5 months of spare time until matriculation. Among
> working here and there, I plan to do much work on my Gambas components and
> stuff and wanted to start by restructuring the Gambas examples next week.
> 
> Hans and I had the feeling that, them likely being the first code a newbie
> will seriously attempt to learn Gambas from (at least that's what I did six
> years ago), they are not too well-suited for that purpose. (Well, I was 12
> back then and my brain was still fresh :-))
> 
> Most of them are poorly commented, contain commented-out code for whatever
> features (or just dead code), violate the Gambas naming conventions or
> (this is a point Hans put forward which I not necessarily support) contain
> a bulk of code which just adds a feature but is not really related to
> teach how to use the particular component for which it is an example
> (particularly, he refers to MapView's zooming functionality).
> 
> The suggestion is *not* to make a heavily-commented tutorial out of each
> example or to remove extra features, but to split examples into niveau
> stages so that newbies know where they have to expect what extent of
> commentary or additional complexity and that our sort can be more sensible
> of how to write an example to be put upstream.
> 
> Look at the Games category. Nobody wants a game (example) to have source
> code where every detail of the used component or the Gambas language is
> explained. I can just tell from my Pong example that these kinds of programs
> tend to get quite complex and the most interesting thing is the game logic
> and the OOP implementation - for experienced programmers.
> 
> On the other side are things like in the Basic category which may benefit
> from one or two explanatory comments about what is going on behind the
> scenes and what is to expect from, e.g. attaching an object to an observer
> (this is actually done quite well in ArrayOfControls but with *some little*
> room for improvement).
> 
> Hans also suggested, again without me tremendously backing that idea, that
> Benoit lay down rules to which new examples must stick. I just want to
> spread the idea here, nevertheless since my intuition may be wrong at this
> point. Loose guidelines for how to classify a piece into the niveau levels
> would be my approach here.
> 
> All in all, my plan would, in the first instance, just be to introduce
> different niveau levels to the examples followed by the consequent change to
> the way in which the IDE presents examples by default. The topic categories
> will remain! - there's just an alternate view of them in niveau levels. On
> the way, I will try my best to remove the grievances from the source code
> and later look at this more closely. But only if Benoit gives his "OK" and
> you guys have also nothing serious to amend.
> 
> Regards,
> Tobi
> 
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service 
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 




More information about the User mailing list