Hot answers tagged

111

The premise of the question is, frankly, astounding. We suppose that there is a large change to fragile, complex code, and that there is simply not enough time to review it properly. This is the very last code you should be spending less time on reviewing! This question indicates that you have structural problems not only in your code itself, but in your ...


66

One of the primary goal of a code review is to increase quality and deliver robust code. Robust, because 4 eyes usually spot more problems than 2. And the reviewer who has not written the additional code is more likely to challenge (potentially wrong) assumptions. Avoiding peer reviews would in your case only contribute to increase fragility of your code....


24

The goal of Repl>it is to write and share short snippets of code. For instance, you may use it to illustrate your point when discussing a particular aspect of your favorite programming language with other programmers, or you may use it to sketch some code in a few minutes. Repl>it is not intended to actually write and maintain codebase of any size, not even ...


18

Solve the larger problems that are causing code review to be too hard. The ones that I've spotted so far: No unit test suite Complex code merges that could be avoided by more sensible code structure and delegation of coding duties An apparent lack of rudimentary architecture


11

Creating portable code can be very challenging. First some obvious language related advices: use standard C++ and avoid carefully any undefined behavior rely primarily on standard library (and portable libraries such as boost) always include all expected headers. Do not assume that you don't need a header because it's included in another one (i.e.on ...


11

There is nothing that can guarantee that the code is compatible with a platform other than building it, running it, and testing it there. Therefore, the approach of all sane people is to build, run and test their application on every platform that they project it will need to be built, run, and test on. Continuous Integration (CI) can ease this burden a ...


9

You can send the code review back and tell the developer to break it up into smaller, more incremental changesets, and submit a smaller code review. You can still check for code smells, patterns and anti-patterns, code formatting standards, SOLID principles, etc. without necessarily going through every detail of the code. You can still perform tactical code ...


7

If you are asking for "development processes" and you primary development platform is Windows with Visual Studio then I would suggest to try building your project without "windows.h" included. You will get a lot of compilation errors that will point you to many places where you'll need to refactor your code. For example, 'DWORD' won't be #defined and you'll ...


6

If you think that the code review is too hard, because it changed brittle code that is near impossible to change without breaking it, then you have a problem. But the problem is not with the code review. The problem is also not with unit tests, because brittle code cannot be unit tested! If your code was unit testable then it would have been split up into ...


6

The cost of professional tools You severely under-estimate the availability of free tools. Software development is an industry with a wealth of completely free tools that professional developers use every day. Free things that I use regularly in my job as a developer: git (Source control, the major thing you're looking for here.) KDiff3 SourceTree ...


5

You could use your disappointment and upset as a chance to learn something. Any good editor takes frequent snapshots of your study, including emacs and every IDE I've used. You should find an editor that does this and use it. Saving code is usually required to run it so if you are developing locally this should be less of an issue. Of course you can still ...


3

Unfortunately, there's not really much you can do about this at the point of code review other than get another cup of coffee. The actual solution for this issue is to address the technical debt you've accumulated: fragile design, lack of tests. Hopefully, you at least have some sort of functional QA. If you don't have that then there's always praying ...


3

In this situation, the amount of time it would take to verify the safety of the changes, absence of regression, etc. is excessive. Code reviews shouldn't be primarily aimed at correctness. They are here to improve code readability, maintainability and adherence to team standards. Finding correctness bugs during a code review is a nice byproduct of ...


3

It depends on the "some compilation errors" you mention. Without knowing what they were, it's impossible to be specific. I've got cross-platform code for Windows / Linux / iOS / Android / Mac. Each new platform brought some extra errors and warnings when it was first added. You will quickly learn which constructs bring problems. Either avoid them, or ...


2

Answering the questions an order that makes sense to me: Are the identified processes sensible, or are they too abstract? The items on your process list are rather brief and looks to me more like scenario heading names than processes. As I read it, in 4+1 processes are essentially running programs. ... At the highest level, the process ...


2

A possible way to help portability could be to rely only on declarations and features provided by the C++11 standard, and by using cross-platform libraries and frameworks like POCO & Qt. But even this is not fail-proof. Remember the aphorism there is no such thing as a portable program, there are only programs which have been successfully ported (to ...


1

If you're not content to ship with buggy/non-functioning software and fix it later, then V&V effort SHOULD be longer than development effort! If existing code is fragile, then a first question is "should you even be changing it?" Management need to make a call on whether the cost/risk of redesigning and reimplementing this code is greater than the cost/...



Only top voted, non community-wiki answers of a minimum length are eligible