Serving the Quantitative Finance Community

  • 1
  • 2
  • 3
  • 4
  • 5
  • 10
 
User avatar
rmax
Topic Author
Posts: 374
Joined: December 8th, 2005, 9:31 am

Programming Education

February 21st, 2014, 11:01 am

If you were to teach someone how to programme (without getting into the computer science aspects) then what are the key things you would want them to learn. Thinking of age groups 7 - 15.My list would be:- Boolean logic- Pointers- Recursion- Stacks- Objects- Understanding the concepts of an assembler + microprocessorAnything else?
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Programming Education

February 21st, 2014, 12:20 pm

I wonder if this list is already too advanced for younger children (who might not even know how to do multiplication or long division let alone the concept of "x" in algebra)I would think that the true starting elements of programming are things like:- the concept of a variable (something that might be different from instance to instance that you want to work with)- the concept of an algorithm as a sequence of mechanical steps on some input or variable- simple conditionals (=, >, < )- loops (e.g., for-each, do-N-times, do-until)- subroutines or functions (reusable, self-contained chunks of code)- inputs and outputs (getting something from someplace and sending something to someplace)I notice that educational programming environments such as Logo and Scratch use graphics as the medium of interaction more so than numbers. Visual-manipulation algorithms may be more intuitive than their numerical or logical counterparts. Every kid is used to making a ball, doll, or toy car do things and programming is just a way to making objects do things.
Last edited by Traden4Alpha on February 20th, 2014, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Programming Education

February 21st, 2014, 1:23 pm

Good idea, Rmax.I have been in contact with 'kids' in the age group [19,59] for a while now and they all think in certain way. For the want of a better initial baseline I give this (I hope to give more content).
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Programming Education

February 21st, 2014, 1:37 pm

Somebody show this thread to Lottie Dexter!
 
User avatar
Polter
Posts: 1
Joined: April 29th, 2008, 4:55 pm

Programming Education

February 21st, 2014, 2:17 pm

rmax: sounds good, BTW, there's a pretty good book that may be a good companion for introducing these concepts: http://www.nand2tetris.org/Take a look at the course plan: http://www.nand2tetris.org/about/Nand2T ... us.pdfNote that some programming is a prereq -- http://www.nand2tetris.org/prerequisites.php -- but if you only use it as a companion / source of inspiration, then experimenting with the overall structure is up to you anyway -- have fun! :-)// See also (this may be too advanced, but, again, at least you can use it as a checklist / source of inspiration for yourself): http://www.altdevblogaday.com/2011/12/1 ... the-stack/
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Programming Education

February 22nd, 2014, 1:03 pm

QuoteOriginally posted by: outrunI use the Spartan method. If the code compiles and runs then it will print the location of where I hid the food and water for my children."Hello, cruel world"
 
User avatar
farmer
Posts: 61
Joined: December 16th, 2002, 7:09 am

Programming Education

February 22nd, 2014, 1:44 pm

I would teach them how to build a state machine with logic gates and a clock to push the logic to each subsequent gate. You could make the logic gates about the size of dice, with little lights to show their state. Computers at the lowest level are simpler than electric train sets, for example.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Programming Education

February 22nd, 2014, 2:11 pm

QuoteOriginally posted by: farmerI would teach them how to build a state machine with logic gates and a clock to push the logic to each subsequent gate. You could make the logic gates about the size of dice, with little lights to show their state. Computers at the lowest level are simpler than electric train sets, for example.I used to think that way, too, because that's how I learned computers. But that was almost 40 years ago and computers have changed.At this point, a programmer needs to understand logic gates about as much as a car driver needs to understand the metallurgy of pistons. Sure, if you want to become a hardware designer, then logic gates are an essential concept. But if you want to program a computer, all you need to understand is the effects of each type of programming instruction rather than how those instructions get implemented.These days, all one needs to know is that a computer is an instruction-following machine and the programmer's task is to craft a set of instructions that always do something useful every single time those instructions run.
 
User avatar
farmer
Posts: 61
Joined: December 16th, 2002, 7:09 am

Programming Education

February 22nd, 2014, 2:28 pm

QuoteOriginally posted by: Traden4AlphaThese days, all one needs to know is that a computer is an instruction-following machineThis is what leads to bad programming. There is no program, however simple, that can't be fucked up by not understanding the limitations and strengths of computers.What you describe does not even need to be taught. Anybody can google "erase file" and find the int EraseFile(filename) function. So what needs to be taught, is why sometimes erasefile doesn't work, and why sometimes it works better. And this comes down to the hardware that is being used for disk reads, memory storage, string searching, network throughput.When I started programming graphics-intensive 3d stuff in the early 1980's, it ran slow and clunky. This was the main challenge of programming any video game back then. I always assumed this problem would take care of itself, as computers got faster. But every year I have programmed from then to now, speed was still the most challenging problem causing any program to not work.When I pull up my call log on my cellphone, and click dial, it dials every time. But sometimes the call log gets so long, the scrolling freezes. Most of the problems people in this forum try to solve, the final hurdle is speed. Whether you are mining bitcoins, or pulling up customer records from a CRM, simply knowing the commands will not get you anywhere. Anybody can Google "mysql query" but that will not produce a system that actually puts records on user screens when they all try string searches on the same table at once.I have programs all over the computer I am typing on that save live tickers to disk, combine tickers from different feeds to make charts, analyze ticks, remember where various orders were. It was quite easy to make any piece of it work, just so far as copying arrays and comparing timestamps. I have used the correct commands correctly, so in theory it should work. But I cannot even use most of it most of the time, because it will be a huge programming challenge to make it all run fast enough to work together at the same time.I know the combination of instructions that will tell me whether the euro is going up or down. But they will not run.The main characteristic dictating the commercial success and popularity of any program, is user experience. And the most common issue on which user experience turns, is speed. And there is no instruction "go faster." You have to think about how a computer works, and think about where the bottlenecks are and why, to achieve more speed.
Last edited by farmer on February 21st, 2014, 11:00 pm, edited 1 time in total.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Programming Education

February 22nd, 2014, 3:26 pm

Crawl, walk, then run!I would think it would be extremely hard to learn "why sometimes erasefile doesn't work, and why sometimes it works better" if one has no clue what a file is or why you would want to erase it. And WTF is "int" and where does "filename" come from?No doubt, speed has it's place. But the first order of business is to learn the more basic skill of creating a program that does the right thing (i.e., correct syntax, no crashing, creates the desired output for every possible input). When you create your first "Hello world" program, nobody spends time talking about it's speed.
Last edited by Traden4Alpha on February 21st, 2014, 11:00 pm, edited 1 time in total.
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Programming Education

February 23rd, 2014, 10:50 am

He wants you to spend more time talking to him.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Programming Education

February 23rd, 2014, 2:27 pm

QuoteOriginally posted by: outrunMy father is *extremely* unproductive in this area because he wants to learn the basics first. I configured a mail client in his machine and created a gmail address so that I could mail him pictures of the children. When I ask him "how's the email going?" he responds "I first want to know about those logical gates, and then about routers and ISPs (internet service providers)"Indeed! And before anyone can program, they need to be taught about translation lookaside buffers and speculative branch execution.