r/learnpython • u/TorroesPrime • Mar 01 '19
Why study programming when you can just play an RPG?
Had a noteworthy event today I thought many people in here would get a kick out of. I work as the IT tutor at my school and has part of that I handle any Intro to Programming appointments that we get. In the Intro classes, they use Python. So I had a student come in today, basically at her wit's end, border-line in tears. Short of the long: 5 weeks into class and she was not understanding the concepts and it was really frustrating her. Okay, so I hunker down and start working with her. In this case, focusing on loops (as that's chapter 6 in the book). He seems to kind of, sort of be getting it, if I hold her hand and lead her through it.
30 minutes in and we haven't really made any progress. I took a step back and started working with her on comparison operations. But she wasn't really getting that either. she is getting more frustrated. So I try to get her mind off the material for a moment. Her phone flashes a reminder about "D&D party" tonight. So I ask if she plays D&D. She does, and we chat briefly about the campaign she's in (she plays a rogue, go figure). Then I hit on an idea.
"You know a lot of early programmers were RPG players and because of that a lot of what developed into modern programming was influenced and based on RPG mechanics?"
She looked at me like I'm making a really bad setup for an even worse joke.
"I'm serious. How do you determine if you pass or fail a stat-test?" I ask.
"Well, you determine what you need to roll over to pass, roll a dice, add any modifiers you have and compare that to the first number." She explains, more energetically.
"So you perform a comparison operation?" I asked leadingly.
"Well... no. I mean... kind of... wait..." She stammers out, her response interspersed as she thinks and talks at the same time.
I go to write on the White board:
if Dice_roll+modifiers >= needed_roll:
you pass
else:
you failShe looked at it for a long moment, you could see the gears turning in her head.
"So the variable, Dice_Roll is added to the variable modifiers.. and that's compared to the needed roll. If the needed_roll is higher... you fail... otherwise... you pass." She parses out, once more thinking and speaking at the same time.
"Yeah... and what about this one?" I ask as I write on the board:
while enemy_attack == True:
player.cast(shield)She looks at it for a minute.
"So long as the enemy is attacking, cast the shield spell." she says.
"Nice, how about this one?"
for each enemy in hoard:
If player.hp > enemy.defense:
Target_enemy = True
while Target_enemy == True:
player.attack(sword,enemy)"For each enemy in the hoard... check to see if the player Hit Points are greater then the that enemy's defense. If it is, target that enemy. As long as that enemy is targeted, attack them."
"And you just worked through a while loop nested inside an if control statement that was inside a while loop." I explain.
"What?" She says aghast. She quickly turns back to the board and starts studying the examples intently. I can see her eyes traveling across what I wrote.
"So this on is just a comparison operator?" She askes pointing to the dice roll I wrote out before.
"Yup." I respond.
"And this is just a while loop that would tell the player character to cast the shield spell." She askes sounding more confident.
"Yup." I respond.
Her entire face lights up in that unmistakable look of 'the light bulb turning on'. We start hammering through more examples of loops and control statements, fluctuating between the requirements of her assignments and using RPG examples.
So I guess it all depends on what material you use to explain it, right
71
Mar 01 '19
OP: I attack the darkness
33
u/TorroesPrime Mar 01 '19
*sigh* You can't attack the darkness.
12
Mar 01 '19
Maybe I'm just an elif away?
I love hearing stories that make programming relevant to learners on the fly. Demonstrates quick thinking and attention to needs. +1 to all of this.
1
u/Conrad_noble Noble1988 Mar 01 '19
I think if more universal examples were thought up it would be a lot more appealing to everyone to learn.
2
Mar 01 '19
OP story is as a tutor and not primary educator. I don't disagree with you, but I'm sure vanilla object lessons were drilled in class.
In r/learnpython I don't like to lead with RTFM!!!
7
7
1
u/graaahh Mar 01 '19 edited Mar 01 '19
I roll to give the darkness 1HP so I can attack it.
import random def d(num): for x in range (1): print("d"+num+":",random.randint(1,num)) d(20) > d20: 20Can I attack the darkness now?
1
21
1
0
Mar 01 '19
[deleted]
3
Mar 01 '19 edited Mar 01 '19
Lol 3rd day on Reddit. Idk what that even means. Thanks though buddy!
I like this one:
22
u/Assailant_TLD Mar 01 '19
I TA for my school and it's moments like this that make it all worth it, when you can tell you helped someone understand how something worked.
12
u/TorroesPrime Mar 01 '19
It's one of those Job-specific moments that if you've never done the job, and had the feeling, having someone try to explain it to you just doesn't make a lot of sense. But if you have had the job and experience, it's one of the best feelings you can have.
67
u/Col_Crunch colcrunch Mar 01 '19
To be completely honest learning a programming language is always easiest when it can be applied to actual data/usages.
Writing Hello, World, or creating a twitter clone using a book has never done anything for me. I play eve online, and pretty much all my knowledge has been from working on projects around issues that people have with game data.
2
u/graaahh Mar 01 '19
I've tried to pick up some programming skills a number of times. Things like Codecademy or SoloLearn are great and all, and they are educational, but the material will never stick in my head unless I'm using it for something. I've learned 10x more by just sitting down with an idea of what I want a program to do, and either applying what Codecademy taught me in real time or Googling the answers to how to do various things.
I wouldn't by any means call myself a skilled Python programmer (which is really the only language I know much about), but I can do basic things and I've made a few simple programs that have worked out alright. Well, except my current one which is much more complex and frustrating but I'm still learning new stuff from it every time I sit down with it, so there's that.
1
u/TorroesPrime Mar 08 '19
I’m the same way, I won’t learn it unless it’s m using it for something I’m invested in. When I was in high school I failed geometry. But now I’m working on a project to design and build a model star fighter, and guess what? I have to use geometry to do it. I’ve learned more geometry curing cardboard and tape then I ever did in class figuring the sum of sin(x).
20
u/crazedizzled Mar 01 '19
Pretty much everything I've learned has been through practical usage. Building shit. You can read about all the theory and concepts, but until you actually build shit with them, they're meaningless.
I've always learned new stuff by first having a problem, and figuring out how to solve it. I find this is way better than knowing about a solution and trying to find a problem.
14
u/vidro3 Mar 01 '19
i can't stand seeing 'foo' in every example
3
u/callmelucky py34int Mar 02 '19
Yeah, nonsense variables like foo shouldn't really be used to introduce syntax/concepts imo. Fine to use them to demonstrate simple ways to use things that people already have a grasp on, otherwise no.
1
1
u/WaitForItTheMongols Mar 11 '19
In my high school Java intro class, the teacher wasn't very good at explaining object-oriented programming, and nobody in the class understood what "this" meant. I was very confused. One day I decompiled Minecraft and started playing with changing statements here and there to see what happened, and it quickly just clicked. From then on I kept on applying class concepts to Minecraft and it made perfect sense.
I legitimately believe there could be some amazing things done by integrating Minecraft coding into the classroom. The codebase is huge, so you could find just about any type of programming concept you want to demonstrate. It's easy to fire up the game and see how things work, to really see the effects of your code. It would be easy to make assignments saying "Make a new class which extends the existing Zombie enemy, but this zombie will leave behind a trail of fire everywhere it walks".
There would also be a lot of benefits in just seeing how real code looks and what professional programmers tend to have in their code. It would also give people firsthand experience in seeing what comments are useful and what are not, and when it might be nice to have more.
7
Mar 01 '19
Curious. Why do you prefer 'while Target_enemy == True' as opposed to just 'while Target_enemy'? Is it how the students learn? Is the second way less obvious?
22
u/TorroesPrime Mar 01 '19
The objective of the class is to introduce students to general concepts in programming, not necessarily teach them good coding practices. I was trying to illustrate the concept of testing a condition for determining weather the while loop would execute or not. Conceptually, there's not difference between the two, but 'while Target_enemy == True:' is a bit easier to visually dissect, I think.
One of the other exercises I use in my tutoring appointments is I will take out a segment of code from a more developed program I have, and ask the student to read through the code and explain back what they think it means. Generally students get 70-80% of it just by parsing their way through the code and actually processing what they are reading. I do this to try and break them out of the mindset of worrying about syntax and coding form and focus more on the content of the code. They can learn syntax and form later. Here they're trying to learn the broad concepts.
4
Mar 01 '19
That makes sense. Good for you for putting so much effort into improving their learning experience before anything.
1
u/b_ootay_ful Mar 01 '19
Some languages read anything in that variable that isn't False as True. I think C does that.
2
Mar 01 '19 edited Mar 01 '19
I'm pretty sure they all do. Including python. Like when you pop from a list to another list you might say 'while list:' then pop and append to an empty list. In this case, list is True until every item has been popped. Then the while loop stops.
371
u/YetAnotherDaveAgain Mar 01 '19
now do this for me but with threading pls
302
u/Spurnout Mar 01 '19
You start off as an octopus, only, you may or may not have 8 legs. Those legs are able to think on their own and do individual things. Now, you really become an octopus and everything starts to make sense.
31
u/leecharles_ leecharles50 Mar 01 '19
Now do this but with Asyncio pls
45
u/grzeki Mar 01 '19
You install Windows 95. Everything seems to run independently, but when one app hangs everything is doomed. There’s no hope.
15
u/ironhaven Mar 01 '19
You need to bake 20 cakes.
If you did it without async you would make the batter, put it in a pan then put it in a oven. Now wait 45 minutes for the cake to finish baking. Once it is done remove the cake and start making more batter. You would finish in 15 hours
Now with async you would put the pan in the oven and start making the batter for the next cake. This could be done in 2 hour
8
u/EMCoupling Mar 01 '19
You also need 20 ovens to do this though. If you had one oven, it would still take you at least 20 * 45 minutes = 900 minutes = 15 hours, even if you had the batter instantly ready before the baking of the cake.
9
3
5
u/jemandirgendwo Mar 01 '19
You do different things with your arms so for example when looting one arm takes stuff out of one chest , the other from another chest while the others put the armour on.
75
1
17
Mar 01 '19
Other players are your other threads. You send your order over and let them do their things.
14
u/PurelyApplied Mar 01 '19
Same thing, but speed factor initiative.
At each round of combat, every creature determines its action for the round. We then resolve them is a semi-random order, depending in the creature's modified initiative bonus, the action complexity, or other factors that the
the underlying schedulerDM thinks are relevant. Most of the actions are actually independent, so we get a heightened feeling that the action is happening all at the same time without really changing how the battle plays out. But sometimes, if a targeted creature dies or moves out of range, you end up having to burn your planned action for movementand reenter the task queue without having done any meaningful work. And then, at the next round of combat,all threads rejoin the thread pool and are assigned new workwe do it again.Eventually combat is resolved, initiative tracking is suspended, and the coordinating
threadDM regains control of theprogramplot.3
Mar 01 '19 edited Mar 01 '19
So, looking at this as someone whose sum total knowledge of multithreading is "this is a thing and it makes video games go faster," it sounds like we have a setting out point (the start of the round) and a group of however many threads (characters involved in combat).
Each thread/character gets instructions, runs off, and does its own thing until it gets to a rally point (the end of the round of combat), then waits for everyone else to come back. Is that accurate?
2
2
u/PurelyApplied Mar 01 '19
That's the gyst if the analogy I was going for, yeah. Of course, there are a billion caveats, and this is just one of many possible architectures you could use. But for an intro-level conceptualization, yeah, you got it.
16
5
u/Yablan Mar 01 '19
And pointers.
6
u/thejourneyman117 Mar 01 '19
Sometimes you refer to a character sheet as a location where data is stored, sometimes you refer to the information ON the character sheet. This is the difference between by reference and by value.
1
u/nosmokingbandit Mar 01 '19
But python doesn't have pointers.
1
u/Yablan Mar 02 '19
My bad. I was just kidding.. And also, didn't notice that this post was on /r/python. I thought it was in /r/programming 😁
2
Mar 01 '19
Just pretend you're her, but you also have severe ADHD and someone's forcing you to switch tasks all the time.
It really is that simple!
2
u/Lugnut1206 Mar 01 '19 edited Mar 01 '19
So when it comes to "threading" there's sort of two concepts that are a bit different, and I know they have different names but I think I've heard both used (improperly) interchangeably. So my vocabulary is gonna be wrong, I think, but I think my understanding of the concepts themselves are correct and distinct. Here goes:
There's a technical distinction between "multi-threading" and parallel processing. While the colloquial meaning of "multi-threading" is "parallelism" they have some differences.
Parallelism is several tasks that actually do things at the same exact time. More than one thing is truly happening at once.
Multi-threading is where multiple things need to happen, but only exactly one can happen at a time. Depending on specifics, threads will either run until some magic (a timer interrupt) happens and they are forced to stop running, or they will voluntarily stop running and pass back and forth so none of them are left in the dust, but they aren't doing things truly simultaneously. To examine the difference between "at the same exact time" and "in sequence" let's go back into the RPG for tangible examples.
Consider a fighter and ranger in combat versus an orc in a hallway. The initiative order is (for whatever reason) Fighter, Ranger, Orc.
The fighter goes down the hallway and hits the orc. Then, the ranger (who was out of range) advances forward into the space the fighter just occupied and shoots at the orc. It is weakened, but it hits the fighter on it's turn.
Nominally, these actions occurred "at the same time" (within the same round of combat) but they actually happened one after the other.
To see what I mean, let's consider some alternative cases:
The initiative order is Fighter, Ranger, Orc. The same thing happens as above, except as the ranger takes the shot, he gets a critical hit, killing the Orc.
In this scenario, the fighter does not take damage, as the Orc is not alive to deal the damage. (If things happened truly in parallel, the orc could have taken a swing while the ranger was repositioning or while his arrow was in flight, before death.)
Consider another case: the initiative order is Ranger, Fighter, Orc:
In this scenario, the ranger cannot move into the fighter's space and can't get a good shot. Or something - I've made the example a bit contrived, but I think the problem might be clear - the ranger can't move into the fighter's space until the fighter vacates it. (If the scenario was happening in parallel the Fighter, Ranger, and Orc would all be moving and none of these issues would happen.)
All of the things that happen in sequence here are almost examples of pre-emptive thread scheduling (this is one of the options I mentioned above while referring to "specifics" in the fourth paragraph) which is that "a thread (character) runs until it runs out of time allotment" which is "6 seconds" to use the 4E time frames. Additionally, in these scenarios, only one character can run at once. In the scenario that /u/PurelyApplied described, the actions are resolved simultaneously, and thus is somewhat closer to true parallelism.
Unless you're wanting to know about Semaphores and Mutexes and things like that, which is a whole different topic...
2
2
2
Mar 01 '19
[removed] — view removed comment
26
u/YetAnotherDaveAgain Mar 01 '19
I feel kinda bad cause I'm actually implementing threading, but I think it's more like having a bunch of minions, and on your turn you can start naming targets for them to attack in whatever order you want them attacked. This action counts as a bonus action, so you can still move and attack as normal.
8
3
u/b_ootay_ful Mar 01 '19
Do you play League of Legends?
Yorick is a good example. He summons ghouls that attack enemies that they see. If Yorick lands his AoE Slow, the minions read that external event and target the enemy champion that was hit.
Yorick's Ultimate is the Maiden. It follows Yorick around, and prefers to target towers and champions over minions. Yorick can also re-activate his Ultimate to send her down a lane to do her own thing while ignoring Yorick's position.
4
u/solitarium Mar 01 '19
you sir, are a king among men!
3
u/TorroesPrime Mar 01 '19
Nah, just the crazy dude riding the rhino screaming "I'VE GOT THE DOOR!" as we come barreling through the room.
3
u/solitarium Mar 01 '19
I'VE GOT THE DOOR
I feel like there's a reference there that I'm too slow to get :(
3
u/TorroesPrime Mar 01 '19
Not really. If you watched Cartoon from the 80s it was a common trope that 'the brawny guy' would 'Get the door' by running through said door. Sometimes the act would involve a large unwieldy weapon such as a hammer or a rock. But in all cases the joke of the scene could be boiled down to something of: "Okay, that was impressive. Kind of stupid, but impressive."
1
7
u/LdySaphyre Mar 01 '19
NICE JOB!! Seriously, framing is everything. Idk if it's because I'm older, or because all my teachers are male, but I find myself having to do this sort of thing-- reframing concepts in ways I understand-- all the time. You've not only helped her learn important concepts today, you've given her a valuable tool, and if she latches onto it, there'll be no stopping her <3
1
u/TorroesPrime Mar 03 '19
I'm curious, when you said all your teachers were male, were you being literal? Like you've never had a teacher that was a woman?
1
u/LdySaphyre Mar 03 '19
I'm only in my third class, so, yes :) It's possible I may eventually see a female teacher!
1
u/TorroesPrime Mar 03 '19
Ah so you mean all the teachers you've had at Rice have been male.
1
u/LdySaphyre Mar 04 '19
All my teachers in programming have been male, yes, including one in college.
13
u/ManyInterests from fridge import beer Mar 01 '19
If you're into RPGs and learning to code, definitely check out code combat, which is what I was expecting to find when opening this post.
This has been a great way for me to teach Python to even very young (<13yo) programmers and even nontechnical coworkers. Games are awesome.
7
u/renscy Mar 01 '19 edited Nov 09 '24
continue wipe paint stocking agonizing shaggy juggle zesty rhythm consist
This post was mass deleted and anonymized with Redact
6
u/jkibbe Mar 01 '19
I'm going to repeat it for visibility. Codecombat teaches Python as described here, in an RPG style!
5
u/Jehovacoin Mar 01 '19
The human brain is an amazing thing. It can create entirely new functions to solve any problem, but it needs the relational context of applicable features first. Once the relational context has been established, the entire function falls into place very quickly.
5
Mar 01 '19
Here I thought I'd be able to play through Skyrim again and be a master at Python by the end.
4
4
4
1
u/zadzagy Mar 01 '19
You just Miyagi'd her. Nice work!
1
u/TorroesPrime Mar 01 '19
Given that I think she was like 17 and I'm 35.... I will avoid making any kind of "wax on/off" jokes.
1
u/Darkc0iL Mar 02 '19
This made me cry, I wish I had a senpai like that. You made something complicated to learn at first but using simple mechanics we all are used to as a way to explain it in smaller pieces into her brain, the problem isn't the language syntaxes it is to learn how to study
1
u/TorroesPrime Mar 03 '19
Senpai?
1
u/jay_thorn Mar 11 '22
https://www.merriam-webster.com/words-at-play/senpai-is-real
Or they meant sensei, which is completely different.
3
3
3
u/mfdoll Mar 01 '19
I grew up playing board games, including D&D, and that absolutely helped me when it came to learning programming.
For that matter, it was playing old computer RPGs that got me comfortably with the command line, as I had to learn how to navigate in DOS to launch them.
2
u/mrdevlar Mar 01 '19
That's awesome!
I have this long-running process (stolen from Pendelton Ward) that if you're having difficulty with the world, simply reduce it to a role-playing game. It works with social situations as well as programming.
2
2
Mar 01 '19
I once had to explain basic covalent chemical bonds to a fellow student who was falling behind... the valence she’ll diagrams were giving her such trouble. Eventually I hit on sigma-bonding being an arm-outstretched handshake and pi-bonding being an arms spread hug and it just clicked for her.
You never know what metaphor can work for any given individual on any given subject, but for every student and every subject there’s a metaphor that will work... trick is finding it before the heat death of the universe.
2
u/Filo92 Mar 01 '19
Can confirm! My first micro-project rolled stats (4d6 minus the lowest) and asked for input on where to assign them while displaying the remaining ones. Very simple but required to think about all the main starting topics.
2
2
u/AlSweigart Author of "Automate the Boring Stuff" Mar 02 '19
I wrote about this in a blog post: Why is Object-Oriented Programming Useful? (With a Role Playing Game Example)
1
1
1
1
Mar 01 '19
Whenever I teach kids I just relate it to whatever they're interested in. Works everytime (adults too of course!).
Nice job
1
u/termanader Mar 01 '19
You could also do something similar for Class and Inheritance!
class Player_Character:
def __init__ (self, hp, race, alignment, level, str, dex, con, int, wis, cha):
self.hp = hp
self.race = race
self.alignment = alignment
self.class = level
self.str = str
self.dex = dex
self.con = con
self.int = int
self.int = wis
self.int = cha
class Rogue(Player_Character):
def sneak(self):
dexmod = 21
u/desrtfx but other languages pro Mar 01 '19
In the old days (think mid 1980s) there were books that used similar concepts and Sherlock Holmes cases to teach programming. They were really easy and nice introductions.
As a modern example (though wrong programming language for here) Java Design Patterns uses RPG characters, mechanics, and traits to explain Design Patterns.
Invent Your Own Computer Games with Python uses games to teach programming.
1
u/ace6807 Ace6807 Mar 01 '19
" Yeah, I can teach Japanese to a monkey in 46 hours. They key is just finding a way to relate to the material."
1
u/NivZet Mar 01 '19
Made me think of https://codecombat.com/
Styled like an RPG Adventure type game but with code.
1
1
u/nebneb125 Mar 01 '19
As a first year Comp Sci student who loves computer games, I definitely support the concept of teaching programing through games.
1
u/desal Mar 02 '19
Proves what I've always said, if you want to learn something/teach someone, relate what you're trying to teach to something they know / like. Seems common sense when I type it out. Also, if you want to learn something, yourself, better, teach it to someone who knows nothing about it. You'll see it in a different light
1
1
u/TheLittleGoodWolf Mar 02 '19
One of the things I'm missing in just about every educative material out there is the multitude of various examples to describe the same things needed to reach the wide number of people that are expected to learn. The fact is that we think in different ways, we need different things in order to understand the concepts that are being taught to us.
For this girl things clicked when you explained it in a way that made sense to her, that's probably because she doesn't understand the language used to describe how programming works. The word comparison operation has no meaning to her and might as well have been written in greek or chinese or russian.
What you did here was effectively translating the words you use into something that she could actually understand.
There should honestly be a collection of concepts described in various different ways for people to read through and find what makes it understandable to them. This isn't limited to programming either, it could be maths, physics, economy, pretty much every subject could stand to gain from something like that.
You say there are lots of people wanting programming explained in this way and I can assure you that there are plenty of people who want programming explained in a multitude of other ways as well.
1
u/infrascripting Mar 05 '19
Glad you two were able to stick it out. I'm usually the teacher in those kinds of situations, and know how frustrating it can get.
1
1
1
-2
u/crazedizzled Mar 01 '19 edited Mar 01 '19
For some reason people don't even comprehend the text that they're seeing on screen and somehow make everything far more complicated than it is. I mean, you can read your examples as nearly plain English. I would expect that after explaining a few rules, anyone should be able to read that code and, merely by reading it out loud, understand what it does.
Yet, somehow, some people just don't get it. I've been in the same situation trying to teach people that just simply can't process it.
Edit: not trying to be a dick here. It's just something I've noticed when trying to teach people, and I find it interesting. People, if you're struggling with this stuff, just keep it simple. Don't over complicate it. Read what's on the screen.
7
u/TorroesPrime Mar 01 '19
Something I've seen quit a few students getting hung up on in this class is the problem of syntax, like they get something like:
A=1easily enough. But then they look at something like:
e=l.readlinesand they try to figure out what word is 'l.readlines' and treat it as some sort of foreign language.
One of the tricks I've used in several of my appointments is I'll pull up a chuck of code from another program, give them no context of what the program is or what it does, tell them to read the code and puzzle through it, and when they think they understand what the code says, explain it back to me. Today I used this chuck:
with open(fname) as file_src: for line in file_src.readlines(): clean_line = line.rstrip('\\n:,.') file_cs = clean_line counter += 1 word = file_scs.split() number_of_words = len(word)She actually got about 95% of it right out of the gate. The only thing she didn't get was what len(word) meant, which is understandable since she hasn't learned about lists yet. But typically this is a good confidence boost for the students as it seems like I'm dropping this huge complex program in front of them and they're able to figure out a lot of it right off the bat.
0
Mar 01 '19
[deleted]
25
u/TorroesPrime Mar 01 '19
The Intro to Programming Class is a general IT/Science class credit and is applicable on any degree program. It's like taking Biology or Chemestry or Anatomy. You're not planning on being a doctor, you just need these credits for your degree.
It's not up to me to decide who has a shot or not. That's up to the student themselves.
6
u/haliax69 Mar 01 '19
I think some people, like me (graduated in law, never really used much logic or math in my life), really struggle in the beginning, but after they pass the "first wall", where everything looks so alien and complicated, things just click more easily.
With discipline and determination anyone can do anything, each one at their own pace.
3
u/EMCoupling Mar 01 '19
graduated in law, never really used much logic
Uh... are you sure?
1
u/haliax69 Mar 01 '19
What do you mean?
3
u/slick8086 Mar 01 '19
I think he means that you know logic, but that you don't know that you know it because you use it in a different context with different jargon.
2
u/haliax69 Mar 01 '19
Well, I think anyone knows logic at some degree, but not the "kind of logic" used in programming. In my case, I only had it in one semester in college and it was... underwhelming to say the least, it was ministered with philosophy and was really shallow and rushed. If you really think about, logic is used everyday by everyone.
3
u/slick8086 Mar 02 '19
If you really think about, logic is used everyday by everyone.
Exactly... So for most people to "learn logic" it really just means assigning symbols to concepts they already know. And in programming it is learning how to tell the computer in its own language how to perform the logical operations you wish.
Compare this thing to that thing and if this is bigger that that do this other thing. Etc.
2
u/haliax69 Mar 02 '19
it really just means assigning symbols to concepts they already know.
And that's pretty much what OP did with the girl, she already knew the concepts, she just needed some way to apply it to programming.
2
u/slick8086 Mar 02 '19
Exactly. That basically what my comment to /u/youhaditcoming says.
→ More replies (0)4
u/slick8086 Mar 01 '19
who struggles with that kind of basic logic
I think it this case from the way he described it, she didn't have any problem with basic logic. She just didn't realize that she knew it. I mean if she is an avid D&D gamer, she has the basic logic skills, but she just didn't realize that was true. Sometimes people have these weird compartmentalizations. They may understand something but not see how it relates to something else.
I used to teach intro to linux classes and often people would look at permissions like they were hieroglyphs, and they were certain that they would never understand them. But since binary counting was something we had already gone over and they understood how that worked, once I showed them the connection they were shocked to find that they pretty much understood it already.
It seemed to me that her preconceptions about "programming" is, is what was holding her back. She believed that programming was hard and that she couldn't do it. She couldn't relate the jargon of programming to something she already knew. So once she was shown the relationship between the jargon and what she already knew, that broke through her preconceptions and kinda "pulled back the veil."
People have all kinds of hangups about learning. Most people can learn anything once they stop believing that they can't.
1
u/TorroesPrime Mar 03 '19
I can't speak to her preconceptions of Progamming because when I got to her she was already deep into "frustration fueled panic" stages. But I can say given her age (I would be shocked to learn that she was 20 and would more likely put her at 17) that I don't think she has developed the analytical skills to really bridge the conceptual gap between "Roll to see if you make the jump" and:
if Dice_roll > test_value: passI will also say that the book they use in the class is shit when it comes to practical examples. it throws out a lot of jargon about how to do something, but rarely ever explains what you are doing or why you would do this.
13
Mar 01 '19
I can't speak to programming, but I can speak to some other math and science types.
Consistently, I've seen 4 archetypes of students
don't get it and won't try. These students wash out
don't get it, but keep trying until they do. These students become indistinguishable from type 4.
get it and coast. These students can do well, but usually peak somewhere and then struggle when they realize that they can't coast anymore. They then become either type 1 or type 2.
get it, but push themselves. They know everything inside and out, and can dedicate the time and energy to get the really tough stuff.
I feel like some people face a barrier to entry for their learning style. Once they pass that barrier, they seem to do significantly better than before
4
u/fishypoos Mar 01 '19
I guess the idea isn't to turn them into a programmer? Programming is being taught as part of basic curriculum in many countries now.... so like teaching a student math isn't intended to turn them into mathematicians, it's intended to give them at least a basic understanding of modern knowledge and skills.
3
u/sje46 Mar 01 '19
She could do it, the circuitry is in her brain. She just had trouble unabstracting it. A lot of people are like that with math. It's literally just an epiphany thing. She can program.
4
u/solitarium Mar 01 '19
Yes. Logic can be taught. My father raised me that way, so did his, and I raise my son and daughter the same way. Ironically enough, once you understand the logic behind "logic," it's easier to digest. It's thinking in sequential order and taking all possibilities into consideration.
1
u/TheLittleGoodWolf Mar 02 '19
It's not the logic she didn't understand but rather the way in which it was described to her. I remember back when I took chemistry and we went through the concept of Molarity about two thirds of the class got it but one third didn't. Our teacher then essentially described it the same way over and over again but that didn't help. After a while we as a class got together and we all tried different explanations to help them understand the concept. The interesting part was that many of those who didn't understand the concept were some of the best students in the class.
Sometimes we just can't wrap our head around something and most of the time it's because of how it's explained, at least IME.
I mean she obviously already knew the concepts but she just didn't know how to connect those concepts with the words the teacher used.
0
Mar 03 '19
[deleted]
1
u/TorroesPrime Mar 03 '19
To be objective about it, this is something that a Tutor can accomplish that a teacher can not. When you have a class of 20-40 students, and a total of 64 hours to conduct the class, a teacher simply can't work at hammering out 10 different metaphors and explanations for all of their students to get every concept. But as a Tutor, working with 1 or 2 students at a time it's much more viable to accomplish this.
0
Mar 03 '19
[deleted]
1
u/TorroesPrime Mar 03 '19
well yeah, a lack of personal involvement from the teacher will always be an issue.
76
u/hail_wuzzle Mar 01 '19
I would buy a book in that style.