How Google writes gorgeous C++

C++ is considered by some a difficult language to program in. Google, whose services are used by millions of people, need to ensure that their code is high quality and as robust as possible. This video takes a look at how they achieve this.

4 Likes

Wow, this was really insightful! Have you ever had to deal with the challenges of managing inheritance in your C++ projects? If so, what strategies did you find most effective in avoiding the pitfalls mentioned in the Google C++ style guide?

2 Likes

I’ll be honest I haven’t worked with C++, however, there are similarities between it and Java, which I have worked in, so I’d imagine some of the same principles can be applied. For one, you need to do extensive planning before coding, and you need to consider all of the different classes that you would need, and the relation between them. This should be in depth so that you can prevent scope creep and reduce the possibility of having to introduce classes which will make the inheritance structure more complex. You’d also want to factor out common functionalities as much as possible, reducing the possibility of repeating your code.

1 Like

I’m always curious about how big companies tackle coding challenges! very cool video

3 Likes

I always found C++ pretty complicated. How did you learn to cope with it?

3 Likes

You’re right that it’s pretty complicated from what I’ve heard and seen, but luckily for me I haven’t had to touch it in uni, so unfortunately I can’t answer that question

3 Likes

What is your opinion on Google’s choice to use C++ despite its reputation for being a difficult language to program in? How do you think their approach to ensuring high-quality and robust code might influence or reflect on the broader programming community?

2 Likes

Google being a tech company that deal with highly sophisticated resources and a massive amount of users wouldn’t really have a problem with using a language that may be considered difficult as a large number of employees would be expected to work in high standards so that everything can run smoothly. Also, C++ is a valuable language due to being fast and also powerful as it allows more control over computers, making it essential for Google.

As for your second question, programmers are continuously pressured to write both high quality, robust code and also deliver under tight deadlines. Therefore, for some programmers there is a trade off, however, I’m not sure how much the culture at Google would influence programming styles and culture at different firms, although managers coming from Google to different firms may try to implement how they operated at Google.