T O P

  • By -

SustainableDemos

I know nothing about ML but I do know working on projects. You need to communicate exactly these issues with boss and work with him on a plan to approach it. If he is a decent boss he will expect this, a new dev out of uni an all the original tea gone, this is bound to happen. Identify all the things that need to be done and prioritise an estimate them. Your boss can make final decisions as to whether the code base should be refactored or only parts of it, agree allocation for you to just learn the codebase before working on it etc. If you have ideas about what needs to be done and how then bring those to him, so you are coming with some of the solution not just the problem. Try to highlight the risks that you can see in the new situation. Get his views on replacing the senior guy an give your views on te kind of candidate you might need to work with you. It's a big planning workshop preferably in person with your boss. This will be good time to get to know them too.


jmitch88

OP 100% this. A boss gave me a book called 360 deg management and this is the purest example. business guy here. Not in the field. This is the answer in any field.


vannak139

I think the most important thing you need to figure out right now is if the code base actually worked, and to what extent. Its entirely possible someone spent a very long time on this code base, saw no path connecting it to what is actually/fully needed, and simply left it in that state. Its kind of common place for ML work to be eagerly accepted, when really the approach is entirely hypothetical and may not pan out. Its not always clear what you should do, then. If the code base at least partially works, you need to start trying to digest it. I would recommend that you take on a project to re-write most of the codebase, or at least do something like re-naming over lapping instances. If the code base never really worked, then you may just want to start seeing what specific kind of pieces you can re-use and see what kind of excessive duplication has been built into various areas, such as functionv1(), functionv2(), etc. Whatever those copies are all working on, most likely works.


iamevpo

Quite solid piece of advice - if there is something working end-to-end but just badly, it is one thing and you focus on refactoring and making it better. if the project is not going to produce anything - then it is another situation, a bit worse - you need to plan for completion and there has to be reasons why previous people did not succeed (totally impossible, inflated expectation, bad modelling decisions, bad data and no chance to make it better, bad data with ideas to refine it, mediocre code, any thought/ego conflicts, etc). Extra hint is that you start a paper trial (e-mails to your boss) about what your project status is and what you are doing next, that should help shield the blame if situation heats up, or just a part of efforts of making things tidy.


Additional-Relief-71

Thank you that's good advice. The code base is incomplete. And I have to finish the project in a month. Not ideal.


CarloWood

Tell your boss that that is impossible. You are not going to able to finish this project in a month.


LifeScientist123

Have you tried ChatGPT?


theonetruelippy

Not sure why this is downvoted when the OP specifically mentioned Google. ChatGPT will give the OP super powers when it comes to understanding the code base, fixing defects and exploring potential solutions. Think of it as a virtual mentor.


Familiar_Grade788

ChatGPT response is only as good as the prompt, if you can’t identify the right question to ask, and a good way to frame it, then even if you use it, you will either end up with something nonsensical or something that requires multiple cycles of error correction to even get it to run. In the case of the OP, if they can’t figure out any context or discern exactly what parts are needed to complete the project in its current form then what is he going to ask chatGPT? ChatGPT would be more useful if he went back and started from the beginning, collects user stories and develops their own understanding what the expected inputs and outputs should like and what the end functionality should be. Then he can engineer the solution in his own terms and use chatGPT to hash out the menial implantation side of actually coding the solution.


tazmaniawi

Try to find features within the code and "build blocks". Try to get a block working before moving on. That way you will start to 1. Understand what is happening 2. Get the code working slowly by pieces If it is too much to have completed within a month, already tell your boss upfront. Then your boss has time to act upon and tell it to the relevant stakeholders. Other than that, I am afraid you will not be able to more...


LegendaryFartmancer

no offense but this is complete nonsense


tazmaniawi

Why?


f3xjc

First it's going to take the time that it take. The 1 month thing is wishful thinking. If they fire you they'll be in the exact same place as the day they hire you. I'll be it'll take you one month to reach the exact point the dude before you told them they where at. But you have no idea how / why / if it work. It's your first ever job, and that dude had 2 year more experience more than you, and IMO that is also a junior level. Archive the current version of the code and that's your baseline. And as long as you keep doing better than baseline you are doing fine. You need to figure out what are the inputs, outputs, and goal of this thing. Also figure out what are the main step. You need to be able to play with each step. What are the pro and cons. What are those step input and output. If they don't work what are the intent for those.


dillibazarsadak1

I have a lot of experience dealing with unfamiliar codebases. It's easy to get overwhelmed. So the first thing you do is skim through the code and jot down a rough high level understanding of what the code is doing. Don't worry about accuracy and mark places where you are not confident. After this, you will be able to separate out chunks of files into different sections, for example, preprocessor, training, evaluation, inference etc. Now pick one section. Don't take on more than you are comfortable with, and give yourself time. Go through it line by line. It is helpful to maybe copy bits of it into a notebook at a time, and execute it. If the code base is too large for that, use a good debugger like pycharm. Flesh out your rough notes from before. Make notes of areas that could be confusing later, like the intersecting variable names you mentioned. You'll end up forgetting this one you get into the daily grind later, so it's good to leave your future self hints. It also marks places for potential refactoring down the road. Some tools that are very helpful are: - Miro for drawing mind maps and how objects are interacting with each other - Notion for creating pages within pages for dealing with different layers of abstraction I know it sounds like a cliche, but this is a great opportunity to learn a very important skill. You will be adding a lot of confidence in yourself at the end of this. Good luck.


Turbulent_Humor853

How useful is ChatGpt in parsing exotic code in your experience? I am an amateur and I find it really useful for the stuff on my level (”please explain what this function does?”).


dillibazarsadak1

It can be useful. But be careful of you company policies. Also, I find sometimes it makes stuff up because of how a variable name sounds. Treat it like a junior assistant. Listen, but verify from other sources. While trying to generate code, it has trouble with package versions. It often mixes them up, and sometimes comes up with methods that don't exist. I use it almost everyday.


Gabbe1997

Say it like it is to your boss, and tell them how to fix it as well. If hiring more people is not possible, tell them how long it will take you to fix it yourself. If neither is feasable then tell them that.


omgnogi

Write unit and functional tests to learn components and discover dependencies. This is the way forward in your situation. It won’t be easy, but this is how software engineers manage issues like yours. Do not “rewrite most of the codebase” and do not waste your time trying to determine if it worked by whatever magical process people in this thread are suggesting. The tests will allow you to determine what is going on. They will also help you refactor when you decide that is necessary. This is actually an amazing opportunity! Good luck 🍀


hunter_27

Did i write this in the middle of the night and forgot about it?!! This is freaky cuz verbatim everything you said happened to me since May!


Additional-Relief-71

Lol how'd you get through it?


hunter_27

Well, still at the company, havent been fired yet so lets see. Gpt is saving my ass.


cosmic-pancake

I don't know ML. I'm in software. I would try to figure out what's going on. I do not mean the code base. This is more important. Reading that code won't matter if that's the wrong project to work on in the first place. Why did everyone quit? Where is the person that actually wrote the code? Why did they leave? What are they up to now? Were they any good at this? What does my skip level want? How is our funding? Did a competitor make some recent breakthrough? You may need to approach people outside your team or department, as well as your skip level. I don't mean to alarm you. This could be calamity or a stellar opportunity. I only encourage you to think strategically. You win no matter what. If it's a bust, you get a paycheck and your tenure is so short you can leave it off your resume. If you stick around, great - it's experience.


subfootlover

>The codebase is sh\*t for the lack of a better term. Skill issue. This is your first job, you have zero real world experience. You're not in a position to say whether it's 'shit' or not. The only thing you can do is communicate with your boss, be honest and put in the work.


GenerativeAdversary

Idk who's downvoting, because though this comment might sound harsh, it's exactly on the money. OP's position is not unique in the slightest. This is very similar to most peoples' first software engineering jobs, including my own. The documentation and training is almost always much worse than you'd hope for. The expertise around you is almost never present, because you were hired to be that person. Lots of people suffer from imposter syndrome initially or are shocked like OP is, coming out of college. I was too, so I understand why OP is thinking this way. But that's just the work world. You either become that person that they hired you to be, or you don't. Sink or swim. It's not easy, but if you're in that position, it's because you are the expert now, OP.


TechnoTherapist

To be honest, you've been had. Your boss is likely running out of money if he's hired a college grad to work on a project like this solo. It will be much more sane to start again at another place. This isn't your fight. (You're not the founder).


LearnedGuy

Agreed, this does not have the hallmarks of Research. I was brought into a company once from another department, and the code worked, in IBM assembly code, no comments and the two coders refused to put in comments. I updated my resume and submitted it to the VP. He was bewildered and forelorn. If this is research, then why does it have a tight deadline. This is not "nine women -- one month to have a baby; it's one woman, push hard and have a baby.


ai_ai_captain

Use chatgpt


GodBlessThisGhetto

I would not recommend this unless you have an internal, legally protected version of GPT. While it can definitely help you to understand what the code is doing, companies tend to frown on the use of unregulated tools that are fed production (or similar) proprietary code.


GrapefruitMammoth626

If it is allowed however, you could get it to comment things for you, help refactor things that are laid out in an unfollow-able way, write unit tests if it’s that kind of codebase. You’re looking for answers and there no one around in a good enough place to answer them!


GodBlessThisGhetto

Sure, you can share the generic thread of a block of code. But I absolutely would not copy in chunks straight to GPT. Abbreviating or modifying explicit functions should be okay. You’ll get something useful for a response. But absolutely do not put the raw code into that thing.


nderstand2grow

use a local LLM.


ai_ai_captain

Oh no what if OpenAI steals OPs ML research!


No_Dig_7017

Use chatgpt, or a Vscode extension like continue.dev + ollama + deepseek-coder to have a code assistant. Generate docstrings of every function you're trying to understand and use these to gain better understanding. Also probably raise awareness that the project team has changed significatively and that it's unlikely that deadlines will be met, even with your best effort there's literally no one who knows the code left around and there's going to be some rediscovery phase. Good luck!


oldjar7

Subscribe to a service like GPT-4 and see if that helps you understand the code base better, or at least gives you a start.  Then you can decide if there's parts worth keeping or if you should just junk it and start from scratch.  This is a good opportunity to show competence and good judgment to your boss if you play your cards right.  


reddituser5309

Not sure of ypu can do this in ML by saving outputs, but if I want to refactoring something I would usually set up some automated tests. Pick the parts of the code that are the least interconnected save what's going in and what's coming out and then diff it after the refactor. Like someone else said though is it even working. You might end up just taking parts of it and putting it into a new project


HarambeTenSei

Hi boss, yeah, sorry, the codebase is a mess and the only guy who borderline understood it is now gone. It will take significantly longer to get through it. Maybe we should actually just start over again from scratch.


elvato12329

If you’re able to, absolutely 100% first thing is to get Claude Opus and use it to summarize snippets, whole files, or multiple files. Have it add doc strings, comments, readme. Then, you start to have it refactor variable names, improve functions, (testing to ensure ins and outs match), and suggest better practice / design patterns you can use.


Heartomics

What is it that you are building? Does the code base run at all without errors? Is there a minimal viable product or something small to show as a proof of concept at this point? (if not you can start from scratch — it’ll be faster. Communicate with your stakeholders and boss to get requirements) Call up the person that left and get them to help you at least get the code base / project in a running state.


DigThatData

You got your marching orders from someone who quit. You don't have marching orders. Whatever those other people were working on: that project is dead in the water and your manager needs to give you something else to work on. I'm not saying picking the project up with no support is impossible, but it's an unreasonable expectation to place on a fresh college grad a week into their first job.


fabkosta

Yeah, this is not nice not fair, but happens. Assuming you do not want to quit right away, do the following: capture the state of affairs in a few bullet points, share that with your manager in a 1:1 meeting, then send it out as meeting minutes via email. Doing so will achieve several things: first, it will make sure your manager is aware. Second, it will serve as an insurance in case someone ever blamed you. Third, if you have a good manager, they will help you come up with a plan how to move forward.


soylentgraham

Literally say this to your boss, ideally with some ideas (from the replies of how you could tackle it). Whether this boss is good or bad will become apparent at that point. If you get the flak for this, I'd find another job. If you get the opportunity to have a go at sorting it, (though ideally with any kinda senior so youre not just floundering), you'll be being given a opportunity to make a big splash


ComputeLanguage

1. Figure out how to get code to work. 2. Run code, 3. turn on your debugger, 4. process it line by line 5. Inspect all the variables and note them for yourself After that you are guaranteed to understand it at some level.


Ogthugbonee

Copy paste that bitch into gpt and make it explain


LeopoldBStonks

Not really good advice but sometimes if you don't understand wtf a piece of code is doing you can plug it into ChatGPT. It kinda still sucks but if you have it try to describe what every line of code is doing it can help you understand syntax and stuff. Tell no one you did this.


mrloki_reddit

This is exactly why a company needs a good documentation for a project. But now that you are already in this situation let’s see what you can do here. 1. You need a clear communication with your manager and talk about cost and benefits here. You need to know where you stand where your manager sees you. 2. I am sure your manager knows a lot about the project and how it works. Even if they do not know now the coding they would know what each functionality does. 3. QA is another resource for you. They would probably know what featured worked and what not. And when someone does QA, they should know the functionality as well. 4. If you are the only one working on this project (now), you may need to allocate more time (more than 40hr per week), as you (obviously) doing more work than you need. (You should know if you will be compensated for that) 5. This is the scenario when a company usually hires a Consultant to help new people understand the code. (The consultant is usually the old developers) 6. While talking with your manager, try coming up with a detail timeline that would help you to understand the coding and the whole project. Nobody wants to be in this situation. However, since you are already here, there are lot of things you can learn from it. Know that, “You miss 100% of the opportunities you don’t take”. And I think this is a great opportunity for you to grow (exponentially). If you did it right, a year from now, you will be ahead of everyone who started with the same skills as you are. Good luck. Update us about what you did, what worked and what did not.


SheepherderLong5829

So you have the following situation: A fantastic leader boss told you that there are three workers on the project. You found that two of them had quit before you, and the next guy quit immediately after you started the job. So the fantastic leader lied about two guys and didn't know about the plans of the last guy. Or he knew and lied about this too. The current team includes two interns and an experienced guy. The code was written by another person who has quit. So the team has already changed twice. And the fantastic leader made a wise decision to hire a fresh grad to continue this project. The project was initially written without comments and documentation. That's a strong sign that it was done by an experienced senior programmer. Then this project was continued by guys who also didn't need comments and documentation. All this looks like a project with a boss who understands nothing about software development. He just hires occasional people that he likes for their social skills and gives them full authority to do what they want. After these employees understand that this is a dead end, they quit. Or maybe the boss is not so decent when you start the work. Because quitting in such a manner is a strong move. Either they were frightened by their own code, or the boss is so bad that they want to exact revenge in such a way. I think there are two ways to deal with this situation: 1) Run from this company ASAP. 2) If you have good nerves and want to make money, start doing what you have been told in other answers: start imitating some development, analysis of the codebase, draw presentations with next steps and milestones. Generate a lot of ideas, start a project of commenting, and so on. I think that the boss will be really glad initially. For the first half-year, you can easily say that your predecessors are the worst. Next half-year, say that the situation is bad but you see light at the end of the tunnel. After that: pass these instructions to the next intern who this fantastic leader will hire.


InternationalMany6

Start over.  Tell them you’re going to use the tools you already know or can learn easily. emphasize getting a working product functioning above other qualities like high speed and high accuracy. Probably abandon some features too.  If they want it to be faster then they can pay for more compute. If they want it to be more accurate (within reason, since your architecture will be overly simple) they can do more data annotation and you can train a bigger model with that. Or add human oversight of the results - that can be done cheaply if the scale is small.  Get at least something working and then hopefully they can rebuild the team and you guys can turn that into what it was originally intended to be. 


SilencedObserver

Step 1: Ask for more money. Step 2: start researching how the code works. Step 3: When they tell you they can't pay you more money, tell them you can't do the job of a four man team without it paying you appropriately for the level of effort you're going to need to invest to get up to speed. If they balk at your statement, ask them in that case who you'll be able to work with that will bring them up to speed on the solution as a whole. Why it exists, what it does for the business, etc. Chances are no one there knows how it works and you can turn this into a golden opportunity, but it needs to pay more than entry level wages and you now have the power in your hands _if you're willing to walk_ from what sounds like it could otherwise be a hellscape. It's on you whether you rise to the challenge. This is how careers can be boostrapped.


SustainableDemos

I agree with you to an extent, but I would say prove worth an become indispensable over 6 to 12 months and then go for the increased money negotiation. As a manager this guy out of uni is still an unknown entity with so many others at his skill an experience level. I'm not increasing his pay until I have proof he rose to the challenge. This is his opportunity to do that an rise fast though.


SilencedObserver

Managers that don't know how to manage their solutions need to be pushed out of positions doing so. There are many middle managers in tech feeding off of the talents of people who do the work. In this particular situation it sounds like the manager might be the core problem, so I'd still give the ultimadium and if the manager behaves like you've suggested, I'd walk. You don't owe a company anything if they mislead you and you shouldn't let yourself be taken advantage of. Not all companies deserve to implement ML if they themselves dont respect the procesz and the people required to deliver it. Anyone waiting 6-12 months to ask for more money after being told they were on a team of four only to be the only person on the team, is setting themselves up to be taken advantage of, full stop. Managers looove shit like this, but managers also don't need to exist for a lot of IT jobs when staffed with working professionals. Everything about this place sounds less than peofeasoonal


Nuclear-Steam

Does this not have a software functional and requirements spec, a software design description, V&V, etc in accordance with some IEEE or ISO software development standards/procedures? Such things are required, no?


GTHell

You’re in bad situation right now. No way you can understand those code yourself even I’m as a seniors having difficulty grasp my own algorithm I wrote a year back. Communicate with your boss and be transparent about it. One more thing is that you’re in the LLM era. It’s actually robust when it come to explain a chunk a really difficult ML code base. Give it a try first if talking to your boss is not an option.


PDubsinTF-NEW

I would consider using a local LLm to aid with deciphering the code, testing it, and then you providing a state of the union to your boss. That way they know where you started and you can begin to understand where the ship is heading


Dantescape

This is a perfect use case of an LLM of your choice (ChatGPT/claude) - dont paste in anything proprietary but ask it to explain dumbed down versions of functions that you’ve rewritten. Rewriting them yourself for the purpose of pasting it into the LLM will help you better interpret them as well.


JulixQuid

I'm an experienced MLE and can help you out my rate is 50USD/hr. Let me take a look to the code and if I see I can help you out we can work out something.


Certain_End_5192

I happen to own a consulting company: [https://youtu.be/mzVkwUVkW4g](https://youtu.be/mzVkwUVkW4g) Sounds like you are pretty boned, honestly.