Lurker News
I recently started integrating tmux and vim into my workflows. Obviously, it was a huge efficiency booster. What are some other tools (custom built or off-the-shelf), hotkeys, workflows that were game-changing for you as a dev? I'm interested in hearing about anything and everything (stuff from ctrl+l to clear the terminal to little-known git commands to larger-scale strategies like CI/CD)

Comments (522) 158 threads

Earlier comments
JensRantil#
I sometimes like to leave my source code in a dirty (uncommitted) format where I've left a comment with what I intend to do next. I quickly jot this down at the end of a workday, or if I need to run to a meeting or have a short conversation with a colleague. This reduces friction for me to get started coding next time I'm back by the computer.
jgable1 reply#
Test driven development for my embedded systems work. I’ll never go back.
medecau1 reply#
I got some code going on using pytest and pyserial exactly for this.

Tell us more!

jgable#
Hmm, sounds like you might be automating tests on the target, scripted from the PC. There's a place for this, but I'd call that automated integration/system testing, not unit testing.

Unit testing was traditionally considered impractical for embedded systems, because the code is so closely tied to the hardware. However, with proper architecture and unit test frameworks that simplify your life, it's quite feasible, and indeed enjoyable.
You write unit tests that exercise your embedded code, compiled for the PC, not the target. This ensures your code is portable.
I use the Unity/CMock/Ceedling framework when I'm writing in C, and CppUTest when I'm writing in C++.
I HIGHLY recommend the video courses taught by the guys at ThrowTheSwitch.org (the authors of Unity/CMock/Ceedling). See https://www.throwtheswitch.org/dr-surlys-school
I read and enjoyed James Grenning's book, Test Driven Development for Embedded C, but it didn't really click for me until I took the video courses mentioned above. In the second course, you code an entire simple but realistic embedded project in TDD fashion.

sumnole#
use AutoHotkey+SharpKeys to map macros, especially to keys on the home row. vim macros for recording on the fly. in general prefer keyboard shortcuts and command line tools.

regex is game-changing and regex101 is a great tool for it.
take notes and save snippets so you can refer back to them.
most underrated stack for productivity is proper diet + exercise + sleep.

caviv#
Here is a real nice trick I have learn. How to give Error Code uniqueness numbers to Errors. That helps to find it later (find all) inside the code repository, know who code it and when.

I use this method: https://breakpo.blogspot.com/2020/05/simple-system-to-track-...
YYYYMMDD.XXXHHII
This give a full uniqueness for the Error Code number among the team. XXX is a unique number each one of the developers in the team have.
So an error code could be: 20190412.1001643 For programmer number 100, on the 12th of April 2019 at 4:43PM
This allows me to know how old is the code, and who to blame in no time :-)

Load more comments