7 ms·
(Disclosure: I do corporate training (Python and Data Science) for a living.) I generally don't teach coding to newbies, so a lot of the coding I teach is corr
by __mharrison__ 5y ago
(Disclosure: I do corporate training (Python and Data Science) for a living.)
I generally don't teach coding to newbies, so a lot of the coding I teach is correcting poor mental models and teaching features (somewhat) unique (or different) in Python.
My best Pandas courses have been when the client opts to use their data for the course (instead of my canned data). The students are already subject matter experts with the data and when they learn some of the tricks to slice and dice, summarize, and visualize, they are off to the races. They dig right in.
Teaching as the article suggests is very difficult because examples that appeal to some or boring or confusing to others. I'm not saying it won't work, but there are cons as well. When I'm teaching with my "canned data", I try to mix in a few different datasets from different areas so students can see that the ideas are generally adaptable.
- lawl 5y agoI always thought the best way to learn programming is to find a program you want to create, and then figure out how to make that happen. This is still how i learn (most effectively) today. If i want to learn a new language or something, i write something that i always wanted to write in it anyways. That way it doesn't get boring. I think what you're describing might be similar in that canned-data is not interesting.
- erwincoumans 5y agoYes, learning is much easier if you have motivation. How do you motivate kids, if they rather play games rather than coding (and they even ignore in-game scripted coding such ad Minecraft or Roblox coding)?
- wobbly_bush 5y ago> How do you motivate kids, if they rather play games rather than coding (and they even ignore in-game scripted coding such ad Minecraft or Roblox coding)? Do such kids need to start with regular programming languages? Wouldn't visual languages be a simpler starting point for them to get motivated?
- xmprt 5y agoTry a game like Factorio or Satisfactory. Even just Minecraft can be good enough to train their problem solving and critical thinking skills. They don't need to start with redstone to learn to code. They should play the game and naturally realize that redstone is a way to solve their problem (like making an automatic sliding 2x2 door) and then solve it. I feel like those skills will take you much further in life because now you have an extra tool to solve problem no matter what field you end up going into. And since programming is so powerful, it's often one of the best tools for the job so kids will naturally pick it up.
- MonaroVXR 5y agoNot sure if Factorio would work, because I played it and it didn't work for me. But.... I can finally program.
- tialaramex 5y agoThe trouble I had in Factorio is that it's deliberately not giving you very powerful tools in order to be a better game. The authors do not want you to skip their fun game by solving a tricky optimisation problem yourself instead.
- meristohm 5y agoMy feeling, from ~eight years as a mostly-highschool math and science teacher plus parenting as my main work these last few years, is that this motivation to learn is best established very early on, hence my support for universal birth-to-three support (I’m in the USA) in the interest of minimizing adverse childhood experiences (ACEs/trauma) and teaching parents how to cultivate a growth mindset. Intrinsic motivation is powerful. I was not a beneficiary of such care, and have done a lot of re-learning, especially around what I’m feeling, and being okay with not doing “perfect”.
- protomyth 5y agoOne of the other places birth-to-three programs pay for themselves is to catch physical (e.g. hearing) problems early. That allow for correction and minimizes the affects in learning, reducing cost in later schooling.
- majormajor 5y agoHeck, I'm employed to write code and I'd still rather play games. Just I get paid for the code, and not for playing the games. But you will do better teaching-wise if you do find something that has intrinsic motivation, not turning it into a chore. It just might not be the right time! They've basically got until they are 18-20ish to decide to get into it. The programming books my parents gave me after 8th grade never interested me. The 11th grade programming class didn't either. The junior year of college tangentially-related course where I was like "oh I could write a program to help with this homework!" That did the trick for me. So just keep trying, see if you can find programming-related aspects of other hobbies. And just try to focus on them learning things around those hobbies or obsessions, even if it doesn't seem to have a practical application. Get in the habit of going deep on subjects and practicing learning.
- chmod600 5y agoBut you need some concept of what kinds of problems are solvable with a computer before you could really be inspired to program one. And more than that, you need to have a concept of the difficulty of a given problem for a beginner or expert. Obviously a beginner will be wildly off, but probably needs some concept of the level of difficulty. For example, lots of people have motivation to write a game. But few have the level of obsession to follow through with it. Maybe they should do a basic iPhone convenience app or something first instead.
- paulryanrogers 5y agoIt's a matter of scope and expectations. Leave your epic space opera in your dreams and take baby steps using easier tools and concepts. Once you find some fun try product-izing it.
- WalterBright 5y ago> you need to have a concept of the difficulty of a given problem for a beginner or expert I thought writing a C++ compiler would be just some new keywords and member functions, and would take 3 months. 10 years later...
- Bjartr 5y ago> But few have the level of obsession to follow through with it. If the goal is to release a complete product, then you're right that that's a problem. However, if the goal is learning, half a game is a great way to learn about a variety of systems and how to program for them!
- Cupertino95014 5y agoThis is true. You do have to watch for the "adult piano beginner" syndrome, though. I'll explain: many piano teachers won't take adult beginners, purely because they have unrealistic ideas of how good they're going to be. They want to play a Chopin Etude or the Goldberg Variations or a Brahms Intermezzo, and don't want to spend time struggling with Clementi. Well, sorry. You won't be that good for a long, long time, if ever. It could be that some beginning programmers also have wild ideas of doing a game as good as GTA, all by themselves.
- jimz 5y agoI find the comparison really odd as someone in the opposite position - I had formal classical piano training from 8 years old until I gave it up during college, and later learned how to code entirely through copying other people's code and Stackoverflow in my mid 20s. Piano to me feels much more like a sport, in that there's a very visceral, physical aspect to playing, and in turn a ton of effort goes into optimizing everything from where your fingers should be placed to how hard or soft one is striking a key. Practicing is effectively comparable to training for some sort of non-team sport much more than anything else. I don't have perfect pitch, but learning how to read music is a very small part of the whole experience, and I would think that as an adult someone learning piano will find the physical aspect, particularly the finer motor elements, to be the primary hinderance to being really great. Writing code is entirely different in that it feels much more like learning a subject matter, and there's neither something akin to the apotheosis of the particular thing you're working on that you aim to emulate, nor hard boundaries as to determine your proficiency through performance. It's cool if your code doesn't work when you test it, you can fix that. It just feels like apples and oranges in the experience. If you're picking up basketball at age 30, I hope you know that you're never going to be anywhere nearly as good as Curry, or Lebron. But you can definitely pick up a subject matter and become an expert later in life. Heinrich Schliemann essentially began his archeological career at age 36 and yes, basically excavated Troy in the worst way possible, but managed to actually excavate Troy. That's the difference between an adult piano learner and an adult code learner, I think.
- oriolid 5y ago
- muzani 5y agoI used to teach from the "program you want to create" angle, because that's how I learned programming. (JS/MEAN bootcamp) The problem was that about 95% of my students didn't have a program they wanted to create. Some just wanted a hobby. Some wanted a better job. Some wanted to do a startup and manage a team, but they didn't really know what kind of startup to do. One guy joined because he made discord bots and thought node.js was cool, but learning loops started to get boring for him.
- __mharrison__ 5y agoI have pretty strong opinions on the "best way" to learn as well. My posts discusses the pros/cons of do it yourself projects. https://www.metasnake.com/blog/learn-python-2021.html https://www.metasnake.com/blog/learn-python-2021.html
- asleepawake 5y agoHaving a good mental model of a language seems like one of the fastest ways to be more productive in that language. Do you have any recommended resources for developing a strong mental model of python? For reference, Dan Abramov’s course JustJavascript [1] provides an amazing mental model of JavaScript, and Josh Comeau’s css for js developers [2] course provides an amazing model for understanding css. I have 5+ years programming in python but admittedly do not know much about the internals so my mental model is pretty weak! [1]: https://justjavascript.com/ https://justjavascript.com/ [2]: https://css-for-js.dev/ https://css-for-js.dev/
- hexane360 5y agoOne way I've found is to dig into C/C++ extensions to Python. The Python C API reference is very helpful: https://docs.python.org/3/c-api/index.html https://docs.python.org/3/c-api/index.html It can be quite fun to implement a simple data structure (tree, queue, etc.). in C and bind it to Python. Otherwise, you can get a lot of dirty details by reading the source to complicated/magical libraries (e.g. pickle).
- mynameismon 5y agoI can confirm this works. I was struggling to find why does a = [1, 2, 3] a = b b = b + [1] return a different value as compared to b += [1] Looking into the source code, everything became clear. The + operator returns a pointer to a new list np containing all the elements from a and b, while += merely appends and returns a pointer to the original list
- touchngthevodka 5y agoHave you tried Fluent Python? It really helped to level up my knowledge of the language.
- istjohn 5y agoThere is a truly excellent series of lectures on YouTube from a college course on the Python interpreter internals. But I can't for the life of me find it. One resource I can recommend though is pythontutor.com. It's a tool that will step through your code snippet and show how the code maps onto the internal representation.
- raincom 5y agoAny teaching, training, has to hook with the experience of students. Otherwise, it will lead to cramming, etc; that's what we see in grade-driven teaching. You are doing a great service by using the client data to solve "mini-problems" of your students.
- WalterBright 5y ago> grade-driven teaching I've never understood the modern theory that one can master a subject yet not be able to answer questions about it.
- majormajor 5y agoI think you've got that backward. I think parent poster is complaining about teaching methods where the belief is that "answering questions" -> "mastery." "Grade-driven teaching" here refers more to the "all we're gonna do is give you homework and a test." It's like industrialization of teaching - no mentoring or individual conversation, just tests and reading material. When you've got 1 teacher and 20-40 kids, it's about all you can do. Lots of passing of tests from short-term memorization that's then promptly forgotten.
- WalterBright 5y agoI've forgotten the material from many courses I've taken. But I've also discovered that the knowledge quickly returns if I retake a course on the same material, far quicker than it took the first time. The knowledge is still there, it just needs some WD-40 to break it loose again. And yes, doing column buckling problem sets in college enabled me to size the jackscrew for the 757, as it was a column buckling problem.
- majormajor 5y agoI don't know anything about column buckling, but if you'd cranked out a bunch of column buckling problem sets and not paid any attention to when/where it would be applicable, would it still have helped you later? If you had forgotten the exact technique, would you have been able to check a reference book anyway? Do you think memorizing names and dates of people and events from World War I gives much mastery of history? Or would memorizing the names of standard library functions and the academic definition of `pointer` and `recursion` give you much mastery of C? (The flip side of this is folks I've worked with who will immediately say "this is the Command Pattern" or such and jump to writing a bunch of code that either is massive overkill and/or just breaks down when the real world introduces some edge cases.)