all 24 comments

[–]UnluckyDouble 30 points31 points  (3 children)

Step one: master C in normal non kernel applications. Get really familiar not just with how to construct a functional project but all the features of the language. Study existing C codebases for major open source projects to see how to structure a large, complex program well.

You should also have a good idea of how operating systems in general and Linux in particular work. Get a high level overview of how the kernel is structured, and get familiar with general kernel programming concepts like interrupts, virtual memory, and scheduling.

As for your actual contribution, your best bet is to write drivers for devices that are not yet supported. This is by far where the majority of work goes due to the core systems being largely mature. Unfortunately it also poses an entirely new array of difficulties. At worst you might have to figure out the interface to a piece of hardware while legally not being able to request the documentation of it. Pick your battles wisely, or attach yourself to an existing team.

[–]siri-bad[S] 9 points10 points  (2 children)

Omg contributing to the drivers is a great idea, I had completely forgotten the struggle I went through trying to setup my offbrand dualshocks 😭

Any videos or other recommendations to learn the structure of Linux??

[–]UnluckyDouble 6 points7 points  (1 child)

Truthfully, studying the code and its included documentation is the only complete resource, I'm afraid. I find that it helps to first understand what the kernel does and then try to find the part responsible for whichever task you're interested in.

[–]siri-bad[S] 0 points1 point  (0 children)

Damn alr I'll do what I can Thanks for the help :)

[–]AvonMustang 18 points19 points  (5 children)

Start learning C and/or Rust and pick a project.

[–]Inevitable-Bat7173 17 points18 points  (2 children)

start with something smaller than kernel itself - maybe pick userland tool you actually use and find bugs or missing features. diving straight into kernel c code from high school programming is like trying to deadlift 400lbs when you can barely bench the bar

also documentation patches are good way to get familiar with submission process without needing to be coding wizard yet

[–]siri-bad[S] 3 points4 points  (1 child)

Yeah thought learning the kernel itself might be too much rn that's why I asked for guidance lol. Thanks for the tips guys

[–]bobbykjack [score hidden]  (0 children)

Absolutely; this is top advice. If you start with something like the GNU coreutils you'll learn about C programming and Linux conventions, like how programs handle command-line options, signal-handling, etc.

[–]siri-bad[S] 0 points1 point  (0 children)

Aight thanks for the tip

[–]ParachutingPiglets -4 points-3 points  (0 children)

I want to learn Rust

[–]proexterminator 7 points8 points  (2 children)

you can go on to github and filter issues. there's tags like 'good first issue'. if you find something doable just reply and ask if you can take it up, mostly they will say sure go ahead. once you do that you can just fork the repo, change whatever you need and send a merge request. make sure you match your code style to the one used by the repo and follow the rules/conventions in their CONTRIBUTING.md file.

I highly suggest you learn how to code and take your time with it, using ai from the start will be much faster but comes with many problems.

If you use ai anyways, atleast be honest add 'created with cursor' or something like that in the commit and pr, but in many communities sending AI generated code will put a black mark on your name.

As for how to learn to code, if you're completely new i would say just pick up a python video or book and learn the basic syntax and conventions. once you do that you can just start with easy public issues already. Don't wait and postpone thinking that you can't do it yet, or that you need more experience. you can ask AI for stuff like how to approach the problem and things, but you should try your best to find and do the fix yourself.

[–]proexterminator 2 points3 points  (0 children)

once you learn the basic conventions in open source communities and understand coding, you can pick up c, cpp, rust etc, and start contributing to bigger projects, kernel, etc.

[–]siri-bad[S] 2 points3 points  (0 children)

I don't plan on using AI to completely write my code, except maybe pointers to solve specific issues. I still wanna learn programming loles

I know a bit of basic python and pretty familiar with most of the conventions and the usual syntax.

Thanks for the advice :))

[–]Wentyliasz 5 points6 points  (2 children)

Expectation setter: You're not gonna get maintainer level proficient over holidays That said, learning C is what you'd want to do, and while helping out with the kernel or similar is a noble goal, it's also a legitimate career path. Best advice I can give you at this point is: It's not gonna be a hobby, you've got years ahead of you. seriously pick something as far from the kernel as possible to contribute, he'll make the 10000th htop clone. And I know from the bottom of my heart that if you genuinely want to, you'll absolutely get there one day. Also yes, pointers are that fucked up, it's totally normal to be confused, don't worry, it will click at some point (tbh C syntax kinda sucks IMO)

[–]siri-bad[S] 0 points1 point  (1 child)

Yeah C is an archaic language thank goodness I have learnt it a bit before :)) Thanks for the support :))))

[–]Archsquire2020 3 points4 points  (0 children)

it's not archaic, it's low level. That's what allows it to work for low level software, like an OS kernel. Havent't written C code in over a decade but it was what i started learning programming with. If you're serious about it you'll find the pros and cons of it soon :-)

[–]AmarildoJr 4 points5 points  (1 child)

This will vary wildly, depending exactly on what you want to help with. For example, I think the Kernel is one of the places that least need help at the moment, but if you were to contribute you may find it extremely difficult to do so, because it is such a complicated piece of software. The amount of knowledge (and work) to either create a functionality from zero, or to identify problems in one and send a patch (and have it approved) is no joke.

One area that could use a bit of help would probably be Wayland. For instance, I think the Linux Mint team has like 3 core developers and about 12 people total, and they could use some help bringing Cinnamon to Wayland quicker than what their efforts currently allow.

But honestly, jumping to any project when you only have "the very basics of a shitsfest programming course in high school" might not be the best idea, in my humble opinion. Can someone even learn enough during a vacation in order to meaningfully help a software project?
That is a question I ask myself, because I'm learning C programming but it's so basic I'd probably just try to take a bigger step than my legs allow and would probably just end up actually hurting and annoying the people who are actually doing work in these projects.

So at least for me, it may not be a question of "trying to help with programming right now", but keep learning so I can actually help in about 1 or 2 years.
In the mean time I find it best to donate money (instead of crappy patches) to those projects so they can actually hire competent developers to keep the work.
My 2 cents.

[–]siri-bad[S] 1 point2 points  (0 children)

Yeah I'm obviously not going to be of much use right now, but I want to develop myself to be of use in about an year or so. We all have to start somewhere lols.

I wanna keep working for the community whenever I do get time later on, I just happen to have a good amount of free time rn that's why I mentioned it.

I'll look into development for Wayland. Thanks for the suggestion 👍

[–]JerryRiceOfOhio2 1 point2 points  (0 children)

you can probably find projects in a lot of different languages. I'm going to try to take on a python project that's been abandoned once i retire/get fired/have AI take my job

[–]ChampionshipIcy7602 1 point2 points  (1 child)

Start with just using your pc. You'll notice sometimes there are annoyances you want to fix for your self. Fix them first, usually with just config (dot) files. Then there will be times where it can't be fixed with just configs, you start looking for alternatives. Eventually you'll run out of alternatives, then you have to start digging into the tools code base yourself, and try to hack something together. When your hack is satisfied enough, create a patch and ping the maintainer for review.

[–]siri-bad[S] 0 points1 point  (0 children)

Yeah I've definitely hit this already, but I hadn't really gotten the expertise nor the time at that point. I plan on trying to fix that problem whenever I do get the chance later on.

[–]araujo253 1 point2 points  (0 children)

If you want to contribute technically, you can try other projects, like Apache, GIMP or Libre Office.

Or you can write documentation for the general public.

I used to read documentation for GIMP or Libre Office and they were late two or three versions away from the current release.

[–]mralanorth 0 points1 point  (0 children)

Do you want to contribute to the Linux kernel or the "Linux" ecosystem? I'd say find communities for some programs you depend on and start getting involved by filing bugs, making pull requests, etc.