4 ms·
Lots and lots of C. (I'm mostly an embedded C programmer these days). Some C++ for a bit of higher-level "business logic" that benefits from a class-based appro
by paulrpotts 10y ago
Lots and lots of C. (I'm mostly an embedded C programmer these days). Some C++ for a bit of higher-level "business logic" that benefits from a class-based approach, but a fairly limited subset of "modern" C++.
- greenyoda 10y agoLots and lots of C for me too. A huge pile of legacy business software which is still being extended to do new stuff.
- sdegutis 10y agoMy only real gripe with C is that you have to write your own functions/macros (or use someone else's) to make dealing with strings intuitive. The stdlib is perfectly fine from an algorithmic standpoint, but I always have to look up every string function's manpage, every single time I use them.
- yawaramin 10y agoCheck out https://github.com/antirez/sds https://github.com/antirez/sds
- randomthrowr88 10y agoSerious question: How does one get into this C embedded stuff? I'm addicted to low-level "embedded" type work. But all I hear back from are Django, RoR, $HOT_JS_FRAMEWORK, DevOps teams/recruiters. Is there some buzzword or special topic to know and do a project in? Any suggestions for projects to display on GitHub, topics to know through and through (domain specific knowledge)? I sit at work thinking all day about RasbPi sensor projects sitting on my workbench collecting dust due to job+young kids.
- alfalfasprout 10y agoLook by industry. In the financial sector, knowing VHDL/Verilog is becoming popular (given the rise of FGPAs everwhere). In sectors like robots, defense, aerospace, etc. you'll find a lot of traditional embedded roles. These aren't "sexy" areas so don't expect to get recruited. Like, mainframe programmers, these positions are in demand but just aren't widely advertised at all.
- ereyes01 10y agoSearch for companies that need to design sophisticated hardware at very low cost. This pretty much guarantees they need to hack microcontrollers, which are usually programmed in C. One I've worked with in my past life as an embedded developer is TI MSP430 (costs pennies), but there's many others. Another route to code in C close to the hardware is to find work writing Linux kernel device drivers. Of course, you have to know the Linux kernel fairly well in addition to being a good C programmer to land that sort of job. Companies that need this skill include server manufacturers that design their own network interfaces and such, and perhaps phone manufacturers, or companies that design their own SoC's (Qualcomm, TI, etc). Maybe some IoT startups need this skill as well. Yet another way to code in C is to work in a place that needs to program DSPs. Usually, this also requires knowledge in video/audio engineering. Companies that need this skill design and sell devices that do some sort of video / audio encoding (like video conferencing devices, etc). I'm sure there's many others I'm not thinking of. I hope this helps...
- ryandrake 10y ago+1 for device driver writing. That's how I got my start over a decade ago.
- LVB 10y agoBeing familiar with RTOS's is certainly useful, since there's a decent chance that your future automotive/aero/industrial job uses one. For a reference of stuff to learn about, go grab the manuals (usually massive) for a recent embedded CPU and see what common topics are foreign to you. Just reading the TOC should prompt some ideas. You may not be applying for one of the lower level "board bring-up" type jobs, but that team will be delivering you libraries that assumes familiarity with IRQs, timers, memory paging, processor modes, DMA, lots of I/O types, etc.
- fnj 10y agoI would get a Teensy 3.2 and start programming bare metal with Arduino. You could also start with Arduino on AVR, but the Teensy gives you a lot more headroom and performance and a very small physical size for very small $. Arduino is just g++ under the covers, and you can use as much or as little C++ as you want. You can stick to straight C if you like just by not using any C++ features.
- sdegutis 10y agoPlus if you don't need inheritance, you can just use pointers to structs and pass them to functions. And if you need simple polymorphism in some small places, you can use tagged unions.
- jdmichal 10y agoThis viewpoint is exactly why I like Rust. It has syntactic sugar to make things look like traditional objects, but everything is really a bundle of data with a set of associated static functions. (v-tables only appear with trait objects AFAIK, which are uncommon compared to templates.) And tagged unions are built in, with pattern-matching!
- Meegul 10y agoActual question from a software engineering newcomer: What would you consider "business logic" and where would said programs be running?
- paulrpotts 10y agoWell, I was using the term a little sarcastically since it is (I think) usually applied to multi-tier web service architectures. In my case I have an embedded system with a touch screen display, running a bunch of tasks to drive peripherals. There is a task that handles communication with the touch screen (serial). Then there is a set of slow tasks that handles states and modes, for example the runtime representation of a modulator or an RF amplifier. This got extended because we are adding "remote control" support over RS-232 and USB and so this runtime representation has to support more of a multiple model-view-controller. This can be done with queues and a lot of functions but it was simpler to represent it as a tree of stateful values that can be updated via remote commands or via the touch screen and have "downstream" updates. So that's what I mean by the "business logic" -- higher-level than, say, a driver and task for talking to a digital potentiometer or a DAC.
- raverbashing 10y agoC++ has this weird evolution curve where as you start using features things improve up to a point then go downhill, but then go uphill again with new modern features If you limit yourself to using the STL with C++11 stuff but don't go crazy with inheritance and templating in your classes it can be nice
- CoolGuySteve 10y agoComing from the HFT side, I find C++ surpasses C in a lot of ways for optimization work. Mainly you can use integer template arguments and generic functions to abstract all the boilerplate in a way that is more safe than C macros. For a semi-contrived example, instead of writing a do4Things() and do8Things() to unwind some loops, I can write template<int> doThings() where the int argument is the bound on the loop. And having things like a universal template<typename Whatever> toString() that operates on enum classes is nice. The downside is that it's horribly easy to invoke allocations and copy constructors by forgetting an ampersand somewhere, and the std library isn't well suited to avoiding that behavior either. You have to be vigilant on your timings and occasionally callgrind the whole thing. The other downside is that your colleagues are more likely to "knit a castle" with ridiculous class hierarchies or over-generalization. ( https://www.infoq.com/presentations/Simple-Made-Easy https://www.infoq.com/presentations/Simple-Made-Easy )
- alfalfasprout 10y agoYeah, the nice thing about C++ is that you can generally hide highly optimized portions of code behind nice templates or class interfaces. And with templates you can write libraries that let a lot of compile time logic happen to inline a bunch of stuff and not have to resort to virtual methods. But when it comes to using things like custom allocators, etc. it's a nightmare. Or a lot of the compile time "traits".
- majewsky 10y agoI have a friend who makes a living writing CUDA kernels as C++ templates. His job will be safe for decades to come because noone will be able to decipher the code. :)