HNHacker News
TopNewBestAskShowJobs

Sourya

10 karma · joined July 6, 2011

submissionscomments
Sourya··on New Features in Python 3.8
Good post. I especially like the walrus operator, which, as far as I understand, improves readability and promotes brevity. About positional args, though, if it has been introduced only recently, how does the doc in this reference: https://www.python.org/dev/peps/pep-0570/#numpy-ufuncs use them already?
Sourya··on Some Python Anti-Patterns
Interesting set of pointers. Another point, that I am not sure whether would qualify as an anti-pattern: asking for forgiveness rather than permission. Basically, using "try... except" rather than "if hasattr(obj, attribute)" etc.
Sourya··on Effective Code Reviews – A Primer
When I was the only guy in my team writing code, I found it helpful to put a bit of processes - like having a threshold of test coverage, and running some kind of analysis (flake-8, for example) on my codebase. Another thing I did was letting one of my friends look at a random piece of code in my codebase. He would suggest changes, but what helped more was that I wrote code more consciously than I would if I did it all alone.
Sourya··on Effective Code Reviews – A Primer
I've had my code reviewed face-to-face when I was just beginning my career, and I think that it has helped me learn much more than I would have otherwise. At least for someone who has never written production-ready code (first internship / first job etc), it is hard to understand why a particular piece of code is "bad design" even though it seems correct logically.
Sourya··on Some best practices for using Git
Didn't know about that. Thank you.
Sourya··on Some best practices for using Git
That is a good way to think. Thanks.
Sourya··on Some best practices for using Git
Great pointers. However, I have found that even though quite a few people know this, it takes special effort to enforce it. For example, the single-purpose commits. My commits often tend to get a bit large, and include more than one "unit" of work, even though I know the best practices. Any pointers on how to avoid that?
Sourya··on Should people be eating more fat?
The only unhealthy fat is trans fat. All other forms of fat are good (provided you count the calories). Also fats contain leptin, which helps reduce fat! However, protein does a better job of giving that "full" feeling.