<commit_before>---
layout: single
title: Code review2
date:   2017-04-15 12:40:02 +0100
categories: [dsp17, cs]
excerpt: TODO
---

## Best practices

Don't merge with code review **TODO
Self reviewing

## Some tips from my experience

### Perfomance
don't get records from db in for loop

### Refactoring

### Bug fix

### New feature
<commit_msg>Update code-review2<commit_after>---
layout: single
title: Mistakes in code review
date:   2017-04-15 12:40:02 +0100
categories: [dsp17, cs]
excerpt: TODO
---

Usually mistakes in code review come not from mistakes from reading changed code, but from not reading relevant
not changed code. It's important to check the context of reviewed code and other relevant places. Also viewing bigger picture is important - maybe achieving the same purpose could be done in an easier way? It's also hard to come up with code which should be written but it wasn't, for example not all exceptions where caught.


## Best practices

* check unit tests

Don't merge with code review **TODO
Self reviewing

## Some tips from my experience

### Perfomance
don't get records from db in for loop

### Refactoring

* name of method changed - check if it was changed in all places

### Bug fix

### New feature

{'fraction_non_alphanumeric': 0.07922392886014551, 'fraction_numerical': 0.03395311236863379, 'mean_word_length': 4.094650205761317, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5488317', 'n_tokens_mistral': 381, 'n_tokens_neox': 341, 'n_words': 180}