Teaching Middle School

19 views
Skip to first unread message

pdk...@gmail.com

unread,
Mar 24, 2009, 2:51:18 PM3/24/09
to KTurtle; an educational programming environment
Hi. I am a middle school computer teacher. I'd like to start my
students learning how to program in KTurtle. Can anybody recommend
resources for lesson plans or ideas for programming? I'd love it if
the code was already written so I don't have to reinvent anything.
Thanks in advance for your help.

cies

unread,
Mar 28, 2009, 12:29:28 AM3/28/09
to kdeedu-...@googlegroups.com
this does not exists that i know.. maybe someone else replies. (hopefully)

otherwise it might be a good idea to take some existing course
material and translate the code to turtle-instructions. anyone knows
an existing teachers manual for this purpose that he/she likes?

_cies.

andre frank krause

unread,
Mar 28, 2009, 5:08:10 AM3/28/09
to KTurtle; an educational programming environment
i have some material i used to teach university freshman (sport
sciences) programming. though its german only, you can look at the
code at least.

www.coreloop.com/dump/WS0809_seminar_progsprachen.zip

and be gently with me - it was my first ever course i had to give.


by the way - will there be a new ktutrle soon? i need to repeat this
course in the summer term in roughly 4 weeks.. would be nice if a new
kturtle would be available.

again, thanks alot for making k-turtle - its the really best way to
introduce people to the world of programming.

cies

unread,
Mar 31, 2009, 5:32:04 AM3/31/09
to kdeedu-...@googlegroups.com
> i have some material i used to teach university freshman (sport
> sciences) programming. though its german only, you can look at the
> code at least.
>
> www.coreloop.com/dump/WS0809_seminar_progsprachen.zip

thanks for sharing! maybe we should link to it from a kde/kturtle
wikipage. is that ok with you? (are you ok when we mirror it, is it
under a license like CC-share alike? would be nice!)


> and be gently with me - it was my first ever course i had to give.

if you release it under CC-share alike you might find people sharing
their updated versions of your course.
(one hurry for collaboration)


> by the way - will there be a new ktutrle soon? i need to repeat this
> course in the summer term in roughly 4 weeks.. would be nice if a new
> kturtle would be available.

what version do you use now?
the current version is the kde4 version. for this version the syntax
slightly changed to match the conventions of the most-used languages
out there.

the kde4 version works on windows and mac, but some issues remain with
translations of the turlte-command language. if you haven't please try
the kde4 version, it sports a lot of new, helpful features.

> again, thanks alot for making k-turtle - its the really best way to
> introduce people to the world of programming.

wow.. thanks for the encouraging compliment.
being the bast way to introduce people to programming is what kturtle
tries to be, im glad it already succeeded in your perspective. thanks!


regards,
_cies.

Sly

unread,
Aug 19, 2009, 7:49:53 AM8/19/09
to cies, kdeedu-...@googlegroups.com
Hi!
i have some teaching plans for elementary school (children 7 to 14
years), but only in Croatian. These plans are prescribed by the
Croatian government. So, let me know if there is any use of it.

I wanted to use Ktutle in my classroom, but I have to follow these
teaching plans strictly.
The plans are made according to MS Windows and other MS software, so
the software I use should at least do everything Ms software does.
(Though we are not obliged to use MS)

In these plans it's prescribed to show how to erase a line. It's
according to penerase command in MSW Logo. Is there any alternative in
Kturtle?

@cies: great work - you did with Kturtle! I love it and hope to help
the project in future.

Best regards,
Silvia

Sly

unread,
Aug 19, 2009, 8:49:44 AM8/19/09
to KTurtle; an educational programming environment
I think I've found a bug.
I've used this code to demonstrate deleting part of the line:
forward 50
turnright 90
forward 100
pencolor 256,256,256
backward 50
turnright 90

so it rewrites white line over the black line. The result is light
gray line and I wanted line to be cleared.

But, when I continue programming and write:
forward 50
turnright 90
forward 100
pencolor 256,256,256
backward 50
turnright 90
pencolor 0,0,0
forward 100

it doesn't clear the line at all!

I need this feature because I have to show something like penerase
command.

thank you!
Silvia

Sly

unread,
Aug 20, 2009, 2:14:12 AM8/20/09
to KTurtle; an educational programming environment

Hi!

My next question is:
How many strings can be concatenated?

When I tried to concatenate more than 4 string Kturtle yielded an
error.

Thx!
Silvia

cies

unread,
Aug 20, 2009, 5:56:16 AM8/20/09
to kdeedu-...@googlegroups.com
i'm not at my computer at the moment. so i cannot test it, sorry.
(im also not going to be with my laptop & internet for a couple of
days as i go for a little holiday tomorrow morning)

yet the following might help:
- change the 256,256,256 into 255,255,255
- make "penwidth 2" or even three for the white line.
(warning: these are untested not well founded suggestions)

the canvas of kturtle in kde4 in vector based. good for printing, good
for zooming. but not entirely pixel perfect.


i'd have to run the second example myself to see what you mean..
maybe niels drops by and can give it a go.


thanks for your feedback silvia!
_cies.

cies

unread,
Aug 20, 2009, 5:58:59 AM8/20/09
to kdeedu-...@googlegroups.com
On Thu, Aug 20, 2009 at 1:14 PM, Sly<silvia....@gmail.com> wrote:
> My next question is:
> How many strings can be concatenated?

unlimited (only limitation the memory and swap space of your computer)

> When I tried to concatenate more than 4 string Kturtle yielded an
> error.

what error? and you post code?
please always post full information when you want to highlight bugs/issues.

did you do something like:
print "1"+ "2" + "3" + "4" + "errrorrr!!!"


again: i cannot have a look at it myself the upcoming days.


my regards,
_cies.

Sly

unread,
Aug 20, 2009, 6:08:49 AM8/20/09
to KTurtle; an educational programming environment
Hi!
Thanks for quick response :-)

> yet the following might help:
> - change the 256,256,256 into 255,255,255
> - make "penwidth 2" or even three for the white line.
> (warning: these are untested not well founded suggestions)

Yes, right my fault.
But still not perfect

Only this code worked:
forward 50
turnright 90
forward 100
pencolor 255,255,255
penwidth 3
backward 50
pencolor 0,0,0
penwidth 2
penwidth 1
turnleft 90
forward 100

note that I first set "penwidth 2" in line 8 and then "penwidth 1"
when I just set "penwidth 1" whithout "penwidth 2" it still leaves
that part of line where turtle went backwards painting white


> the canvas of kturtle in kde4 in vector based. good for printing, good
> for zooming. but not entirely pixel perfect.
>
That's a good feature that shouldn't be changed :-)

Sly

unread,
Aug 20, 2009, 6:26:18 AM8/20/09
to KTurtle; an educational programming environment
Hi!
>
> > When I tried to concatenate more than 4 string Kturtle yielded an
> > error.
>
> what error? and you post code?
> please always post full information when you want to highlight bugs/issues.
>
> did you do something like:
> print "1"+ "2" + "3" + "4" + "errrorrr!!!"
>
Now the same code works. I guess it was my memory. I had five days
uptime.
After restarting the computer, everything works.
Sorry for bothering.

Silvia

cies

unread,
Aug 20, 2009, 6:43:50 AM8/20/09
to kdeedu-...@googlegroups.com
> Now the same code works. I guess it was my memory. I had five days
> uptime.

last time i had five days uptime was some years ago. :) nowadays i
try to sleep every night. (ok, with exceptions of sometimes skipping a
night's sleep)


> After restarting the computer, everything works.

you mean sleep right?

hehhehhe..kidding.

Niels Slot

unread,
Aug 20, 2009, 8:08:53 AM8/20/09
to kdeedu-...@googlegroups.com
Your code example almost works in KTurtle. The problem is that the result is indeterministic. The line can either be 'erased' or not. This is because of the Z value of the lines. In the current KTurtle version they all have the same Z value. This means that no line is above or below another line, they're all at the same height. Because of this, when displaying the lines, the white line can be above or below the original black line.

I hacked KTurtle a bit to put all lines at a different Z value. This way your code works, the white line is always visible.

There are still two obvious problems:

1. In my implementation the turtle is always painted below the drawn lines. With a little more work I think\ I can fix this.

2. There is a need to change the pen size when their shouldn't be. This seems to be because we're using QGraphicsView which, as Cies mentioned, works great when printing or zooming. I don't know of an efficient way to fix this.

I'd like to have Cies opionion on this. Do we want to make a way to erase lines? (I would really like it..) If so, is there a way to implement it when we're using QGraphicsView?

Niels

2009/8/20 Sly <silvia....@gmail.com>

Sly

unread,
Aug 20, 2009, 9:08:29 AM8/20/09
to KTurtle; an educational programming environment
Tnx Niels!
In my private opinion I think that erasing the line (or it's part) or
parts
of the canvas is not necessary because we have to try to teach
children to
think in algorithmic way and to assume how the result would look like.
And
if something is wrong they should change the code. By the changing of
code,
the result should be changed the way we want to.

On the other hand, Z-value would be nice feature.

I don't know if I explained correctly why I need command "penerase".
So,
I'll try again.
According to Croatian Teaching plan children should learn how to erase
the
line (or part of the canvas) using their favorite Turtle Graphics
software.
In FMSLogo it is done by the penerase command which is same as using
forward
(or backward) with the color of canvas.

I know that Kturtle has completely different philosophy, but I would
really
like to cover my Teaching plan with Kturtle.

Thank you all for help!
Silvia


On 20 kol, 14:08, Niels Slot <nielss...@gmail.com> wrote:
> Your code example almost works in KTurtle. The problem is that the result is
> indeterministic. The line can either be 'erased' or not. This is because of
> the Z value of the lines. In the current KTurtle version they all have the
> same Z value. This means that no line is above or below another line,
> they're all at the same height. Because of this, when displaying the lines,
> the white line can be above or below the original black line.
>
> I hacked KTurtle a bit to put all lines at a different Z value. This way
> your code works, the white line is always visible.
>
> There are still two obvious problems:
>
> 1. In my implementation the turtle is always painted below the drawn lines.
> With a little more work I think\ I can fix this.
>
> 2. There is a need to change the pen size when their shouldn't be. This
> seems to be because we're using QGraphicsView which, as Cies mentioned,
> works great when printing or zooming. I don't know of an efficient way to
> fix this.
>
> I'd like to have Cies opionion on this. Do we want to make a way to erase
> lines? (I would really like it..) If so, is there a way to implement it when
> we're using QGraphicsView?
>
> Niels
>
> 2009/8/20 Sly <silvia.kola...@gmail.com>
>
>

Niels Slot

unread,
Aug 20, 2009, 9:30:30 AM8/20/09
to kdeedu-...@googlegroups.com
I think it would be a very good thing for KTurtle if it could be used to fulfill any requirements a government might have to a Turtle Graphics Language. This would mean that teachers from this country can choose to use KTurtle, which in turn could result in a growing market share for KTurtle, KDE and free software in general.

Niels

2009/8/20 Sly <silvia....@gmail.com>

Sly

unread,
Aug 20, 2009, 9:38:12 AM8/20/09
to KTurtle; an educational programming environment
Thats my intention.
I'd like to find software which can fulfill Croatian teaching plans.
Now, all teachers in Croatia use exclusively MS Software and I think
that the price is to high.
It's time to move to Opensource because it is developed enough to
fulfill any needs.

Silvia

On 20 kol, 15:30, Niels Slot <nielss...@gmail.com> wrote:
> I think it would be a very good thing for KTurtle if it could be used to
> fulfill any requirements a government might have to a Turtle Graphics
> Language. This would mean that teachers from this country can choose to use
> KTurtle, which in turn could result in a growing market share for KTurtle,
> KDE and free software in general.
>
> Niels
>
> 2009/8/20 Sly <silvia.kola...@gmail.com>

cies

unread,
Aug 20, 2009, 10:42:04 PM8/20/09
to kdeedu-...@googlegroups.com
yeah ths z value thing is botherring me too..

i can only think of putting the turtle on the top z, and paint each
line on a z one higherr than the last one, until on 254 (right?), and
then back to 0 again. that way the lines usually get to be on top of
eachother.

i have noo otheer idea.

niels: how do you accompish youur result?

then pensize thing is harer to solve... going back to pixel canvas is
the onnly reeal solutionn i can see...

_c. (from the airport)

Niels Slot

unread,
Aug 21, 2009, 3:42:52 AM8/21/09
to kdeedu-...@googlegroups.com
I did exactly what you described. I'm not sure about the 254 limit. the Qt documentation (at http://doc.trolltech.com/4.5/qgraphicsitem.html#setZValue ) doesn't mention a limit. It just specifies that you can supply a qreal. Which should be significantly larger then just 254 :) (it should be the same as a double). I don't think we can realistically run out here.

Maybe we could ask for some help from someone a bit more familiar with QGraphicsView? An e-mail to the kde-devel ML might help, or we could try asking someone from Qt for help.

Niels

2009/8/21 cies <cies....@gmail.com>

prot_fr...@famenzel.at

unread,
Aug 21, 2009, 5:32:05 AM8/21/09
to kdeedu-...@googlegroups.com
hello cies,

there is a lot of trafic on subscribing this google-group.
how to unsubscribe?
an email to "kdeedu-kturtl...@googlegroups.com" is not valid caused by the "+".

Hope you can help me - I want to follow your discussions in the web, but not by email.

BR peter


cies schrieb:
--
Mit den besten Grüssen
Peter A. Menzel

cies

unread,
Aug 21, 2009, 1:03:03 PM8/21/09
to kdeedu-...@googlegroups.com
On Fri, Aug 21, 2009 at 3:42 PM, Niels Slot<niel...@gmail.com> wrote:
> I did exactly what you described.

great minds think alike :)

> I'm not sure about the 254 limit. the Qt
> documentation (at http://doc.trolltech.com/4.5/qgraphicsitem.html#setZValue
> ) doesn't mention a limit. It just specifies that you can supply a qreal.
> Which should be significantly larger then just 254 :) (it should be the same
> as a double). I don't think we can realistically run out here.

perfect.

> Maybe we could ask for some help from someone a bit more familiar with
> QGraphicsView?

could.. but if a qreal is the parameter and 255 is not mentioned then
we can expect it to works as you expect. a simple test script can
visualize it (im on a public computer now, so no kturtle... bleh)

thanks for the fix man.. i was annoyed by this already for a while.

and thanks to our users (silvia in this case) for highlighting issues
and helping us prioritize...

> An e-mail to the kde-devel ML might help, or we could try
> asking someone from Qt for help.

if you want to ask i'd say qt-interest the list-to-be.


_cies.
Reply all
Reply to author
Forward
0 new messages