Python Forum
Where are we learning from?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where are we learning from?
#1
Two days ago I came across a website where there was a huge amount of examples of Python code. I decided not to share it here because I didn't know if it worths. I don't know who wrote the code and in general, if it is "good" code. What I am meaning as "good" I can explain with an example of what is not. And this is the reason for my thread. Here it is:
http://python-forum.io/Thread-Password-checking

It is hard for me to believe that such an example can be found in the book or wrote by a professor in the school. Many people are learning Python and many of them, just like me, are doing it alone. Without a mentor. Without a book because they are browsing the internet for a ready solution of their coding difficulties. I know the documentation is on top of the search results but who read it? It is a lot of text. Snippets are enough.

But as you can see in the link ( and I suppose that this portion of code is copied from somewhere as it is ) someone can be really nasty.
Seen this I can't imagine how many new programmers are looking that and perhaps they are implementing it in their programs.

Is it by laziness or lack of time for reading the docs or a book. Or lack of money for a book. I don't know but all of this is disturbing.

My pure English force me to use a lot of words to write my thought down. Apologize
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#2
Reminds me of the robot in the old TV show 'lost in space'... Arms flailing it would shout 'Warning, Warning, Warning'
Reply
#3
I mostly learned from this forum supplementing experimenting. :)
Reply
#4
I see this all the time. Before I got promoted into my soul-crushing supervisory position, I was technically employed as a statistician. These days, you can't do statistics without computers. And really, you can't do statistics well without programming. And yet most of the statisticians I know are horrible programmers. There just isn't a culture of programming in statistics. The only reason any programming was taught in my statistics program was that we had Frank Harrell there, who is huge in the R community. But outside of academia, SAS is the dominant language, and it's not a typical language. And people are horrible at programming it.

Part of the problem is the books. I know a dozen programming languages, like many programmers out there. It gets to the point where when you want to learn a new language you just go buy an O'Reilly book (or something similar) and work through the book over a few days. But there's basically no books like Lutz's Learning Python for SAS. It's pretty much all books of examples, with no coherent introduction to the language, much less programming. I've only found one decent books for SAS (Professional SAS Programming Secrets, by Rick Aster).
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#5
I think some people just want to accomplish a task any way possible, and some people want to learn. I have been on both sides of this. 

I think you cant even tell good code from bad code from a single book either. Some books are best not written at all. 

The only way to know good code is to write that bad code and figure out why its bad. You can tell someone all day long about using eval...and they wont know until they write something with it in it...and find a security loophole due to it for example. 

Sticking close to this forum (or any active community rather) is a good way. That is how i learned. Reading through threads of how-to, why to do, and why not to do in pure examples taught me a lot. I made a decision to try to answer people questions that i did not know...and in turn by doing that...learned a lot by research and experimenting. 
Recommended Tutorials:
Reply
#6
For a start, a lot of the code in that post looks like it was taken directly from a reply I made to another poster in another thread:
http://python-forum.io/Thread-Shorting-C...17#pid2217

But, I will say this.  I'm currently in a Master's program.  This semester I am in a course with lectures created by Sebastian Thrun--an extremely respected programmer involved with self driving cars.  I have absolutely no doubt that he is a brilliant programmer, but... the course is taught in python and his python is, well, terrible.

It is really odd.  I think to a degree because python is considered "easy" it is often used by people who honestly aren't really that familiar with it.  They pick it because it is a "Teaching language" and often do it a disservice.
Reply
#7
security is not a one-thing you just have or not have, it is a base of understanding that is a part of your thinking ... or it isn't.  you either understand what is safe in your code and what is not, or you don't. too many programmers don't.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#8
Talking about security after that video I have a lot to think about. I watched it fifteen minutes before posting this thread. There was no connection between both. In my mind.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#9
security should be part of the design, throughout. :idea:

to bad you cannot just call make_my_program_secure() :naughty:
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#10
In one of my consulting positions, I had to salvage (reverse engineer) a large assembly code project written for an Intel 8080 s-100 bus computer,
that was a controller for a pretty complex instrument. This back in the early 1980's.

I'll tell you, though very painful, you sure do learn the language inside and out. I remember discovering a problem with the carry bit on a subtract
with borrow command that wasn't even in the errata document.

I'm not recommending this as a way to learn, unless you're some sort of masochist.

Personally i like a dual approach of reading a book while constructing something that has at least an outside chance of being useful, and as far as the book
is concerned, I like one that has good examples of each subject.

I love to read, and want to be learning something new on the day that I die.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020