r/learnpython • u/[deleted] • Feb 28 '21
About to start my first python job, advice?
As the title says, I’ve recently accepted a job as a machine learning developer (my first actual development job).
I am familiar and comfortable with python, testing, documentation etc and the data science stack having self taught it over the past 18 months or so and I will be spending my notice period really solidifying these skills.
However, my background is not in computer science or software engineering but in more traditional aerospace/mechanical engineering. And I have no real experience in professional software development.
I’m interested if any of you seasoned pros have any advice on how not to be “that new guy”?
Edit: thanks everyone! Got a bunch of great practical advice!
21
u/deapee Feb 28 '21
So realize that even those of us with years and years of experience (even years working on the same codebase) don't always, at first glance, understand what we're looking at in the codebase -- even if we're the ones that wrote it!
It's going to take a *while* to get familiar with the codebase. A lot of things are going to make zero sense and require an insane amount of following along, debugging, etc. This is normal.
That said -- just remember that a general 'big-picture' understanding or logical ability to piece something together, is probably more important than leet-code one-liners and syntactical knowledge. I've hired some syntactical geniuses over the years that fail to break things down into simple steps and get a project started properly. The fact that your background is in aerospace/mechanical engineering leads me to believe that you'll be just fine -- as soon as you get over your initial nerves.
Finally, learn to use the help tools that Python gives you -- help(function) -- and of course always go right to the official docs (for the version you are on) first, in my opinion. Stack is great for one-liners, but to really understand a library or function, etc, consult the actual documentation...you're likely to arrive at a more-precise answer specific to your exact situation and use case than you are searching someone else's submitted answer from years past.
3
3
u/arosiejk Feb 28 '21
Your first paragraph was really inspiring to me. I’ve been practicing the learning path in MIMO for web dev, and most of it has been super easy. I know it’s not the deep work I’ll need to be proficient, but it helps to be reminded that it’s normal for me to forget a few things while I’m learning.
2
u/InTheAleutians Feb 28 '21
Stack is great for one-liners, but to really understand a library or function, etc, consult the actual documentation
Hugely important. Being able to get quick answers and being able to copy paste is nice, but the real juice is in the help docs.
2
u/PandasOxys Feb 28 '21
Yeah this exactly. It took me about 7 months to fully understand how the system worked for a team I switched to. You have to learn how your code gets deployed, what different parts of the app/system do, what's the change process, what repos do what, etc. I joined an infrastructure team so we had like 11 or 12 repos that each controlled different parts of the system we managed. It isn't something anyone could just walk into, it's something you just have to try to learn more about everyday until it clicks. NO one, no matter how senior, is going to walk into that type of environment and just know how to fix stuff.
8
u/antonic81 Feb 28 '21
Being an engineer myself with quite a bit of experience this is what I'd recommend.
Don't worry about being "that new guy". It's your first job, you are expected not to be a ninja at it. You are self taught after coming from a different background which means you had the drive, perseverance and ability to get this far. It is more than huge majority of others make of it.
Continue what you did so far. Stay curious (sorry, Steve), hard working and honest to yourself and your colleagues. You might suffer a bit during your first months to really become comfortable at being paid to do this but ultimately it will all "sit" at it's place.
Good luck!
3
8
u/AchillesDev Feb 28 '21
I was in a similar position (but much less time to self-teach) 7 years ago and I’m still here so maybe my advice doesn’t suck. It at least has worked for me thus far.
Take lots of notes on your projects in a way you can easily look back on them and connect them. I use Roam for this.
Build projects in your spare time. Especially if you feel like your job becomes constraining to your further growth. Explore other disciplines.
WRITE. This is one of the best ways to crystallize what you’ve learned. Start a blog, make a dev.to or medium account and start to writing. While you don’t have to publish, the pressure of writing in public is a good forcing function for making your writing clear.
3
Feb 28 '21
These are great! I’ve actually been trying to find a proper reason to use roam, this never occurred to me!
2
u/AchillesDev Feb 28 '21
I can go on for days about how I manage projects in roam. One of the biggest things is for each one I have a Lessons Learned section, and each block in there gets linked either to [[Reference Guide]] for later reference and/or turned into an evergreen note or article idea. It’s one of my favorite tools I’ve ever used.
4
12
u/Ran4 Feb 28 '21
Don't write ML models using messy inheritence-based OOP code. It's what a lot of beginners do, and it makes it incredibly hard to work with.
4
9
5
u/marl6894 Feb 28 '21
Whoops, I'm doing this right now. We need a unified pipeline for several different types of models with very different APIs, though, so I wrote a single wrapper for all of them to make it ergonomic for our on-site engineers to toggle between model types with a kwarg.
1
u/villflakken Feb 28 '21
Oh man, that's really valuable, and also the type of project I'd love to delve into myself!
3
u/mr_krusher2000 Feb 28 '21
I can't give you any advice as I'm still a student. But all the best for your job. You'll do great.
3
2
u/garlic_bread_thief Feb 28 '21
I'm a final year Mechanical undergrad student who's really into programming and currently going through the Andrew Ng's ML Course. What made you shift your field and what stage are you at currently (loads of years of mech experience)? Do you have any advice for me?
6
Feb 28 '21 edited Feb 28 '21
Lots of small reasons added up I think. I’ve got 4/5 years experience (depending whether you count internships).
Honestly I just got bored of engineering, maybe it just speaks to the places I’ve worked but in general you rarely do “the cool stuff” it’s mostly writing reports, sending emails, meetings etc.
And the final nail in the coffin was the constant “we’ve promised a deliverableTM to the customer by next week” from the sales team with no engineering knowledge despite the fact the entire eng team told them it’s not possible. I get this can happen anywhere but engineering seems rife with it; less focussed on innovation and building quality products more focussed on shareholder bottom line.
I know this all can apply to any job but as I said mechanical/aerospace seems absolutely rife.
Bottom line is I just wanted to change my life up a bit, move to a new place, start a new career etc.
My only advice would be that learning how to code can be the most frustrating experience ever, I nearly gave up about 10 times when I just couldn’t get stuff to work early on. Just take a step back, chill out and carry on. Eventually you’ll write an entire (small) program and it will all work first time (hopefully) and it’ll feel great!
Other than that I would say the piece of advice I see A LOT is don’t just get caught up in the whole ML/Data Science stuff (even though it is super cool), learn proper coding practices like how to write unit tests (and good ones!), mocking, documentation, proper software design patterns, OOP, CI/CD etc etc.
The market is saturated with people who know how to use scikit-learn but couldn’t actually write, test, and release even a small open source package. The guys at this place I’m going to outright said the fact it was clear I knew about testing/CI clinched it for me over some candidates with specific ML qualifications.
Best of luck!
Edit: Realised this seemed a bit of a downer on engineering. That’s not what I meant, it can be a great career and the ability to break large problems down into manageable chunks is a big part of why I think engineers can make great programmers! Plus the maths and statistics you learn in mech eng will put you in a good place vs other candidates for ML/Data jobs I think.
1
u/Freebeerd Feb 28 '21
I'm in that space now where I'm all good using scikit learn, but like you said, rather clueless about testing, mocking, documentation, CI/CD. Are there any resources you would personally recommend for someone looking to get practised in these areas of development?
5
Feb 28 '21 edited Feb 28 '21
There’s no one place that comes to mind. However I remember reading this: https://cjolowicz.github.io/posts/hypermodern-python-01-setup/ and it being an excellent intro. I went through the whole series and found it super useful!
My advice would be build up slowly, when you next start a project, write some tests (cannot recommend pytest enough) get used to seeing tests fail and how to make them pass again.
Then when you’re happy with that, try using something like nox or tox (I personally recommend nox) to automate the testing. The creator of nox Thea Flowers did a great talk on this here: https://youtu.be/-BHverY7IwU
Then when you’re happy, start learning something like GitHub actions that can run these tests for you in the cloud whenever you push code up to a repo. The GitHub action docs are really good and more and more projects seem to be using it so you’ll see more and more examples in other open source stuff.
How I got started honestly was just looking at the repos of projects I liked such as pandas, nox, requests, cookiecutter etc. And see how they did it and figure it out from there with a lot of help from random googling!
Then suddenly you’re doing CI!
Things like mocking and patching I found a bit harder but a great project to look at for that is cookiecutter as they have to mock out subprocess calls to git for example so their tests show how to do this cleanly.
Hope that helps!
Edit: also this guy is amazing: https://calmcode.io
1
1
u/arosiejk Feb 28 '21
To go with what you said about almost quitting:
It’s important to know some info about how you learn best. I tested a few different things and ended up setting my early path with an app that sets up practice scenarios that are super contained and simple. I needed the structured failure of rather low effort introductions to make some of the background info bite sized.
It was a big jump for me to go with something so simple after preferring the highest level of classes in areas where I’m strongest (all the literature based classes in undergrad and a few extra degrees and certifications in my field.)
2
u/baubleglue Feb 28 '21
Don't reinvent the wheel. Before trying to solve something ask yourself if somebody solved the same/similar task before (google, ask advice)
Learn current dev process
Learn a bit about development cycle (ex. https://en.wikipedia.org/wiki/Agile_software_development) - just to get idea
as a "machine learning developer" you will probably dependent to quality of data prepared by other developers, try to get idea about raw how data processing and learn some domain logic
Clarify the given task to the point you have no doubt about it
try to get early feedback (don't develop something for a week to find that you should do it differently)
Always test negative scenarios.
Don't follow blindly orders - in the end you will be evaluated by results. Find a way not balance between "right to do" and "follow orders". You may be lucky and that is not relevant, but usually it does.
Usually simpler solution is the right one. Spend time to simplify your code. Don't use tricks you don't understand.
To develop a project is separate skill from coding in Python. If you are "comfortable with python", it doesn't grantee you know how write bigger code base.
1
Feb 28 '21
Thanks this is a good list, your last point on dealing with bigger code bases is one I’m definitely conscious of, do you have any tips on how to approach these larger projects and actually understand and be able to meaningful contribute to them?
1
u/baubleglue Feb 28 '21
I don't really have tips. You will learn with a time. Everyone have different ways to think, my tips my not to work for you. I like to ask myself what the problem it is trying to solve. Then I am trying to think how would I approach it. Then compare my version to the one implement in the code.
There is a thing called "inventor's paradox", instead of solving specific problem, it is easier to solve general one (which includes the specific).
Here's an example, lets say you have a complicated python object which represents a state of you appreciation. When people just started to learn programming, they usually run into some kind of "develop a game" project. It is very useful to try to solve it on your own. So how to solve it in real production code? You ask yourself what +type+ of the problem I have? I need a data structure which represents "state", specifically for that reason people invented OOP. So you can apply OO techniques - you got to first level of abstraction. Using classes helps a lot, but with a time you will still run into complicated situations: conflicts between versions, too many interdependencies, concurrent state changes.... The people ask themselves again "which type of problem" they are facing with... Google for example "oop design patterns". Then again, at some point it won't be enough. People found that in many cases it is better to have an "application model" outside of programming code, for example in relational database, and for message exchange use a message queue... That one of the reasons for using a frameworks - bundled libraries and abstractions.
If you understand what abstract solution/s applied to solve which problem/s, you may find it easier to understand the existing code base. I am not saying you need to learn all that - just be aware of the fact/concept and learn when you need.
2
u/Etheking Feb 28 '21
Could you share your journey of education to qualify for this position? (Time, resources, courses etc?)
2
Feb 28 '21
Sure!
Did an aerospace engineering bachelors including a placement for a global aero company.
Then masters in materials science part time around work.
I started learning python seriously about 18 months ago and since then have not really done much else (lockdown helped with this).
I only did a few courses really, there’s only so much you can learn this way. I think they’re good for getting up to speed quick but the best thing really is to start hacking on your own side projects (it’s a cliche but it’s true).
Udemy is a good shout for courses, there are some quality ones on there. Never pay more than like £12 for them though.
My advice is to do a few basic courses to expose you to the kinds of things you can do then start hacking on a problem you want to solve!
53
u/allmachine Feb 28 '21
Spend some time to get to know the coding conventions of your new group, and don't be afraid to ask a ton of questions!
2
u/dan4223 Feb 28 '21
Always ask questions, but always spent five minutes trying to Google the answer yourself first.
14
u/Ejemy Feb 28 '21
Commenting to bookmark this question as it's been on my mind too.
16
27
u/meAndTheDuck Feb 28 '21
keep calm. everyone is cooking with water. it's mostly just the amount of experience that makes the difference
read more theoretical stuff to learn concepts. a book I always recommend is clean code by Robert C. Martin. this is not about python but about how to handle programming in general. (skip those chapters that are not interesting for you! but maybe they will be in the future)
3
5
4
u/creamyjoshy Feb 28 '21
I'm a semi-self taught developer with about two years of experience.
The number 1 piece of advice which you absolutely have to do from the get-go is to ask for guidance when you're stuck.
This is a problem I still struggle with to this day. I don't know where you're from, but in my neck of the woods, asking for help is seen as a subtle admission of weakness. If you have ever felt the same, you're going to have to work to shed that idea.
Initially you might seem like a help-vampire, and you might go through a phase of thinking that you aren't producing any actual work, only asking for help from others to do it. That's fine. Step 1 is to focus on producing results so you can keep learning. Step 2 is shedding the non-vital help of others and becoming an expert.
Another challenge with this is that during step 2, you will find it difficult to know when you /have/ to ask for help and when you can figure it out yourself. As an obvious example, if you want to access a database and don't know who has the password, you will have to ask around. That may seem obvious, but there will be more subtle things you will have to ask about which you wouldn't have been able to figure out on your own.
Good luck!
1
u/prame_ Feb 28 '21
Congratulations on the offer. I think I’m similar to you in a lot of ways. I come from an electrical engineering background and I’ve had the opportunity to work on ML projects during my masters (also closer to EE than CS).
I also want to look for a career in ML, but not having software development experience makes me insecure, even though I think I’m a decent programmer and have done real-world projects using the python data science/ML stack. It would be great if you share how you went through the process of landing an ML job coming from a non-CS background.
2
Feb 28 '21
Honestly it sounds like you’re already doing the right kind of things.
The thing I found most difficult was finding relevant transferable skills from previous projects not related to software to put in my CV so maybe try and come up with some examples from your own career.
As a reference I included a few about lots of data wrangling I did in previous roles (even without programming) and statistical analysis etc. Then included some recent work I’ve been doing in SQL and I think the real factor was probably my masters thesis project which I used scikit-learn for.
Like I said though it sounds like you’ve done or are doing all the right things, I think I just got super lucky and found a company willing to take a shot on a non CS/software person for the role.
Best of luck!
1
1
u/chandyego84 Feb 28 '21
Quite unrelated to the question/title, but I'm relatively new to programming, and I'm just interested in how you taught yourself python in the last 18 months. did you have prior programming experience? did you use an online course or did u just have a project and took off from there?
2
Mar 01 '21
Absolutely no programming experience whatsoever!
I did a few online courses (udemy) and worked through a few books until I could hack around on my own well enough and then just started some projects, mainly automating things.
It was only once I started doing my own projects that I really took off and caught the bug, tutorial hell is real.
1
u/chandyego84 Mar 01 '21
awesome! what was your first actual project?
2
Mar 01 '21
I can’t actually remember what the very first project was, but it was almost certainly about 50 lines max and totally terrible!
Early on I did a lot of replacing excel with things like pandas and openpyxl. Things like web scraping and just playing around with datasets if you want to do data stuff are great.
This is probably a weird one but my first “proper” project was actually making a cookiecutter template for an open source python package. I basically copied the base cookiecutter-pypackage one and rewrote it from the ground up changing things like travis CI to GitHub actions, tox to nox etc and learning bit by bit how it all worked.
And doing this made a lot of other stuff kind of click into place.
1
u/Cayde-6699 Mar 01 '21
I’m currently in mechanical engineering in my 2nd year and have also me self teaching python for the past 4 months nice to hear u also have the same background and gives me hope for being self taught
1
Mar 01 '21
If I can do it so can anyone! I was nothing special at university believe me.
Stick with your engineering degree to completion though, it’ll give you a solid grounding of logical and maths/statistics skills and is a great thing to fall back on in the future.
I wish I knew python when I was doing mine, python with numpy pandas and scipy >> matlab.
3
u/num8lock Feb 28 '21
no pro but
understand business goals, rules/methods, learn codebase, communicate properly
1
Feb 28 '21
.... How TF did you get that job?? I have years of experience programming in multiple different languages and on multiple different platforms but I can't get a job without a degree in the field.
3
Feb 28 '21
I honestly don’t know! Probably the biggest contributing factor was maybe I did a machine learning project for my masters thesis but other than that I have no direct quals or experience.
Just a hobby programmer with a few small projects.
1
Feb 28 '21
Yeah, having a master's degree and a thesis in the field probably helped XD
I didn't finish my bachelor's lol.
Also though, if I worked on building a portfolio first and applied to more positions, I'd probably have better luck.
3
u/Mirage2k Feb 28 '21 edited Feb 28 '21
It helps a lot that he has an engineering degree. First of all it's a document of qualification that passes a lot of regulatory hurdles. Second it teaches a lot of useful math and technical knowledge.
For example when working with signals or data streams it is often possible to Fourier or Laplace transform the dataset into frequency space. That's a whole new dimension (inverted time) where you can see and edit patterns with seemingly magical simplicity, but it takes years of calculus background to properly get into.
1
Feb 28 '21
Congratulations! It can be pretty nerve wracking writing your first piece of code for an actual company. But take it easy, each one there was a newbie at some point, hopefully it's a collaborative environment and you'll be free to ask questions and have fun.
1
u/ItayElf Feb 28 '21
In my opinion, the best way to learn is to just make things. Think of a little project that relates to the things you know or guess you will use in your job, and play with it. When you're stuck, google how to solve the problem or implement the feature you need!
That's how I started with python, creating mini-scripts and learning on the way, and although I don't have a job I still think this is a great way to learn a new programming language!
Good luck!
1
u/salmon_suit Feb 28 '21
I’m surprised no one else has said this. Learn the basics of Git (the command line tool, which is different from GitHub which is a website used to store code) using sites like https://learngitbranching.js.org. Things like commit, push, pull, merge, rebase, and how to fix merge conflicts.
Also, most software dev teams use some version of Scrum to structure their projects scheduling. Learn the basics of Scrum (sprints, meetings, stories, story points) through YouTube and other online resources.
Those 2 things are really important for working in a team and will get you started on the right foot.
1
u/Oswald_Hydrabot Feb 28 '21
Be prepared to update a bunch of 2 to 3. It's not a common thing but not out of the question.
1
1
u/ImaJimmy Feb 28 '21
You're what I want to be in a year or two haha, a mechanical that pivoted towards machine learning.
1
u/hawridger Feb 28 '21
If you haven’t read them yet, a couple of useful books to consider:
The First 90 Days by Michael Watkins
The Complete Software Developer’s Career Guide by John Sonmez
1
u/driscollis Feb 28 '21
Your employer should provide you a mentor. Or even someone to pair program with.
Don't be afraid to ask questions. You should definitely try to figure things out on your isn't, but you should time box it
For example, try to figure it out for a couple of hours. If you just can't get anywhere, ask for help.
1
u/expressly_ephemeral Feb 28 '21
They’re probably expecting you to be exactly where you are. You’re going to be drinking from the firehose for a bit. Learn whatever the DevOps stack is ASAP, ask questions if you’re not sure what’s to do.
1
Feb 28 '21
If you want to save you from redesigning everything every half a year, have a look at the patterns provided by https://refactoring.guru/design-patterns/catalog
There is probably no need to internalize every single one of them. But the creational patterns are worth a read.
And they provide a decent idea of how good code should look like.
1
Feb 28 '21
Use debugger instead of print statements
2
u/Chaimaeradon Feb 28 '21
Yes, also, if your code base is using Python 3.7 or newer, make use of PDB (the built-in Python debugger) by placing "breakpoint()" in your code.
0
0
181
u/supertaste_ Feb 28 '21
I'm always nervous that I'll learn python good, get a job, and then I have no idea how to apply my knowledge to what they want from me or I don't understand what they want me to do. That's what I fear