I feel like I can't really get into a proper discussion about this topic without defining some words. What is a genius? What does genius have to do with "creative?"
This might be a semantic thing. Where there is less of an issue depending on how you define some words.
I don't know that I can engage more in this conversation because we will probably spend most of our energy arguing about semantics.
#pedagogy
1 messages · Page 5 of 1
Yah, if you look at, say, Montessori schools (teaching young kids), the idea is to let the child follow their interest rather than try to control it. You can set the stage, but if you want full engagement, you have to let them choose their path. If I wanted to teach someone something new… or more particularly, if I wanted someone to really learn something, I’d try to connect it to something where they already have some interest/aptitude/experience.
@cold bramble How do I report someone?
DM @viscid mural
bro i need an urgent help
we tend to code a student management system in python for our project
if anyone is willing to help pls dm me
@median comet please remove your messages from this channel and read the instructions in #❓|how-to-get-help
huh
why are you pinging me lol
At what point do you consider someone to be "too green" and instead of holding their hands through something, you just point them to !resources?
As in, there are a lot of new people who just start learning that show up here. And while I want nothing more than for more people to learn how to program, new people also tend to require the most amount of effort to help. In a void, I have no issue to sit down and help someone through a problem. But people have other things in their life and can not endlessly dedicate their time. So where do you draw the line? And how do you determine how to draw the line?
by "too green" do you mean someone who is still too early on to be able to help? that's just a new sorta wording to me :P
yes
oh then definitely, though it's a very specific situation - people who are literally asking how to get started
if someone don't know things like print() or assigning to variables, i'll point them towards one of the two books that every beginner ever gets recommended (byte of python / automate the boring stuff)
but beyond that, i'd be happy to explain and clarify what something is or does, even something fairly basic like if/while/for statements
the key thing there is i'm happy to explain or clarify those things, but i don't really feel like being the one to introduce those concepts (with a whole load of special-cases, caveats, and exceptions, but that's probably the general rule of thumb i stick to)
- "Okay, I've learned
ifstatements, what's next" -> "I'd recommend following a book like ABOP/ATBS, they teachwhileandforloops after those [insert link to book]" - "So how the hell do
ifandelifwork?" -> "They work by evaluating the expression and [bla bla bla]..."
I suppose its less of a case of how early someone is, and more how open-ended their question is. At least, that's how I approach helping here, I'd be more inclined to actually introduce and walk through those things if I were to actively tutor someone
I'm putting together a 12 week program to train fresh hires python programming along with topics like basic commands in linux, git, etc.
Has anyone done something similar and are happy to share the outline/schedule of the program?
yeah.
@shrewd sentinel good idea.
I am studying about the Django.
Your program will be helpful for me
where did you find out about this experiment? (im aware this is a late response, i just wanted to find out)
I heard this from one of my teachers and then I researched it
ah, i see. do you have the link to any articles or papers about it?
Uh unfortunately not its been a while since ive been researching it
You can google it though im sure that something related to the experiment will pop up
alright, thank you
Dear, I am new here and I have created a youtube channel for Pyhton and want to pots it here? Is that possible ?
We don't allow self-promotion, so we don't have a channel for that.
Ok, thanks @misty dirge , no problem.
Hello, I am new her and I have a project on web scrapping and generative website. Therefore I would like to learn how to use selenium. Do you know where I could learn some useful things about selenium ?
Please read the description of this channel.
can someone help me write asearch algorithm?
how to start teaching someone? i have a friend who was watching those suuuuuuuuper long videos of python. i dont think they work. i think he need to get his hands dirty but i dont know how. it is not like i can tell him what projects he should do, won't that become homework? anyone faced these b4?
(idk if im actually qualified to teach anyone, im just beginner++)
Watching "long videos" is a pretty terrible learning strategy by itself. You won't passively learn the material by keeping your eyes on the screen. They should be learning new language features incrementally, and writing code at each step to apply the new features.
is there a table for language features? (like from ez to hard stuff)
Here's one that I made a few years ago.
- Basics
print('Hello world!'), basic math operations, variables- Basic boolean logic, if statements and indentation
- Lists and dicts
- Loops
- Functions
- Importing from the standard library
- Exception handling (
exceptonly) - f-strings
- Sets and tuples
- Intermediate
- Defining your own class
- Mutability, references, and garbage collection
- Everything's an object
- {list, dict, set} comprehensions
isvs==- Docstrings, commenting
- Advanced exception handling with
raise,else,finally breakandcontinue- File IO (with pathlib) and string manipulation
- Advanced
- The Python data model with inheritance and dunder methods
*argsand**kwargs- Context managers (
with) - Decorators
- Generators
damn nice thanks! im unsure where to classify objects 🤔
what do you mean? everything is an object. I have an item for introducing that concept explicitly.
uhh im thinking whether to teach "everything is an object" first or keep it secret for a while
I wouldn't frame it as "keeping it a secret", but telling someone that "everything is an object" isn't helpful if they don't even know what a "thing" is in the context of programming.
let alone what an object is, and why it's remarkable that everything is one.
you are welcome!!!111!!!
this is actually really good (and works well as a sequence to teach how to type check in a type checking course as well) thanks
Operators aren't objects are they?
They aren't, but they aren't "things", either.
same with keywords (except None, True, and False)
It is remarkable though I agree
put another way, any expression is an object. 2 + 2 is an object and 2 + is a syntax error.
So the expression must be complete and evaluate to a single value in order to be an object
all expressions evaluate to a single value (unless you consider a n>1-tuple to be n values). and incomplete expressions aren't actually expressions--they're meaningless, as far as the language is concerned.
Haha touché, and makes sense
that's why syntax errors are raised before any of the code in a module is executed. if the module contains an ill-formed expression, nothing that happens before that part of the code is executed could possibly make it make sense.
I never really noticed that behavior before, thank you for pointing it out!
would you say that this would work for any language?
I wouldn't say so, practically everything in the intermediate / advanced categories are python-specific, and even half of the basics are python-specific too
its pretty tricky to give some roadmap for any language without your roadmap being too generic to be of any actual use
any good references materials !?!!1!1?!//?
Definitely not.
!resources
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 have some problems in my python program can you help
This channel is about discussing teaching methods. If you'd like to get specific help with a problem, check out #❓|how-to-get-help
<@&831776746206265384> advertising
!cban 1109021065964945428 ads
:incoming_envelope: :ok_hand: applied ban to @swift talon permanently.
Hello everyone 🙂 I am new here!
Just want to understand if I can find here tutor to help me improve my python skills from 0 to advanced level.
This channel is for discussing methods and practicing for teaching, not to solicit teaching.
It's very unlikely that you will find a stranger who's willing to give you end-to-end tutoring for free, but you can use our recommended resources (see the channel description) and use the help forum when you have a specific question (see #❓|how-to-get-help)
Thank you for answer, but I didn't mantioned that I need it for free. Ofcourse I will pay for education 🙂
Actually I am checking some courses now, from other topics in this channel, thank you 😉
You can't solicit paid work of any kind here.
actually I asked for any tutor, not for "solicit work" or etc. )) Anyway, I solved my needs now, thank you!
While you're at it, have a look at these resources here #pedagogy message
When I have spare time I skim through some of them
Please make sure that all subsequent message are about the channel topic.
You know, since you mentioned it, I do have something that is much more aligned with the topic
How would you teach systematic ways of converting a recursive algorithm into an iterative one.
Would it be of any use outside of an educational setting?
How would you teach rebuilding a tree given a traversal?
Same q, is it useful?
Optimizing the implementation of "naturally recursive" algorithms is something most people would prefer to let a compiler handle nowadays, but being able to convert between them should follow naturally from an understanding of how each work. The moment a student understands why tail call optimization happens and why some recursive patterns can't and require a call stack is when they could implement it iteratively with a state machine.
Yeah so when I compare iterative BFS/DFS to their recursive counterparts, BFS uses a queue for example.
So just using a stack isn't sufficient imo..
That being said, where would be the right place to learn these topics..
the queue is serving the same purpose as the call stack does in the recursive form there.
Yes but still queue != call stack. Is this type of insight, a systematic way of handling things captured in a book somewhere?
Assume there is a person and they want to write efficient iterative algorithms, what should they read?
I don't have a good answer for "what should they read", different people will require different depth or information for it to "click" for them. I've seen some exceptionally bright students intuit a mostly correct understanding from their existing math knowledge and being presented with quicksort and being prompted to think about it.
At this level of learning, it's less a checklist of what to read, and more ensuring you know how to figure out where the gaps in knowledge are and how to go about filling them. Many good educators can work with someone and identify where they are missing knowledge.
I also wouldn't focus on writing efficient iterative algorithms, but writing efficient algorithms instead. Limiting yourself to things that appear iterative will make writing good solutions harder, deal with the program specific limits of how to express the algorithm only after you have the right algorithm.
tail-recursive functions can systematically be rewritten as while True loops, and learning how to do that could help a student learn how stack frames work. but I don't think understanding how stack frames work is important unless you're designing a language implementation or are an academic
I'd disagree on that. Understanding the basics of stack frames should be something every developer has some knowledge of. You may not need to know all of how languages and compilers optimize it, but the concept should not be foreign to people developing professionally.
what about stack frames do you think people need to know?
- That they exist.
- That they are used to handle code execution state.
- That they aren't free.
- Reasonable places where languages may use them.
- That some compilers may eliminate stack frames in some cases, but that this isn't universal.
Beyond that, (and without much depth to that necessary) not much unless you are doing something lower level.
Handwaving away that this happens leads to people not understanding a detail that is definitely important when it comes to basic debugging as well as thinking about how much memory is used to solve problems even in higher level languages.
I dont expect anyone not doing systems programming or compiler design to need an in-depth knowledge here, but I do expect people to know this is being managed at a very shallow high level overview, and the basic consequences of that.
I think it's important for people to know that function calls higher up the stack still exist while they're waiting for lower function calls to return, but I don't think it's important that people know that "stack frames" are what that unit of implementation are called in language design.
(I don't think it's even important that people know it's a stack--all the function calls that ever occur in a program could be visualized as a tree.)
-
I think giving people the actual language used to discuss concepts that they have not delved into in depth is important as it gives them a good way to talk about it going forward in a way that they will be understood. While I agree that we could theoretically leave out it is usually implemented as a stack, the term stack frame has a well understood technical meaning and is probably the right term to use to ensure that someone being taught "just enough" doesn't sound like a rambling idiot when discussing what they know they don't know more on, but as someone who is informed or aware of, but not knowledgeable in that area.
-
It would be more productive to think of a program as a DAG than a tree (Lets not get into that either is topologically the same for the case, as I only mean as a means of thinking about it)
I never want to walk away from teaching someone and leave them without a clear direction to go learn more if I know what I taught was intentionally incomplete to cover what they needed at that time.
Throwing too much jargon at a beginner is a bit risky, as it can easily overwhelm. If you start in Python and maybe go to C, then I feel you could bring up stack frames at that point without issue, given they already have the idea of a call graph in their mind.
It occurs to me that we haven't really established what kind of student we're talking about
if you're talking about DAGs that are basically trees (there's exactly one path from the root to any other given node), I'm not sure that conceptualizing it as a DAG really adds anything. you could even think of returning from a function as following a path in reverse.
based on the initial statment of teaching someone to convert and optimize between iterative and recursive alogirthms, I assumed a student with at least some math and algorithm background already, but neither the learning setting nor the actual foundation they would be learning from here were touched on with precision.
While I would hope most people working in the related areas can freely reshape the problem statement from one to another, framing it as a graph to begin with should lead to better outcomes in most cases as much of the existing work in analyzing programs is heavily rooted in graphs (and not just because that's where people are working on it, but I'd need to go find some specifics if you want to discuss this further). I specified as a matter of thinking about it, and the note on topological equivalence because of this.
Guys I wanna know, which python projects will make me an advance python developer after I learn the basics python? (Asking projects except pygame)
This channel is not for study advice; see #python-discussion
I am going to post a simplified code snippet that a student I'm tutoring wrote. For context, this student is currently in their third semester of a 2-year data analytics degree. In the first semester, they took a course called Python for Developers. In the second semester, they took a course called Data Engineering that focuses more on pandas. Now, in the third semester, they are in Predictive Analytics focuses on classification on regression using scikit-learn.
They wrote code similar to this:
def func(var: int):
for _ in range(10):
# Do some stuff (unimportant)
if var < 3:
x = 10
# Code that references x such as print(x)
func(1)
func(2)
func(15)
They got an error to this effect
variable x referenced before assignment
The code that checks if var is less than 3is important. So is the code that assigns 10 to x. However, we only wanted to assign 10 to x if var was less than 3. In addition, the code that references x is also important. These lines were correct and therefore should not be changed. In order to fix the error, I posed the question "How can we guarantee that x has a value regardless of whether var is less than 3 or not?" Guaranteeing that x had a value would mean that we could reference it whether var was less than 3 or not because referencing it was important to the problem.
They didn't really have any ideas about answering my question.
I went on to show them a simpler example that I thought would take away all other distractions in the code.
if 2 == 4:
chaos = True
print(chaos)
I said that this code would also get the reference before assignment error. I also said to assume that these three lines were essential and should not be changed. Again, I asked how we could guarantee that chaos had a value even though2 is not equal to 4.
Again, they still had no idea how to fix the error.
I'm wondering about what I could have done differently. Or what other strategies I could have used to lead them to the answer.
Perhaps first check to see if they understand the concept of scope. Then ask if chaos is in scope of the print line.
Hmm, I hadn't thought about mentioning scope. That being said, unfortunately I don't have confidence that that concept wouldn't go over their head.
There is no way around it really though, scope is essential to all programming languages.
In Python this mostly boils down to "at the same level of indent or even further indented and each function has its own scope." (Ignoring details of modules and all that)
the issue in both snippets is contained in a single scope so i wouldn't be too concerned about explaining scopes
instead, i would come back to the original function and let them explain what the function is supposed to do, e.g. "why is the conditional assignment needed? what should the function do if that condition is never met?"
if they get that x should start off at say, 0, based on whatever problem description they're given, it should be intuitive to know that they need an assignment at the start
(another way i would look at it is that the NameError/UnboundLocalError indicates a logical gap in their algorithm)
I explained why the conditional statement was needed and what part of the problem it solved. I also said what the function should do if the condition is not met. I think what they didn't get is that you shouldn't conditionally assign a variable but always reference it. If you always need to reference it, which we do in this case, then it always needs a value. They didn't seem to know how to guarantee that x has a value, regardless of what happens in the if statement.
While technically you can get away with x being in an inner part in Python, I would simply state that x needs to first be defined in the same or lesser indent level.
For example in say C, you would get a compile error, x not being declared prior in same or higher scope level.
(I consider this a design flaw, as I have never used code that relied on an inner part defining a variable, but that is getting off topic)
Are you saying you can get away with conditionally assigning a variable that you are guaranteed to reference later? I might be misunderstanding what you're implying.
Python lets you do stuff like: ```py
for i in range(10):
... print(i)
...
0
1
2
3
4
5
6
7
8
9
i
9
ah yes
In (most?) other languages, this would give you an undefined reference to i error.
And I would consider it a bad idea to rely on this behavior in your Python code. And it's also a strange Python detail, so I would just side step that detail and just say that they can't access i outside of the for loop for simplicity, because it's trying to access i in a scope outside of where it was defined (even if in Python it's technically valid / in (dynamic) scope).
This means the problem can be simplified (with a convenient lie) to it being about indent levels only.
if they really don't understand that, i would discuss why the following code can't run: py print(x) which is that python does not know what the value of x is, and will not assume its value
then show how it is defined: py x = 123 print(x) and how variables can be conditionally defined: py x = 123 if x > 456: y = 789 print(y) because python does not assume the value of a variable, it will raise an error if the conditional block is skipped and the assignment isn't executed
i would rather explain it as "the entire program starts in a global scope, functions create new scopes, and variables can't be referenced outside of the current scope" which is simple enough to understand why the conditional assignment conditionally works, and in this case doesn't need to cover free vs. local variables and global x / nonlocal x statements (docs)
This is the more correct answer, but I feel that it may be overwhelming, and it's much easier to just say that x = 10 is not in the same or higher indent as the print(x) line, and therefor it does not exist at that time.
That simple rule will lead to correct code from the student, and I don't think they would be missing out by not making use of conditional assignment of variables dynamically in scope.
is there anyone who tendes to teach me smt about linked list?
Hello, please read the channel description and #❓|how-to-get-help
For any experienced people who've worked in the software or Maths industry for a decent amount of time, I have a question. So, I'm studying Maths and I write down my notes in Microsoft OneNote. What's the best convention that I should follow to capitalise the titles of each page? A title with a single term, for e.g., "Intransitivity", would obviously have it's first letter in uppercase. However, what about a title like "Transitive relation"? Should the letter 'r' in the word "relation" be uppercase? Although the rules of English say that it should be lowercase, the title "Transitive relation" collectively forms a single noun. Also, what about conjunctions? Is there a general guideline that scientists or experts follow to name the titles of their files and notes? Would love to hear your insights and get some help.
This isn't really about pedagogy, but I think you can do your own notes however you want
but "transitive relation" is a noun phrase, not a single noun. "transitive" is an adjective.
Here is a list of title styles. You can do Chicago style or Wikipedia. Or anything you want because it is your notes.
https://capitalizemytitle.com/
its true that i want to be an aerospace engineer but i wanna do somrthing with python help i cant decide
please go to #career-advice
kk
Channel Topic: Discussion of the methods and practices of teaching. Not for study advice.
ok
Oh, yeah, you're right. My bad! Should've posted it on another channel.
you can do your own notes however you want
I asked this question because I wanted to follow a consistent convention to capitalize my titles throughout my notes. If I had to choose any convention, I might just stick with the one that experts in the field of CS and Maths use.
Btw, sorry for replying to your reply after 24 hours. I was onto something and didn't really check my Discord until now.
Hey, thanks for sharing this link. This is exactly something I was looking for! Also, sorry for replying so late to your reply. I didn't really get to open Discord since I posted this message.
So I've been thinking of helping out with the python.org (and the Sphinx Docs) so I dropped into a LiveStream yesterday
https://www.youtube.com/live/oKFSWNf3jFE?si=ksHOKHmZkGy9yKwo
and found it really interesting.
I had heard of Petr in the Fedora community and regarded him as a demigod. It turns out he is super friendly and was happy to have my input.
More context on that particular work is at:
https://discuss.python.org/t/improving-python-language-reference-plr-documentation/36709/29
ask in #python-discussion
I am seeking assessment framework(s) to (a) understand what knowledge a student is coming in with and (b) to set a baseline that is the minimum requirement for all students to have in order to be invited for different levels of training.
Hello @true sentinel, self-promotion is not allowed here (and neither does your tweet seem to be on-topic in this channel). Your message has been removed.
i have problem with me code can any one help
Whilst preparing a help thread, I rubber-ducked myself into finding the solution to the problem (granted it was as simple as reversing the order of decorators).
Sometimes I wonder whether it's worth it to post the thread, lest anyone have the same issue.
(Though GitHub generally has better SEO on that.)
HI
Hello and welcome to the pedagogy channel, which is for discussion of the methods for teaching python and computer science
ty 🫂
guys, what Python-related lesson do ya usually teach
!silence
✅ silenced current channel for 10 minute(s).
Did you mean ...
» sequence-slice
» sequence-slicing
❌ current channel is already silenced.
✅ unsilenced current channel.
how to teach someone that not everything uses print so return has a purpose?
(what things not use print?)
writing to a file?
making a network request?
making a game (with graphics)?
should printing hello world really be the first line of code (at least in python)? in other languages like c or java it gives you a little bit more insight of the language but in python that's just print hello world. is that useful? if not so, what alternatives do we have?
uh sure
The big thing it checks is that you can run a specific python file.
true, probably the point is actually learning how to properly run it in the terminal
Yea serves as proof the dev env is working. Students knowing how to get a dev env up and running is an underrated skill. If they can't do it it's makes it hard to get set up and code where and when they like.
Either showing them a situation where you call a function within another function, or use the result of two function calls at once.
def double(a):
return a * 2
result = double(3) + double(5)
we also have !return-gif
Has anyone published a set of exercises that map to the python.org tutorial by chapter?
excuse me but what is the website to convert my code into a link to ask in #1035199133436354600 pls ? I have 2 version of a 100L + code to show xD
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
ty but I fixed it xD
I want a genetically modified glowing python so bad 
Real
This channel is not for study advice. Please remove your message from this channel and try again in #python-discussion
thank you
Topic: How to explain variables. My preferred metaphor is that variables are labeled sticky notes that you can put on objects. You can move the sticky note from one object to another. An object can potentially have multiple sticky notes on it. This stands in contrast to the "variables are containers for objects", which is a terrible and misleading metaphor in the context of Python.
Does anyone prefer a different metaphor?
I don't really use metaphors for that - I usually say something like: Variables refer to objects / variables point to values / variable names are aliases for objects
Showing examples like ```py
original = []
same_list = original # refer to the same list
same_list.append(1) # modify the list, which is refered by both original and same_list names
print(original)
for more the complicated things, I like to just link https://www.youtube.com/watch?v=_AEJHKGk9ns
This channel is for discussion of teaching. Please move your question to #game-development
oh sry i didnt understand
“Sticky notes” fails to capture the concept of assignment, and may hinder grasping the meaning of an assignment-statement from/to a list-slice.
Do you specifically mean list slices, or list indexing in general?
I like to refer to them as "names" because it seems like the most direct expression. I don't think it needs a metaphor. Really, I think that "variable" is a flawed term. "Name" is much more clear. It also helps to have some grasp on namespaces, but otherwise I don't think there are that many pre-requisites to develop an understanding. "In this namespace, the object has this name."
I agree, and I think "names" is the term used in the language spec. But the word "variable" is so ubiquitous in programming that I think we're forced to use it when talking to beginners.
For an analogy, maybe we could use the human kind of a name. You have a formal official name assigned at birth, and then in your friend groups (namespaces) you may have other names, but they all refer to the same person, in various places. If a John joins a group that already has a John, maybe he'll be called Johnny in that namespace, to avoid conflict. In a medical setting, John may be referred to as "patient" or "clinician".. similarly to how the same number may be called "dividend" in one namespace and "user_age" in another, depending on its role there.
Yeah, I agree with that notion.
I'm wondering whether tackling the variable/name issue head-on and simply refusing to use the term "variable" when talking to beginners would be a feasible approach. I think that the underlying issue that often causes confusion is that assignment, specifically the left-hand side of the = operator, does completely different things in Python and in e.g. C. But syntactically they look the same and on the surface (in code examples) they may even seem to behave the same way, which causes people to assume they already understand what's happening. This also causes issues when trying to understand whether Python is pass-by-reference or pass-by-value.. it's neither, those terms (and the way they are defined in the C world) just don't make sense in Python, but that's not at all obvious unless you understand the nuances of the assignment operator.
I figure that a large majority people learning Python don't know C (and probably not even any other language), and that the issue is that they're being taught by people who do, and who are misapplying concepts and vocabulary that their instructor used when they learned C.
refusing to use the term "variable" when talking to beginners would be a feasible approach
This is what I do if I'm explaining Python to someone who hasn't mentioned "variables"
A potential approach is kind of a sample method. You give them many samples, and hope they generalize it. E.g. y = 10 + 3, "y is a variable," etc. But never trying to explain what a variable exactly is. Instead let them create their own definition that works for them. You can then probe this by asking them to explain variables to you. Maybe have them generate examples.
FWIW, I've fleshed-out my off-the-cuff reaction here https://bpa.st/BGLQ (This is my first time on Discord—brace for the usual newbie faux pas. At least I did successfully resist the temptation to make any tacky puns about sticky-notes.)
This is an excellent response that I very much enjoyed reading. Though I will respond at some future time.
I did this small youtube short, giving a step-by-step for a for-loop: https://youtube.com/shorts/4km-8NhcMmY?si=FQlbckelzSxObiIk
I remember learning a lot about the code flow when learning how to use the debugger but I haven't seen any online videos that use the same step-by-step method to teach.
For those of you who are learning, does this format help?
i just assigned a beginner to try parsing a math expression and evaluate the result. it seems like he can't get the logic. is this project too hard? what other projects should i ask him to try
If you don't tell them about the shunting yard algorithm (or similar), it can be quite tough to invent bottom-up parsing from nothing.
I've ran across courses that have integrated https://pythontutor.com/ into their online curriculum.
I find it extremely helpful.
oh thats pretty cool! yea I was thinking that there need to be more of these type of resources for beginners. Really helps them understand how the code flows
Do you rember any such courses?
I know this course uses it. https://www.coursera.org/learn/python-basics
BRUH
Hello, this is the channel for discussing methods and practices for teaching. "BRUH" isn't much of a response, let alone to a message that was sent a month ago.
what do you even mean?
I'm one of the more experienced python users in my department and I was asked to come up with resources or provide an outline/guide of what people need to learn in Python to be more comfortable using and developing some of our internal tools.
The skills needed essentially boil down to being comfortable with git+github equivalent, strong knowledge of classes -- specfically some of the python-specific aspects (thinking the property decorator), python's ABC stuff.
The target audience are engineers who know Python from a quick script / small analyses perspective. I'm trying to figure out what resources there are that can cover classes without necessarily re-covering an entire intro course to OOP. My goal is functional understanding, not necessarily in-depth academic understanding. But I'm not really used to approaching teaching from this perspective at this level. How would y'all approach it?
You say target demographic is engineers. But what level? Because ideally, I would just be able to essentially have a reference doc that is structured like docs and often just points to official docs for more details. Because a not beginner engineer should be comfortable with going through docs. If you really want to put in more effort, maybe even structuring each section more similar to the rust docs. A simplified version of course.
It depends on how much content is required and the skill level expectation of the people needing to be taught. However, I am a little concerned on that point due to you making it seem like they still need to learn git? Hence my very first question
Also depends on if this is a permanent guide for internal docs. Or just a quicker thing to catch some people up with what they need to know
What's their background right now? Are they SWEs or other types of engineers? If you're teaching experienced SWEs, Ithere's several layers to it: Syntax - map what they know to Python. Conceptual differences - the "pythonic" stuff that's very different than what they already know. Then practical solutions - cookie-cutter templates to demonstrate tasks they're already familiar with.
I often have a different problem: teaching Python & SQL to people who only know Excel, so a lot of what I focus on is connecting Python and/or SQL solutions to what they already know, rather than a ground up introduction to programming.
While there are ample starter/intro/tutorials, as all know, I just haven't seen a succinct "Python for Senior SWEs" resource that cuts to the heart of the important things a senior engineer (with no Python knowledge) would need to know.
MechEs and Physicists
Hmm, that’s tough. My users are super competent with Excel formulas, so I can build off that. Is there anything to build a bridge from?
My goal is functional understanding, not necessarily in-depth academic understanding. But I'm not really used to approaching teaching from this perspective at this level. How would y'all approach it?
I'm gonna start with your goal and not your audience here, but bear with me as I'm not disregarding the expected level of starting knowledge. Looking at just git to give an example of approaching it this way
Start with the bare minimum they need to do 2 weeks of work, but think about the 6 month frame to compare it to. For git, this is probably just the following git commands (and almost none of the advanced options and subcommands these commands have)
git add
git commit
git fetch
git checkout (or the more modern: git switch)
git merge (might not be needed if you are using something like github, gitlab, etc as merging might be something that you do on a managed server...)
I'd also consider if you expect them to need to get into advanced git use later or not as well as if any existing tools at your disposal allow making this easier (such as the git lens in visual studio code providing a rather capable and intuitive GUI for interacting with git for non-advanced use)
For python, the same applies. Think about what they need to know to do 2 weeks of work. Then think about how to get them to that, then think about the gaps that may leave over 6 months of work. Start by teaching the 2 weeks, then fill the gaps.
MechEs and Physicists
If their starting knowledge is primarily math based and not programming based, I would seriously question if teaching abcs (one of the things you mentioned) is useful to their work. What are they being brought on to do? Can you ensure they are set up for success by enabling them to write more functional code that works within any classes managed by other developers, therefore leaving them to write code that is both useful but also familiar to their existing knowledge?
What is the current state of free CS education?
Last I remember there was FreeCodeCamp, OSSU, The Odin Project, Codeacdemy but I been out of the loop and wonder what else is around, trying to find resources to share with a friend.
MOOC fi has some good basic courses, I know good things about the java one, fullstackopen for webdev, https://teachyourselfcs.com/ for theory (if you can get the textbooks) are the bunch I am aware of.
these are new to me, thank you very much! Will look into them
i want to know how to properly teach and know if my method is correct. i just tell my friend to google when they face bottlenecks and let him try to code himself and i only watch him code. if he isn't able to google i provide keywords instead of giving the answer. i thought this way is helpful as it makes him engage more in coding rather than me speaking. but he doesn't think so and i don't have better ways
what if instead of telling him to google something, you thought of a resource that helped you learn and shared it directly? @brittle totem it's not much more work
meh the resource that helped me is google 🤡
It is the duty of those who come before us to pave the way ahead. Yes, people will need to figure things out on their own. But what you are doing isn’t teaching or helping. If teaching really isn’t your thing (although I do suggest trying to get ok at it, because it helps you master topics) at least try to point to more concrete places that solve the problems. It is ok to help someone and hold their hand a little. Yea, don’t do it for them; but what you currently do sounds the same as if you do nothing.
lol true, thanks for the suggestions i will try to improve
Do not spam.
sorry
I've fallen in love with https://exercism.org/ - I think the exercises are very well designed so that people at different levels can get a lot out of them, and you can request mentoring/code review from a fellow human member of the site community, which I have had great experiences with so far.
@green zephyr please experiment in #bot-commands
ok
I've been set up for a tutoring position at school to help the 11 and 12th graders at their computer science, but I am really struggling to do that. Right now it seems like I am talking to a brick wall, though it makes sense, since I'm in Grade 8, and only a few people actually wanted to get tutored.
youre tutoring older kids? thats rough
I had my first class yesterday, and I kinda embarrased myself in front of all of my seniors.
Any advice?
unfortunately not, I used to tutor classmates and family friends/relatives that were around my age or younger and it was terrible
its much easier to tutor adults imho, some kids would rather watch paint dry than pass their tests
That's quite true, since I had to do a training lesson where I "taught the teachers". Of course, they were very respectful, but I doubt they learned anything.
Teaching, in of itself, is a skill. It takes time and effort to get good at it. Additionally, you are not solely responsible for your "students" success. Try to remember that the people in charge of you also are responsible for you. So don't be afraid to make mistakes; if you are truly in a position that is causing more harm than good, it is not all your fault - it is the irresponsibility of the people who threw into it with no support and help.
Just focus on what you can do and try not to worry about the pressure of perfection, judgment, or anything else like that. Also, don't forget to get engaged with the people you are teaching; find someone you feel comfortable talking to and ask them to honestly evaluate how you are doing and ask if they see any room for improvement. And there is a near 100% chance that you will have room to get better at teaching, so don't let it put you down, just focus on trying to address the issues you can. You might be teaching people, but there is a lot of room for you to learn from your students, so just try to learn all you can. And again, you are likely not alone without support; if you really feel stuck, you can ask the people in charge for help.
Finally, it is not your responsibility to make people want to learn. It feels great when you can spark that flame; but not all educational roles need to be that inspiration. If they are unwilling to learn from you, that is on them and not you. Eventually you might learn how to get around that and make them get really into it ,,, but that is not a quick thing to learn.
But what engages 12th graders?
It really isn’t all that simple. I am being judged, by the head of cs, and my performance will determine the courses that I will take moving forward.
I meant engage, as in take time to talk to them directly and not just from an instructional thing. You don't need to worry about holding their interest type engage
This whole setup seems very .... strange. But you are in 8th grade, I really, genuinely, would not worry about your performance. I mean you are kind of being setup to fail for some dumb reason. But just do your best and nothing else matters. It really doesn't. It might seem complicated and like you have to do well to place well, but you are starting so early in this space that any difference will become so negligible.
I do want to teach them something though, because I am friends with most of the 12th graders. Any hacks for effectiveness?
There is no shortcut here. Be as familiar as you can be with the material. And from there, it all comes down to experience. Taking the time to really understand the content, and optionally practice explaining to a rubber ducky can help. Beyond that, it is really hard to give you specific general advice. It is easier to help you on a specific topic. But not so general.
I taught college students as a highschooler and made a ton of mistakes. But man did I learn a lot from it. I still have a lot more to learn if I want to be a really good instructor, but it helped build my foundation. You will be embarrassed about yourself and perhaps a little insecure. But as long as you are not telling them blatently wrong things, it is fine. Everything else will fall into place with more experience and trying to not be too much in your own head
Rubber duck debugging is something I learned to help me debug, but using it as an audience seems new. Thanks for the help.
My next class is next Tuesday, so hopefully it goes well.
Good afternoon everyone
has anyone here done the python courses from freecodecamp are they useful?
This channel is not for study advice; try #python-discussion
I'm not sure if this would be the right place but is there a recommended way to do a design layout for when you're wanting to start a new program?
ty ty!
appreciate it
Does anybody have good ideas for tutoring a large number of people?
Is this different from lecturing at schools/universities?
depends on where they are now
how many
my advice for tutoring any larger group is practice what you are going to say and have confidence while explaining.
at least when you don't have much experience
I’m not a lecturer. I’ve been selected to tutor a few of my seniors.
It’s a class of about 30-40 11th and 12th graders.
@random topaz what are you tutoring them about
Computer Science
And why do they need tutoring? I'm just trying to unpack what the situation is.
And you're another 12th grader? Or an instructor?
I’m in 8th grade, but this is for some experience. It’s like an extracurricular thing for people not so good at cs to improve their skills.
What concepts do you need to teach them?
Usually I just go in depth about what they are already doing in class.
Which is?
I don’t know, I’m getting the plan tomorrow, since tomorrow is the start of term for my school.
I did do a holiday one… but it was a lot more casual.
I personally don't like it when students have to teach older students just because it is an extra challenge
You! Stop!
Anyway, hello teachers. Had a question for you before I was so rudely interrupted by Ms. Nagatoro.
So, I have had a bit of a . . . . Problem this past week as well as good news?
Good news : I figured out how to get out of the house fast and to stop procrastinating and get to starbucks and study.
Bad news : About an hour into reading this textbook, my brain gets tired. I wanted to do 3 hours today, but the most I managed to do was 1 and a half hours. Any advice?
That doesn't involve adderal? My insurance hasn't cleared yet and even when it does, I need to find a cooperative doctor that is sympathetic to my condition and isn't racist.
thx, sorry MVIII, please forgive 🙏
That’s not the hierarchy system in this server. People can have their own questions and conversations, especially when the person rudely interrupting you was following this channel’s rules.
Oh, dude. . .I was making a Meta-joke.
Because Nagatoro's whole schtick is being a menace to the boy she likes.....?
Is this something that needs to continue?
Is there any person who can be a mentor/tutor for free?
#python-discussion is full of lots of people who will answer questions. If you have a question, ask there... think of the entire channel as a mentor/tutor, rather than one person.
kk
Topic: Pseudocode. Some instructors want their students to use pseudocode during introductory programming courses. Personally, I didn't see the point (in my intro to Java course), but I already had a basic understanding of if statements and loops (in Java and Python) when I started the course. Did anyone with zero programming knowledge during an introductory course find it helpful?
I would not see the point if it was Python. With some other languages it may be easier to understand pseudocode rather then language construct itself. E.g. compare from the perspective of a person that's new to programming:
int i;
for (i = 0; i < 5; i++) {
printf("%d\n", i);
}
vs
FOR I FROM 0 (INCLUSIVE) TO 5 (NOT INCLUSIVE)
PRINT I
END FOR
||which just goes to show that people shouldn't teach C++ in an introductory course
||
It was Turbo Pascal in my case, the point still stands. :)
that code is Turbo Pascal? so it's equivalent to C++ for that particular program?
Nah, that particular example is C indeed. I would not expect TP to be too different though, I don't remember syntax any more... :D
oh right, it can't be C++, cuz it's not std << or whatever
Well, I stand corrected. Turbo Pascal isn't that bad. Here is what it would look like there, more or less:
for i:=0 to 5 do writeln(i);
Even though, pseudocode gives you that additional versatility and allows you to pick level of detail you want. Like cut corners or describe something in a very detailed way without any respect to any particular programming language limitations or actually existing concepts/constructs.
So, I'd say it has it's uses, just not everywhere.
Here's a weird one. So functions are objects, right? Where are the parameters stored within that object? They don't seem to be in the __dict__
They are passed when function is called. Function-as-an-object is not called yet.
seems like a question for #internals-and-peps, but the parameters aren't stored in a way that's accessible like that. If the parameters are annotated, you can see them with func.__annotations__.
There's also inspect.signature, which can tell you a lot about a function, but I think it depends on C-level access to the object.
That said, I'm not sure whether it's possible to somehow retrieve and inspect "a called function" object.
Oh, you might be referring to parameter definitions, not values?
let's move to #internals-and-peps
Oh derp, right
I'm pro-pseudocode, i think it lets you focus purely on the structure of some code over the exact syntax, or even variables/objects you're using depending on the situation, which while not the most difficult hurdle to overcome, definitely gave me help personally when starting out. It's like an intermediate between just drawing flowcharts and actually writing down code
it also sorta serves the purpose as something that the teacher can use to convey what code is meant to do, without actually having to give the student(s) the exact answer to some given problem
like in this very server, when helping some struggling with implementing some given bit of code, i'll sometimes walk them through the rough pseudocode or steps that the code has to do, letting me as a helper provide help without providing the entire solution
nope i neither drew flowcharts nor wrote pseudo code, even during introductory. i do them in my head and if its something complicated then decomposition helps. i also dont teach using those two, normally i use questioning because it is very powerful
This reminds me of the dark times of UML where Rational Rose was considered the tool of real engineers. I’m not sure if UML is still seriously taught. Related to the prompt: Scratch could be considered a form of flow chart programming, right? Curious whether the prompt should include people who learned using Scratch first
Me personally, I did a lot of diagramming in my intermediate levels of experience: when I knew enough basics to understand the vocabulary but didn’t know enough patterns to decompose efficiently
Guy I want to learn how to develop a web but using a python as a the foundatins, do any of you guys have the map or road map to build a web?
This channel is not for resource suggestions; the link in the channel description might help answer your question, however.
I taught at a bootcamp, and I definitely heard beginning students have a good idea and then completely lose track of it trying to recall minor syntax. Sometimes they’d get so fixated that they forget what problem they’re supposed to be solving. I think that having a habit of documenting what you need to do is quite helpful and few people are excited for an “extra” step, so encouragement from a teacher makes sense.
"they’d get so fixated that they forget what problem they’re supposed to be solving": That's really interesting. I hadn't thought of it that way. Would love to hear more of your experience teaching at a bootcamp / what methods worked.
I have a friend who's been pretty much in the cyber sec space with very little programming. They're mostly experienced in bash, and dabbled in Python and Java.
They've finally pushed themselves to learn programming and struggled a lot with Java, and a few friends and myself told him to start with Python for the basics to get a grasp on the concepts of OOP, functions, classes, loops, file operations, etc. and all the basics
They're doing a lot better because I forced them to go through the beginner tutorials and videos since they have a knack for jumping into things that's outside of their wheelhouse way too quickly
The question I have is I'd like to teach them about lower level concepts like pointers, memory management, etc. that's present in C++, but as I've seen with Java they have a really hard time
One example was some "medium" level question from some site targeted at prepping people for interviews at Meta / FB. The question was pretty simple - you're given a string containing a combination of "A" and "B" characters, and a variable N defining the length of that string. The goal is to return an inverted string, where all "A"'s are converted to "B" and vice-versa
The brute force method in Java would be to just loop over the array, check what the letter is, and flip it
But they couldn't figure out what to do, they were basically frozen overthinking the solution
That was a long-winded background for the story, but it's something I'm not sure how to teach someone to improve on / fix that issue. Anyone got suggestions? IS it just a matter of getting more comfortable with programming in general until you sort of just "get it" ?
Whenever this topic comes up, I like to cite this: https://en.wikipedia.org/wiki/Mathematical_maturity as a related concept... the idea that with academic rigor and practice, we progress to higher level / abstract thinking.
There's a slightly more well explained version here: https://blogs.ams.org/matheducation/2019/04/15/precise-definitions-of-mathematical-maturity/
I like the second version, because it identifies traits that we need to develop, which I think are equally applicable to the programming domain: Conceptual Understanding, Procedural Fluency, Strategic Competence, Adaptive Reasoning, and Productive Disposition. **I'd then ask: which of these traits is holding this person? **
Ohh those look wonderful, I'll go through them
I was pretty sure that I was just too experienced of a programmer to not see programming how a newbie does. I read the same problem and knew what to do at a quick glance, and when it took my friend quite a bit of time to admit they don't know what to do, I realized it's because of the skill/experience gap
Good news is my friend is very motivated by spite so literally saying "skill issue" motivated them to study and practice more lol
But I'll definitely go through those resources and speed things up
I think the normal path here is to recommend they study DSA, and then start with some easy leetcode questions (or whatever). Some people grasp it quicker than others.
Also see #algos-and-data-structs
Yep that's exactly what I've been making them do - go through beginner tutorial videos, DSA and OOP, and then leetcode questions
Regarding "lower level concepts like pointers...", there's a debate around this
To quote nedbat on this: https://hachyderm.io/@nedbat/111789013210403320
Tired of this: "learn C so you can understand how a computer really works."
So much of modern computers is not visible from C (pipelining, virtual memory, branch prediction, cache misses, etc).
I guess what they mean is, "you learn about pointers and consecutive memory locations"? How is that helpful for programming in other languages without...
Yeah I can get behind that - the only major thing I'd want others to learn is static typing (which isn't technically low-level) and things like sequentially stored arrays vs linked lists
Pointers, getting variables by reference vs value, manual memory management, etc. aren't really necessary unless you want to work in lower level languages
I studied C++ in college with smaller courses using Java, JS, and Python and ended up just sticking with Python because it really is just so easy to do anything in
Going to straight to DSA for a beginner is a pretty good way to make them never want to touch programming ever again. It's like jumping straight to algebra before learning arithmetic. I recommend first assigning problems such as: "let the user select between three products, A, B, or C (a simple options menu in the terminal), then ask the user how many of those they wish to purchase. Print the their subtotal and total..." Simple programs that don't really require DSA, but require being familiar and comfortable with all the basics (input, print, variables, expressions (math), conditionals, loops, lists, types (int, string, etc)). I would then also do problems similar to those found at the beginning of an Advent of Code, reading input data from a file and computing something about it (a light intro to processing a bunch of data given as input in some way (a file), and a bit of parsing), still no DSA really. Then after that move into basic DSA (at this point they should be able to read code, explain what each line is doing, and keep track of state).
The goal being to get them to the point where the code itself is not the problem anymore. They don't need to spend a lot of time consciously thinking about each line (in the way beginning a lot of time is spent on just syntax) and can now instead focus on the abstract (DSA). The analog in mathematics is no longer needing to count with your fingers or do multiplication the long way (instead you can do something like 4 x 15 in your mind quickly). Since that takes away from any capacity left to work on the abstract.
Yeah, I don't think ther's anything C would you teach you, or other languages, that a nice course on Computer Architecture wouldn't. I have a Electrical-Computer Engineering BS/MS so I know a fair amount of those things from my course work, I of course though have no idea how compilers or grammars work. I wish I would have taken some courses on that. I also know very little about Data Structures, had to take 2 courses but I couldn't go build a linked list certain time complexity and then go and use it to make more data structures.
At the end of the day, I think that there's so many layers of abstraction, you should just learn what you need for the layer you're working. Numerical/high speed computing will care about writing code that the compiler can optimize through loop unrolling, and minimize cache misses but a full stack dev most certainly doesn't give a quack
I think this bit you should just learn what you need for the layer you're working is pretty dificult though. Programming has become a Trade almost (i.e. plumber, electrician) and being able to know when you should just be learning the tools for your job (like software stacks and libs) vs fundamentals/academic topics (compilers, comp arch, DSA, etc.) can be hard to decipher at times.
Cpp is a superset of c with very few removed constructs. You can infact compile many c programs with a cpp compiler
C has four main purposes. 1. Simplicity (relative). 2. The language changes slowly (knowledge not invalidated quickly). 3. Lets you write fast things (gives the tools needed, either in the language or compiler (e.g. inline assembly)). 4. Stability, allowing for your code to last a long time and bind to everything. If you just want to have a language that lets you make fast things, there are many better options now, including those that are C alternatives if you want the simplicity (e.g. Zig, Odin, C3). Even Go, other than being garbage collected, can make very fast things and is also simple like C. How to make fast things in any of these languages is the same, involving concepts that can even be applied to "higher level" languages like Python (and I don't mean just stuff like computational complexity, I mean stuff like not spamming allocations, memory locality, etc). Details like pointers in languages like C don't make things fast, they just are a tool that may be helpful in making fast things (and often are) / let the user be explicit (being able to be explicit about things usually allows the user (not the compiler or other automatic optimization system) to optimize more). The real thing that keeps C "fast by default" is that it's just compiling to actual machine code and not doing a lot of hidden work that is not actually needed for the end result. So from a pedagogy POV, it's a good language to teach the idea of simplicity (minimalism), and stability, plus if you use it with a disassembly tool it can make for a good assembly learning tool. But it does not teach how the hardware works. Its explicit nature allows for easy experimentation to see the effects of hardware concepts on performance.
This is not the correct channel. Read the channel description before posting.
Your question is asking for ideas, isn't it? One of the off-topic channels would work.
Okey thanks
Schools really enjoy forcing students to use IDLE for mocks/exams, but I wonder if it actually changes anything. Even a simple IDE like Thonny would be fine, right? If schools were so worked up about students cheating, they'd have some sort of blocker/restriction on extensions for Visual Studio Code, for example. It's interesting how different schools have their own ways of teaching people how to code.
For example, (since I am a student) we do our assignments at home on visual studio code, then upload them online where a checker then checks to see if it matches with any AI/site online. And at school we use Thonny for in-class assessments.
not mine. at least not for python. i havent done a lot of python, but for all other things, theres literally 0 checks. my friend ctrl + c ctrl +v half of his assignmenty and was not caught
Sure, but that's usually because schools think that coding is an unimportant subject
i am majoring in cs 💀
at uni
My school does tests with just no internet on those computers and assignments that are graded only depend on end results even if it's all ai it's fine as long as you can explain what the code does
For intro to programming, I’ve seen schools use lockdown browser + a simple code editor. I think in reality, though, the test is to placate the administration: the real learning are the projects, and it’s accepted that students may cheat… but that they’re only cheating themselves out of learning.
lol, my AP CSA exam was on paper
which was kind of brutal
and then there was a multiple choice section which wasn't any coding
I once got a coding test where I had to say what that code would do and all questions had a syntax error it was multiple choice and that wasn't an option so I just wrote it next to the answers. The teacher didn't care because it was a shitty test meant to make the students see that they suck (part of the reason why I left that school (for anyone wondering it is never good for students that just started to make them think that they suck at that) )
how does a test make students see that they suck? were there specific questions that were too difficult for beginners or what?
well it was supposed to be about the presentation we got before the test but the presentation was about the very basics and the test was about intermediate stuff and edge cases that we couldn't possibly know at that time and then the teachers telling everyone that they should've known all those things
that year was insanely demotivating it's like 1.5 years ago and i'm just now starting with coding for my self again
all my cs exams were done on pen and paper.
I think its good and bad at the same time. Good cuz you are forced to realize all the fine details of coding (like tab spaces, matching the opening and closing parentheses etc)
and bad cuz writing code (especially python) on paper is a bit hard cuz you gotta maintain the tab spaces in each line a constant and youd sometimes not align the spaces properly when youre in a hurry. And cuz of that the code ends up being slanting and goofy
My masters CS classes are done on paper as well lol No IDE for us
Having to remember all those fine details on paper is sorta specifically why I dislike the idea of writing code (beyond pseudocode) on paper, it turns what would otherwise be a test of your logical and algorithmic understanding of a problem into a part memory test on the syntax of whatever language you've been taught alongside that
fair enough
when writing on paper, you're pretty much never losing points for trivial syntax errors though. most graders make that very clear
also youd need a lot of confidence while writing on paper since you cannot test your code unlike typing it in a computer so you only have 1 chance to get it correct
writing on paper tests your ability to run code in your head, which is an incredibly important skill to have. even if you can't actually run it, you should have a pretty good idea what some code will do when it's run
Ah yes the mental C compiler
don't need to compile, just interpret it. though compiling may also be helpful
"it works on my machine brain"
not sure if this is the place to ask this, but I feel like I suck at python. can you guys recommend me some resources?
This is not the channel; there's a link in the channel description.
oh my bad!
Is ducktyped the way to go with python?
I've being using some type annotations recently
but it doesnt work well and often have to add #type: ignore specially when using with pip packages
also can't ignore the nice autocompletions when you get with type annotation when it is working
@loud ridge this channel is about discussing methods for teaching.
I want to start tutoring. Would using Automate the boring stuff with Python be a good base for teaching the basics of Python?
Yea not a bad idea to automate the downloads folder into sorting into file formats
might be a lil complicated for begginers so depends at what point you are starting from
you want something that they can finish to build their confidence
they're talking about the book "Automate the Boring Stuff with Python"
i could not fix my code so i just abondoned it so here you go hopefuly its if use (i failed to make a simple web crawler)
I’m starting from chapter one. I have some of my own projects in mind to work towards like rock paper scissors and soldering a Simon says board and programming it.
Yes although if you are tutoring a single person or small group I highly recommend to do the projects first and decide if you think that they can do that project (a little bit of a challenge is fine but don't pick something that is way too hard or easy) If/when they need help you can probably help them better
Alright. Thanks.
if you post a link, please say what the link is and why people should want to click it in the same message.
This is not the right place for advertising your game.
Unless you need feedback, this server doesn't allow advertising.
Read the description of the channel before posting.
sorry
Hey I have a question. I was just helping someone who was working on this: https://paste.pythondiscord.com/6TUA
They said they were taking the CS50 course by Malan on YouTube. What would be the best way to introduce some things that would help them without overwhelming them?
As it was I just pointed out the issue they were having and encouraged them to continue the course.
oh god what is that
Thank you, do you also recommend FreeCodeCamp ?
ok ill do that
What is pedagogy?
See the first pinned comment
Got it
Okay sister
you can put this in #python-discussion, one of the off-topic channels, or in #esoteric-python
anyways __import__('ctypes').c_char_p.from_address(0)
Thank you
David J Malan is a pretty good lecturer but I dislike the CS50 courses.
Usually they don't work in teaching people, unless they have prior knowledge, as the challenges can be horribly made.
I haven't gone through it so I'm unfamiliar with it.
I have done both CS50x and CS50P and it was a pain in the neck.
Either the problems were too easy or too difficult, and sometimes they were just annoyingly time wasting.
What is/was your level of education when you took them?
Right now? Grade 8.
My uncle in cs also took it with me and he had some great things to say 🙂
IMO, the cs50 programs are good for college level / freshmen students: there’s a certain style to Uni courses. I normally recommend them to people at that level. For high school students, I think some of the less formal tutorials and/or YouTube channels are probably a better fit.
Yes, but I do like the lectures that cs50 brings.
And their short form videos are also great, when they break the problem down.
But doing their course in general can be time consuming. Such as using C to make filters on a certain set of pixels.
Of course, my main goal in programming isn't really to be practical (at least not yet) but it's just to learn some logic and participate in contests.
This channel is for discussing teaching methods. You can discuss this in #python-discussion or any of the off-topic channels.
Hey y'all. I am fishing for a better way for my kid (11yo) to learn python. We are currently subbed to BitsBox, but he doesn't like it ( I think its too hand-holdy, and too "unreal" i.e. not actual coding in his mind) He wants to learn coding, so its frustrating that the method is too clunky. Do y'all have any suggestions? (doesnt have to be crate based)
maybe try brilliant
ah yeah, not bad! Forgotten they had coding as well!
khan academy also has a python course for young kids
https://www.khanacademy.org/computing/intro-to-python-fundamentals nvm , it might be a bit too much for a kid
Hello, I'm currently working on a project using a Debian 12 image, but I ran into a problem installing Python packages using pip, and I received the following error.
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Therefore, if there is a way to install the modules without first constructing the environment, please suggest it. You should also try using a more contemporary installation method like pkgx or mise.
Still, I have to remember to donate, Khan helped e sooo much through my own engineering degree lol
that looks like a #1035199133436354600 thing
Ask in #1035199133436354600 (also, see #❓|how-to-get-help)
Do you know how to code (I'd assume so, given you're here)? If so, I'd try working with him through some tiny sample programs. Choose some easy task, and flail and flounder while trying to write code for it. Easy way to both write code and learn, and working through it with him would help him see how programming goes on normally, too.
Obviously you still want some learning resource on the side, but that's helped me teach a few folks.
have him build a number guessing script
I know some python, sure, but I think teh gamefication aspect is worth the money, Hes 11, he says he wants to learn to code, but I also want him to want to return the task, not always "Allright kid, lets code now!"
appreciate teh suggestions though
There are a few things that motivate people into doing things. Finding ways to light that spark in the kid, is really helpful. So, showing things that you can do with code. More than just "look a calculator". That is of course easier said than done. But video games can be something that is easy to get visually into it. As in, making games. What is more gameified than a game? Now, there are issues with that based on how into games you want the kid to be. Not going to comment too much on that.
Maybe when they turn 13, they can start making roblox games with lua. If you do want to go down that route, I will warn you that you really need to be there with the kid since young kids get taken advantage of in roblox (for labor and from pervs).
If you want to stick to courses, most of them are not the best, or are a little too advanced. But also, you can let the kid determin for themself if it is too hard. I think khan academy is pretty good; at least the last time I looked at them. And they have a lot larger selection of topics besides just "code."
What tends to work for me, is showing why something is cool besides just saying "becuase it is useful." That is what I do with math when I teach it. I show them how some simple concept is being taught, can be used as part of a bigger complex system. But you have to be decently knowledgeable of things going on to do this well. Regardless, I wish you luck. And I wish luck upon the next programming generation
As an example of something I have shown with the math thing;
The kid was learning pythagorean theorem. With it, you can calculate distance between points in space. But I explained that the points in space can be much more abstract than points on a paper. You could use it to calculate distance between anything. Not to get too into my explanation; but I then went into how this simple formula can be used as a recommendation system for something like netflix. Your distance to how similar you are to someone is really low, and they like a movie you didn't see yet. So it gets recommended. Stuff like that. It was an abstract simplification of how it is used in the real world. But it is still a real example. The kids I told this to were really into it and had more interest in actually learning the topic.
Again, easy to say, hard to do. But if you are just conscious of it, you will find examples to teach
thats a great point!
my "problem" is that im not a good enough coder to be able to be with him in making a game with pygame or similar (learning that myself becaus I want to make a physics engine to simulate and anazyle gear meshing.. but thats my problem lol)
<troll>Kids generally have fewer ideas of what's supposed to be hard and what's not, so they are much less eager to slack through the problems we deem hard (unless we say they are hard in front of them)</troll>
Code Combat is what got me interested in coding. Its a pretty fun gamified way to learn coding that I don't feel like has been well replicated anywhere else.
I've created a tik tak toe game but It doesn't work .-. somebody wants to check it?
Hello, please re-read the description of this channel, and then read #❓|how-to-get-help
i can help u
That would be off-topic for this channel.
ok plz dm me
3 friendly reminders. We have an assortment of channels for you to choose from, so usually dms are unnecessary. Also, Stel was not the one who needed the help, so it would make no sense for him to dm you. Finally, read the description of each channel so that you get a better understanding of each without needing to trial and error your way through. Hope you have a good time in this server 🙂
Now that that's out of the way... Our school has an interesting habit of rejecting good cs teachers and keeping the bad ones. There is an infamous cs teacher who is actually just a normal person who doesn't know anything about cs and just scrolls through twitter during classes. I wonder if other schools do this too.
@random topaz
This is not the correct channel.
Sorry I can't find to other chanle send image
!topic
Off-topic channels
There are three off-topic channels:
The channel names change every night at midnight UTC and are often fun meta references to jokes or conversations that happened on the server.
See our off-topic etiquette page for more guidance on how the channels should be used.
Can u just help
Nope. Please stop pinging me here.
Toxic
Apologies, but you have been ignoring me for the past few messages. Go to the off-topic channel and stop pinging me please.
You're not using that word correctly. If you want help, you should listen to when people try to help you, don't be angry at them. No one will help you then.
It's fine now. The problem has been resolved (sorta) in off-topic.
What do you mean?
like ... how tf u compile that ssith?
u wont get it
Pardon?
I'm guessing this is not the channel you want to post this in. Read the description before posting so that you will get accurate answers.
First off, I don't know what channel fits this topic.
Anyway, on a scale of Beginner, Novice, Experienced, and Advanced, I'd say l'm between Novice-Experienced range in Python. Should I get to experienced/advances before I look at other languages, or should I start learning them now? I was thinking about maybe learning HTML or JavaScript, but should I wait until I'm pretty good with Python?
Please read the channel description as this topic is inappropriate for this channel. Pygen or off-topic would be better options.
I don’t see either of those channels
Are you sure? You can use the search bar for those two, but here. #python-discussion #ot0-psvm’s-eternal-disapproval #ot1-perplexing-regexing #ot2-never-nester’s-nightmare
How would I search for them if I didn’t know they existed?
You should probably scroll through the channels and look at their names.
I did, four times over
They give a pretty good description of the topics. And browse channels has the full list of you hide them by accident.
Guys, I'm studying for the PCAP certification.
Do you know where I can find questions, simulations, apps with questions and simulations?
Hello, please read the channel description.
Oh, Sorry
Can anyone recommend live Python coding videos? It helps me to watch someone working through a problem in real time. I thought this video was really fun: https://www.youtube.com/watch?v=7r83N3c2kPw That person is so excited about 1980s BASIC... is there anything like this for Python?
🧠 Sign up for Nebula! — https://go.nebula.tv/codingtrain
Take a trip back in time and let's code the Snake Game in AppleSoft BASIC on a restored Apple II+ computer! GOTO and GOSUB! Line numbers! https://thecodingtrain.com/challenges/173-snake-applesoft-basic
🎥 Previous video: https://www.youtube.com/watch?v=FfCBNL6lWK0&list=PLRqwX-V7Uu6ZiZxtDD...
Hello, please read the channel description.
guys I have a question, what do you think from personal experience are some major flaws with the current adopted school system that effect the ability for students to reach their full potential?
please provide an example as well
In the Dutch education system it is how 1 thing like Dutch, German, English, France, math, something like that can limit you to not be able to do some subject where you are excellent at with some extra challenge like a level higher. For example someone is great at math but really bad at Dutch that person can never learn more complex things about math because they don't get thought for his level of Dutch
In short the worst subject will limit the potential (they are working on it at least it is mostly resolved for elementary school because a single teacher has to teach at 6 different levels for each subject in a single class)
In my school, teachers don't teach students/help them much because they are not qualified for their positions. For example, we have an infamous teacher who just scrolls through Twitter in class while the student who has the most experience (which somehow is me) helps everybody else and teaches the class. Usually, the teachers are spoon-fed PowerPoint presentations that look horrible and don't explain anything, and they just parrot those presentations back to the students. Even in our computer science course for ATAR, which is like the Australian equivalent of SAT, the teachers don't teach, and students are stuck using Turtle or doing some introductory Grok course.
Hi guys, do you have any groups for Python study? I'm a Brazilian student of this programming language
Hi, please read the channel description before posting.
Ok, sorry
Should students learn dataclasses or classes first? I find myself recommending them both at once, but I am not sure that's a great idea.
As a student myself, I don't even know what dataclasses are (that well). I do know that most of my peers have learnt classes first, though I don't know if it has been beneficial for them that way.
Good question. Dataclasses are probably easier to wrap ones head around than __init__ methods. And they force (or at least strongly encourage) the learner to think about what types each attribute are.
But I don't want to have to hand-wave away class decorators. And I think learning dataclasses first would make it awkward to then teach "here's how you make classes normally".
It probably is different for those in college/uni but I think classes are usually taught before dataclasses, even though it would probably be better for it to be the other way around.
Yeah, that's where I'm at as well. A dataclass makes more sense in that it's just just do this magic thing in your code and you get good data modeling - letting the student just get on with their project, versus classes which force then into some tangent on the basics of OOP. The other option is the collections.namedtuple, but that one is such a weird API that I don't think it's worth recommending despite its simplicity.
what about types.NamedTuple?
I don't see how that is meaningfully different from a dataclass.
there's less of a pretense that you're teaching them how to make classes in general.
i guess teaching dataclasses is okay if you explain that its constructing a class and generating things like the init, repl, and str under the hood for you
and that if you need more granularity over your generated class, then learning how normal classes work would be beneficial
Hmmm, I guess NamedTuple doesn't actually have class in the name, so it could be explained as abuse of notation (-ish).
This is making me rethink my knowledge of classes. I never really got a formal lesson on Python as my teacher isn't really qualified for the job. It's a problem I've noticed with many highschool programming teachers.
well high school isn't really meant for that imo, for the basics yes, but if you want to go more in depth, you might have to do it at college
it's not the same for certain things like math because every year you have to take more math that's explained more clearly and in depth
Likely, though I still find the teaching practices are quite dodgy. Usually they just parrot some powerpoint presentation from online.
you're getting constant repetition yearly, whereas certain courses like programming, you only take for a quarter or two and be done with it
For the ATAR course, which is like an SAT equivalent but Australian, students still use Turtle for their projects because it's a requirement, and other packages aren't even allowed
We had an excellent programming teacher, but it does feel like a lot of schools went "hey programming is a valuable skill now so we should teach it", without actually having anyone skilled enough to teach programming.
They still do Grok courses, and have to slowly work through random sites that barely function because they were made by some individual who couldn't be bothered to actually make the course functional.
For my tutorial group, (which I guess is like a small group that students get split up into before class to do diary checks, etc) I have a great programming teacher who's basically carried the programming courses and has single-handedly organised all contests that the school does, because it seems like the head of the informatics department isn't even qualified enough to do that.
It wasn't their job until very recently, IT involves fairly little programming usually.
Our IT/cybersecurity team is just a bunch of graduates who aren't starting university until later this year.
In CS/IT university education, it is a given that logical programming is taught.
With the lack of... any practical application of the relevant patterns and the lack of prolog pretty much anywhere, do you think it makes sense to teach it, or has it become the new analog computing and should be dropped as a mandatory part of a CS education?
It depends
Only if it gets replaced by something more useful and effective for learning
Why do you think it needs to be replaced with something? Keeping it around just to pad out the program seems undesirable to me.
I mean like there should be something in place. Removing for me means just removing that part and not doing anything else useful for CS in that time
I've had that happen at school that some part of the English test was removed and was replaced with movies
So it could also mean in this case going more in depth in something else
What do you guys think of Devin ?
Also, what is the point of an IT or related degree now ?
it's hyped, meant to attract investors
degrees will still be very much revelant
I really hope so, I love Software Engineering and recently started learning python, because I want to learn Data Science, I am doing Master in Computer Engineering, and we got taught a bit about AI
Some says there will be less Developers and less pay, for non AI related stuff
(Not super related to channel topic)
It’s a cool tool that is still very far from taking away jobs. There are potential dangers of the tool. But overall, jobs won’t go away. Even in the most ideal state, the AI still requires a programmers knowledge to operate to perfection. Meaning, a SWE is needed just to use the tool (at least in prod). And this will always be the case. But things like that become more clear, the more experience you have. Most people really scared by the AI, are people with little to no experience. And that is reasonable enough. But it isn’t a threat to jobs in the general sense.
The part of this conversation that is relevant to this channel;
You can use these AI tools to teach or learn from. But they are dangerous since they don’t know when they are wrong. As opposed to a human who can at least comment that they are not sure if something is correct. However, using it as a tool to learn, can help. It is really good at giving you key words for a topic. It can help save time in looking up what to look up. But it isn’t great at solving real problems. It is also good for sanity checking things. It isn’t perfect, nor reliable. But it is low effort to see what it thinks of an idea; and sometimes it’s response is really helpful
What does pedagogy mean
Discussion of the methods and practices of teaching
from the channel description also works as a definition
Every channel in this server has a description.
Also this #pedagogy message
the last two pins are the same question, FWIW
Maybe I should ask at some point just so I can get pinned.
@misty dirge wouldn't it be better to pin #pedagogy message again so it's at the top of the list of pinned messages
I think they're always in chronological order from when they're said
Nope it's in order of last pinned (try it in some test channel)
It honestly won’t make a real difference. The type of person to just randomly start typing in here, is not the type of person to read the pins
Hi, everyone
Hello! Do you have a question related to this channel?
Yeah
Ask away.
can you tell me about method how to join of telegram channel with python?
Please read the channel description before posting. This belongs in a different channel.
yall is it acceptable to save my glorious time and ctrl v some links than spoonfeed ppl
No, it would be better to save your glorious time by doing nothing. Because spoonfeeding is counter-productive for that person's actual learning.
bro didnt read what i said
I did read what you said.
i didnt write do nothing as an option bro wdym
Oh, I see, you said "than" rather than "that". I misread it as "that" because "than" doesn't actually make sense in that context. You can't say "is it good to do x than y"--it would have to be "is it more good/better to do x than y".
So, "is it more acceptable to save my glorious time and ctrl v some links than spoonfeed ppl". This sentence makes sense.
If you're trying to help someone learn, it's better to direct them to resources than it is to solve their problems for them. But even that isn't what we want to see in #1035199133436354600.
late reply because u didnt ping me
and i forgot what i wanted to say but
i use https://learnpython.com will that suffice?
Suffice for what?
resources
There's a link to our resources page in the description of this channel. But this channel is not for resource suggestions.
ait so i use https://www.pythondiscord.com/resources/ instead
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.
hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
Hiiiiiiiiiiiiiiiii. This channel is for discussing the methods and practices of teaching. So please make sure that all your messages here are about that.
You can go to #ot1-perplexing-regexingif you just want a place to chat.
There isn't a one way fits all method of teaching, but is there usually a general guideline? Such as the order you teach concepts, the concepts themselves, etc.
No, but this is an ordering that I came up with a few years ago.
Basics
print('Hello world!'), basic math operations, variables- Basic boolean logic, if statements and indentation
- Lists and dicts
- Loops
- Functions (perhaps with basic type hinting)
- Importing from the standard library
- Exception handling (
try-exceptonly) - f-strings
- Sets and tuples
Intermediate
- Defining your own class
- Mutability, references, and garbage collection
- Everything's an object
- {list, dict, set} comprehensions
isvs==- Docstrings, commenting
- Advanced exception handling with
raise,else,finally breakandcontinue- File IO and string manipulation
Advanced
- The Python data model with inheritance and dunder methods
*argsand**kwargs- Context managers (
with) - Decorators
- Generators
- Type annotations
sorry, I didn't expect that to be so vertically long.
I'd be interested to know what you hate about it, if anything.
Hate is a strong word.
I'm surprised commenting is introduced in the Intermediate stage.
Unless you meant the proper practices for docstrings and commenting.
I encourage people to take extreme positions as a basis for discussion.
Yes. The kinds of comments that people are taught to write in programming 101 are just noise, imo.
Makes sense.
Yeah, the list looks pretty good.
Even I haven't ticked off all the boxes for Intermediate tbh.
does having file io and context managers at separate stages imply either either using pathlib or open/close without with for file operations? or just that the details of with aren't taught until later?
pathlib pathlib pathlib
pathlib should be the default assumption for file system interaction for beginners
and also everyone.
i would use pathlib more, but the context manager lesson is engrained into me. opening a file without with and an indented block is probably a difficult thing to unlearn, and looks wrong to the older-style brain
I use sys lmao.
just use Path.read_text. liberate your mind.
sys.stdin = open('file.txt', 'r')
oh my
It's for contest.
side question: how do you feeling about - when teaching file ops - mode when reading? explicit r, or nothing, using the default r?
I don't think it matters
I like explicit r because when I read through my code, I can quickly see the stuff I want to see, and submit it (just to get WA lol)
what is WA
Wrong Answer. 3rd worst thing to see in contest.
Mutability, references, and garbage collection
in retrospect, I'm not sure why I put these three together
To throw people off?
I can't decide if garbage collection needs to be in here at all
Sorry, but what is garbage collection?
the system by which Python deletes objects that you're no longer using from memory
Python can know "at this point in the program, there's no code after this that can ever use this object again", and deletes it
it's not part of the code. it's something that Python does in the background while it's running.
Ohh. Well... I guess that's a new thing that I've learnt today!
look into directed graphs and cycles in directed graphs
could probably include it as a note in intermediate. I've seen learners create situations where they are holding onto a reference indefinitely due to not knowing about how python handles it
doesnt need to be a deep dive, just that if there arent strong references to something or only detectable cycles of objects, python will clean up those objects at some undetermined point
using a " def " keyword to create a statement I define the Use of a selfcreated Object
Is that summed corrrectly?
I am currently trying to create a presentation a bout my code to people who have no clue what code is.
This doesn't make any sense to be honest.
Then whats a better way to describe it
That def is the keyword that introduces a function definition.
__init-- would be describing the "making?/defining" of an object then?
so we can call apon it.
Hey Guys, In what channel can I get Help with some code?
I am new in the community by the way....
Please, I really need help with this, I cannot find the problem.
Anything that is particularly wrong?
@umbral folio you should probably move to a help thread also.
Don't try to simplify it too much and don't go too much in depth on stuff like __init if it is their first time. Imo only very easy things like print, if, loops, functions if it's really the first time to not overwhelm them.
Thanks for the advice, I did get 18/20 points on 4/5 topics and 16/20 and the verbal wording it worked out very well
We were last critiquing this Python roadmap I came up with a few years ago
to your knowledge, are there any resources that follow that exact ordering?
I've never checked. it's pretty unlikely.
What is the command equivalent to ' ls -a ' for windows command prompt . I want to see the hidden files as well .
wrong channel. perhaps try one of our off-topic channels
you can read the channel description to understand what this channel is for
sorry , in which channel i can ask it ?
an off-topic channel like #ot1-perplexing-regexing
What's the best way to explain python -m venv path/to/your/project/.venv because I've seen people write literally that or worse run python -m venv ~/projects/example/
Which litters their project dir with venv stuff
I've tried changing the instructions to: " python -m venv path/to/your/project/.venv the .venv is important "
if you've already established that their cwd is the project folder, you can just tell them python -m venv .venv
what if you add a trailing / after .venv ?
I don't think that will have any effect.
Why there is seven in the result
Ok
hi all, any idea/good game to teach 7yo to code?
Higher/lower.
Monty Hall.
Multiple choice quiz.
i'd say it depends a lot a lot on the kid although the most important thing to teach anything to a 7 year old would be to make it fun for them and keep it simple and ofc be really patient it is possible that they forget it the next time they run into it (can be anything like a for loop or a if statement ).
imo is it only a good idea to learn them code if they really really want to learn it otherwise don't bother
thank you
You're rounding up to the 1st decimal place.
.66 rounded up is 0.7
https://www.scratchjr.org perhaps?
Or even https://scratch.mit.edu
Scratch links to scratchjr for this age range, see: https://scratch.mit.edu/parents
Ahh I see.
guys
I believe i have a bitcoin miner on my pc from cheats I downloaded when I was a dumb kid
should I just reset the computer after downloading all my important stuff oro what?
!topic This isn't a topic for this channel,
Off-topic channels
There are three off-topic channels:
The channel names change every night at midnight UTC and are often fun meta references to jokes or conversations that happened on the server.
See our off-topic etiquette page for more guidance on how the channels should be used.
okay my bad
thanks!!
i am preparing students for a python competition, what are some good places to find real world problems, other than leetcode
If it is comp; look into ACM problems (https://icpc.global/worldfinals/past-problems). The link I gave are probably too hard. But you can still look up past ACM comps. Maybe not world finals.
If you want more leetcode style, there are other leetcode like sites. Just depends what type of "comp" it is
yes i should have mentioned that students have most likely have never entered any competitive programming competition before so too hard isnt expected, i also had a look at the sample questions and it doesnt look too complex either, they learn at their own pace in class, this time its most points in 90 mins
AdventOfCode or CodingQuest.io have a similar feel but are easier than most contests (at the start, anyway)
AdventOfCode does get ridiculous after the first week though.
What is this channel for ?
From the channel description:
Discussion of the methods and practices of teaching
The only part of this question that's on-topic for this channel is "is it a good idea to use jupyter notebooks for notetaking". Though I don't have any particular opinion about that.
Discussion of the methods and practices of teaching
Maybe you phrased your method weirdly, but make sure it’s about pedagogy.
!pban 987025735535456336 CSAM jokes are absolutely not okay here.
:incoming_envelope: :ok_hand: applied ban to @meager plume permanently.
!rule english
4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.
!rule ad Please make sure you speak English to the best of your ability. Also, don't advertise please.
!rules
The rules and guidelines that apply to this community can be found on our rules page. We expect all members of the community to have read and understood these.
@kindred beacon
halfway through my training plan now, does anyone know of any good educational Jupyter Notebooks? especially for lower priority concepts such as file I/O and recursion?
Any Python tutorial in recursion and file io will do; you don't need to restrict to Jupyter examples.
nahh 😭🙏🏽
from a software engineering good coding practice stand, if a function returns nothing, is it better to omit a simple return or to leave it there?
tag me if u answer, thx
this question would go in #software-architecture
Hello everyone, if there are people here who are well versed in Renpi. I am just learning to work with him, I would be glad to make new friends who could help me sometimes. I am Russian, but I know English, Azerbaijani and Turkish quite well
anyone have him added or in server w him?
Not on topic for this channel, maybe ask in #ot0-psvm’s-eternal-disapproval
!rules
The rules and guidelines that apply to this community can be found on our rules page. We expect all members of the community to have read and understood these.
What is the correct room for the generic questions for python?
#python-discussion. And if you have a very specific (longer winded) question, #1035199133436354600
hello guys can someone help me to program a discord bot?
the main function is that if someone in the server starts to play a game the bot is going to send a message into the server like --> xy started to play minecraft or something
Thank you!
Landing pages please
suggestions go in #community-meta
That's not really what this channel is for. Make sure you read the channel description.
I would like if there is some paper or video about various ways / dialects to script with the same objective. Like this :
how to make a simple timer in three different ways in python (the pros and cons of each one)
Is there a more specific term for what im referring.
This question isn't really for this channel, and it's also an open-ended question. There are practically an infinite amount of ways to script something towards a certain objective. It depends on a lot of stuff, and usually there is only one optimal answer.
I am looking for pedagogic/academic material about that.
I have some CPP devs looking for in-house classes on some of Python's nice internal libs such as itertools, functools and collections and so on, are there any good examples of ways to teach these things in a workshop type setting?
Not a clue
are there any resources about pedagogy?
i dont see anything useful in pins
i might teach python to 12 yo person, starting in a couple of months, and i would like to know how to do that better
i have a lot of questions:
- where to start
- what should i teach first, what should i leave for later
- what exercises should i give
- what interesting noob-friendly mini-projects can i recommend
- if, say, we talk 1hr a week, what is the min/max time they should dedicate to practice on their own
- what learning speed should i expect, how to know if they are too slow
- how to find knowledge gaps, is there a comprehensive list of questions about stuff
- where to start?
- good preparation (which it seems like you are already doing so that is great) .
- make sure that it won't be boring for them and be patient.
- just start at the beginning so just basics like print, if else, loops, start there
- let them figure out things on their own ofc help when needed
- what should i teach first, what should i leave for later?
- all the complicated things should come later like classes, pip, just all those things i can't tell when you should introduce them but that should be a bit by feel.
- what exercises should i give?
- start simple like number guessing game, and eventually work up to something more complex like tictac toe
- what interesting noob-friendly mini-projects can i recommend?
- https://nedbatchelder.com/text/kindling.html you can probably find some there
- if, say, we talk 1hr a week, what is the min/max time they should dedicate to practice on their own?
- that would depend on them imo is 1 hour reasonable but it's fully possible that they can't for whatever reason. but start slow so the first time probably just do no homework and if possible give them time to do it during the class
- what learning speed should i expect, how to know if they are too slow?
- that would depend on the kids.
- but too slow won't exist as long as they are motivated
- how to find knowledge gaps, is there a comprehensive list of questions about stuff?
- just ask them
- give them some small test (if you do it on paper do not let them write code that is just useless)
- with the projects you can grade it
just make sure that it stays fun for you and them
New programmers often need small projects to work on as they hone their skills. This is a list of project ideas that beginners can tackle.
I simply bypassed the mainframe, opened a 24 character interchanging daisy chain, used my decoding machine to brute force the firewall to access the remote servers
(I unlocked my computer and searched on bing)
where are you from
Learn Python basics in 1 hour! ⚡ This beginner-friendly tutorial will get you coding fast.
🚀 Want to dive deeper?
- Check out my Python mastery course: https://bit.ly/35BLHHP
- Subscribe for more Python tutorials like this: https://goo.gl/6PYaGF
📕 Get the FREE goodies:
- Python cheat sheet: http://bit.ly/2Gp80s6
- Python exercises for beginner...
its the only course i could find in english
@weak mortar
That's not what this channel is for. Nor this server. If you need help, we are able to assist you, but we don't do private tutoring. There are many courses to choose from in the resources page.
wat dat
Okay, but this is not the place to ask. This channel is for discussions of the methods and practices of teaching.
hi
Hey everyone has anyone made the google lens translation image to image?
hi
:incoming_envelope: :ok_hand: applied timeout to @rustic pecan until <t:1717757706:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
Teaching Tip: Be flexible in order to meet the student where they're at.
I had a 1:1 online tutoring session today. The student's mom had told me that he had used print, if-statements, input, and loops, but not functions/subroutines before, so I had prepared slides for introducing functions/subroutines. However, the student would not focus on the slides. He was instead focused on writing code that he already understood, code with just if-statements, on his whiteboard, and describing to me what it did. After a couple of times asking him to engage with the slides, and that tactic not working, I instead opened up a code editor and copied what he had written on his whiteboard. Immediately, he was engaged with what was on my screen. I then added function definition syntax outside of that if-statement, and added a call to the function on a later line of the program, and he stayed engaged. By the end of it, the student was able to write functions on his own that took arguments and returned output.
guys I got a data analytics test in uni tomorrow. Anybody got notes for the basic stuff I need to know? pls it's urgent
This is not the place to ask. Try #ot0-psvm’s-eternal-disapproval. Make sure you read the channel description next time.
my bad
when do you start deciding you need to break the project into different repos?
This is off topic for this channel, you might want #software-architecture
Anecdote: EduBlocks did not solve the problem of "Syntax complexities are a barrier for students students to learn the logic." Rather than "I have to remember that print statements use parentheses and variable assignments use the equals sign" it was "I have to remember that the print statement is in the statements tab while the assignment statement is in the variables tab".
I haven't heard of EduBlocks. Can you tell us more?
i guess it is a thing similar to scratch (where you code by combining blocks)
It's scratch functionality with the blocks and stuff, but with python logic.
This reminds me of this Lamport wisdom: https://www.youtube.com/watch?v=4RptzbNNoU0 (on the diff between coding and programming, and what we're actually teaching in middle/high schools)
Any good resources for a beginner ?
!resources this is not a good channel for help. Look at #❓|how-to-get-help and #1035199133436354600
Resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
hey hope you all doing great, im starting in this world so i was wondering if there is any project suggestion to start with??
Kindling Projects
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
How to code java?
hello world("console.log")
where can i learn how to teach
Honestly only practice but what do you want to teach
And what is the age group you want to teach to
Try to give them smaller goals and let him figure it out himself
Smaller tasks is one way that could be like Tetris in smaller tasks or other programs that have useful things for the Tetris project
But make sure that they have fun.
What does he already know?
ah, it's hard to be engaging. last time i adopted a similar method but let my student straight up code a big task. failed terribly
he should know basic python (datatypes loops conditions)
That is why smaller programs would be better imo but both are possible
thanks for the advice
I am so glad this exists, pedagogy is such an excellent tool.
Does anyone have a good mnemonic for operator precedence in python?
Pemdas eq not and or
Not really a mnemonic
what does pemdas mean?
Parentheses, Exponents, Multiplication & Division, Addition & Subtraction.
has a million regional variants, notably BODMAS (brackets, order)
i follow this rule: "operator precedence makes sense"
it fails with << and >> though
it can get tricky - or at least somewhat less intuitive - with some things, though, including and and or, which is why i will semi-frequently use either not-strictly-needed parentheses or variable spacing to denote execution order
And/or really don't have the same precedence?
No
How do folk typically post curricular materials? I'm getting a lot of bounce-off from having to clone from github, so I'm looking for a lower friction way for students to get started.
People can download stuff from google drive
I'm primarily looking for a "no install" solution, at least to get started. Something in the browser? Binder looked like the right solution, but its start time was several minutes.
I'm very surprised I've never been bit by this over the years
Or maybe you have and you didn't notice that your code didn't do what you thought it was 
Can some one help me with my code? Please??
wrong channel
see #❓|how-to-get-help
A possibility 😂. I always parenthesis conditionals and don't like using and/or as opposed to a ternary so
What course / level?
I wrote a cross compiler that takes python source code and cross compiles it to a video game programming language. Players are 16+ typically.
I'm also attempting an Abstract Syntax Tree course with a capture the flag feel
the rainbow flag is for python lgtbq support?
Yes. Comments about this go in #community-meta
what is pedagogy
check the pins
is there a good video to get into oop?
Hello, please read the whole channel description, then click the link at the end of the description, and look for the Corey Shaffer videos. (But be sure to read the whole channel description.)
Whatever you enjoy the most, as that'll give you immediate motivation to keep learning
This channel isn't for self-study advice.
That’s how I understood it sorry English is not my first language
Hi!
I want to understand the end of the pipeline of teaching a simple NN or even just a machine learning model. I kind of understand the steps leading up to encoding the data as numerical values, train/test splitting, creating a model with layers and even reading the results in the classification report and the confusion matrix.
What I don't understand is the most important part of why I'd be teaching the model in the first place - how can I then get REAL data, and plug it into my model? When I'm making the model, I'm transforming all the categorical data into numbers through various kinds of encoding. When I get new raw data, it's in its original format with the categorical variables, dates and so on.
Example - I want to predict whether the response to an official letter from a client will be on-time or overdue. I have the branch responsible for the response, the manager, the client, the dates (incoming, due-date, actual response date). When I train the model I encode all those. Say I get a new letter, how can I input all these variables to know if the response is going to be overdue or not according to my model?
Also, since everything is encoded, how can I understand which of the parameters have the most influence on the response being overdue? Which variables actually matter? All the information I'm currently finding online just skim over this most crucial part.. They just go - oh, here accuracy_score(y_test, y_predict) - which just gives a percentage with 0 insights.
#data-science-and-ml is probably a better place to ask
Ok, thank you
Did you fix your code? I can help you
Hi everyone! I am an incoming final year Data science undergraduate, and I wish to do a final year project as I wish to contribute to smth meaningful, and possibly enter grad school in the future. Problem is, i have absolutely no ideas on what my thesis should be. I'm thinking of doing smth deep learning related but i am not sure.
I am quite lost on this and I really hope seniors here can guide me on how to find a thesis topic. Where/what should i start researching/reading on? How to know what things are needed in the industry, so that i can research on it?
There are people doing active research wherever you're studying. Talk to them to find out what they know and whether it interests you - you ideally want to find a thesis where your supervisor will have a good idea of what it should be so that they can help and don't end up placing insane requirements on you. They'll also know what makes a good topic.
This is a question better suited to #career-advice
ahh thank you so much for the thoughts
Hi if I do an object and use the list. I should use .copy (in e.g. init) when I change something in list or better is always use .copy?
Oh I thought it was simply question which don't need has special thread haha
Please read the description of this channel.
okay nvm
does anyone have any good C++ group chats/discords or tgs?
im trying to learn that as the happy medium between python and C's static typed'yness
Hello @weak mortar, please read the description of this channel, and then head to an off-topic channel.
pardon me
Every channel has a description that tells you what the topic is. Your messages are not on-topic for this channel.
What IDE/editor do you expect your students to use? I've been using repl.it, but I don't like relying on the internet in order to have in-person classes.
if the code doesn't get too complicated, IDLE works. it's already installed, and it's not slathered with lots of confusing options.
On linux?
yes, it's cross-platform. another plus
type this at the command line: python3 -m idlelib
:incoming_envelope: :ok_hand: applied timeout to @digital marlin until <t:1719526447:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
You're in the wrong channel. Re-ask your question in an off-topic channel
!ot
Off-topic channel
Please read our off-topic etiquette before participating in conversations.
ok thans
Depending on the age and stage of your students, the Mu Code Editor is a decent way in to Python. Takes out some of the complexity of getting an environment set up and is simple enough to get them working quickly. But that also means the complexity is hidden: so you have concepts to re-teach for them to move on afterwards.
hi
I think mu editor have autocomplete hard coded? So I would say avoid it if you want to learn python beoynd the basics
(yeah, they have hard coded json file for autocomplete https://github.com/mu-editor/mu/blob/master/utils/flask.json)
OH wait
You've raised a good discussion topic: should beginners avoid editors with autocomplete? I'm specifically thinking of "it will recommend variables you've already defined, and it knows what methods/attributes are available when you do .", not AI-powered predictive autocomplete.
No I don't mean AI-powered one
I just mean the basics one that shows you the definition of the function (and tell you what parameter they take and hopefully, type hint as well)
And you think beginners should avoid editors with that functionality? Why is that?
No I think it's a good functionality
I personally need autocomplete as I don't want to load up the docs for the libary I am using every time
Also, bad wording, I want to mean: auto-complete are good, but Mu's autocomplete are hardcoded therefore worse than other ide
At least I think it's hard coded
Yeah, I worded that very badly, sorry
imo the ide really shouldn't matter for learning but like if you are teaching some recommend one and if they use something else but it works for them not your problem just don't allow AI autocomplete or AI code generation although if they do why even bother with them
I would say learning how to use autocomplete and debugger is a part of you learning programming?
true but just show it in the recommended ide and they should be able to find out how it works in their choice if they can't just help them
but it's not about how to do it in a specific ide it's more like how to do it in general and use it the ide is a very small part of it
I have seen some ppl thinking there is something wrong their code when auto completion / syntax highlighting didn't pop up as they are typing. When in reality it was often just due to something with type annotations
Hey !
I d like to learn how to code but I just don’t know how to … 🫠
Let me explain you… I may be a -10 in computer science rn (I don’t even know how to run a program in my computer terminal) but I already got huge ambitions : I d like to learn how to code a program able to solve snake game. (Don’t ask me why, I just find it super cool) I know it will take time and I m starting super far away but I really want to learn coding. The point is, I don’t know where to start … From now, I’ve learned the basis of a computer terminal and I’m following a free python course on OpenClassroom but I’m not sure if it’s the right way to learn coding and achieve my goals. Could you please give me advice, for where to start and what are the steps of learning ? Maybe a kind of roadmap ?
Thank you by advance for the time you’ll give me 🥹 (please forgive me for my poor English vocabulary, it’s not my mother tongue)
Hello, this is the wrong channel. Take a look at #❓|how-to-get-help
what are some intriguing projects for people that haven't touched programming
i think that small programs that don't do much (hello world) won't really attract people to learn
but projects that are too ambitious are, well.. too ambitious
what are some appropriate projects that seem cool but is easy under the hood
most beginners will start with some basic text based programs, like simple games. Rock paper scissors, hangman, tictactoe
That's usually how it starts out because non text based programs introduce a layer of complexity they might not be ready for
In my undergraduate program, the main project for the "software engineering" course was an android app. And even though it didn't have to be aesthetic, the fact that it had to be an android app introduced so much complexity that it detracted from the learning objectives of the course.
i think this is the right place to ask this.
i have a arduino (have not used it before) can i send - input with it?
Wrong channel; see #❓|how-to-get-help
thank u
I have 2 sisters who are both 8 years of age. I want to get them into computing. How should I go about it (e.g. what resources to use, approach in how I teach them)? Also, for further info, my programming and computing knowledge is still at the beginner level but I am working to get it to a higher level so answer as if I've already got a lot of experience to be ready to teach
An important rule of thumb is - keep your students motivated. You don't want your sisters to feel like programming is boring or too hard, so you must keep them motivated with some fun projects that they could probably play with for a while. You can try using python, and if that's too much for them, start with a block based lang like blockly, and just work your way through the basics. You have already been through the experience of learning, so I'm sure you know what to start with and what's easy and what's hard. Don't try to push too hard - programming is tough and it takes a while to get used to the countless failures and bugs that you must fix in your code. Regardless, try not to spoon feed them too much and make sure it's lots of hands on. Try not to use too many YouTube tutorials as, I can assure you, your sisters are not visual learners.
Tbh with you I've gotten back into programming since sept 2023 and I'm still finding it difficult to actually try to learn. Atm, I'm going to focus more into data science to then transition into ML; I did try to learn ML but the amount of prerequisite maths to learn was overwhelming me (even though I do have a strong maths ability) and I just want to code shit and not be stuck in 'tutorial hell'. If I had more money, I would have bought some raspberry pi's and start doing some mechanical projects as I have done engineering type projects before and always enjoyed the process. Do you think maybe buying something like a raspberry pi and have my sisters help me build something with it would be good to get them into programming?
Well... It depends. I would probably teach them the basics of logic at the very least before going into raspberry pi, but you are the one who must make that choice.
What I'm thinking is if they 'help' me with building something with a raspberry pi, that could pique their interest in wanting to learn more about programming, even though they dont know what the fuck theyre doing. My sisters do a lot of painting and drawing, so maybe one way to get them into the world of computing is for them to build something (despite the fact that Ill essentially be doing everything XD )
All the shit after, I can think of something. Just need them to gain an interest
You'll be encouraging them to get into the world of more hardware engineering/design and tech.
Tbh it's a good idea, except for the lack of planning after that.
Im still at the beginner stage myself after a year as I cant seem to focus on a specific area so Im not at a level to teach my sisters yet. Just for now, I'll focus on bringing my skills higher to a point where Im satisfied to pass on my knowledge to them. Though, I might just buy a raspberry pi and do a little project with them; something thatll not only benefit them but also me
Sure. I'm sure you already know much more than me tho
Nah. Honestly, I've essentially been stuck in tutorial hell for a year. My programming skills are nowhere near even the intermediate level. Its just hard trying to improve my skills when I cant focus on a particular area. Biggest advantage my sisters have over me is theyre in that age of discovery, without having to worry about the real world. They ask simply because they dont know
:incoming_envelope: :ok_hand: applied timeout to @deep marsh until <t:1720172124:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
what got me into it as a kid was scratch, and other similar block coding programs
my younger sister (she's 10) is real into scratch right about now as well, and in elementary school (till around 10yo), we were introduced to block coding programs, so I think it's a pretty friendly introduction and a fun way for them to get playing around with programming.
I was thinking about scratch but not sure if theyd be interested in it. Ill give it a go and see if they like it
Depending on your / your families budget: Another option are programmable toys... toys that can follow a set of instructions (ie: move forward, left, right, backward, etc). Introduces to the idea of programming something, but making it a game. There's line following robots https://www.amazon.co.uk/robot-follow-line/s?k=robot+follow+line, sphero's https://sphero.com/collections/coding-robots/products/sphero-mini?variant=32255985025069, and a lot of options nowadays at different price points.
:incoming_envelope: :ok_hand: applied timeout to @manic rose until <t:1720326200:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
You mentioned they were doing a lot of drawing, seeing your art come alive on the screen can be very engaging and motivational, so that may help
anyone have a good free dsa course for python? im not really looking to prep for interviews or anything im moreso just learning for the sake of learning. id also like to get into ai or data science later and i know most of your basic python stuff for reference
I can help by providing some basic python scripts
i also am working on a plugin for python to make it easier to use for more advanced projects if you want to see that
yeah sure, ill add you so we can take this to pms
k
Can someone teach me do some basic python projects im new and i really want to learn
well uhh
best to just watch a few tutorial videos
and try it yourself
I can imagine this channel getting locked away just like the today-i-teach
This channel is about how to learn, not learning python itself.
See the channel description
Can someone help me in basic python projects
Wrong channel; see #❓|how-to-get-help
Please re-read the description of this channel.
Why are people giving this an example? Why not teach people to use the lower() method directly for the string?
txt = "Hello my FRIENDS".lower()
print(txt)
Maybe it helps beginners practice working with variables?
maybe excusable in this case but w3schools isnt exactly known for being a good learning resource
I don't know why, I find their beginner examples pretty good and clear
I think that most useful ones would be file system processing of some kind. doing diffs, file size and modification times, indexing the contents, finding duplicate files. that kind of thing is what i usually try to teach to others.
from there a little project you can do is to backup important files to google drive with python.
I think this is fine. it also shows how string methods return a new object.
the first time I saw str.lower was on a string literal. I don't know when I learned that you can also do it on a variable that refers to a string.
Sure dm me
I can make a remote desktop image with the Python vidstream module, but I cannot control it with the mouse. How can I do it? Can you help me?
@rapid glen wrong channel. See #❓|how-to-get-help
additional question in trying to get my sisters into programming: in terms of the actual teaching (not the resources or the approach to get them into programming), how do I teach them? btw theyre both 8 (twins)
I'd be surprised if anyone else here has made an effort to teach someone that young.
Then, may I be the first XD. Jokes aside, I really do want them to get into programming. Whether they go into a career in it, thats up to them but for now, I want something that keeps them engaged and wanting to learn. I dont want them to be like me. Got any tips (doesnt matter if you have no experience in this sort of situation, might as well try anyway)?
the most important thing is try to keep it fun so they will be engaged
I didn't try 8-year-olds, but this was a session with a 14-year-old niece: https://nedbatchelder.com/blog/201212/kims_python_lesson.html
I spent the afternoon on Thanksgiving teaching my 14-year-old niece Kim about programming in Python. She hadn’t done any programming before, but was very interested, so I figured we could just give it a shot.
I'm jealous of your Niece, wish I had someone doing that for me as a teenager
strongly agree. I think this is great advice ngl
web scraping projects are fun
I think Im going to buy that circuit playground from adafruit and while im learning how to program it, get my sisters involved. I mean its got flashing lights and shit like that so i think theyll defo take an interest 😂
Just being around people tinkering, does wonders for the mind
Even better, I live near a company that distributes raspberry pis, adafruit shit and other related stuff so I can get quick delivery too
how to past the python code
How do I teach Python to someone who’s not technical or hasn’t coded before without giving them the exact answers?
direct them to some beginner resources and use the socratic method when they ask for help.
Could you elaborate on the Socratic method in this context please?
hey what's up y'all
writing a line of The Zen of Python each class lets see how it goes
instead of giving the answer, ask a question that leads them in the right direction to find the answer without essentially copy/pasting your knowledge
AI assistant on Quora gave some decent examples
https://www.quora.com/How-can-the-Socratic-method-be-used-for-programming
Asking probing questions: When working through a programming problem, the Socratic method involves asking a series of thoughtful questions to guide the programmer's reasoning and help them arrive at a solution. This could include questions like "What is the expected output of this code?" or "Have you considered all possible edge cases?"
I see, thank you
I have been trying to do something like that but I feel like I still give the answers too easily... I guess it takes practice
np, and yeah, for sure takes practice
hello, has anyone done TA work for CS courses here? I'd like to ask some questions in dms
Do not DM me. Just ping me in #ot1-perplexing-regexing. I will see if I can answer your questions.
I will answer your questions if you ask them in this channel (and they're ones I can answer).
In general, it's annoying for people to have to DM you to figure out what you're going to ask. It's easier for everyone if you're just transparent.
(They have been asking, starting #ot1-perplexing-regexing message)
Looks like the questions aren't about pedagogy, so I retract what I said.
wassup gng
Woah an admin
@tawny knot please don't post off topic content in this channel.
I wanted to ask for little help if that’s aight
wait wrong Chanel
See #❓|how-to-get-help
Please read the description of every channel before you start using it
sorry I was a little lost
I’ll talk to you in discussion
what does pedagogy mean?
check the pins and the channel description.
til, thanks
What is the correct approach to master dsa in python?
I know the basics but i struggle when it comes to coding dsa
And dsa questions in genral
@quick epoch see #algos-and-data-structs
how do you guys focus to stay more than 1 h coding ? i have ADHD and i am rly strugling. Anyone else over here with ADHD that used some methods ?
Hello, please re-read the description of this channel, then read #❓|how-to-get-help
Idk if i have ADHD but i just listen go music and take pauses
Please do not respond to off-topic messages.
(Srry your message didn’t appear)
Noise canceling head phones
Np music nothing straight bordom lock urself in an empty room and code
Please do not respond to off-topic messages.
Why
It's against the #rules
Yeah ik
If you disagree with our rules, you can tell us why in #community-meta, but you still have to follow them.
Fs
💀
Hey, I'm a total beginner at Python. Are there any other coding newbies out there? Let's team up and search for some YouTube videos or programming learning materials like Mimo. We can share tips and learn from each other, so we can avoid making too many mistakes along the way.
!resources
Resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Topic: the right shell for first-time programmers on Windows.
I've long been of the opinion that it's easier for first-time programmers to only use a bash shell, and that using PowerShell or CMD creates an extra obstacle for following along with beginner resources or receiving help from people in this server. But Windows doesn't come with a bash shell, and obtaining one creates an extra step.
Am I off-base in thinking this?
Most resources I see have commands for powershell, not cmd
If you can get people to use windows terminal or even the blue pwsh window it shouldnt be that big of an issue what shell they use
Really? Huh. Although, I actively avoid powershell as much as possible, even tho I primarily am windows development.
To the topic: I've been stewing on this. First-time programmers generally don't know any shell, regardless of their environment, so the question is basically: which one should they learn first?
I think most new programmers who are looking for a career in SWEing (or any programming) will quickly run into problems / projects / cases where bash is needed.... so I'd agree with the idea that: if you need to learn one shell, bash is probably the place to start.
And https://missing.csail.mit.edu/2020/shell-tools/ is a good place to start
for context, the inspiration of this topic are all the threads where beginners ask why something they pip installed is not installed in the environment their IDE is using. And that typically requires a few commands to diagnose.
Most beginners are probably using windows
You could get them to use wsl but thats more effort than just using powershell which has aliases close to real bash commands
Its probably not recommended but I feel like to understand the cmd better, use linux for a bit. I used linux for the better part of 2 years and even though my linux knowledge is still beginner, I understood more how the cmd worked if that makes sense to you lot
I do really need to start learning linux at a deeper level so I can use it as my daily driver in the future
Is there even any reason to know cmd?
If you have bash installed on a windows computer, you can just use that. I've never used cmd.
Tbh with you, i dont fucking know 😂. Ive barely any experience in any sort of terminals aside from knowing how to add and remove packages, seeing my file directories and thats about it
I dont think its in the best interest of a python beginner to delve into linux or wsl
They want to learn python, not necessarily the shell at this point
I honestly should learn more but at this point i just want to create shit and not be in tutorial hell
Python on windows works just fine, and I do not think wsl makes it meaningfully easier, so I would consider using the py launcher via pwsh (can be installed via winget) the best path for beginners on windows.
What is pwsh?
Powershell
you've never used the terminal on windows? that's typically cmd
I've always used git bash or cmder
Note that cmder is not a typo
neither are built in are require extra setup
something which should be avoided for newbies imo
Somewhat important note:
powershell and pwsh are often used as aliases of each other, for example, either one will get you the same syntax highlighting on Discord, but they are distinct different executables.
powershell.exe is ye olde “Windows PowerShell” that comes built in to Windows — “the blue one”
While pwsh.exe is the “new and improved” “PowerShell Core” — 7.x
PowerShell 7.4.4
PS C:\Users\BradleyReynolds> (Get-Command powershell).Path
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
PS C:\Users\BradleyReynolds> (Get-Command pwsh).Path
C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.4.0_x64__8wekyb3d8bbwe\pwsh.exe
PS C:\Users\BradleyReynolds>
The problem with this discussion is what types of beginners we're talking about. Once they've gotten through the absolute basics of a programming language, and need to start doing projects, they'll often need some level of shell interactions... and perhaps know something about environment variables... and they'll stumble right into it because it's never introduced properly.
Incidentally, many moons ago in college, I recall a freshman class where they introduced us to the Unix shell. Might've been a seminar or something. Was incredibly helpful, even though I had some linux experience before hand. Still remember learning "screen" and reconnecting from a different terminal.
Is screen like tmux?
Yes. I don't know the exact history, but to me, screen is the OG and tmux is the newer/better.
screen is gnu and tmux is bsd
two non posix tools that coincidentally do the same thing
not that it matters in the age of online package managers
cmd is outdated and primitive, you should use powershell on windows
for python it literally does not matter though
dir, cd and python3 are the only commands you're gonna use
on windows? i'm guessing bash on windows can access py. whether python3 exists is a question i cannot answer
i absolutely despise any form of python installation that doesn't allow "python3"
Why? I don't think any beginners are going to have python 2 on their system, so what's the point of python3?
python3 shouldn't be used on windows, since it can change every time you install a python version.
(not sure exactly where to ask this)
If you were getting people completely new to programming into python (mainly for statistical analysis), would you recommend installing from python.org or use something like anaconda?
personally I've not used anaconda much at all so idrk what's good/bad about it
If it's for analysis, maybe notebooks are worth thinking about, I think Kaggle has a decent tutorial and it's all in notebooks
So you don't have to install anything
I havent used anaconda but it seems like the only way people talk about it is with disdain and fury
I recommend either VS Code or Google Colab.
If they are focused on stuff like data analytics, Google Colab is the best.
But for most other use cases I'd recommend VS Code 100%.
sure, but vscode would be where they're typing the text
what about the python environment, from python.org? or anaconda? conda?
Ineed someone to fix my code a bit
this is not the place to ask
Ok
Usually from python.org.
But as lakmatiol said above, it can get very painful on windows machines.
Can't go around recommending linux to extreme beginners though XD
I would suggest picking this based on what you are teaching. If this is aimed at data science or ML, there's a lot of benefit to doing it via conda and spending a brief bit on teaching that.
(saw statistical analysis above, which leans to that)
I work for a research company where Anaconda is banned. I would never teach Anaconda to a beginner, no matter what their goal is.
Like I was saying about bash, I think that beginners should stick to what the majority of people are using, and that's regular virtual environments.
Is Anaconda that complex/confusing? I have never used it
It's just exceptionally rare that Anaconda lets you do something that you can't do easily with regular venvs.
No, but it manages at a slightly different level that includes system dependencies as needed, which isn't inherently better or worse, but an active tradeoff
Anyhow, if you're staying in the land of things that stay within pypa packaging standards, I'd reccomend having users use either pdm or hatch for easy "single tool" environment/dependency management. ensuring users know how to manage dependencies and environments with at least a tool will prevent the xkcd environment meme for new learners
so definitely not Anaconda
Bash is shit and it'd be a hard sell to a beginner programmer
definitely from python.org on windows, teach them to use py over python and such. On linux I wonder if it's worthwhile to go directly to pyenv, or if one should stick with the system Python for starters.
aight
I doubt people with 0 programming knowledge would be running linux anyways, the year of the linux desktop is still the next year after all
I have a vendor who built an entire managed platform around conda, and thinks I'm insane for telling them that they're living in the past.
when that time comes, we won't be using desktops anymore
I just went through making conda forge recipes for some packages I have in pypi, to fit into their deployment model. It's a colossal pain.
I have solved hours of fiddling with nvidia drivers by using conda over whatever the hell nvidia wants you to do.
The problem is, that's the examples people give, but for Python packages, I'd rather use pip and pypi. (And venvs/poetry/whatever)
yeah, I don't think there is too much value to teaching conda to start with, but I wouldn't say it is actively bad either.
By the time you get good at Python, the packaging world will have a new state of the art anyway
the only reason conda is still used is that people who are used to using conda tell the next generation of beginner data scientists that it's what they're supposed to use. even though it hasn't been useful for several generations.
To the original topic tho, I think computer science education should introduce bash early, and that WSL for Cs students shouldn't be an unreasonable requirement.
yeah, a more comprehensive CS education should probably teach the best practices on both linux and windows, tho windows is more optional.
I guess I'm wondering when virtual envs should be introduced? Right after the basics, before the first project?
II agree
for singular exercises and small scripts its fine to skip the venv (usually)
but when you need to start a project with more than one file, the venv is the way to go imo
and in VS Code you can create it and manage it from the UI (of course I still recommend teaching how to properly use the venv in the low level, but vscode can help beginners out a lot)
A bit late to the convo but that is essentially what Ive done
does anyone here used a collaborative text editor when tutoring? im thinking of setting something like this up for some future sessions
(ive settled on using https://github.com/jbyuki/instant.nvim)
Same here, it works fine for the most part. Except when it gets painfully laggy for some reason, then it sucks.
For documentation Ive been using HackMd
our fullstack class does that because they have a good amount of experience, VSCode live share
@bitter sluice surveying is not allowed on this server.
Do you need the code to be split between different modules?