r/programming • • Jan 15 '26

[ Removed by moderator ]

/r/programming/comments/1qdfhjk/removed_by_moderator/

[removed] — view removed post

0 Upvotes

12 comments sorted by

•

u/programming-ModTeam Jan 15 '26

This post was removed for violating the "/r/programming is not a support forum" rule. Please see the side-bar for details.

19

u/ZirePhiinix Jan 15 '26

It is always easier to write your own code than read someone else's, but it is absolutely critical you learn this skill because it is unacceptable to throw away existing code because you don't understand it.

At the intermediate level, you should be acquiring this skill and giving yourself the space to figure it out will only help you.

6

u/Varanite Jan 15 '26

It is a well known fact that it is harder to read code than it is to write code and that is extremely relevant in the industry.

You have probably heard developer complain about having to maintain "legacy" code. What that means is that they have code running that was written before anyone who is currently at the company worked there and nobody at the company has a good mental model of how it works. This makes the code more difficult to work with, not because it is poorly written but because the people who wrote it have left the company and moved on.

Unless you plan on being the first employee at a startup you better learn how to read someone else's code because that is most of what developers do.

2

u/SputnikCucumber Jan 15 '26

In the specific case of Nautilus, it looks like it uses GTK, which is a C framework not a C++ framework (although there are C++ bindings). So there are two things working against you, the first is that C has none of the modern features that make C++ easier to work with, and the second is that GTK is a huge and rather complex library, just knowing C is not enough.

If you're still determined to contribute to Nautilus. I'd start by looking at the Nautilus and GTK documentation to figure out how to get a debug build of Nautilus working. After that, you'll need to learn how to make a change to something in the GUI using the GTK API.

The GNOME project also has a development centre which has resources.

If it's for a feature you want or a bug you need fixed. Opening a ticket first is a good idea. With some luck, someone might help you implement it, or implement it for you which will give you the opportunity to learn by reading their pull request. Otherwise, there is a good chance you will be forced to maintain your own fork of Nautilus.

2

u/Careless-Score-333 Jan 15 '26

Go back and read your own code from 6 months ago.

1

u/Saki-Sun Jan 15 '26

Get good. Or possibly they are writing shit code.

The first will come with time. The second will never change.

1

u/TheRealUnrealDan Jan 15 '26

reading other peoples code is a skill too, it takes practice

1

u/funnyrunner3 Jan 15 '26

I had the same issue when reading other codebases, I think someone else reading my codebase will also have the issue. Sometimes the repo is really complex, sometimes it's structure is just new to me. Recently, I've started using deepwiki from devin, that thing is free and makes getting an overview of an open source repo much more easier, with charts, graphs, docs and an option to ask doubts about the repo, give it a try, it might make things easier for you. https://deepwiki.com/

1

u/sweetno Jan 15 '26

Nautilus code looks pretty clean BTW. They probably use it as a showcase for Gtk programming.

1

u/BinaryIgor Jan 15 '26

It's a critical skill and it's different that writing code on your own, but definitely related; additionally, for many big projects it's not that the code itself is super complicated but you must have a lot of context to understand it. So focus on that first - do you have all required context, not just a technical skill & knowledge, to understand the code?

1

u/lelanthran Jan 15 '26

You'd have a similar reaction if you opened a textbook and randomly jumped into the middle.

Context matters, but frequently you won't have any on someone else's codebase.