Readit News logoReadit News
tumbling_stone commented on Ask HN: What are some examples of good code?    · Posted by u/amingilani
runeks · 9 years ago
Writing code is really a modelling problem: you write down code that describes the model that's inside your head. When you're done, you're left with both working code on a hard drive, and a new, better model inside your head, because you understand the problem better.

So, reading someone else's code can be like reading a model of something that has gone through dozens of iterations, where the bottleneck isn't really understanding "the code", but understanding the thing that is modelled, which the people writing the code are intimately familiar with, unlike you[1].

In my opinion, developing this modelling skill, in yourself, is much more important than watching the result of someone else exercising their modelling skill. A lot can be learned from observing someone else's solution, but this will always be secondary to learning how to craft your own.

[1] For example: try reading compiler code. People have been writing compilers for so long that reading and understanding this code isn't about understanding the actual code, but about understanding how a compiler is modelled (scanning, lexing, parsing).

tumbling_stone · 9 years ago
I completely agree. I've been thinking of replicating a mid-sized project written by a programmer that I respect so that I think a lot more about the model before comparing the code.
tumbling_stone commented on Why many Indian politicians have a criminal record   economist.com/news/books-... · Posted by u/jimsojim
sonink · 9 years ago
How do you buy votes if the ballot is secret ?

Not saying that people don't try, and there is that odd politician who does come only from money. By and large most chief ministers victory can be explained not by money, but more by identity/group based politics.

This is pretty much also exactly the same to what happens in the US.

tumbling_stone · 9 years ago
Politicians don't dole out cash and go pray that the voters will honor their agreement. They have a way of making sure that their bought votes are delivered to them.

Buying votes happens mostly in slums and other non-affluent areas. These are the places where the concept of privacy hasn't yet formed and everybody knows what everybody else is doing. Also, a politician is not expected to work for them his whole term. It is natural to see your local representative only during the times of election. So politicians have the two key ingredients to enforce an implicit contract. But the biggest weapon these politicians have is intimidation. Since it's not hard to mostly figure out the faction that refused to vote for the money they took, they can be persecuted and intimidated.

Of course there's no official source to cite this. My driver is very chatty and quite insightful about the politics in India.

tumbling_stone commented on What programming languages are used most on weekends?   stackoverflow.blog/2017/0... · Posted by u/minaandrawos
kriro · 9 years ago
I'd be more interested in Github commits on weekends vs. weekdays as that is likely to be a better indicator of side projects (due to the "homework factor"). Or maybe Gitlab commits or private Github commits since public Github commits are FLOSS and thus likely to include more side project commits than another data sets.
tumbling_stone · 9 years ago
Interesting idea. I'll give it a go this weekend.
tumbling_stone commented on The sad truth about depressive realism (2006) [pdf]   researchgate.net/profile/... · Posted by u/lainon
throwaway7312 · 9 years ago
There's a difference between beating depression, which the parent comment is talking about, and being 'over' depression, which is what your comment is talking about.

Beating depression requires mastering one's own inner life and changing the mechanics of how one thinks and interprets the world. This really does give you super powers coming out of it. And it makes you essentially depression-proof. Those 2% to 9% of people committing suicide are not people who have beat depression.

Getting 'over' depression is what happens when the depressed individual experiences a change in life circumstances or another external or temporary internal event that removes the depression for now. That depression can always come back, and among the people I know who haven't beat depression, it always seems to. They never get the 'super powers' because they never beat it.

Most of the highly successful, most gregarious people I know were deeply depressed at one point, beat it, and became expert problem solvers with superhuman capacities for perseverance. You could take their business from them, have them walk in on their spouse cheating on them, and find out their children aren't theirs and they'd be sad for a week or two then get right back on with rebuilding their lives again as soon as they finished deconstructing the problem and mapped out a new path for themselves.

Depression almost seems like a gauntlet certain high potential individuals have to pass through. Some of them make it through the gauntlet and get those super powers. Others don't make it through the gauntlet, step out for a breather, then go back in again. Then maybe they make it through that time, or maybe it's back out, then back in again. I have family members who've been sucked into the depression gauntlet repeatedly without ever beating it, and you can tell they have the potential for 'super powers', but never get them.

tumbling_stone · 9 years ago
This is exactly how I had assessed my situation. I had been largely depressed for the entire duration of my college, and no matter what I did I simply couldn't come out of it. However, with a slight improvement in the circumstances I could get back on track. But, it was just getting back on track and I realized that if the circumstances were to change I would be back to my state being depressed. I was so scared of going back to that fucked up state that I decided to radically change my thinking and behavior patterns until I could stomach the the nastiest crap hurled at me. Now I wouldn't say that I have any super powers even though it has been more than two years since I made that resolve, but I sure as hell am more happy and productive than ever in my life. Surprisingly, it's the practice of stoic philosophy (to me it means Karma Yoga, pioneered in the book Bhagwat Geeta, which bears uncanny resemblance to the stoic philosophy pioneered by Seneca and Markus Aurelius) that has helped stabilize my ever confused mind.
tumbling_stone commented on How Sidekiq makes $80,000 a month   indiehackers.com/business... · Posted by u/networked
lacampbell · 9 years ago
Great article. I feel like "exciting" applications that made it big get far too much of our attention. There's real value you can create by doing something "boring" like a background job framework.

Most business solve boring business needs. Find something you find interesting and exciting, that most people regard as a boring chore - and solve the problem in a tidy, approachable way. Is this a more reliable way to actually make a living on your own?

tumbling_stone · 9 years ago
True that. I had been thinking on similar lines myself. If you observe the restaurant industry, an exciting menu isn't the only thing responsible for its success, sure it night help, but most restaurants will have similar items in their menu. The key is boring things like sustaining the business for sufficient time until it crosses a threshold of patronage and consistency in the taste of the food. So yeah, exciting things are overrated.
tumbling_stone commented on How to be mediocre and be happy with yourself   bbc.co.uk/news/business-3... · Posted by u/sjcsjc
jrs235 · 10 years ago
Seriously, everyone should read The Underachiever's Manifesto: The Guide to Accomplishing Little and Feeling Great[1] (after they turn 18, in hopes it doesn't encourage them to drop out :). I'd recommend getting a used hard copy and placing it on your coffee table. It's a quick and humorous read that helps bring the lighter side of things back into perspective.

[1] http://amzn.to/2bAi7dN

tumbling_stone · 10 years ago
It's really irritating when somebody recommends a book that really interests me but I simply can't afford it here in India. My wish list is getting longer and longer with each new book costing more than the cost of a whole weeks worth of meals. Not one to download PDFs illegally or to read them on Kindle, which again is not guaranteed to be within my means, I greatly limited in my accessibility to paperbacks of my liking.

u/tumbling_stone

KarmaCake day17March 17, 2015View Original