Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Python programmers?

#1
Never touched Python a day in my life before this semester. Been learning it for classes, and I think I already like it a lot better than most other languages I've tried. It is worlds easier than C/C++, a lot easier and cleaner than Java (disclaimer: coming from a novice Java programmer, but I did find Python a lot easier to learn), and, well, worlds cleaner (albeit a tad bit harder) than PHP. 

And PHP has its limitations and its strengths. It is so different from every other programming language that it's not even funny. Well, it looks like C almost. But the nice thing about PHP is it really doesn't complain about very much when it comes to your code. It makes it easy to jump into, and unfortunately, makes it easy for people to make simple mistakes when they are writing their code (using variables that don't exist in ways that aren't intended, or having habits that might lead to poor security practices, etc.)  

Python takes the ease of PHP almost, makes the code a tad bit cleaner (less brackets, forced indentation, etc.), adds a lot of great libraries that are clean and concise, and perhaps a little easier to get a handle on than Java, and, well, Python complains a tad bit more than PHP I've noticed. Not sure if that's a good thing or a bad thing. But in Python, you can't just use a variable out of nowhere or index into an array where there is no index declared. Unlike PHP, you'll get an error, not just a warning. And if you try to cast something to an int when it can't be casted, you'll get an error and kill your program. In other words, you'll probably land more errors, but if your program works, you're less likely to have bugs of functionality and it's more likely to work as expected.  

Overall, I almost want to to do my web development in Python now. Tongue

That being said, still a relatively new Python coder and I have a ways to go before I've mastered it. Anyone else here have any experience with it? Big Grin

Because I'm fairly certain I'm tackling Java next. Tongue

Reply
#2
I'd like to learn it at some point, but have only touched PHP and C++. I know what you mean about PHP not complaining much, in fact I think a more stringent language is better in a lot of ways.
[Image: wxBanner?bannertype=wu_clean2day_cond&ai...anguage=EN]
Reply
#3
I really like python because I use it fairly heavily when customizing and tinkering with the Graphical interface in linux, it's what allowed me to have that cool looking tron based touch UI I posted a while back, I've also used it in conjunction with PHP to actually make working smart home circuits and stuff with raspi control cores.

so as far as a language that's easy to learn with a ton of info out there, it's great, but it's still a high level language, basic and Assembly are still kinda required if you want to move past it's limitations.
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
[Image: 5.jpg]
Reply
#4
Haha, basic? Don't think that's a low level language my dude. Python's probably got it beat.  Finna

But yeah I agree. Python is ridiculously easy for user interfaces, which I like. It's the only language where I really have managed to succeed. Tried in Java, and Java was noticeably much more challenging.

Reply
#5
you'd be surprised, there's no python compiler for stuff like the SNES and the genesis but there's basic compiler's of all things for both, still sorry for my mistake there.

but yeah python assembly and basic, maybe C++ with some java thrown in is probably all you'd need to really make use of hardware and games and stuff.
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
[Image: 5.jpg]
Reply
#6
Updating this after a few years of experience. My verdict? Python is a far better language, but PHP isn't going anywhere.

They are designed for two different things. With web development, pretty much anyone could have a need for a website, and it pays to have at least some experience with the code involved. PHP kind-of has to be beginner-friendly for that reason, and hence it doesn't force you to initialize variables, has multiple ways of doing things first, etc.

Python is also very easy and is a go-to language for doing things quickly, but it's not built for the web. And as a result, has the freedom to do things a little differently than PHP. It can be a little more "proper" without having to worry about whether it's fully "web friendly" for a shared hosting environment such as GoDaddy or Hostgator.

Additionally, PHP has evolved. It likely became as successful as it is now, largely because it was at the right place at the right time. They have had no choice but to expand the language WITHOUT introducing major breaking changes. Some of the language's overall inconsistency stemmed from this. Python is much easier to introduce a new version for, and call it a day. They released Python 3 10 years ago, and Python 2 is still being used today. Virtual environments for Python are easy. (and for PHP, not so much, as you only get one version, and that's the version your host provides. Finna)

So PHP has been forced, in a sense, to be extremely beginner friendly AND to be compatible with older code standards. I believe Python is a better language in terms of programming and its practices, but only because it can be. For web development, PHP is the best language we will ever have, simply because it's so widespread and heavily supported.

Reply
#7
[Image: rd64erbk6nj41.jpg]
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
[Image: 5.jpg]
Reply
#8
What's dead, can never die... Finna

Reply
#9
(March 8th, 2020 at 6:13 AM)Darth-Apple Wrote: What's dead, can never die... Finna
If you're trying to program something non euclidean wouldn't lisp be a better choice?

"That is not dead which can eternal lie, And with strange aeons even death may die" - Lovecraft

I've only really used python to build and customize Linux interfaces so I don't know a lot about using it beyond thar.
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
[Image: 5.jpg]
Reply
#10
My new job requires some Python work... of which I know none. I need to get up to speed quick. Y'all know of any good Python resources?
Reply
#11
(November 14th, 2020 at 7:49 PM)Guardian Wrote: My new job requires some Python work... of which I know none. I need to get up to speed quick. Y'all know of any good Python resources?

Do you have any coding experience in general? I'll show you the ropes if you need. I'm tutoring a couple of people on it now and can get you up to speed quickly.

The good news is that Python is very intuitive. It's closer to "plain english" than Java or C would be, so it's one of the easiest languages to learn and it's also very, very versatile and widespread.

Interactive guides such as these might be good places to start:
https://www.freecodecamp.org/news/want-t...ve-course/
https://www.learnpython.org/

Reply
#12
Thanks for the links!

(November 14th, 2020 at 9:05 PM)Darth-Apple Wrote: Do you have any coding experience in general? I'll show you the ropes if you need. I'm tutoring a couple of people on it now and can get you up to speed quickly.

The good news is that Python is very intuitive. It's closer to "plain english" than Java or C would be, so it's one of the easiest languages to learn and it's also very, very versatile and widespread.

I've always been a "tinkerer." I've always been able to roughly figure out what its doing and tweak and fix until I get it to do what I want. I've never written code straight up. Never needed to. This will be fun. Tongue  I told them I've never coded anything and it didn't seem to phase them (or turn me away).

I ended up signing up for a course that I have access to for free for the next few weeks. So, going to try that first and by then I'll hopefully figure out exactly what they're expecting of me.
Reply
#13
Ah, nice. Sounds like a good course! It'll get easier once you get the gist of it.

Don't worry too much about memorizing syntax (even if the course pushes it). Even experienced programmers have to look up syntax almost every time they get in front of a computer screen. It's an art form, much like music or writing. There are thousands of ways of solving any particular problem, so just understanding the different moving parts and putting them together is the single most important aspect of learning to program. Getting into understanding exactly what everything does is far more important than the actual syntax itself.

I'm quite experienced with Python and have done countless projects with it, so let me know if you have any questions! I teach people Python pretty much every week and I'm good at explaining things in simpler ways than most courses do. Finna

Reply
#14
Yeah, I may end up coming here if there aren't others on site that know more (I am assuming there are considering how much they didn't care I knew about it). It's going to be an interesting experience. Granted, I had the same scenario when I got thrown onto a Cyber Hunt team for a year without knowing much about it. I pick things up quick enough I usually get by no matter where I'm thrown.
Reply
#15
I mostly use Python for raspi projects and GUI stuff on linux so I'm far from an expert on it but there's tons of resources out there.
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
[Image: 5.jpg]
Reply
#16
Python is a great language! Very easy to learn and very powerful. Not the quickest though.
Estoy en España
Reply
#17
(November 15th, 2020 at 8:35 PM)Thomas Wrote: Python is a great language! Very easy to learn and very powerful. Not the quickest though.

Yep. It is quite slow. One of the slowest languages in existence that isn't web oriented. There are ways to optimize it quite a bit. CPython is the typical way of approaching it, and it takes regular, vanilla python code and compiles to C for near-native performance. I've gotten extremely good speed-up results by using it, and it takes minimal work and can take standard Python programs as well. 

They also suggest PyPy, but it doesn't support Numpy or certain other libraries. It ends up having poor results on most programs, but on the ones that do work, it works quite well.

That being said, Python isn't always slower. It is very commonly used in the AI sector, where tensorflow offloads most of the execution. In these cases, tensorflow was compiled in C and runs at native speed. Programs that depend heavily on these sorts of libraries tend to run very fast because the majority of the code executed is compiled within the libraries. Python pushes these libraries heavily. Numpy and OpenCV, among others are also compiled to C and run a lot of code natively, and most programs actually offload quite a bit of their internal execution in this manner.

Otherwise, nobody is really doing intense algorithms raw and vanilla-style in python directly. One day they will consider optimizing it or putting a JIT in place, but until then, it's slower than a turtle on a icy winter day. Finna

Reply
#18
See the thing is I'm considering moving from python to assembly for what I use it for.

python is great for making GUI's and all but for the hardware stuff assembly can't be beat.
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
[Image: 5.jpg]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cython - Python at the Speed of C Darth-Apple 0 2,127 April 11th, 2020 at 1:07 PM
Last Post: Darth-Apple
  Recursive Sequence of Death [Python] Darth-Apple 7 10,258 April 19th, 2019 at 3:39 PM
Last Post: bestforums



Users browsing this thread: 2 Guest(s)

Dark/Light Theme Selector

Contact Us | Makestation | Return to Top | Lite (Archive) Mode | RSS Syndication 
Proudly powered by MyBB 1.8, © 2002-2024
Forum design by Makestation Team © 2013-2024