#pedagogy
1 messages Β· Page 2 of 1
Just as you wouldn't activate Co-Pilot for somebody new to coding, you would let them explore their code without pop-ups, who have little to do with their early progression stages.
It just confuses.
i think intellisense will probably overboard a brand new beginner, but a beginner that has done perhaps a project or two would probably benefit, once they have their bearings a bit in the language
@crimson nymph @south shore @restive prawn this channel isn't for programming questions. see #βο½how-to-get-help
The ongoing topic is if code completion tools are good or bad for beginners.
a simple code completer, that just adds an additional parenthesis, quotation mark, etc. whenever you type an opening one, and shows a list of all the attributes of an object when you type ., wouldn't be that bad for someone whos fairly familiar with the general syntax of the languages, and the built-in types and stuff
i will say though, that maybe stuff like VSCode/PyCharm's auto-importing autocomplete stuff might be a little too much, since that can sometimes lead to someone importing some function from the wrong module, which is something i definitely find happening sometimes
also, as a little tangent, i'm not a fan of how pycharm defaults to giving tons of style-related warnings, which can be mistaken by some new programmers for actual error messages. sure, learning good style conventions, and how to follow PEP8 can be good, but its not important when the focus is on learning the language first and foremost
pycharm aims to be usable for actual development work out of the box, so that's not really their fault
Programming teacher here β doing C teaching professionally though I lean (euphemism) towards C++, which I have decades of experience with. Is it recommended for a teacher, who's starting to give courses to (poly-tech') engineering students, to start Python with the internals, e.g. the id function, the internal structures of objects, how memory is allocated/used, rather than plunging into simple examples and learning how to write good code first, for example watching Raymond Hettinger's tutorials (which have been enlightening to me, to say the least, when I started)?
You'd guess my opinion is made but I'm open to criticism and would gladly revisit my ideas.
these are non-software engineers?
exactly
They learnt a bit of C, a bit of Java, C# as well.
They took courses in construction, materials, electronics...
that's not even how broad the matters are in about 5 years.
personally I would stay away from python internals completely
python can be a very powerful tool for engineers, but it's designed to smooth over the rough edges for you
especially things like memory allocation
That's what I thought π
I wanted to know if it was just me, if I was off.
Turns out I'm not, apparently π
if they have a small amount of experience in other languages, you might want to show them this talk so they dont trip over how references in python work
https://www.youtube.com/watch?v=_AEJHKGk9ns
"Speaker: Ned Batchelder
The behavior of names and values in Python can be confusing. Like many parts of Python, it has an underlying simplicity that can be hard to discern, especially if you are used to other programming languages. Here I'll explain how it all works, and present some facts and myths along the way. Call-by-reference? Call-by-v...
Fact is I'm not the teacher who's assigned the courses. It's one of my colleagues.
I'll bookmark that video for sure! Thanks for the link.
I always felt that learning about and implementing datastructures in C++ was going up, like... here are the basic tools and now I built something that's a cool combination of those tools. It felt empowering and cool. Going from Python and learning about things like deques or trying to create a linked list with a dictionary always felt like stepping down, like I have these awesome powerful data structures and I'm making a weaker one, felt like a canned exercise.
I probably wouldn't use Python to teach DSA, honestly.
I think Python is fine as long as you suspend a few elements of pythonic style (ie, there are a lot of situations where iterating over range len is the best option, or pre-allocating list elements and treating the length of the list as immutable), with the exception of hash tables.
and I think it can also work in reverse: implementing a linked list in Python with a pythonic API can teach you a lot about Python OOP/dunder methods
I suppose it would depend on the implementation being taught. Coming up with a linked list as a standalone class would probably educate someone more than someone like us who would just cheat and use a dictionary, lol
Or at least someone like me*
@narrow hare
You can look at it from the other side, and ask what the engineering faculty want from you.
Most likely this is to teach the students programming in order to turn experimental/simulated data into results for a thesis.
I find that understanding python internals are not necessary for this but a basic understanding of numpy and matplotlib is.
Ideally, you find some problem/equation the students are familiar with from a different course but which is difficult to approach analytically.
I started with the following topics when teaching senior material science students with little programming experience.
(I used the structure factor (https://en.wikipedia.org/wiki/Structure_factor) as an example for point 1-4.)
- Working with text files (reading tabulated constants)
- Organizing the data as it comes in (data types: list, dict, tuple)
- Turning an equation into code (functions and scope)
- Visualizing (matplotlib)
- Array slicing and multidimensional arrays (numpy)
For me the biggest challenge was teaching them how to break down a bigger problem into manageable parts they could solve on their own, but I think your experience as a teacher may help you here π
Also: I had great success playing the pep8 song in class
CC @keen nova
hahaha that's lovely @long narwhal
surprisingly not the first time I've heard of that happening, Kelly Paredes from Teaching Python said the same thing
Thanks a lot @long narwhal
hello how do I regex that only validate with this path
/home/example.sh
this channel is for discussion about how to teach computer science, but you can open your own help channel from #βο½how-to-get-help
Topic: is Python a good language for learning traditional data structures and algorithms?
i think.. probably not
the basic compound data structures would seem unmotivated, you'd have to learn about the constraints on accessing memory to see like, why we like hashmaps
and then pointers of course
@stone juniper I agree re hashmaps. what if we narrow the scope to only graph traversal algorithms?
i think that does actually work, since they aren't tied to the underlying computer architecture as much
like graphs already have to be abstracted
So, yes for algorithms that operate on abstract data types, and no for algorithms that operate on low-level abstractions for the computer architecture.
We did it, Scofflaw!
but now I need a new topic.
lol that's the problem with this channel, we're just too dang good at pedagogy
!otn a we're too good at pedagogy
:ok_hand: Added weβre-too-good-at-pedagogy to the names list.
No in my opinion. I prefer languages like C for that sort of thing.
are you caught up with Scoff's and my thoughts on the two classes of algorithms?
unless an algorithm's efficiency is predicated directly on how efficiently it can find things in memory, I think C is too low-level.
It's definitely low level and that makes sense, but for me it's more of the motivation. When you're at the level of C and learning about/working with new datastructures and algorithms, it's motivational and exciting, look at all these new awesome things you can do with the language. It's inherently motivating to learn
Once we go to Python, it feels like taking a step back. Why do I need to learn sorting algorithms when sort() exists? Why do I need to learn hashmaps and chaining when dictionaries exist? Etc. I have no inherent motivation to learn these things now and they're less likely to stick with me in my mind.
Sure, but those examples are still about data structures for abstracting memory management. A DSA course is also going to talk about graph traversal algorithms, greedy algorithms, and caching.
(and when I say "memory management" in this context, I don't just mean allocating and deallocating memory, but also organizing how memory is accessed in the code.)
Ahh, okay I see what you mean. Okay, I think I'm in agreement with you then. For learning the higher level/general concepts like greedy algorithms Python is fine.
consensus restored!
Imo the best language for learning an algorithm is the language the student is most confident in. I have been thought algorithms entirely in pseudocode, which worked well for a mixed class.
Do DSA courses have an unstated secondary purpose in university programs? Prepare for X, really learn to program, building a mental model of machine memory, things like that?
you're expected to know to program prior to a DSA course. that's not to say you won't pick up more detailed explanations of things, but there's no time spent on how to write the code, you're just given the assignment
to make sure that we're coming from the same place, what do you think is the primary purpose of those courses? to memorize the specifications of each algorithm?
imo as with most classes, the value comes from exercising your brain in a new way
when starting to learn DSA you need to learn the new constraints you're working with; your pseudocode can't say find x because that's begging the whole question
people do memorize sorting, graph search algorithms, etc, but imo that's borderline worthless
in pragmatic terms, the biggest use of a DSA class for most programmers (other than passing stupidly-organized interviews) is teaching them to avoid walking into combinatorial explosions
or at least recognizing when they do
Aren't you the one who said that you were a math major who was content to learn non-useful theory stuff?
yeah
but I agree that memorizing the algorithms isn't useful, and learning about the scalability of optimization problems is.
i once helped someone trying to optimize their fantasy football team, their approach was to generate every possible team and then take the best one
i did some envelope math and found that my computer wouldn't quite finish the calculation before the next season started
would it finish before the universe ends?
yeah it was only like a year and change
their question was "why doesnt my program end?"
that person could've benefitted from exposure to the basic principles of designing algorithms
when I took DSA, we had an assignment where the naive solution was O(n!), and the efficient solution was O(n^3). and for one of the test cases, n=30
and a few of us had inadvertently done the factorial solution, and found ourselves in that same boat.
also mine was both factorial and recursive, so I was probably headed towards not having memory.
just tail-call optimize it and then you can sail on to the end of the universe
we had to do it in java because fuck you. I don't think java has TCO.
When I say unstated secondary purpose, I mean not on the syllabus. So for example an organic chemistry course is actually a filter course for premed programs.
I think the primary purpose of a DSA course within an undergrad program is exposure to the idea of structured data beyond the primitives provided by the language. It's not totally obvious that you can do these abstract things.
the DSA course at my university was also regarded as a weed-out course, and this was realized with a rapid pace at which new algorithms were presented. It was also a prerequisite for all the concentration-specific courses.
But if those are the kinds of secondary purposes you have in mind, it's also largely about fulfilling accreditation requirements. DSA is such a strong tradition within computer science that I can't imagine an accreditation board ever removing it, even if the underlying learning goals of DSA (understanding time and memory scaling) can be taught in other ways.
Out of curiosity, what was the algo? Rare to see the most efficient algo be cubic
I think it was the rod cutting problem.
Ah okay
Looking at the DSA channel here, Python works really well for being close to pseudocode for abstract algorithm implementation. Such as converting from CLRS (except for the 1 indexing thing, in that regard Lua might be even better). The C programming language also just has an awful standard library that was made for a machine nobody uses anymore in a time when people were still figuring out this programming thing (much more than now). C requires one to go get an actual useful standard library (that someone else made or their own), one which has things such as dynamic arrays and hashmaps. After getting that, it's pretty similar to Python (except things are not hidden from the writer, such as references (pointers)).
(C++ provides these basics (dynamic arrays and hashmaps is basically all that is needed) which makes it much easier to get started with doing anything)
(I think at some point understanding how things like dynamic arrays work (why they need to do what they do (the idea that physical constraints and the way memory works (and artificial constraints) change the way algorithms need to work in the real world)) is important and would be done with something like C)
I see 3 main things you'd want to take away from a DSA course:
- Understanding the different complexity classes, how to recognise them and to catch that kind of blowup early.
- Getting an overview/understanding of the various kinds of data structures (arrays, linked lists, hashtables, trees, graphs, etc), what they're good/bad for, and the kind of classic algorithms have been built for them already.
- Understanding how core algorithms work on the inside (sorting, hashing, text searching) so you appreciate how expensive they would be, and how they can be optimised if you know certain things about the input.
In general I reckon it's about giving you an overview so you know when to reach for what data structures or algorithms, and when it'd be a bad idea to reach for a different one...
hey guys can i make a chatting app like discord or whatsapp just by using python and javascript
or do i need other languages
this channel is for discussion about how to teach computer science, but you can open your own help channel from #βο½how-to-get-help
can anyone help me to creak placement coding round please?
No need to cross-post and ask for unethical requests. That would also be the wrong channel
Current topic: the purpose of value of data structure and algorithm courses.
Hello Guys , anyone can help me out with commit history between Jenkins builds
Kindly remove your off-topic message and try again in #tools-and-devops
in terms of practical purpose, the most useful part is the exposure to different dsa imo. recognizing that you might be able to use a certain data structure for a task can make your job much much easier and faster. same for algos.
I think the purpose is twofold:
Knowing data structures and algorithms allow you to choose which ones are best suited for a given use case and interact with them effectively
Developing/modifying data structures/algorithms would be next to impossible without a deep knowledge of their internals
it's probably less useful in python than in something like C
i certainly appreciate having a baseline set of knowledge around those topics, even when I'm just writing scripts
is there some benefit to implementing Dijkstra's algorithm in C instead of Python?
no, i was thinking about things like sorting algorithms, hashing, trees, etc
and only by convention: higher level programming languages tend to have those things in the standard library already, so you don't need to implement them yourself. but if you are working in C, chances are you are doing something lower level, and you probably specific needs, and you probably need to implement your own thing to meet your specific needs
does anyone have a good article that talks about the "library" vs" application" distinction? doesn't have to be python-specific, but it would help if it was.
A lot of times that specific need is memory constraints and u can't go #include a bunch of external libraries
Like I had to write a json parser for a microcontroller
There's plenty of fast open source ones but we needed limited functionality and be as small as possible
We also knew our json schema and the parser was tailored to just that
That's my take. Right data structures right job, that's a good deal of programming
This is essentially my point as well. As a learner, it always felt cool learning a new thing and being able to use it to do things I couldn't previously do before. Building up if you will. In Python, implementing those sort of things are building down, I feel like I'm building shitty versions of things that already exist. I have no inherent motivation to remember it.
the flipside is algorithms like dijkstra's algorithm, which might well be something you do want to implement in python
Out of curiosity, why? I'm not highly familiar with the algorithm, but isn't a priority queue the base data structure used?
It's about finding the least expensive path between two nodes, so you're not really abstracting aspects of the computer itself. You can discuss the whole algorithm in purely mathematical terms.
Ah, gotcha
I suppose most of my stance then is on the foundational elements of things like greedy algorithms, linked lists, heaps, etc.
You think that greedy algorithms should also be taught in C? Because the point of greedy algorithms is understanding how the nature of the problem allows you to make certain assumptions. Ie that the locally optimal decision always leads to the globally optimal result.
Which I don't think benefits from being learned in C.
I suppose it would depend on the nature of the specific algorithm. Any algorithm that was part of the stdlib for instance I would easily prefer to be in C
So maybe not with the pure conceptual things like greedy algorithms, although I don't think there's any downside to teaching it in C
I think students would find having to implement graph traversal algorithms in C to be irritating, and that the irritable properties of writing in C would distract from understanding how the algorithm itself works and why it has the time complexity that it has
That's a fair point
I think that's one of the strong points of python as a first language
<@&831776746206265384> ads
I found this recent talk about a grade school curriculum insightful and engaging: https://youtu.be/fmF7HpU_-9k
When kids learn to program they often use either a visual language like Scratch, or a textual language like Python. While visual languages are great for the first steps, children and educators often want to move on to textual, but early on, a textual language and its error messages can be scary. Hedy aims bridge this gap with a programming langu...
thanks for sharing! what did you find interesting about it?
Full localization of the built commands , even with Arabic and Hebrew.
Also, a structured progression toward full Python over the course of one academic year
What topics are covered? Is it from no programming ability or does it assume past experience with other programming languages?
Bit off topic but I got a competitive itch recently, does anyone know if there is like a leetcode type website where you get ranked, sorta kinda like chess.com
Codewars or Advent of Code?
Ye I was looking at code wars, seems super interesting, I always thought it was one of those more like, casual prepare for interviews type beat, just w a community, that second one tho, never heard of it
dudes, ima need to bring a language for my school to consider teaching soon, we want to think about replacing C#, right now candidates are kotlin, go, Rust (im against it as it will be the first language introduction to computer science and I think having a borrow checker and a strict compiler to deal with might be a bit much to start with), we will also teach python as a second language and assembly 8086 for some god forsaken reason, anyone have another suggestion?
so far rust/c/c++ are out as they are too steep a learning curve I think
I agree with that, yeah. Rust isn't the best option for new programmers
we also want something compiled as they will learn python for their second lang (more for teaching networking, file stuff etc)
kinda pointless to teach ruby/lua/pearl and then also python
#why_cant_we_just_teach_befunge_smh
You did rule out C, but perhaps it would be alright? It's not as "heavy" of a language as C++ or Rust
Im not sure as admittedly I use rust for my low level needs
is it actually new programmer friendly or is it like c++ filled with bit shifting to print to screen?
I wouldnt say it's friendly, but it's a much smaller language. There isn't much to C, so you can go over what it does have fairly quickly. Because of that, though, you need to put more work and build more stuff up yourself
whose your audience? High schoolers? Or is this in uni
would it be a suitable asm 8086 replacement? or am I still cursed to teach it?
high school, never programed in their life
mostly good in math
if your going to be teaching asm, perhaps having some prerequisite knowledge of lower level details in a higher level language (C) would be worthwhile
asm is for the third year's "cyber" course
I am pushing to swap the asm 86 to asm 64 might change my angel to asm64/C
what I need right now tho is a good compiled starter lang
Ruby is pretty nice for beginners.
I know I mentioned this, but I'll elaborate here: I suggest a declarative, functional programming language, such as Haskell. You've already chosen Python, which will introduce students to imperative, object-oriented programming. These would provide something on the opposite end of the scale. This is beneficial for a couple reasons:
- It's an entirely different model of programming: you don't have familiar concepts like mutable state or loops. That's good to expose people to. Programming shouldn't all be pushed into a single way of solving problems, and teaching in a multi-paradigm approach can encourage using the best tool for the job.
- You mentioned that your students are pretty good at math. Many functional programming languages express computation in a way that resembles mathematical expressions.
On the other hand: it's entirely different. I know I mentioned this as a pro, but it could also be a con, too. It might get confusing to use two languages where the same problem is solved wholly differently.
I admittedly don't know much about Haskell and scalla however assuming they are compiled they might be a good idea
Haskell definitely has AOT compilation. I think Scala has support for LLVM too? I haven't used Scala, so not sure.
tbh I realy want to also add a small "lets solve this question in asm, c, c#, python, haskell, prolog, apl" thing to our school but we just don't have the time T_T
ill look into Haskell thanks for the suggestion π
If they are complete beginners I would not discount Scratch.
It eliminates a whole class of errors that beginners can run into and get blocked by.
@fallow terrace is Haskell statically typed? I think CS students should start with a statically typed language
we need an actual programing lang that has transferable skills
yes, it is. it has a remarkably expressive type system.
It is transferable.
ooh yeah, static typing is another big one
dependent types and algebraic effects in haskell when
One nice way to transition is to go to Python and use turtle.
omg a functional non statically typed lang sounds like so much fun to use
lisp?
oh yeah, would lisps be a reasonable option to start with?
there's elixir too
For LISP languages I would recommend Clojure to start.
((((((((((lisp)))))))))) ; lisp
(Except that never happens because LISP programmers format their code)
I actualy considered Clojure but I think that lists are not the best first concept to teach
They have to, or they'd go totally insane
colorized bracket pairs,,,,
Well yeah, as does C or any other language, single line is a mess.
tell that to the people in #esoteric-python
it took 40 years but rust finally got it right
(defn -main ; name
[& args] ; (variable) parameters
(println "Hello, World!")) ; body
``` Typically it looks like this, and at most like 4 )))) at the end.
There is a huge stigma and many misconceptions around LISP languages.
lisps are good
so far im still looking at kotlin and go as the front runners with Haskell still needing a bit more research thenks π
Garbage collected, compiled, statically typed?
yea
How about Nim?
while I do know that nim is good, I need a more popular/older language so that if my students want to continue learning they will have an overabundance of options
for example I can't tell them to practice in codewars or leetcode in nim
as im preety sure it's unsupported
They could compile and copy paste the output C code into those websites though.
id like to avoid that step if possible
Do they not have Nim? I don't think it's that obscure.
isn't Nim fairly python-like?
Yeah it's based on Pascal and Python.
yea, I describe it as the midpoint of python and pascal
i'd avoid teaching a language too python-like, personally. it seems like you're already trying to teach a wide variety of things (given 8086 asm), so it seems almost redundant.
what's "too python-like" is up to you
also true
For absolute beginners I would stick to just 1 thing though. Most of them will probably get hung up on just the compiler's errors and syntax for a while.
we teach c# for the first year then we teach python and actual use second year
Feels like the opposite way around I would do it.
Hedy was linked to in a video just prior in this chat. It helps with getting over those compiler errors and syntax issues mentioned.
third year is specialized so, either js html and design for the frontend thing, backand is about networking sql and a few frameworks (usualy flask), and the "cyber" (white hat hacking but fancy sounding) is asm, sql and some other fun stuff
I would have at least 1 more year of non-specialized.
It's worth going slow in the beginning.
head teacher is controlling that, im under one of the teacher's under him
and the major is ranked as the best programing course in the country for a few years already so whatever he is doing is working
There will be some students that are really into it though too, and those can probably skip 2 years.
I don't mean to step on toes here, but correlation does not imply causation. Now I will hide.
correlation does not imply causation, and yet id much rather not walk off of my roof, as everyone else who did broke a leg
squiggles point is valid though. it clearly could be a variety of factors, such as how good a teacher he is
the head teacher is only teaching about a 15th of the lessons, we are about 10 teachers
Potzko's point is very valid too, it's about not breaking what appears to be working. That is up to the person to decide. I'm a risk taker, so i'm biased in that way (I try to wiggle out of local maximums).
out of curiosity, why are you replacing c#?
Hello everyone. I'm going to teach Python to a group of total beginners. I don't intend to prepare them for any exam or certification, just make them able to start coding. My audience will be a few adults (1-5) of any age that don't have any previous programming experience. Could you suggest me anything that i could use as a reference? I don't have problem on explaining any specific topic but i want to have some guide/reference like a book. I think of using the "A byte of Python" from here: https://python.swaroopch.com/ which is concise which gives me "space" to teach on my own way and also covers everything important. But do you have any other ideas?
!resources we do have a list of a bunch of resources, automate the boring stuff is good, what you linked is also good
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
we don't like how all the tutorials online are based on oop and how much boilerplate is generated when writing "basic C#" without all of the modern more complex tricks like iterators, foreach, etc
Kotlin is nice for functional programming ideas and the syntax is lighter in my experience. I write a lot of Go but I can't recommend it, it's too bitchy for a first language
Elixir/Erlang is another good option here. But maybe if you work in a top tier university Haskell would be fine
Just finished the meeting and kotlin won
I'm teaching at a high school
Ohhhhh, I did not get that, Kotlin is a great choice then, especially for how well it works with Android development. Cool, then yeah anything niche and functional probably wouldn't be the best choice, also I do think that smart and interested programmers arrive at advanced things without being prodded into them
it's just my luck out of 6 languages out of which I know 5 the only one I didn't know won T_T
Lol, don't worry, Kotlin is very approachable from most OOP languages and decently so from functional ones as well
I'm not sure if kotlin is beginner friendly enough, the syntax and some of the concepts can be confusing at times. I view it as a sort of "Java with hindsight" aimed at people who are already familiar with programming and see java's flaws, so they know what problems different features are supposed to solve
I haven't looked at tons of kotlin code, but at a glance, it looks to me like Java without forced OOP. I imagine that beginners could learn a lot from dealing with a subset of the language's features.
check out elixir
its really good
whoops nvm
i just read above discussion
@torpid prawn Have you read the mathematicians lament?
cant say i have
By Paul Lockhart. 25 pages explaining the faults of our education systems perspective on teaching math
Super inspirational, at least for my life
interesting
at least the wiki article seems so https://en.wikipedia.org/wiki/A_Mathematician's_Lament

oh nice. ill see if i can find some time for it this week
do you think this approach would solve the overall issue though? i think maybe this + more technology foundation could help?
It points out the problems. Hard to provide solutions without going completely unorthodox. We just don't have the data to try out the new things, and it's unreasonable to expect such a radical change from teacher union.
More technology foundation will definitely help, just a matter of giving that opportunity to kids everywhere 
ooo i like this technology foundation idea. can you elaborate on that?
The book attempts to allude how math is an art. But how can you teach art is a whole question in itself
You can give the tools, but not everyone is going to be an amazing artist.
oh wait you were just replying back to my message lmao. i thought you meant something else lol
true

maybe it needs to be some extracurricular program since i feel like teachers just dont have capacity / resources / training
So our current system kinda gives everyone a shitty alternative, which the worst mathematically creative student will still be able to gain something from learning math in our school system. The question comes with how hard we cap the ability for mathematical growth in kids
theyre also vastly underpaid
So hard to make changes haha.
yeah and great math teachers could probably go elsewhere and get better paying jobs
Yep... 
like i had a great calc teacher
I had a great dad. 
and he had a masters and everything but like i knew he was super underpaid
nice! thats awesome to hear
Spent hours and hours up at night to formulate teaching me calculus at a young age.
Really all the credit goes to him.
did he also introduce you to programming or just logical thinking and you picked up programming on your own?

I picked up programming out of my own interest.
nice! i think some credit also goes to you then since thats not easy even with some background in logical thinking
It also hints towards https://en.wikipedia.org/wiki/Constructionism_(learning_theory) (as seen in the example of how to teach euclidean geometry the right way (euclidean geometry is essential IMO (directly following Euclid's Elements), and it having been removed from multiple school systems (but especially from the US school system (starting in the 70s)), has caused multiple generations to have missed out on essential mathematical development))
Constructionist learning is the creation by learners of mental models to understand the world around them. Constructionism advocates student-centered, discovery learning where students use what they already know, to acquire more knowledge. Students learn through participation in project-based learning where they make connections between differ...
"Constructionism advocates student-centered, discovery learning where students use what they already know, to acquire more knowledge." is a pretty good "essence of".
And "Students learn through participation in project-based learning where they make connections between different ideas and areas of knowledge facilitated by the teacher through coaching rather than using lectures or step-by-step guidance."
Euclidean geometry happens to be all about construction (all the way from basic rules (it's how all the proofs go, they start from what they already know at that point and then build visually, intuitively)), it fits it.
Ok I need to go to a PC and type shit 
This sentence is good.
This sentence has problems. There's many people who do CS in high school that aren't able to get the "art" behind programming and classes are generally fueled with doing projects with current knowledge (you'll see many people in help channels unable to grasp the art that are doing CS everyday.)
When I was referencing earlier how we'd have to go through unorthodox methods to cultivate maximum output (not in programming in particular) I was thinking of Sudbury schools. The issue is being told the correct way to do things. The issue is not having room to make errors.
My teacher had me keep a notebook with my own proofs in it and I would then use those to construct more proofs. By the end I had my own little Euclid's Elements.
So I happen to have had a very good teacher.
If we looked at our education system as reward/punishment system (like RL
) we're rewarding getting good grades, and punishing bad grades. Therefore, actions like doing extra studying on things that won't be on the test, will be punished as that will not provide you a better grade.
You can almost argue that our current education kills our students' curiosity to figure things out themselves, because curiosity is punished.
Then you look at the average person in America. They don't have curiosity of the world around them, there's generally no drive to know more about the world they live in. Whether that's physics, mathematics, economics, history, people will only learn what gives them reward (raises, etc.) and punishment (loss of time I guess? idk).
Our whole system from top down is created to punish the average person.
CS and math have a culture that is not being communicated without randomly having a good teacher. Part of both of those cultures includes a philosophical basis (means of reasoning ("critical thinking")) that some pick up implicitly, but perhaps it should be explicit (and it requires practice).
Yep, and that's where we destroy the art behind it. We teach the right concepts, we teach one or two perspectives on a concept that has infinite perspectives. We don't reward a student for discovering these other angles.
Between two people, would you hire someone that failed 1000 times to get to the right answer, or hire someone that was told the right answer?
The first person not only has figured out hundreds of ways to go wrong, but also probably found suboptimal solutions and was able to get to the optimal solution. And it is only the first person that has the tools to take that step forward from the current optimal solution to something better
Not hiring specifically, can be more general.*
We destroy the art in STEM because we punish artistry.
Just how teachers punish students on tests who use their own methods to solve math problems.
Educators say one thing, and teachers say another. They are all wrong. The only people who understand what is going on are the ones most often blamed and least often heard: the students. They say, βmath class is stupid and boring,β and they are right. - from mathematician lament
While the idea of tests and such for certification is fine IMO (for hiring reasons), I believe that it should not be mixed with learning. That is, schools should not have tests other than for one to examine one's own ability (for reflection (not used to "move on" to the next stage)).
Yeah I see the benefit in that
And this kind of is an issue I take with universities, which is that they have become the new trade schools, used to get a job. IMO universities should not be for getting jobs.
But I think for this industry in particular, one of the biggest reasons I love this industry is project's role in getting that first job.
(especially if they are going to cost that much to many people, doing stuff not directly useful for getting a job is a huge waste of money)
On an additional note, we punish the idea of being uncomfortable. And we see this super often with people who aren't able to get out of tutorial hell.
But that's probably not a societal thing. I personally find the fun in being in an uncomfortable situation where things can go wrong any moment (in terms of programming), but that's maybe me just fucked up in the head 
Also why I love this industry, cuz I didn't need to go the college route π₯²
As a researcher I see the fear put into other researchers by the school and publishing systems. It severely limits progress and it keeps me up at night, thinking of where we could have been by now.
They encourage safe, incremental improvement. No room for failure, when in research it's like 99% failure (which is why it's "research", not "production"). But failure is knowledge gained, which is the whole point...
Public schools have the issue of having to make an environment where the bottom student can still thrive. At least colleges are able to set their own minimums, but sucks that they still have these problems as well :c
Yeah absolutely.
It is what you make of it
There is a lot of room within it
Yeah there are many paths. I just don't like the idea of "everyone needs to go to university." I don't take issue with individuals in it and what they get out of it.
More about providing alternatives. Right now it's all been funneled into one thing (which is causing (or comes from) supply/demand issues).
that depends on the country. In EU there can be quite a clear separation career paths depending on how many years you put in it
Yeah I needed an asterisk on that.
I also dislike the idea
Also mostly like where I am, rather then skills they be looking at whetever the person finished a computer eng degree or not
Like the job market where I am has a big chunk doing like that. I'm tired to study in the uni because I studied a different major
I don't think it is true that "everyone needs to go to university" or "doing stuff not directly useful for getting a job is a huge waste of money"
In the career-discussion channel there are frequently teenagers asking if they should go to university and the reply is consistently yes but is is often answered by users who did not attend university and can attest to how that is the more difficult route and hampers career development later.
Normally a university program will include topics that are not immediately relevant for the first jobs the students will have, but they might need it to see the context of the work they are doing, or it may become highlyrelevant for a subset of the students as they advance their careers.
I have not yet found a use for the management courses I had to take, but I strongly suspect I will in a few years, and I did find a use for the course on electrical circuits.
It is relatively easy to be an autodidact programmer, but what you can do with that programming strongly depends on what other skills you possess, and many of those (such as advanced math) are difficult to learn on your own.
what field are you in?
I have looked over at where my field intersects CS research, and I would not touch it with the sharp end of a stick.
This is a super interesting discussion that I kind of wish was a thread (to make it easier to follow)
I wonder if there is a way to "Threadify" post-facto?
update on the school language thing:
reminder: school wanted to check the option of replacing C# as the first language to teach our students, we wanted out language to be compiled as we teach python second year.
we had a meeting and chose kotlin with C# and go being runner ups from about 12 languages:
here are my summarized notes for the top 3 as well as a few other
C# -> while the language is great assuming the use of modern features, the language is not optimal for teaching a new programmer because most online free material is still teaching it as "Microsoft java" as a result most students got stuck writing some really ugly code to "work around the language". the language itself is fine now, but the worst past versions are holding it back
go -> great language all around with good free resources and good community, extra research into go oop needed(?)
kotlin -> great language all around with good free resources and good community, with the extra punch of basically one in 5 students wanting to make an app
we agreed to start teaching it in 2 years in addition to C# and phase out C# in 4 years assuming everything goes to plan
C/C++/Rust:
while these languages are great options for experienced programmers memory management is not something we want to teach very early,
fortran:
not sure why this was an option but I had to share that someone wanted to teach people Fortran in 2024
Haskell:
while the language is very good we do want to use the oop experience the students get from their first language to teach python and some of the more advanced material in it (my favorite python mantra is in python everything is an object and I just realized it's kinda hard to use without knowing what are objects, also I know technically some things are but it's oddly useful for teaching)
however I probobly won't be teaching there for that long as I still need to go to uni/find a real job sometime soon so if you want an update in 2 years ill have to ask one of the other teachers π
Machine learning / robotics / AI.
About Go, it's not object oriented, and that is on purpose, but just like in C, you can program in OOP style (but it's a bit more comfy than in C). Fortran is still pretty nice, but it's more a scientific computing language.
Is there a collection of "best of" mailing lists from somewhere?
This is really one of the single best paragraphs about technology I've ever read. Not sure if this is the best channel, but it's quite remarkable.
Very much seen this amongst my graduate student friends.
A career in research to me is very much about risk reward. IMO, you essentially have to "successfully" make huge gambits, repeatedly, to produce good research.
If you aim for "low hanging fruit," producing the most citations you can in a 6 week research project, you'll never produce anything worthwhile. The system is a massive pyramid and not a friendly place.
Repeatedly risking your entire career multiple times in a row, to produce genuinely original work, is not for the faint of heart.
probably better for #internals-and-peps
i think "programming koans" and "gems from the old mailing lists" are interesting teaching tools
i always found it enlightening as a learner to understand what came before, and how the current agreed-upon practices and standards came about
interestingly, i don't think lisp programmers write code like that anymore
i don't even know what that would look like in lisp... (sort (chop (compress x)))? i think that would be considered bad style for exactly the same reasons guido considers it bad style
in scheme of course you have the ! naming convention for "in-place" methods:
(begin
(compress! x)
(chop! x)
(sort! x))
as well as julia:
compress!(x)
chop!(x)
sort!(x)
in python i sometimes use _inplace to indicate such methods, rather than requiring the user to rely on the type signature or docs:
compress_inplace(x)
chop_inplace(x)
sort_inplace(x)
I'm a big fan of methods returning new instances instead of in place ops
Like pandas style is so freaking intuitive. Never use inplace=True. They just need to get their copy on write semantics working
Not inplace is more intuitive, it's what one normally does with primitive types. ```py
def add_one(x):
return x + 1
Depending on implementation it could make it inplace for you. Like with other functional programming languages where one gets to write as if it's all not inplace.
They just need to get their copy on write semantics working
well that's the issue. to do this everywhere you need some pretty advanced data structures and/or compilation techniques, and even then there are performance hits.
there are some really cool paradigms like "functional but in-place" and "tail recursion modulo cons" as implemented in the Koka compiler, but that's still research language stuff and not something you can expect to see in e.g. clojure soon.
https://www.youtube.com/watch?v=6OFhD_mHtKA
http://jamesrwilcox.com/tail-mod-cons.html
https://www.microsoft.com/en-us/research/uploads/prod/2020/11/perceus-tr-v1.pdf
also, R has copy-on-write semantics for a lot of data structures, and it kind of sucks when working with bigger amounts of data. like it or not, pure functional programming is not "native" to our computers, and you need special compiler support to really make it effective.
00:00:00 - Introduction.
00:01:57 - Part 1: Koka: Demo, Performance, Status, Syntax, and Effect Typing.
00:35:04 - Part 2: Introduction to Algebraic Effect Handlers.
00:58:47 - Part 3: Theory of Effect Handlers and Efficient Compilation using Evidence Passing.
01:23:45 - Part 4: FBIP: Functional But In-Place algorithms and Perceus Reference Coun...
Yeah functional programming and other such high level approaches are things that require more work from the implementation. They need to be mapped to what the computer actually wants. They trying to juggle the reality of how the computer works, and humans writing correct understandable code. Not sure if pure functional is really an option in the end, but I think most code could be functional-ish and would only really benefit from it.
that i agree with. it probably does students a disservice to introduce them to mutable data structures early in their education
mutability should be an optimization, not your default paradigm
Yeah I think it can be seen by when someone writes in a LISP for example. If they are just not even thinking about optimizations I think it becomes clear why they really like it. Not inplace is just very natural, just chaining things together, non-destructively. And ideas such as monads to help with that chaining idea even more (web dev seems to have moved almost entirely to this, but it's limited by language design (still better than not doing that)).
Not inplace design has also filtered backwards somewhat into languages such as C. In modern style there is the "pointerless" style which avoids pointers/inplace as much as possible, until it's actually needed.
Because it makes the APIs a lot more elegant.
In place and immutable is largely the same thing.
Whether it's mutation of a variable or chaining returns, ultimately you have cause and effect. Operations and relations.
The key is that, immutable operations have a smaller scope of prior state, effect, response.
Vs side effects, which impact the file system, all sorts of rubbish.
Which is why what Guido said was so spot on. Domain specific languages inherently add "more complexity" vs the standard library. Expression based programming limits cause and effect to the standard library.
Matlab is pass by value, copy on write and it works really well
yeah that's the same model as R. i don't remember what issues i had with it, it's been a long time
Pure functional is possible. The issue is... knowing Scala/Haskell programmers, they don't minimise cognitive load. Which is Python's culture, minimising cognitive load.
haskell has a tooling problem as well. it would be so much easier to write haskell if i could get a popup telling me the "resolved" type of a given symbol, and jump to the implementation of a given typeclass for some variable with a known concrete type
if i see frobs >>= unfrobnicate and i have no idea what unfrobnicate means. the monad laws are way too general for me to establish a mental model of un-frobnication
that's a big teaching issue in functional programming specifically, i think
the cognitive load gets really high, and the tooling just isn't there to support you
types don't help with cognitive load when they're heavily abstracted
Making an effort to reduce cognitive load just isn't a priority for many people. Databricks is fairly public about their frustrations.
Yup, it's related to why LISP is not used all over the place. It attracts the type of programmer to metaprogram everything they want (or just in general make very abstract things). I think Clojure is the closest to breaking out of that. The language needs to attract people that make useful libraries for getting things done and not abstraction hell. It also does not help that in languages such as Haskell many developers start using their own symbols to mean different things, and if there is one thing we learned from C++ it's that operator overloading abuse is bad (and if you want that, then just use APL).
fwiw idiomatic lisp nowadays does not look like that. much like how idiomatic python is not aggressively duck-typed anymore.
Yeah which is why I mentioned Clojure, it's pretty tame and easy to follow.
i mean common lisp specifically
And since it can call into Java it solves some the library issue.
Common lisp is fine too, it's just a bit weird with tooling.
lisp also is held back largely by its tooling, and the fact that you need good tooling for even basic productivity
Or lack of it.
yea, that. python is in a pretty good place, especially now with vs code and microsoft being so pro-python
although from what i see in this server, vs code is not that easy to configure to work with virtual envs. so many questions about it here
I think the fact that many are unfamiliar with how to even properly format LISP code kind of shows there is a lack of good tooling for guiding on such things.
((((((And results in this misconception))))))
And not everyone uses emacs or vim.
honestly, sometimes idiomatic lisp code does look like that
In my experience it's usually like this: ```clojure
(defn qsort [[pivot & xs]]
(when pivot
(let [smaller #(< % pivot)]
(lazy-cat
(qsort (filter smaller xs))
[pivot]
(qsort (remove smaller xs))
)
)
)
)
() is like {} in C
(Petition for Discord to add rainbow parenthesis for LISPs)
first get them to actually syntax highlight LISPs on mobile >.<
I did not know mobile is different.
it's a wholly different client. it's a mess.
Is it? I know many folk who find type annotations to be real world unusable outside of signatures. Hence they still Duck type.
that's what you're intended to do. that's not duck typing, that's type inference.
Tooling kinda is everything. IMO, you simply cannot do anything without a tooling community behind you... Scala/Haskell communities are simply too academic and developing tooling is beneath them.
this is explicitly considered wrong and bad in the lisp world! idiomatic would be
(defn qsort [[pivot & xs]]
(when pivot
(let [smaller #(< % pivot)]
(lazy-cat
(qsort (filter smaller xs))
[pivot]
(qsort (remove smaller xs))))))
maybe clojure people decided to specifically go against it, but that's representative of the clojure code i've seen too
if you use paredit or parinfer, this is completely effortless and the )s just melt away. but if you don't, it's a nightmare
Yeah, and I consider that style bad. And my word is final! π
I don't do }}}} in C either.
true, but you don't need type annotations either to impose a bit of self-discipline
the hanging braces are pretty typical in c-syntax languages. they're frowned on in lisp because they would be literally everywhere all the time if you used them
since this is #pedagogy , what do you think of python's whitespace syntax from a teaching/newbie perspective?
i sometimes see people get confused about it in ways that would be more difficult in a {} language
I think both can cause problems. It's a text problem in general.
But it can make it less cluttered for non-beginners.
i like the syntax, i think it's intuitive to force it for blocks so that people can logically see where things start and end.
i don't like the errors.
I never had an issue with indentation errors. and I suspect most people these days don't given that seemingly every code-oriented text editor treats a tab as four spaces. so I think whitespace syntax is a win on every possible front.
This isn't the right channel (see #βο½how-to-get-help). and please don't ask people to read screenshots of text--copy and paste the actual text into the chat.
(what if this channel was renamed to #teaching? it might cut down on offtopic messages from people who don't know what "pedagogy" means and just see "programming")
With a good editor either style does not matter yeah. We just use the hanging ")", it's more C-like in that way, but we like it, vertical alignment makes it visually easy.
I think that would make it worse ("that's where I can go to be taught"), but we've debated changing the name to just #pedagogy.
thanks, sorry i'm new here
i think that might help, i suspect having "python" or "programming" in the name make it a kind of honeypot
"How to teach students"?
"Teaching methods"
#pedagogy-no-questions
"#pedagogy-you-are-asking-in-the-wrong-channel"
actually, i wonder if 3.11 helps with this? i presume having precise error spans would help locate the right location.
oh yeah the 3.11 errors will be great for beginners
(once they learn to actually read error messages anyway)
Very good improvement, I hope they continue.
huh, doesn't seem hugely better in the repl
Personally I would like to see a non-stacktrace plain text message at the top with a snippet containing the error and surrounding lines. With plain English (/ multiple languages). The more complicated stack trace follows.
i always hated how the error message was at the bottom
ValueError: you broke it.
Traceback:
...
Surrounding lines to make it easier to spot.
the surrounding lines thing can be overboard though
usually set --tb=short in pytest because the default "long" output is way too long
--------------------------
def foo(x)
x = 10
y = 20 <-- here
z = 30
--------------------------
ValueError: you broke it.
file:line:col: insert the line of code
Traceback:
...
```maybe the file:line:col should be on a separate line given that it can get long, but i'd like something like this
A little window pointing to where and a message with it.
(Only like +- 2 lines around)
But either way, I think the main error should be at the top. And maybe even a blank line in between to really get their focus on it.
I love this Value Error and I'm stealing it
Hi, I am a senior high school student, and I'm teaching myself how to code. In an attempt to be work ready before college.
Currently, I know how to use python, I understand the basics/fundamentals.
Questions:
- How do I get motivated to learn, If I don't want or haven't found any topics for me. (But I have decided to do backend dev)
- After the basics, what should I learn next?
- Any self teaching tips?
Get used to being uncomfortable.
A lot of resistance in self learning comes from wanting to be in smooth sailing all the time, where you know exactly what you're doing. But in reality, that's not how you grow as a developer.
Start creating projects. Expand your knowledge base from just Python. Delve into frameworks. Get your feet truly wet.
Uhh for #1, why did you start programming to begin with?
Well I initially wanted to be a hacker as a kid
. But when I heard about programming it's the closest thing I could get. And I did. Now I rice linux, make nvim configs but that's about it.
- I see... but would college help?
- I want to create projects, but either I don't finish them, I don't have time and worse of all I have no motivaation
-
Would help you do this professionally and get a job. Will definitely expose you to new things but many can be self taught.
-
That's all the same reason.

I am teaching some kids 11-17 year olds in a club to code in python, but I don't know what project to teach them first.
I was thinking maybe pygame (snake or pong), some ethical hacking (spamming scammers with false information, maybe selenium or requests), or perhaps automation of school work :)
automation of school works sounds fun
Tho how im gonna do that no idea
Maybe convert text to a word document, sort files for them
You can probably start with like math assignments
retaliating against alleged scammers isn't what is meant by "ethical hacking".
I wouldn't do anything that requires using external libraries.
Something like this, tho since i recorded that i learned to make requests.
God I hope the information in that video is not real..
It is fake info, i spammed the site with since someone i know got fell for it.
Anyway, the topic is "What are good programming activities for teens with no programming experience", and I think Turtle is a go-to for that.
Never heard of turtle before, what is it ?
!d turtle
that link isn't very helpful if you haven't heard of turtle, I guess. but it comes with Python, and it lets you make simple animations by programming instructions
sounds interesting, the thing is that they signed up for "advanced" coding, so this is a little simple but definetly something i'll look more into.
so they do have prior experience? what experience do they have?
Some off they do, I've taught all of them basic fundamentals.
For statements
If statements
While loops
Strings and intergers
Arrays
look, someone just asked how to use turtle in #python-discussion: #python-discussion message
Python has lists, which aren't arrays. unless tuples are also arrays (in which case tuples and lists are the same thing).
Anyway, those are still very basic concepts. I imagine they could use them in turtle.
I'll have a look into it
If they are expecting something "advanced" , have you considered writing tests and maybe doing some open source contributions?
In fact, help them learn git and they will be on a path to self-sufficiency.
IRL Turtle / robotics via Lego Mindstorms. Their programming language / IDE is much like Scratch. But one can also use other programming languages.
Mindstorms is from the creator of the original turtle in software (Logo), Seymour Papert.
Turtles are a class of educational robots designed originally in the late 1940s (largely under the auspices of researcher William Grey Walter) and used in computer science and mechanical engineering training. These devices are traditionally built low to the ground with a roughly hemispheric (sometimes transparent) shell and a power train capable...
Mindstorms: Children, Computers, and Powerful Ideas is a book by computer scientist Seymour Papert, in which he argues for the benefits of teaching computer literacy in primary and secondary education. It was published by Basic Books in 1980, and republished in a new edition by Basic Books in 1993.
The Lego Mindstorms programmable construction s...
I ran an event a few years ago for kids (under 12) to program mindstorm robots to traverse an obstacle course, and they had a lot of fun. (And I had fun with the robots as well before the kids showed up.) But I'm not sure how educational it is once you understand that the computer follows the instructions in your program exactly and doesn't wonder why.
Not sure what is meant by "doesn't wonder why."
As in no inputs?
The computer only does as it is told, period.
Skrerederere
This is something to grasp in of itself, where beginners run into the issue of the computer not doing what you want it to do
referring to when beginners are frustrated that their code doesn't work, and their frustration seems to boil down to "I want the computer to infer what I want it to do even though I programmed it wrong."
Unfortunately I don't think that will go away at any point. Debugging will always be frustrating / transfer of thought to correct code. Have to push through that.
Closest we have to solving that is the auto coders like copilot.
I agree. But my point is that that's one of the early lessons beginners have to learn, and programming a lego robot that follows your instructions but doesn't correctly traverse the obstacle course is one way of learning that.
Oh, so you meant that you are not sure if there is educational value after that lesson has been learned?
Right. unless you want to be a robotics engineer, I guess.
I think there is, but it depends on how far you want to take it. Could go all the way to path finding and such.
And it can also teach some mathematics in the process. Specifically some trigonometry and linear algebra (just the basic idea of vectors and matrix transforms). And some mechanical knowledge*.
IMO it transfers well to just software, no robots, because if one starts in just software and is greeted by a terminal it can be hard to get a feel for what is happening, it requires printing what is happening (or learning to use a debugger, etc). Robotics sort of give real life print (seeing something happen) debugging for each action taken.
I find that that initial hump to get over is serviced well by robots (and not getting stuck on syntax and other compiler errors which Mindstorm's visual programming language avoids).
Plus making it less boring for many, which might make it worth it on its own.
A really cool way to get into algorithms is to make a robot that sorts some colored lego bricks. If their implementation does not work (or does), it can be seen visually how it's functioning.
I removed four off-topic messages. Please refer to the channel description, and DM @viscid mural if you have any questions.
should i place a max time for every programming problem? Because the longer time I spent, the less likely i am to solve that I just cannot think of any alternative ways of solving or ways to debug. and it is frustrating that it dissuades me.
yes, it's not useful to just sit and bang your head against a problem if you fundamentally know the techniques
This is only partially on-topic for this channel, but if you're still a student, it's not unlikely that there's something you simply don't know that is key to solving the problem. Though it's often a good idea to take a break and see if the solution occurs to you when you come back.
Guys, what is fundamentals important for be a good developer?
learn about hardware, architecture of computers, OS,know how things work behind
, work in make much difference?
i don't think those ideas should be taught in introductory programming. they may be interesting, but that seems like a great way to overwhelm new students with "irrelevant" details when they're just getting started.
anyone can help me at c++?
or learn algorithm, data structure, programming language and then focus on the fundamentals behind the scenes?
you can ask in off topic
thx
quite frankly, i don't think the average programmer needs to know about hardware and computer architecture. a general overview may be helpful, but i don't think it's necessary.
of course, there are certainly fields where knowing about that is necessary.
what do you guess about roadmap.sh? It's good for studied?
i find their python roadmap quite weird. i definitely wouldn't teach a class from it.
in whats topics?
topics on the roadmap?
yes, because i am following the roadmap of python kk
it introduces algorithms and data structures before classes and modules, for one. the best ways to model and understand those data structures often involve those latter two.
i have a ton of other complaints, but i don't want to diverge from this channel's topic.
so, my ideia is study for roadmap python and after study for roadmap backend
Hey guys. A buddy of mine who just started learning Python reached out to me about tips on how and where to start properly. As i do not have a full overview of available tools and platforms for learning Python, im reaching out to you guys. As of now heβs on the Mimo app doing the Python course everyday, but he is not sure if he is doing himself the opposite of a favor about creating the fundament like that. Paraphrasing him: are your thoughts on the Β«bestΒ» (in a technical-pedagogical) method for learning Python, when its something that is done consistently an hour every day at the evening?
idk what Mimo is. We curate a list of resources on our website (https://www.pythondiscord.com/resources/) that your friend might find helpful. And that's ultimately up to personal preference. But no matter what resource they pick, they need to couple it with writing code. Nothing helps things stick better than putting your idea into code, watching it cause an error, and figuring out how to fix it.
Youβre right about that! I had a look on the site and forwarded it. Its a great site for my own part as well (nice sorting filter). I totally agree about the processual-applicative factor, though it seems he was preoccupied with an idea about starting with the Β«rightΒ» premise. The guy probably has a hangup coming from the amount of time he has versus his goals
please anyone give coding courses please
This channel isn't for resource suggestions, but I linked to our resources page in my last message
Use Spike instead of Ev3
So I raised a discussion elsewhere, and it turns out that it might be fitting for this channel - what sort of things would yall like to see in a language designed purely for teaching programming?
One point raised was the use of introducing a good REPL early on in the process. Maybe one with the ability to load scripts into the REPL (like Haskell's ghci) could be helpful. You'd be able to write actual scripts, and then poke around and mess with them in the REPL.
e.g I might have ```
fun some_function()
blah some code
some_var = some_value
in an imaginary language, and in the REPL you'd have something along the lines of
:load some_file.blah
some_function
but concerns might be confusion between using the REPL, and moving on to actual scripts
i agree with the concerns. as it is, i strongly discourage jupyter for similar reasons. it introduces extra complexity and new common pitfalls due to how code is run
As we discuss this, remember that since we're talking about a language that's just for education, we can suspend practicality.
I would want the language to be statically typed with an option to validate types before runtime. And I would want it to support multiple paradigms. At least imperative and some elements of functional. I'm not sure how I would want OOP to appear in the language, if at all, since there's so much debate about which elements of OOP are useful and how languages should express them.
I was imagining a language more functional in nature, for the reason that at the most basic level, imo its easier to reason about pure functions rather than classes, objects, and all the other stuff that comes with OOP. Although I guess that argument might somewhat go out of the window once you introduce concepts to handle side effects (monads, algebraic effects, what have you).
It sounds like you want DrRacket. https://www.youtube.com/watch?v=l6VuYdQHhE0
At code clubs for young people (6-16 year olds) people typically start with a block-based programming language such as Scratch. When they are ready they move on to a text-based programming language, usually Python.
But what about Racket? Itβs got a great environment, itβs good with graphics, pretty concise (so not too much typing) but Iβve not ...
Actually, on that note, apparently https://www.pyret.org/ has racket origins.
you could just... not (the last part)
to the extent of my knowledge, those are necessary for the sake of "formalizing" IO
but if the goal is teaching, you don't need a rigorous explanation for everything
functional programming is probably more natural to someone with relatively more developed math skills. what age range were you targeting?
yeah i would recommend taking on a mini-project
try learning the csv module
its a good starter to databases and helps you understand how to parse data
Alright
I think the important thing to learn about functional programming is how it lends itself well to compile-time optimizations (especially if pure vs impure functions are known at compile time).
I was thinking older high schoolers/people in uni. most would know how mathematical functions work, and what things like sets are.
made tictactoe in python took me 2 hours
nice! but not on topic for this channel. try #python-discussion
hello
does anyone think they could help me
i was watching a youtube video on how to make an app and i followed everything but it keeps crashing
imo its easier to reason about pure functions rather than classes, objects, and all the other stuff that comes with OOP.
i don't think this logic makes sense. for example, in a language like python, you don't need to be exposed to any of that until you're familiar with programming. the same could happen for our hypothetical language
okay
i need to fix my shit idc what anyone thinks im going to totally immerse myself in programming i have a lot of time on my hands now and honestly i need the best resources so i can fully immerse myself
best books, websites, tutorials, podcasts, magazines, news articles and forums
i need total immersion. I need to force myself to use python as much as i can anything that will make me program.
any suggestions i dont care what they are just go. Your best resources not just for learning but for anything and everything
even small things idc
@ebon portal keep in mind that this channel is for talking about teaching techniques, not for giving tailored learning advice to learners. but I don't think this "hard core" approach that you want to take will actually have better outcomes than just practicing programming daily/a few times a week.
yes i want to practice programming daily
i need some good resources for practice
this hard core approach will work for me as it has worked for many other successful people the difference being how long can you be "hard core" for? Im willing to find out. Either way the resources will still be useful π
have you been reading elon's twitter, or something?
listen can i just do things the way i want? every single MEGA successful person ever has worked long crazy hours and hasn't deviated from the task at hand. I do not care what elons expectations are for his employees all i know is that as an individual i have set some standards and expectations for myself and as far as im concerned i can do whatever i please regarding myself as person with expectations providing its not harming others if you dont have any good resources to recommend then just please be quiet and stop fixating on my obsessions' and let me be the master of my own choices.
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
i think an idea functional languages have, where pretty much everything is an expression, is a good idea. the difference between statements and expressions is something i see a lot of people mess up in python
why? That OO is harder to reason than FP has been widely accepted already.
is it widely accepted? when you say "OO is harder", are you thinking of making classes that model real-world entities, or (esoteric) OO design patterns?
that's not the point though. I was saying FP or OOP is not relevant for a brand new programmer
i'm not sure this is true at all
it is widely accepted that mutability and side effects can cause serious reasoning difficulties in larger codebases, but pure functional programming comes with its own set of problems, and the industry has clearly decided that mutability and un-checked side effects are the lesser evil
I don't think so. The main issue of FP is its limitation of integration with all kinds of existing eco system. Yes, it has its own set of problems, but those are not reasoning difficulty, aren't they?
i'm talking about what happens when you get very highly abstracted functional code
since this is a pedagogy channel, i think that's a particularly difficult thing for beginners to work with
even experienced programmers struggle with it. it's a completely different skill set to some extent
that said, i think this is mostly an indictment of functional programming education. i think more emphasis on idioms is required
cs 3110 is a great example of how to do functional programming education right imo, and puts most other resources to shame
and i think the reason is that it spends a long time and a lot of effort encouraging you to get comfortable with the idiomatic usage of functional programming basics, rather than push you through to advanced constructs and high levels of abstraction early on
(this is perhaps in part due to ocaml being somewhat less abstraction-friendly than haskell)
OO is not harder. It is actually easier. But it is harder to "reason". Yes, I am talking about real world application. For toy example, you can do whatever you want, it is not going to make a big diff. BTW: I am not talking about anything exotic, just real world work (substantial, non-trivial, non-toy).
I fail to see how one could say FP or OO is easier or more difficult to reason about. Regardless of the approach, you are gonna need some data and some code. Anyone can write some crappy code and architecture in either.
From a pedagogical point of view, you will still need to learn both.
I'm a totally noob. Personally I find oop harder to wrap my head around, and for a long time I had a tough time understanding why and when you'd want to use a class/inheritance
Idk if it' a good way to learn but I find it's most helpful when looking at oo code I don't understand to make or draw a simplified flowchart of the classes, functipnd ect and how they interact
The value of oop only really sunk In when I saw some poorly written code that had everything on one script with no classes and seeing how much of a mess it was, to read and test parts of it.
I think perhaps there is a distinction between teaching python as a tool to accomplish some task, and using python as a tool to teach programming.
I have taught python to research scientist as a tool for data analysis, and in this application OO interfaces are so ubiquitous I talk about it very early.
By OO interfaces I mean things such as string.replace, numpy arrays, and the OO interface to matplotlib.
I give a short introduction to custom classes, but do not expect my students to actually make any.
The use case for my students barely extends beyond pure data classes, and dictionaries serve them well as an OO approach to data management without the added complexity of full classes.
On the other hand, if I was using python as a tool to teach programming I think I might spend more time focusing on FP, and delay with OO concepts.
@misty swan @winged shadow doesn't look like this is on topic
Yeah, which is why we decided to move to another server, apologies for the spam β initially we were going to be talking about some principles and design choices
Please remove your messages, then
π
Finding your posts valuable.
In some cases, even data scientists need to def classes all the time. For anyone working with PyTorch, they constantly define new classes, and it is the recommended way. IMHO, OO is quite practical for solving tasks, starts with using objects, and also defining/creating and using new classes. My 2 cents.
I think one of the most interesting parts of the python discord is that you get to see the breadth of applications in python.
Let me share where I am coming from: My field is in material science, and the amount of data generated by scientific instruments (electron microscopes, advanced X-ray sources, etc.) has increases by orders of magnitude over the last decade. Software has not kept up, so programming is in many cases the only tool available to access the data and it turns out that it is easier to teach sufficient programming to material scientists, than it is to teach sufficient material science to programmers, thus me teaching.
One of the datasets I work with is a 200 gb array of intensity values. The array has 5 dimensions, 2 in real-space and 3 in reciprocal space (Fourier transform of real space). Approaching this data requires a very different strategy compared to 200 gb of images from the Amazon rainforest. As as an example, we largely do not use machine learning, because we have physical models which we can directly compare our data to.
I agree with you that OO is quite practical for many data scientists, but in my specific field this is less true that in many others.
Do you use any online resources to teach Python? I'm teaching Python basics for a first semester course and don't know how to handle e.g. OOP really. We do type checking and type casting so the students at least get to see things like class <str> and I don't know if I should do a deep dive into data types and OO before teaching concepts like conditionals, loops and functions.
I did not use any online resources, partially because I did not find any that were suitable for the work my students would be doing, and partially because I wanted to give them examples that were relevant in our field.
My students were a mix of PhD candidates and postdoctors, which is quite different from first year students.
Will your students go on to a programming/CS degree, or are they engineering students in a different field?
I am sure there are others in this channel that teach first year students, and can give you advise regarding online resources.
They are in geodesy and geoinformatics, none of them will go on to programming/cs. A bunch of them will continue to do Python for the rest of the masters program and I'd prefer to teach those OOP in the second semester instead of the first one. Especially when working with libraries like shapely it might make sense to understand how OOP works since most packages follow the OOP paradigm.
does anyone know brainfuck?
many do. what does that have to do with this channel?
I think definitely conditionals, loops goes first, then functions, then OO, otherwise, it is quite confusing. And for OO, it is first about using it. Finally it goes to creating your own class/objects.
I think you should try and cover things like conditionals before diving into classes and the like (if that's what you mean by a deep dive into OO)
What is better, an one liner or a 4 line code with a comment?
neither.
?
You got to show the code for others to say which is better.
If it is not doing something useful, or not even correct, why it is going to be good?
you might want to ask in another channel, this one isn't the place for it
ok
I teach both an intro to programming (with Python) course, and an intermediate Python course using curriculum that I developed. The intro course ends with students building a small project. I encourage advanced students to use the pygame package to build interactive programs - typically games. The students get to understand the use of objects in the pygame environment.
The intermediate course is focused completely on OOP. The general approach is to first explain the basics of OOP, classes and objects with many small examples. Then I use the pygame package to explain the core tenets of OOP. I provide a package of GUI elements that I have written, so the students can see how to use OOP to build these GUI elements. Their final project is to build a game that uses multiple OOP constructs. Students seem to enjoy this approach very much.
i feel like i'm missing a step in the 'layers' of programming ability. Self-taught. I can 'script' in languages i'm barely familiar by figuring things out like the basic structure of this languages if/else/for/etc like powershell, etc. I can program pretty well in python, I understand objects and scope decently well, i have a harder time following, say, decorators or the various versions of * / ** before/after variables... but the most recent 'big steps' I've found are UML diagrams and design patterns... Still learning on those... but anyway, that's all the leadup to my actual question.
what are the kinds of keywords/phrases I need to be googling? I seem to have outgrown 'learn python' in it's basic form, because it's not the language I need now but the design. But 'software engineering' is too much of a buzzword to find the signal in the noise, and I'm just not sure where to go and what to google for materials on learning the 'next step'
UML and design patterns are tools, but what's the name of the field that studies it and how / where do I learn more in that direction?
This channel is for discussing teaching techniques, not for giving learning advice. but UML and OOP design patterns are not widely embraced by the Python community, so I wouldn't spend any time on them in the foreseeable future. You might pick one of the Python books on our website and go from there.
Understood. Thanks!
Hey @misty dirge, are you still collecting things that are difficult to understand in Python. If so, I have one more for you.
you might have me confused for someone else, but let's hear it anyway
Maybe so. I recently had a class where the main topic was encapsulation. I discussed direct access vs getters and setters. I finished with a discussion of Python properties as a sort of compromise. There is probably a good reason for this, but it's difficult to explain to students why the setter has a decorator that is named @variable.setter, but the getter has a decorator named @property.
It would be much easier to explain if the getter was named @variable.getter
I think a lot of people agree that the @property decorator becomes offensively verbose rather quickly, which is ironic when Python boasts about being less verbose than other object-oriented languages of its time. I've seen alternatives proposed on python-ideas, one of which involved a nested class.
Do you know of any reason why it couldn't be called @variable.setter ?
I'll have to reason my way through the descriptor protocol, which might take me a moment
Unfortunately, I gotta run. Family obligation. I'll check back later today. I look forward to hearing what you think.
rip
I don't know how much you have thought about or are involved with the rest of the study program.
My experience is that many engineering students study python in the first semester, and then use if very little until they have to plot or somehow visualize data in their thesis. (This is a big improvement over the situation when I started, when we learned Matlab.)
I want to note that this is often a non-trivial task, as the data is often not available in a convenient format. I use a table of x-ray form factors as an example (https://smilgies.github.io/dms79/x-rays/f0_CromerMann.txt), and reading this (as with much output from scientific instruments) requires writing a custom parser. Creating a plot that clearly communicates important aspects of a dataset is also non-trivial, particularly as there is a large amount of syntax involved in specifying all the different aspects of a plot (figure size, dpi, axis labels, data labels, axis ranges, suitable colors, linestyle&linewidth, scatter plot vs line plot, uncertainty, etc. )
If I was teaching first year engineering students, I would set these things as desired learning outcomes, and try to structure my teaching with that in mind.
(I hold the firm opinion that it is better to teach the OO interface to matplotlib, because this interface makes it much easier to produce high-quality figures. Mixing the functional and OO interface causes much confusion, and I find it better to avoid the functional interface entirely [although students get confused anyways as they use online resources].)
That said, I am just a semi-random voice on the internet. If you want advise as to what the students should learn, you should ask your local PhD candidates what they wish they had learned.
It's hard to understand it really without getting into descriptor protocol. The fact of the matter is property returns a descriptor bound to the name variable in the class def.
Thanks for checking. Do you think it would be possible to allow @variable.setter as an alternative. Of course @property would still be needed for backwards compatibility. But I think @variable.setter would be both clearer and much easier to teach.
Not sure what you mean. You would like to make a property with a setter without ever making a property instance first?
I think it might be fruitful for you to read this section of descriptor protocol how-to. It has a pure python equivalent to property which shows the mechanics in essence https://docs.python.org/3/howto/descriptor.html#properties
You can see there's a property.getter
class X:
x = property()
@x.getter
def x(self):
return 1
@x.setter
def x(self, v):
print(v)
```this does IIRC work, but I would stick with teaching the traditional style, even if it is perhaps less intuitive
You could, inside the class def, instantiate a property, bound to any name, then do @variable.getter, etc on any argument-less method in the class def and get same result
Ah u beat me to it
could try explaining it as something to the tune of: "since you almost always want the getter set, python has a shortcut where you can directly create the property with a getter, and optionally add a setter and deleter"
class X:
x = property()
@x.getter
def foobar(self):
return 1
@x.setter
def bah(self, v):
print(v)
I think it's important to know that the methods you decorate also can have any name
Tbh when I first started, property confused the heck out of me
For that reason
you can't, property.getter returns a copy of the property with the getter changed, it doesn't mutate the existing property
you need the same name in all cases otherwise you get incomplete properties assigned to various names
In your example u absolutely do not
I'm wrong
But if you pass them as fget etc in the direct Instantiation you do not i.e. property(fget=foo)
@neon pasture actually no...property implements __set_name__ which will enforce the name at the end of class creation no?
def __set_name__(self, owner, name):
self._name = name
So while getter and setter may create a new type and override the name, __set_name__ will enforce the original at the end right?
I'm on mobile or id check in the repl
moved to #ot0-psvmβs-eternal-disapproval, since it's not really about teaching at this point
Does anyone have good links or sources for python: classes, objects, files
I think I got the hang of writing classes + methods but I want to thoroughly get the grasp of Object Oriented programming by practicing on my classes + file reading/writing exercises
this channel is not for resource suggestions, but we can talk about general approaches.
when you say you want to learn "object oriented programming", what did you have in mind? because OOP encompasses a number of design concepts, some of which Python doesn't embrace.
That would be helpful as well. Suppose if you have a main program, separate to a class program, with a txt file all in one.
And you want to read inputs from the main, using a class program to take those inputs and put them onto a file. Would I be right to see the class as a form of bridge?
not sure what you mean by a "class program". the main design paradigm in Python is procedural, and classes are there if your procedures are easier to conceptualize in terms of a custom type of data.
by saying "class program", it sounds as though you think of classes as executable units (a la Java and it's "main methods"), and that's not really how Python works.
Does anyone know of any games that make use of Python as a mechanic (like inputting stuff into a terminal to solve a puzzle or get past a boss or smth)? Doesn't necessarily have to be one that teaches you Python, more I'm looking to practice what I've learned in more flexible ways than my textbook practice assignments.
Like 90% of the programming tag on steam is drag-and-drop or graphic based logic-type puzzles which I don't want/don't enjoy/don't find useful
@floral beacon this channel is not for resource suggestions
I figured it fit learning best since that's why I want it (I learn best by doing, and I like puzzles)
it's about discussing teaching techniques. it's definitely not for resource suggestions.
i am new to discord, how do i use it??
by sending messages in channels. but make sure your messages are on-topic. this one is for talking about teaching techniques.
i like the concept but I think i need a little more help
there are several games that require you to do something like program an AI to fight against other players' AIs, and i think at least one or two of them let you write code in any language you want, python included
okay thank you
DMed you
Why the help system changed? I don't like the new one :(
see the message in #announcements. if you have any questions, go to #community-meta
start by thinking about what you want. make a step by step process of what has to happen to get from where you are to where you want to be.
then research steps you aren't familiar with or look for alternative routes. the rest will come over time.
this gives you a better sense about how each line communicates with eachother and how the code will function, allowing you to tackle more complex situations with ease
Welcome to the life of a developer...
The actual typing out the code is the least I do in a day
that is not bad, as long as the 'how' can be transferred to knowldege, not just a one time thing.
Hey guys
Idk if this is the right place to ask this but
Has anybody done cmu cs academy
If so, could you prove me with answers?
you're asking for examples to exam questions? sounds not good. but in either case, this channel is for talking about teaching techniques.
No, itβs not a exam, I am in high school, not the actual university. I am taking this coding class in school and we are doing the cs cmu academy units and I needed help with some of the things
off topic
to what extent should i learn before i can start teaching programming to kids and/or teens?
Interesting, I actually really like this question. In my opinion, you should probably get quite far before you start teaching (note: there's a difference between teaching and helping) even if they are just kids or teens.
I think you should start by just helping others - this server is a great place to start. You'll learn more yourself and figure out what sort of explanation people tend to understand. The reason I think you should get quite far, is that the more you know and deeper understand the language, the easier it will be for you to reword explanations for things so that they understand.
For example, if you need to explain a topic you only understand on a shallow level, then say your student is not able to grasp the explanation that you were given. Without a deep understanding you will not be able to explain things differently so that this student understands
+1, i think this server has been a great way to learn how to teach to some extent
not just answering questions, but also reading other people's answers to questions and observing what works and what doesn't work
I disagree with Bluenix. Granted, I have zero experience or evidence on which to base my opinion, but: I think you need to know just a little bit more Python than you intend to teach. Instead of becoming a Python expert, you should become a teaching expert. I have no idea how to do this π
But teaching is a skill of its own, and is orthogonal to -- and IMHO, way more important than -- knowledge of the subject being taught.
i think this is OK but you need to know when you aren't an expert in something, and you need to teach somewhat differently
e.g. it's harder to use the socratic method if you aren't deeply versed in the subject. but you can more take the approach of being a fellow learner
you can start with the socratic method, and when the student reaches the limit of your knowledge, switch to fellow-learner mode π
hmm i see
On a related note, I believe there are many online tutorials of poor quality because the authors believe themselves able to teach when they barely understand the contents themselves.
I believe there are many online tutorials of poor quality because the authors believe themselves able to teach when they, in fact, do not know how to teach (or write).
Guys do you make resume when are studying a book?
like, would you mention a book that you've read on a resume? no
I wanted to start with learning data science but I am literally confused where to start with. Note that Idk python
I made a mistake in the translation
to retain the knowledge of a book do you make a summary?
Typically to retain book stuff, I take notes to the point I don't really ever need to go back and view the notes again. Since the material been through my head so many times while taking notes.
I like to think that most books are aiming to express a single idea.
Using your notes to be able to link all these individual topics, to make up this idea is what I try to do with my notes. Not necessarily just summarize every section, but try to connect all the pieces together.
the pieces more important ready?
because in programming you dont remember the code of head, so i create a note for each thing that i will study
but i will focus in the parts more important of book.
I mean books where you're just picking up syntax moreso than the theory, then yeah there's not really that single idea the book is trying to express per se. So most programming language books can be considered a syntax glossary in a way.
Kinda was more leaning towards more theoretical books.
If you're just aiming to pick up the syntax of a language, like how to make variables, create functions, create classes, etc. That's definitely piece by piece stuff. But the next level of how to use these tools cohesively, in an effective and efficient design, that's moreso authors trying to express how their way of design is better than the alternatives.
Uhhh, I don't really go by pages just because different books can have radically different amount of words per page to begin with.
I'm average though (or I'd like to think) in terms of wpm
in first time?
It depends on the type of book really. Novels/Stories/History, I just read for fun the first time, and then I go back to fill in the blanks. For more STEM books I spend like 1/3 the time reading, 2/3 the time note taking, then once I've finished like my session of reading for the day, I go back to the notes and try to reorganize it, make it make sense kind of thing.
The notes make my reading take a while, especially because for STEM books I almost never go back to read a second time.
Other more interpretative books I may intend to read multiple times.
ready, me too
most of the time is taking notes
but do you prefer see course or read a book in programmation?
Yep. WPM in writing is typically slower than in reading.
I used to be the course people, thinking that programming books wouldn't be kept up to date, etc. But the community is great, and many books across all ranges of topics are kept up to date. Once I started discovering books, I never looked back on courses.
Books also just happened to be super accessible for me. Since I moved to San Jose (in Silicon Valley), nearly every library has a fuckload of technical books.
cool
i want read books fisical but in brazil just pay
and for read i use on oreilly
but read on pc is tired
Courses are generally not complete in terms of ideas. And way too many of them are made by people with a criminally low amount of professional experience. I just kind of cringe now thinking about courses, because the books are generally made by people with decades of experience, and it being reviewed by dozens of people with the similar level of experience.
That being said, some books are also made by low experience people. Like CTCI, was made by a person with 3 years of total developing experience over 15 years ago. Which makes sense when you look at the book and how shallow the book is in terms of DSA theory.
yes, agree
about courses in general, some are good, but others pass content very weak and use much copy for sell.
If you are interested in a certain programming book (or multiple), you can ask me for PDFs for them. I have like, quite literally hundreds of thousands of PDFs of programming books. Hundreds of 2023 pre-releases as well.
thanks
but now i have a list for read books
what i need is just read kkk

what area of programming do you like?
Hmmm, I've been really interested in AI/ML the past couple of months.
But have been reading a lot more networking related stuff for work recently.
I've always had 2 goals when following any tutorials/books.
A) Try and recreate the exercises afterwards without looking at the book to see how much I retained
B) Try and expand on the exercises to introduce my own ideas/features
I've found this has helped me greatly
cool friend, i will follow your leads
"Don't practice until you get it right. Practice until you can't get it wrong"
How important is contributing to open-source projects, and how often should you?
How important is giving to charity, and how often should you?
@arctic pike @flint goblet this isn't about pedagogy
indeed
I mean sure, if someone knows enough to themselves consider teaching (and they are self aware enough to think about what level they have to be) then they are probably at a sufficient knowledge level.
i think this is fine, so long as you know the stuff you're teaching really really well (which, i think, is often somwhat related to knowing python well in general)
because you need to be able to explain things in ways that work with a number of different people who think differently
I think there are concepts that you'll never have to know, no matter how much Python you know. You can still use Python to teach those concepts, but in that sense you'd have to go beyond what you'd ever need to know in Python
If someone doesn't know Python very well and try to teach me Python, please get off my way, no matter how much you know about teaching.
Sounds like the average high school teacher.
make sense. π
@proven arrow try #tools-and-devops
Hi all! Would you guys be able to recommend some Python books that you guys found valuable? I'm looking for something that talks goes deep into Python internals as well as the "right" way to code in Python. Something that ties things to lower level stuff - compiled code, hardware will be great as well, but more of a bonus. Thanks!
I think, at least, it depends on what you're trying to teach. You don't need to know all of the ins and outs of python to be able to teach it, at least in my opinion. Teaching is also a nice way to get to learn more about the concept yourself.
This channel is not for resource suggestions, though there's Fluent Python for how to write idiomatic code that leverages all of Python's features, and CPython Internals for understanding the implementation. These are two separate concerns, and I'm not aware of a widely-embraced book that covers book.
Guys anyone know any channel on youtube that have videos about python advanced or intermediare:
I was taking a course at O'reilly and my free trial ran out.
@fluid bluff this channel is not for resource suggestions. please do not ask for resource suggestions in this channel again.
sorry
:incoming_envelope: :ok_hand: applied mute to @regal shore until <t:1670171993:f> (10 minutes) (reason: duplicates rule: sent 4 duplicated messages in 10s).
The <@&831776746206265384> have been alerted for review.
Best advice for programming
Introduction to programming using python by liang
https://chat.openai.com/chat
Is great to get clear cut answers about a topic
I have been using it for maths and learning DBMS, it's gives very very accurate answers
That and very easy to understand
Great for preparing for exams
that seems contrary to general accepted practice
I'm guessing it would be wordier and less reliable than, say, just putting the prompt into a search engine
it's only a language model; it doesn't know anything about whatever you ask it
it should be perfectly happy to give you nonsense answers if it decides they're consistent with something it read somewhere else, not necessarily even a text on the topic you're asking about
From my experience it gave very consistent results
HI. im new to learning python and coding in generall. i think my way of lerning is bye doing. But for my question: im struggling to find the metod/function to even try to write the code. in my head i know how to solv it but i dont know how to solv it in code
how do you solve it?
Try looking at the source code of the function.
@leaden spruce @sharp scroll this is an #algos-and-data-structs question
Apologizes
hello, I'm new to machine learning and would like to get help on how I can start with it please
your question is off-topic for this channel; try #data-science-and-ml
how do you know its giving you correct answers if its teaching you things you dont know
They said it gives "consistent" results. Consistent with what, we don't know. But one could measure the accuracy of its answers by giving it opportunities to make statements that the inquirer knows the accuracy of.
I consistently loose when playing lotto... I must be good!
i asked what i knew π ,
but i agree as its all just algorithm, its bound to fail
Hello, I'm currently learning python. I do understand the definition of function, loop ect.. But when asked to practise I rarely complete the exercise and it unmotivate me? Do you have any tips to improve logic and not loose motivation ?
@floral phoenix - I like using Code Katas as a learning tool since it lets you solve small, complete problems. Pick one problem, then try and solve it. If you can't figure it out, google the answer then try implementing it (not just copy/pasting, but actually solving it using the solution as a base)
is code kata a site web or something?
check out Codewars.com or leetcode.com for two examples of the idea, but it's basically just short problems where you solve a puzzle for arbitrary input/output
I think the trick is just to like, start small - don't go 'I'm going to solve twenty problems!'
I'll see, thank you very much for your time!
it's horrible like I go watch my udemy courses with hight motivation and loose it all at one problem I cannot solve
I also would recommend trying out maybe Automate the Boring Stuff - it's a good course,available free online in txt form and covers a lot of real world stuff
can you send a link because I only found an amazing book of it
say I have a project
is it good practice to only have 1 class or 1 function per file?
I feel like it's easier to track what comes from where and how each class and function relates to the others
That sounds like a question for #software-architecture .
This channel is about methods of teaching others
reply to this with the best python reference book or cheatsheet you have used or still using
This channel is not for resource suggestions
(CC @sullen stirrup)
Apologies
Please express your opinion on the following case: Your CEO recently became
aware that your company has an extensive dataset of past online customer pur-
chases and would like the company to develop an online product recommenda-
tion system. The CEO asked the data science team leader to present a detailed
work plan including resources (employees, computer resources) and a very accu-
rate timetable with the expected required duration of each activity until a work-
ing system is operational.```
Would you guys say the CEO shouldn't do this?
you're asking about the ethics of product recommendation systems?
Like should the CEO require the data science team leader to present a detailed work plan and a avery accuarte timetable with the expected required duration ?
so, it's a question about project manager/stakeholder relations (the CEO is the stakeholder in the proposed system). I'll let someone with project management experience comment, but in general, it's impossible to guarantee the accuracy of a timetable for future events.
Yeah thats what i thought, but I don't know if there is something else that I need to explain more of
@ember quarry I thought this was #career-advice--please remove your messages from this channel and ask your question there.
ok
Does anyone have a programming pedagogy topic in mind? (Not a resource request?)
Hello, I'm a teacher and will be teaching year 12 and year 13 programming next year. Can anyone recommend a place to get lesson plans that align with a certain curricular which are easy to follow?
Have you tried cousera yet?
Yes, lots of good stuff under the 'Python for everybody' course
reminder, this channel is for the discussion of pedagogy (teaching)
!rule 6
I have been seeing people during AOC use data classes. Never used one myself, but it seems very similar to the idea of a struct. Is that the case? Or do data classes have more/less functionality etc?
Conceptually, they are similar to structs, while also implementing concepts from OOP. But your question is off-topic for this channel about teaching techniques. Try #internals-and-peps
Hello, Any good suggestion for udemy Python program for beginners
Thanks. Didnβt exact know which channel to use
help me in fisxing this plz
@pulsar wedge kindly remove your message and try #unit-testing
ok
thanks
this is the perfect place for me to rant about programming topics amazing
it's not a place to rant, no.
ay
am i not allowed to say oop is bad and this is why?
whatver your gonne say you should prob add it to the description of this channel
this channel is about teaching techniques. not programming paradigms.
if there's something specific about a course that you're taking that you dislike, you can talk about how you think that course could be improved. (from the perspective of the techniques the instructor is using. not "it's too early in the morning" or "I dislike the instructor personally")
well, how did you get "this is a place to rant about x" and "oop is bad" from "For the discussion of the methods and practices of teaching."?
dont they go hand in hand, a programming paradigm is a set of rules to solve a problem, i think teaching people about diffrent set of rules to solve a problem fales under teaching techinques
whether you like it or not, OOP is widely used in industry, and therefore students need to learn it. this is a channel where you can talk about methods and practices for teaching it, and other programming concepts. not for debating the validity of said concepts.
lets say that you need to learn it, that still doesent mean that oop is a good programming paradigm it just meanst its widely adopted
this channel isn't a place for debating that, is what I'm saying.
isent that kind of odd? because nobody will have the same ideas about a topic if everyone is just gonne present there ideas and nobody is allowed to have discussions about which idea is better how can anybody improve there ideas, if they are not allowed to get critizism
this channel is a place to debate whether or not a given teaching technique is good or bad. but OOP is not a teaching technique--it's a programming paradigm.
can you define teaching technique in your own words?
the approach that an instructor uses to convey a new concept to a student.
yea your right that doesent fall under that
what a shame, is there a channel about that?
not really. sometimes programming paradigms come up in #internals-and-peps (which used to be called advanced-discussion)
btw even tho this is programming pedagogy can i use math as a methaphore?
for example in elementry school they teach multiplication by letting you remember all the solutions in a given range of nummbers instead of learning the fundemenatl way of how multiplication works
prob gonne use algebra 1 as a methaphore
as long as it's related to the topic
Is this the right channel to ask this question about me and my learning?
It's for talking about teaching more generally. if you're looking for personal advice as it pertains to a long-term goal, that would actually go in #career-advice.
ah ok
Hello! Is this the right channel to ask questions and help for my uni project ?
It is not. See #βο½how-to-get-help
im trying to learn python whats wrong here? yes im addicted by the luau because i like making scripts for roblox games to troll little kids.
The then and end keywords, for more help please see #βο½how-to-get-help
(idk if its the right channel)
@sharp field@plush laurel #1035199133436354600 is the help forum. this is a discussion channel
hi
guys I need your help, I want to create a class 12th project on topic bank management sysstem by connecting python and mysql
can anyone help???
see #βο½how-to-get-help, or #databases
Hello, I am learning Python and have a problem but I don't know how to formulate it in Google to get some help to get unstuck in my blackjack game assignment : I have a Player class that has a check_score(self) method. When I call that method from a function player_turn(player) the result of the score is doubled... So a player who draws cards for a result 15 in the class, becomes 30 when passed inside a function... I don't know how to get unstuck...
How do I write this in python please help??
how do I write this in python please help?
this channel is for discussion about how to teach computer science, but you can find out how to open your own help thread in #βο½how-to-get-help
same to you @hazy dust
that was 5 days ago
Is there like a "reading list" for people who want to become better mentors/teachers in programming? Considering building a better reading list that actually would start with Math pedagogy since it seems like that's more of a beaten path, per se
we don't have such a reading list, bet we'd be interested to see what you come up with
maybe we could pin some resources in this channel
this channel is for discussion about how to teach computer science
oh, sorry
[HELP]
Hello, I am learning python now.
I've built a very simple python backend for test but it occurs CORS POLICY ERROR.
for python developer, it's very simple and basic problem but for me it's very difficult.
How can I solve this problem? Please help me.
this is my simple backend.
from simple_http_server import route, server
@errant ledge("/isvalid", method=["GET"])
def index(email, password):
return {"res": "hello world!"}server.start(port=9090)
which code should I add?
Please help me.
this channel is for discussion about how to teach computer science, but you can find out how to open your own help thread in #βο½how-to-get-help
Does anyone here know of one or more good dataset(s) to teach a (set of) lesson(s) on data collection, cleaning, visualisation, analysis, and preferably also linear regression?
guys how to print node values level by level in binary tree . eg : values in nested list according to its level
bonjour y a t'il un module python qui permet d'interprΓ©ter le langage des signe
hello is there a python module that can interpret sign language
probably want to implement a variation of breadth-first traversal: https://www.geeksforgeeks.org/level-order-tree-traversal/
Greetings. How do those of you who teach, teach multithreading and multiprocessing? Are there any good teaching materials other than the regular docs?
in what context are you trying to teach it?
I'd teach the general concept first. Not docs stuff. You need to understand what is a process, what is a thread, what each has access to... etc before you actually learn how to use them. Understanding underlying stuff is very important to use those properly, to know where to use them, to avoid some mistakes
My professor gave us interesting excercises that made us think hard about what order operations happen in when using locks
But it really depends on what level you're teaching. I think for beginners / people that haven't head to deal with multithreaded programming before, it's important work out what parallel execution means, maybe by reviewing on how a computer operates on synchronous code first.
And also, don't skip terminology or dumb it down. Alot of student's i deal with have no idea what an "execution context" is, but variations of this term are used alot
does anyone know altair python?
this channel is for discussion about how to teach computer science, but you can find out how to open your own help thread in #βο½how-to-get-help
I'm thinking that a more complete discussion of multithreading/mulitprocessing would be useful to people who learned Python but without the "hard parts". I want to see what's already out there first.
hey guys can anyone suggest a good website for data structures algorithms
!resources algorithms and data structures
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
I'm looking to begin learning a new lang, I started learning Python ~5 years ago, I've babbled a bit in Javascript/Node but never found myself past the basics or ever really needing to use it. I'm looking towards a C Objective language, so anything like C, C#, C++
I'm hoping to be able to create mobile applications / possibly games, etc. But also hopefully still be able to do what I already could with Python.
Any advice I can get would be super helpful
this channel is for discussion about how to teach computer science, but you can find out how to open your own help thread in #βο½how-to-get-help
man
This is Turkish Python!
i didnt know this existed
I heard about this book for the first time a few weeks ago. I'll be interested to hear what you think
guys need help with python code? anyone here?
@lapis cove see #1035199133436354600
I loved how the dude on this picture looks so much like Hermes Trismegistus, quite apropos imo! May your studies bring you joy and wisdom!

Hello, can anyone indicate a website where I can practice basic Python?
Thereβs even a course on it from a well-known Python person: https://www.dabeaz.com
I think i got it locked down
The only issue is my students are non fluent in English
And its a bit difficult translating to arabic all the time
So instead i use analogies that way they get the bigger picture
am i stupid for having to spend hours just to solve one question from a coursera course? This is what I have been experiencing since i picked up python 2 to 3 months ago
not necessarily
how so?
depends on the question
if its "write this game with a gui in python" probably would take a beginner ~2-3 days
if its "write a number guessing game in the console in python" i'd suppose ~15m
15 minute for that for a beginner is way low imo
import random
inp = int(input("guess number"))
randomnum = random.randint(1, 10)
if inp > randomnum:
print("the number is lower")
elif inp < randomnum:
print("the number is higher")
else:
print("you got it!")``` like thiis type
I've given students all the parts and they still took more than 15 to complete things like this
And I'm talking adults
It isn't really about age, more about experience with programming
If someone just started, it will take them more time
Absolutely, just trying to show that it's age independent. Students could also mean 6-year-olds, so π
/imagine
this is the wrong chat for that
you can print before the for i in range and after
what do you mean ?
guys help
i want to make a quiz but i don't know the problem
iit's a question if the answer True it's Great job but if not try agein.
but that not work :/
any advice pls?
this is the wrong channel for that
try #python-discussion or a forum post
U have capital variable 2 times wich makes 1 useless and for your quiz u could do
while True:
If input(βyayβ) == capital:
print(βniceβ)
else:
print(βtry againβ)
I would have made the full thing but Iβm on phone
maybe it sounds funny but im new and a teenager. i just couldnt find out how can i download this version of python can anyone help?
@distant lava hello
this is not the correct chat to ask I will tell you how in #python-discussion
ok sorry
ya np
Hey all! Iβll be teaching a higher ed course next semester on python/analytics. I see @slim heron basically asked my question earlier this month - but is anyone aware of good intro python course materials / course shells / slides / etc. ? I am aware of Python for Everyone which is alright-ish
R has a much more refined resources in this area with R Studioβs data science in a box, and with Wickhamβs R for data science book / lecture materials.
this is specifically about teaching Python to future analysts?
I think the most important thing for such courses is to be clear what is expected for the students to know before they show up on day one
otherwise you'll get a mix of "I already know three programming language sand advanced stat" to "what is a variable?" type peoples
how can i learn programming structures like facades, proxies etc..
a combination of 1) reading a book on software patterns and 2) using those patterns in practice
Hello All,
I hope this is a good channel for this topic. I'm trying to teach myself github best practices. I've confirmed the following as necessary topics to master:
- Enable MFA for the account
- Use branch protection rules
- Use a security scanner on your code.
I'm trying to learn more about #2. Specifically what I've done is I've created a github repository and pushed a project from my WSL machine. I then setup a branch protection rule with a name pattern that exactly matches "main" which is the name of my branch. I also selected "Require approvals" as set it to "1" and I've also set "Require review from Code Owners". After making this change I'm still able to push from my WSL machine as an anonymous "root" user. Therefore my questions are:
What mistake did I make?
What resources is anyone else aware of that I can use to learn github best practices?
Sure - the program is pitched as a no programming experience needed sort of thing. There are always varying levels of capabilities within a class though.
Exactly. Intro python course thatβs a semester long. Foundational to their future courses in other analytical spaces (i.e. machine learning, data mining, etc.)
I found a Redditor (marko_knoebl) who has posted their slides for python courses.
https://marko-knoebl.github.io/slides/#python
Not really as extensive as I was looking for but probably the best resource I've found so far. Hope it helps anyone in the same spot!
I am learning python
so I have some example
i can`t solve it
For help with Python try the #βο½how-to-get-help section, this channel is for discussing how to teach python instead π
hey
Hi what is keyerror 6
hey is codecademy better than like exercism to learn python as begginer
@hallow saffron @bold sierra this is not a place to get help, if you need help, please go to #βο½how-to-get-help
What is that
okay sorry
@stone shore You're a teacher? :p
For traineeships mostly, but yes π
@stone shore What kind of assigments do you give em? π
Depends on the training I'm giving at that moment, if it's python basics it's mostly writing a for loop or function that combines multiple concepts. If it's further down in the data related path it might be doing an analysis or visualisation
But all the assignments are during the training hours for my cases
oh
How useful/useless is this - found it in a pile of old books.
Python 2.2 is crazy old. The language is a lot different now. So, I wouldn't use this.
Itβs only future is to be recycled then it seems π thanks
what are the differences between 2.2 now? I am more familiar with python 2.7 up
I don't even know. I started at 3.5
its only __future__ is to be recycled
im sorry
from __future__ import recycle
Any tutorial/tip on how to understand def function better?
Anyone want help in any Python project related to machine learning, analytics work, college project/assignements
just message me
For help try #βο½how-to-get-help or #data-science-and-ml, this channel is for talking about teaching, not actual teaching π
You can look into stack overflow for examples and understanding on def some_function(blah, blah):
or make your own example too:
def isPrime(n): for i in range(2,n): if (n%i) == 0: return False return True
any number divided by itself or 1 is a prime number so like 2 is or 3, and 5 etc...we are looking at the remainder thats what the % (modulo) does if its == 0 then its not a prime number.
is
2.7 is already pretty close to around early 3. As in, it implemented a lot of python 3 changes as optional stuff so people could make code compatible with both python 2 and python 3 for easier migration.
But as for changes...
2.2 was released in 2001. That's 20+ years.
2.7 has been released in 2009, and has finally been dead for 3 years (finally because people kept saying they didn't have time to migrate etc, so it was moved back and back).
2.7 released together with 3.1.
We're at 3.11 now. So 5 py 2 versions + 10 py 3 versions
So there are a looooot of changes. Python 2.2 didn't even have bool type, it was introduced in 2.3.
I started python during 3.4 (and 2.7) time, I only know the bool thing as trivia tidbit, but here it shows very well that 2.2 didn't have much we know now
pretty confident.. ||fucking cool||
there's a lot of changes in the new python3 syntaxes as well as modules so you will need to see the python docs to have a better understanding of what changed and updated. You can see this link ---> https://portingguide.readthedocs.io/en/latest/
Hi! These are my queries:
- Principles of parallel programming in Python
- What are the differences between concurrent and parallel programming?
this channel is for discussion about how to teach computer science, but you can find out how to open your own help thread in #βο½how-to-get-help
Seeking for any help in ros2 foxy/humble environment. Im facing a problem i cant find any info on google about if anyone has experience in such environment please DM me.
while 1: or while true:
Which is best?
while 1 fewer keys; while True better semantically. The latter is used in stdlib now.
while True: is the clearest
Neither are different in terms of performance if that's what you're asking
True is faster by a little margin
Wat π
1 needs to have .__bool__() checked
They produce the same bytecode though
nvm yeah
If you're looking for help with your code try #βο½how-to-get-help, this channel is for discussion about how to teach instead
Is there a similar discord server for bash? I have some questions about bash I can't seem to figure out just from googling
Thanks!
Guys is python for everybody course found on coursera a good course, or you have another suggestion, i already watch the first part out of 5
But i need to make sure i will be at good stage if i continue
If you like it, and it helps you practice & learn new things, it's a good course for you. It goes in five chapters from basic - visualization, so don't expect a thorough course though, they will probably only discuss general things
Thanks
How do i find team members for my project?
A not right channel to ask, B you ask programmers in correct place or hire them on a freelancing site or setup job listing.
this channel is for discussion about how to teach computer science, but you can find out how to open your own help thread in #βο½how-to-get-help
Oh sorry : (
thats crazy
Hi, this channel is for discussion on how to teach. For python related help you could check out #βο½how-to-get-help. But this seems to be c++. It might be best to look for a server that focuses on that language as I'm not sure that you'll have much luck in the off topic channels with this
Has anyone ever used this? https://en.m.wikipedia.org/wiki/POGIL
Process Oriented Guided Inquiry Learning (POGIL)is an activity-based, group-learning instructional strategy. The main objective of POGIL is to help the students to master the discipline, content, and develop essential learning skills simultaneously.
POGIL was devised in 1994 to better teach general chemistry. Today, POGIL is implemented in a wi...
yes, though not for programming
it was used in my ap bio class. personally I found them terrible. they force you to slow down for everyone in your group when done properly, and not working in a group defeats the purpose
though judging from that alone, it is probably helpful for the people you might be slowing down for
in HS chem class yeah
though personally im not a fan of these new "activity based" or "project based" learnings that schools are doing
i always feel like i learn best when a teacher just lectures
we used them in my first two CS courses. and I liked the structure of the worksheets, but forcing it to be a group thing with a "reflector" and a "spokesperson" seemed bloated. and a bit pretentious.
though we did have one whole thing about modulo, which I think was a waste of time.
for me, it depends on the class (and the teacher). I'm not against lectures, but the problem is keeping students engaged, so the effectiveness of the lecture boils down to the teacher and how well they can present the content. I've had some teachers who were boring to watch talk.
we didn't do that. it was basically just "work through this packet as a group. don't go to the next section until everyone is done the current section"
but we often say in pydis one of the best ways to learn is to do projects
i think programming is something in which you have to actually apply your learning to get a thorough understanding. there are so many different ways you can combine different programming concepts/ideas that you only ever get a feel for if you use them.
that's also true for solving math/stem problems
i don't disagree there, wasn't sure if robin was referring to programming or general
I meant for non programming, should've clarified
Subjects like math or science I find lectures work for me
But of course that's probably not the case for everyone
For math, I find practice helps a lot
but to add to that, watching someone else do it (in this case, a teacher) is also super helpful
This is the wrong channel, #python-discussion
my bad
should functional concepts (like first class functions, closures, list comprehensions, etc) be taught before oop
hmm, in my opinion, I feel basic use of classes in your code would be better introduced before more nuanced (if that's the right word here) features like the ones you've mentioned. Closures and first class functions would also pair well with being taught alongside decorators.
I think decorators should follow higher-order functions. You could introduce them with map and filter, provide some practice to get people used to the idea that no special syntax is needed and functions are simply objects, just like ints or lists, by reimplementing map, filter and some simple things from itertools/functools (reduce, for example). This is also a good place to mention those modules as well as list/dict/set/generator comprehensions as the generally preferable modern alternative to map-filter chains. Follow that up with the idea that since functions are regular objects, you aren't limited to accepting them as parameters, but can also create and return new functions. Practice could be a simple composition function, a reimplementation of functools.partial to introduce *args, **kwargs, and an implementation of functools.cache to finally drive home the idea of a wrapping function
After that point you can simply mention that decorators are syntactic sugar for passing a function or class to a higher order function and saving the result, so it doesn't look like magic
Hmm, I disagree. I think it is easier to explain to someone how they can create functions inside of functions, rather than explain how functions are also objects and can be assigned attributes, etc.
I believe that most people are able to buy an explanation like "You can define functions inside of other functions" and that "Decorators replace the function they're placed on". The map reimplemenation and explanation of higher-order functions can be done later in my opinion
When I've explained decorators I usually start by showing examples of factories (creating functions inside of functions) such as:
def printer(message):
def inner():
print(message)
return inner
run = printer('Hello')
run()
run()
After this, you can continue explaining usages for wrapping functions (I use the example of converting arguments from strings to ints for arithmetic functions) and finally use the decorator syntax.
I think the fact that functions are objects and can have attributes is something that should be taught late/not at all. Adding attributes to functions is almost never good and the more sensible approach is a closure
I need help, I need this code port to fetch the drop down variables, I would like it to be the .
Try the help channels via #βο½how-to-get-help
This channel is for discussion on how to teach instead