Good company practices?

So, I got my first programming job in a big company. My position requires writing C++, so I was wondering what should I expect? What should I use/not use, what to avoid. Commenting code and good intending is a given, but what about more C++ specific stuff, for example things like iso646 (and/or instead of &&/||). I would appreciate any kind of advice (even if it's not directly related to programming and C++), so if you got some tips to say I will gladly listen.
expect them to tell you how to code, expect a standard document and training on it, how to comment, it should all be listed out in great detail.

a lot of places have specific comment formats so a parser can pull out and generate documentation for you (up to a point).

You may be able to request their coding standards document up front.
Read the C++ Coding Standards / Guidelines of the company first. Before you start writing code for an actual project, check if it has its own version of the C++ Coding Standards / Guidelines.

Before you submit your first component for review, get familiarised with the code review process adopted by the company (read the check lists etc.)

Also read / check your code with CoreGuidelines https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md

Read 'C++ Coding Standards: 101 Rules, Guidelines, and Best Practices' by Alexandrescu and Sutter
https://www.pearson.com/us/higher-education/product/Sutter-C-Coding-Standards-101-Rules-Guidelines-and-Best-Practices/9780132654425.html
(There should be copies in the company library / or there may be an enterprise safari subscription https://www.safaribooksonline.com/ )

Above all:
The company probably has a mentor programme; if not, identify and get close to some experienced programmer(s) who know(s) C++ well. Ask questions, listen to the feedback on your code, study the code that they write, watch them write code.
Congrats!

You should probably start most any project looking at what other programmers did on like projects before you. Look at their code, comments, and talk to them if you have a question.

You'll probably be on a team, maybe even be fixing bugs or adding features to existing programs to start out which would be ideal for learning.

If they throw you at the wolves and give you something completely new, document everything even if it's for your self for years later. Store your notes in email or some place that's backed up and searchable.

Have fun
Thank you! As I see my first days there will be more about asking questions. I'm sure they will have a short training session before they put me in charge of something important.

Will check the Coding Standards book, if I'm not mistaken I think I got it already.
I think the biggest difference between coding in school and coding in the real world is the error checking. In school projects, you usually assume that the files you open will exist, the input you read will be in the right format. The OS and library calls you make will succeed.

In the real world, you have to check for errors and deal with them.
what about more C++ specific stuff, for example things like iso646 (and/or instead of &&/||)

That is C specific stuff (well, technically the history is more complicated and C++ had a major role in getting that into C95). Very few people use and and or and they are generally seen as oddballs. Expect confusion at code review if you submit something like that.

My position requires writing C++, so I was wondering what should I expect? What should I use/not use,

I think in most cases you should expect using debuggers and, if you're good, profilers. Big company often means good stuff like Intel VTune. But anyway, since you're in the door already, just ask the people around you, rather than guys on the internet who work at other companies.
Last edited on
I think the biggest difference between coding in school and coding in the real world is the error checking. In school projects, you usually assume that the files you open will exist, the input you read will be in the right format. The OS and library calls you make will succeed.


Don't think that will be much of a problem. I mostly coded on personal and open source projects, so I got a little experience with real projects.

That is C specific stuff (well, technically the history is more complicated and C++ had a major role in getting that into C95). Very few people use and and or and they are generally seen as oddballs. Expect confusion at code review if you submit something like that.


Yeah, that's what I thought. I find it to be more about C++, because it is built-in in C++, while in C it needs a header. I see how it can cause confusion, if you got people using both and/or and &&/||.

I think in most cases you should expect using debuggers and, if you're good, profilers. Big company often means good stuff like Intel VTune. But anyway, since you're in the door already, just ask the people around you, rather than guys on the internet who work at other companies.


Gonna check those, even if the company doesn't use them, I may run into them eventually. Thanks for pointing them out.
Last edited on
Topic archived. No new replies allowed.