I got this from the Clean Code Lectures by Uncle Bob. It forces you to keep your comments small, or make them obsolete, by making the code self-explanatory, or in case a comment is appropriate, it highlights it as important.
"Hidden" GitHub VSCode editor
GitHub has a nice feature when inside a repository in the browser. Press the key .
(period) on your keyboard, to open a VSCode editor of the project inside your browser.
Documentation directly next to your code is great. With ASCIIFlow you can easily draw schemas of your architecture, database, or processes to explain your code better. But keep in mind that documentation easily goes out of date.
Avoid using integers as keys for model field choices (or any other Enum). They convey more information, without looking back at the code, in case you are required to work with them for example in templates, or in JavaScript.
Sometimes you need to debug something that works on your desktop, but not on mobile. Eruda is a console for mobile browsers. Keep a javascript snippet saved as a bookmark, visit the site you want to inspect, then select the bookmark in the address bar. This gives you an icon on the bottom right, that opens a console on your phone.
Instead of using document.querySelector
to reference an HTML Element in the Console, you can inspect the HTML in the browser, select the desired element with the inspect tool, and use $0
to reference it in the console.