Hacker News Comments on
Kevlin Henney - Seven Ineffective Coding Habits of Many Programmers
NDC Conferences
·
Vimeo
·
5
HN points
·
1
HN comments
HN Theater has aggregated all Hacker News stories and comments that mention NDC Conferences's video "Kevlin Henney - Seven Ineffective Coding Habits of Many Programmers".
Vimeo Summary
HN Theater Rankings
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this video.
⬐
Oct 15, 2018
·
jpfed on
Alternative code styles
Kevlin Henney gave a talk ( https://vimeo.com/97329157 ) that included an interesting idea for style:Imagine every non-whitespace character in your code were replaced with garbage. Indent so that the reader could still understand the structure of your code.
⬐
⬐ collywI find the "no/less comments" always seems to come from Java programmers. In Perl / Python you can easily do the equivalent of a screen full of Java code in a couple of lines. In these cases I think it is helpful to comment liberally and explain what a list comprehension, or map is doing.Comments adding signal to noise? I agreed with him on that point, but thinking back, I find the most useful time to have comments is when looking at someone elses unspecced code for the first time.
This is pretty close to a real world example I had to fix.# open file file = open('filename' 'rw)) # seek to bit 8 file.seek(8)
Now The comments should have explained what we expect to see in the file. What happens at byte 8? I still have no clue, and fixing the bug in that code took me nearer to a week than the day it should have done.