Better HN
topnewbestaskshowjobs
Log inSign up

Sourya

10 karma · joined Jul 6, 2011 (15y ago) · 10 submissions

Submissions

1.

Persistent and fault tolerant key-value store written in Rust(github.com ↗)

3 points · by Sourya · 5y ago · discuss

comment 7y ago · link · parent

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?

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

Didn't know about that. Thank you.

comment 7y ago · link · parent

That is a good way to think. Thanks.

comment 7y ago · link · parent

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?

comment 12y ago · link · parent

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.