Just accepted a Job exclusively programming in C

This is going to be torture isn't it? I wrote some C code in meme undergrad/grad classes but haven't used C in a long time. I can implement binary trees w/e easily but don't feel like a great C programmer. How do I become an expert C programmer Jow Forums?

Also, I've been exclusively in the meme OOP world for years now. How do I write software without classes? Do I just use namespaces to hold all my methods? How do I procedural programming Jow Forums? I don't want to write poo code and get fired after 3 months.

Attached: C_language.png (225x225, 3K)

...

Learn to use void pointers, structs, and function pointers.

>Do I just use namespaces to hold all my methods?
C doesn't have namespaces either genius. Literally just name your functions properly and you won't run into problems.

what the fuck, if theres no namespaces how do I avoid collisions with function names. Surely two different structures will both have "Add" functions. Does C determine which function to use at runtime based on the argument types?

>I can implement binary tree w/e easily
I can too I wrote that the other day and probably only have wrote like 10 C programs in my life. I hope you can do better than that if you really accepted a job doing it. Just try studying really hard, I hear "The C programming language" is really good but I'm not sure if it gets past beginner stuff.
>How do I write software without classes?
With structs and functions? Why do you need to associate certain data with certain functions in order to code?
Are you serious? Just name it add?

Do you recommend putting function pointers into structs to encapsulate? Sounds messy and smells stinky. Don't wanna get replaced by poo workers so I need to write clean code.

sounds comfy. just dive right into the books for a week or two and spaghetti it up for the first month or so

I have a masters degree in Computer engineering, I can write C code. I'm just lost on procedural design patterns. I have no idea how to write clean C code.

I understand I can write code with structs and functions, but I want to write clean and maintainable code that follows general procedural design patterns. I dont need to explain to you why associating data and functions is desirable. I can guarantee people who write good C code have a way of encapsulating data and functions together, I just don't know how they do that.

you think it's comfy? I'm a bit worried since C is hard to work with in comparison to C# and other memes i've been using. Maybe it'll be fun though.

Any useful books you can recommend user? Preferably towards design patterns as I know basic C syntax.

>I can guarantee people who write good C code have a way of encapsulating data and functions together,
I'm pretty sure that's what C++ was made for it. Encapsulation is a meme.

What the fuck are you talking about? How is encapsulation a meme? Fucking poo programmers. Ever had an actual software engineering job or are you a self taught neet?

That is true, sir. You cannot write good code without the Principles of Object Oriented Programming.

It's not about following OOP memes, it's about making sure some fucking intern doesn't try to arbitrarily access your data and put your code out of state. If you don't encapsulate your data you will have to deal with a million "URR code desont werkkk" emails.

Retard beginner here, how does a job with low-level languages such as C even look, like i get with JS you create web apps etc. and with C# or Java you create software for businesses or games with C++ etc. i can find a reason to use those languages but what do you do working 8 hours a day with something as "barebones" as C

Attached: 1543331741266.jpg (960x958, 215K)

OP here, I'll tell you about the job.

Essentially its in kernel development. You use C when you are developing operating systems or drivers. This mean interfacing directly with hardware and memory. Since you are working at the bottom of the software stack, your code must perform as efficiently as possible, because all the software on top of it depends on your code being fast. So for high performance we write C code. C is also great for directly accessing memory and hardware values. Does that help user?

A typical C job could be writing software for a USB drive. The drive is just memory, but when you plug it into a computer, the operating system wants the USB to have functions like "write data" or "remove data" because the OS doesn't know what the hardware looks like. So the USB manufacturer will write some C functions the OS can use to access the hardware in the USB.

Got it, thanks.

>Essentially its in kernel development.
Holy shit you got a job in kernel dev and you're asking Jow Forums how to fucking write C code because your head's filled with OOP memes? You are so fucked. The idea of combining data and functions is literally the antithesis of procedural programming.

its either a larp or OP is a minority diversity hire

That depends on what you're trying to do. If the function isn't specific to each instance of the struct, you can just pass the function as an argument to another function or call it directly, so there's no need to store it. If the function is specific to each instance of the struct, or needs to be called by code that you didn't write (such as callback handlers and such) then you should store the function pointer in the struct.

I'm just asking for advice on procedural design patterns so I don't write spaghetti you fucks. Obviously I can write C code, but I want to learn to write cleaner code. How about recommending some typical docs or C standards you've found useful instead of just speculating on how bad of a programmer I may be?

Thanks for clearing this up user. great advice

>Does C determine which function to use at runtime based on the argument types?

yes

Wrong.