Hacker Newsnew | past | comments | ask | show | jobs | submit | rainy-day's commentslogin

I don't feel like anyone has gotten recommendations right, even though one seemingly obvious approach has not been tried by anyone: allow ratings of favorite works across all media: movies, tv shows, books, music, radio programs, youtube videos. Make a very easy, efficient UI to add ratings. This way you will avoid superficial matches: if I just watched an excellent steampunk cartoon, let's offer a zillion of throwaway crap steampunk. It's not the steampunk part that I liked, it's that it was amazingly done.

If I was a huge fan of books, movies, music, youtube picks of another user, it may be there is a deeper connection of the kind of quality we are both looking for, and so his or her recommendations would be highly relevant.


Recommender systems moved from explicit feedback (like ratings) to implicit feedback precisely because users are less likely to actually rate stuff and also because ratings are subjective; by which I mean your interpretation of 3 stars(good) may not agree with mine(average). I have watched tons of movies/shows on netflix or videos on YT for that matter but have not rated a single video. To address the other part of your suggestion i.e collapse ratings/feedback across media like movies,books,etc. usually it is very difficult to have a dataset that spans multiple media across the same set of users. Even if it is present it would be too sparse (more sparse than usual for a site like YT with a continuously changing content library) to actually help. Though I agree that if anybody can get the recommender right, it is Google with the sheer amount of info it has on each user.


You're kind of suggesting people go in reverse. Ratings were the initial way these things worked but then they moved to more implicit signals. Netflix used to be all about star ratings back in the day; now they want to measure what you're actually watching.

I think the issue of a system determining whether you like the steampunk genre vs the quality of only that particular steampunk video is separate from the issue of ratings.


But also view-time or view-count don't tell the full story of how much you liked that video.

I am not happy with YT recommendations because they suggest crap videos to me and not the finest one available for that topic, just as he said.

The system should rather suggest me a different topic but with the best quality/content available, rather than a super similar video with crappier quality/content.


I'm very sensitive to caffeine and I have come up with one rock-solid rule that works for me: i can have a cup of coffee or tea but then, on the next day, I have to be caffeine-free, no exceptions, ever. The way I explain it to myself is that my body goes into an unnatural mode of operation on caffeine, the mode that is both productive and creative - and even pleasant, but I need some time to go back to normal state, which takes at least a day.

If I have a low caffeine drink like a lightly brewed green tea, I don't get much of the benefit but still get the downside: I need to completely cut off caffeine for a time.


As I think others noted, the attr version does alot more: it adds representation and easily adds compare methods as shown in OP.

Aside from that, this is not a fair comparison because attr names can, and mostly should be, longer, and there can be more of them, e.g.:

    class SomeClass(object):
        def __init__(self, myattr1, some_val, a_bool,
                     my_other_attr):
            self.myattr1 = myattr1
            self.some_val = some_val
            self.a_bool = a_bool
            self.my_other_attr = my_other_attr
And of course they'll need to go into __str__ method as well.


It adds magic.

"Explicit is better than implicit"

~https://en.wikipedia.org/wiki/Zen_of_Python


I feel like a person should be able to back their opinion up (for a specific case, not in general), instead of just mindlessly quoting a line from a bible.


The magic in programming war is eternal and which side you're on ought to just be added to the Myers-Briggs test.


See comment in this post in reply to Glyph. (And don't be a jerk.)


Then let's get rid of the with semantics too, because they add magic.

Compare:

    with open("file.txt") as somefile:
        for line in somefile:
            print line
To the more explicit and clear:

    somefile = open("file.txt")
    line = somefile.readline()
    while line:
        print line
        line = somefile.readline()
    somefile.close()
But I'm still using some magic, I should be more explicit:

    def explicit_readline(fd):
        buff = []
        char = fd.read(1)
        while char != "\n" and char != "":
            buff.append(char)
        return "".join(buff)
    somefile = open("file.txt", "rb")  # just to be sure now
    line = explicit_readline(somefile)
    while line != "":  # to be more explicit, of course
        print line
        line = explicit_readline(somefile)
    somefile.close()
And we could go on like this to replace open with the os module file-descriptor functions, and print with sys.stdout/stderr (because more explicit, right?). But even without getting there, it should be obvious that:

* The "explicit" verison no longer behaves as the original one, because, for example, explicit_readline only handles well the NIX newline character. If I want to provide the same functionality as file.readline() I should add a lot more code.

I've reinvented the wheel for no good reason, and readability has suffered. It may also leave a lingering question in the mind of a read "why did he do that? is there some edge case that wasn't well documented anywhere and he bumped into?".

* I've seen more contrived code do a version of this "more explicit" programming style, to the point of having statements like:

    def f1(number):
        number = int(number)
        return number & 0xff00  # or plug the number parameter in an equation, etc
* ... (not a verbatim example, but along those lines). And that code is redundant and it will fail anyway if another thing other than an int/long/float is passed. It would be certainly saner to have an assert, or simply specify in the docs that said function expects a number (which is implied in the args too).

My point was the "Explicit is better than implicit" means "be clear of your intent". And if I see someone using the attr module (which comes with the standard library), and I'm not familiar with it, I'll read into it. And for it's use case, I think it's clear enough in what it does, and how it should be used.


Oh c'mon Zoidberg, that's a strawman argument. "with" is a Python keyword and the statement syntax is in the grammar. I would expect any working Python developer to know what it is, and even understand how to write a context manager.

...wait wat? It's in the Standard Library? No, I just checked and it's not. Too bad, if it was "blessed" by inclusion in the library I would totally withdraw my objection on that grounds.

You had me going for a second there. ;-)

You make my point for me though when you say that you'd have to read up on it when you first encountered it. That's exactly my point:

The trade off is between one application of attr to the code base to save N time/effort for the current developer one time, versus every bit of lost time/effort of future devs taken to understand the attr package.

It's cute, but it's an in-joke. Don't put in-jokes in code you want other people to use, otherwise they have to "get the joke" before they can work with it. That's what I'm on about.


Weird, in Windows (Python 2.7.10) I have it without having ever installed it. Even pip uninstall didn't get it (just to make sure it wasn't installed from a dependency) but I can still import it.

On my Linux machine (Python 2.7.6) I can't import it without a previous install from pip install (that's reasonable).

Can't track down much about why this happens because googling "python attr" brings results about hasattr, getattr, etc, but few about the attr module.


It's not an "in-joke". It follows conventions set by the Python language:

- "def" instead of "define"

- "cls" instead of "Class"

- "sys" instead of "system"

- "os" instead of "operating_system_facilities"

- "ntpath" instead of "windows_path_names"

- "abc" instead of "abstract_base_classes"

Python aggressively abbreviates almost everything in common use. If it were in the stdlib, perhaps it would be the built-in names "attrs" and "attrib" rather than having dots in them, but the names would indubitably still be very short.


It's an "in-joke" in the sense that it doesn't make sense until you get the joke. There are people in this post discussion asking "What means .s and .ib?" It's not obvious to everyone.


>Then let's get rid of the with semantics too, because they add magic.

With just runs the enter and exit method of a context manager. Nothing magical about it.

>My point was the "Explicit is better than implicit" means "be clear of your intent". And if I see someone using the attr module (which comes with the standard library), and I'm not familiar with it, I'll read into it.

You don't have to read into 'with' to make an intelligent guess at what the code does. It's meaningful even if you've never heard of context managers.

Unlike this.


Nobody specifically wants to outlaw that. Literally nobody. Laws have to have a tradeoff between being too general and being too specific (and having too many special cases). Being too general means catching too many edge cases where it does more harm than good. Handling too many special cases creates a moral hazard where there's more benefit in finding loopholes or plainly ignoring poorly enforced parts of the laws than honest work.

Anecdotally, I did work as a kid, didn't learn anything useful, did not learn responsibility, a bit of money I didn't really need, and it felt like a waste of time and left a bad taste overall.

I fully believe that in many, possibly most cases, work is beneficial for kids (as long as they're not from poor families in which case there will be too much pressure to overwork, affecting school/homework and taking away whatever little time they have to enjoy childhood).


How is this theory different from solipsism?



I think the confusion here may be between strategic and tactical levels. Strategically, your mind decides that it should move in a certain direction. After that initial decision is made, it finds that obsessive judgement is counter-productive, and so it tries to stop. That doesn't in any way mean that initial decision is void.

Another possible reason is that idea of judgement of good and evil is primal in Western religions while in Eastern traditions, the idea of escape from state of confusion is primal. That's not to say that in the West, confusion is not considered a problem, or that in the East, doing or believing terrible things is ok. In meditation traditions, judgement between good and evil is just the first step, like a compass that points you in the right direction. In three major Western religions, once you make the proper judgement and choose the good side, you are done, finished.


I would also add that meditation is a bit tricky in the sense that it increases awareness of what's there - and what's there may be good or bad, but increased awareness is a better gift than merely good or bad things. Noticing more things means I'm not as locked in to my obliviousness. It's paradoxial but having a bad meditation is often beneficial.


In the yoga tradition, meditation is not something you can just sit down and do regularly from the beginning. You are supposed to do asanas to prepare for breath exercises, and breath exercises to allow the mind to concentrate, and then the "meditation skill is unlocked".

The general idea is that sleepiness and sluggishness is a certain outcome of an unhealthy body, as well as anxiety and irritability that are caused by various body aches.

In the worst case, meditation can become a formality, just a checkbox to fill out, a way to spend an indulgent, lethargic half-hour, or the opposite - a constantly distracted, obsessive anxiety (which is perfectly fine and even to be expected at the beginning of a meditation, but not at all times).

That's not to say that meditation is completely off limit: the idea is to do a bit of meditation and breath exercises at first and a lot of asanas, and then gradually increase breath exercises and then concentration; and finally meditation.

But this whole idea that meditation can be counter-productive in some circumstances is not really alien to the Eastern traditions. They are not stupid and they've been doing it for a long time with an empirical, practical approach.


Yes, definitely this. And even before the asana and pranayama (breathing practice) are the yamas and niyamas (yama-niyama-asana-pranayama-pratyahara-dhyana-dharana-samadhi) there are eight rungs to the entire eastern yogic/meditative practice. The whole focus on "meditation" and physical poses by the modern western approach of $50/hr yoga classes completely goes against the eastern method of guru and disciple. There's a reason these things are meant to be studied under a learned master. What's the saying... a little knowledge is a dangerous thing. These practices were studied by students for years before they attempted what some people do in their first couple of yoga classes..

That said, I don't mean to discount the experiences of the individuals described in the article. I think it's terribly unfortunate that anyone has to suffer from practicing meditation and yoga, and also find it sad that they were unable to find a master to help them recover from their experiences sooner.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: