• Welcome to Autism Forums, a friendly forum to discuss Aspergers Syndrome, Autism, High Functioning Autism and related conditions.

    Your voice is missing! You will need to register to get access to the following site features:
    • Reply to discussions and create your own threads.
    • Our modern chat room. No add-ons or extensions required, just login and start chatting!
    • Private Member only forums for more serious discussions that you may wish to not have guests or search engines access to.
    • Your very own blog. Write about anything you like on your own individual blog.

    We hope to see you as a part of our community soon! Please also check us out @ https://www.twitter.com/aspiescentral

Help with Python

Objects in Python are an impovisation... I can't recall now, the way they're implemented has terrible loopholes. A prankster could easily exploit it, for example, you can manually change fields of any object you have access to and Python won't disallow it. The way Python works is also very incoherent sometimes... I used it for a long time. It's good for quick scripting, but it has many drawbacks. I would also advise against learning it as the first programming language, as it has dynamic typing and you completely skip memory management, which doesn't teach crucial programming skills. Java or C# would be better in my opinion. C and C++ can be a tad difficult, but they're a must-know.
Not too sure what you mean. Frankly I haven't touched it for at least 20 years (prob 30) and I diodn't do much, just used it for a job that required it, so can't remember much more about it. But it's very popular in certain communities, including science and maths etc. I presume for a good reason, but I don't know, and can't be R'sed to look right now.

But the prankster thing applies to any source code you download, unless you go through it with a fine toothcomb. When you say manually change a field, what do you mean by that? Change it's name, type, I presume you don't mean value? Not sure I understand you.
Personally, for someone just starting on coding, I think the more fiddly stuff like manual memory management can make life rather hard. the bugs that it can produce can be pretty tough to find sometimes, and depending on the language, pretty destructive in terms of the session. Some people prefer to jump in the deep end, which is great, but others prefer to learn concepts first with easier implementation to start with, so you can focus on the aspects of the language itself that are of interest (obvious this depends on who and what they want).
Likewise, dynamic typing has advantages and disadvantages. And suits some more than others. Maybe depend on where they want to move on to, quite a few other languages are like that (don't like 'em myself, but that's personal choice, factors in favour of both sides).
In the end, there are so many reasons to choose a particular language, and without a pretty complete and tight set of requirements, whose to say what's best or not? How well Python implements object orientation? Couldn't say, but seems to have some value to quite a few people whatever the reason and is hardly immature by now, I'd have thought.
 
I presume you don't mean value?
Value, yes. It's a dictionary. object['__key']=value
Type too. Python is dynamically typed.

But the prankster thing applies to any source code you download,
That's why I said prankster, not hacker. I meant, if someone wanted to annoy other programmers in their own project and cause hard to explain and fix errors. Of course, it can be made by accident and with bad programming practice as well.

I'll come back later with an explanation how objects in Python aren't the best, it's late at night now

including science and maths etc. I presume for a good reason, but I don't know, and can't be R'sed to look right now.
Scientists write scripts and make use of rich graphing and data analysis libraries in Python.

Dynamic typing likes to cause hard to track down errors and performance is worse. Even simple programs can run significantly slower with Python. But it all depends what you want to code, it has its uses, definitely.
 
Value, yes. It's a dictionary. object['__key']=value
Type too. Python is dynamically typed.
I don't get you at all! The value is meant to be changeable, unless its a const or similarly fixed?
And the typing, isn't that just a feature of non-typed variables? I don't understand how this makes Python unsuitable, unless you speaking in a task specific way? I understand if you want or need a language which is strongly typed, but as a general criticism against using a language, I can't see your argument, unless some context requires it.
That's why I said prankster, not hacker. I meant, if someone wanted to annoy other programmers in their own project and cause hard to explain and fix errors. Of course, it can be made by accident and with bad programming practice as well.
I see little difference, but I think you're really saying "caveat emptor" when sharing source code, in a generalised fashion?
I'll come back later with an explanation how objects in Python aren't the best, it's late at night now
I'd be interested from a curiosity p.o.v. but only if you've got the energy, not a big deal.
Scientists write scripts and make use of rich graphing and data analysis libraries in Python.

Dynamic typing likes to cause hard to track down errors and performance is worse. Even simple programs can run significantly slower with Python. But it all depends what you want to code, it has its uses, definitely.
As I said, I can't argue for Python, I'd have to go gen up on it (and much has prob changed too), but I know science, having worked in uni chem dept, and a pharma research site for 20 years, so I know a bit about how important reliable and correct answers are to this field. You don't put your whole career and rep on the line for a bit of stats software (or whatever) unless it's damn reliable and very quality controlled etc. and already proven as a scientific tool. It may have weaknesses, but everything is a compromise in one way or another.

Sadly, I can't make the technical argument, and haven't the time or motivation to learn enough to do so.
You totally spot on about typing, and I can see it's something seems close to your heart, I've mentioned I agree, and prefer strong typing in most cases, but that doesn't mean there is no case for non and weak typed languages. Horses for courses. I've lost count of how many different languages and scripting tools I've had to pick up for just one task, because it has some feature that makes it suitable, if not even preferable. But it's always based on what it's needed for, where (the type of environment) it's going to run in, etc etc.
 
It would be interesting to continue this, but the thread is for someone learning coding basics.

Perhaps start another thread?
I'd be quite interested to learn more about Python. Anything that's so widely used is worth a look.

IMO, OP's questions show he's not ready to learn how languages are implemented, or how language runtimes work.

I think it's much better to learn how to specify basic logic in higher-level languages that are designed to make coding easy, and are reasonably well implemented
That means e.g. no explicit memory management, dynamic typing, and simple structures (e.g. Tables rather than objects).

IMO teaching more complex ideas and tools is comparable to starting a new language by studying grammar.
It works, but it's a lot slower and a lot more work. And has no real upside in the long term.
 
It would be interesting to continue this, but the thread is for someone learning coding basics.

Perhaps start another thread?
I'd be quite interested to learn more about Python. Anything that's so widely used is worth a look.

IMO, OP's questions show he's not ready to learn how languages are implemented, or how language runtimes work.

I think it's much better to learn how to specify basic logic in higher-level languages that are designed to make coding easy, and are reasonably well implemented
That means e.g. no explicit memory management, dynamic typing, and simple structures (e.g. Tables rather than objects).

IMO teaching more complex ideas and tools is comparable to starting a new language by studying grammar.
It works, but it's a lot slower and a lot more work. And has no real upside in the long term.
Quite agree, kinda what I was trying to say, but probably not very eloquently! :smirk:
 
Stupid Object Oriented Programming I hate you with all my guts...

Been reading and re-reading AND re-re-re-reading and I can't wrap my brain around ANYTHING

Heavens to Betsy!
 
I probably told you earlier that everything to do with coding is extremely poorly described and documented, especially for beginners.

Link the docs you're reading to learn OO. I won't promise to do anything with them, but if they're not too awful I'll try to help.

Lesson One: "Object Oriented" is a ridiculous name, and everything that tries to describe what objects are is probably misleading at best, and outright wrong at worst.
Note that this is neither exaggeration nor a joke. The vast majority of OO docs really are that bad.

On the plus side, it's simple enough for someone who's already learned how to code simple logic.
If not, go back and learn. You can't move forward without a good foundation.
 
I sadly can't link the docs because I am using an app called PythonX

I just have read it and have done some examples, even fixed an example that wouldn't run myself so kudos for me

But it's just I work with functionality in a sense? Like I need to make sense what exactly does what for me to understand it and with this is just a bunch of code and I can't see the link with what does what?

I'll get there and come back here if i need help, for now I just wanted to rant and let the negative emotions out LOL
 
Repetition definitely works in the beginning with OOP. You really have to trust the process if you still haven't built large projects yet (and rightfully so, because trying anything too daunting in the beginning is a surefire way to ragequit anyway). It will eventually sink in and it'll just become second nature soon enough.

Sometimes building really small projects with the concepts you've learned can solidify the concepts better, though. Rather than just answering questions on a test or app, bringing it out into a more personal context can really make the difference -- just, again, you'll want to keep those first few projects really small
 
__init__ is hard

init?

see what I did there :D

Oh common it was funny....

Anyways...

Yea I can't seem to wrap my head around this concept of __init__ like... it's just basically a function right?

Just a function with parameters that you can manipulate with objects?

Maybe I'm just complicating myself... oh Ro you... ugh
 
Not a great movie, but it has a scene I was considering referencing.

As I explained last time, OO languages are not beginner friendly in ways that cannot be explained in a beginner-friendly way. "Multi-paradigm" languages like python typically make such issues worse.

I realize (and accept) it's too late for you to consider this advice, but you should be working on your skills in coding and basic data structures.

One of the other guys might be prepared to take you through OO basics. OO is ok when you know enough - the problem for beginners is the "startup threshold".

Read the first 3 paragraphs here:
and ask yourself why there are so many different paradigms, and whether you would ever use them in the same module.
 

New Threads

Top Bottom