Ask HN: How persistent and smart do you have to be to learn to program? - <AUTHOR> I'm a beginner trying to learn Ruby on Rails. Most tutorials show who to .reverse strings of text. I want to create user logins not reverse text!
I usually go through the course and never understand how I am going to use them when buildings apps. Learn how to print 1+1 is boring and demotivates me. When am I going to learn the good stuff?
Has anyone else had this problem?
original question on Quora: http://www.quora.com/How-persistent-do-you-have-to-be-to-learn-to-program <comment><USER2> One strategy is load up some interesting project already written onto your workstation and dive in and tweak away. You will 'get your hands dirty' in good code and get some instant gratification from the changes you make. Along with that, work on building your basic scripts and projects, when you feel confident with tweaking code go back to coding from scratch, get frustrated, go back to tweaking stuff...

</comment><comment><USER3> If you're not seeing how you're going to use these things iqwn your own code, you should have a think about why that is; these techniques are the basis of everything else that you're going to do. I've been learning for 6 months now, and I can say I'm definitely still using "boring" stuff that I learned when I was doing the first cocademy tutorials. I learned a bit of python, realised I wanted to put a lot of it on a web page and then went to Django from there. I'm still making a lot of mistakes, so you do need to be persistent, but smart? Not for the basics, not really, just willing to learn. There comes a point where you need to be smart, but it's further down the line than I am. I can _get away_ with the clunky hacks and boilerplate code I often end up using but I pay a price for that in terms of speed of delivery and performance. It'll get better over time.

</comment><comment><USER4> > I'm a beginner trying to learn Ruby on Rails. Most tutorials show who to > .reverse strings of text.

Don't use an online tutorial, you need more. You really probably should learn the basics of programming Ruby before diving into Rails, but, if learning the basics is demotivating and you need a deep dive, I'd recommend you get the book _Agile Web Development with Rails_ [1], which is a pretty good dive into rails that covers a lot more than any web tutorial will.

[1] [http://pragprog.com/book/rails4/agile-web-development- with-r...](http://pragprog.com/book/rails4/agile-web-development-with-rails-4)

<comment><AUTHOR> Would you recommend the book for beginners with minimal knowledge?

<comment><USER4> I'm hesitant to recommend diving straight into Rails for beginners with minimal knowledge, but if someone in that situation wants to dive straight into Rails, I think AWDR is the best vehicle.

</comment></comment></comment><comment><USER5> > I'm a beginner trying to learn Ruby on Rails.

Really? That's like learning Calculus before addition and subtraction. I recommend that you learn basic computer programming before trying to learn how to manage a development scheme like Rails.

> When am I going to learn the good stuff?

Don't try to start at the top, you will crash and burn. Start at the bottom and work upward.

There are many ways to start, and reasonable people may differ. I personally recommend that you learn Python first -- it's very approachable and it teaches you the basics first.

[https://wiki.python.org/moin/BeginnersGuide](https://wiki.python.org/moin/BeginnersGuide)

</comment><comment><USER6> Not particularly smart I would say. Frameworks exist partially to make the process of creating programs easier and quicker.

Very persistent I would say. I have a lot of persistence, but I don't think that I have enough.

For now, put the train set away, and learn Ruby. With enough persistence, you could end up beating some professionals.

I looked up reversing strings in Ruby and ROR, no wonder you're bored. I had to write all this to get it done in C and it was quite entertaining:

      char *reverse(char *s) {
        char *a=s, *b=s+strlen(s)-1, c;
        while(a<b) {
          c=*a;
          *a=*b;
          *b=c;
          ++a;
          --b;
        }
        return s;
      }

</comment><comment><USER7> About two years

I'm serious, two years of an hour or two a day (at least!) will give you enough foundation to really enjoy it. You have to start with tutorial, use the sample projects you build and change them drastically. Break them, improve them, talk to people about them.

The issue that is most common is the starting momentum is difficult. There are some concepts that are dead simple in programming, by their nature they are composable. The composition of simple concepts form virtually all the higher level concepts. It's not so much learning to code as it is learning to think in a certain way.

</comment><comment><USER8> As someone who doesn't know Ruby, my only advice relates to coding in general. When I first started out with absolutely no experience at all, I started by getting a basic understanding of the language and trying to write small apps. It felt more rewarding to have a goal in mind, even if the app would never be shown to anyone else. Also I'd recommend not copying any code that you find on the internet verbatim. Coding becomes an art form and you don't want to pick up the bad habits of some developers by using code snippets you find around.

</comment><comment><USER9> I concur with lutusp and also recommend learning Python first (or at least raw Ruby).

Before you start working with huge, highly opinionated framework such as RoR, you should understand how programming in general works. ifs and elses, functional programming and object oriented programming, patterns etc.

Regarding your question. You have to be very persistent - there's a huge amount of stuff to learn. Months of active study and tinkering with tutorials and small projects.

If all you want is to whip out a login page and a blog, then maybe it'd be better to use a CMS?

<comment><AUTHOR> Thanks for your reply. Would you recommend this course by Udacity? [https://www.udacity.com/course/cs046](https://www.udacity.com/course/cs046)

Its in Java and seems to teach you how programming works. How difficult is it to transfer from Java to Ruby?

<comment><USER9> Programming is a very peculiar thing. Peculiar, because if you understand general concepts and ideas in programming, then learning various languages wouldn't be a problem at all (generally speaking, there are some exceptions).

That course you've picked is fine for basics of programming and even though a lot of people like to hate Java, it's a fine language and it'd be easy to start with it. As czardoz recommended, if you'd want to learn python, then learning python the hard way is also great book. I personally prefer that way of learning.

</comment></comment></comment><comment><USER10> I think it is the sort of skill some people get it some people don't.

I did a intense year long IT conversion course in 2000 (dot com boom time). The course started with 3 weeks of intense Java teaching followed by an exam. If the student failed the exam, they were advised not to take the course. A couple of the people decided to stay on anyway, and didn't do very well afterwards.

</comment><comment><USER11> Try learning and getting familiar working with and manipulating the more basic data structures like String, Array, Integers.

These data structures usually get ported across various languages.

Once you have a good grasp of that try starting work on the tutorials they have on Rails you can find online.

</comment><comment><USER12> I taught myself conventional programming with javascript over the last few years by virtue of my fascination with audio. The 'web audio api" exists hence a lever is in place to keep me going through the inevitable "trough of sorrow" dips.

</comment><comment><USER13> I think it's not hard to learn how to program but it's hard to be good at it and be able to continue working and being productive when you encounter uninteresting parts of a project.

</comment><comment><USER14> Are you a professional actor?

<comment><AUTHOR> lol my username had been taken and I am a couple of accounts and I forgot login details for them so I used James Francos name.

<comment><USER14> I wonder why I got downvoted for a logical question like that. What if you were James Franco?

<comment><AUTHOR> I'm not. I wish.</comment></comment></comment></comment>


OpenAI bot remains undefeated against world's greatest Dota 2 players - <AUTHOR> https://techcrunch.com/2017/08/12/openai-bot-remains-undefeated-against-worlds-greatest-dota-2-players/ <comment><USER2> The title is misleading. It was defeated by other non-pro players at the KeyArena.

One player said how it defeated the bot: The general strategy is to win by claiming first tower. At 0:00, you aggro the enemy creep wave so that they start following you. Then you walk around in a circle around the jungle, and the enemy wave will start to form a congo line that will follow you around. You then path around the jungle so that on the next wave spawn, you can aggro the wave again and continue to walk around in circles. The AI will burn glyph when your creep wave hits the tower, and for some reason it can't really decide between chasing you or defending the tower. So after about 5 minutes of doing this, your creep waves will eventually destroy the tower and you win the 1v1.

I stared wind lace + 3 salves. You can outrun the creeps and the AI with the extra movement speed, and the salves will give you enough sustain to live through a few minutes of creep damage. You can also use the courier to give you more salves, but I found it doable using only 1 salve.

Source : [https://www.reddit.com/r/DotA2/comments/6t8qvs/openai_bots_w...](https://www.reddit.com/r/DotA2/comments/6t8qvs/openai_bots_were_defeated_atleast_50_times/)</comment>


Data Mining Reveals How Social Coding Succeeds and Fails - <AUTHOR> http://www.technologyreview.com/view/530511/data-mining-reveals-how-social-coding-succeeds-and-fails/

<comment><USER2> This is really neat. It's a shame that they didn't take a look at this through an anthropological lens (even in their conclusion), because "Dunbar's number" [0] would have given some perspective on the limits of small groups, where a community of 30-50 seems to be a well-established grouping size (and ~100-250 seems to be the limit for a "small" group).

For that matter, this seems relevant to the anthro theory that communities fall into one of four types of organization (families/bands, tribes/clans, chiefdoms, and states) [1]. In this context, it looks like the authors have identified the emergence of these groupings of organization, especially through their metric of "efficiency" and how bands and tribes differ.

0: [http://en.wikipedia.org/wiki/Dunbar's_number](http://en.wikipedia.org/wiki/Dunbar's_number)

1: [http://en.wikipedia.org/wiki/Sociopolitical_typology](http://en.wikipedia.org/wiki/Sociopolitical_typology)</comment>


Digital Domain's New Legal Setback Freezes VFX Tech Used by Major Studios - <AUTHOR> http://www.hollywoodreporter.com/news/digital-domain-mova-tech-banned-906902 <comment><USER2> Wow, that is something of a plot for a Hollywood thriller. I'm at a bit of a loss as I don't have any clear idea of what "MOVA" is. I'm quite familiar with motion capture software and using it with a tagged model (where rotation points are co-tagged with points in a motion capture sequence) because an acquaintance of mine was doing that in the early 2000's but it seems like it would have to be much more than just that to be non-exportable.</comment>


Ask HN: Why is there still no facebook app for iPad? - <AUTHOR>

Months have gone by and nothing. I can only think that there's bad blood between fb and apple. <comment><USER2> Why would you need a FB app for iPad? FB looks awesome on the iPad as is. In fact when you visit FB on the iPad you're actually served a (slightly) different version of FB than if you visit in the browser.

iPad is all about HTML5+JS apps...Facebook is a sweet HTML app in and of itself.

<comment><USER3> This. Unlike a tiny iPhone (or Android) screen, the fairly information-dense Facebook user homepage looks great on the iPad.

</comment></comment><comment><USER4> I think it's some kind of protest against Apple.

<comment><AUTHOR> Over what though? And what's the point if no-one knows you're protesting.

</comment></comment><comment><USER5> i don't use facebook or have an ipad, but what does the iphone app do that their mobile website can't/doesn't?</comment>


Avoid News (2012) - <AUTHOR> http://www.dobelli.com/en/essays/news-diet/ <comment><AUTHOR> In the light of #deleteFacebook another big point against social media might be this old essay.</comment>


Excessive line breaks are bad - <AUTHOR> http://lkml.iu.edu/hypermail/linux/kernel/2005.3/08168.html <comment><USER2> Big discussion about this post a few days ago:

[https://news.ycombinator.com/item?id=23356607](https://news.ycombinator.com/item?id=23356607)

</comment><comment><USER3> I'm confused. This page [1] claims to be the "Linux kernel coding style" and it says "The limit on the length of lines is 80 columns and this is a strongly preferred limit". So he's reversing that without actually updating the guide? And without setting a new limit? He implies maybe "100" is a good limit but maybe "142" is even better? Weird.

I know he's primarily talking about terminal output not code, but he implies it's for code too "and our source code is fundamentally wider as a result". Seems like a very sloppy transition of a huge project to a new vague standard? I'm not impressed the clarity here.

[1] -[https://www.kernel.org/doc/html/v4.10/process/coding- style.h...](https://www.kernel.org/doc/html/v4.10/process/coding-style.html)

<comment><USER4> The discussion was originating from this patch:

[https://lkml.org/lkml/2020/5/28/78](https://lkml.org/lkml/2020/5/28/78)

[https://lkml.org/lkml/2020/5/28/1237](https://lkml.org/lkml/2020/5/28/1237)

Although you're right that his comment made the coding standard ambiguous, I found myself agreeing with Linus in this particular case. What we need to do often in a large C project is to grep some function prototype against the source tree, and it sucks if it's wrapped like this.

</comment></comment><comment><USER5> Fully agree. Lines should be as long as they need to be, and break where it makes sense, not because some arbitrary limit that stems from a technical decision 40+ years ago is hit.

</comment><comment><USER6> I liked this comment elsewhere in the thread:

"Tab depth use in the kernel is more or less

      $ git grep -Poh '^\t+(if|do|while|for|switch)\b' | \
      sed -r 's/\w+//g' | \
      awk '{print length($0);}' | \
      sort | uniq -c | sort -rn
      903993 1
      339059 2
      89334 3
      18216 4
      3282 5
      605 6
      148 7
      36 8
      4 9
      1 10

[http://lkml.iu.edu/hypermail/linux/kernel/2005.3/06570.html](http://lkml.iu.edu/hypermail/linux/kernel/2005.3/06570.html)

I like seeing these "back of the napkin" sorts of code snippets revealed... this is the sort of thing that happens frequently but isn't ever shared because of its throwaway/ephemeral nature.

And also, yeah, low tab depth is way more relevant than line length as far as clean code.

</comment><comment><USER7> This rant feels a bit banal, like it's going up against a straw-man just to be ... a rant. On one hand, I can't think of the last time a developer in an org I've worked with hasn't _conspicuously and regularly_ used text windows wider than 80 columns. On the other, well-written code (and prose!) also exploits _limiting_ line length for clarity and readability. There's clearly a balance, helpful rules of thumb paired with useful times to break those rules.

To be honest, the worst regular example I encounter, in either direction, is Markdown source with no hard line breaks. Markdown fully supports them, and trying to read paragraphs in whatever-hundred character lines is a painful exercise. Such irony, since part of the beauty of Markdown is dual readability in both source and rendered forms.

</comment><comment><USER8> > But still - it's entirely reasonable to have variable names that are 10-15 > characters and it makes the code more legible. Writing things out instead of > using abbreviations etc.

This is my main justification for ignoring any particular limit on line length when writing code, especially when I'm using libraries that have really long method names.

</comment><comment><USER9> I like 80-ish character lines. I'm glad Linus is yelling about this though, dogmatic beliefs are the root of much evil.

</comment><comment><USER10> I fully agree with his opinion! This deserves to be in the top of HN!

</comment><comment><USER11> After missing some errors in long lines during code review, i feel like <60 should be the target. side by side diffs are most common view for me in 'github flow'

<comment> sh-run I have no problem with 80 lines side by side with vscode taking up half of my 3440x1440 display (so 200px less wide than a single 1920 × 1440 display). Even with the extra space taken up by the github UI, I can't imagine 40 additional chars is a big deal.

Even at 80 I occasionally sacrifice readability for line breaks to keep my company's linter from throwing a fit. 60 does not sound like a good idea to me.

</comment></comment><comment><USER12> I'm impressed to see this from Linus. We've had terminals wider than 80 chars for awhile - a limit I think needs to be revisited.

<comment><USER13> Vt100's could do 132 back in the late 70's</comment></comment>


Amazon Starts Selling Software to Mine Patient Health Records - <AUTHOR> https://www.wsj.com/articles/amazon-starts-selling-software-to-mine-patient-health-records-1543352136 <comment><USER2> If you want to play with this and you're looking for a decent sample exam note, I grabbed some pieces of standard looking notes (Physical, ROS, Hand exam) and tossed them into a gist here: [https://gist.github.com/molsches/32fcec2499e95b5b23bc268800e...](https://gist.github.com/molsches/32fcec2499e95b5b23bc268800e22780)

Mostly impressive in how it parses the data and can find conditions and tests in the unstructured data. Handles a few things strangely, but I imagine that gets better over time as it continues to be trained.

I think for it to truly be useful it needs some layer of semantic data mapping to something to standards like IMO/SNOMED/LOINC/RxNorm etc but I could see that being where other companies build their "products" on top of AWS vs. AWS competing with other Healthcare ML vendors in the space.

<comment><USER3> Did you grab several pieces from several notes? This looks like a garbled mess to me, but if I understood how you had transformed it to get it into this state, it might make more sense.

<comment><USER4> The posted text is actually a series of "dot phrases" or "smart texts" (aka templates in EHR speak), _not_ actual notes. Mostly these are inserted into clinical notes to achieve a certain level of documentation; typically they are saved in a "all negative" format, and the relevant parts are edited to reflect the patient history and physical. These seem to have been derived from the Univ of Washington Emergency Medicine residency.

These might make OK material for some initial testing but they don't reflect a real clinical note. A good source of those might be the MIMIC database [1]

[1] [https://mimic.physionet.org/](https://mimic.physionet.org/)

<comment><USER2> Of course. I mostly wanted to get something out quickly. Those are all a bunch of small snippets of ROS and Physical Exams which demonstrate many of the things which the article discussed, notably finding Dx, Medications and whether or not they were negative or not.

I didn't know that there was a database of notes like MIMIC! I'll have to check it out.

</comment></comment></comment></comment><comment><USER5> I work in the tech healthcare industry. I wonder why they only went with (or focused on?) ML/NLP text analysis to analyze data. There is a wealth of discrete data available in EMRs (pharmacy, lab, eMAR, etc.). Yes, there is plenty of diagnosis text but that is almost always associated with ICD10 codes. The only area where I believe text analysis would be useful is documentation and microbiology data, and in many cases micro is discrete as well.

<comment><USER6> Ex-healthcare IT data person weighing in with a probably ridculous idea:

The focus on NLP is because in 20-30 years, discrete data won't be entered into EMRs by providers at all.

Here's the pitch: Providers hate EMRs. They begrudge the time they spend working in EMRs instead of focusing on patient care. They loathe spending their office hours working on documentation. They hate spending their time in meetings with IT staff talking about EMR workflows and form-building. They hate getting lectured by accounting staff about how their documentation affects billing. They couldn't care less about this stuff and in an ideal (or even just a slightly more efficient) world, they wouldn't have to.

Every EMR that depends on webform-like inputs that map to database fields is going to be seen as a roadblock to patient care, which is what providers see as their primary concern.

I think the focus on NLP makes a ton of sense if you frame the problem with EMRs that way. EMR software will continue to be the bane of providers' existence right up to the day that providers can simply talk to their EMR in whatever way they want and have the computer interpret their speech and reliably spit out the discrete data that the accountants and number-crunchers want.

Obviously, I'm talking about a monumentally complicated undertaking and it's a bit on the ridiculous side. But I honestly believe we're going to go there, if only because providers won't be happy until we do.

<comment><USER7> As someone who works in healthcare clinically and also is a product designer, I agree with some certain parts of your idea. It would certainly help providers. While you are right that providers might not like documentation and filling out forms, other staffs like nursing hates typing reports. Getting rid of forms would lengthen nursing documentation which would directly delay patient care more than providers having to fill out forms. Delaying nursing care would stagnate patient flow which directly impacts hospital's bottom line. Furthermore, there are quality metrics and other stats hospitals measure that the cost of getting wrong would be more than the cost of spending a little extra to get it right since it affects ratings etc. Hospitals are too risk averse so how widely they depend on NLP would be questionable. What we need is better designers to design the EHRs better to actually fit the reality of operations. A lot of times you have hospital admins making decisions on form designs without understanding usability so you end up with horrible forms.

I don't think EHRs are going away anytime soon because of their strong integration and impact on hospital operations. I would love for Amazon to partner with existing EHR companies but those companies tend not to be very open with their applications. If anything, Amazon can use this as a way to get into the EHR business and slowly take away the operational control EHRs have over hospitals.

<comment><USER8> Operational control EHRs have over hospitals is because of executive level dysfunction. I have personally seen large Epic sites where the CxOs had never actually used Epic hands on before forcing it upon the staff and spending well over $100M on implementing it. Later when they saw the 40 clicks it took just to create an encounter and heard disgruntled providers complaints, they were stunned (too late).

</comment></comment></comment></comment><comment><USER9> This is the beginning of the final chapter in the story about the last kind of private data becoming owned by advertising companies. The final stroke of pen writing away our privacy to another institution in the name of a better future.

</comment><comment><USER10> [https://outline.com/sAaAKf](https://outline.com/sAaAKf)

</comment><comment><USER11> Read it outside the WSJ paywall (normally need to Incognito it): [https://www.facebook.com/flx/warn/?u=https%3A%2F%2Fwww.wsj.c...](https://www.facebook.com/flx/warn/?u=https%3A%2F%2Fwww.wsj.com%2Farticles%2Famazon- starts-selling-software-to-mine-patient-health- records-1543352136&h=AT1MqUWOSdF4oojXXfuXTOxtB0eaP4Bh8e2Z8E6QFuT6XqRlwyj05mLQHdldYS_Tn1xEfdsZlKGYU310Cr66ZB38GX2qe0MJj08PlJvXs_yMsj7Gw9_xJYrD8OoE)

</comment><comment><USER12> Who owns a patient's medical records?

<comment><USER13> Amazon will soon. HIPAA will be ignored, broken, spit on. There will be no opt out or privacy. I guarantee it.

</comment></comment><comment><USER14> As long as none of the data goes to amazon, sure sell their software. Otherwise WTF no....

</comment><comment><USER15> "It could also be an economic benefit to the Seattle-based center, Mr. Trunnell said. The center has employed about 60 people to scan and pull essential data from records on about 500,000 cancer patients. As automation does more of the work, some employees could do other tasks."

or be fired</comment>


A really disoncerting experience on LinkedIn. Thoughts? - <AUTHOR>

I was just on LinkedIn and was quite shocked when I saw a suggestion to connect with someone I haven't heard from in about 9-10 years.<p>- This person was a friend from a community college course I took in high school and have not seen or spoken to since. - My LinkedIn email has no correlation or correspondence with either the community college or with him. I know LinkedIn has a history of pilfering contacts, but I use a business email that wasn't even created at that time. - I don't even mention on the site that I took a random robotics course at a community college or was even enrolled there. - There are no mutual connections.<p>So how in the world would LinkedIn think I know him? <comment><USER2> I've had a similar disquieting occurance on that site.. my step-aunt from another state was suggested as a connection. I never talk with her online, only over land line telephone conversations. She even has a different last name.

As far as I can guess, they use publicly available information to make these suggestions, they might have been able to see that you went to the same college.

</comment><comment><USER3> Do you and he have contacts in common? Sites like LinkedIn will look for shared associations like that to make suggestions.

<comment><AUTHOR> Nope! No mutual contacts.</comment></comment>


International Day Against DRM - <AUTHOR> https://www.eff.org/deeplinks/2014/05/understanding-digital-rights-management-international-day-against-drm

<comment><USER2> While I appreciate the high-mindedness of the EFF's approach, I wonder if it would be more effective to borrow a page from the Buzzfeed school of attention grabbing. The primary challenge is getting people who aren't techies to care. A headline like "Five Things You Already Do With Your Computer That Could Land You In Prison" is a great way to do this: it's inflammatory, it's emotionally driven, it captures the attention of non-techies, and it can naturally be pivoted into a discussion of why these things are illegal in the first place.

<comment><USER3> I usually explain it to non technical people some kind like this:

Opposition to DRM can have two aspects, which are good to differentiate to understand the issue.

First reason is ethical. DRM as preemptive policing is insulting in treating all users as potential criminals by default. Its overreaching nature is unethical and as such should be opposed the same way you'd oppose something like police state approach to society.

Second reason is pragmatical. DRM always cripples digital products by reducing usability (To put it differently - DRM always gets in the way of the legitimate user).

There is also another set of reasons which are kind of in between the two above - security and privacy. DRM always can be viewed as security and privacy threat, because the very premise behind the DRM is not trusting the user, assuming all users are potential criminals. As such, DRM usually intends to monitor and limit users' activity, like any policing does, except that DRM does it in user's private digital space, on their hardware, in their systems and programs they run and etc. Since trust should be symmetrical, users should not trust any DRM and should view it as a security and privacy threat, especially since DRM implementation is usually some black box code and you have no clue what it can do. So viewing any DRM as potential malware is a good symmetrical approach to it treating all users as potential criminals (infringers).

I'd say out of these, ethical and security / privacy reasons are most important, while the issue of convenience is less so. However most people concentrate on the later and even came up with a term "DRM that doesn't get in your way". That's simply incorrect - DRM always reduces usability by limiting what you can do with digital product. That's one of the main points in it.

So DRM always gets in your way. Some DRM can be less apparent though, while another can be very much in the face. I'd say actually the first one is even worse (not like some would assume that DRM that doesn't bother their comfort can be acceptable). The reason is simple - if it's hidden and not apparent it must be even more sinister than one that's very obviously deterring your experience. It's like a hidden camera vs an open one. Hidden / "unobtrusive" DRM is worse because you don't pay attention to it and get comfortable with using it.

<comment><USER4> DRM only gets in the way of legitimate users - pirates don't have to put up with it. [http://xkcd.com/488/](http://xkcd.com/488/)

<comment><USER3> Yes, that's implied. But you add a good point - DRM doesn't even stop piracy and as such the official reason it's usually justified with is completely invalid. This only strengthens the expectation that DRM is used for completely different purposes, so it makes it more obvious that it should be opposed and never trusted.

<comment><USER4> Yeah, I just felt like making it explicit. Try finding a Hollywood blockbuster that isn't trivially available on the pirate bay - but they still encrypt and region-lock the DVDs anyway. If they keep a movie from being leaked onto the internet before it _launches_ in theaters, that's a big win for them.

<comment><USER3> I updated the phrase. That's a good point to direct to publishers who aren't crooked but are mistakenly trapped in this DRM mentality. Such ones can be convinced.

For example GOG is successful in negotiating with various gaming publishers about releasing even recent games DRM-free. Negotiating with crooks who use DRM for side reasons can't be productive, but negotiating with those who use DRM out of habit or notion that "it's a standard in the industry" is possible. According to GOG, they had many meetings with representatives from various companies and they asked for graphs, charts and other information about how GOG operate and how successful is their DRM-free approach. Sometimes that results in DRM-free releases. And the more they do it, the easier is for them to demonstrate that.

Unfortunately video industry lacks any serious distributor who would want to do such kind of work. Netflix and Co. are too comfortable obliging the DRM insanity.

</comment></comment></comment></comment></comment></comment><comment> 4dl0v3-p34c3 Interesting that they used Google+ and Twitter for this meetup, when those tools are proprietary in nature, and have DRM features.

inb4 Alt 4 vid conf.: Jitsi, Ekiga, QuteCom/WengoPhone, iptel, etc.

[http://askubuntu.com/questions/41970/what-floss-skype- altern...](http://askubuntu.com/questions/41970/what-floss-skype-alternatives- are-available)

Obviously, most of us here use IRC with OTR or SILC

But I agree with jfasi. You have a better chance making a drama video playing with pathos (maybe have a pet or child be affected by the issue of breaking DRM), than this discussion barely anyone saw. Maybe they should have announced this earlier?

Thanks thomasfromcdnjs, for the link.

<comment><USER5> > IRC with OTR

I'm terribly sorry for off-topic, but it really interests me. I've never seen OTR on IRC or XMPP except for private (one-to-one) conversations. Could you go into some details, please?

As far as I know, OTR only works with two parties talking in private. Is there a mature, cryptographer-vetted _multiparty_ OTR protocol with ready-to-use desktop software implementations out there?

The properties that interest me are secure authentication, acceptable forward secrecy and deniable encryption. I.e. I want to be sure I'm chatting with my friends, and if they don't keep logs what was said would stay only between us and the only thing external observer could say is that we had exchanged some information.

</comment></comment><comment><USER6> For those looking for DRM free ebooks--O'Reilly has a sale today. Save 50% on all 8000+ Ebooks & Videos Use Code: DRM2014 [http://oreil.ly/DRM- FREE-2014](http://oreil.ly/DRM-FREE-2014)

(Full disclosure, I work there)

<comment><USER7> "(Full disclosure, I work there)"

I've been noticing this kind of disclosure becoming more commonplace, and it's beginning to bother me. No criticism at all of you: I'm sure you're trying to be ethical and ensure that there is no possibility that anyone might accuse you of a conflict of interest. I just wonder what purpose this serves. You offer a true, interesting, timely, and relevant bit of information. The fact that you work there doesn't change the nature of the information at all. Even if you got a commission on each book sold, which is unlikely, it _still_ wouldn't change anything. O'Reilly's a great shop and this is great to know, in any case. So why this "disclosure"?

<comment><USER8> There are a lot of people who actually get paid to trawl internet forums and say good things about a company or divert people to that company's products.[1]

Declaring your affiliation is mainly a gesture of good faith, since it shows you've nothing insidious planned. In longer, discussion-type posts, it's an invitation for the reader to consider any biases the writer's affiliations cause them to have.

"Disclosure" type statements have always been common in specialized communities where decisions involving time and money are discussed. You see them all over the place in forums for luxury goods consumers (fountain pen enthusiasts, audiophiles, coffee geeks) and investors. When people start discussing the exchange of money or time for a specialized good (be it discount ebooks or paraglider motors), disclosures start to come into play.

[1] [http://en.wikipedia.org/wiki/Shill](http://en.wikipedia.org/wiki/Shill)

</comment></comment></comment><comment><USER9> Is the livestream up?

Edit: I found a copy of the stream -> [https://www.youtube.com/watch?v=wQPfntJm0_c&feature=youtu.be](https://www.youtube.com/watch?v=wQPfntJm0_c&feature=youtu.be)

</comment><comment><USER10> I want to buy a DRM-free ebook reader. I will read mostly epub, but support for HTML and TXT would be nice. Extra points if it supports archives. Any suggestions?

<comment><USER11> You could buy one of the really ugly Chinese e-ink readers, but I wouldn't recommend it.

Kobo makes several _very_ nice ereaders which support EPUB, MOBI, HTML, TXT, even CBR/CBZ out of the box. They technically support DRM through the books sold in their marketplace, but you never have to use that.

<comment><USER10> Kobo's look perfect, thanks!

</comment></comment></comment><comment><USER12> EA Origin on the International Day Against DRM: [http://desktopstories.tumblr.com/post/85057429973/internatio...](http://desktopstories.tumblr.com/post/85057429973/international- day-against-drm)

</comment><comment><USER13> Just don't use services that use DRM. They will stop.

<comment><USER11> There's more to it than that. You have to convince others to follow suit. There are far more people _not_ on HN than there are on HN.

<comment><USER13> Agreed. But I'm still not doing it, even if all the sheep do it.

</comment></comment></comment><comment><USER14> How many IP evangelists are in on this?</comment>


Pagination with rel="next" and rel="prev" (2011) - <AUTHOR> https://webmasters.googleblog.com/2011/09/pagination-with-relnext-and-relprev.html?m=1 <comment><USER2> Literally one of the greatest things about the Opera browser was that you could browse an entire forum or whatever (longform article etc) with the Space key, because the browser would automatically go to the `next` page on hitting the bottom of the page. They also did some cool stuff with swiping to the next page on mobile.

Opera seemed like the only browser vendor that truly championed next/prev.

I only do it now as a habit because of Opera - and, since switching to Chrome after Opera's nadir, for accessibility, regardless of whether screenreaders respect it. But I probably wouldn't know about it if not for Opera.

It's both wistful and aspirational to use them, because this is the way browsers were supposed to work - as was generally the case with most things Opera, of course.

<comment><USER3> The feature is available in some browser extensions as well. Vimium, for instance, has that available with ]]

<comment><USER4> Thank you. I use Vimium but never knew about that. I forgot how much I missed that feature on Opera.

</comment></comment></comment><comment><USER5> I wonder why they recommend putting <link rel="..."> tags into the head, instead of marking up existing  tags (which you'll have in most cases for prev/next) with rel-attributes. Actual difference in parsing? Just because  tags might not be on _every_ site?

<comment><USER6> Well, for one thing, it's in the HTML standard [1].

But also consider websites such as forums that allow users to post custom HTML to a page. Although there is often some sanitisation, that often doesn't stretch to removing attributes from  tags. In those cases, it might be possible for a user to hijack the sequential links and make them point to some other website.

[1] [https://www.w3.org/TR/html/links.html#sequential-link- types](https://www.w3.org/TR/html/links.html#sequential-link-types)

<comment><USER5> your link says:

 _The next keyword may be used with link, a, and area elements_

of course it is allowed to put it in <link>. And if your badly sanitized HTML (which hopefully _did_ strip the malicious onClick handler ;)) includes an , are we sure that parsers will prefer the <link> in the header? Or will Google and others actively ignore the , despite the standard allowing it on both? That would be useful to know.

For simple bots putting it in an easy-to-discover link in  might be good, but a search engine and a browser both have to parse the entire page anyways...

</comment></comment></comment><comment><USER7> One of their examples is a single sentence split over three pages of an article. I'm not sure if that's just a toy example, or also a jab at the way clickbaiters game the view counts.

<comment><USER8> I would guess that whoever wrote it subtly wants to say, if web servers\apps send partial responses to requests without a Range header, then something has broken - probably somewhere between our keyboards and chairs.

</comment></comment><comment><USER9> Ah, this might be the cause of the infuriating behavior where you search for a term, and it appears in one page in a huge forum thread, but after clicking on a search result you end up somewhere completely else in the thread.

I don't know whether Google sends you there, or whether the site redirects you from the "view all" page to the first page, but the result is pretty annoying.

</comment><comment><USER10> Besides making the big G happy, these semantic relationships also helps libraries authors to easily traverse a series purely on the front end. Years ago, I looked at Github's pagination API [1] and discovered this approach also makes infinite paging much easier, just send me a bunch of next pointers until there aren't any more. So I decided to support this format by default.

[1]: [https://developer.github.com/guides/traversing-with- paginati...](https://developer.github.com/guides/traversing-with-pagination/)

[2]: [https://github.com/backbone- paginator/backbone.paginator](https://github.com/backbone- paginator/backbone.paginator)

</comment><comment><USER11> How do you guys implement / What's the best practice for paginating your db using sql and nosql?

I know there are a bunch of gotcha's to look out for

<comment><USER12> It's really easy to paginate data with SQL - just use LIMIT and OFFSET.

      limit = page_size
      offset = (current_page - 1) * limit

For example, let's say you have a table with 1000 products in it, and you want to display page 3 with a page size of 50. Here's how you would write it:

      SELECT *
      FROM products
      LIMIT 50
      OFFSET 100

<comment><USER13> The downside is that OFFSET is slow if you have a lot of items, like on a forum.

At which point you could assign each post in a topic an indexed `position` column that always increases from 0 within that topic, which lets you jump to arbitrary pages and parameterize perPage.

        fromPos = (page - 1) * perPage

        SELECT *
        FROM posts
        WHERE topic_id = $1
          AND position >= fromPos
          AND position < fromPos + perPage
        ORDER BY id

For simpler needs, your "Next" button could load items that come after the last ID on the current page but with a LIMIT.

          {% for item in items %}

{{ item }}

          {% endfor %}

        Next

        SELECT *
        FROM items
        WHERE id > $afterId
        LIMIT $perPage

That's fast and really easy.

<comment><USER14> This sounds like a really premature optimization to me. Let the DB do it's job unless you have an explain trace showing it's slow for your workload. Trying to do things like sequence columns adds complexity, when this is often handled by the engine.

<comment><USER13> OFFSET is not "handled by the engine". It heapsorts the entire dataset before you offset to a page.

The top-level comment is asking for good ways to paginate. OFFSET works on localhost and with hundreds of rows. My solution is one that works in production once OFFSET fails you. For me, it was day 2.

<comment><USER15> It was day 2 for you, with the specific engine you used.

You don't need to heapsort the entire dataset before you offset to a page, and there are engines capable of doing this.

</comment></comment></comment></comment></comment></comment><comment><USER16> What are the recommendations for infinite scroll?

<comment><USER17> Don't use it. It's an antipattern and an awful meme.

<comment><USER18> Why's that?

<comment><USER2> It is extremely rare that it doesn't bring my browser to its knees after a certain amount of scrolling. (This is with 12 GB on Chrome.)

You will also end up losing your reading position after a browser restart or on iOS where Mobile Safari reloads a page to save memory.

It's a dumb, pointless feature that at the very least shouldn't be the default option. I'm sure there are hypothetical scenarios that may or may not warrant it, but it is a pain and a half for the user. Tumblr blogs have it in spades, and it's a miserable experience to browse.

<comment><USER19> I don't understand why more sites don't just use pagination with larger result sets. Return pages with 100 or 200 results each. It takes a little more bandwidth, but it's a good middle ground between pagination and infinite scroll.

<comment><USER2> Not to mention that people still use that one terrible loading-animation icon that looks like crap, because they didn't configure the CSS properties correctly.[^1]

[^1]: [https://jsfiddle.net/76FSM/17/](https://jsfiddle.net/76FSM/17/)

</comment></comment></comment></comment></comment></comment><comment><USER20> This is a blog post from 2011. The current HN submission title does not indicate this article's age.

<comment><USER21> I agree, but Google still seems to recommend this usage.

</comment></comment><comment><USER22> The iPod Notes format used this type of pagination! It was essential back then because each note could only have a maximum of 1000 characters.

</comment><comment><USER23> One of the nice things this does is give the browser's "reader mode" a hint where the next page is. And it's great. Only problem is, publishers seem to have no interest in helping the reader mode. On the contrary, many seem hell- bent on defeating its content detection algorithm, etc, to make it useless so we all look at their stupid ads.

</comment><comment><USER24> Also known as a good way to break many a SPA.

<comment><USER25> Single page application? Can you explain why the existence of next/prev relationships would break these? I would expect such a site to simply not use this. It's definitely nice for linearly-linked content on supporting browsers (e.g. old opera, as mentioned elwewhere in this thread).

<comment><USER24> Well, look at it this way, when creating a SPA, you're running everything in a single place. A single HTML page. In some instances, it makes sense to push the state to the query string, but often it doesn't, and more often still are the occasions developers haven't thought about it. So every time you hit the back button, and weren't where you thought you would be, that's the same issue. SPA frameworks's are getting better at that, but this still happens to me on the daily.</comment></comment></comment>


Microsoft's Enterprise Price Hike - <AUTHOR> http://www.businessinsider.com/microsoft-enterprise-price-hike-2012-11 <comment><USER2> One of the the many joys of FOSS: no user client-access license, no device CAL, no worry about legal key recovery, or if a site license covers a contractor's laptop.</comment>


Adria Richards makes an email statement, says she's moving on - <AUTHOR> http://blogs.denverpost.com/techknowbytes/2013/03/27/adria-richards-fired-from-sendgrid-after-social-media-firestorm-says-shes-moving-on/9472/

<comment><USER2> _tl;dr:_

Adria Richards's statement quoted in TFA is self-serving, disingenuous, and contains some obviously false statements, but oh well, so what. Passing judgement on this incident is beneath me (I strive to one day act as I preach). Adria, and arguably dongle-joke-guy, made some mistakes, and the use of this incident to third parties like myself is to take a moment to contemplate how to avoid making similar mistakes.

\</comment><comment></comment><comment></comment><comment>-

Some choice snippets from her statement:

"I have always tried to conduct myself in a way that builds bridges for everyone"

Almost no one can honestly claim this, and we've seen plenty of comments in the past weeks which, if true, show that Adria is no paragon of virtue, including a few from activist feminist women in tech who feel that Adria's high-profile unreasonable belligerence has repeatedly damaged the cause of equality. The claim seems likely to be a self-serving lie, although perhaps she believes it herself.

"the severest of consequences have manifested"

Seriously? You can't imagine any more-serious consequences for starting a fight with someone? Idiot.

"we can welcome newcomers, women and people of color"

Good job, focus on YOUR visible minority statuses. Way to build bridges for _everyone_.

"all of these issues have reasonable, and, I think, easily reached solutions"

That's fascinating optimism. Easily reached, eh. Seems so delusional to me that I think she's lying.

"conference spaces are workplaces!"

Well, yeah, some people are working at conferences, but some people are not. Public parks are someone's workplace too, and so are strip clubs. What's your point?

"I want to be an integral part of a diverse, core group of individuals"

Yeah, I _bet_ she wants to be a core individual. Way to focus on your own ambitions.

"I want to be ... part of a ... group ... that comes together in a spirit of healing and openness"

This is... not consistent with much of her publicized behaviour. Is it?

\</comment><comment></comment><comment></comment><comment>-

So, I don't give a rat's ass about Adria, Sendgrid, the guy who got fired, his company, whatever. And honestly I think most of HN shouldn't either. This is still a tempest in a teapot, ignore it. Passing judgement, a thing I love to spend time doing, is spectacularly unproductive most of the time, and often is damaging to your own mental flexibility (even aside from the time wasted).

And PyCon, which I do care about, seems to have had a proportionate level of response (deal with the incident reasonably and in line with policy, also update policy to clarify that public shaming isn't wanted either), and is getting on with more interesting things. So, the incident in question has taken care of itself.

The interesting part for all of us, I believe, is whether we can learn anything useful to ourselves. For myself, I can remind myself that throwing javelins is dangerous, because it can bite you, and building bridges is usually more effective. And though I'm personally not a huge fan of the wording of PyCon's conduct policy, that's fine, it's their con and I see the advantages, so for myself I can remind myself that reasonable people hold this position, and if I don't want to offend those people and start fights, I should take that into account.

<comment><USER3> >>>>"we can welcome newcomers, women and people of color"

>> Good job, focus on YOUR visible minority statuses. Way to build bridges for everyone.

She started with newcomers. I'd argue that focusing on minorities when building bridges for everyone is more important than focusing on those that already have bridges.

I think you're largely ignoring how micro-aggressions come into play here. Also, shaming someone on twitter can only be considered bad if you think she did it knowing the outcome.

More at fault are sendgrid and the companies that fired employees over this. Also, her publicly shaming them is nothing compared to the backlash, sexism, racism, and harassment she has faced.

My initial reactions were a lot like yours, then I put myself in her shoes. I think she felt like she could make a difference by publicly shaming them and had no idea they'd encounter such harsh backlash, nor that she would encounter such backlash.

If I'm right in assuming those things, Adria Richards didn't really doing anything that bad.

<comment><USER4> But that's kind of the point; she knew what she was doing and that's exactly why she did it, she just hoped that in mislabeling it a women's issue, people would be empathetic to the fact that she was shaming someone that couldn't possibly set the record straight before the internet started hacking away at him. You can't just wrap anything with a feminist bow and expect people to say "Yeah, totally justifiable to shame that nameless guy in his company t-shirt that didn't actually do anything sexist in front of thousands of people." To add insult to injury, her self-made claims of being Joan of Arc and her out- of-touch legion of supporters humiliated the guy further into needlessly apologizing more in one post than she has in a week after he lost his job over it.

Starting wars on Twitter doesn't make you a crusader, it makes you no better than most of the people insulting your willingness to use your celebrity against everyday people just trying to enjoy a conference they were there to help support, all because you couldn't just say "Come on, guys."

<comment><USER5> Can you give the url of the post where he apologizes? I wasn't able to find it, I'm just reading through some of the drama now out of curiousity

<comment><USER4> <https://news.ycombinator.com/item?id=5398681>

</comment></comment></comment></comment></comment><comment><USER6> > _all I wish to do is find the good in what has been one of the most > challenging weeks of my life._

As if it's all about her.

Not a word of sorry for eavesdropping on a private conversation and posting it on Twitter along with a candid photo of the person, with cost him his job (and all for a joke).

After this, I refuse to take seriously her other statements, about always helping" everyone, "building bridges" etc.

</comment><comment><USER7> This just in: Non-developer Adria Richards believes she did nothing wrong, plans to continue "building bridges" for use only by women, black people, and other Adria-approved minority groups on behalf of the developer community.

Also, sounds like a lawsuit is brewing:

"I cannot comment at this time on the specifics of what occurred at PyCon on March 17, and the subsequent events of the following days, but I can offer some general thoughts"

</comment><comment><USER8> If only someone were to want to build the bridges of equality without some doing it in a way that made them sound self-aggrandizing or with an undertone that they really want to be known in the "cool club" for doing something without really doing much of anything.

For better or worse, Richards accomplished her mission: Idiots like me now know who she is, what her face looks like, and I'm sure she's now on the pundit roster for many news outlets to chime in anytime something happens in the tech world.

Our society as a whole needs to stop paying attention to this gossip-rag like behavior and ignore the "Look At Me!" crowd.

Richards is a hypocrite who doesn't belong dictating professional standards in any form and her mere attempts at martyrdom are a disgrace to those fighting through the glass ceilings of our sector every day of their lives without posting to Twitter about it.

</comment><comment><USER9> "an integral part of a diverse, core group of individuals that comes together in a spirit of healing and openness to devise answers to the many questions that have arisen in the last week."

I guess she can get work writing mission statements.

</comment><comment><USER10> Where are all the neutered male backers of her now?

Check out one of the Tweets she recently deleted: [http://qph.cf.quoracdn.net/main-qimg- adcfdad91e1f9664ff518b4...](http://qph.cf.quoracdn.net/main-qimg- adcfdad91e1f9664ff518b48bde24966)

OMG, is that a penis joke? No way! I thought she was offended by sex jokes?!?!?

More to read here: [http://allthingsd.com/20130327/fired-sendgrid-developer- evan...](http://allthingsd.com/20130327/fired-sendgrid-developer-evangelist- adria-richards-speaks-out/)

</comment><comment><USER11> I think she's a bit of a dick, but I've never worked anywhere where at least two people weren't at least as dickish as her in some way or other. Although I'm not a fan, I'm glad she seems to be OK.

</comment><comment><USER12> Every time I read her name I think "Is this about the Unix system girl from _Jurassic Park_?" That was Ariana Richards.

Shows how relevant she is. She got sorted into the wrong hash bucket.

</comment><comment><USER13> All i need now is for the guy who got fired to be rehired by his company and my life will be complete.

<comment><USER14> Or even better, maybe he's in a better position than the one he got fired from. A lot of people are sympathetic to his plight - that's in his favor. I wouldn't particularly want to go back to a company that fired me so quickly - unless it truly _was_ my dream job, otherwise.

</comment></comment><comment><USER15> Diversity = walking on eggshells. Exhibit A: The two guys Adria got fired.

<comment><USER14> Depends on how you parse it. There _should_ be nothing wrong with diversity, in and of itself. But yes, I'm aware of the emotional buttons that get pushed when that word is used. And even when you see a group that _appears_ to lack diversity - i.e., same age/gender/color/size - there will be some diversity _somewhere_ within the group. And nothing wrong with that, either.

</comment></comment><comment><USER16> In before the delete.

</comment><comment><USER3> I think everyone in this thread needs to read three pages:

<http://en.wikipedia.org/wiki/Microaggression> <http://en.wikipedia.org/wiki/White_privilege> <http://en.wikipedia.org/wiki/Male_privilege>

Also, let me exercise my white male privilege by saying that I'm a white male. What privilege does that give me? The privilege of you taking me more seriously of course!

<comment><USER17> ?</comment></comment>


The Elegance of Deflate - <AUTHOR> http://www.codersnotes.com/notes/elegance-of-deflate/http://www.codersnotes.com/notes/elegance-of-deflate/ <comment><USER2> Site returns 404

<comment><USER3> The URL was pasted in twice. The correct URL is:

[http://www.codersnotes.com/notes/elegance-of- deflate/](http://www.codersnotes.com/notes/elegance-of-deflate/)

Looks like an interesting article. The original poster may want to re-submit with the correct URL.</comment></comment>