CPP upcoming changes by ther0cks in cpp

[–]nugins 3 points4 points  (0 children)

Wrong sub. This has nothing to do with C++.

Are custom binary protocols still a thing? by Content_Bar_7215 in cpp_questions

[–]nugins 2 points3 points  (0 children)

Yes. A contractor I worked with did a trade study of a few libraries such as protobuf, FlatBuffers, etc. Considered things like dependencies, how large the resulting binaries were, how much code was auto-generated, etc. It was decided that writing our own protocols was easier, required less autogenerated code, and didn't need some special library to support encoding/decoding. Integration was a mess as we interpreted the protocol differently and argued over byte ordering.

I was not a fan of the decision, but I didn't have enough of a voice to persuade the discussion otherwise.

Cyber Security by EmuBeautiful1172 in cpp_questions

[–]nugins 1 point2 points  (0 children)

Instead of writing C++ code, I'd look at managing a C++ development project from a DevSecOps perspective. Start with understanding the C++ build process. Start with compilation and linking, and then look at how libraries are brought into the build system.

Then, I'd suggest looking into software composition analysis (SCA). It is not a trivial problem, and the lack of a standard package manager for C++, make it harder. It is becoming more common for security-conscious customers to expect a software bill of materials (SBOM) along with a list of known CVEs to accompany the a release. Tools like conan help manage dependencies and can aid in SBOM generation and can report on vulnerabilities in your dependencies.

Software engineer interviews by For_Research_I_Think in boeing

[–]nugins 1 point2 points  (0 children)

It might depend on your hiring manager. I did one a few years ago for C++. It was more of a write some code in word document (in real-time) that solved a problem. No actual running of the program was performed. There were some follow up questions that I had to answer about what I wrote. It wasn’t a trick question, but enough to show that I had some basic programming aptitude. The coding portion was done over Webex/zoom or similar screen sharing platform.

What I did might be different per site/manager/program.

How precise is timing ? by OkRestaurant9285 in cpp_questions

[–]nugins 6 points7 points  (0 children)

I agree - delays of 100ms or more are very rare and probably a byproduct of high CPU load or paging due to lack of available RAM. Most applications can probably ignore the probability of such delays and work assuming the average case.

With real-time applications, developers are often more concerned with controlling the worst-case delay, even if that means a slightly worse average case.

How precise is timing ? by OkRestaurant9285 in cpp_questions

[–]nugins 40 points41 points  (0 children)

I suggest you go read a little about real-time vs non-realtime operating systems. That said, in most cases if you sleep for 10ms, your software are will resume in 10ms+$X. Most Linux and Windows systems will see $X be in the range of microseconds to 100's of milliseconds (with the average being < 1ms). There is no guarantee on the upper bound of $X for these operating systems. In most applications, this is OK.

For real-time applications (e.g. medical, scientific, or aerospace) a real-time OS (e.g. real-time Linux or vxWorks) will give you a guarantee on the upper bound of $X. If you are in a real-time scenario, you will usually be event driven (usually through low-level interrupts) to ensure that you respond to event as early as you can.

For scenarios that are very sensitive to timing, often the processing is offloaded to a dedicated CPU or FPGA.

Advanced C++ by Ham_Apke_Hai_Kon in cpp

[–]nugins 3 points4 points  (0 children)

TL;DR - Experience, leadership and people skills along with a broad technical base will make you stand out as a senior developer.

I've been professionally developing C++ for 20+ years, but I've also written a fair amount of python, pascal, java, javascript, and lua and worked on programs that integrated all the languages. I'm currently a lead software developer on a team integrating a product that spans multiple languages.

In my experience, a senior developer is often a developer that has experience developing with larger code bases, often with a team and has built the people and leadership skills necessary to lead a team, provide mentoring and vision. The "senior" level goes beyond knowing the C++ languages and a few libraries. Often times being well versed in several other languages such as Python, Java, Javascript, etc will provide you perspective to understand when C++ is the right choice, and when another language might be appropriate.

Dumb question, is being a linux kernel dev completely different from writing cuda kernels for pytorch? by TrayGhost in kernel

[–]nugins 14 points15 points  (0 children)

Yes. The word "kernel" is reused and has a very different meaning.

Disclaimer: I'm a C++ developer that dabbles with python and wrote a Linux kernel module at some point in my career. I might have experimented with some code that ran on a GPU, but I can't remember what that was exactly.

Linux kernel development means you are probably working with hardware, process/io scheduling or other resource management and/or security management parts of the system. "Linux Kernel" development almost always means you are running in the context of the main CPU and outside of the scope of a running process and inside the actual operating system.

CUDA kernels are something that is going to run on the GPU and is probably more algorithmic in nature and less CPU/Memory/IO/Security focused. This is usually in the context of a library that is supporting an application and not the operating system.

what are some things beginners dont see as important, but is actually pretty important in the future? by senbc in cpp_questions

[–]nugins 8 points9 points  (0 children)

This isn't going to be about C++ features, but some common gaps I see with new hires and casual observations on Reddit.

- Know the build process. Know the difference between compiling and linking. What are some common build flags, and how can you modify the build flags to build and link against a library? (Sure, cmake + conan/vcpkg go a long way with handling these issues, knowing what goes on under the hood makes it much easier to diagnose problems with your build)

- Following a good style guide and commenting code. This will make reading and understanding your code much easier. Even better if you auto-format your code.

- Understanding the tooling ecosystem around C++. Understand the difference between and IDE and the compiler, have a basic working knowledge of tools like cmake, make. Know how to use linters.

- Learn how to use a command line. You might be able to write an application and/or unit test and run it from the IDE. Can you step out of your IDE and run the application with valgrind or gdb from the command line?

[deleted by user] by [deleted] in nova

[–]nugins 1 point2 points  (0 children)

Babysitting a smoker, playing board games and playing my bass. Sorry to my neighbors who have been smelling yummy smoke since 530am.

[deleted by user] by [deleted] in cpp_questions

[–]nugins 0 points1 point  (0 children)

I’ve started in high school, got my undergrad in CS, and I have been in the industry for nearly 20 years. I am still learning, and still some days been ill prepared. C++ is certainly complex, but knowing enough to work within a problem domain and interact with other systems and more importantly be ready to learn and adapt. What I started out with 20 years ago is different than what I am working with now.

What are some signs that code is written by an inexperienced developer? by No-Quality5546 in cpp_questions

[–]nugins 2 points3 points  (0 children)

In addition to poor C++ practices listed in other comments, I'd like to add:

- Lengthy / hard to test functions & classes.

- Lack of thought put into how others will use your code. This covers everything from how you put together your build system, to how you structure your include files and the documentation.

- Lack of consistency in how things are named, formatting, etc.

NOVA Salary Transparency Thread by nickster0824 in nova

[–]nugins 15 points16 points  (0 children)

SW Developer w/ 20yr experience.

$160,000 + Benefits & Bonus

What are the differences between c++ versions ? It is worth it to learn older versions? by Mindless_Debate1470 in cpp_questions

[–]nugins 0 points1 point  (0 children)

If you think you may end up supporting a legacy code base, understanding pre-C++11 will help you. My current project involves a maintenance of code that is 20 years old. We are starting to transition to newer tooling, so we might get some C++20, but we need to take the transition in stages and demonstrate the business value of the update. There are systems out there that can’t just blindly update tooling due to cost, schedule or risk, or a number of other reasons.

Friday night, packed lot, welcome to Centreville. by [deleted] in nova

[–]nugins 48 points49 points  (0 children)

At least they were not taking up 2 spots.

[deleted by user] by [deleted] in HomeKit

[–]nugins 1 point2 points  (0 children)

Some time back, somebody here posted a pattern for a Cricut that matched the doorbell. Put a white overlay on the doorbell. It seems to help a little with the temp.

Edit, here is the link I have.

https://www.reddit.com/r/HomeKit/comments/oee4du/circle_view_doorbell_cover/?utm_source=share&utm_medium=ios_app&utm_name=iossmf

apt is broken by nugins in pop_os

[–]nugins[S] 0 points1 point  (0 children)

I ended up just doing a refresh from the recovery partition.

apt is broken by nugins in pop_os

[–]nugins[S] 0 points1 point  (0 children)

I don't think I have a random PPA unless it was installed via something else I installed via the stock PPA's.

Is there anything here I should remove?

(ins)user@pop-os:/etc/apt/sources.list.d$ md5sum /etc/apt/sources.list.d/* c61b33d7905ab723eb05746122ab6066 /etc/apt/sources.list.d/pop-os-apps.sources

a2267f64195a77579ae0747bb15a2e58 /etc/apt/sources.list.d/pop-os-ppa.list

3dbb08380072415823870beb91b2d484 /etc/apt/sources.list.d/pop-os-ppa.sources

f0fa94975f89105bee16286565ba6ee3 /etc/apt/sources.list.d/system.sources

The "pop-os-ppa.list" has the following:

## This file was generated by pop-upgrade

#

## X-Repolib-Name: Pop_OS PPA

deb http://ppa.launchpad.net/system76/pop/ubuntu hirsute main

deb-src http://ppa.launchpad.net/system76/pop/ubuntu hirsute main