the one thing id add to every CS curriculum is a semester of maintaining someone else's code
Posted by Motor_Ordinary336@reddit | learnprogramming | View on Reddit | 59 comments
we've had a few new grads join in the last year and i keep watching them hit the same wall around month 3. they can build things from scratch just fine. what they cant do, at least not without struggle, is open a 5 year old codebase with 12 contributors who all named things differently and figure out where to make a one-line change
and like, that is the job. for most engineers at most companies, building something new is maybe 20% of the work. the rest is reading code other people wrote, figuring out why a function does something that doesnt make sense (it made sense in 2021), tracking down which of the 4 helper functions named almost the same thing is the one actually used in production
every CS class i remember had you writing things from zero. clean slate, fresh repo. all good exercises but they teach one half of the job and not even the bigger half
what would actually help is a class where on day 1 the professor hands you a github repo someone wrote 3 years ago, inconsistent naming, partial test coverage, a few comments that contradict the actual behavior. your job for the semester is to add a feature, fix a bug, write better tests. thats it.
not a dunk on new grads, theyre often sharper than i was. its more that we set them up to feel competent in school and then drop them into something that requires a totally different skill nobody taught them. takes most of them 6-12 months to build it, which is rough on them and on the team
every senior i know has this same observation and we all kind of shrug. but if i could change one thing about the curriculum it would be that
Suspicious_Coat3244@reddit
Honestly this is probably one of the most accurate takes about software engineering education.
Writing code from scratch and maintaining existing systems are almost completely different skills. In school you usually optimize for “can the student build this correctly?” but real jobs are more like “can the engineer safely modify this giant messy thing without breaking production?”
A lot of engineering skill is really:
And yeah, the “why does this function exist?” moments are constant in older codebases.
I think a class built around maintaining a deliberately messy repo would honestly prepare people better than half the theoretical assignments I remember doing.
mizukagedrac@reddit
Funny enough, one of my courses at my university was Software Engineering and rather than different projects for each project, it was the same project for all of them. The caveat? Every 3 weeks, you change teams and you take the codebase from one of the 4 team members and add on from there there. The project itself was a Frankenstein of a project where the TAs would choose one of the projects and it would become the basis for next semester's Software Engineering course. I.e. one semester, they implemented an authenticated login system and database with RBAC roles and the like. Next semester would build on top of that and make a patient and provider sided portals with forms to fill out, etc.
Comments were chaotic, the codebase even more chaotic, but it helped us learn how to join in the "middle" of a project, read and adapt it, as well as improve legacy code.
kennedy_gitahi@reddit
That sounds both horrible and helpful at the same time.
I am sure at the start the code was messy, but toward the end of the semester it was mostly fine, no?
mizukagedrac@reddit
Nope, not necessarily, since you'd swap teams partway through and inherited (based on a vote) one of the new team members project.
kennedy_gitahi@reddit
Makes sense.
What I meant was, the code would be messy at the start because it was written by students just starting out and would get better as they also got better at software engineering and coding.
Like, their code would improve as the semester progressed as they applied what they were learning to the projects.
mizukagedrac@reddit
Oh definitely, also as folks learned from each other, skills improved quickly. The "learning" period got shorter as we iimproved at reading and understanding code that others wrote. Additionally, it was our first introduction to using industry tools ourselves i.e. writing CICD pipelines with Groovy in Jenkins, it was most people's first time writing frontend code and used AnguarJS and Thymeleaf (albiet incorrectly which I brought up to the TA/prod), testing it with Cucumber and Selenium, and writing the backend using Springboot and actually using REST APIs.
Strange-Health626@reddit
NC State?
mizukagedrac@reddit
Another iTrust victim?
Strange-Health626@reddit
Not yet. I’m a current student, and I haven’t took the course yet
mizukagedrac@reddit
Ah so a prospective victim of iTrust, if they're still using that project.
TheEvilBlight@reddit
Ooh, terrible
Mesmoiron@reddit
The funny thing is; because I am bad at programming myself; I set out to structure code accordingly. It must be annotated with intent.
See it like this; we didn't learn to read to spend hours going over the letter of the tax administration; when we learn to read comprehension is taught and structured.
Code must be read like that. We optimaze for machines; but not for maintainers? If we want a smooth society without hidden glitches; we need more people evaluating code. That means more lines that assist them.
Since in my project students write the code; but the code at some time must be audited; I made the decision that all code must explain itself. The beauty about that is, that it catches wrong earlier and it cements best practices. Your choice is your craft and you must be capable of explaining that to a newbie.
We don't have a senior developer helping out yet; in the meantime that means I have to learn how to think like one. That means asking why is mandatory.
Content-Mark-8467@reddit
100% this. The gap between "build a todo app" and "figure out why Karen's 2019 commit is breaking prod" is enormous and nobody prepares you for it.
lurgi@reddit
In my OS class many, many years ago, we were given a simple OS and had to add features to it. The code was well-written and well-commented, and it was still a challenge.
Firered_Productions@reddit
seems like the one I will take as well.
TheSoloGamer@reddit
"Open-Source fundamentals" simply sicc these students on an open source project. Plenty of real-world bugs to find and solve, as well as real-world shit codebases to refactor and fix. If you can't get a small PR in by the end of the semester, then you likely need to learn more.
Limp-Confidence5612@reddit
Please don't punish open source project maintainers. They are not paid to educate you...
Limp-Confidence5612@reddit
Is college supposed to prepare you for jobs? I thought it is supposed to help you grow as a person, learn to learn, build a network, give you perspective.
Let companies that use these methods deal with the schooling of their employees.
mandzeete@reddit
Fortunately where I did my Bachelor studies, quite many of my course mates and me were introduced to existing codebase. As part of our Bachelor thesis project. We had to work on different large projects that already existed, and for us it was to implement some microservice to it, refactor the code, rewrite it in a different programming language, or something. Depending on the project and depending on the goal.
I was given a desktop application written in Visual Basic. A language I never had touched before. It was one old program written for one chemistry lab device (for our faculty of natural sciences). Professors who worked with said application had all kinds of complaints. So, my thesis was about coming up with a suitable tech stack for the project, rewriting the application and adding an Internet support to it (turning a desktop application to a web application). I had to read the code of the application itself and also the code sitting inside the chemistry lab device (capillary electrophoresis device) to understand what I must implement in my project.
So, when I was hired as a junior developer, I already had some ideas about how to work with existing codebase.
donghit@reddit
What does this have to do with a CS program?
mandzeete@reddit
Did you read what he wrote? His point is that students are not taught to work with existing codebase. There can be a Project Management class or something like this where one of the things students learn is working with existing codebase, making changes to it, etc.
Careful_Associate114@reddit
this is so true. reading unfamiliar code, figuring out the intent behind weird decisions, not breaking stuff that already works — that's like 80% of the job. school projects are always greenfield which is almost the opposite of real work
leftovercarcass@reddit
Operating system concepts, Pintos. There you go, easy enough for a semester, offered at Stanford and it covers the fundamentals every programmer should know.
ObligationUnlikely42@reddit
neat. what's the next step you're considering?
Effective_Promise581@reddit
This is so true.
quietcodelife@reddit
the specific skill gap isnt reading code, its reading intent. you can train yourself to trace what code does in a few weeks. figuring out why it was written that way - what constraint no longer exists, what edge case scared someone in 2019 - thats what takes months and its usually not in the code at all. its in someones memory or a slack thread or just gone.
Formal_Wolverine_674@reddit
Honestly learning how to read and safely modify messy existing codebases is probably more runable for real jobs than half the toy projects in CS courses
Initial-Process-2875@reddit
Yeah—and what they don't tell you is it's not just reading code, it's reading bad code in styles nobody taught you. Textbook examples don't prepare you for 500-line functions, wildly inconsistent naming, and code that "works but nobody knows why anymore."
dialsoapbox@reddit
In one of my community college classes we did review other's code (both our classmates and from a more senior class) and have to give an explanation of what we thought was going on.
I don't remember what the task was, but it was to show how code differed as you gain more experience. It was to show how copying code from github/stack overflow wouldn't always be the most helpful, especially if you don't understand what's going on, or something like that.
AlternativeHistorian@reddit
Isn't this just what internships are for? Do people not do internships anymore?
I don't think it's worth dedicating classroom time to this.
This is the kind of experience students already get from internships and it's typically better than a classroom experience as any decent company will assign each intern a senior or mid-level engineer as a mentor to help them on their way.
Do you not look for past internship experience when hiring new grads?
crawlpatterns@reddit
this is honestly one of the most accurate takes abt software engineering ive read here in a while. i remember feeling super confident after uni projects then opening a real production repo and suddenly not even knowing where to start lol. half the job is basically detective work and trying not to break some random thing tied to a helper function from 2019. a class built around maintaining messy legacy code would probly prepare students way better than another “build a calculator app from scratch” assignment
Express-Channel-1686@reddit
hard agree. first job felt like learning to read all over again. nothing in school prepared me for tracing why a function existed or why someone wrote it that specific weird way 4 years ago.
keldren@reddit
I had a very interesting class. We received a codebase for a personal organizer style application. It had a calendar tab, a memo section, an address book...I forget what else. Then we got our assignment: We had to turn it into gym scheduling software. It required digging in, understanding what was doing what, and then modify to create the new features. We weren't given much time so it was pretty important to use the existing code and just modify.
I hated and loved it at the same time.
Glad_Appearance_8190@reddit
Honestly debugging intent is harder than writing code. Half the job is figuring out why something exists before touching it and hoping no hidden workflow breaks.
augustcero@reddit
YES! sorry for tha exclamation lol. we were just talking about this literally a few days ago.
for context, i have some friends who work in a library and they get undergrads as part of their immersion course. idk if theyre just lazy but what they did was develop the library's ILS and students maintain it. occasionally they "break" the system and ask the students to troubleshoot them. not sure how its going and at first i thought they were being lazy but it sounded pretty neat and a great learning experience for the students overall
nog642@reddit
Bachelors degrees are not trade school, some job skills are picked up on the job / in internships, and this is one of them. That class would be very boring and hard to do well and that time could be better spent on other things.
cobalt8@reddit
I disagree. I had a class that was like this. The code base was added to every semester. We were first put in pairs for two weeks and given bugs to fix. Then we were out in different pairs and given more bugs. After that we were placed in bigger teams and had to implement new features. It was very helpful. The code was awful, but that made it more realistic.
mizukagedrac@reddit
Same I had a similar course.
cobalt8@reddit
I definitely was! That code base was a nightmare, but it made me appreciate the ones I've seen on the job ever since.
mizukagedrac@reddit
😂 a fellow Wolfpack in the wild. I was so annoyed at the way Kai wrote the front end starter and the way other people built on top of it that I ended up almost rewriting the entire front end to use the AngularJS and Thyme lead packages properly. I would've rewrote it in Angular or React but that probably would've been too far.
themegainferno@reddit
I think this is a misunderstanding that everybody has. College does not equal the workplace, nor does it necessarily prepare you for the workplace or even supposed to do that. College is where are supposed to learn, the workplaces where you make a business money. two completely different things
SwigOfRavioli349@reddit
I think instead, teach industry tools that are relevant. Also, allow for tracks.
Adventurous-Hour9827@reddit
esto es tan real. hay una diferencia enorme entre construir algo desde cero y meterte a un proyecto que ya existe. lo segundo requiere humildad, paciencia y un tipo de lectura que nadie te enseña formalmente
yo aprendí más intentando entender mi propio código de hace 6 meses que siguiendo cualquier tutorial. si ya tu propio código de hace poco te parece confuso, imagínate el de otra persona de hace 3 años sin documentación jaja
la idea del repo heredado como ejercicio de clase es brillante, ojalá existiera algo así
XlSolver@reddit
Tbh I struggle with this so hell yeah
DanteWolfsong@reddit
I agree somewhat-- I just don't know if college is the best place for it. Maybe like, a course that's based around strategies for reading existing code, and the big project for that course is creating a fork of some GitHub project you're interested in
my5cent@reddit
If not college then that's on the job.
STEM_Dad9528@reddit
It should be a rolling thing.
mizukagedrac@reddit
My university did this for one of the projects. But you not only had to work with the previous semester's work, during the semester, you swapped teams every 2-3 weeks and you have to choose which of the variations of the project you're keeping amongst your new team members.
Astronaut6735@reddit
It's more of a software engineering topic than a computer science topic, although my university's CS curriculum did offer an elective software engineering course. It could be a Software Engineering II course.
MisterGerry@reddit
Universities are not trade schools.
People treat them like that and it is why they are mad when they can't find a job after getting a degree.
Ok_Distance5305@reddit
This is not really what school is for. And you can’t just add something without dropping something else.
This should come from experience. And I would look in the mirror. This situation is very intimidating. You should make time for questions, getting them setup, and showing how you work on a complex system.
azz_kikkr@reddit
MIT had the same idea, and acknowledged it via a "missing semester"
https://missing.csail.mit.edu/
dariusbiggs@reddit
So what you are saying is that they need to work with the Asterisk source code and add a new feature.
And after that you get them to look into the documentation of FreeSWITCH and ask them to identify if the documentation is factual and correct for half a dozen random features for a specific version of FreeSWITCH.
After that you get them to look into the aource code of
gsutiland ask them to rename a variable from Portuguese to English. (The code is in two languages mixing English and Portuguese at the same time).You can also ask them to look into code 5hat has its documentation in Engrish (poor and frequently incorrect translations into English from the developers native language).
And to add a DevOps bend to it. we can go back to FreeSWITCH and identify which of the many Dockerfiles in the repository is the correct one to build a functional container.
WheatedMash@reddit
Hmmm, I might have to think about how I can incorporate a bit of that right in my first year HS courses.
pat_trick@reddit
We did do that a bit in my software engineering class. You had to write a small bit of code, then someone else had to read it, understand it, and add a feature via a git commit. It's only a small glimpse and it's hard to do larger projects in a single semester, but it at least got folks used to the idea.
Crusty-Booger@reddit
It's an excellent idea to be honest,
Managing upwards would also be a good one to teach them, the ability to convey the reason why something needs doing in a management friendly term and why it will benefit the company
xian0@reddit
My course had some courseworks which were based on a professors code which we would then have to fix and extend. eg. if you're studying HCI you might want to set up an experiment with two different UIs but you only have a base application to start with.
high_throughput@reddit
I've wanted a similar exercise: make the same bugfix in two different codebases, one good and one bad.
Memorizing a list of ways to make code more readable to pass an exam does not have the same effect as experiencing what a bad codebase feels like and how annoying it is to work with.
AndrewBorg1126@reddit
Maintaining someone else's code and making ones own code maintainable by others, while a useful skill, is not directly relevant to the theory of computing.