VS Code is the gift that keeps on giving. Every time I think I know everything about it, I discover a new feature so useful that it completely changes the way I work. This time around that feature is the VS Code Test Explorer.
If you are like me, you use pytest or the Django test runner for testing your Python applications. And you might even run your tests in VS Code debugger by adding the test command to your
/.vscode/launch.json config file. And then
f5 and voila, your tests are executing with debug output and breakpoints.
But it can be so much better! By enabling the Test Explorer (from the VS Code python extension), VS Code will automatically discover tests as you write them, and add them to the Test Explorer UI. You can then run your tests directly form the IDE, with breakpoint support, and see failures and debug outputs. You can even select specific tests in-line from the code!
I am stoked to have discovered this feature, and saddened by the thought of all the time spent running tests in terminal. This will definitely change the speed and quality of my tests - and I reckon it will for you too!
People often ask me whether web development is hard. I usually tell them "no". The reason is that most of the time we web developers simply interact with a documented API or SDK. Our job is to: i) decide what to do, ii) find the documentation for that thing, and iii) follow the instructions.
Of course, deciding what to do is the hardest part. This is especially true when starting a new web development project. There are a tonne of choices to make straight away: framework and dependencies, directory structure, should I be using a static type checker, performance and deployment considerations, just to name a few!
The Opinionated Guide to React is great because it steps through each of these choices and succinctly summarises the landscape of options. Sara (a kickass advocate of the React community) provides her honest opinion on each matter. I find it reassuring that someone like Sara wrestles with the same project-kickoff dilemmas.
You might not agree with all her opinions ... I don't (see: directory structure). But you'll definitely benefit from this quick read!