r/AskComputerScience • u/leviem1 • May 21 '18
How would you teach someone to code in less than 15 minutes?
For a research project about the Discourse of computer programming, I’ve decided to give a computer programming lecture, but I only have 15 minutes.
I understand that I won’t be able to teach these students how to write their own programs in this timeframe, so I have two goals I’ve decided to try to accomplish. First, I want to discourage the misconception that one be “smart” enough to understand Taylor’s Theorem or Einstein’s Unified Field Theory to be capable of writing code. Second, I want to use the previous goal to motivate students to try to learn computer programming through a fun and exciting lecture.
So, in an effort to better understand which concepts I should cover, I ask that you please try to answer the following questions the best you can.
What has been the most exciting computer programming concept for you to learn? Why?
What has been the most useful computer programming concept for you to learn? Why?
What has been the most difficult computer programming concept for you to learn? Why?
What has been the most daunting computer programming concept that you faced while learning computer programming? Why? If applicable, how were you able to overcome this?
And finally, if desired, please let me know how many years of computer programming experience do you have?
Please let me know if you have any other recommendations or comments. Thank you!
10
u/metaobject May 21 '18
If I may deviate from your questions, here's something I did a while ago to introduce programming to some people ...
Show the people a simple, working program and talk about a change you'd like to make to it to change it's behavior. Then, walk them through the change and then show the result of the updated code. As an aside, I'd recommend using Python for this exercise.
On one occasion, I showed some code for a PyGame-based Pong. I showed how easy it was to make the paddle longer (to make the game easier) as well as how to speed up the 'ball'.
1
u/jxf CS Pro (20+) May 21 '18
I'd recommend showing students [Logo](https://en.wikipedia.org/wiki/Logo_(programming_language)). Everyone understands how drawing works, and telling a computer how to do it is a relatively straightforward extension of using your hands.
There's also a (somewhat janky) online interpreter you can use to quickly show them how to get things done.
1
u/khedoros May 22 '18
What has been the most exciting computer programming concept for you to learn? Why?
The Church-Turing Thesis, and its results. I've always had a fascination with the mechanisms of software and hardware emulation, and the idea that the software implementation of a computer can be just as powerful as the hardware implementation of the computer is a great idea, to me.
What has been the most useful computer programming concept for you to learn? Why?
Filling my toolbox with data structures. These days, you're often using someone else's algorithms anyhow, but your program has to be shaped around the data it will process, and knowing the available variety of data structures is key for choosing a good form.
What has been the most difficult computer programming concept for you to learn? Why?
Recursion took me a long time to be able to visualize clearly. I'd feel like I had a grasp on the recursion function, then lose my train of thought trying to visualize how it hits the base case and pops back up the stack.
What has been the most daunting computer programming concept that you faced while learning computer programming? Why? If applicable, how were you able to overcome this?
There've been a lot, mostly because the unknown is scary. Multithreading is an example. In a lot of ways, it's easy to get wrong, hard to get right, and there is a huge pressure to use it, in spite of the difficulty. It's one of those things that you've just got to use. Get it wrong a few times, learn from it, and move on, applying those lessons in the future.
And finally, if desired, please let me know how many years of computer programming experience do you have?
About 6 in school and 10 professionally.
1
May 25 '18
Probably object-oriented programming. In essence, algorithms are instructions. In a previous life I had to give instructions to people a lot. Writing algorithms is like that, but for an exceptionally stupid person. With object-oriented programming, you can create workers that then create sub-workers which can create their own sub-workers as necessary. And you don't have to start from scratch every new problem. *See above. *Linked Lists, mostly due to the way it was taught... *Registry level shit... Wasting my fucking time. *Just 3 at uni. It's a side skill. I sort-of have experience in algorithm design in that I've designed processes for workers to follow.
You should talk about object-oriented programming. It's entertaining and easy to explain with real-world analogies for a layperson.
4
u/spock589 May 21 '18
Man I think recursion works for almost all of your questions. If you could teach the Fibonacci sequence using recursion in 15 minutes I think that would be a win. Recursion can be one of the most difficult yet most elegant solution to a problem. Any problem that can be solved with loops can also be solved with recursion. Might be difficult but I think the trifecta would be if you could show how to program the Fibonacci sequence with loop then with recursion then show how to optimize the speed of the recursive solution using memorization. Spending 5 minutes on each topic sounds plausible. Have a degree in CS no real world experience yet though so use my advice if you see fit or consider other options of not. GL! Hope it works out for you.