testing

Testing Groovy code with assert, Spock, and JUnit.

Code Review in Python: Reading and Improving Other People’s Code

Code review is the skill that decides whether you look like a junior or a senior, because most of your career is spent reading code someone else wrote, not writing fresh code on an empty screen. This post teaches you how to walk into a messy file you have never seen, understand it, prove you understand it, and improve it without breaking anything. “Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are ... Read More

ML: Train/Test Split & Cross-Validation

Test a model on the rows it trained on and it will flatter itself every time. A train test split in Python fixes that: hide a slice of the data, train on the rest, and let the hidden slice deliver the only score you can trust. This guide covers the basic split, stratification, K-Fold cross-validation, and the three-way validation setup, all with runnable scikit-learn code. “Testing on your training data is like grading your own exam. You will always think ... Read More

Statistics: Hypothesis Testing with t-test and chi-square

Perform hypothesis testing in Python: null and alternative hypotheses, p-values, t-tests (one-sample, independent, paired), chi-square, and a decision tree for choosing the right test (including where ANOVA fits) in this hypothesis testing python guide. “To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination.” Ronald Fisher, Statistical Methods Last Updated: July 2026 | Tested on: Python 3.14.6, SciPy 1.18.0 | Difficulty: Advanced | Reading Time: 16 minutes Your ... Read More