Tag Info

New answers tagged

-4

Learn C Programming This blog is very much useful in learning C Programming


0

Nowhere in your post do you mention how others around are treated. You keep repeating that you "feel" you're being "singled out" because you're "a woman". I think you're being treated like a junior programmer regardless of your gender and you should be thankful for that, because that's what equality means. I also feel you're making a huge fuss over minor, ...


0

I don't feel that rejecting my branch on this basis is useful. Lots of people were working over the weekend, and I had never said that I would be working. Effectively, some people were probably blocked because I didn't have time to make the changes and resubmit. We are working on a project that is very time-sensitive, and it seems to me that it's not ...


2

I would argue if there is a piece of code you need to run or debug first to understand what it does, the code has to be improved in terms of readability, and the review which has revealed that was quite effective.


4

Code review is mostly about the readability and maintainability of the code. You also have a sanity check on whether the changes relate in any way to the actual change request. If it confuses the code reviewer it will probably confuse any one who has to amend the code subsequently. Yes code reviews can pick up other potential bugs, but most of these could ...


4

In our team, the style and general coding rules are checked by code analyzers with every build. Therefore when we review the code, mostly the code written by juniors, we try to spot the parts that does not follow the architecture and design patterns because these cannot be checked automatically by tools easily. We don't run the code because it is mandatory ...


12

Where I work, the author of the code changes is responsible for testing that those changes actually work, while the code reviewer is typically responsible for finding any issues with the readability/maintainability of those changes or spotting corner cases the author might not have thought to test for. In general, the reviewer looks for the sort of problems ...


4

is it really effective to review changes just by reading the code (...)? If you have enough practice coding you will be able to spot bugs without software/coding environment. It's good practice to read raw text and try to pick out the errors (logic or syntax). It will help you become a stronger programmer.


0

A few things (to be honest, most of these are covered across the answers, but I wanted to put them in a single place) You can put process and rules in place to make sure a code-review happens, but it's pretty impossible to put them in so that code-review is actually more than a box-ticking exercise. Ultimately the team has to see the benefit of the ...


-2

I think you should create a template and ask your team members to update it every time they do a code review. But even then, you should participate in the review process initially.


-1

I'll tell you how my team quickly integrated code review into its workflow. First, let me ask you a question. Are you using a version control system (e.g. Mercurial, Git)? If your answer is yes, then proceed. prohibit everybody from pushing anything (even small fixes) directly to the master branch (trunk)* develop new features (or fixes) in separate ...


67

I'm going to offer a different take from my fellow answerers. They are right - be involved if you want to see how things go. If you want more tracability, there are tools for that. But in my experience, I suspect that there's something else going on. Have you considered that your team may feel that the process is broken/stupid/ineffective for most commits? ...


2

You could document what the team wants in code reviews that you've discussed and agreed with developers. Some things you could consider as part of code reviews are: Check that the code does what it's supposed to do i.e. it meets the requirements Code style to ensure that developers are coding to a consistent style Optimisation e.g. number of function ...


3

You sort of answered your own question... "Feature" reviews are what integration and system tests do. In a requirements based test environment, the tests are developed independently from the code and are used to verify that whatever the code implementation turns out to be, it still does what the requirement said it should do. If there are no requirements, ...


41

I dislike posting one-line answers, but this one seems appropriate: Participate in the process.


6

Get a tool, like ReviewBoard or Redmine's codereview plugin. Then each review is created as a task that has to be closed or commented upon by someone (just like a bug ticket). Then you have traceability of who created the review ticket, and who closed it. You can tie review tickets with source code checkins, ie create the ticket from a revision.


3

Code review is just the first gateway to quality - not the only one. Its a very quick and easy way to ensure that what is going through to further verification is basically acceptable. So it is to ensure there are no stupid mistakes, and that it passes whatever standards of code style or guidelines you have - code that looks wildly different to the rest of ...


-2

Consistent style is important for code maintainability. Not doing the wrong thing is important for code correctness. Here are two suggestions as to how you can achieve what you want without alienating other team members: Have the appropriate tidy tool as a checkin hook Have the appropriate lint tool as part of the build toolchain. This way nobody's ...


1

Besides the excellent points made by Sparky (items 1 and 3) and Donscarletti, this post brings me to another one I answered a long time ago: How do I document my code?. Lots of people are or call themselves programmers, some are good, not many are excellent. Just like in many other walks of life. You can decide to judge those who appear less good than you ...


2

If I were presented code like this in a code review, I'd have two questions to pose: Why did we elect to write it this way? Since bit manipulation like this is used to circumvent some sort of performance bottleneck, one would presume that we have a bottleneck that is rectified if we employ this approach instead. An immediate follow-up question would be, ...


2

Replacing if-s with arithmetic/logic expression is sometimes necessary where long processor piping is required. That makes the code to always run the same instructions whatever the condition, making it more suitable for parallelization. That said, the provided sample is wrong, since the two samples are not equivalent: if (b) return 42; else return 7; ...


2

Something like the following would go a way toward making the INTENT of the code more apparent: manifoldPressureFloor = (b * 42) | (~(b - 1) * 7); return manifoldPressureFloor; manifoldPressureFloor is totally made up, of course I have no clue what the original code is actually about. But without some kind of explanation or justification for the ...


6

Odds are, someone writing (b * 42) | (~(b - 1) * 7) is either someone who knows very little about programming trying to pretend to be experienced/knowledgeable/etc, or is someone trying to sabotage a project (i.e. they're too experienced/knowledgeable/intelligent and want job security). The first type of person wants to show that they know how to use NOT, ...


38

The second code does not return 42 or 7. for b = 1: (1 * 42) | (~(1 - 1) * 7) 42 | (~(0) * 7) 42 | (-1 * 7) 42 | -7 -5 for b = 0: (0 * 42) | (~(0 - 1) * 7) 0 | (~(-1) * 7) 0 | (0 * 7) 0 | 0 0 And yet when you posted it, you thought it did, which is exactly why you should avoid convoluted code. However, take some "correct" code ...


3

If the branches in the if/then/else are a problem, then it's probably easiest to just switch to something like: static const int values[] = {6, 42}; return values[b!=0]; This actually works and although some may find it marginally less readable than the if/then/else, it certainly shouldn't be a noticeable obstruction to anybody who knows C or C++ at all. ...


84

There are several questions that you raise. 1) Is this a clear sign that the coder is not cut out for professional programming? No. Developers often go through stages where they learn about an idea and want to apply it. Do they always apply these ideas efficiently and/or effectively. No. Mistakes are made, and it is part of the learning process. If ...


108

The first rule of any professional software engineer is to write code that is comprehensible. The second example looks like an optimized example for an older, non-optimizing compiler or just someone who happens to want to express themselves with bitwise operators. It's pretty clear what's going on if we are familiar with bitwise operations but unless you're ...



Top 50 recent answers are included