Programming for kids

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

I could explain the SD program above in 10 minutes to any 9 year old that I know.
Good one -- it's almost as if you are serious. :lol:

All of the nine year olds that *I* know like to watch "Sponge Bob Square Pants" -- I enjoy it myself, btw. :D
All programming languages can be entertaining and educational.
Well, I certainly found
SD=. %:@ (+/@(*:@(] - +/ % #)) % #)"1
to be entertaining! :D :D :D

But then, I must confess to having a bad reaction to any programming language that includes a lot of "line noise" in its syntax. :-o :shock: :-o

Post

+/1 2 3 4 5

14

err, 15

Code: Select all

Python 2.2.3 ...
>>>
>>> total = 0
>>> for i in 1,2,3,4,5: total += i
>>> print total
15
>>>
>>> reduce(add,(1,2,3,4,5))
15
>>>
err, indeed! :)

Post

It's all great, I dunno much aboput Logo, but Basic is the uncrowned king of natural semantics. I'm not talking about modern Basics like VB, just the good old-fashioned C-64 style Basic Vulgaris.

Everyone can understand:

Code: Select all

For i = 1 to 5
  Answer = Answer + i
Next i
If Answer > 10 Then Print Answer
even if it's the first time they see it (provided they can read and understand English which should not a problem for native English speaking 9-year old).

I started to learn to program in Basic, on C-64 as an 8 year old, barely knowing few words of English. At 13 I was writing lame and buggy intros in 6510 assembler (sad really, now I can't even write a decent webpage in PHP, and C++ is long since forgoten).

You can progress really fast when you're young. And todays kids are actually smarter than we were. If he/she self-initiavely wants to learn, it won't be a problem.

Post

All programming languages can be entertaining and educational.
Well, I certainly found
SD=. %:@ (+/@(*:@(] - +/ % #)) % #)"1
to be entertaining! :D :D :D

But then, I must confess to having a bad reaction to any programming language that includes a lot of "line noise" in its syntax. :-o :shock: :-o[/quote]




What is the python code for:

SD = The square root of the average of the squares of the deviation from the mean.

I would expect to see a lot of page noise or no code at all. :wink:
The Bionic Man will be Midi ready.

Post

ok original poster I know you were trying to get help
and I hope it wasn't disrespectful for me to get involved with this thread, I figured your 9 yr old knows more than i do already so I thought I'd fit in.

vitamin c said he'd/she'd just pick a 00 language and that outside of that it didn't make much difference, do the rest of you concur with that opinion and what are the 00 languages, could someone list them?, otherwise from all of your post i'm leaning towards this 'logo, and this 'j'.

what do I want to do?
ok i'm gonna be honest but I know you guys are gonna laugh, I'm looking to one day get into the kind of job where you can program but don't have to be in the office, where I can kick it in starbucks or something with my laptop and work for some company making databases or whatever it is that you guys do. or making custom programs for business solutions, I think I'd also like to program for the web.

Post

If I was 9 years old I would love to play with the "Robotics Invention System" from LEGO. It's about building and programming robots.

IMHO the main thing for your child is to have fun. And from what I've heard (from a friend) that the language that LEGO has for this "invention system" is quite good.

Sincerely
LarsErik

Post

I started with logo and then basic a long time ago, then CASIO and TI BASIC - on the calcs -, but C can be a good start. Its grammar is near the BASIC, Pascal, ... one and it is fast. The IDE are very good too.

What I advice too is to pick up a book on computer architecture, to know how it works, and learning will be even faster ;)

Post

pardon me for invading this thread, but i too want to learn some programming this summer. python seems like a good choice to start with, but what editor should i get?

i'm running WinXP, i haven't done any programming since making moving colored circles in qbasic on a 386...

in other words, what is a good, free, easy to use, good looking (yes, i'm vain when it comes to computer programs)?

Post

What is the python code for:

SD = The square root of the average of the squares of the deviation from the mean.

I would expect to see a lot of page noise or no code at all.
A quickie thrown together in a minute:

Code: Select all

values = 5.0, 6.0, 7.0, 8.0, 9.0
print 'data values:', values

count = len(values)
sum = 0.0
for x in values: sum += x
average = sum / count
variance = 0.0
for x in values: variance += (x - average)**2
sd = (variance/(count-1))**0.5

print 'standard deviation:', sd
Not exactly what I would call "noise". :wink:

Post

python seems like a good choice to start with, but what editor should i get?
Go to www.python.org and download Python for Windows XP. It comes with a built-in editor called IDLE (Python is named after "Monty ...", the editor after "Eric ..."). It's all free.

You can also get PythonWin for free.

There is also an IDE from ActiveState.
www.activestate.com

You can also use TextEdit, JEdit, and other editors that support syntax highlighting for Python.

Post

texture wrote:The thing I don't like about python is that you have to structure your code by indentation. Although I always indent my code, it is annoying that python has this 'must be 4 spaces indented' thing.
I hate that too.

Ruby has all the advantages of Python and a cleaner syntax and a much deeper and more consistent object orientation.

If I were starting a child out in programming I'd definitely start them with Ruby. (Unless they're a genius in which case I'd start them out in Scheme).

Post

Any language is good, as long as its not vb.

Post

I'd also recommend the 'Head First" line of books out by publishers O'Reilly (& Associates)

I have the java book (Head First Java) and it is by far the best 'technical' book I've ever come across..

whats different about the head first line is they are written to be read by everyday people.. kind of like the 'for dummies' books, but with more sarcasm and depth. I had a different Computer Science Java book that was required from the Uni, but I sold the turd back to the bookstore and got the head first instead (from amazon)..

AAMOF the CS professor actually recommended it ahead of the department required text. but then again.. the dept req book was a load of trash.. it was very academic and dry, plus all the code segments had a green "WRONG" through them.. :hihi:

Post

Mr. Slater's Parrot wrote:
What is the python code for:

SD = The square root of the average of the squares of the deviation from the mean.

I would expect to see a lot of page noise or no code at all.
A quickie thrown together in a minute:

Code: Select all

values = 5.0, 6.0, 7.0, 8.0, 9.0
print 'data values:', values

count = len(values)
sum = 0.0
for x in values: sum += x
average = sum / count
variance = 0.0
for x in values: variance += (x - average)**2
sd = (variance/(count-1))**0.5

print 'standard deviation:', sd
Not exactly what I would call "noise". :wink:



I wrote a program called pythonmangler to determine if a completely randomized python program looks the same as the original. Results below.




python1=. 0 : 0
NB. input python SD program

values = 5.0, 6.0, 7.0, 8.0, 9.0
print 'data values:', values

count = len(values)
sum = 0.0
for x in values: sum += x
average = sum / count
variance = 0.0
for x in values: variance += (x - average)**2
sd = (variance/(count-1))**0.5
)


pythonmangler =: 3 : 0
NB. mangle (randomize) python program
noise=. ;(($y.)?$y.){y.
)



python2=. pythonmangler ^:1000 a
NB. mangle program a thousand times.


python2


------------------------------------------------
vs clvu.,sx

== 5uv aoerss m

loue a= nu +lae-.+.srv c*a* -8lne t* ,0fonaxcr9e0i.l a= ,n
o x0 dv v a.u 'ire
0vesf =tpuav ne t e(s/ ar.*aa:a7n g vs0/ :oai u) 0vemna(ai6c5 enre,u.nt 0
n rig. )
src a
lvx)m 0
suu (1 =ide(
e = a) l 2'u
u
:=t0,a0c
---------------------------------------------------

values = 5.0, 6.0, 7.0, 8.0, 9.0
print 'data values:', values

count = len(values)
sum = 0.0
for x in values: sum += x
average = sum / count
variance = 0.0
for x in values: variance += (x - average)**2
sd = (variance/(count-1))**0.5
------------------------------------------------

Yep, looks the same to me. :roll:
The Bionic Man will be Midi ready.

Post

jtxx000 wrote:Any language is good, as long as its not vb.
:lol: :lol: :lol: :lol:


vb := class(none);
nope...nothing!!

Post Reply

Return to “DSP and Plugin Development”