Is it worth learning Python3 if I want to get a job as a programmer?
I've been self-teaching myself Python3 and honestly I've been having a lot of fun. Programming is something I've only done a few times. I took an introduction to programming course in college, then after a year I got back into it for a few weeks but abandoned it. Now (again) I started it up again and I feel very dedicated and motivated to spend a lot of my free time on it and keep going. I noticed it improved my mood because I don't feel like I'm wasting time anymore.
What I'm asking is if I should be focusing on Java or some other more popular language? I've been going through tutorials and I do feel I'm learning a lot with Python. I'm really trying to nail down and understand each concept and how things work so I'd have an easier time logically understanding the syntax, if possible. I have a list of tutorials already organized that'll get me to the skill level where I can make a pay-roll calculator that my boss would have a great use for.
I keep hearing that Java and C++ proficiency is more desirable in a potential employee. While I'm ignorant of how Java and C++ work, I really do like Python. I also plan on learning how to use django or Flask to create a website, and learning SQL (which I heard isn't difficult), because I've noticed SQL experience is often something that employers like to put as a skill requirement for a job.
Anyways, I guess my question is am I on the right track? Maybe this isn't the board to post this in, but I was curious what you guys think.
I write python/C professionally and have for the last 3 years. I have never once seen anyone actually use Python 3. None of the applications I have worked on use Python 3. It's all been 2.7.
Python is a great first language to learn with. Stay focused with Python. Java and C have different use cases. People who say that Java and C are better than Python have no idea what they are talking about. They are different use cases.
For example, lets say I want to quickly hack up something that will do backups on my computer to a USB stick. I would write the script in python, and it would make calls to shell commands like rysnc, tar, gpg etc. The logic and script is in Python, but Python is still calling those commands which are basically C programs. Writing the whole thing in C is fucking stupid.
People who speak like this are basically handicapped to 1 language, and all they do is listen to what other people have said in casual conversation. They never actually try things for themselves.
Jack Reed
Syntax of a language is only relevant to a small degree.
The algorithms, documentation, and quality of your code is all much more important than what specific language you're learning.
Jose Davis
How to learn proper algorithms and documentation ?
Ayden Walker
>Is it worth learning Python3 if I want to get a job as a programmer? No. It's mostly used by scientists, most of which are """"scientists"""" and some plebs like admins and distributors. There aren't that many job offers to write whole Python applications.
>Python is a great first language to learn with. Stay focused with Python. Java and C have different use cases. People who say that Java and C are better than Python have no idea what they are talking about. They are different use cases.
However, people saying that the Java dev team is somewhat competent and the Python team isn't are somewhat right. On additional note: Mixing scripts with C extensions gets you the worst of both, as bindings and FFI with slow scripting languages don't scale up to actual software. Sandboxed embedding is ok - something Python isn't that great at either - but extending will give you hell for anything more finegrained than some default trash like in the standard library.
Lucas Powell
Thanks for the response, I'll keep going with Python and see where that gets me. I know Python 2 and 3 are different, so I might learn the differences between them eventually.
Well I'm just learning the syntax so I could actually code, but I do need to learn how to document properly. I imagine quality of algorithms should increase with practice.
James Powell
geeksforgeeks.org has a bunch of algorithm examples
documentation just means very legible code. Concise and to the point comments, variable names, etc.
Noah Allen
Thanks
Brayden Clark
I need a short script written but can't seem to find the help that I need, so I guess I'll spend weeks or months learning python just so I can get a days' worth of code written.
What's a good resource to learn python?
Leo Bennett
Hey, What script you need written, maybe I can write it for you to practice if I have the knowledge. I could just paste it here.
I've been using videos on youtube by sentdex and Corey Schafer, and of course lots of googling.
Xavier Richardson
>self taught programmer Just give up now
Kayden Jenkins
Why?
Justin Diaz
Because you're a brainlet
Jack Gomez
No offense, but I've offered to pay people here and on fiverr and no one seems to be able to get it. It involves finding values from a list/tuple in a json from an API, and I guess that's hard.
I appreciate the recommendations for educational materials though.
Brayden Lewis
I don't understand this meme yet. Can you explain?
Levi Wood
Just don't go in thinking you're hot shit after having done a few online examples, at the end of the day you've got to be good
Noah Ward
>if I want to get a job as a programmer? >self-teaching Nothing will get you a job when you are self taught unless you are some kind of prodigy, which you arent judging by your post. Even Pajeet, the professional street shitter, will get a job before you, because he at least has some formal qualifications.
Owen Kelly
No idea how I came off as someone like that. I'm fully aware I have a lot more to learn. If I'll end up having enough money I don't see why I wouldn't continue my education.
Henry Perry
>I've been self-teaching myself Python3 and honestly I've been having a lot of fun. Programming is something I've only done a few times.
If you're having fun, you're on the right track regardless.
When I look for a programmer, I rarely look for specific tools. I look for evidence that you get shit done, and if you genuinely like programming you will get shit down.
Nathan Wilson
Also, this guy is trolling. I know plenty of awesome programmers who are self taught. One of them didnt' even go to college
Blake Wilson
No. Python is not in fashion anymore.
Rather learn Go, it's the future.
Bentley Lopez
Do I need numpy to find the value of X from the largest Y in a list X,Y pairs? Or is this something built into python?
>{"category":{"subcategory":[[5,3],[6,9],[2,2] >return 6 as Y, because 9 is greatest X
Henry Campbell
python """programmers""", everyone..
Jose Long
>. I have never once seen anyone actually use Python 3 >It's mostly used by scientists Just give up now
jesus, thats enough Sup Forums retardation for today pythonclock.org/
Chase Richardson
If he really was trolling then it was a bit thoughtless. Somehow it felt slightly demotivating which was needless because I don't have enough money atm to go to school again and I'm putting in my free time into this.
Ian Russell
I don't understand your statement.
Mason Nelson
>logically understanding the syntax you don't need that did you logically learn grammar ? I don't think so.
Henry King
Wouldn't you say, at least to a degree, grammar has a sort of logic to it? You can't just be writing random words and expect to make a coherent sentence. And I guess I just meant learn syntax.
Oliver Price
Nah, there are so much CS grads that Google can afford to only hire PhDs and Pajeets.
The programming field is already way past saturation because every single 3rd world country hands out degrees like candies.
Levi Moore
python is the only thing ive seen used in the limited amount of SDN I've seen
as things get more hardcore due to more ips in enterprises im sure that'll change
Lucas Diaz
Some hack may hire you kiddo. But don't _ever_ expect to be seen as a _real_ programmer
Nolan Smith
Your question shows a significant lack of understanding fundamental parts of the python programming langauges. This confirms the stereotype of most python programmers being programming newbies (= people that can't programm very good), whihc I tried to indicate by putting the words "python programmers" in a triple quotation mark as a rhetorical device in favour of the lulz.
Camden Campbell
Oh.. You thought I was claiming to be a programmer. No, not at all. I was just asking a question, because I'm aware that I don't understand python as well as most of the people in this thread understand addition.
Hunter Garcia
Learning programming is like fighting ludwig in bloodborne.
At first some will goat you into c#, java, but once you've spend enough time on stackoverflow trying to make hello world work you will realize that python was by your side all along, your true mentor, your guiding moonlight.
Andrew Robinson
grammar and syntax has a logic to it but you don't need to understand it deeply to right stuff In fact, up to a level onky the syntax changes between la,guages that do the same thing, the concepts (for(), if, while()) are always the same
Easton Walker
Python 2.7 isn't about fashion. Its timeless classic. Post-2.7 is shit though
Nathaniel Ramirez
I found an example that I don't think actually solves my issue: arr = [[1,0],[8,9],[2,1],[3,2],[10,10]] print(max(arr))
[10, 10]
It looks like it's returning that pair because both X and Y are largest, but that wouldn't be the case in my problem. If I change it so that it reads:
cont. I'm getting a syntax error on: X,Y = [[1,0],[8,9],[2,1],[3,2],[7,10]] print(X,(max Y)) I can't figure out what's wrong here.
Christopher Smith
Fair enough.
a = {"category":{"subcategory":[[9,2],[6,9],[2,2]]}} k, v = 0, 0
for i in a["category"]["subcategory"]: if v < i[1]: k, v = i[0], i[1]
print(k, v)
Blake Scott
Why should [7,10] be returned? What is your criteria for picking that list?
Jayden Wright
>X,Y = [[1,0],[8,9],[2,1],[3,2],[7,10]]
You have only one list and try to assign it at two values, that's the error.
Sebastian Hernandez
Awesome! Though I don't really understand why that works.
If 10 is the largest Y in the list (or tuple?), then I'm trying to find the 7 from that pair.
So then is the best way to do this (which works) or can I find 7 in with some sort of modification to print(X,(max Y))?
I really appreciate the help, btw.
Sebastian Thomas
nobody cares, the future of python is pypy and they aint gona drop 27. also fuck guido
William Nelson
>Though I don't really understand why that works.
how can you not understand how it works?
k=0 v=0
>for i in a["category"]["subcategory"]:
iterates through all the values like [9,2], [6,9] and so on. in other words: "i" is always a list with the length 2: the key and the value
>if v < i[1] i[0] is the first entry i[1] is the second entry
if the second entry is bigger than the second entry..
> k, v = i[0], i[1]
save the new key/vale pair in the variables k and v
Jeremiah Mitchell
So it checks each individually, rewriting the stored value if larger, skipping if smaller until it hits the end, where it returns that value? Does anything else happen in the rest of the script (there's more to this) before it hits the end of the list?
Kayden Lewis
> can I find 7 in with some sort of modification to print(X,(max Y))?
No, you can't.
Even if you would assign X to the keys and Y to the values, then print(X, max(Y)) is just completely wrong.
The programm would return the complete keys as X, not the single key which has max(Y) as value..
Xavier Perez
No, it's exactly like you said:
You iterate through all the values and store the key-value pair of the biggest value (so far) until the end of the list.
Jack Williams
max(arr, key=lambda x: x[1])
Hunter Flores
Okay. I'm playing around with changing values in and getting a better understanding of why and how this can be applied.
Great. That saves me the worry of returning a temporary value accidentally.
lambda is a sort of plug-in, right? Is it faster to run this with or without it?
Austin Campbell
This is much more elegant then my solution, but I wanted to give user a solution he can understand (and modify), since he obviously no programmer...
Mason Miller
A lambda is just an anonymous function. It's not a plugin, just a shorthand for declaring functions without a name.
I can't really speak of its performance, but since it is a function that gets called there is the overhead that goes along with creating space for the variables and stack frame, etc. If you are really concerned, you could always take a look at the implementation of max() to see what it's doing under the hood (only if you're really interested/concerned)
If you have a large data set, you could also bench it.
Parker Russell
Okay, so that's working and this is working:
with urllib.request.urlopen("url") as url: data = json.loads(url.read().decode()) print (data)
So how would I incorporate the two, so that in I'm pulling (k, v) from 'data' returned from url? I'm trying:
with urllib.request.urlopen("url") as url: data = json.loads(url.read().decode()) for n in data["category"]["subcategory"]: if y < n[1]: x, y = n[0], n[1] print (x)
But it's telling me that 'y' isn't defined when it was working before.
Juan Lee
Why not just write shell script?
John Taylor
cont. If I replace 'data' with 'x, y' it tells me 'not enough values to unpack', so I think that's where the problem is.
Dominic Thompson
>It's mostly used by scientists, most of which are """"scientists""""
Wtf is that supposed to mean?
t. Scientist
Christian Scott
with urllib.request.urlopen("url") as url: a = json.loads(url.read().decode()) x, y = 0, 0
for i in a["category"]["subcategory"]: if y < i[1]: x, y = i[0], i[1] print(x) print(a)
Okay, I think this is working, it looks like it's returning the 'x' from the largest 'y' in x,y pairs from 'a'. Thanks, guys!
Ryder Sullivan
I am not a programmer and have no formal education in computer science. But if you are unable to come up with that solution on your own using Google in a day, you should seriously consider a career in a job that only involves very simple repetitive manual labor.
Logan Ward
Here is why python is a good language especially for learning programming. >Multiplatform Unlike VB. >Actually a marketable skill. Used by Google, quantative finance/data science companies and system administrators. Unlike Scheme. >Is interpreted allowing for easier debugging and TDD for beginners. Unlike C, C++ and so on. >Has simple easy to read syntax. Unlike C, C++, JavaScript and so on. >Forces programmer to use correct white space and formatting. Unlike virtually everything else. >Is multi paradigm (functional and object oriented) Unlike Haskell. >Comes with a packet manager, interpreter, editor and more all out of the box. Unlike anything else I have seen.
Personally I believe that everyone should know at least 10 languages well. >C >Scheme/Common Lisp >Python >JavaScript >Haskell >C++ >Java >BASH >C# >x86_64 Assembly Above are the ones that I have chosen for myself based on industry prevelance as well as for novelty and for their different paradigms. Python is a great place to start desu senpai.
Michael Murphy
Found the paid shill.
Connor Gray
Thank you for your vote of confidence!
Michael Walker
>>Forces programmer to use correct white space and formatting. >Unlike virtually everything else.
You're new to programming I'm guessing.
>Personally I believe that everyone should know at least 10 languages well. >C Useful in many places >Scheme/Common Lisp For what job? >Python Useful in many places >JavaScript Useful for webdev only >Haskell For what job? >C++ Useful until you get a stack overflow because you're calling shit you don't know calls shit that calls other shit for days >Java Useful in many places >BASH Useful if you need to admin or use Unix...otherwise no >C# Useful in a few places >x86_64 Assembly No useful for anyone but OS programmers 0.1% of their career, even engineers programming drivers need not use this 99.9% of the time. Assembly for ANY processor should be studied once by serious programmers/engineers and purged from memory until the day you need it again at which time you can search or buy a book on it. Waste of life otherwise.
Christopher Ramirez
Learn PHP. You'll get more job faster than anything else.
Ian Cook
Tell that to the guy making 150/yr self taught. 5 years in.
Aaron Parker
For learning purposes the difference between 2 and 3 are irrelevant and once you know one you can work in both. Any little quirks you can deal with as they arise. I use 2.7 for work shit bc that's what's supported. For side shit I use 3 bc why not.
Austin Wood
Surely you're not serious? How is this difficult?
Jason Bailey
No idea. I seem to be making decent progress, thanks to Sup Forums. Now, it's just a matter of interfacing the script with the API.
Aaron Kelly
Pip install requests
Kayden Barnes
I don't know what that is...
Carson Hill
>Python 3 >Print Is A Function >The print statement has been replaced with a print() function, with keyword arguments to replace most of the special syntax of the old print statement
print "nigger plz"
Tyler James
Yes. Learn Py3 if applicable. Most differences between 2 & 3 are not too huge for most work. 2 will be deprecated in a few years, don't write in it if you don't have to.
In fact where I am anything new we just default to Py3, no point in using Py2 going forward when we don't have to.
Easton Price
no, just use max+itemgetter or sorted( ... , reverse=True)[0]
Zachary Lewis
I want to return a value and email it to myself.
import smtplib
server = smtplib.SMTP('smtp.gmail.com', 587) server.starttls() server.login("YOUR EMAIL ADDRESS", "YOUR PASSWORD")
msg = "YOUR MESSAGE!" server.sendmail("YOUR EMAIL ADDRESS", "THE EMAIL ADDRESS TO SEND TO", msg) server.quit()
But if I take off the quotes from 'your message!' or change msg in any way it doesn't send. What do?
Joseph Gonzalez
Sorry, it was maybe a bit harsh. But have you given the problem an honest try yourself before crying out to others for help? You may surprise yourself. Or not.
Jordan Bailey
I never got this, like what was the point of changing it to print()?
Sebastian Lee
Loool
Never ever learn php
Carson Hughes
Initially, no. I figured it would be a short write for someone who already knows the language, whereas I expected it to take me a couple weeks to learn it (or as much as I needed for this project).
That said, I'm mostly done, and this is only the first day I've been working on it myself. So yeah... it could have been easy money for somebody.
Jayden Scott
>take off the quotes
What the fuck are you talking about? You need quotes to delimit a string. It's an error to take the quotes off.
Owen Reyes
So then how could I get the email message to contain a return value instead of pre-loaded text? Everything that goes inside the quotes is displayed as-is.
Cooper Green
Can't you just create the string beforehand? Like msg = "hello %s" % some_name_var
Actually I forgot the string formatting syntax but can't you just create your string and make sure it's actually a string?
Caleb Garcia
Maybe. This is my first day learning Python.
Kayden Rivera
Python 3 has all the right decisions 2 never made at this point. Duck typing was a mistake. def f(x: int) -> str: return f"{x}"
Jace Walker
right, because embedded devices don't require asm.
Landon Howard
print() is much more flexible than special syntax. You can pass it to other functions as an argument. For example, if you are making a UI and are adding buttons, you can try giving print to it as a callback, to check what argument each button sends with its callback.
Jaxon Cruz
is python 3 more used than 2 yet?
Caleb Kelly
Not him, but they definitely don't require x86_64 ASM
Joseph Campbell
nobody said they did.
Isaiah Fisher
>right, because embedded devices don't require asm.
user says 'i think you should learn x86_64 ASM' Another user replies 'no you shouldn't, waste of time' Another user replies to that with sarcastic text quoted above, making the argument that its not a waste of time as embedded devices use it.