Bash command to check directory recursively and count average line count and average chars per line in files

Bash command: find . -type f | xargs wc -lc | sort -n | awk ‘{prev=curr; curr=$1″ “$3} NR==1{print “Min lines:”, $1, $3} END{print “Max lines:”, prev; print “Total of”, $1, “lines in”, (NR – 1), “files”; print “Avg line count:”, ($1 / (NR – 1)); print “Avg chars per line:”, ($2 / $1)}’; Breakdown …

4 tips for writing documentation – Discoverable, Accessible, Searchable, Handleable (DASH)

Skipping the usual background rant 😛 For me, the purpose of documentation is to save time, not at the point of writing it, but in the future when you use it. When onboarding a new hire or answering a colleague’s questions on my code, I would usually first refer them to the README.md file in …

Guidelines to protect developer time for meetings and sprints

Just came up with some guidelines which I feel would help in protecting developer time with regards to meetings and sprints, mainly by putting in some kind of structure. Disclaimer: These guidelines may not be applicable to everyone or every company 😛 Do read Paul Graham’s article on Maker’s Schedule, Managers Schedule which clearly explains …

10 criteria to rate oneself in a programming language or framework

Was sitting on an interview panel recently and the interviewee was asked to rate himself for the Laravel PHP framework, on a scale of 1 to 10. Some basic questions on Laravel were asked before this but the answers were not satisfactory. His reply? 9/10. Personally, for PHP, I would probably rate myself 5/10, and …