News for hackers. Stuff that matters.
Re:Ask HN: Is my code any good? by xavierd on Sunday May 03, 2015 @04:06AM (#9480452)
I would say you're documenting way too much: the obvious shouldn't need documentation.
Re:Ask HN: Is my code any good? by cFire on Sunday May 03, 2015 @04:20AM (#9480473)
It's more a matter of what you consider to be obvious in this case. In my experience, especially regex matching can become very not-so-obvious if you're coming back to code you wrote some time ago. Or if someone else is reading it.
Re:Ask HN: Is my code any good? by richardwhiuk on Sunday May 03, 2015 @08:05AM (#9480974)

		# Do NAT table lookup
		n = natlookup( p1, p2 )
is clearly unnecessary. If natlookup doesn't do a NAT table lookup, it's a badly named function.