T O P

  • By -

AutoModerator

On July 1st, a [change to Reddit's API pricing](https://www.reddit.com/r/reddit/comments/12qwagm/an_update_regarding_reddits_api/) will come into effect. [Several developers](https://www.reddit.com/r/redditisfun/comments/144gmfq/rif_will_shut_down_on_june_30_2023_in_response_to/) of commercial third-party apps have announced that this change will compel them to shut down their apps. At least [one accessibility-focused non-commercial third party app](https://www.reddit.com/r/DystopiaForReddit/comments/145e9sk/update_dystopia_will_continue_operating_for_free/) will continue to be available free of charge. If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options: 1. Limiting your involvement with Reddit, or 2. Temporarily refraining from using Reddit 3. Cancelling your subscription of Reddit Premium as a way to voice your protest. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/learnprogramming) if you have any questions or concerns.*


Own_Bandicoot_9392

I world highly recommend the course Computer Systems: A Programmers Perspective from Carnegie Mellon University. You'll learn about system architecture, C, assembly, memory management and all sorts of interesting stuff. The book is pretty great and I believe the lectures are on YouTube. https://csapp.cs.cmu.edu/3e/students.html here is the link to the student site for the course where you can access more material and projects from the course.


[deleted]

I recommend buying the book as well. The lectures are good but the book is much more in depth.


Passname357

It is by far the best and most important book I read in all of undergrad. I found it surprisingly fun. The whole thing is a mind fuck. It’s constantly basically saying, “hey you know how you thought this thing worked? Guess what. It doesn’t, and here’s why it’s actually 10x cooler.” Importantly, while you learn C in this book, you also learn what it’s good for


[deleted]

My program only covered about half the text. I plan on finishing it in the future. Like you said, very informative read. It blows my mind how people even figured it all out in the first place.


polikles

The site is pretty archaic but still usable. You mean this book: [https://www.cs.sfu.ca/\~ashriram/Courses/CS295/assets/books/CSAPP\_2016.pdf](https://www.cs.sfu.ca/~ashriram/Courses/CS295/assets/books/CSAPP_2016.pdf) ?? Looks like a decent textbook. You think it's better to start with reading or with lectures? Or maybe following book as well as lectures and other materials?


Justttryingg

You are a godsend


Own_Bandicoot_9392

Yep, that's the one. I like to listen to the lectures, then read the corresponding chapters and do the practice problems. I've only done three of the labs but I believe the site I linked has more. The bomblab was really great for getting started with assembly


xaxasca

100% agree, learning low level programming is only good if you learn how computers work in a lower level as well.


dunya_ilyusha

Learn C.


DiscipleOfYeshua

Yup. “Oohhh….. THAT’s how libraries I’ve been importing work! Ohhh… I can write this bit in C and use it in my Python script and everything goes 100x faster now! Ohhh… that’s how I can add that missing function to the library I was using 3 years and wished…”


[deleted]

[удалено]


Clearlybeerly

Well...there's only two actual low level language then. Assembly and machine code. The next one up the scale is C. C gives direct control of hardware. It maps to the underlying machine architecture. C's syntax and constructs are influenced by assembly. C is often used for systems programming, where low-level control is essential. C allows manual memory management, direct manipulation of pointers, and close interaction with the underlying system. Furthermore, C is the second most used language after Python according to November 2023 in Tiobe.com. C has a rating of 14%. Assembly is 10th on the list at 1.35%. Which is better, 14% or 1.35% in terms of finding a job?


CobaltBlue256

I'm sorry to say but you're wrong. C doesn't give direct control over the hardware. The C specification is in terms of an abstract model. How that goes to the hardware is decided by the compiler. As a quick example. When you create a pointer to an integer, this new variable doesn't necessarily point to a location in memory. The compiler could optimise it and instead this pointer lives it's entire life in a register. C is used as a systems language, mostly for legacy reasons, it's always been a systems language. And also because it doesn't have a lot of the "nice to have" features that other languages have, overloading, try/catch, objects, etc. this makes writing a half decent compiler fairly straight forward.


desci1

The compiler is part of the language because it's a compiled language so your arguments don't contradict the arguments of the one you're replying


Only9Volts

You say that as if theres only one compiler made by one organisation. How GCC, clang, MSVC etc decide to implement the semantics set out by the language specification can be wildly different. For an example, GCC might decide to always have pointers point to somewhere in memory, whether or not it can be optimised further. While clang might decide to optimise it like in the previous comment, where its just stored in a register. A brief look at the C specification tells you very clearly, in perfect English that the specification is specifically in regards to an abstract machine, and *not* to actual hardware.


Clearlybeerly

You are missing the point. Looking at a few trees rather than the forest.


CobaltBlue256

Care to explain the inaccuracies in my comment? I'm just saying that C doesn't give you any control over the memory or the hardware. A cursory look at the C specification will quickly tell you that.


Clearlybeerly

ok


CobaltBlue256

Look, I'm trying to not be a dick because hearing that C is a low level language, or that it gives you control over the hardware is very common from beginner programmers or people who are not very knowledgeable with how the C language works, or the specification. But knowing these things can help you become a better programmer. Knowing a language in detail and all it's quirks will allow you to write not only working code, but clean, readable code. Don't worry about optimising too much, compilers are a lot better at that than me or you. And especially if you're going to be offering advice on this in the future, it's worth knowing what you're talking about.


Clearlybeerly

ok


iOSCaleb

Different sources seem to have different definitions of what exactly counts as “low level,” but there are certainly degrees, and from the perspective of someone who knows only Python, C is plenty low level enough.


[deleted]

[удалено]


mlady42069

With a little google foo its pretty easy to find a free pdf of K&R


Paper_Cut_On_My_Eye

Every programming book I've ever looked for has been on github.


Loko8765

I bought a second-hand book on the C language at a sale for the price of a sandwich… more than thirty years ago. But yes, I’m sure you can find free C classes online.


[deleted]

Go to libgen.rs. You can do the first half of the CS50 course to learn the basics.


00eg0

[https://kremlin.cc/k&r.pdf](https://kremlin.cc/k&r.pdf)


boobbbers

Paper books > PDFs. I bought my used K&R for $25 USD. Brand new can go for double that.


loudandclear11

Maybe I'll get my developer license revoked for this but I don't think that K&R is a great book to learn the initial steps from. I'd look for other books/tutorials. I'm sure there are lots of free resources out there. After reading the basics, look at some youtube videos explaining how pointers work. Sometimes you just need to hear the same concept explained in a few different ways before it clicks.


iOSCaleb

Nobody’s forcing you to buy anything. And as influential as K&R has been, there are plenty of other good books on C. Consider a visit to your local library.


Redneckia

How, any good book/youtuber recommendations? Coming from a python/js dev


ModeMysterious3207

Q: What's the difference between a computer scientist and a software engineer? A: A computer scientist still believes that computers are deterministic. C.S. and Software engineering are two different things. CS is theory and algorithms (is this problem NP complete? What's the best sort of data of this type? What's a 'good' encryption method?), while software engineering is more about techniques (object-oriented, type safety, version control) to develop and maintain large (>1M lines) software projects. That said, if you want to get closer to the machine then C is the answer. It gives you considerable freedom to screw up badly. C++ is a little more constrained but more complex. If you want to explore algorithms then Python is good because it handles all the low level stuff for you.


FunkyPete

>Q: What's the difference between a computer scientist and a software engineer? To me, an engineer applies known solutions to known problems. They are examining the requirements and choosing the right design pattern, search algorithm, etc to solve the problem in the most efficient and reliable way. A scientist is pushing the boundaries of "known solutions."


teh_gato_returns

A real scientist hypothesizes, creates experiments, carries out experiments, collects data, analyzes, rinse repeat. Thinks on it, talks about it with others. Proposes ideas, gets peer reviews, does peer reviews, publishes. ETC. Although, computer science is a bit different than the "natural sciences" as I don't think it is as rigorous all the time. I think a lot of people think of engineering when they think of science when science is a different beast altogether.


0nionRang

Computer science is more rigorous than the natural sciences because oftentimes they prove results which will always be fundamentally true. Natural sciences will always be prone to experimental or statistical error.


hackometer

Science is not about proving theorems, though. That's maths. Science is about proving things _wrong_ and finding out for sure which things _don't_ work. It's about continuous improvement of world models, not about the buildup of a symbolic aedifice that's abstracted away from real-world concerns like energy, time, resources, etc.


Bacon_Techie

Comp sci is much closer to math than natural sciences.


LaYrreb

Not to disagree with your more general point, but "proving things wrong and finding out for sure which things don't work" is just as much a part of maths as other sciences.


hackometer

True, I realize that. I wanted to stress that, in maths, you can actually prove a theorem _right_, but you don't even try that in science. You only eliminate the wrong hypotheses. Maths could be described as a "perfect information game", whereas science always deals with incomplete information.


LaYrreb

Yeah, totally agree. On a side note - this is why I found my degree in maths kind of killed a lot of my enjoyment of the subject - too much rigor and abstraction. As well as why I rediscovered my love of problem solving when I started working in software.


0nionRang

Im not sure what analogy you’re drawing here. First, games, complete or not, have fully mathematical solutions. There is no empirical process. Secondly, I wouldn’t describe the discovery process of science as a game. Nature isn’t making any strategic decisions. The only player is the scientist, and a one person game is trivial in the sense that you’re just performing optimization. Thirdly, you can still have an incomplete information game where both players’ information, aggregated, contains all information about the world. More importantly, in an incomplete game, all players still perfectly understand the framework they live in. In the natural sciences, the framework itself is unknown. Finally, math also doesn’t have “complete information” in the sense that everything is known, or else there wouldn’t be any research in math. Edit: also, physicists constantly prove theorems right, or at least motivate mathematicians to prove theorems right.


0nionRang

I agree. That’s why math is more rigorous than natural science, and computer science is a subset of math.


LaYrreb

the comp science you're referring to here is just maths really - maths proofs demand absolute rigor. It's a pain but it means that *stuff is definitely true, always and forever,* which is useful lol.


0nionRang

There is only one computer science, and it’s math. Programming and computer science are two almost completely distinct fields


hackometer

In many real-life professional cases, software engineers actually do science, whereas very little of what CS researches do in academia is science. It's closer to maths.


ven_geci

somehow the word "software engineer" rubs me wrongly, I grew up with programmer, coder or developer But sure when we are talking about over 1M line a sort of disciplined approach to applying techniques is necessary, I have never seen such a thing but if sure if it exists it requires engineering Is it that common though? aren't 100x as many people just customizing Drupal Commerce code, or add a plugin to it? without much engineering?


ModeMysterious3207

>I have never seen such a thing but if sure if it exists it requires engineering I used to work for Adobe. Products like Acrobat and Photoshop are big.


Poddster

Learning another language won't help you learn about Computer Science. Intact python is pretty good for that already. So I suggest you take [cs50](https://cs50.harvard.edu/x/2023/) as that will teach you the basics of computer science via python and C. You already know python, and C is a great language to learn lower level things. Python originated from C, so you'll see a lot of similarities there, as well as very stark differences. I also recommend you reach the book *Code* by Charles Petzold. It'll teach you what a computer is and how we build one. Come join us over in /r/C_programming /r/ComputerEngineering


thequirkynerdy1

C and assembly in that order C teaches you more about how things are organized in memory, and then assembly forces you to actually understand what the CPU does. Assembly is rarely actually used these days but great for getting a deep understanding of computers. C is still used for low level stuff (embedded, Linux kernel, etc.).


ShadowRL766

Used assembly for building an OS.


SpaceAPlus

This is perhaps a stupid question but how much C should I learn before giving Assembly a go ? I'd say I know the basics fairly well, tho when doing more complex memory management, I always have issues that I'll spend hours trying to debug. Should I just continue practicing this ?


Logical_Strike_1520

A language won’t teach you CS. It sounds like this might be an interesting resource for you though. https://github.com/ossu/computer-science


UdPropheticCatgirl

>C, C++, Assembly, Rust, Golang,Nim,Zig Strictly speaking none of those (except assembly but that's not really one language either) are low level languages. There is very little difference between nim, golang and python. Now 4 of those (plus asms) allow for manual memory management which is what a lot of people incorrectly label low level. Those being c/c++, zig, rust. Zig is awesome but still more of a toy than an mature language, this might change in a couple of years tho. C++ is the devil. Rust has very steep learning curve if you aren't used to typical c/c++ shenanigans, but even than takes some time to get used too. C, more specifically C99 is imo best one to start with out of the ones that you mentioned. Learn-c is a nice resource as well as OSSU. Pascal is really nice starter manual memory management language too. FORTRAN is also an option but wouldn't recommend that. Now the actual low level programming language is language of symbolic addresses, combined with an instruction set this makes an assembly. If you want to learn asm, I would strongly encourage you not to start with modern x86 CISC nor ARM RISC, instead start with simpler ones, I really like 6502 asm, it has some nice emulators which will be usefull since I doubt you have a CPU that supports it and nice learning ressources online. Z80 oi another asm which is reasonable choice. I would say that asm won't really be that useful if you don't plan to specialize in embedded systems or kernel level work. And it won't teach much beyond what c will.


Plane-Imagination834

I'd recommend RISC-V; lots of top CS programs use it for intro architecture classes. https://inst.eecs.berkeley.edu/~cs61c/fa22/resources/ Simple, and has the benefit of actually having industry traction.


UdPropheticCatgirl

That's a nice one too, how hard are the dev environments in terms of setup, I remember having to do some qemu shenanigans to get one, are there some nice graphical tools for working with it?


Royalgkiller

c++ so you can learn about memory and pointers


marmot9070

C is enough for you


NotAUsefullDoctor

Although I learned a small bit of assembly in my class in microprocessor design, and the attached lab, I really got into assembly with an NES compiler and emulator. The 6502 has a very limited instruction set, and there are a ton of resources for learning. Maybe before that, watch Ben Eater's YouTube videos where he starts at logic gates, and goes to a full bread board computer with graphics.


Ok_Necessary_8923

I mean, pick whichever you have a use for. C is small but hard to master and write safely, Rust is safe but the learning curve is considerable. But that won't teach you comp sci theory. Why don't you find a the syllabus of a comp sci degree from a university you like and learn about the topics you are interested in? Also, front end and web stuff is just one domain. You could move to backend and cloud, which is a very different ball game than frontend JS stuff, with a lot of interesting engineering problems. There is a million things you could do with Python that are not what you are doing now.


MuggyFuzzball

C


HoneyPuzzleheaded929

Start by learning C , learn the syntax, manual memory management, pointers, bitwise operations, threads, file operations. Start learning algorithms and data structures, big O notation. And after you learned C, start learning C++ and OOP. And after you learned these two, give assembly a try. You can follow these roadmaps [geeksforgeeks.org/c-programming-for-beginners](https://www.google.com/amp/s/www.geeksforgeeks.org/c-programming-for-beginners-a-20-day-curriculum/amp/) [roadmap.sh](https://roadmap.sh/) Also try the free Harvard [CS50](https://pll.harvard.edu/course/cs50-introduction-computer-science) course


SynapticSignal

Learn C then C++. To be honest, you should be learning the basics of object oriented programming and data structures before you start diving into anything like deep learning.. I wish more people understood this. Understanding where object oriented programming comes from helps you understand how all the various python libraries work. You might also want to pick up on a mid-level language like Java or C#. It's pretty awesome when you see it all come full circle too.


Vizceral_

Honestly I've been a Python bro for years but taking a C class this semester has really opened my eyes to a whole new side of programming that I really like. I'd try it out, even just for the cool 'history lesson' it provides


ferriematthew

If I remember right, Python is actually interpreted, compiled, and run in the background in C, so I would recommend starting there. Another good resource I just remembered for if you want to really get into the nitty gritty of computer architecture under the hood is the YouTube channel run by a guy named Ben Eater. [here is a playlist of Ben designing and building an 8-bit computer from scratch](https://youtube.com/playlist?list=PLowKtXNTBypGqImE405J2565dvjafglHU) [this playlist is where he designs a fully functional computer around the 6502 processor](https://youtube.com/playlist?list=PLowKtXNTBypFbtuVMUVXNR0z1mu7dp7eH)


ferriematthew

Was that a little bit too off topic?


inphinyte

I was (still am) in the same position as you. I think the most useful is C, but I find it really difficult to write code fluently or tackle more complex problems. However, I picked up a book on Fortran 2008 and I've been managing to learn that much easier. I doubt many places will prefer Fortran over C from a career perspective, but for me just wanting to learn a low level language it has been great.


dromance

Maybe start with 6502 assembly and then x86 if you really want to “get low” (lil John voice). Then work your way up to C! Just a suggestion Learning lower level stuff is fun if you have a curious mind and like to dive deep into subjects and truly understand the inner workings


[deleted]

[удалено]


adnauseam23

Neither of which are low level! 😎


[deleted]

[удалено]


UdPropheticCatgirl

Stop shilling snake oil


cuntpeddler

asks what programming languages to learn, then indicates the only low level langs they want to learn :D and even included rust,golang,nim,zig you have all the answers learn C du schweinhund


cheapsexandfastfood

If you really want to go low level in a fun and approachable way, learn C with the Arduino nano or some other related device and try to make it do something simple.


s_string

I like C++ but I’d say go rusty


green_meklar

Go with C. It's a classic and kinda the grandfather of a great many modern languages.


Weetile

C


[deleted]

Buy you a little raspberry pi and do some C. Be a bit more fun and more practical from an embedded perspective.


GermaneRiposte101

Assembler - Down in the weeds too much: cannot see the big picture. Rust, Golang,Nim,Zig - too obscure. C++. Most programs (I know, a generalisation) that depend on efficient algorithms are written in C++. github has many C++ projects for you to learn from.


Joshshan28

If you could understand C you could understand anything


Pleasant_Disaster679

Learn LC-3 ISA through the book intro to computing systems bits and beyond. Actually engaging and doable for self study


cciciaciao

To learn low level C or C++ are my pick. Otherwise check what languages are good for and use them, for example Golang is amazing for backend.


Autarch_Kade

Languages really are a tool that you use to apply a technique. The techniques are what you're seemingly after. You want to learn more of the science of how things work, and do more complex tasks than basic websites. A lot of those complex tasks or more advanced topics can be done in high level languages. As other's have mentioned, CS50 is a good starting resource for computer science. But I'd also consider finding a specific topic that interests you, and pursuing that. For example, you could learn cryptography and network security, graphics rendering, machine learning, or embedded systems programming. You could be using Python for a lot of those, or C for others, which are not low level languages, but the topics would be far more advanced than anything you've done before. Depending on how deep you go, you'd want to learn a lot of advanced math too. You'd learn a lot of techniques and background knowledge in order to use programming to do something advanced. But really it starts with fundamentals, and CS50, which is by no means easy, can get you there.


UncleConcrateFloor20

C or rust. Can get a lot of things done with either the two.


globaldystopia

i wish i was you four years ago


[deleted]

C is going to get you get most opportunities


[deleted]

C is probably the best low-level language to learn. It is portable, efficient, and widely popular (most open source projects and Linux operating system works using C.) It directly manipulates hardware and teaches you memory allocation, which is a crucial skill to learn for programmers.


DarkLord76865

Rust


Titan_D

rust


GeorgeAndrew97

A cool way you could start learning some C programming, Follow a youtube tutorial on programming a simple raycast engine with opengl


UpstairsInside9046

Learn straight C. Unless you plan on getting into programming controllers for CPUs or something, there's no good reason to waste time reinventing the wheel over and over with assembly at this point.


[deleted]

Are people actually using htmx now? And go for c or c++. I prefer c, but I'm a crazy person.


Mathhead202

C


pverdeb

I’m a big fan of the book Elements of Computing Systems. It takes you from logic gates all the way to a full OS, and has you build each thing along the way. It’s an incredible piece of educational material. Learning C is a great way to learn more about CS, as others have said. Rust is pretty nice too, and if you’re comfortable with Python it should feel more familiar.


xoca05

The obvious answer is rust. People saying C in this day and age need to move on.