News for hackers. Stuff that matters.

HN how do I learn to code?

I was recently dismissed from my uni where I was planning on studying compsci (mostly had to do with my very bad grades from the semester I tried to major in mechanical engineering but I degress). My hope is to contribute to the FOSS ecosystem as a developer, but as it stands I have very little experience programming. I feel I have a rather strong conceptual understanding of how computers work, but I still don't know how to talk to them. As school is no longer an option, I am unsure how to proceed. I currently am hoping to learn c and to use it to write a utility for managing multiple ttys with simultaneously different DEs and WMs on a linux system but I feel this project is too ambitious for my novice self. Are there any projects or advice y'all have, any would be greatly appreciated. Anyway regardless I hope you are doing well :)
( 11 comments | 2 points | on HN )
Re:HN how do I learn to code? by pabs3 on Saturday January 06, 2024 @03:35AM (#38889674)
Pick a FOSS project that you use, check out its source code, fix a problem that affects you and contribute the fix back to the project.

After doing that for a while, check out the internships and bounties sections of the FOSSjobs wiki for opportunities to get paid for contributing to FOSS.

https://github.com/fossjobs/fossjobs/wiki/resources https://www.fossjobs.net/

Re:HN how do I learn to code? by Void_Kitty on Saturday January 06, 2024 @11:00AM (#38892473)
Thanks, I will definitely do that
Re:HN how do I learn to code? by Baldbvrhunter on Saturday January 06, 2024 @03:30AM (#38889654)
start doing
Re:HN how do I learn to code? by beardyw on Saturday January 06, 2024 @06:19AM (#38890478)
Yes, building something is key. But you would do better to build something easy well than something complex and fail.
Re:HN how do I learn to code? by Void_Kitty on Saturday January 06, 2024 @10:59AM (#38892469)
Any recommendations for a easy project?
Re:HN how do I learn to code? by az09mugen on Saturday January 06, 2024 @02:49PM (#38894714)
From personal experience, start with something small (max a few 100s lines) but that can improve your everyday life (work or personal) so you can stick to it. Identify your need, think what functionality could solve it, then decompose the solution and read some doc.
Re:HN how do I learn to code? by Void_Kitty on Saturday January 06, 2024 @03:03PM (#38894852)
Awesome thx
Re:HN how do I learn to code? by brudgers on Saturday January 06, 2024 @02:52PM (#38894747)
My hope is to contribute to the FOSS ecosystem as a developer

This is too vague to be worthwhile as a course of action.

write a utility for managing multiple ttys with simultaneously different DEs and WMs on a linux system

This is a concrete goal.

I currently am hoping to learn c and to use it to

This is an excuse for not executing on the concrete goal.

Start writing the tool in Javascript, C#, Python, Racket whatever is easiest to execute in...and they are each and all hard because programming is hard.

Because starting to write code is how you learn to write code.

And the simplest way to contribute to a FOSS project is to write some code yourself and make it FOSS.

Good luck.

Re:HN how do I learn to code? by shrimp_emoji on Saturday January 06, 2024 @02:52PM (#38894753)
I would start with Python (or maybe Java) and then graduate to C. And, if you ever mess with C++, don't let it fool you that it's an easy/beginner language; it's actually the hardest and deepest language of them all, masquerading as a shallow pond. ;p
Re:HN how do I learn to code? by sn9 on Saturday January 06, 2024 @07:23PM (#38897031)
HtDP [0], CS50x [1], and whatever strikes your interest from teachyourselfcs [2], in that order.

Also highly recommend the book for nand2Tetris after CS50.

[0] https://htdp.org/2023-8-14/Book/index.html

[1] https://www.edx.org/learn/computer-science/harvard-universit...

[2] https://teachyourselfcs.com/

Re:HN how do I learn to code? by Void_Kitty on Saturday January 06, 2024 @10:04PM (#38898023)
Thank ya, imma do dat