General > General Technical Chat

How many people code in C these days, and if so, why?

<< < (63/99) > >>

bd139:

--- Quote from: Sal Ammoniac on May 11, 2020, 08:22:23 pm ---The industry is littered with the burned-out wrecks of companies who thought rewriting their bread and butter products in a newer, shinier language was a good idea.

--- End quote ---

Hey, my house was paid for by the hopes and dreams of those companies  :-DD

madires:
With C you have to check things yourself and can't rely on a smart compiler doing everything for you. That means more work for you, but at the same time it allows you to do some things a protective language doesn't support. If you like to play safe there are mitigations like libraries with secure functions and other measures to protect against typical security issues like buffer overflows. But the security doesn't come for free, neither with a protective language nor with libs. Executables will be larger and slower. And you can't assume that a secure language won't have or create any security issues. For example, Web 2.0 is a security nightmare.

engrguy42:
I have a question for the professional coder dudes...

I always assumed that in the commercial software world that the guys writing code would, maybe 80% of the time, be reaching into ready-to-go functions and libraries the company had built up over the years, and only 20% writing new stuff. "Hey, I need to do some I2C stuff...oh wait, we did that bunch of functions last year, I'll just copy it", or something like that. And I assumed that modular OO stuff and functions would be highly prized, to make libraries of often-used modules that had been used and tested to death.

Is that not how it's done? Or is there a lot of re-inventing the wheel? I guess I assumed that companies would be all over the modular/OO design approach so they could have clean, reliable libraries they could copy from, and save gobs of development time.

nctnico:

--- Quote from: engrguy42 on May 11, 2020, 08:58:51 pm ---I have a question for the professional coder dudes...

I always assumed that in the commercial software world that the guys writing code would, maybe 80% of the time, be reaching into ready-to-go functions and libraries the company had built up over the years, and only 20% writing new stuff. "Hey, I need to do some I2C stuff...oh wait, we did that bunch of functions last year, I'll just copy it", or something like that. And I assumed that modular OO stuff and functions would be highly prized, to make libraries of often-used modules that had been used and tested to death.

--- End quote ---
Re-using existing code happens everywhere. Some code I use in every microcontroller project dates back from over 2 decades ago. How much project specific code needs to be added depends on the project and whether or not there is existing code which does almost the same.

engrguy42:

--- Quote from: nctnico on May 11, 2020, 09:06:33 pm ---
--- Quote from: engrguy42 on May 11, 2020, 08:58:51 pm ---I have a question for the professional coder dudes...

I always assumed that in the commercial software world that the guys writing code would, maybe 80% of the time, be reaching into ready-to-go functions and libraries the company had built up over the years, and only 20% writing new stuff. "Hey, I need to do some I2C stuff...oh wait, we did that bunch of functions last year, I'll just copy it", or something like that. And I assumed that modular OO stuff and functions would be highly prized, to make libraries of often-used modules that had been used and tested to death.

--- End quote ---
Re-using existing code happens everywhere. Some code I use in every microcontroller project dates back from over 2 decades ago. How much project specific code needs to be added depends on the project and whether or not there is existing code which does almost the same.

--- End quote ---

Thanks. I guess I was focused a bit more on the OO aspects. Personally, I do a lot of engineering-type simulations of real world equipment, like equipment with control/feedback systems. And from that perspective, for me at least, having the concept of objects is wonderful.

So for example, let's say you're modelling a solar inverter system with feedback controls. Or an automobile. Or an industrial motor. You can set up classes for the different components, then an overall class, and for example make a Model 463 solar generator system object. Then next month if you need to model a Model 823, you just use the same classes, but tweak the parameters. Same interfaces, same internals, different parameters. And you have these software modules simulating each component, so you can mix-n-match.

I'm guessing that most of the folks here are more in the lower level, embedded hardware systems, so maybe that higher level approach isn't needed?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod