News for hackers. Stuff that matters.

Sourya

Re:New Features in Python 3.8 on Friday August 23, 2019 @05:58AM (#20775933)
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?
Re:Some Python Anti-Patterns on Saturday April 06, 2019 @02:06PM (#19592129)
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.
Re:Effective Code Reviews – A Primer on Thursday March 07, 2019 @10:09AM (#19328584)
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.
Re:Effective Code Reviews – A Primer on Thursday March 07, 2019 @09:51AM (#19328439)
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.
Re:Some best practices for using Git on Tuesday February 26, 2019 @02:53AM (#19252697)
Didn't know about that. Thank you.
Re:Some best practices for using Git on Monday February 25, 2019 @01:59PM (#19248315)
That is a good way to think. Thanks.
Re:Some best practices for using Git on Monday February 25, 2019 @01:09PM (#19247830)
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?
Re:Should people be eating more fat? on Monday October 20, 2014 @12:22PM (#8482947)
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.