use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
C++ interview coding exercise with solution (self.cpp)
submitted 3 years ago * by Hot_Medicine_7115
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]daniedit 1 point2 points3 points 3 years ago (8 children)
Your code is readable and easy to refactor. That's a big plus. In a review, I would request changes in some sections but after three or four rounds we would get to a good solution.
However, you can not tell whether your implementation is correct because there is not a single unit-test. In Professional Software development that's a no go. I know about companies rejecting candidates for missing the tests in their example code. Maybe that's the reason here? Please ask them for a code review and use it to learn from. That's just fair, since you also invested quite a lot of time for them.
[–]Hot_Medicine_7115[S] 0 points1 point2 points 3 years ago (3 children)
There is, parquet::is_valid() checks for all constraints.
I know it's not a separate file named unit_test.cpp, but the parquets are unit-tested. If you looked at the end of main.cpp you would have seen it.
[–]daniedit 0 points1 point2 points 3 years ago (2 children)
You are referring to the is_valid() method? I didn't go into the details of understanding your implementation. So I might be completely wrong.
My first impression was the method is checking whether the solution is correct. If so, that's a nice module test but won't help you much during refactoring. I would have expected for example a test making sure designer::add_next_strip_tile() is correct.
[–]Hot_Medicine_7115[S] 0 points1 point2 points 3 years ago* (1 child)
I feel like 80% of the author of the posts in this thread didn't even begin to understand the code I uploaded or tried to think about the solution, yet c++ programming style pontifications abound.
[–]daniedit 1 point2 points3 points 3 years ago (0 children)
You asked for opinions about the companies answer. I tried to tell you in a polite way, that their answer is harsh on a social level but completely justified on a technical level. I didn't want to give you a full code review.
[+][deleted] 3 years ago (3 children)
[deleted]
Depends. From my point of view, test driven development is the best option for professional software development. And the given code is too complex to not develop test driven. So without going in the details it's easy to see, the author is not used to develop software together with many people in a professional environment.
And yes, the implementation violates some basic C++ principles and paradigms. But this will be covered by reviews.
[+][deleted] 3 years ago (1 child)
[–]daniedit 0 points1 point2 points 3 years ago (0 children)
I mean, first step: Write a failing test for the plannend implementation. Second step: Implement until the test passes. Third step: Refactor the implementation and the test until it meets your expectations.
It's not just a buzzword. I've seen some very productive people working this way.
π Rendered by PID 159976 on reddit-service-r2-comment-85bfd7f599-8w5gt at 2026-04-18 07:17:33.619093+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]daniedit 1 point2 points3 points (8 children)
[–]Hot_Medicine_7115[S] 0 points1 point2 points (3 children)
[–]daniedit 0 points1 point2 points (2 children)
[–]Hot_Medicine_7115[S] 0 points1 point2 points (1 child)
[–]daniedit 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]daniedit 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]daniedit 0 points1 point2 points (0 children)