r/learnpython • • Oct 24 '17

6 Months of Python Grinding Pays Off (thanks to this sub)

I’m in a customer support leadership position and I’ve been at Python for roughly a half year after learning SQL the first half of the year. It wasn’t in my job description, but all the free time I had I spend working on relevant python scripts and I’d sometimes spend 15+ hours/week outside of the job getting scripts to work.

Our business intelligence officer let me know the plan is to pull me out of support and into an official data analyst role in Q1.

I feel incredibly proud and wanted to share and thank this subreddit for always giving thoughtful answers, and for people not being afraid to ask what they might think are stupid questions. So many good resources are references and a plethora of general programming tips are shared.

For anyone who’s just starting out, keep at it! If you have the opportunity work on scripts practical to your job you’ll eventually you’ll impress someone. I really can’t wait for the opportunity to focus on this stuff full time and really begin to grow.

Thanks!

478 Upvotes

53 comments sorted by

60

u/ExoticEngram Oct 25 '17

What resources and learning materials did you use the most?

47

u/john_cornflake Oct 25 '17

Automate the Boring Stuff was the best thing I read, but Learn Python the Hard Way was useful as well.

I mostly just googled how to do things, copy the stack overflow code, then look at every piece and reverse engineer it until I could rebuild it myself.

I’m definitely not doing anything real complex, but enough to show I’m good enough and very interested in continuing to learn.

5

u/ExoticEngram Oct 25 '17

Thanks man! I started Automate the Boring Stuff a week ago and it’s really helpful.

1

u/JuniorData Mar 25 '18

I'm in the same position with your background. Starting python with /u/AlSweigart's book. Congrats mate.

0

u/[deleted] Oct 25 '17

[deleted]

17

u/john_cornflake Oct 25 '17

I actually took a General Assembly 8 hour course on a Saturday which set me up for basic querying. Once I knew that I could find anything in my companies database and I googled to see what was possible to simplify my queries.

I’m fortunate to have had my companies database to work with, but I imagine there are free databases out there you can work with. I would recommend making sure the first one you work to understand the basic syntax, and once you learn that you can do a whole lot.

Also, joins are incredibly important, so don’t breeze through that, really work on it until you can not have to remember what the difference is between the join types.

Sub queries are pretty clutch too, but a bit more complicated to get the hang of.

2

u/thejourneyman117 Oct 25 '17

^ Joins. They are the bread and butter of SQL. Otherwise, you might as well just be doing filters on an excel file.

2

u/john_cornflake Oct 26 '17

That’s exactly what I was doing at first! Actually, I still do that... I don’t do much actual math in SQL, just large, specific data dumps and analyze on those.

I mostly use google sheets so I can share the data easily and update without needing a physical file. There’s actually a query function in google sheets not available on excel (at least not the mac version) that works very well. Automate the raw data, the query in the sheet gives updated info. I imagine there’s a better way to do it, but that’s what I know best at the moment.

1

u/thejourneyman117 Oct 26 '17

Excel can be, and has been, used as a database.

Under NO circumstances should Excel be used as a database.

21

u/wisdomattend Oct 25 '17

I'm in a customer support leadership position as well and eyeing Python. What steps did you take? Also, do you recommend learning SQL? And if so, before or after Python?

2

u/john_cornflake Oct 25 '17

Well, I had to go to BI for a lot of information and one day the guy came to my desk and worked on it in front of me and it seemed fun and something I could do and I got permission from dev to access it. Then i just started querying friggen anything i could think of.

With Python I did every starter tutorial i could find, read Automate the Boring Stuff and Learn Python the Hard Way. There were a bunch of scripts at work I looked at and basically reverse engineered until I could build my own. Now I’m expanding and making anything ai can think of and solving problems I didn’t even know I had! And generally being efficient with my work.

There’s so much you can do, and a good place to start is to find a very repetitive task because more than likely Python could do it for you.

12

u/Oxford89 Oct 25 '17 edited Oct 25 '17

Data is ubiquitous and the backbone of nearly every application that you will encounter in an organization. Learning SQL will give you the ability to navigate those data systems. Pair that with knowledge of the business and you'll become the go-to SME in your org.

As far as learning one over the other I'd say learn both. But prioritize the one that has a more immediate impact in your current role. If you're in a development track learn Python first. If you're in an analyst track learn SQL first.

9

u/ffrkAnonymous Oct 25 '17

SQL to retrieve data. Python to process the data into something understandable.

14

u/algag Oct 25 '17 edited Apr 25 '23

.....

3

u/[deleted] Oct 25 '17

Depends on the role you're looking to get into but SQL is more appicable to business focused roles outside of data science and pure programming. At a major company SQL will get you a job as a BI, Business Analyst, Data Analyst, and Financial Analyst (coupled with a general understanding of business and good communication skills). Data science still requires fluent SQL but Python is required for data science packages focused on modeling. Sure Python is sexy and fun but SQL is a must have in most business roles, while Python would just set you apart.

1

u/[deleted] Oct 25 '17

In my experience (similar to OPs) most analyst jobs require both SQL and Python (or some other similar languages). The SQL is really only so you can show you know how to access data so even a beginner understanding of it will pay dividends.

1

u/va1da5 Oct 25 '17

SQLAlchemy is a briliant package for database interactions. Due to Object-relational mapping (ORM) you are not required to write your own SQL queries at all. You must try it if you haven't heard about it before.

1

u/DataLulz Nov 23 '17

Any developer or programmer that wants to claim they are competent or proficient should know sql and not have to rely on an ORM to access data. In fact one of my favorite ways to gauge someone in an interview is to ask them to white board their own ORM to show they do not need to rely on pre built things to access databases.

7

u/Opportunityinrisk Oct 25 '17

I don’t know you, but I’m proud of you!

5

u/john_cornflake Oct 26 '17

thanks, dad!

5

u/scottishbee Oct 25 '17

Congrats! As a data lead, I've hired a customer support person who taught himself SQL at my last company, and am angling to do that again at my current one.

Something I'm curious about: how did you carve out 15 hours/week? There's a billion side projects/things I want to learn and I can never seem to set aside the time.

5

u/john_cornflake Oct 25 '17

I have about 45 minutes of a commute so I’d bring my computer with my on the bus. Then I’d work on stuff an hour after work or on the bus home. Then there are weekends where I usually spent a longer 4-6 hour session either day working on projects.

1

u/Vrady Oct 25 '17

I'm working on teaching myself python but I can't set aside that much time. Do you think 45 min a day is enough to get a decent grasp on content? Also did you have any prior coding experience before learning python and SQL?

5

u/john_cornflake Oct 25 '17

45 minutes a day is great! I was a musician before this and what was told to me over and over was 30 minutes every day is better than one long 7 hour session a week. Consistency is incredibly important because your memory of syntax and concepts will remain fresh and you will learn more quickly. A lot of the beginning I was just doing 30 minutes a day until I came up with project ideas and could sit down and be creative for long stretches. In learning anything I think if you do too much at the beginning you’ll miss a lot of important things that will come back to haunt you as you work on more complex scripts.

In high school me and a friend would make fake websites for fun, so I knew a bit of html. Maybe 5 years ago I built another site and learned CSS along with it but that was really a means to an end and my codon was awful.

So yeah, I had a bit of experience before, but not a whole lot. I also contribute a lot of my success to the map editor in Warcraft 3 back in 2003. That’s where I learned boolean logic and some very basic programming logic.

1

u/[deleted] Oct 25 '17

I learned SQL on the job a few years ago. I had no experience whatsoever. IMO, the most important thing in when you is to understand the relational database you are working with. If you do not have an actual database to work with. Use a fictitious one. Microsoft has Northwind and a few others for SQL Server.

You need to understand the logic of the relational model very well. Why you see 1:N relationships, M:N relationships, column based vs row based data, what normalization means etc. Try to understand why you would use the database in real life, and what application its elements would have.

Once you understand that, you will have easier time to figure out why you are using inner vs outer join or any other clause you may want to include in your SQL queries.

I am learning Python now, and the most helpful thing again is to have a real life (or at least a realistic) problem that you are trying to solve. My biggest Python project so far has been a script that finds documents on my company support site, downloads them, organizes them in folders etc. It is not very complex, but it has taught me how to parse html, manipulate the files etc. I am now working on adding logs, running the script weekly through task scheduler, add meaningful exceptions etc. I hope i will continuously build on the script while learning new things in Python

1

u/driscollis Oct 25 '17

Python includes SQLite, so you have something simple to learn SQL with just by installing Python!

3

u/[deleted] Oct 25 '17

Really good job dude! This is how you move along in your career. I took a similar path as you, I started in support went to data analyst, then went to statistician, and now I'm a data scientist. I hope you keep shooting for the stars.

1

u/john_cornflake Oct 26 '17

I am! I’m not sure where I want to go... data is the most accessible to me career wise, but I just love coding and solving problems so as I learn more languages and understand the job market better I can figure out what to actually aim for. I’m just grabbing branches I think are pretty atm.

2

u/[deleted] Oct 25 '17

This is exactly how I worked my way into software development. Learn Ruby and bash next

1

u/john_cornflake Oct 26 '17

A friend wants to make an RPG via RPG Maker that uses Ruby for advanced features so I just might! I’ve got my eye on javascript though so we’ll see...

4

u/seidinove Oct 25 '17

Congrats!

1

u/S1enga5 Oct 25 '17

Can you please break down your process (steps you took) to learn SQL?

2

u/john_cornflake Oct 26 '17

Not really. I took a 101 saturday course and got the gist, then I had a giant database at my job to work with and queried everything I could think of until I got to the point where I could write queries without references tables anymore. The hardest part about it was just learning our database since it’s like... hundreds of tables. Most are useless for me, but i just dug around and found where things connected well and began to learn where to find what I need.

1

u/the_grass_trainer Oct 25 '17

What's the best way to learn modules? I think a lot of my confusion comes from this.

I found .py files such as OS.py, looked in it and doesn't really seem like a lot is in there. Yet I'll find a ton of code using os.py in different ways... Or am i just that slow of a learner? :(

2

u/john_cornflake Oct 26 '17

Well... I stumble upon modules by reading other code on stackoverflow and the like. I have a problem, I google it, I find a new module.

Most of the modules I’m using right now serve specific functions, but as I continue growing I’ll surely understand them better. Many of them come with very good documentation, so just read through it and even if you don’t understand most of it you’ll learn something. Later when you have a problem and revisit it, it’ll make more sense.

Reading and “decoding” scripts was how I did it, and fortunately (and unfortunately) there’s no one at my company outside of dev that knows Python so when there was a gap I read through an old employees scripts and learned a whole lot.

Think of what you want to do, write down the high level “how do i do it” stuff and then just jump in. Google relentlessly.

1

u/the_grass_trainer Oct 26 '17

My issue isn't WHAT these modules are used for, but rather HOW to use them. I find myself googling a lot, reading documentation, but not understanding very much.

I made some posts here, and one on stackoverflow. On Reddit i get some guidance, but on stack i just get "here's your answer." I made a "difflib" program, but had no idea Python can't do what difflib does on its own. Like how do i know WHEN to get a new module, and how to call it, and what format? Idk really how to explain it, but i find the answer, study it, but leave still dumbfounded. :(

TLDR: I'm stupid i guess.

2

u/john_cornflake Oct 26 '17

I guess it depends on what you’re doing? I honestly know very little about python, but I know enough to make the things I need done work. I’m trying to pick up as much as I can along the way and have an incredibly long way to go before I don’t feel like an imposter.

1

u/triple_dee Oct 25 '17

Awesome job! I also started working through Automate the Boring stuff but ended up switching back to foucssing on R recently (I will get back to python...someday!). What kind of scripts you found relevant? I understand your scripts were probably business related so it can be vague, but I like hearing about cool stuff people do to make life/work better or easier :)

2

u/john_cornflake Oct 26 '17

So the majority of what I built is based on google scripts. So our engineering and BI team has been strapped for time which was an incentive for me to be self service. The next step after SQL was to setup automated Python scripts to upload that data to google sheets. Moving to BI I can actually learn how to put it back into a database to query against everything else, but this has suited me and my team well and saved hours, as well as give us valuable information that was only available by asking BI to do it.

Basically, find quick wins and jump on them. No one knows what you’re doing because most people can’t code, so it appears like you’re working magic. I think I’m progressing nicely but this kind of thing adds shine to it that looks good to higher ups.

1

u/triple_dee Oct 26 '17

Oh I can see how that kind of thing would be super useful! Great job!

1

u/[deleted] Oct 25 '17

Good for you, I'm not only proud of you... I'm also extremely jealous.

2

u/john_cornflake Oct 26 '17

I’m honestly incredibly lucky. Opportunities keep coming up and I’ve been wise enough to act on it and have it align with my passion.

This is my first day job (I was a musician before) and I hit the jackpot. A good company will encourage growth and now I’m dedicated to them because I really owe their nurturing to my success. Unless that changes I may stay here for as long as they’re in business.

1

u/cowegonnabechopps Oct 25 '17

Congratulations! I work in support myself and have been learning python at home. I’m looking to do something similar to what you’ve done and reading this is hugely inspirational

2

u/john_cornflake Oct 26 '17

If you can show evidence of your growth and general interest, I feel like that is a big selling point. They look and you and say “this is where they are now, but with their motivation and efforts here’s where they’ll be later” and they can probably get you for less money initially and you’ll be doing what you wanna do. Eventually they have to pay more, but the same value for someone outside the company won’t come with bullshit training since you already know the ins and outs and have built relationships with your coworkers.

I also spoke with a good friend who’s a project manager and said he really values people who learn on their own because it shows a lot more initiative than someone who’s fresh out of school. Not to devalue that work, but as a hiring manager you know someone is passionate and will constantly grow if the way they got there is passion to learn.

1

u/cowegonnabechopps Oct 26 '17

Yeah, I work in a small company and one of the senior devs used to be a music teacher who learnt his coding on his own initiative so I know they're receptive to that. I'd been slacking a bit recently so this has given me a good kick to get me back into it!

2

u/john_cornflake Oct 26 '17

Don’t slack! Even if you don’t want to, just spend even 15 minutes doing some sort of programming. Reading a bit of code, rewriting some code you know, reviewing your old code, anything to remind your brain to remember it.

1

u/digitalpure Oct 25 '17

This is awesome. I am also a support manager and hit the ceiling and so transitioning. Doing alot of the exact same books and steps and it helping.

Keep learning and congrats on the new job!!

1

u/john_cornflake Oct 26 '17

The first thing I coded 100% myself without a template was a script that grabbed random tickets from our ticketing system for QA purposes and emailed them to the director and myself. Super proud, and it’s the moment I realized I’m ready for new challenges. It saved a whole 2 minutes a week of grabbing random tickets, but that adds up!

1

u/leetdemon Oct 25 '17

Congrats!

1

u/redpillpaddy Oct 25 '17

Good job man, Automate the boring stuff is a great book!

1

u/smarty_homez Oct 25 '17

Congratulations!!

1

u/Moondra2017 Oct 26 '17

Nicely done. I feel this going to be the norm now. Has some sort of programming skills will be a necessary job skill. Good on you on taking the initiative.

0

u/[deleted] Oct 26 '17

[deleted]

1

u/Rhemm Oct 26 '17

How this is relevant to OP's post?