#pedagogy

1 messages · Page 1 of 1 (latest)

high flame
#

print("Hello, World!")

north agate
#

!eval await message.channel.send("hi")

worldly dewBOT
#

@north agate :x: Your 3.11 eval job has completed with return code 1.

001 |   File "<string>", line 1
002 | SyntaxError: 'await' outside function
north agate
#

?

upper flint
north agate
#

iam just doing nothing here 😄

upper flint
#

Btw, you cannot run the bot through the eval

north agate
#

oh ok

upper flint
north agate
north agate
north agate
#

okay thanks 🙂

misty dirge
#

@weak mortar your question was off-topic, so I had to remove it. Take a look at the resources page on our website.

ripe folio
#

Thoughts on what's happening with the Python documentation and https://diataxis.fr/ ?

ripe folio
#

Python's documentation is considering switching to that, Tl;Dr.

ripe folio
#

I think this is a nice step in the right direction. The docs currently feel very scattered and there's holes of knowledge making the official docs hard to navigate and unrewarding.

#

The standard library section and data model page are the only two parts of the documentation I reliably use.

#

This, compared to other languages, where I can usually Google something and get the official docs answering my question as a first result.

#

I am hoping this helps put into words how and where things should be written

fleet pulsar
#

The docs definitely need an improvement in both SEO and content density

#

Although on the insignificant and petty side of things, I really hope they keep the design of the site if they switch over - I much prefer the old peps.python.org design to the current one

fallow terrace
muted comet
#

Hello everybody, how are u all doing?

I'm doing a project about Python, and I would like to know about you, the community, what do you think about the language today?

  • Is it good for beginners? And for advanced programmers?

  • What about the community? Is it still active and helpful?

  • What you think about Python, personally?

Thank you 😁

stone juniper
muted comet
misty dirge
hollow agate
#

For those of you self-taught learners who **hate videos 😠 , found this cool new website that has some text-based tutorials that are in VS Code. It's called ** SideGuide. They have a python course coming out soon, so just wanted let those of you know who might have trouble learning from YouTube or Udemy!

misty dirge
sacred violet
#

hi, any good ressouces on "teaching to programm to absolute noobs"?

worldly dewBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

misty dirge
#

oh, teaching, sorry

#

hmm. well that is certainly more on-topic.

dull gulch
weak mortar
#

Hello everybody ! I am seeking help here because I'm trying to run a script only if the contents of a certain file changed but I can't figure it out. Would you mind helping me ? 🥺

#

I don't want to check the update of a file, it's more a question of comparing the content before and after.

viscid canyon
#

I can't use my pip, can someone help me, it just says that I don't have it, but I have all the files, and that's why I can't use the labs

plush laurel
plush laurel
pure heron
#

For discussion about teaching, rather than for teaching itself, that is

kindred bolt
#

hey

#

i just started doing python yesterday

#

and the only thing i can do is print stuff, any tips ?

native hearth
#

Learn more? What kind of tips are you looking for in an unrelated channel like this one

green timber
# kindred bolt hey

!resources
hey this is a channel for people that want to teach programming, not for being taught programming. But here are some useful resources.

worldly dewBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

misty dirge
#

in my opinion, the advantage that Java has over Python pedagogically is static typing, because I think it's better to become type-aware sooner than later.

Beyond that, I think Java is an absolutely terrible first language. If you write a beginner hello world program, almost none of the code on the screen makes any sense to a beginner (public static void main string args? system out?), and even if we take for granted that there are benefits to Java's approach to OOP, none of them are obvious or relevant to beginners.

Continue the discussion.

noble aurora
# misty dirge > in my opinion, the advantage that Java has over Python pedagogically is static...

i agree, i think the lack of static typing is probably the one thing i don't like about python for beginners. being forced to think about the type of variable you're using makes it very hard to run into certain issues, for example

x = input("put a number")
if x < 3:
  ...
``` is a common problem that you see on the server, which is pretty much impossible in java (or other statically typed languages)
`String input = scanner.nextLine();`
since there's no misconception about what type something is
misty dirge
#

!e

x = 'hi'
print(x < 3)
worldly dewBOT
#

@misty dirge :x: Your 3.11 eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 2, in <module>
003 | TypeError: '<' not supported between instances of 'str' and 'int'
misty dirge
#

The error message makes it pretty clear what the problem is, so when beginners see this and throw their hands up, I think the problem is that they feel intimidated by the new skill that they're trying to learn.

native hearth
#

also in a statically typed lang

let inp = System.Console.ReadLine()
inp > 3
  inp > 3
  ------^

stdin(3,5): error FS0001: This expression was expected to have type
    'string'
but here has type
    'int'
misty dirge
#

what language is this?

native hearth
#

F#

misty dirge
#

why is that a--nevermind

noble aurora
#

my point definitely only applies to languages where the type is declared as you declare/define the variable. in languages where type inference is the norm, this probably isn't true

native hearth
#

I wouldnt want to teach a newbie about types the way they do in other languages tbh just seems like it gets in the way of more important things

#

same way borrow checker gets in the way, same way other things get in the way

#

it feels like advanced enough topic that they could learn it on their own once they get comfy enough

noble aurora
green timber
#

maybe if teachers wanted to teach python while keeping their students aware of the existence of types they could force them to use type hints (?)

#

the good thing would be that at first those type hints could be omitted and then introduced once students have a better grasp of stuff

misty dirge
#

I can also imagine students writing num: int = input('input a number: ') and being confused

green timber
#

or something that prints the incorrect result, in that case most people would probably realise there's something wrong with their program

native hearth
#

Is this really something you or others teach beginners? from other courses i've seen, both python specific and not, types are not really taught to beginners this early
they usually get away with >Think of this as X for now, but in reality its something kinda different

vale current
#

I'd opt for not introducing type hints early on

noble aurora
vale current
# misty dirge why

one reason is that they aren't enforced, which rules out the benefits of a statically typed language (that being errors or warnings which would prevent the earlier examples of the input).

native hearth
#

but thats because theyre a requirement for the language to even compile, if you could skip past that and get to other topics first why wouldnt you?

#

I personally think there's more value for iteration, flow control, etc before all this

noble aurora
#

because it leads to issues with people not knowing what types are or what type their variable is

#

you must have some knowledge of types to program

native hearth
#

you handwave them away for more important concepts when you start off, you don't teach kids addition by first proving calculus

#

it's not like they'll get away with not learning about them

noble aurora
#

obviously we agree they're important, just deciding when to teach?

vale current
#

type hints would probably be more beneficial to bring in once you have a better understanding of the basics, and are comfortable with the usage of additional tools (like mypy).

native hearth
#

Yea I think there's more impactful concepts to go over when you're first starting

#

With python, how would you teach types before going over what classes are and how to make them

noble aurora
#

that's my problem with python ig ¯_(ツ)_/¯

native hearth
#

Well how would you solve it, pick a different language?

#

Every language suffers from "forget about this for now, we'll touch on it later" syndrome, some are just more severe

oak breach
#

im +++1 on teaching types early and +0 on teaching type hints early

native hearth
#

(btw im kinda serious, how would you solve this, asking for a friend)

noble aurora
native hearth
#

So you'd pick java? what about other boilerplate that you have to handwave away

noble aurora
neon pasture
#

I feel like you could restructure the curriculum in a way that would explain types properly early on. For example starting in an interactive shell and not with hello world

vale current
#

showing that, like, 10 is an int?

oak breach
#

as someone whose first language was java, i didnt really pay any attention to the public classes and the static void mains at all

#

i just had a "oh so that's what that means" moment later but that's it

neon pasture
#

start off with just using it as a calculator, then introduce more types gradually

oak breach
#

yea i like that

native hearth
#

I bet you started off making everything static tho

stone juniper
pine stratus
#

Even starting with structure can be overwhelming, like how in many languages you have to write a function to do anything (e.g. the well known Java public static void main(String[] args) that a beginner needs to chant and ignore until way later).

#

(Python does not have that issue, but interactive mode makes it even better IMO)

neon pasture
#

even in java you could probably start with jshell, but I don't think anyone actually tried that yet

weak mortar
#

I am having problems in doing a project for beginners in python without looking at the answer

#

Does it mean I need to start learning the syntax again?

misty dirge
weak mortar
#

I can do a calculator,create .txt archives,that type of thing

#

I was having difficulty with binary search três algorithm and the random guess number

misty dirge
misty dirge
#

@sick pewter this is the channel for talking about how to teach programming. you can only talk about matlab in our off-topic channels.

sick pewter
#

@misty dirge Hi! Thanks for the reply! I wanted to ask how's the best way of learning/teaching python to someone used to matlab.

#

I was wondering if there is someone here who made the transition from Matlab to python. I'm looking for some tips/hints/shortcuts

sick pewter
#

@misty dirge Will do. Thanks!

tiny needle
#

What is the hardest tool to use and learn in software engineering ?

#

Are backends more skilled than the frontends?

stone juniper
broken finch
#

Can someone please rephrase this sentence for me please - having a brain fart:
‘’identifying the objects which will be presented as resources.’’
My ex: looking from x position on a map looking at Sydney Bay Bridge during the evening

misty dirge
prime dust
#

What are epic ways to learn python? Or atleast fun projects to help develop skills.

weak mortar
weak mortar
#

I've made blackjack, tic tac toe, rock paper scissors, a maze generator, and some imperfect dice games

#

If you are interested in any of those I can show you my code

muted grove
#

Hey what’s the idea for this channel?

native hearth
#

Its about discussion on how to best teach programming, computer science and related concepts and python

cinder flax
slender cloak
#

!e illustrative python sharp corner to teach: ```py
x = [1]
y = [1]
x_id, y_id = id(x), id(y)

x += [2,3]
y = y + [2,3]

print(id(x) == x_id)
print(id(y) == y_id)

worldly dewBOT
#

@slender cloak :white_check_mark: Your 3.11 eval job has completed with return code 0.

001 | True
002 | False
desert patio
#

yep

desert patio
# desert patio yep

@slender cloak video link that skips to part that discusses about that python sharp corner: https://www.youtube.com/watch?v=_AEJHKGk9ns&t=631s

"Speaker: Ned Batchelder

The behavior of names and values in Python can be confusing. Like many parts of Python, it has an underlying simplicity that can be hard to discern, especially if you are used to other programming languages. Here I'll explain how it all works, and present some facts and myths along the way. Call-by-reference? Call-by-v...

▶ Play video
tiny needle
pure heron
tiny needle
#

Its on topic

pure fog
# tiny needle Difficulty in the tool and learning , I dont have time for nonsense

frankly your question sounded more like bait for a flamewar, or the title of a spammy youtube video, than for constructive conversation 🤷‍♂️

to answer the question: no, absolutely not. frontend developers need to learn different tool sets and have different constraints on their problem space, but "skill" is not a factor. regarding difficulty of learning the tools and ecosystem, my personal opinion is that frontend is a lot more complicated and there is more to know in order to achieve basic industry-standard productivity. maybe if you include "databases" in the core backend skillset, it levels the playing field a bit.

#

regarding the teaching of these skills thereof, you could probably spend one full university course each on "frontend dev" and "backend dev", assuming sufficient pre-requisite knowledge of python, javascript, the basics of html+css, and the basics of databases

subtle owl
#

If you plan to use the difficulty to make your career choice, then that would be the wrong optimization metric

near shale
#

not sure if the title is referring to teaching others, but is there any standard resources or advice someone could point me too on 'how' to learn new technologies and languages? I don't mean 'read documentation and do projects', though I'm sure that's helpful. I'm looking for something more thorough that I could refer to over time, or maybe just a bit of assigned reading

misty dirge
#

what is the best way to learn python quickly and efffectively
@mossy scarab there's no absolute way to quantify how quickly you're learning something. you can probably master the basics of Python in a few weeks, but becoming an excellent programmer is something you'd do over a whole career. So don't think about how long things are taking. Focus on maintaining a positive attitude about learning.

full blaze
native hearth
#

How do you reconcile "try it out and see" and "dont run code you dont understand"
Sounds like conflicting advice, how do you explain this to beginners learning not only python but programming in general

#

Especially online where they might come across innocent looking code that might end up forkbombing their shit to kingdom come

stone juniper
#

there's two different kinds of "try it and see" questions: "what does this code do?" and "can you do X?" like
"can you use slicing syntax on strings?"
"what happens if you pass too many arguments to a function?"

#

the latter of course aren't dangerous

#

i guess it does take some experience too tell the difference between what is safe to try and what is not

noble aurora
#

I think one of the main differences is that with asking what code you don't understand does, you've already got a piece of code, whereas with the other one, you would need to create the code yourself first. so the two things aren't actually that overlapping

pine stratus
# native hearth Especially online where they might come across innocent looking code that might ...

Depends on if security is an issue in your context. If it is, don't run anything you downloaded from anywhere without some analysis and on a isolated machine or at least a virtual machine. If security is not an issue, then you kind of just do what everyone does, and download and run all sorts of code without knowing what it does (e.g. pip install ... (do you know exactly how OpenSSL works or OpenCV / what it's actually doing?)).

#

The just download and run anything will probably become less of a thing as more and more supply chain attacks happen (e.g. the recent attempt on Github).

#

IMO, the correct thing to teach here is to play it safe and make sure you understand what code you are relying on. The best way to is make sure is that your dependencies are few and small.

pure heron
# stone juniper there's two different kinds of "try it and see" questions: "what does this code ...

This is how I see it as well. "Try it and see" is useful when someone says "can I do X" - the advice is "try it and see what happens, it won't break your computer and you'll learn something."
"Don't run code you don't understand" is useful when someone wants to run code supplied by someone else, which very well might break your computer.

It's not easy to accidentally break your computer, but it is easy for someone who knows what they're doing. The first piece of advice is "don't be afraid to experiment, you won't accidentally break things". The second is "don't trust other people, they might be trying to break things."

native hearth
#

I asked the question after suggesting someone try a line of code to get an error with unpacking strings
But the issue was that people post all kinds of shit here, someone might take this try-and-see advice and it might back fire for a command like rm -rf

pine stratus
#

You probably won't see people doing the same for Windows or Mac nearly as often.

#

For now, to use Linux you need to know much more about what is going on with your computer because it will break at some point.

plush laurel
#

please delete your messages here, because you already asked the question in the right place (#help-cookie)

brittle totem
#

how to explain dynamic typing in a simple way, i want to make some random python tutorial, but i dont want to go too deep because it gets boring
like if i explain it i might need to also explain what are types or other concepts such as strong/weak and static types.

#

and it's like the first video, i expect people to know nothing beforehand

#

or should i simply throw that away for a while

vale current
misty dirge
#

can anyone think of a beginner example of two classes that have methods with the same name, which "do the same thing", where the two classes do not have overlapping MROs (except object)?

stone juniper
#

list.pop and dict.pop kind of

noble aurora
#

arguably int += and str +=

misty dirge
misty dirge
noble aurora
#

duck typing is a kind of polymorphism

oak breach
#

the kind at runtime

noble aurora
#

you can have runtime polymorphism without duck typing, a la vtables

stone juniper
#

this channel is for discussion about how to teach computer science, but you can open your own help channel from #❓|how-to-get-help

misty dirge
#

@safe dirge Your question was off-topic for this channel, which is about how to teach computer science and programming.

#

I guess I'll introduce a topic.

#

For those who have taken formal programming courses, what attention was given to notions of code quality? things like DRY (don't repeat yourself), effective problem decomposition, and intuitive variable naming. In your answer, please say what kind of programming education you're referring to (ie, I'll be talking about courses/modules for a computer science degree, as opposed to a software engineering degree or a bootcamp).

almost all the attention to this in my courses was about code quality in the context of Java-style OOP, and I don't think this was very helpful.

#

Like, we had to memorize all the OOP design patterns in that one book, and learn the formula for class cohesion. And in all the code I've ever been paid to write, I don't think I've ever defined a class that wasn't subclassing a class from a library to work within their framework. (in which case the OOP design patterns and class cohesion don't really apply, because you're using an API rather than applying OOP esotericism.)

native hearth
#

My experience has been similar, besides the memorising of design patterns which i dont actually remember if we had to do, pretty much the only "tip", "advice" we got for clean maintainable code (for our python course) was to obey DRY by identifying repeated code and stuffing it into functions

I ended up helping half the class pass that module, no talk of conventions, no standards, no applying the principles we were supposed to learn in the java classes, etc

green timber
#

my teacher yesterday told the class: "You should never break a for loop. If you want to leave a loop prematurely use a while". Thoughts?

stone juniper
#

bad advice

#
for thing in stuff:
    if condition(thing):
        break
```vs
```py
idx = 0
while idx < range(len(stuff)):
    if condition(stuff[idx]):
        break
#

there's just no reason to force yourself to use the latter

#

notably i made a mistake and forgot to increment the idx

#

can't do that with a for-loop

#

and the latter requires stuff to be a sequence, not just iterable

pure heron
stone juniper
#

i havent had my coffee yet, is this different than what i just said?

pure heron
#

nope, it's exactly what you said, I just somehow missed your last sentence

#

carry on 😅

#

I have also not had my coffee yet, hehe

green timber
#

yeah that's what I thought

#

I have to follow her "good practices" to pass tho

green timber
#

and the teacher is really obsessed with making sure we don't use the word "list"

misty dirge
#

@pure heron @stone juniper do I need to start sending you coffee each morning

misty dirge
#

(which might seem pedantic, but I would probably be teaching a python class for data scientists, and using list and array interchangeably would occasionally result in catastrophic communication failure)

noble aurora
#

basically at that point you're just emulating a for loop lol

pure heron
#

sure, every for loop can be rewritten as a while loop, and vice versa

#

but it's unwise to not follow the idiomatic usage of each of those types of loops

noble aurora
#

yeah, definitely. I also heard the "leave loop early = while" from my java teacher. I wonder where that comes from

misty dirge
green timber
#

(was one of my messages deleted or did I just forget to send it? pithink )

misty dirge
#

Some people say that something like C++ is better for starters. What do you think?
@weak mortar the only thing that I think would make Python a better beginner language for prospective career programmers is if it had static typing. (I like that Python is dynamically typed, but I think it makes it harder for beginners to grasp certain concepts.) And C++ has this.

That aside, C++ requires you to manage memory manually, and the human brain is not fully capable of this. Understanding how memory works is very important if you want to be a career developer. Whether or not you need to learn it in the context of a language that doesn't do it for you, I'm not sure. (I've heard it asserted that you have to start learning programming via a language that has manual memory management, or you "won't understand fundamentals", and I think this is an extreme take.)

misty dirge
green timber
native hearth
#

Is the array-list confusion really that important in python?

neon pasture
#

it is not a very good argument

pure heron
#

It might make sense in languages where a for loop is typically just a counter, but it makes no sense in languages where a for loop is "for each"

noble aurora
misty dirge
#

Yes, that. And in other contexts, not really.

pine stratus
misty dirge
#

But the reason list-array confusion is so treacherous in the context of numpy (and scientific computing more generally) is that depending on what is being discussed, if two people are using incongruent definitions of "list" and "array", they may have been talking past each other for quite a while before one or the other says something that doesn't make any sense to the other.

pine stratus
#

Lists and arrays are also often two different things in pseudocode, because in math they are two different things, and Python wanted to copy that.

#

(Python does a lot of math-correct things, like how its modulus operator works (vs e.g. C which is actually the remainder operator, not modulus))

weak mortar
#

can some one help me here?

pure fog
#

a "list" is generally a type of sequence, not a physical data structure of 1s and 0s. a "linked list" is a data structure

#

i suppose you could also do something similar for "array" vs. "contiguous array", i'd have to think more about that. maybe you're stuck with the overloaded term in that case. but at least usually the best way to represent a mathematical "array" is with a data-structure "array". whereas a "list" could easily be a "contiguous array" (like in python) or a "linked list".

#

and "vector" is the most abused piece of terminology in all of computer science imo

pine stratus
#

It's kind of like how Java has HashTable and HashMap. In Java there is a difference. The context is which programming language / standard library or library in general.

#

"vector" is abused mostly by C++ and that abuse has spread to newer languages like Rust (it's actually a dynamic array).

noble aurora
pine stratus
noble aurora
#

ah right, and hashtable doesn't allow null keys,values. but that's not really a different data structure

misty dirge
fallow terrace
pure fog
pine stratus
pure fog
pine stratus
#

Which matches the math terminology of list.

pure fog
misty dirge
pure fog
#

common lisp lists are true linked lists ("cons cells") and arrays are true contiguous arrays

pine stratus
#

I know that many LISPS and the originals use linked lists, but they don't have to so in the case of LISPs your statement about it being an array or linked list is correct.

#

(about lists)

pure fog
# misty dirge wouldn't having a fixed-size linked list be worse than a contiguous-block array ...

well it's easy to write proofs about it, because lists and natural numbers are isomorphic in that they form a monoid with 0 and []/Nil being the identity element and 1+ and Cons/:: being the addition operator. so you can do stuff like recursively cons something onto a vect and also be able to prove that the size of the vect increased by 1. i'm probably not explaining that quite right but hopefully it makes some amount of sense.

pine stratus
#

Point is it depends on context. C++ thinks dynamic arrays are vectors, and everyone else has some sane naming.

fallow terrace
pure fog
pine stratus
#

(linked list of arrays / big records)

pure heron
misty dirge
#

I never really see people talk about array.array except in the context of "people say array when they mean list". and I've never actually seen someone write code with it.

pure heron
#

sure, it's not commonly used.

misty dirge
#

what does anyone use it for?

#

this seems like a case of "if you need a data structure that's more optimal than list, but you're not doing data science, you're using the wrong language"

pure heron
pure fog
#

(i learned about this many years after it came out)

#
from array import array
from collections.abc import Sequence
from random import Random

def ints_to_string_join(data: Sequence[int]) -> str:
    return "".join(map(chr, data))

def ints_to_string_array(data: Sequence[int]) -> str:
    return array('B', data).tobytes().decode('ascii')

def ints_to_string_bytearray(data: Sequence[int]) -> str:
    return bytearray(data).decode('ascii')

r = Random('arrays are fun')
data = [r.randrange(ord('0'), ord('z')) for _ in range(100)]

%timeit ints_to_string_join(data)
%timeit ints_to_string_array(data)
%timeit ints_to_string_bytearray(data)

interestingly the array.array version is still faster than str.join, but the bytearray version is by far the fastest

## -- End pasted text --
2.1 µs ± 10.3 ns per loop (mean ± std. dev. of 7 runs, 100,000 loops each)
1.51 µs ± 2.02 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
548 ns ± 4.22 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
desert patio
pure fog
desert patio
wispy vector
#

Hey any php developer here?

stone juniper
sacred violet
misty dirge
subtle owl
weak mortar
#

heey I wanted to install version 3.9 but the link send me to 3.10. is 3.10 safe to use?

weak mortar
misty dirge
weak mortar
#

okay my bad!

spring canyon
#

Looking good

#

Hey does anyone know a website or free regex course?

keen tundra
# spring canyon Hey does anyone know a website or free regex course?

This is a good intro to regex: https://www.regular-expressions.info/quickstart.html. I recommend experimenting along on https://regex101.com/ as it provides nice and clear explanation of what's going on. After you get yourself familiar with the basics, you can learn about more advanced stuff at, again, https://regex101.com/, though features outside of the ones discussed in quickstart are used very rarely. Other than that, I don't think regular expressions require a special online course to master them.

#

Good job! Let me point out a few things:

Make sure your code style is consistent, either insert spaces between function names and parenthesis on the last four lines, or remove them from everywhere entirely. I recommend the second option, because it's a more conventional approach.

Also, make sure the names of your variables logically represent their type. In your example, quantity is a string, which is being converted to int only when necessary, but it may cause confusion if you use it the second time, because you may forget to convert it to int again. I would rather do quantity = int(input("How many...")).

I would also recommend looking into f-strings, they can simplify your code a lot, but don't rush it if you don't feel you are ready yet.

Finally, make sure to go back to this code when you learn more about python and try to rewrite it using dicts and loops. You will be amazed by how your code will transform. From there, you can try to gently handle all the user mistakes (for example, what if item use requested is not in a menu? Or what if a given quantity is not a number?).

Anyway, good luck with your python journey.

#

And I have a question. Are there any good resources to teach competitive programming with Python?

I'm mostly looking for a way to hook them. Usually competitive programming comes down to "solve problems, do contests", is there anything more interesting?

fallen tundra
#

I think that in order to become best python programmer, everyon must study thos modules : itertools, collections, operators, re and functools.
How do tou think about this?

thorny onyx
#

Hi i am Levon 👋😊

#

i am beginner in python

#

Me and my friend want to do a joint project who wants to join?😊

misty dirge
#

@thorny onyx @fallen tundra @keen tundra @spring canyon please remember that this channel is for the discussion of the methods and practices of teaching. If your comment is not about teaching, please do not say it in this channel. Please do not respond to off-topic comments, either.

misty dirge
keen tundra
# misty dirge isn't competitive programming mostly about memorizing classical algorithms?

I'm not sure whether I can answer this question simply. Often times it goes beyond that. I know a lot of problems where classical algorithms won't help, but ideas behind them are very useful. For example, I've seen a problem where you need to subtract polynomial hashes to look for palindromes. If you don't have a deep understanding of how hashes work, you definitely won't be able to solve it. Does this counts as memorizing algorithms? I don't think so.

#

I apologize for responding to off-topic comments, btw

misty dirge
#

The topic is how to teach skills for competitive programming, if anyone is interested in that.

molten abyss
#

thats pretty awsome for day 3

misty dirge
#

Please don't respond to off topic messages

weak mortar
#

I learn3d oython for like longer than that and still cant do no nothing

#

its time i start taking it seriously

misty dirge
#

@weak mortar Please don't respond to off-topic messages.

pseudo flare
#

@thorny onyx me bro

half wigeon
#

@queen heron @gentle tapir @gilded iris @wild crescent what are your thoughts on teaching OOP earlier than normal? i've had good success with my younger students.

pure fog
#

how are you teaching it @half wigeon?

half wigeon
#

youtube tutorial.

#

actually i'm not a teacher but i think about python pedagogy a lot. i think OOP needs to be taught sooner.

#

how do you folks do it? i seriously don't know

misty dirge
half wigeon
#

@misty dirge what do you mean?

misty dirge
#

Because it's easy to make OOP sound like esoteric nonsense.

half wigeon
#

you can teach kindergartners OOP. just don't use any code. say they're gonna do a brainstorming activity about cars/dogs/movies/etc.

misty dirge
#

Let's assume OOP is easy to learn. Why does it need to be taught "soon"?

half wigeon
#

when i say OOP i'm talking about classes and instance methods and static methods and inheritance and polymorphism, ok?

misty dirge
#

Yes. My question still stands.

half wigeon
#

well why do you think it shouldn't be taught soon?

misty dirge
half wigeon
#

oh ok

#

well it makes it easier to write python that looks like english

neon pasture
#

there are a number of programs which just don't need OOP, even in the most broad sense of "using the class keyword". You can make anything up to simple games with just lists, strings, and numbers.
And getting someone to a point where they know enough to do more complex things that actually warrant the use of even a dataclass, much less an "OOP" class structure with inheritance and polymorphism, takes a while.
What would you say a good first project where inheritance helps rather than just being shoehorned in to force someone to use classes would be?

half wigeon
#

i could cook something up. gimme a sec

pine stratus
half wigeon
#

python that looks like english is readable

misty dirge
#

Not necessarily

half wigeon
#

well there are exceptions but still

pine stratus
#

If programming in a natural language like English was a good idea we would be doing it instead of using a programming language.

half wigeon
#

i think we're not really picturing the same thing here.

#

brb going out for a cigarette

neon pasture
#

everyone's preferences in the "natural language <-> math symbols" scale are different. I do tend to like more language than symbols, but I know people who disagree.

pine stratus
#

At a higher level English-like procedures can be nice, but you can't escape the details, only hide them away.

neon pasture
#

You can encode those details in english as well, the problem is more that at some point you do want symbol to do things.

pine stratus
#

And for the details, programming languages are nice because they are not vague.

#

(And straight to the point, a natural language adds lots of fluff to that)

#

A nice similar example is from mathematics. Before algebraic notation, proofs were written / described in natural language and with images. And it's long and very hard to follow.

half wigeon
#

what about unix?

pine stratus
#

For very simple things,not so long and much easier than first having to learn the notation.

#

But for anything slightly complex, a complete pain.

neon pasture
#
function Sum (Vec : in Vec_T) return Element_T is
  S : Element_T := Zero;
begin
  For I in Vec'First .. Vec'Last Loop
    S := S + Vec(I);
  End Loop;
  Return S;
End Sum;

Function Average( Input : In Array_of_Records ) Return float is
  Sum : Natural:= Sum( Input );
Begin
  Return Sum / Input'Length;
End Average;
``` is clearly too much

{(+⌿⍵)÷≢⍵}

pine stratus
#

Having a programming language mimic natural language falls into that trap of simple things being nice, but it does not work on more complicated things well at all. Way too verbose and hard to follow (see COBOL).

half wigeon
#

but unix you could teach to kids

#

touch it
here's mr bunny
touch it

pine stratus
#

APL, is the extreme opposite, but its real issue is that lack of a standard.

#

You can make up whatever in APL and use whatever symbols making it a nightmare for multiple people working on it / maintainability. It's write-only.

#

Haskell has a similar problem and C++ to some extent too because it allows for too many options.

half wigeon
#

hey guys here is mr bunny
touch it
now alias remove='rm'
now remove it

#

touch it. remove it. touch it. remove it.

neon pasture
#

unix is a terrible example for english-like syntax

#

no one even remembers the etomology of grep

half wigeon
#

touch the top of your head and now touch your feet and now you have to touch your toes is a valid unix command. try it.

neon pasture
#

anyways, to get back on topic, there is value in english like syntax to a point

#

and I think python nails that point quite well

pine stratus
#

I think what you want and are getting at is the dot syntax in Python, which many other programming language share. Such as cat.move().

#

Technically this is not really part of OOP, but it often comes in languages that have OOP. And by OOP I mean Java/Python OOP, not Erlang OOP.

pine stratus
dire pasture
#

also, arnt arrays = lists?

noble aurora
#

that's a feature of print, not of strings in general

dire pasture
# noble aurora no

whats the diffrence? if i may ask - i like look at them at google and they use the variable = [' ']

noble aurora
neon pasture
#

yeah, there I am inclined to agree

misty dirge
#

@royal palm I had to delete your message, because it was off topic, and people kept replying to it.

sharp vessel
misty dirge
#

@dire pasture please don't respond to off topic messages.

dire pasture
#

wdym - stelercus

misty dirge
#

The on-topic conversation was about when to teach OOP. Please make sure all your messages are about that, or introducing a new topic that is relevant to the channel description.

misty dirge
neon pasture
#

Why is hello world the first program people teach anyway? It seems quite unhelpful, considering that it requires either handwaving a lot of details, or a number of new concepts. I would argue writing 1 + 1 in the repl would be a better starting point.

pure heron
#

When I teach Python, I do start by showing how to use it as a calculator in the repl. But that's not really recognizable as a "program", I think

#

And teaching using the repl is not without its drawbacks. The fact that the repl prints expression results without you calling print likely leads directly to a lot of the confusion that new users have about print vs return

#

The fact that None doesn't get printed automatically by the REPL probably contributes to that as well, in fact.

neon pasture
#

yeah, that's fair.

fallow terrace
#

I think "hello, world" is an easy way to show people that you can do things with the code, hence why it's so popular.

#

it's not a particularly useful thing, but it's something

noble aurora
#

at least in python, print(...) is almost as intuitive as 1 + 1. maybe in a lang like java it might make sense to start with a repl

pine stratus
#

REPL also gives that, but implicitly which can lead to the later confusion mentioned by godlygeek.

#

Some REPLs such as the classic BASIC ones did not automatically print anything, so it depends on the REPL. Automatically printing things is more useful for non-beginners because it's less work than having to always add a print.

half wigeon
#

use the python shell

#

the one that comes with 3.9 or above

#

i'm interested in tutoring python. i'm self taught. lots of youtube videos. got a few tricks up my sleeve

misty dirge
native hearth
#

I think they mean the ipython shell? v8+ has some nice improvements, like formatting, better syntax highlighting etc

noble aurora
#

ipython doesn't come with python.org python though?

fleet pulsar
#

maybe it comes with anaconda? haven't used it in a while

pure fog
#

it comes with "anaconda" but not with miniconda

split ice
#

yall why does:

condition = 50 | 100
print(condition)```
return 118????
#

I dont understand the purpose of the pipe operator... In some cases it works like "or" and in other cases it is used as a union... and now im even more confused because im getting 118 somehow???

wild crescent
#

That's bitwise or

#

Not a pipe operator

#

@split ice

split ice
wild crescent
#
50  == 0b0110010
100 == 0b1100100
118 == 0b1110110
noble aurora
#

on ints, it's bitwise or

split ice
#

so then what is the pipe operator?

wild crescent
#

Nothing

#

In Python anyway

#

Python doesn't have a pipe operator

noble aurora
#

| is a pipe

split ice
#

the new union operator was that right?

noble aurora
#

on some things, it makes a Union, on some, it does set union, on ints, it does bitwise or

wild crescent
#

| just calls the __or__ dunder

split ice
#

ohhh i see

#

that makes more sense, thanks guys! 👍

misty dirge
#

This channel is for talking about methods for teaching programming and computer science, so please make sure all your messages are about that.

hasty pebble
#

Speaking of which, are there any good open source projects that have use UI emulation similar to instructional courses like https://pluralsight.com course? It'd be nice to handcraft content for demonstration and learning. Also interested in quiz/assessment solutions similar to https://codesignal.com.

misty dirge
#

@tender mantle please make sure that your messages in this channel are on-topic.

stone juniper
#

please do not continue off-topic conversations

tepid solstice
fallow harbor
#

How early would you get into projects when learning Python, i am so worried of forgtting everything i am learning?

weak mortar
#

Hi Everyone
Can someone help me with how to generate Access_Token using Graph_API by Grant_Type = Password with python scripting?

misty dirge
pure fog
#

even tiny projects like a program that adds 2 numbers are good hands-on experience. it's valuable to just start writing code, spend time building something, and actually finishing. lots of small projects is a great way to reinforce what you know and practice

fallow harbor
#

Thank you @pure fog

weak mortar
fallow harbor
#

thanks @weak mortar where do we find the projects lol?

weak mortar
#

Learn everything you can. Because in the meantime youll learn how to teach yourself things

fallow harbor
#

Awesome 🙂

misty dirge
#

Topic: when should you teach the term "polymorphism"? In my education, it was presented towards the end of the introductory course, but only in context of the liskov substitution principle (which made it more difficult to wrap my head around what it is more generally towards the end of the program). I think everyone found it arcane and didn't understand what was so remarkable about it or the utility of having a term for it.

I would only present it in a course that's specifically about programming language theory. In that context, it might be useful to discuss different levels of type rigidity.

covert escarp
#

I think the issue with Polymorphism is that because it is left till towards the end of the course, people automatically associate it with being rather super complex, but in essence is a somewhat simple concept when introduced well.

#

I would start introducing the concept itself at high level towards the middle of the course, and add on to that such that when we reach the point to fully talk about it, it is not just a hot brick but rather an application of a concept that has already been approached through the class.

weak mortar
#

anyone is there who can help me as a mentor

noble aurora
pure heron
#

Right, "duck typing" is the typical way to get polymorphism in Python

misty dirge
#

@naive acorn this is the wrong channel. Kindly remove your message

mortal badge
misty dirge
#

Because if that part were polymorphic, it wouldn't need to type check the argument. It could just leverage the shared behavior of the set of permissible types.

mortal badge
#

So is 'polymorphism' specifically referring to the function interface or the underlying behavior - the behavior can't be non unique all the way down to the metal

misty dirge
pulsar tiger
#

Isn't teaching programming inherently inefficient? Doesn't a majority of learning come from just reading code?

misty dirge
#

remember that "teaching" isn't just lecturing in a formal setting. it can be writing a book/tutorial, or answering questions on this server.

pulsar tiger
noble aurora
#

i think this kind of thinking comes from a sort of bias. a beginner doesn't even understand what they're reading, so they won't get anything from reading code. however as someone with more experience, you're familiar enough with basic structures that you can just look up the tiny parts you don't know, e.g. a library function or something. also, a beginner isn't quite as familar with documentation, so they even have that going against them

misty dirge
pulsar tiger
pulsar tiger
#

There's a book called How To Solve it by G. Polya that explains how to guide a student in dealing with tough problems. I think that's probably the best resource I've seen for guiding someone through the discovery process. Basically developing mental operations.

misty dirge
pulsar tiger
misty dirge
pulsar tiger
#

"The teacher who wishes to develop his students' ability to do problems must instill some interest for problems into their minds and give the plenty of opportunity for imitation and practice." - Polya

pure fog
#

I think the reality is that every student needs some amount of reading code, hands-on practice with code, reading theory, hands-on working with theory, and chatting with other students and programmers. The challenge with teaching is constructing an environment in which all of those things are available to some extent, and tuning the ratios among them to match the pace and objectives of the course, as well as the capabilities and motivation/interest level of the student

#

so I don't think anybody is going to disagree with you in that reading code is useless. But some people might find it more useful than others, students and teachers alike

#

I definitely agree that there comes a point in learning programming when the best possible thing for the student is to just start reading other people's code. The experience of realizing that they actually have the ability to read other people's code I think is a strong positive reinforcement signal, and it also helps them "get out of their own head" when it comes to writing code and designing programs

covert escarp
# pulsar tiger Isn't teaching programming inherently inefficient? Doesn't a majority of learnin...

with all the "self-taught" programming being the new thing, there seems to be a miss-understanding of the role of a teacher. I do believe, that reading code, working on projects, and talking to other programmers are all good. And because different people learn differently, each person learning will have a subset that works for them. However, it terms of teachers, their roles should be consider more of guidance, rather than a machine (or someone) that regurgitate materials (aka lecturers) having thought data engineering and programming, there is a difference between handing someone a book and they read it, and create something, and guiding someone, whilst they follow along in a book.

#

for example, when I first started to learn to migrate data from one location to another, I had no knowledge of networking, which lead to a lot of errors. If I had some guidance, I would have still learned that, but it would make a lot more sense as to why certain aspects of my code was not working as I would have expected.

pine stratus
# covert escarp with all the "self-taught" programming being the new thing, there seems to be a ...

I agree. I believe that books are still the best way to learn something (although in theory interactive books / games could be better, but I don't think it has been executed well (and won't be as long as they focus on passing tests in schools instead of actually making a good game first (primary goal))), but there are too many topics with too many books (especially now in current year). The teacher is there to provide a direction. Without that direction one could have read many (worst case maybe hundreds?) books and still not have right knowledge for the problems they want to solve (consider not having anyone to tell you which books to read ever, no internet to reference for guides either, you might never encounter important topics like algebra). As an example consider learning mathematics, it is possible to rabbit hole on one specific topic for one's entire life, it's a never ending bucket of theorems. For most things one wants to do practically there is some general history that most follow as a guide on what can / should be done (and where to go next). The internet has further amplified the number of things to search through (more hay in the "needle in haystack" problem), although it also came with a bunch of guides (but with high variance in quality).

terse cradle
#

Hello
I am looking for a good website that teaches and trains Python interactively, solving exercises hands on and the ability to review the detailed answers later.
Also, a list of small projects to do later would be great.
I mostly worked with Bash running scripts in Linux machines or Cisco-like Switches. Now in a new job I need to test and debug a fleet of servers and storage/cloud nodes.

pure fog
#

it sounds like you really need/want a course with an instructor and exercises

#

!resources @terse cradle we have a list of python learning resources on our server website

worldly dewBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

terse cradle
#

Thank you @pure fog its a big list 💪

bitter osprey
#

i picked up a book on oop and on the end of the first chapter its teaching me freakin iris classification problem for machine learning like wtf?

#

its interesting but i feel like ive bitten more than i can chew here

pure fog
#

that does seem like a strange thing to introduce in an object oriented programming book. possibly because they think machine learning will be exciting for students because it's trendy

bitter osprey
#

the preface says its for beginners but i have no idea wtf its talking about

toxic rover
#

The book revisits the iris classification problem several times. It's not a terrible idea. Forcing someone to deal with and break down a new and unfamiliar problem is something that should be in this book. But "let's cover k-nearest neighbor" seems out of place in the middle of chapter 1.

bitter osprey
#

hello @toxic rover, the third edition was not like this at all. the end of everycahpter frm the third edtion was like "you should find projects where you can implement oop.. to help you practice."

#

this steven lott guy pumped the gas on this book big time lol

pure fog
bitter osprey
#

to be fair, the more i read it, the more, it seems like its less about teaching how to solve a specific problem, and more about watching a person use oop to design and analyze a software. i dont know if that's what they are going for.

#

its like when you apply for a job at the super market they usually have you "shadow" somebody so you can see how its done.

pure fog
# bitter osprey to be fair, the more i read it, the more, it seems like its less about teaching ...

i'm sure that's what they're going for here! but machine learning is such a complicated problem domain with its own set of skills and terminology that is largely removed from "programming". i remember encountering examples like this in math classes, where they were trying to use some kind of complicated physics or engineering model to demonstrate math principles, but all of the physics and engineering obfuscated the math, even though it was nice to see an interesting real world application

#

classification on the iris data set seems like opening a pretty big can of worms

spiral socket
#

I am a student

wide shell
# bitter osprey its interesting but i feel like ive bitten more than i can chew here

I teach beginning and intermediate Python at two universities in "Silicon Valley" in California. My specialty is in OOP, so I looked around for what I considered a good book on the topic to use for my intermediate course. I could not find one that I felt covered the topic in the way that I wanted to teach it ... so I wrote my own. The book is called "Object-Oriented Python: Master OOP by building games and GUIs". It's available through the publisher, No Starch Press, on Amazon, and at most technical book sellers. https://nostarch.com/object-oriented-python

native hearth
#

why did you pick games and GUI to focus on OOP? why not something closer to what you'd encounted in the industry

weak mortar
#

a lot of people are initially interested in cs because of game development

#

even though they might realize later in life a lot of things are different about the game dev industry it's possible the book topic was chosen to be as engaging as possible

wide shell
wide shell
misty dirge
#

@wide shell I have an electronic copy of your book. The first thing that stands out to me is that your code examples use lowerCamelCase. Was this a deliberate choice?

native hearth
#

I understand the highly visible nature of GUI, its why i usually recommend JS to beginners myself, but games are hard man, I dont think I would personally stick out a game project as a beginner

wide shell
wide shell
# native hearth I understand the highly visible nature of GUI, its why i usually recommend JS to...

I use the pygame extension to introduce the concept of basic event loop programming. However, pygame does not come with a set of GUI widgets. So, in my introductory course, I have written a set of GUI widgets that my students can use (simplest example being a button). In my intermediate course, we go into the implementation of these widgets so they understand how these widgets work. Then they can start to create their own classes and objects and build small games with them.

pure heron
# wide shell Yes it was. I have been using the camelCase naming convention since before Pyth...

I regularly tell people on this server that writing code that doesn't follow PEP 8 is a very strong signal that they haven't read enough Python code yet. The convention to use snake case in Python is so strong that choosing not to follow it makes you look amateurish, as though you're either ignorant of the conventions, or so steeped in another language's conventions that you haven't bothered to learn Python's conventions - either way, it's a negative signal. I strongly recommend changing that style for your next edition

misty dirge
#

I agree. I think it's important that educational programming language material follows the convention of the language that it's about.

pure fog
wary sleet
winter spear
wary sleet
#

I'm a new student for cs and I wanna start from ml and dl

pure fog
# wary sleet I'm a new student for cs and I wanna start from ml and dl

learning data science is sort of out-of-scope for this channel, since it involves a lot of things that aren't programming (math, data visualization, et alia). you can look in the resources in #data-science-and-ml. in my opinion Probabilistic Machine Learning is the best "new" book, but it requires a background in probability (like what you'd learn in an undergrad university level course)

wary sleet
regal prawn
winter spear
misty dirge
cloud pawn
#

Hey guys have you worked on the selenium grid needed help from you please

covert escarp
#

@cloud pawn please use a channel from the #❓|how-to-get-help , and do not spam multiple channels with the same question

cold acorn
#

hello

misty dirge
#

Topic: Technical Writing. Programmers are, at least stereotypically, terrible at writing, and hate writing documentation. Should technical writing be considered a core competency of developers, and if so, how should programming education reflect this?

In my education, I don't recall any specific attention to technical writing. If there was any, it was never any larger in scope than writing documentation for individual functions/methods. (Though I took my one software engineering course during the semester that Covid started, so that kind of derailed things.) I think technical writing is extensive enough that it could be a course on its own (even if it's, I don't know, two credits instead of three), but I don't know if I would mandate that it should be a requirement for a CS degree (because CS has enough scope-creep as it is). I might want it to be a requirement for a software engineering degree, or a CS degree with a SwE concentration.

lunar wave
# misty dirge **Topic: Technical Writing.** Programmers are, at least stereotypically, terribl...

I'm of the opinion that communication, especially written, in general should have more focus in many career paths. A consistent struggle we see in our teams where I work is that technical writing aspect. How the code is designed, how it is intended to be used, and what errors are captured (and what they mean) all go mostly undocumented.

The task of writing up technical writing is a lengthy one, for sure. I don't think I'd expect all devs to be able to provide a polished piece after a feature build. However, I do expect them to at least have the knowledge of what goes into that writing, be able to record it themselves, and know why they should record it.

misty dirge
neon pasture
#

My school does this fairly well in that every project has some documentation as part of it, though we also don't have a technical writing course

lunar wave
#

I can't speak from an education driven awareness, unfortunately. My limited schooling including genEd composition and nothing more. I am a writer though, by nature, and have decades of learning how to put the complex into repeatable context. (past jobs).

#

As you mentioned, the stereotype is strong with being poor at writing documentation. I don't find that holds water in the field. Many of my programming peers are very good at writing up a summary of their work. Most just don't ever have the directive, time, or focus to do so. Always pushed to the next feature.

fleet pulsar
#

In my work environment, developers are expected to provide quality documentation for code itself (think docstrings and comments), and enough information about more general things like architecture and platform's design. A separate technical writer is responsible for actually documenting the design and preparing e.g. onboarding materials or the redmine wiki, in my team one of the QA engineers happens to double as a technical writer. I think this is a fairly reasonable approach, because [designing and implementing a project] and [writing good documentation around it], albeit going hand-in-hand, are two significantly different skills

pine stratus
# misty dirge **Topic: Technical Writing.** Programmers are, at least stereotypically, terribl...

Writing documentation is very important, but technically writing is far too much of an academic approach. As long as there is any documentation at all and it's written decently it's fine and I think academia would make this way too formal and make people less willing to do it. The problem is that often there is no documentation at all. And by documentation I do not mean comments in code (although many (most?) projects are missing even that). I mean stand alone documents that go into high detail and importantly also document not just what is currently happening in a project, but also how it got there / the history of it / decisions made (and even link to commits / code).

#

IMO writing documentation needs to be low friction, not overly formal. And for programmers to be willing to do it they need to experience the joy of great documentation on a new project they have not learned yet (vs not having any).

lunar wave
#

Hmmm, that's an interesting point and, hopefully, not straying too far from the original topic. Writing external documentation that, at the very least, explains what the program is intended to do, why it was written to do so, and where it is intended to develop further. Some common handholds that would allow the next dev to start on a common ground when looking at the code.

More times than I'd like to admit I have read code, nodded in understanding of what it is doing, and asked "but why"?

#

From a teaching perspective, it's the chance for the dev-at-the-moment to teach the next-dev.

pine stratus
lunar wave
pine stratus
#

Keeping track of the history also lets one see whether certain ideas actually worked out or did not (e.g. "we started following OOP, it reduced our bug rate by X amount").

#

(No need to have design debates or language wars when you can point to actual evidence of it working out or not)

oak breach
fleet pulsar
#

That is quite misleading, such comments actually reduce the readability and negatively impact code quality

winter spear
pure heron
#

I think the reason that lots of courses for beginner programmers teach you to write "what" comments rather than "why" comments is that they're aimed at people who haven't yet built up the ability to read code and tell what is doing, at least not quickly and accurately

pure fog
#

which makes sense as a corollary of the principle that code is more often read than written. there is no universally good writing style, only the writing style that is good for your audience

pure heron
#

that's a very good point.

ripe folio
#

Would you rather work with a project/tool that is...

A: ...coded very well but documented poorly;
B: ...coded decently and has decently written documentation;
C: ...coded poorly but perfectly written documented?

#

Personally I might just rather work with a terribly written project that is documented to great extent than a good one that is coded nicely.

The documentation would be good enough such that I would never need to read the code.

On the other hand, even if the project is that perfectly coded, it is always harder to read code then documentation.

velvet tartan
#

I need help!!!!

raven flicker
#

This question might be more related to learning than teaching but I guess one cant exist without the other so deciding to post here.
I'm taking a python bootcamp course, decided to go back and redo some stuff I did 1 week ago that I then had not a lot of issues doing only to find that I now have issues completing the task. Is this a normal phenomenon or is my brain just screwed? Did I move to fast and need more repetition before moving on? What do you guys reckon

misty dirge
raven flicker
pure heron
tired forge
#

I've always found writing documentation forces me to write better code. If I struggle to explain some detail in writing, it's a good sign I didn't clearly think through my approach before implementing it, and I ought to improve it.

winter spear
tired forge
raven flicker
#

Thanks everyone! This really helps

pure fog
#

and i'll also add that this is one big reason why i strongly advocate for doing as many little projects as you can, especially when starting out. it naturally leads to spaced repetition.

hardy vault
#

I have a problem with py charm along with flask in which the code where the render_template code fails to recognize the templates folder even though someone knows how to solve it?even though I already created the folder.

stone juniper
sage nimbus
#

hi, i am passionate about programming,
i have 2+ years experience with python and want to continue furthur as i completed my 12th

what should i learn, full stack web development or android development
and what courses should i opt to master them.

misty dirge
signal galleon
#

Hey fellas - I'm new in the server, and this looks like a good place to ask things such as how to be a better teacher. Sometimes I struggle with motivating younger students, and my question is:

  • What can I do about a student who is very very keen on giving up at the slightest hurdle ? We talking that when he gets a Database Connection exception, he's very very keen on just saying "fuck it I'll just implement using files instead" , and he's reluctant about asking class members for help.
misty dirge
pure heron
#

Is their motivation to get something working as quickly as possible, or is it to avoid learning the new thing?

pure fog
# signal galleon Hey fellas - I'm new in the server, and this looks like a good place to ask thin...

it's possible that the student has never had the "aha" moment of pushing themselves through an intellectual challenge, and doesn't understand the value in putting in that kind of mental work.

and/or it's possible that they might have some difficulty or lack of self-awareness in anxiety processing and giving up is a kind of self-defense mechanism. there might also be some personal ego attachment to understanding things right away feeding into that anxiety.

note: i am not a professional in this field, but i know a handful of people irl with issues along these lines (myself included).

what kind of learning scenario is this? how much 1:1 time do you get with the students?

signal galleon
#

Special needs student with heavy heavy Autism, enough defeats from previous universities and social services, basically a guy with all odds stacked against him on a Data Science study.

misty dirge
#

Just to be sure we're all on the same page, it's not likely that anyone here has any experience with special education.

signal galleon
#

I appreciate your concern and efforts 🙂

pure fog
#

yeah the best i can offer is general advice that's worked for me on myself & people i know who have very mild learning/thinking differences

signal galleon
#

He did get a few "aah" or "eureka" moments and when he gets those, he gets more motivated

#

But he's very reluctant on sharing defeats and victories, and believes that noone else has the challenges he face.

#

As in "I don't think anyone else has issues with programming"

pure fog
#

my experience in discord + irl is that often people lack confidence in their own abilities, especially if they have had previous negative experiences and negative feedback. i very often find myself telling people (friends, coworkers, people asking for help in this server) that "it is completely normal and expected that XYZ topic is difficult and confusing, very few people understand this instantly."

signal galleon
#

I try that all the time, and sometimes I tell him "when I started, working with this topic was difficult as hell. Working with 2 different techs (Databases) the first time, is hard AF )

pure fog
# signal galleon As in "I don't think anyone else has issues with programming"

fwiw this is a real phenomenon in neurotypical people too. the antidote there seems to be a combination of a reminder that they do have the ability to do the thing and a bit of reality check in admitting that some people do understand some things faster than others -- the latter seems important to offset the natural reaction of "you are bullshitting me look at FooBar Jr. over there doing recursion with a database and a discord bot! i suck and they don't!"

pure fog
#

also if this is in a school environment, do you have access to special ed resources? it might be helpful to at least get some advice from a pro in this area.

signal galleon
#

They shrugged it off and said "okay." We're very limited in resources, and I asked some of our team "what would you do?" because I felt the student was mentally making me morose.

pure fog
#

They shrugged it off and said "okay."

unfortunately i think this the point is where the advice of a non-professional starts to make less sense.

signal galleon
#

A thing I suggested him was "put that difficult task on pause" and "find another part of the program you can fix or understand."

pure fog
#

ugh... that homepage design sucks so bad, but the people they hire to write the articles are pretty good

#

i think it's also oriented mostly for younger kids, idk how many resources there are for teenagers and above

signal galleon
#

That might be a great help - We could go full circle and imagine that CS students should be educated to develop that site and create a positive cycle

#

This is a male in his 20's, soon 30

#

Thank you so much for your 2 cents 🙂

pure fog
signal galleon
#

Inflation hits hard 😉

#

Nice to feel welcome in the server - I think I'm going to look a little in the channels 🙂

hidden wedge
#

Just speaking from my own experience ofcourse.

signal galleon
hidden wedge
#

Should i send them in this channel? i will get pretty opinionated and speaking largely about how i would want people to encourage me. so maybye we should go to DMs

hidden wedge
#

alright i'll send you a dm tomorrow, turns out i still have a lot of stuff that needs to be done before tomorrow.
again, i'm sorry, but this is important

pure heron
winter crest
#

so I have a little group chat that consists of 69+ people most are inactive and I'm known as the helper guy...
But one guy here wants the code to be fed to him, I gave a link that already has the code but isn't giving up on asking he just wants to copy paste the code...
I don't want to give him the code because he will not learn

#

I just help them by giving pseudocode

the question is:
what do I say to him? without looking like a total bad guy about it

#

pls pong me for response

#

another question:
is it good that I'm giving them pseudocode? or is there a better way of teaching them?

pure heron
winter crest
pure heron
#

if you worry that you're depriving him of the chance to learn by feeding him answers, why not just stop answering him?

winter crest
pure heron
#

serious question: why? You're younger and less experienced, and presumably he's enrolled in a program whose purpose is to teach him how to do these things, so why do you feel responsible for educating him?

#

actually, I shouldn't say "less experienced" - you may well be more experienced. But teaching him isn't your job, it's his professors' jobs.

winter crest
#

It's more of pity

pure heron
#

feeding them answers might give them benefits in the short term, but it likely costs them in the long term.

winter crest
pure heron
#

you might take some inspiration from...

#

!rule 8

worldly dewBOT
#

8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.

winter crest
#

Now that you mention it...
Is my guidance bad?
They ask to do smth but I give them pseudo code and let them take care of the code? If so how should I improve thinkmon

pure heron
#

our general rule on this server is that we won't do work for people, but we'll guide people towards the right direction, to help them learn. That's a good strategy, I think.

pure heron
winter crest
#

Nice! I learned that from experience py_guido
From here too

pure heron
#

giving pseudocode is a way of decomposing the algorithm, but making them focus on the nitty gritty details of implementing it

#

if they're not willing to turn pseudocode into code, it's possible that nothing you do or say will make them enjoy writing code, and you should just cut your losses and focus on helping people who actually want to learn.

winter crest
#

thank you@

misty dirge
#

This channel is for discussion of the methods and practices of teaching. Please make sure all your messages are about that.

calm epoch
#

youtube for the pcs i need then cobble it all together to something working 😛

#

well a few other sources also but youtube has alot that i need in easy formats

pure fog
#

i strongly discourage using it except for high-level introductions to topics, or if you find yourself in some situation where you are doing something else with your hands but still want to try to learn (e.g. standing at the sink washing dishes)

calm epoch
#

yes and no, for someone like me trying to learn basics from scratch without any formal education its a good choice, tho for someone in a formal education i doubt it would be a good choice

pure fog
#

learning to learn by reading documentation, long-format guides, and code examples is a skill that takes some practice, especially if you're on the younger side and have had your attention span abused by growing up with too much technology. but it is absolutely an essential skill.

pure fog
#

it's also a known and well-studied phenomenon that passive listening is generally not a good way to retain information and build understanding, and that students consistently overestimate its effectiveness

calm epoch
#

and yeah i have never been able to learn without doing, not even in school when studying to be an industrial electrician.

#

best thing is to have someone show and tell but being able to work and tweak what they show/say in my own work at the same time

pure fog
#

good, then you do understand! a lot of people seem to expect to have genius-level understanding injected into their brains by watching random tech influencers show them how to pip install stuff for the 100th time on youtube

#

we not-infrequently get messages like "help how do i do <some specific task> i cant find video on yt"

calm epoch
#

as with the thing im currently doing im trying to make a game in pygames to learn. i look up things like how to create a window, how to make buttons, how do i make entry fields etc.. then i try out different ways to fit those together in my own creation. it's a bit of puxxeling since the various functions i find are often made in wastly different styles. but after watching enough of them i get a feeling of what could work together

pure fog
#

again, unless you're somehow constrained to the video or audio format, i suggest looking for blog posts, stackoverflow articles, and documentation snippets before looking for videos on anything other than topics like "what is recursion".

it's the difference between watching a video showing how to do some wiring task versus actually having wires in your hands and following along.

importantly, unlike wires, code is literally text, so text-based formats are actually the best medium to communicate code (whereas learning "handy" stuff from a book is kind of rough, and videos are an amazing resource there)

calm epoch
#

isn't pip install the FIXALL !!?? 😛

#

yeah i use a fair bit of stackoverflow too, often people will give quite good explanations with their solutions there

pure fog
#

indeed. i always appreciate it when someone will go back and edit/update their post to include new information

calm epoch
#

the thing im starting to wounder about but i do not really wan't to bother with untill after my current project is if it's good or bad practice to have a heap of document.py with functions or try to limit it down to a bare minimum... atm i have my functions spread allover the place in a complete hackjob to make it easy for me to find and not get overwhelmed but i have a feeling that is not how it is "usually" done 🙂

pure fog
#

btw this channel is supposed to be about teaching moreso than individual learning. maybe you could ask that in a help channel or even #software-architecture

calm epoch
#

yeah got of topic a bit

pure fog
#

but it's not clear what document.py is, so you might want to be a little more descriptive or give an example

calm epoch
#

just meant is as like docu1, docu2 docu3 etc...
it's not really important to the topic of the chan tho, just a random thought

green warren
#

I personally can't stand YouTube for learning, but it's probably workable if you mix it with doing exercises in a code editor alongside the videos, a bit like a classroom experience.

kind zenith
#

What should I use for JS compiler?

#

because I wanna start learning JavaScript but I have no idea which compiler to use

misty dirge
#

@kind zenith your question is off-topic for this channel. Kindly use one of the three off-topic channels.

kind zenith
misty dirge
toxic rover
#

Youtube is fantastic for demonstrations. Specifically demonstrations of things that you are mechanically unfamiliar with. This actually works to funnel people into a kind of programming content trap. Start with a video demonstrating how to download and install python and pycharm. Then watch one showing off the basic workflow. So far as good. Then watch the rest of the playlist where all of the language features are not so much taught as demonstrated. It's not useless but it's close. Now I'm wondering if there's an even less effective way to learn programming.

neon pasture
#

I have found youtube tutorials to be useful when I couldnt find what I was doing wrong in a text tutorial, since a video will generally not skip over steps and/mention them in passing, so you can watch at 0.25 speed and figure out what they actually did to make the thing do what it did.

misty dirge
#

This channel is not for resource suggestions. Try #networks

hearty wyvern
#

I feel lost and I need some advice.

I’ve been learning Python for a while now and I feel like I should jump into learning frameworks but something at the back of my mind keeps telling me that I still don’t know enough of Python to start learning frameworks. Even with that I decided to make the push and start learning flask but I still get these conflicting thoughts of going back to learn more about Python.

What should I do?

hearty wyvern
#

I don’t like following tutorials because I feel like when I’m following a tutorial I’m not really learning rather just regurgitating what I’m seeing in the tutorial so whenever I start following a tutorial I always find myself not being able to stick with it.

misty dirge
#

@hearty wyvern this channel isn't for learning advice. Try asking in a help channel.

tawdry minnow
#

hello

solemn valley
#

anyone help me for this
Image

stone juniper
subtle owl
#

This looks like a test and has nothing to do with the purpose of this channel: methods and practices of teaching

signal galleon
sage jasper
#

who has that kind of opportunity to sit and watch programmers work for any meaningful length of time? do you mean in the context of two coworkers?

native hearth
#

Programming streams can be great, but only if the person streaming engages the chat and thinks out loud, otherwise just watching code happen with no context or explanation is unhelpful and boring

toxic rover
# signal galleon How about just watching someone program and work ?

Could someone get a lot out of it? Sure. But what is the instructive content of the video and what is the viewer capable of learning from it? If the video models real world problem solving but the viewer doesn't have the maturity to understand what's being done and why and then think about it, that's a waste of time. Are such viewers good at identifying that waste of time? I suspect not.

urban lily
#

Hey i was seeking an advice from experienced programmers about my way of learning. I have just started to learn programming for around a month now but I keep getting bored on the same language and I keep switching to different languages and again return to the same language so I was thinking should I try to focus on a single language or should I keep switching and learn the new language according to my mood?

misty dirge
# urban lily Hey i was seeking an advice from experienced programmers about my way of learnin...

What is your goal? If you think that learning different languages is fun, you can absolutely do that. And it might be a more enriching experience for you if you learn about language theory, so that you can appreciate the different advantages and disadvantages of each. But if there's a particular kind of programming that you want to become good at (web dev, or infrastructure, or what have you), then learning languages as an end unto itself won't help with that.

toxic rover
finite tundra
urban lily
#

Thank you for your suggestions! I also wanted to know should I take notes when I learn to code and should take notes on a physical pen and paper or virtually?

misty dirge
plush laurel
#

yeah for programming it can still be handy to take 'practical notes' so like keep all your regex programs together for example (+add comments), so that if you forgot about how to use regex you can easily find them and practice again

marsh orbit
# urban lily Thank you for your suggestions! I also wanted to know should I take notes when I...

One thing I’ve started doing is to have a git repo named “learning_python” for example, and make a branch for “classes” where I start from 0 learning classes. With commits along the way as I learn, or documenting where I’m struggling. Another branch for exception handling. Another for whatever.

I don’t ever merge these branches into main. They exist as a place to refer to in the future or to add to as I learn more.

The main gets built up over time with a few things that I think I’ve mastered and are helpful to future branches. I’m really enjoying it.

#

Also, I make liberal use of jupyter files in those branches. Great way to document my learning

drowsy juniper
#

Hi guys, I know this isnt related to Python but I was wondering if there was a similar discord server but for R? I found one but doesnt seem to be very active

pure fog
plush laurel
spiral marten
#

Hi guys How to use "wait" command in py

obtuse fiber
spiral marten
#

Ok thanks

weak mortar
#

if someone is teaching me, I know that is a fast way to learn

#

since I saw it here that youtube videos aren't a good source for learning

ripe folio
#

I disagree with people who say that YouTube videos are bad. Definitely will always recommend written documentation and similar, but I don't like how people have went out to say they are outright bad.

I'd compare a YouTube video to a lecture on a class room - it works the same way. People are used to that structure and there is no doubt in my mind that people gravitate towards it.

#

The most common downside to YouTube videos is that they get outdated, which is fair. At the same time though, I don't think it is hard to find an old guide. Sure guides are easier to edit and maintain, but most don't. The same type of people that keep their guides updated are presumably the same ones who leave comments or edit their videos.

#

I guess the last thing is that people have it easier to tune out of YouTube videos. This is a fair point as well, however, that is at fault of the user. You can't blame YouTube videos for that. Creating this culture around YouTube videos get people who'd otherwise be able to focus and correctly utilize them (efficiently learn), to now move on to a format that works worse for them

toxic rover
# ripe folio I disagree with people who say that YouTube videos are bad. Definitely will alwa...

Let's be concrete about this. When I say that Youtube videos are bad, I'm talking about this in particular: https://www.youtube.com/watch?v=rfscVS0vtbw . Number one result on Youtube, 36M views, 4.5 hours long, positive comments. He starts by saying this will teach you everything you need to know to get started programming in python. This only takes him 10 minutes. Nice. What follows that is 250 minutes of separate tutorials that someone glued together (this is part of the Youtube algorithm game). It starts by describing code execution as a sequence of instructions, two hours later covers for loops, and two hours after that covers class inheritance. Judged as a whole, it's laughable. Zero to inheritance in four hours? Who is this for? There's a section on try/except where he covers the syntax but he never talks about the concept of an exception, what to do with a traceback, or anything like that. It's all so superficial. So if you judge the sections individually, it's not great either. I'm not going to watch the whole thing. I'm sure there are nice parts and that someone is getting something out of it but I've seen enough to think this video is bad and even harmful.

Is this the kind of lecture-style video you had in mind? Do you think I'm being too hard on it? Is there something comparable but much better? If so, critique it. Why is it better? Is there anything seriously wrong with it?

noble aurora
#

I totally agree that this kind of video (super broad, super long, no depth) is really bad. you simply can't get any understanding from 5 minutes of a certain topic, and it doesn't emphasize practicing. that said, there do exist good videos.

toxic rover
noble aurora
#

the best example of videos i can think of is MIT OCW, though these aren't really videos, rather recorded lectures and associated psets. these are really good resources

toxic rover
#

I agree. Recorded lectures can be a gold mine.

vale current
#

what about stuff like fireship, I find their content pretty informative

toxic rover
#

Fireship looks slick. A lot of the videos are front end related. Not my area of expertise but there may be something to be said for the value of videos when talking about graphical things and how they change over time.

ripe folio
# toxic rover Let's be concrete about this. When I say that Youtube videos are bad, I'm talkin...

Did we watch the same video? This is such a great video in my opinion, simple examples and great explanation. It really does go through each topic of Python from installing until inheritance.

If I remember correctly, long videos are the opposite of the YouTube algorithm game. They could publish each video separately in a playlist and get x * n views instead of x views which I am sure might get recommended more because the channel would get more views. I think what happened here was that freecodecamp.org compiled together a course of theirs. I mean the course appears to be tailored to complete beginners who need to get introduced to Python, that's who it is for. You can definitely follow this and feel familiarity to Python and be able to write some code - at the very least enough for a beginner to feel accomplished.

They do talk about exceptions in that chapter, they mention that errors arise when things go wrong and that try/except allow you to run code when that happens. Is that not enough to explain the point of the statement? You don't need to learn about __cause__ or all other attributes of an exception, nor do you need to learn to work with traceback objects. Unfortunately they did not go through how to debug in Python (or at least not give it its own chapter), but that doesn't mean their try/except chapter is bad. They even go through narrowing down exceptions (don't use bare except:) and even fit in as err to print the exception message. A wholy 30 minutes was dedicated to classes and inheritance too, more time was dedicated were it was necessary.

Sure this might be what I had in-mind and I think this is a good example / video. I am confident there are people who benefit from this and I have no issue with this video. This video does a better job than the entirety of Python's own documentation as far as I know. Calling this "laughable" or "harmful" is an insult.

#

The only thing wrong with this is how people are able to put it on while they're playing a game and have it on in the background without actively "participating", and then vastly overestimate how good they are at Python.

ripe folio
noble aurora
#

it's not the lecture itself, rather the associated problem sets

ripe folio
#

I am not sure I follow, are you saying this YouTube video has bad examples?

toxic rover
# ripe folio Did we watch the same video? This is such a great video in my opinion, simple ex...

It's clear that we have wildly different standards and expectations. That's okay (and interesting!). I'm not going to trying to bridge that divide. On the subject of exceptions in particular, you could have a 5-10 minute discussion on what exceptions and tracebacks are, the basic idea of how and why they're used. I don't mean one threadbare example and I definitely don't mean implementation details. I answered my own question about a better video and searched the captions of another video that does what this video doesn't: https://www.youtube.com/watch?v=_uQrJ0TkZlc#t=23m44s . It's not perfect but it's the kind of slow attention to detail that seems completely absent from the Mike/FCC video. And it's actually a shorter video, not including some projects at the end. I still wouldn't recommend it.

And yes I insulted the video. I don't doubt that the people behind the video are well intentioned but I stand by those insults. I have a low opinion of the video.

toxic rover
# ripe folio Recorded lectures do not get you to practice, so I am not sure what the differen...

Let's get concrete about this too. When I say recorded lectures can be great, I mean this: https://www.youtube.com/watch?v=Ntgt25qBRuo . This is a typical university style lecture. It's visually rough. It starts with a practice problem, believe it or not. Try it! It's a good problem and the whole class is a discussion about it. There's constant back and forth with the students and we take in multiple ideas and viewpoints. He constantly stops and invites us to reason about the problem. A Youtuber can't realistically do all of that, but our man Mike doesn't do any of it. If I was sitting in a class room or seminar or whatever, and someone tried to present technical details like Mike for 45 minutes or God forbid 4.5 hours, I would just leave. Again, different expectations.

obsidian island
#

at least the top result isn’t teaching terrible practices
unlike 90% of c++ tutorials

#

even those from ex. freeCampCode

tulip spire
#

Hey guys, hope everyone is well ,I'm studying python by the book, "Course in Python" by Novatec publisher, but I still have some difficulties & I don't feel safe, I would really like to improve my knowledge in the language, could someone recommend an online Python course pls

sage jasper
neat canopy
#

What do you think a core basics to teach?

primal cedar
#

please somebody help me with webscraping.. im tired of hours of searching, its a small thingy that i cant manage to pass, please somebody who understands this to contact me :C

forest ivy
#

So, I'm pretty familiar with the basic stuff python and other languages have in common in the beginning. But what kind of small project/documentations would help with getting out of the bare foundation of python and into more practical stuff?

ripe folio
# toxic rover It's clear that we have wildly different standards and expectations. That's okay...

I like that part of this video better too, but they aren't very comparable.

One explains try/except and handling errors, going into when they arise and good practices for doing so.

The other one goes through reading and understanding errors. I think this is something missing in the course, which I won't defend. More tutorials should explain reading errors.

I guess this ties into a more wide-reaching discussion about teaching debugging, which has been held a few times.

ripe folio
misty dirge
#

This channel is for the discussion of teaching. Please make sure all your messages are about that.

late garnet
#

im looking to learn how to start making my own games using python i dont know anything about programming so if someone is willing to help me learn please dm me.

stone juniper
late garnet
#

ok

ruby minnow
#

I'm gonna be teaching python to a group, I'm assuming of which will be mostly beginners. What topics should I start off with? I was thinking

the idea of python -> data types & variables -> functions-> oop -> ... not really sure after that

fallow terrace
#

basic control flow would be a good thing to include (if-elif-else, for, while)

noble aurora
#

what specifically is "the idea of python"

cinder vortex
#

hi :))) i'm looking to solidify my basics and continue to learn more advanced topics by continually imparting all my python knowledge to people newer than me. I've been given an opportunity by a connection to teach for an institute up until OOP concepts. how do you all suggest i stay ahead of my students and be able to answer their questions? and how do you think i should teach in a way that doesn't diminish my authority in the classroom (since i'm far younger than those i'll be teaching) but also doesn't feel self-righteous and condescending?

cinder vortex
#

i would say those are the biggest

#

but they chose to come to you

ruby minnow
ruby minnow
ruby minnow
#

I totally forgot about control flow for a sec lol

cinder vortex
ruby minnow
#

The modules part, I'm sure I could incorporate that into the projects as well

cinder vortex
ruby minnow
#

My main goal is to make my students self sufficient so, I'm gonna be making them gradually learn how to debug and read documentation

#

I feel like that's gonna be the hardest part of the whole course

cinder vortex
#

make sure to assume your students are on the same page as you, cause some people dont like to be proactive learners

#

they expect the teacher to do all the work

ruby minnow
#

Yea, I will be doing starting and ending challenges

#

Basically like, given a function with this implementation what is the behaviour when passed x

#

And I'm making each student answer, so benchmarking isn't gonna be a huge problem I guess

#

A good way to see what they know before hand as well, since tomorrow will be my first session

cinder vortex
#

lemme tell you why

ruby minnow
#

Alright

cinder vortex
#

alright so people are gonna play follow the leader and take the opinion of the strongest voice in the room and just echo it. it would be a very awkward experience and not as involving and engaging as you might expect

ruby minnow
#

Ahhh your totally right yea people would just use the same answer

noble aurora
#

it could just be individual

ruby minnow
#

Maybe have them write down on a piece of paper with their answer? Then read it outloud as a group?

#

That means they would stay anonymous as well

cinder vortex
#

well that is an option, but the way i would go about it is having a google classroom setup and having them turn in a python file

#

for every exercise

ruby minnow
#

That is doable yea

#

My plan for "challenges" was just to have a code block which would include things we are gonna learn soon

#

so people could try to see if they knew what it would do without knowing, sorta like a segway

#

Rather than having them write their own code block

cinder vortex
#

thats very well thought out

ruby minnow
#

Excersizes would still be done though, like the kind you said

cinder vortex
#

can i dm you @ruby minnow

ruby minnow
#

Sure, I turned on my DMs

cinder vortex
#

just on your screen?

misty dirge
#

@sweet torrent Sorry for the misinformation you were given, but your message is not on-topic for this channel, either. Please read the channel descriptions before using a channel for the first time. Thanks!

sage jasper
winter spear
#

So I've been tasked with helping individuals learn the code base we have at work. Specifically new hires who have little to no knowledge to python and our line of business. Does anyone have material on creating learning resources.

My initial approach to this is giving them bare bone examples that show how to use the code base and the topic of business. It's less about the cs and more about using the code base as a means to an end.

Following that I would like to give them problems to solve which would require them to produce an already known output, that I could programmatically verify if it is correct or not.

I think what I want is something like hacker rank but it specific to the work code base and our domain/line of business.

Wondering what individuals thoughts are.

misty dirge
#

What is their experience? Programming in some language other than python?

winter spear
dusty vine
#

For people that know lots of different programming languages and that are experienced with them, do you sometimes mix up words from other languages accidently even if you know it's incorrect? Just like how people who are bilingual mix words up while speaking?

noble aurora
#

no, you don't really mix up language features, but you might make errors on a larger scale. things like the idiomatic way to do things. it's the same with natural language, really

#

also, while a good question, idk if it's exactly related to the topic?

dusty vine
noble aurora
#

I don't see how it relates to teaching, so probably an off topic channel

dusty vine
#

Thanks for your response though

native hearth
#

I think it could be brought on topic, a piece of advice i've seen floating around here to beginners is to take it slow and only take on one language/tech at a time so they avoid this "mixing/confusing of terms, syntax, idioms"

But anyone who's been to uni would have seen that youre expected to learn multiple different languages at the same time

twin egret
# native hearth I think it could be brought on topic, a piece of advice i've seen floating aroun...

I don't think the two scenarios of "beginners should just focus on a single language, and learn the fundamentals" and "university students should be able to learn/use multiple languages at the same time" are really conflicting with one another. The advice on focusing on a single language/tech is so that you can, for the time being, only have to worry about one set of syntax for your programming, while you learn the fundamentals that carry over between langauges e.g. functions, loops, conditionals, recursion etc.

#

Whereas university students are expected to be able to learn/use multiple languages at once, since they're pretty much expected to already know the general concepts that you'll find in most languages, and all they have to do is get accustomed with that specific language's syntax / standard library

native hearth
#

They do not, 90% of my fellow university students (including me) didnt know the first thing about programming when we started

University assumes no knowledge and teaches you the very fundamentals

twin egret
#

Although, one thing I will add is that at the university I go to, they actually do begin by teaching first-years just a single language for the first semester across all the modules

twin egret
native hearth
#

Most first year courses start off with two or more languages, those are fundamental courses, arent they? I think its ok to teach more than 1 languages at the same time, if dumb 18yos can do it without issue so can anyone else

twin egret
#

i'm surprised to hear that, since my course literally did begin with a single language (C), and then only after that was done did they expect us to be able to pickup all the other languages for the second semester courses within like a week or two (java/php/python)

#

also, something else to consider is that you are talking about 18 year-olds here, who also chose a computing course, and so not only have they just finished mandatory education at its highest level, but they also (most of the time) have a strong interest in computing, and so are going to be very receptive and willing to learn, and also with university-level support and help available

#

not everyone here is in that same scenario, some people don't have access to such personal tutoring, and have to self-teach themselves; some people are a bit younger, and may not used to learning a single subject in such detail; and some people may not even have as strong of an interest in programming

worthy viper
#

Discuss: IDEs should be banned in entry level courses

native hearth
#

hard disagree, autocomplete is great for discovering functions/methods

fallow terrace
#

I don't think so. They provide a number of features that's really useful for programming:

  • Autocomplete: This is a great way to discover new functions and methods that are conducive to learning.
  • Debuggers: It can be really hard to understand what your code is doing when just learning. Teaching people to use a debugger is huge.
  • The Run Button: Yes, I hate it. But sometimes learning to use the terminal and what have you while also learning your first PL can be difficult.
worthy viper
#

But like, earlier today I answered a help question where the user was calling a class without the ()

#

And the user blamed their IDE for not telling them it needed ()

#

I worry that IDEs are doing too much for beginners

native hearth
#

what did the IDE do for them in that scenario

worthy viper
#

It's that they expected the IDE to do it for them

#

I.e. has it become such a crutch that if the IDE doesn't do it, then they don't know what to do?

native hearth
#

what created such expectation? what did the IDE do for them in other scenarios that they somehow expected this to happen automatically

worthy viper
#

I'm not sure. They left after I answered them

native hearth
#

i wouldnt really blame the IDE for this tbh

cinder vortex
#

i mean sure, they might be

worthy viper
cinder vortex
#

but like they save so much time

worthy viper
#

Beginner math doesn't permit calculators

cinder vortex
winter spear
# fallow terrace I don't think so. They provide a number of features that's really useful for pro...

I disagree with this completely. I know Zed Shaws book, learn python 3 the hard way, doesn't get a lot of love around here but imo learning to debug with pdb, using help and taking script entry points through sys.argv was super helpful long-term. Especially when I got a job that didn't have IDEs and virtual environments at the ready i.e. all I had was a terminal editor and python and I had to manage my python paths manually

fallow terrace
#

I absolutely agree that they shouldn't be the only thing you know how to use (although a job not giving you access to venvs or editors seems.. concerning). But I think that's a heck of a lot to learn at once, and gradually learning things is important. Dumping everything on people at once is how you get people to quit.

winter spear
#

To your point about jobs not offering tools. I will say a lot of hardened air gapped systems for defense companies are like this

#

For example DoD blocks pycharm bc it has Russian ties

#

My first job out of electrical computer engineering degree, I had to ssh into said systems and had nedit and vim

fallow terrace
#

ah. i'm not in the job industry, so not really familiar with all that.

winter spear
#

I'm not against IDEs, in fact I think they should introduced fairly fast but I also think the barebones of the language are good to learn upfront rather than later

#

I've certainly pimped out my vim enough for it be IDE like

native hearth
#

beginners dont need pdb
in my 4 years of school and 1 year of work i've only had to use pdb recently and thats due to legacy code and badly configured apps/products
let them learn with the help of an IDE, the only place they'll see all this obscure tech would be when they enter the workforce
and by then they should be adept enough to learn on the job by themselves

misty dirge
misty dirge
misty dirge
worldly dewBOT
#

:ok_hand: Added pimp-my-vim to the names list.

worthy viper
misty dirge
#

or vice versa. "I installed x library, why does pycharm say I don't have it???"

#

I've joked ||or was I not joking|| before that pycharm should require you to do a quiz about virtual environments and pip before you can use it, and it should delete itself and prevent you from installing it again for like a month if you don't pass.

worthy viper
#

I'm willing to admit that I may be biased. That's why I asked the question. Back when I was in university we learned c++ using emacs which didn't have any syntax highlighting etc back then

#

And even at present day I often prefer a nice vim terminal over a busy distracting IDE gui

misty dirge
#

the only time I was required to not use an IDE was my intro to java class, and by making us type out all the verbose nonsense by hand, I think that only made people realize what a bad language Java is even faster. so I guess I'm grateful for that.

worthy viper
#

Lol. Coming from a c++ background I remember being a bit mind blown when I learned that Java booleans were stored as more than 1 bit.

#

I was like... But why?

pine stratus
#

Well, other than the problem of tooling in general, people shape tools, and tools shape people.

misty dirge
#

and yes, if someone made a vim extension that does that, I'd be willing to call it a terminal IDE.

pine stratus
#

Unix is an IDE, always has been. It brought multiple things into one integrated environment.

misty dirge
#

what if we decide that the E stands for editor.

pine stratus
# misty dirge what if we decide that the E stands for editor.

In the 1960s-1970s, Ken Thompson co-invented the UNIX operating system along with Dennis Ritchie at Bell Labs. He also worked on the language B, the operating system Plan 9, and the language Go. He and Ritchie won the Turing Award. He now works at Google. He’ll be interviewed by Brian Kernighan of “K&R” fame.

This talk took place May 4, 2019. V...

▶ Play video
#

(Editor, assembler, "overlay" (integration))

misty dirge
#

regarding code completion for beginners: if I were to play devil's advocate, I would say they need to learn how to refer to the docs. thoughts on that?

pine stratus
#

In theory this is nice, but in practice as described before, it's buggy and annoying to setup / needs to have the docs for everything automatically (packaging system / programming language used can affect this).

#

Because this does not work out in practice one is still required to manually look up docs (probably via web browser).

worthy viper
#

In a real world scenario reading docs is often mandatory

pine stratus
#

*There is also actual "documentation", as in documents that may not even contain any code or API reference, and needs to be read through like a book.

#

An autocomplete pulling up small parts of it can only assist after having already read it (and maybe the autocomplete could link to the section with a hotkey to open it up (this is very rare for autocomplete out there)).

native hearth
#

Good luck trying to find methods with a google search

worthy viper
#

The official python docs are some of the most well organized out there

#

So idk what you're talking about

native hearth
#

you're joking right?

worthy viper
#

Uh, no

native hearth
#

imagine being a beginner trying to look up something as simple as str

#

never mind the fact that you have to find https://docs.python.org/3/ in the first place, things dont show up on the first page of google results

vale current
#

lol, yeah, w3s and g4g always manage to be first

native hearth
worthy viper
#

What's so hard about this?

vale current
#

googling "python string" doesn't yield that page

worthy viper
#

That seems to be a Google problem not a python problem

native hearth
#

This is getting offtopic, the point is that you shouldnt have beginners struggle for any reason, learning things the hard way is such a silly way of looking at things

worthy viper
#

The "problem" is that python is so popular that seo powerhouses write click bait articles that overwhelm Google's algorithms and mask the official python docs which are quite helpful.

native hearth
#

fact is, documentation is hard to get to, IDEs put it literally in the editor, why mess with it?

sleek heath
#

Can someone help me with pyqt? there #help-lemon PLS!!!!

fallow terrace
#

that is how you get shit SEO

twin egret
#

why does googling "python string split" provide a result from the 3.3 docs??? i don't even know how it ends up deciding that the 3.3 version is better than the 3/current version

noble aurora
#

for me, the docs aren't even on the first page

twin egret
#

as for other search engines, duckduckgo doesn't show the docs on the first page, rather, it has an infobox on the right-hand side.... displaying the 2.7 docs.

#

(though on a tangent, for anyone else who uses duckduckgo, searching "!py <whatever>" makes it redirect directly to the python docs search page with your search query, which i find pretty useful)

noble aurora
#

yeah, all browsers i've used have allowed settings like "prefix your search with x to search only in a certain y"

keen pond
noble aurora
#

we can sorta bring it to teaching, kinda. for a beginner googling something, they don't know w3schools is potentially bad

keen pond
#

docs.python String Split works for this example, but yes it's a problem. No real clue how to fix and google doesn't let one do search personalisation as much

pure fog
#

the Python standard library documentation is pretty difficult to navigate until you learn where to find things

#

also, a lot of important information is buried in long sections of "conversational" prose, or organized into "definition lists" but where you can't link to individual items for lack of an HTML anchor

#

the newer documentation pages are much better in both of these aspects

misty dirge
worldly dewBOT
#

:ok_hand: Added w3schools-is-potentially-bad to the names list.

misty dirge
#

the authors of w3schools clearly know a lot about seo. I just wish they knew python.

pure fog
#

also the official python "tutorial" is useless for anyone who is not already an experienced programmer in other languages. all that is to say: python documentation is thorough and mostly well written but difficult to navigate if you don't already know what you're looking for, and i definitely would agree that it is an impediment to beginners

pure fog
misty dirge
pure fog
#

also the absolute worst thing by far, incontestably, is the state of packaging and dependency management

#

it's the best it's ever been, thanks to a lot of hard work by dedicated people thinking carefully about the problems at hand, and it still kinda sucks

#

and surprise! it's also a major obstacle for beginners

toxic rover
#

Most sites with good SEO are junk. It doesn't help anyone else, but if you're not filtering your own search results with an extension, you are doing it wrong. And in w3schools' defense, I've found some of their pages to be just the right amount of extremely basic for some people.

#

Python's docs are very much all over the place. I find that people coming from languages like Java do not like them. A lot of it is written like a tutorial and if you don't lean into the search engine strategy, you're going to have a bad time. Even then though, there are some weird choices, e.g. if you want a list of keywords, it's buried in the language spec.

cinder vortex
#

although we have that here when we type !resources

#

but i want to contribute something to the community

#

i'm thinking of starting a coding twitch channel with an emphasis on the learning process vs. teaching someone the commands/technical details

#

because watching someone go through trial and error can be really helpful in your own jouney

#

i'm not sure though, it might be a little out of budget for me

twin egret
#

streaming yourself creating some sort of project can be a good way of teaching your viewers, bringing them along for the ride as you learn yourself, as long as you try to keep your thought process out loud, so that your audience can follow along with how you're dealing with problems or bugs that arise

pure fog
misty dirge
autumn cedar
#

We're in second year of engineering, and I feel like some people might find the method used by our teacher at least interesting:
To keep the class engaging, he built a candy-crush like game. But to avoid having the student build the entire app over a 12h class an not have anything working before then, he created a C library that implements all the functions required first.
For instance, the file would contain a function such as

def match3(grid, pos):
    return teacherLibrary.match3(grid pos)```meaning the code works right away. At some point in the 6 booklets we have for each session, it will explain to you the logic needed inside that function, and task you with replacing the call with your own code. 
What do you think about this? I find it quite interesting, although while it has some instant feedback benefits (good for ADHD students lol), you loose any sense of progress over the 12h. If I were to design the course, I'd probably mix it up with rewrite and original code.
weak mortar
late bison
autumn cedar
#

I don't believe so

main axle
#

i am taking the python 4 everybody on coursera. Is it just me or the assignments cover something beyond the course? i feel that I am not adequate for them. How can I go on learning the language beyond watching videos from it and memorizing the codes from the solutions?

noble aurora
autumn cedar
#

Hm'yeah, I think that would make most sense

noble aurora
#

in some hackathons I helped run in the past for beginner programmers (primarily a fun, learning thing), we gave a very narrow theme, like "make tic tac toe", and gave starter code. in this code, pretty much everything worked like I described, but it was very "cookie cutter". the competitors had to add their own features.

based on feedback we got (aka, response bias, lol) this worked pretty well for the reasons you mentioned, just skip the boilerplate and get right into the logic

near shale
#

I'm wondering if anyone has suggestions on good github open source projects that I can read through and try to understand

#

ideally ones that have lots of programming 'good practices' and not something ML/cryptography, because that's basically learning the math and theory in that field and then implementing it by importing a lot of libraries

#

Has anyone has success with learning this way?

kindred scaffold
#

Hey there! Whats a good free resource to learn python for data science / ML ? Something similar to TOP but for python?

slender wraith
misty dirge
#

@kindred scaffold @slender wraith this channel is not for resource suggestions. Also w3schools gets a -1 from me.

slender wraith
fluid bluff
#

guys i am confused, for programmer is important know fundamentals of computation, like math and others, or just know the things works in the language?

#

is relevant study everything that is there in grid of science of computer?

misty dirge
# fluid bluff guys i am confused, for programmer is important know fundamentals of computation...

A lot of theoretical computer science isn't relevant to the day-to-day work of a developer. I'd say the most important pure CS course is the algorithms and data structures class, because it gives one the theoretical framework to understand how efficient (or inefficient) their program is, understand what optimizations might be available, and understand what kinds of optimizations will actually have a noticable impact.

That isn't to say that getting a CS degree isn't important. I think it's a bit of a historical accident that CS came to be "the developer degree", but it's still the credential that goes furthest towards making someone employment ready.

fluid bluff
pine stratus
fluid bluff
noble aurora
pine stratus
#

There are common parts though. Such as A&DS, architecture, programming style, working in teams, etc.

#

Algorithms and Data Structures can be seen as a branch of mathematics.

#

But I think when most people ask if they need math, they mean other branches.

#

(Probably algebra and calculus)

noble aurora
#

at least in the us, i think most of the time when people ask "do i need math for x", they're asking if they need calc, since it's the highest level of math they've heard of. mostly this is from high schoolers, i think

pine stratus
#

(Colleges keep CS as "not math" so it does not also count towards a math degree...)

fluid bluff
#

but in the field of AI, it is relevant to learn some areas of mathematics, such as algebra, probability, statistics, right?

fluid bluff
#

in relation learn about circuits logic, compiladores, port logical is relevant understand the concepts for programmer?

pine stratus
#

Depends on what the programmer is programming.

#

It's kind of like asking if a chemist working in Germany needs to know math or just learns German. Learning German is the starting point.

#

(e.g. learning Python lets one do anything at all)

fluid bluff
#

because i was study for grid of CS

pine stratus
fluid bluff
#

so i was studying fundamentals of math for computation that talk about logical of predicatives.... and others things

pine stratus
#

"I'd say the most important pure CS course is the algorithms and data structures class" - Stelercus.

#

If you get past algorithms and data structures, I think you will have a much better idea of what to do next.

#

The other most important thing is probably just practical practice of making some apps. Simple ones, like a todo list, clock, etc.

#

So that you are comfortable enough to create anything you want without having to consciously think about the code too much (like having to count on fingers versus just doing it in your head really fast).

fluid bluff
#

understood, so i guess that i will study about algorithms and data structures, and backend

#

and more for front understand the conceps of theoretical computer science

pine stratus
#

I would not think so much about backend vs frontend, but the app as a whole.

#

I would not start with web apps either, they have a lot of complexity that is due to historical accident. Just some simple apps in say, Python.

fluid bluff
#

understand the concepts the build of one software, the requisites , everyall that is necessary like architect of software..?

pine stratus
#

If you just try to make some apps with Python (TUI, GUI). And read other people's code, you will naturally encounter various styles / architectures, which you can copy in your own projects.

#

Explaining how apps / architectures are made to someone when they have not tried to make an app before is like trying to explain how to drive a car in theory without having ever tried it. The detailed steps of how to do so can work out, but it's much easier to just watch someone else do it and feel it out yourself.

#

(The detailed steps help a lot after having tried because they contain some pretty well thought out / precise knowledge (especially for avoiding issues that are not immediately obvious))

#

(And avoiding non-obvious mistakes is what these design theory classes are all about)

fluid bluff
#

copythat, thanks so much my friend.

pine stratus
#

TLDR: Just do it ™️ . Make things, read code, read docs.

fluid bluff
#

ok, thanks

pine stratus
jolly night
fluid bluff
#

people to make algorithms, and develop the python language, as challenges, do you have any sites you recommend to train?

misty dirge
#

People in #data-science-and-ml often ask what libraries they need to learn to understand AI. But because of the way the AI ecosystem is arranged, that strategy won't actually teach you anything if you don't already understand what you're trying to do. Is there a domain where people can succeed from "learning libraries"?

noble aurora
#

web dev

pine stratus
# misty dirge People in <#366673247892275221> often ask what libraries they need to learn to u...

GUI programming (frontend web development too)? No math, just design and knowing the ways the widgets/components work, and can be interactively / visually debugged making it much easier than other things. Although, the quality can be questionable without understanding more (e.g. many slow/buggy websites made with big complex framework X without knowing how that framework really works). It's also popular enough to the point where everything about those libraries has an answer online.

winter spear
misty dirge
#

@orchid fox please don't drop random links without saying why they're interesting. it's a discussion channel. if you want to have a discussion about a video, say what you think is interesting about it, so that there's some basis for a discussion. and if it's self-promotion, don't post it.

orchid fox
misty dirge
orchid fox
#

Nah I want to share my views

misty dirge
cerulean tide
#

Is there a word where the program does stuff internally automatically

#

Ex: if i use print() the program automatically makes new line, but i could change that

stone juniper
cerulean tide
stone juniper
#

yes

polar lotus
#

is this where ppl help me w my code

upper flint
polar lotus
#

tysm!

jaunty compass
#

can anybody help

silent goblet
#

A question about teaching programming in "layers".

When teaching Python, you often run into things that are like: "oh don't worry about it yet". In particular, error messages are very confusing for beginners because while they are technically correct, they don't speak about the limited set of concepts the student was taught.

I have quickly gone through "How To Design Programs" and I liked DrRacket's approach of having different languages for different stages of learning. I wonder, are there any attempts to apply this to other languages?

#

Or well, is there any research I could read/watch about layered tutorials?

#

I think it's kinda of a no-brainer thing, videogames have been doing that for ages. You only have a limited set of abilities in the beginning, and then you get more and more stuff. And teaching programming in a "real" programming language seems like OpenTTD which is like... here's all the stuff, have fun!

silent goblet
wise ore
#

I have a theory that the "don't worry about it yet" theme is so commonplace in programming because of public static void main

misty dirge
#

I can't think of a programming language that bombards beginners with language features that they aren't prepared to understand as immediately as Java.

silent goblet
#

C++? 🙂

fallow terrace
#

i think it's better demonstrated in certain languages, but is present in pretty much any (usable) language

#

because programming has a lot to it, and dumping that on a person all at once is Not Fun

#

like you showed above, Python has it's own stuff

#

types in general are another good example

silent goblet
#

well, the example I gave was DrRacket, which has different "stages" where different sets of features are available

#

basically, my question is:
how do you get rid of accidental complexity when teaching programming?

oak breach
#

is "don't worry about it yet" really all that bad

#

its not just programming that has that, its in every stem subject

#

probably non stems too

silent goblet
#

well imagine if you poke number 3 you get integrals that burn down your house

fallow terrace
#

i like "don't worry about it" as long as you follow up with "but if you're curious, take a look at x, y, and z." it gives room for exploration, while not overwhelming the learner immediately.

twin egret
#

it's pretty difficult to teach programming without a bit of "don't worry about it for now", especially since in most languages, some things which are seemingly simple at face value are really doing something a little bit more complex underneath (e.g. newcomers being taught for i in range(n) without really being told about how range(n) is actually being used as an iterable object or anything)

pine stratus
# silent goblet A question about teaching programming in "layers". When teaching Python, you of...

I think of a lot of this is due to historical reasons that result in a lot of rituals programmers have to go through to get anything done (Python has much less of this which is why it's much easier to get into and get anything done). And another reason is many (most) compilers/linkers/interpreters/etc have bad error messages (at least print a snippet of where the error happened in the code (includes the surrounding code to make it easier to visually find) and underline the line with a plain English message for the most common errors) (Python still has terrible error messages). Videogames have several properties that make them similar to interactive programming (REPLs are like a really weak version of them) and we should have way better interactive programming tools (Jupyter Notebook is not good IMO). For more on that: https://www.youtube.com/watch?v=8Ab3ArE8W3s

Most new programming languages are accidentally designed to be backwards compatible with punchcards. This talk argues that it would be better to focus on building new live programming environments that can help us solve the problems of the future.

Jack Rusher
Applied Science Studio
@jackrusher

Jack Rusher's long career as a computer scientist ...

▶ Play video
pine stratus
# silent goblet C++? 🙂

C++ not only bombards beginners, but non-beginners too. It never ends, which is why everyone picks some subset of the language and works in only that, maybe adding a few new features every couple of years.

pine stratus
vale current
#

I remember hearing about something (maybe it was someone in this server who mentioned it?) about a language which lets you spawn a repl at the point your program crashed

pine stratus
toxic rover
#

A lot of people don't use python interactively and that is insane to me.

neon pasture
jaunty compass
#

you guys wanna see my work in progress towards making a high/low card game?

subtle owl
spring pendant
#

for light programming (I only use python and html) do you recommend atom or vs code?

stone juniper
#

atom was dropped, so vsc

noble aurora
#

to make it somewhat on topic, what editors do you think would be the best for a beginner? the two IDEs i see recommended to beginners are Mu and thonny, or occasionally vscode.

i recently started teaching two people python; we started with idle then switched to mu, which has been ok. one issue we seem to keep running into is having two copies of a file. one they are running in the terminal, and one they are editing in Mu / idle. in this sense, the IDE has been pretty annoying. i wonder if we'd have this issue with a different terminal editor like nano or something.

(this is kinda turning into a long ramble, oops)
on a related note, what's the right amount of intellisense for a beginner?

vale current
#

sort of the opposite of that, one editor I'd probably recommend against to someone new to programming is PyCharm. There's a lot of people who come in for help with their installed libraries not working due to pycharm's auto-venv functionality.

as for right amount of intellisense - I think in general the kind of autocomplete you get with VSCode or PyCharm is alright. In my experience, it didn't really hinder anything.

noble aurora
#

in my case specifically, the auto venv issue wouldn't be a problem. that's only an issue for someone that doesn't know what a venv is or is unaware of that option

vale current
#

right, yeah, but someone new to programming most likely isn't familiar with what a venv is

noble aurora
#

it's probably not a good recommendation for someone looking to learn by themselves, but in a more structured class setting I think it's fine. my issue is that it was just too heavy for my students' laptops

vale current
#

fair enough