Stop Infinite Scrolling - <AUTHOR> https://hackernoon.com/stop-infinite-scrolling-on-your-website-now-ie6rg31eu <comment><USER2> The article puts forth 10 reasons to think twice before implementing infinite scrolling, but many of them are just a variation of the final reason: Terrible user experience.

For the sake of argument, there are several very successful websites that use infinite scrolling in one way or another. Facebook, Instagram, Twitter, Reddit just to name a few. Is infinite scrolling on these sites disorienting the user? hard to navigate? rendering a "terrible user experience"? One could certainly argue that the data says otherwise.

The article doesn't even suggest that there might be situations where infinite scrolling might befit the site. I'm not a big fan of infinite scroll but black-and-white rants like this often leave out the vital context and nuances in the topic they aim to analyze.

<comment><USER3> The infinite scroll is one of the reasons those websites are so addictive. My lizard brain has a hard time closing the tab when I "haven't reached the end of the page yet."

So it may be 'good' for keeping people on the site. But in the grand scheme of things I'd rather the page had a bottom.

<comment><USER4> This. These sites don't use infinite scrolling because it is a great user experience they do it to keep people on their site. They do it to keep people engaged. The addiction. Most of those sites would actually be better with pages in terms of user experience, but that isn't the experience they are going for.

</comment></comment></comment><comment><USER5> My favorite example I discovered recently is the Coinbase prices page. You can't get to the links in the footer (or their big "enter your email to learn more" CTA which I'm sure their marketing team works hard on) because it keeps loading new pages when you scroll to the bottom of the page. Presumably they will eventually run out of pages and you'll be able to see the footer.

[https://www.coinbase.com/price](https://www.coinbase.com/price)

<comment><USER6> other issues aside, isn't not being able to reach the footer on infinite scrolling pages solved with a sticky footer?

it can even be sticky at 2X or 3X the screen hieght so that it doesn't get in the way of the freshest/most important content near the top of the (very long) page.

<comment><USER7> theoretically yes. effectively anyway.

in practice, I don't think I've _ever_ seen a sticky footer that didn't flake out somewhere. it's always broken weird screen sizes, or mobile, or one browser, or after a browser update. or it hides content because someone forgot to add padding. or it jumps around because they're using absolute position for some insane reason.

</comment></comment></comment><comment><USER8> Not to mention one misclick that brings you to a different page will instantly make you lose all scrolling "progress", on some fast-paced websites without a chance to find the original position again.

<comment><USER9> To be fair, this only happens due to programming bugs on the website. You can easily store the scroll position in the HTML5 pushstate API. The big websites like Twitter and Facebook get this right.

<comment><USER10> Famously, imgur gets it wrong. After 10 images you can click "load more images" to see the rest of the album, but when you return to the album you have to click it again.

<comment><USER11> Imgur does lots of things wrong, it's really really horrible to use, especially on mobile.

Although to be "fair", that's probably largely intentional crippling of the site to push users towards their app.

</comment></comment></comment></comment><comment><USER12> What about techcrunch, where if you scroll all the way down in an article it automatically re-directs to the main page.

This is so annoying to me that I have JavaScript and cookies disabled for techcrunch just to circumvent this nonsensical behaviour.

<comment><USER13> That's just as heinous as those news sites which load the next article when you scroll to the bottom of the current article. It appears to sometimes be part of the article you're reading and then your on another page trying to figure out what the hell happened. I really don't know how these so-called designers get paid to confuse their readers and customers.

<comment><USER14> Related bonus: On many sites, if you try to print the article you've just read to the bottom, you _can 't_ print _that_ article, you can only print the _next_ article, and even scrolling back to the top won't fix it.

<comment><USER15> oh my god yes! I've ran into this same problem and thought i was going crazy. cant remember if i was printing or just saving the articles to somewhere, but i kept getting a completely unrelated article.

how does someone mess up their website that badly? i dont even know how something like that is possible

</comment></comment></comment></comment><comment><USER16> My "favorite" infinite scrolling fail is when there is a footer on the site, and it keeps being pushed down by the infinite loading of new data, such that you can't reach any of the links the footer contains (like, you know, "About" or things like that).

<comment><USER10> Was wondering that and then told myself, come on, nobody would be _that_ evil, the whole idea is nonsense. And you're suggesting there are websites out there that actually do that?

<comment><USER17> Google (image search) and Facebook (news feed) have _both_ done this. Last time it came up I was able to find a screen shot of one of them but not the other, let me see if I can dig that up.

I don't think they did it deliberately, but I'd bet someone said "We could increase engagement if people didn't have to click anything to keep seeing more content" and nobody bothered to think about other design consequences of automatically expanding the content downward forever.

EDIT: A screenshot of Facebook's in mid-2013 is shown here under the "Unreachable" header [https://www.smashingmagazine.com/2013/05/infinite- scrolling-...](https://www.smashingmagazine.com/2013/05/infinite-scrolling- lets-get-to-the-bottom-of-this/)

Or straight to the image: [https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42...](https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb- adb4-46f01eedd629/a1c917a5-6828-490d-ae2e-15b49a5e8c05/facebook-loading- footer.png)

</comment></comment></comment><comment><USER18> I've seen this argument more and more lately, and it's starting to bother me because some places work great with infinite scrolling (twitter, serial comic strip viewers).

This article offers a small disclaimer at the end, but otherwise says things are impossible, when they simply aren't. #1 is easily solved by removing offscreen content once it's been scrolled past, and autoloading in both directions. Numbers 3-4, 8, and 9 (several of which are redundant complaints) are definitely the worst part of infinite scroll websites, but are pretty easily fixable with client-side routing.

The problem is people implement infinite scroll in terms of finite-scrolling documents, when there are a number of other dynamics to take into account. It's like saying "Don't make video games because you can't play them with a remote".

<comment><USER19> > _some places work great with infinite scrolling (twitter, serial comic strip > viewers)._

I would contend that Twitter does not work great with infinite scrolling. In fact, I kept envisioning Twitter as I read the article. One of my biggest grievances with Twitter (shared with much of modern computing because multi- device computing doesn't have something like PAO [1], which would keep all my devices' views the same) is that I can't easily resume reading my Twitter stream between devices. I can't even easily navigate to "show me the stream at 11am today," which would be a viable workaround for multi-device views. If I want to find a last-read point, I just need to sit with my finger on the page down key until I see something familiar.

Ultimately, my user experience with infinite scrolling is simple: I give up and stop bothering to try to be thorough in my consumption of Twitter content. I wonder if Twitter has the necessary metrics to realize that infinite scroll can hurt engagement. I doubt it.

[1] [http://tiamat.tsotech.com/pao](http://tiamat.tsotech.com/pao)

<comment><USER18> I'd contend Twitter's problem isn't infinite scrolling, it's eschewing chronological sorting in favor of algorithmic. There is no objective order to most content on twitter, so deep linking to a place in the feed is impossible, whether you use pagination or infinite scroll. Which is why infinite scroll works - it solves the problem of defining what page 2 even is. Not defending algirithmic sorting of course.

</comment></comment></comment><comment><USER20> Paging should be incorporated into web standards. Imagine your browser indicating "you are on page 2 of 8". Imagine having browser hotkeys for "next page", "previous page" and "jump to page".

The browser itself could even provide a non-broken, customisable, universal- across-all-sites implementation of infinite scrolling.

<comment><USER21> I remember from ~10-15 years ago, in the Opera browser there was a button to go foward even when you did not go backwards. It was pretty good at guessing what the next page was going to be (example.com/1.html > 2.html, 2005-08.jpg > 2005-09.jpg etc.)

<comment><USER22> If I'm not mistaken qutebrowser also has this feature.

<comment> The-Compiler Yup! It has various kinds of shortcuts for this kind of thing (increment/decrement number, find prev/next link, remove component from path).

If you're curious, the implementation is here: [https://github.com/qutebrowser/qutebrowser/blob/master/quteb...](https://github.com/qutebrowser/qutebrowser/blob/master/qutebrowser/browser/navigate.py)

</comment></comment></comment></comment><comment><USER23> I'd add: if you do pagination, do large pages instead of a huge number of small pages. It's easy to scroll quickly through a fixed size page, it's a pain in the ass to have to click through pages.

<comment><USER24> More small pages means more opportunities to show ads. And in the case of search, a larger portion of the first page can be given to sponsored results. :-(

Somehow the web has evolved to a place where the poles of infinite scroll and excessively short pages are two of the great annoyances.

<comment><USER23> True, but I see that even in private control panels. So it's not all malice!

<comment><USER25> Right, there's also some cargo culting

</comment></comment></comment></comment><comment><USER26> I once implemented infinite scroll that 1) didn't auto-scroll from the first page, you had to click to continue and _then_ it would infinite scroll. This way, people could see the footer and didn't have auto-loading content unnecessarily and 2) the infinite scroll worked bi-directionally. 5 "pages" would be loaded at any given point, with the goal that the user would be on page 3, in the middle of the stack of pages. This way, memory was kept low, and we even implemented the History API so you could link to the pages by post ID.

</comment><comment><USER27> I run a collection of websites that all use infinite scroll and serve ~90 million MAUs.

#1 Poor performance issues

We started doing off-screen clean up, but it's a similar pattern to any ListView like component. Setup and teardown. The browser is smart though. It's not any more work than the setup/teardown a typical SPA should be doing.

#2 Footer is drowned

Footers are useless. Put it in the menu.

#3 Difficult to implement analytics

No more difficult than triggering a SPA pageview. This is misleading.

#4 Navigation is muddled

This is the most valid argument. We solved by being clever about History.pushstate(), triggering when the next article title hits 50% of screen. Bookmarking works fine.

#5 Scrollbar is hard to use

Misleading. The web is mostly mobile. People generally use efficient scroll input devices, scroll wheels trackpads. Most browsers hide the scrollbar because of this. Scrolling many tens-of-thousands of pixels is NBD.

#6 It is hard to use

Misleading, not quantifiable.

#7 Disorients users

Misleading, not quantifiable.

#8 No skipping allowed

Easily solved. We built an in-between module to provide the user with the option to modify their infinite scroll path. If you pick something here we use that to make the rest of articles closer to your interests.

#9 No bookmarking

Solved with History.pushstate()

#10 Terrible user experience

Any UI pattern can be abused to be bad UX.

# Pagiantion UX is usually bad

To counter the arguments. Arguably pagination is more broken. Navigating pages. Generally they aren't bookmarkable unless you implement advanced cursor pagination.

# Content consumption flow

Data supports that users want to consume content with minimal interaction and engagement. If you provide a consistent scroll experience to get from one thing to another, and it's relevant enough, people will really stick around and consume it.

Bounces, time spent, and other KPIs for web-traffic engagement have all gone up as a result of using infinite scroll.

Perhaps we're an outlier and paid attention to the difficult to solve implementation nuances but I don't mind it on other sites.

The alternatives were footers full of information I'm not interested in and outbrain modules...

<comment><USER28> I think your points are completely biased.

I'm going to rail against your attitude here, not you:

0\. Appeal to authority.

1\. Sounds like job security.

2\. Footers are NOT useless. Menus are aggravating.

3\. Analytics are 99% evil, 1% hot gas.

4\. Stay out of my History.pushstate(). I don't need 50 things in my back stack just because your "page" couldn't fit on one screen.

5\. Too many incorrect facts to address in one line.

6\. It depends on what the definition of "is" is. No. Single cluttered pages are quantifiably easier to use than a dynamic page of unknown length. Is it ever going to stop?

7\. It disorents me, and I'm a super-ultra-mega power user. Spinning a 3D model when the user scrolls down is downright unexpected behavior. It's a trick. A gimmick. A distraction. It's disorienting.

8\. I don't want a choose-your-own-adventure. I want a damn single page with damn information on it.

9\. I don't think that's a solution.

10\. I don't care about "User Experience." I want "User Interface". "UX engineer" is just job title inflation for non-committal designers.

<comment><USER29> "Analytics are evil"? Seriously? How else do you propose understanding how people are interacting with your site? How can you A/B test improvements without analytics?

</comment></comment></comment><comment><USER30> that is mostly a complaint against poorly implemented infinite scrolling. there's no reason why it would have the break urls, indexing, or the back button.

<comment><USER31> There's a lot of reasons why it would break all of those things. Hacking it so that the URL & history is rewritten when content is loaded is significant extra work.

I have no idea what you mean by indexing, given the word index doesn't feature in the article. You also ignore the problems of making the scrollbar useless & the footer unreachable. I don't see any fix for those issues at all.

<comment><USER32> You need to choose between having a footer and using infinite scroll. Can't do both.

<comment><USER33> The way we did it for a product search type website was to show a regular page first, with a "show more" button. After clicking that button, it would auto load the next page(s) on scroll. If all you wanted was the footer, you wouldn't ever experience the auto load.

</comment></comment></comment></comment><comment><USER34> Not being used by social media, I don't come across infinite scrolling much. But where I do it's most annoying. Discourse: how _dare_ you take over my ctrl-f keyboard shortcut.

<comment><USER35> That's a great example of the extra magic and complexity an infinitely scrolled view requires. As you scroll down a huge Discord thread, they are removing posts from the DOM for performance reasons.

You could use the browser's built-in search functionality by choosing _Edit - > Find in This Page_ from your browser's toolbar, but in this case it would be pointless as the results would be inconsistent as most data you've come past is not present.

I'm curious how much worse the performance would be if they did not apply this specific optimization.

Here's a thread with 618 replies, for example: [https://users.rust- lang.org/t/crate-of-the-week/2704](https://users.rust-lang.org/t/crate-of-the- week/2704)

<comment><USER34> I remember reading a thread about this issue on Discourse's own board, and it was clear the continuous scrolling was non-negotiable "because modish", regardless of user preferences or experience.

> _I 'm curious how much worse the performance would be if they did not apply > this specific optimization._

Pages without continuous scrolling that can have large numbers of posts or entries don't typically show all by default. There are all the usual options - paging, allowing the user to choose the number per page, etc. They're all imperfect workarounds, and all better (for me) than continuous scrolling.

</comment></comment></comment><comment><USER36> ... but I like infinite scrolling. I just don't like infinite content.

I prefer having a webshop list everything they have in a sub instead of pagination. I prefer Amazon layout which just goes on and on with all kind of stuff related to an item. I like to be able to ctrl-f on a page and see if I hit what I need without clicking through mazes of links. I just don't like pages that just generate more content after I finished the current one in the hope I get bored and click on ads.

</comment><comment><USER37> I remember when Google Reader came along was probably the first time I saw infinite scrolling and it was glorious! The best thing ever! I don't want my RSS feeds any other way!

But for anything else? Not so much.

</comment><comment><USER38> I cant count how many times i've had to turn off wifi, or use firefox's offline mode just because of infinite scrolling.

</comment><comment><USER39> Title / Article should be "Stop Badly-implemented Infinite Scrolling". As many commenters have pointed out, some of these "reasons" are due to poor implementation.

</comment><comment><USER40> To me infinite scroll or not is more about what kind of content is it, statistics like generated clicks and of course UX, than the questions what's more difficult to implement.

With the abundance of ready to use opensource solutions, I'm sure most devs don't need to implement infinite scroll or a pagination mechanism themselves but they just use a component that does it out of the box and solves all those technical problems for them.

To be sure what works best for your users and type of content, I would do two versions, one with pagination and one with infinite scroll and let the numbers decide which technique makes the user click / visit content and maybe which technique does the user spend most time on the website.

I'm not totally against infinite scroll, for a social network news feed I think it's a good use case. Also all the potential problems listed have a solution and also some of the problems also exist when using a pagination. For example letting a user bookmark a page url with a pagenumber on a website with lots of new content is bad, as the content on the page number XY will have changed after few hours / days. Some good solutions if you really want to implement it on your own are listed in this google blog post: [https://webmasters.googleblog.com/2014/02/infinite-scroll- se...](https://webmasters.googleblog.com/2014/02/infinite-scroll-search- friendly.html)

</comment><comment><USER41> Infinite scroll is not for user experience. It's to increase session times. If you increase the time spent in an app or on a page you increase the chance of getting revenue in ads for social or media sites or purchases in marketplaces. In other words screw UX because this is about increasing engagement to increase monetization. Stressed or not, users do increase session time on infinite scroll pages than when using regular paginated views

</comment><comment><USER42> One of the websites where one can find this annnoying "infinite scroll" is YouTube channels.

I wrote a quick and dirty script to address this annoyance.

It can be used to output a table of all the video urls and video titles for any YouTube channel.

"yy032" and "yy025" are some utilities I wrote to decode html and transform urls to HTTP for HTTP/1.1 pipelining, respectively.1 Instead of using yy025 and openssl, one could alternatively make a separate TCP connection for each HTTP request, e.g., using something like curl. Personally, I prefer not to make lots of connections when retrieving mutiple pages from the same domain.

Here is a hypothetical example of how to use the script, "1.sh", to make a table of all the video urls and video titles in a channel.

       echo https://www.youtube.com/user/example/videos|sh 1.sh|yy025|openssl s_client -connect www.youtube.com:443 > 2.html
       sh 1.sh urls < 2.html > example.1
       sh 1.sh titles < 2.html > example.2
       rm 2.html
       paste -d '\t' example.1 example.2

       # 1.sh
       case $1 in
       "")
       exec 2>/dev/null
       export Connection=close
       yy025|tcs www.youtube.com |sed 's/%25/%/g'|yy032 > 1.html
       while true;do
       x=$(sed 's/%25/%/g;s/\\//g' 1.html|yy032|grep -o "[^\"]*browse_ajax[^\"\\]*"|sed 's/u0026amp;/\&/g;s/&direct_render=1//;s,^,https://www.youtube.com,');
       echo > 1.html;
       test ${#x} -gt 100||break
       echo "$x"
       echo "$x"|yy025|openssl s_client -connect www.youtube.com:443 -ign_eof > 1.html
       done;
       rm 1.html;
       ;;-h|-?|-help|--help) echo usage: echo https://www.youtube.com/user/example/videos \|$0 ;echo usage: $0 "[1|2]" \< 2.htm
       ;;1) sed 's/\\//g;s/u0026amp;//g;s/u0026quot;//g;s/u0026#39;//g'|grep -o "ltr\" title=\"[^\"]*"|sed 's/ltr..title=.//'
       ;;2) sed 's/\\//g;s/u0026amp;//g;s/u0026quot;//g'|grep -o "[^\"]*watch?v=[^\"]*"|sed 's,^,https://www.youtube.com,'|uniq
       esac

1 [https://news.ycombinator.com/item?id=17689165](https://news.ycombinator.com/item?id=17689165) [https://news.ycombinator.com/item?id=17689152](https://news.ycombinator.com/item?id=17689152)

<comment><USER43> All YouTube channels have an RSS feed too, which might be more intuitive to parse.

</comment></comment><comment><USER44> Maybe it's just me because I just realized how irritating it is, but I really dislike when the title of an article commands me to do something. I don't really even understand why people do it, is it supposed to make me hate-click the link? It just makes me think the author is juvenile and i lose interest.

<comment><USER45> I think it's to draw the attention of people who want to tell others to do the same thing. E.g. if you're saying the title of this article internally while looking at an infinite-scrolling web site, then the title will get your attention.

</comment></comment><comment><USER46> So, as many problems as there are with infinite scrolling, people keep using them because they generally work. Some might say that it's bad for users but good for companies because it encourages them to stay on the site more by using psychology, one can also point to the way sites promote a "Most popular package" or how they price things to encourage people using psychology to spend more than they might have originally.

Argue whatever you want, but if something works, people are going to use it. And as long as it's not misleading people, it's hard to present it has a dark pattern.

</comment><comment><USER47> The most stupid design is (1) put meta links such as "about", "copyright", "contact", "abuse", "profile" links in the footer of the website, and (2) using infinite scrolling. Literally, WTF?!

Every time I want to find a meta link, I need to have a race between my reaction speed and the JavaScript loading time... Worse, some background scripts are written in a way to trigger even if you press "Esc", which is supposed to stop the current executing script.

</comment><comment><USER48> The article is flawed, because for example it takes for granted that the footer needs to scroll with the infinite scrollable content pane, which is just an absurd thought to begin with. Similar statements hold true for memory management, of course a naive implementation will eventually fill memory, but the same is true for a bad implementation of an single page web app with paging UI. Same for bookmarks, of course if you bookmark page 1 of a multi page list, eventually the articles you saw will be pushed to page 2. And if you have a single page application and forget to have the url change to the articles you read, you will have issues, on the other hand if you read an article in an infinite loading list, it would be no problem to change the url as you read articles and make them linkable. If you take away all of these statements you end up with the following: a) it is easier to mess up infinite scrolling than to mess up paging, don't think its easy or you can build it quickly 'on the side'. (my take on that point is) -> We need better best practices and tooling to build infinite scolling for popular frontend frameworks. In my opinion it is on the level of complexity as building a state library such as redux including the react integrations and redux tooling and needs a similar amount of contributors, support, application feedback, bug reports etc. until it can provide a satisfactory mainstream user experience. b) the article traps into the same mistake most medium/hackernoon articles make: not more explicitly discriminating between real web apps and web pages that just happen to use a js framework. A real web app is something like calender, mailclient, taks, slack, fb messenger, trello etc. They have completely different requirements and expectations and it would be absurd to click to older pages of messages on slack and is really annoying to do so in gmail. Even though the article just mentions the term "web site", it does sell its advice as a kind of universal truth independent of context. For a web page, something like new york times or medium articles or some informational page for a company offering, i agree that especially autoloading of next articles at the end of one opened post can be really annoying and in the context of articles infinite scrolling is even easier to get wrong, but not because of an universal law, but because the user interface has more things to take into consideration and requires better planning.

</comment><comment><USER49> I'd like to see the browser APIs prohibit this - and also disable interference with text selecting and copy/paste buffer. There is no legit reason for this functionality.

<comment><USER50> I think it would be very difficult to make something like Google docs or the rich text compose options in a new email without the ability to trigger actions on text selection and clipboard.

What I would like to see is a permission though, like when browsers ask for your location: "This site want's to manipulate your clipboard. Allow?"

<comment><USER51> If we could go back in time and redesign everything from a clean slate, we really should just have different formats and client apps for "run portable apps with rich GUIs over the Internet" and "view text with clickable links embedded."

</comment></comment></comment><comment><USER52> I really took to heart this article about building a thoughtful, useable infinite scroll that doesn't break the back button. [https://tumbledry.org/2011/05/12/screw_hashbangs_building](https://tumbledry.org/2011/05/12/screw_hashbangs_building)

I think photo blogs are a good place to use infinite scroll.

</comment><comment> yoz-y I agree with most points but not with the bookmarking. Bookmarking paginated content is rarely useful, unless the content rarely changes.

The thing that irritates me a lot with infinite scrolling is that it ruins history. If the content somehow botches open in new tab then this basically constrains the user to only ever see one piece of detail before getting crazy.

<comment><USER53> That's only the case if the pages do not have unique URL's for the content on them.

</comment></comment><comment><USER54> I've seen this disappear from the web so much that it's jarring to encounter nowadays. It was never, ever good UX.

<comment><USER45> Twitter still does it, but their implementation is not terrible.

<comment><USER55> Twitter is horrible - scroll down a few pages, click something interesting, hit back, and you've lost position, and have to reload and rescroll through everything again. Even worse because some clicks will open a modal that you can close and save position, but other clicks will reload the page.

</comment></comment></comment><comment><USER56> Infinite scroll absolutely is a Dark Pattern unless you have a _very_ good reason for it. For many things it's just obnoxious, but for e.g. Reddit (or 'endless' feeds in general) it is an extremely cynical way to drive compulsive behavior to its logical (awful) conclusion.

</comment><comment><USER57> I still firmly believe Reddit is only usable with RES infinite scroll enabled. It's such a joy not having to click the 10px wide "next page" button.

Infinite scroll works in a lot of ways, and is integral to a content absorbing functionality (if that's what you want).

<comment><USER58> I think an important point is to make it optional, and in some cases, opt-in.

</comment></comment><comment><USER59> [https://eviltrout.com/2013/02/16/infinite-scrolling-that- wor...](https://eviltrout.com/2013/02/16/infinite-scrolling-that-works.html)

</comment><comment><USER60> Will read the article once home, but for now I have this rule of thumb: if data is of streaming nature & short time valued, infinite scroll, else always pagination. So far worked for me (:

</comment><comment><USER61> I agree with the article, I hate infinite scrolling. It just doesn't feel natural, and sometimes the performance is bad which makes everything feel sluggish.

</comment><comment><USER62> > a developer suggests using infinite scrolling

What developer suggests this? Seems like the author can't tell the difference between a developer and a "growth hacker".

</comment><comment><USER63> I'll like to see an infinite scrolling with pagination. It's easily do able. I don't know why it's not being done.

<comment><USER64> I do this on one of our internal sites at work - it makes a table that is fitted to the page vertically, where scrolling with the wheel changes the page. Super easy to flick through results (better than infinite scroll in fact), which is the main issue I have with paginated things.

</comment></comment><comment><USER65> I guess sometimes infinite scrolling is fine, as long as you have a "go to the last reply" btn.

</comment><comment><USER66> People spend so much time in their companies on doing the same tasks like looking at Google Analytics

it's insane

</comment><comment><USER67> Especially if it has a footer.

</comment><comment><USER68> Will they consider an article titled "Stop using bright neon green in prominent design elements"? I think I figured that one out in 6th grade.

</comment><comment><USER69> Highly biased opinions... What about articles where access to all parts is needed, like scientific articles, manuals, reports, etc? And for the general public too, at least part of readers are able to concentrate on reading much longer than thru a couple of paragraphs.

<comment><USER70> That's not infinite scroll. That's just a large page.

<comment><USER71> No, a book is not a large page.

<comment><USER72> i bet it would be theoretically feasible to take each individual page of a book and perform some chemical process on them such that you join the bottom of a given page with the top of the next one on chemical level, in which case, a book certainly can be a single page. really, all books are just a single conceptual page split at given boundaries to give the impression of structure.

<comment><USER72> no, I didn't say that you can turn a book into a single page exactly. I said that you can bind the pages of a book together in such a way that it would be one long, continuous page. rather, i said that conceptually, a book can be a single page, and beyond that I also went on to clarify that a book is nothing more than a single page split at arbitrary locations to give the impression of structure.

if there were a single piece of paper long enough to hold the entirety of a book, and it were written out on that page, would that make it any less of a book? it may not be one in the sense that it is no longer bound together, but at the same time, in the former example the pages were bound together by some chemical process into one monolithic page; the only thing missing is a cover to hold it together, though I have seen college textbooks come as just loose leaf paper that one has to bind themselves but that's still a "book" prior to binding.

also: what if a story or some such were to be written on a scroll? just because it doesn't fit the precise literal definition of what a book is, doesn't mean it doesn't contain the same semiotic substance as "book" and as such doesn't mean that it automatically isn't one. but maybe im just being pedantic ¯\\_(ツ)_/¯</comment></comment></comment></comment></comment>


Bill Gates: Don't tax my income, tax my consumption [video] - k-mcgrady https://www.youtube.com/watch?v=ar0ri9NLArs

<comment><AUTHOR> But rich people spend much less of their income than other people do. And poor people living paycheck-to-paycheck spend 100% of their income. So only taxing consumption is a huge benefit to rich people over poor people.

<comment><USER2> The rich _could_ spend less percentage wise of their income (they may also spend more since they have more disposable income), but they could also spend more in a real dollar value wise which would generate more tax revenue.

Taxing consumption already occurs: For example, if you drive a car you pay the gasoline tax and therefor pay more than a person who doesn't drive a car (who doesn't have to pay for fuel). Similarly, sales tax. The more you buy, the more tax you pay.

<comment><AUTHOR> Real dollar value of rich vs poor isn't the question. Unless something is horribly wrong, the rich will always pay more tax dollars than poor people! The question is taxing income vs taxing consumption. Taxing income means you get more money from rich people than you would if you only taxed their consumption, since they spend a smaller percentage of their income.

<comment><USER3> Taxing consumption vs. taxing income promotes more savings and less consumption.

Also, in theory, you simplify compliance and decrease evasion as your tax income comes from businesses and not individuals.

<comment><USER4> > Taxing consumption vs. taxing income promotes more savings and less > consumption.

Right, but I don't want "more saving and less consumption" as much as I want more people to be able to afford to choose whether savings or consumption is best for them, and taxing things that the poor do more than the rich promotes _less_ people being able to afford to choose whether savings or consumption is best. Marginal propensity to consume is pretty strongly negatively correlated with income at all levels, so _even with poverty-level exemptions_ that create some progressivity at the lower end, consumption taxes are overall regressive in income.

> Also, in theory, you simplify compliance and decrease evasion as your tax > income comes from businesses and not individuals.

This only makes sense, even in theory, if you start with the presumption that the average business is less likely to seek to manipulate things to minimize tax (whether through avoidance or evasion) than the average individual, which is an assumption which could use some justification.

<comment><USER3> Well, the point was by simplifying compliance due to a much smaller tax collection base, you reduce the likelihood of non-compliance due to the higher scrutiny.

</comment></comment></comment></comment></comment></comment><comment><USER5> No, no - don't tax his income, tax his wealth :)</comment>


Trump's H-1B Visa Crackdown Threatens Cutting-Edge U.S. Medicine - <AUTHOR> https://www.bloomberg.com/news/articles/2017-02-07/trump-visa-crackdown-threatens-u-s-search-for-medical-miracles <comment><USER2> If someone is really of world caliber they can plump for the O-1 visa, which does not have quotas. Fun fact: the O-1 visa is within reach even for moderately successful academics. My wife considered filing for that.

Medicine is probably of least concern. One of the reasons that there is a disproportionate number of foreigners in US science PhD programs is that Americans tend to go for medicine and law postgraduate degrees instead. They simply pay better.

</comment><comment><USER3> Let us have our daily Trump bashing ;)

</comment><comment><USER4> if someone is skilled enough to migrate to US, then let them be paid decently.</comment>


The people with choices prefer to work in "Inspired Spaces" - <AUTHOR> http://gapingvoid.com/2013/06/18/the-people-with-choices-prefer-to-work-in-inspired-spaces-deal-with-it/

<comment><USER2> Am I the only one turned _off_ by this kind of nonsense?

When I interview in a conference room with portholes and a nautical door, or see a hallway like this done up like a subway car, I can't help but thinking I'm surrounded by children, like I accidentally stepped into Disneyland instead of an office.

I mean, I like having fun, but I also like feeling like an adult. I don't want theme-park offices, I want natural lighting and good acoustics that muffle conversations. I don't want Nerf wars, I want product managers that know what they're doing.

There are bad, "crappy" offices, and there are theme-park offices. I'd rather avoid them both, and just work in the ones that are well-designed period.

<comment><USER3> Agreed. If I see that a company has spent millions of dollars on gimmicky decor or high-priced architects, my first thought would be: why don't they put all that money in the pockets of the employees instead? Or maybe spend it on something I might find useful, like quiet, private office spaces.

And why would I want to be reminded of a subway car every time I walk down the hall? Subway cars aren't exactly pleasant places to be: they're noisy and crowded and smelly. I avoid them whenever possible (I'd walk a half an hour to avoid riding the subway). It would get old really quickly.

<comment><USER4> I worked at a company that did "theme offices" \- mine was "the tiki room"; my cubicle was a grass hut accessible via a wooden-plank walkway (there were two other huts, a bit of sand, and a fish tank). We had a Star Trek-themed conference room and an Old West room where people's cubes were the bank, the jail and such, with those swinging bar doors you see in old westerns.

Our setup didn't cost "millions of dollars" and was actually _cheaper_ than traditional cubicles, which can be surprisingly expensive.

<comment><USER5> Haha, that really sounds cool... I'd totally love to work in such a place.

And yeah, office space, especially in a major city, is _never_ cheap, and a lot of the expense is inherent in the cost of the space itself. If you're paying for super expensive real-estate, doesn't it make sense to spend a tiny bit more to make it as nice/cool as possible?

</comment></comment></comment></comment><comment><USER6> People without choices too... but by definition they have no choice, I suppose.

On a separate note, it would be cool if those subway doors opened automatically.</comment>


China's Nreal raises $15M to shrink augmented headsets to size of sunglasses - <AUTHOR> https://techcrunch.com/2019/01/08/chinas-nreal-raises-15m-to-shrink-augmented-headsets-to-size-of-sunglasses/ <comment><USER2> They still look absolutely ridiculous. The way they hover above the nose just looks silly.

It feels like these types of glasses suffer from an effect similar to the uncanny valley. They either need to look EXACTLY like a normal pair of sunglasses, or embrace what they are and make them look very different from sunglasses. Looking sort of like sunglasses, but not being quite right, I think has the inverse effect of getting them to "blend in".

Aesthetics aside, I think the reduction in size and weight is impressive.

<comment><USER3> _They still look absolutely ridiculous. The way they hover above the nose just looks silly...They either need to look EXACTLY like a normal pair of sunglasses, or embrace what they are and make them look very different from sunglasses._

They should've gone for full-on 50's bottle bottom nerd glasses. Maybe take a cue from Brutalism, Frida Kahlo, and EletroBOOM and branched out with it's own pseudo monobrow aesthetic. (Is it just me, or do a lot of Brutalist buildings seem to be trying to convey an abstract sort of monobrow look?)

<comment><USER4> Snap tried this. It did not go very well

<comment><USER5> Snap's glasses were a fundamentally useless product. Augmented reality glasses could be quite useful.

</comment></comment></comment></comment><comment><USER6> Am I reading the first two paragraphs correctly as the founder was a former magic leap engineer?

Based on what they have said in the article, it sounds a little too good to be true. $1k price tag, lightweight, and good resolution? Maybe someone more familiar with this line of hardware can chime in on plausibility?

<comment><USER7> Yeah, and looks like they made some of the same design decisions as Magic Leap, such as a hip puck for the computing. I wonder if they're going to get hit with a lawsuit.

<comment><USER8> having a tethered computer/SoC is a pretty obvious choice, given you can't shrink it to fit inside the frame. Doubt that's patentable

<comment><USER9> And in fact, ARQuake did it first (2000), though it required a whole backpack then:

[https://wearables.unisa.edu.au/projects/arquake/](https://wearables.unisa.edu.au/projects/arquake/)

[https://www.youtube.com/watch?v=yNYfkxqiB6g](https://www.youtube.com/watch?v=yNYfkxqiB6g)

</comment></comment></comment></comment><comment><USER10> Wow. Those look super shitty. Sorry, but they do.

I really don't understand the push to make AR "goggles" look like glasses. Either make them look 100% like natural eye/sunglasses such that no one can tell, or don't even bother getting close. Just embrace it and make them legit goggles of their own.

No one is going to wear or buy these just like no one is going to wear or buy magic leap's terrible product.

Having said that, I feel like these companies are getting us started. Once they fail (including magic leap) they should open source everything they've done so the next wave can get it right.

<comment><USER11> I doubt they'll open source anything. When they fail, the investors will sell off the IP to one of the big tech companies so they can add to their defensive patent portfolio.

</comment></comment><comment><USER12> I can't see anything else but photos of ugly sunglasses and a lot of marketing BS.

No photos or videos of what the display actually shows.

</comment><comment><USER13> > believes the problem with most consumer-facing augmented headsets on the > market is their bulky size

Problem is the nausea, Virtual reality sickness to be accurate.

Addressing the bulk alone wouldn't fix the issue of long term VR use. Audi showcased VR entertainment[1] for passengers, reporters who tried out said the moving vehicle didn't produce motion sickness. Though a moving vehicle for VR wouldn't be the scalable solution, I just want to point out that the motion sickness is a definite inhibitor.

[1]:[https://www.youtube.com/watch?v=Rce5e7iBjiU](https://www.youtube.com/watch?v=Rce5e7iBjiU)

<comment><USER14> Is this a problem in AR (as opposed to VR)?

<comment><USER13> I've seen instances of nausea reported with AR on media, but I haven't tried any AR goggles to having faced it unlike VR.

</comment></comment></comment><comment><AUTHOR> Unfortunately, they still look too dorky to wear in public. All the tech gadgetry in the world won't make a successful product if they don't solve the fashion problem first.

<comment><USER3> _won't make a successful product if they don't solve the fashion problem first_

How about Daft Punk inspired Sci-fi helmet? Lots of job site functionality could make use of hard hat plus safety goggles aesthetics. Welder's masks?

<comment><USER15> Love the idea, so long as the implementation is legal: [https://en.wikipedia.org/wiki/Anti- mask_laws](https://en.wikipedia.org/wiki/Anti-mask_laws)

<comment><USER16> If it is not then the law is the problem (thankfully I'm from one of the countries where such ban would be against the constitution).

<comment><USER3> Intent is key. I would be for an extension of anti-gang laws based on intent and patterns of behavior.

</comment></comment></comment></comment></comment><comment><USER17> Searched for price the moment I opened the article.

$1000 is a tough sell. I bet if they somehow manage to lower it down to around 200, they'll take off regardless of how "dorky" they look.

</comment><comment><USER18> North's Focals look much better, but I'm not sure that they enter "augmented reality" territory.

</comment><comment><USER19> Does everyone here really care that much about how the glasses look like?

As long as the features are good, the weight is low, the screen door effect is reduced, the refresh rate is high, the lag is kept at minimum, it will be a good product.

These are the important questions. This is hacker news, not fashion news.

<comment><USER20> Everyone. If it looks bad, it will remain a niche product. With no adoption past the enthusiasts, the glasses will remain expensive, the dev ecosystem bad, the available software for limited and low quality.

You should always care whether your favorite product is sellable to a wide audience.

<comment><USER19> I think probably it is not the look of the device, but the whole idea behind it.

People will distrust someone who always has a camera recording their faces, this is a privacy problem.

No glasses will be good looking enough for that.</comment></comment></comment>


L1c: A conceptually simple formally verified compiler - <AUTHOR> https://github.com/j-baker/l1c <comment><USER2> I was going to suggest looking at FLINT certifying compiler and VeriML but with CakeML on your page you probably already know about these. I still have a suggestion to think on that I've only seen a bit of: macro-assembler for verification. Have a concept for it. Like Hyde's High Level Assembler, you create constructs (eg control flow or array operators) useful for implementing programs or say a compiler. You verify their implementation in such a way where people can just call a function and your code converts it directly into equivalent machine code. These can be composed into other routines where provers or analysis tools can more easily argue about the resulting properties. There's also a reuse aspect.

On other end, one uses an ML-like language, SPARK Ada, or something designed for easy verification to specify and test the behavior of the software. Like FLINT or Cleanroom, one breaks it down into functions amendable to analysis or verification. Those functions' implementations are done in a way that can straight-forward albeit tediously written in the verified, macro-asm. Human review and test-centered equivalence checking argues correspondence at first with formal methods later if desired. Run verified asm toolchain on it to get a correctness argument that your app's source equals machine code. If your app is a compiler, you will have many more without hand-doing the macro-asm and a bunch of verified macro's to use in next app. ;)

What do you think about macro-asm + formal methods for verified component construction ground up + top down? Any potential you see?

Note: My scheme was inspired by both VLISP and Wirth's Lilith machine. VLISP implemented PreScheme first then used it to implement the full software. Wirth implemented a more ideal processor ISA, M-code, that represented things like stack operations with perfect Modula-2 compatibility. He then did a Modula-2 to M-Code compiler with the rest of the software written in Modula-2 w/ M-code for acceleration. For both systems, raising the machine level up a notch reduced their overall work and made the source more consistent throughout.

</comment><comment><USER3> Looking at the proof: has the proof been formally verified? There could be a bug in that...

<comment><AUTHOR> The proof is written in the HOL4 proof assistant. The idea here is the same as any LCF derivative- there is a type, thm, and the constructors of that type are constructed such that only valid theorems can be created. So, by creating a value of type thm, with that corresponding to your goal, you've proven the theorem.

My proof works by creating such a value.

There are obviously lots of places where this can go wrong, but good progress has been made towards most of them - [http://materials.dagstuhl.de/files/15/15182/15182.KonradSlin...](http://materials.dagstuhl.de/files/15/15182/15182.KonradSlind.Slides2.pdf) is a decent explanation.

As a handwavey argument, the proof could be incorrect, but if it were incorrect, the incorrectness would be more interesting than the current proof (i.e. a serious bug would have been located in the theorem prover).</comment></comment>


Assume the Worst: Enumerating AWS Roles Through 'AssumeRole' - <AUTHOR> https://rhinosecuritylabs.com/aws/assume-worst-aws-assume-role-enumeration/ <comment><USER2> This article is grasping pretty hard. You mean to tell me if a role was misconfigured to allow anyone to assume it, and someone guesses that role name, then they'll be able to assume it?!

The only part of the article that is interesting is the difference in error messages that allows you to confirm whether a role exists or not, but I suspect that wasn't enough content for a blog post so the scary implications of misconfiguring security policies was thrown in.

<comment><USER3> If the policy has AssumeRole with principal "AWS:*" then yes, anyone can assume it and get temporary credentials to resources. Normally you would put an account number there but what if you want all your accounts to be able to assume the role and want a quick solution? I think a lot of people didn't realize that anyone on AWS can assume the role if they do this.

I think it's quite common for people to just put something in the policy that works on order to quickly proceed with whatever they are doing. Article says they found about 50 policies like this.

</comment></comment><comment><USER4> I've been evaluating AWS and other cloud services and I think their control planes are a really interesting and not well explored area from a security perspective. My guess is we will see many future security incidents that seem like rehashes or old 90s type exploits or user/admin failures due to complexity.

</comment><comment><USER3> The difficult line between being helpful to normal users and malicious users...

This reminds me of the classic enumeration attacks in the 90s where you could figure out usernames in machines by various remote services they had running.

Doing it on AWS global level is kind of cool. :)

</comment><comment><USER5> Many CI server configurations will rely on running jobs under a role which can only assume other roles. Individual jobs will then assume the role they need.

Something like this infecting a popular Node.js / Python / Ruby package could potentially do a lot of damage.</comment>


Ask HN: Often do you seriously think about preparing for a doomsday scenario - <AUTHOR> With more and more climate scientists raising the alarm that the world might experience population collapse due to shortage of food/water in 10 or 20 years, and the HN crowd being arguable smarter than average, how often do you think about this and what are your strategies for preparing? <comment><USER2> Never. I assume we either all make it by helping each other or we don't. So there is no reason to prep. My prepping is looking for ways to create as much progress as possible and doing anything else feels regressive to me.

<comment><USER3> How will you help other people if the economy breaks down?

<comment><USER2> When has the economy ever "broken down"?

<comment><USER4> Great Depression? Every war torn area ever? Shifting markets causing ghost towns? Every large emigration such as the Irish Potato Famine? And then you have "so dysfunctional that it may a well be broken" economies. See life in slums or very poor regions.

</comment></comment></comment></comment><comment><USER4> My goals: completely debt free, land to grow and raise food, months of food and water storage. From there, reduce reliance on stores and services and increase the ability of self-sustainability. This is not doomsday prepping, this is having redundant and back up systems and processes. We are not homesteading or building bunkers, just wanting some redundancy and safety nets. This will help in economic downturns or if we have trouble securing gainful employment. We are only just starting, but it already has helped. We had enough toilet paper on hand despite also having a bidet to more than outlast the great COVID toilet paper shortage of 2020.

For a real doomsday type event, I don't think hardly anyone outside of high government positions who will be whisked away to underground bunkers with underground farming will have much of a chance.

<comment><USER5> I would love to have land and be less reliant on stores. That would make it more likely I can quit my job. I hate my job.

</comment></comment><comment><USER6> I personally don't prep for doomsday events. But I think being financially stable, owning a plot of land, etc has advantages. Just normal things stable people tend to do or own.

Many people over extend themselves and will collapse with the economy.

</comment><comment><USER3> Rule number 1 is don't tell people that you prep. Rule number 2 is don't tell people that you prep.</comment>


Python Patterns - An Optimization Anecdote - <AUTHOR> http://www.python.org/doc/essays/list2str.html <comment><USER2> I decided to try writing the same thing in JavaScript and discovered something really strange.

My first idea was:

        numbers.map(function(x){return String.fromCharCode(x);}).join("");

This was pretty fast already, but why not eliminate the anonymous function completely and pass String.fromCharCode directly to map():

        numbers.map(String.fromCharCode).join("");

I timed it and... ...this was ~100 times slower than the previous version. WTF!

Somehow passing this native function directly to Array.map() is way slower than wrapping it inside another function and passing that to Array.map().

I have tested it so far in Chrome, Firefox and Opera - the results are the same. I also tried forEach(), which behaves similarly.

Does anybody have an idea why this is so?

Update: I tried the same with Math.round and Math.sin, and with these the results were as one would expect: passing the function to Array.map() directly was a little bit faster than using intermediate anonymous function. So it seems the problem is with String.fromCharCode specifically.

<comment><USER3> Just a guess: your anonymous function cannot be redefined (because there is no name), but String.fromCharCode could potentially be. Thus, a similar reason as mentioned in the article for global vs. local variables.

One would think that String.fromCharCode is looked up only once, though.

<comment><USER4> Actually it's the opposite. When you pass String.fromCharCode directly, then you're passing reference (not name) to that particular implementation, and it can't change.

When you pass anonymous function, then every execution of that function needs to look up `String.fromCharCode` (anonymous functions save scope, not references).

I'm surprised by the benchmark as well. I suspect it may be because calls to native functions are handled differently from calls to JS functions, and JS engine is able to optimize call inside anonymous function (create trace/JIT and inline it), but not when calling by reference (and perhaps keeps calling it by some expensive proxy object).

</comment></comment></comment><comment><USER5> I once found myself writing a python program to calculate Poker hands. It was pretty fun to write - it generated, for any given hand you hold, every possible way the game can go forward, and generated statistics about how many times you win (against 1 opponent only, who could be holding anything.)

The program initially ran for 20 minutes on each hand. I worked a day on optimizing it, and got it down to around 1-2 minutes per hand, so I learned a few tricks to make things quicker. Lessons learned:

1\. Local lookups are _much_ faster.

2\. Anything that you can somehow offload to a c-loop, makes things much faster.

3\. Surprisingly, the fastest construct for building a new list was always list comprehension (e.g. [x for x in calc(l) or whatever.) This was far faster than a regular ol' for-loop, of course, but was also faster than using map's and reduce's.

<comment><USER6> Point 3 is weakened by the fact that map can indeed be faster. <http://codepad.org/SzXcubXy> \-- in fact, point 2 and point 3 are in conflict, because map() _does_ use a C-loop, whereas list comprehensions do not. As it turns out, point 2 was the correct one.

Also, and this is just on a more minor, pedantic note, list comprehensions basically are regular for loops, except with the use of the list-append opcode instead of a getattr-call pair. This produces a minor speedup, but it's nothing to write home about, honest. (using a different pastebin because it has a feature I needed): <http://ideone.com/dT1LG> . The story is a bit different on 3.x, where list comps are implemented very differently: <http://ideone.com/58FGZ>

<comment><USER5> First off, I'm really no expert in Python _or_ optimizations - I'm only reporting on observations.

Having said that, I was pretty surprised that the list comprehensions ran faster than map, exactly because of point 2 - I had assumed that map used a c-loop, whereas list comprehensions did not. Unfortunately, I don't have that code sitting around anywhere so I can't redo the tests - I just remember being very surprised by those results.

<comment><USER7> In my experience edanm is correct. map/reduce/filter are faster with built-in functions, but list comprehensions are faster with user-defined ones

For eg. using python 2.5.2

In [9]: l = ['10'] * 5000000

In [10]: timeit -n5 map(int, l)

5 loops, best of 3: 1.29 s per loop

In [11]: timeit -n5 [int(i) for i in l]

5 loops, best of 3: 1.64 s per loop

<comment><USER6> You mean "incorrect". Also, I did post detailed timing results above.

</comment></comment></comment></comment></comment><comment><USER8> It's a whole different story if the input gets longer and the quadratic complexity kicks in. Just change the testdata like this:

      testdata = range(256)*100

Result:

      f1 5.539
      f2 40.747
      f3 5.072
      f4 5.311
      f5 0.068
      f6 3.304
      f7 1.431

</comment><comment><USER9> The first thing that stuck out to me like a sore thumb was the string- concatenation-in-a-loop. Though the author was aware of its consequences he only addressed it late in the article, optimizing relatively trivial stuff like variable lookups first. And then he did so in a rather strange way, instead of adding string fragments to a list and then join()ing them.

Not sure how fast that loop would be in Python compared to the implied loop&join but I sure would have liked to see them compared.

<comment><USER10>
      > Not sure how fast that loop would be in Python
      > compared to the implied loop&join but I sure
      > would have liked to see them compared.

Why don't you try it and tell us the results?

</comment></comment><comment><USER11> For those interested, the author of this was actually Guido himself.

I would have used "".join(map(chr, list)) myself. But I am not sure that was support in the version of python available at the time. It is equivalent to f6.

To some of those talking about the dynamic nature of python means you have to look up chr every time, there is a way to stop that, see this project <http://github.com/rfk/promise/>

</comment><comment><USER12> Why not just:

        def f(list):
            return ''.join([chr(l) for l in list])

<comment><USER13> This would be my default approach as well. I'd be interested to see how it compares-- my guess is that it would be equivalent to or slightly faster than f6(), and slower than the version that uses the array library.

<comment><USER12> From the article, I'm guessing the author was using a version <2.x.

Incidentally, I ran my function and f6 from the article on a list of 9600 integers using Python 2.6.3. f6 ran in 0.00303250832159 seconds and my function ran in 0.00421450212248 seconds.

</comment></comment></comment><comment><USER14> Incidentally, are there any programmes that can scan your python functions and suggest improvements that are in this article? e.g. any programme that'll suggest referencing global names to the local namespace, using map etc.?

</comment><comment><USER15> I hope that one day soon our compilers will be smart enough to optimize simple things like this automatically, so we can focus more on writing for clarity. This seems like exactly the kind of thing a next-gen compiler should be able to optimize.

<comment><USER5> I'm not sure it's so possible, considering the dynamic nature of Python.

Consider one of the biggest problems - dynamic lookups. Calling a function like "chr", which is looked up dynamically and found in the global scope each time, takes a lot of time. Just adding a local variable which has the _same value_ (i.e. lchr = chr) already gives a speedup.

How can an optimizer fix this? Technically, a new lookup must be performed each time, since you never know if "chr" has been mapped to something new during the iterations.

<comment><USER16> > you never know if "chr" has been mapped to something new during the > iterations.

Why must this be true? Scan the loop body, find nothing that redefines chr, create a local variable holding it at the beginning of the loop. The same goes for all identifiers mentioned in the loop.

<comment><USER3> Generally, you cannot scan the loop body to find redefinitions of `chr`. This is known as the halting problem.

Consider, for example, a redefinition of `chr` in an `if`-clause: you would have to actually run the program to know if the `if`-clause is taken or not.

Further, in Python, the redefinition of `chr` does not even have to be in the form of `chr = ...`, but could be an assignment into a global hash, maybe even using a variable as an index.

<comment><USER16> I'm not suggesting that you have to know specifically that chr is being redefined; to cancel the optimization, you simply have to know that "this loop body is not limited to the subset of operations which are known to _not_ redefine chr" (i.e. basically the same sort of analysis Google NaCl does.) This leaves a large number of optimizations on the table (i.e. any loop body that modifies a global hash will cancel the optimization), but is better than no optimization at all.

<comment><USER3> I wonder how large (or small) that restricted subset is and how easily it is 'violated', turning off the optimization although it would have been possible (For example, the global hash could be referred to via a local variable which might carry the result of a function call). Do you have any insights on that?

Until then, using a 'dirty flag' on the `chr` definition that turns off the optimization at run time as mentioned elsewhere in this thread, seems to be the appropriate approach for me.</comment></comment></comment></comment></comment></comment>


Building the Hoover Dam - <AUTHOR> http://allday.com/post/981-building-the-hoover-dam

<comment><USER2> > Even though its [sic] only the 18th largest human feat of engineering right > now, because of its innovative construction techniques and placement in the > landscape, its [sic] likely to outlast almost all of the others that have > topped it in size.

So, the asterisk was declared illegal and I missed it?

A piece of advice -- not using asterisks at all isn't the preferred way to avoid their misuse.</comment>


Samsung data center fire causes outage, errors on smart TVs and phones - <AUTHOR> http://www.engadget.com/2014/04/20/samsung-com-outage-sds-fire/ <comment><USER2> Holy crap.

That video is scary. I didn't know that "modern" office buildings could burn like that.</comment>


Dev-ops Against Humanity: A card game - <AUTHOR> https://github.com/bridgetkromhout/devops-against-humanity <comment><AUTHOR> I received this as a gift this year and love it! It's a dev-ops flavor of the popular game cards against humanity.

The only downside is that you likely can't play it with your mother.</comment>


Tylenol can reduce the emotional pain of social rejection. - <AUTHOR> http://www.ncbi.nlm.nih.gov/pubmed/20548058#

<comment><USER2> Right, but so can alcohol, and mixing alcohol and tylenol can be bad for your liver.</comment>


Eelo: A Google-less Android alternative emerges - <AUTHOR> http://www.zdnet.com/article/eelo-a-google-less-android-alternative-emerges/ <comment><USER2> How does this compare to AOSP? Or other Google-free Android projects?</comment>


An Ancient Computer Language Is Slowing America's Giant Stimulus - <AUTHOR> https://www.bloomberg.com/news/articles/2020-04-13/an-ancient-computer-language-is-slowing-america-s-giant-stimulus <comment><USER2> Pity the sordid state of physical infrastructure can't be blamed on COBOL, too.</comment>


Haskel Threads Block - <AUTHOR> http://www.wjwh.eu/posts/2020-07-10-haskell-thread-blocked.html <comment><AUTHOR> The automangler really changed up the title as posted here.</comment>


Google's Virtual Assistant Is Awesome – Here's Why I Never Want To Use It - <AUTHOR> http://www.sfgate.com/technology/businessinsider/article/Google-s-Virtual-Assistant-Google-Now-Is-Awesome-4616122.php <comment><USER2> If we're concerned our brain muscles won't be flexed enough because an app does the lifting for us (a valid concern, let me emphasize) perhaps this could be integrated into the app itself.

Instead of a message saying "if you want to reach your flight, you have to leave in the next hour" you get a message that prompts you to think: "are you sure you have enough time?"

It could even be taken to the extreme of prompting you to do _more_ mental churning than if you didn't have the app.</comment>


Ask HN: Is there a main site for C programming language? - <AUTHOR> Every more or less popular programming language has its main site, which serves as a main entry point for everybody who wants to learn the language or find any information. Usually those site have links to documentation, tutorials for beginners, reference materials and so on.
C programming language is one the most commonly used nowadays, and still it doesn't have its "entry point". I mean, there are plenty of resources out there, but none of them serves as a source of truth.
Is there anything like that for C? <comment><USER2> I think the answer you're looking for is "no".

Because C was developed at Bell Labs in the pre-internet 70s, the first "official" documentation was the book by K&R. Due to the language's popularity, it was standardized first by ANSI, then by ISO. So these days, the closest thing to a "source of truth" for the language is the standard published by ISO. That working group's website is here: [http://www.open- std.org/jtc1/sc22/wg14/](http://www.open-std.org/jtc1/sc22/wg14/)

Of course, standards documents are not really entry points, as they are extremely dry, technical documents. Which is why I think the answer to your question is "no".

I think your best bet would be to start with the second edition of "The C Programming Language" by Kernighan and Ritchie, then work your way "into the future" by looking at books on C published in the last decade.

HTH

</comment><comment><USER3> comp.lang.c still used to be the one true place for c programmers to hang out at back when I started learning it in the 90s, not sure if that's the case these days.

<comment><USER4> Still active. Dennis Ritchie stopped posting in the early 2000s, I think, years before his death. I believe a C committee member or two still contribute regularly.

I think the group FAQ is at [http://c-faq.com/index.html](http://c-faq.com/index.html)

Newbies tend to get upset about the strict topicality voluntarily enforced-- strict C, no discussion of platform or compiler extensions except in contrast. It's a large part of what has kept the group useful for so long, though, especially considering there's no moderator.

There's also comp.std.c, but that's for discussing the C standard specifically. Not really for learning the language.

comp.unix.programmer is also still active and useful.

</comment></comment><comment><USER5> [https://www.reddit.com/r/cprogramming/](https://www.reddit.com/r/cprogramming/)</comment>


Feedback is greatly appreciated. I'm Sterling Toth and this is my app called Hear - <AUTHOR> http://hear.so

<comment><AUTHOR> I would love to hear what you think and answer any of your questions.</comment>


As HomeJoy Folds, PocketSuite Cleans Up - <AUTHOR> https://medium.com/@sammadden/as-homejoy-folds-pocketsuite-cleans-up-a2de8357f20b

<comment><USER2> As HomeJoy shuts down, we definitely need to think long and hard about our vision for how to grow and sustain the on demand economy. It's clear marketplaces are not the panacea.</comment>


Woz on Creativity: Work Alone - <AUTHOR> http://www.brainpickings.org/index.php/2012/01/18/woz-on-creativity-and-innovation/

<comment><USER2> This brought to mind Hemingway's Nobel acceptance:

"Writing, at its best, is a lonely life. Organizations for writers palliate the writer's loneliness but I doubt if they improve his writing. He grows in public stature as he sheds his loneliness and often his work deteriorates. For he does his work alone and if he is a good enough writer he must face eternity, or the lack of it, each day.

For a true writer each book should be a new beginning where he tries again for something that is beyond attainment. He should always try for something that has never been done or that others have tried and failed. Then sometimes, with great luck, he will succeed.

How simple the writing of literature would be if it were only necessary to write in another way what has been well written. It is because we have had such great writers in the past that a writer is driven far out past where he can go, out to where no one can help him."

<comment><USER3> I could not upvote this more, but maybe it's just because I'm going through an intense "work hard in solitude" period.

Here's a quote I ran across: <http://musicthoughts.com/t/415> "The best chance you have, if you want to rise, is to give yourself up to loneliness, fear nothing, and work hard."

</comment></comment><comment><USER4> Similar point is made in this article oriented toward military officers:

<http://theamericanscholar.org/solitude-and-leadership/>

TLDR: Leadership requires depth of understanding, intospection, and capacity for creativity, all of which require solitude to cultivate.

<comment><USER5> This piece blew me away - thank you for posting it! I wonder if many people find the main message difficult to relate to. I certainly would have just 2 years ago while in a corporate world.

</comment></comment><comment><USER6> If you're reading Hacker News but haven't read iWoz, or at least had it on your reading list for a long time and plan to get to it soon, then you're reading the wrong website. You simply can't get any more "been there, done that" than Woz when it comes to technology and startups. Steve's life is an open book, and you won't find any bullet points of indispensable wisdom in it, but you'll come away with a lifetime of experiences to draw on for your own decision making, and hopefully a little bit better worldview. I thought I knew all there was to know about the Apple story, but knowing a list of facts isn't like experiencing things from the point of view who made it possible. Would that the world had more Steve Wozniaks in it.

<comment><USER7> I haven't read that book but it seems, from what I have read online, that it contains a lot of bragging from Woz, and not enough details about the challenges he faced in the early days. Plus the title itself is misleading. Wozniak had no direct link to the Apple in iPod/iPhone/iPad era.

<comment><USER8> Once technology issue is resolved engineer should humbly deny his contribution and let others take or share the credit??

On a serious note I have seen couple of interviews but to me Woz never appeared to be bragging. He simply likes explaining technology.

</comment></comment></comment><comment><USER9> Serious Creativity" is definitely something that cannot be done in a group work. The process that allows to generate new ideas, new ways to do something, is basically the same one for each of us:

1) The starting point is always the observation of anomalies in an existing system or pattern. 2) You reason on those anomalies in your head, alone. 3) You come up with a possible response, alone. 4) You visualize in your head how this response would actually works. This should be practiced until you see it working smoothly from beginning to end. You do this alone. 5) Finally you set to work in order to bring this response into our physical world. Either alone or in a group-work

(The above needs some further explanation but this will bring me out of track now. If anyone wants me to elaborate more on those 5 points I will do it opening a new thread.)

Now, doesn't this process sounds familiar ? Mr Paul Graham & co. have set up YC on those 5 points. In his article "How to apply to YC" he writes:"...what we look for in ideas is not the type of idea but the level of insight you have about it...". So if steps 1 to 4 are well executed, step 5 would be to apply to YC (or any other start up incubator that has the same framework process for selection.)

</comment><comment><USER10> On similar lines.. there is a new book:

Quiet: The Power of Introverts in a World That Can't Stop Talking <http://www.thepowerofintroverts.com/about-the-book/>

<comment><USER10> Here is the talk she gave at TED2012. [http://www.ted.com/talks/susan_cain_the_power_of_introverts....](http://www.ted.com/talks/susan_cain_the_power_of_introverts.html)

</comment></comment><comment><USER11> I feel this quote is unfair taken out of context of the rest of the book. iWoz was an interesting read. What surprised me about it is I came away feeling like Woz feels like a victim in many ways and he's got a skewed outlook on the world. When you feel that perspective from the book, this quote takes on a different meaning. At least it did to me. It feels more arrogant and self serving. I got the feeling that Woz thinks the world in general doesn't appreciate him, and so he used this book (and this quote) to try and force the idea that he is a true genius. Which is sad, because, well, he _is_ a true genius.

For what it's worth I'm finding it hard to put my reaction to iWoz in words. I recommend it to anyone who hasn't read it. I'm pretty sure you will also come away with an interesting new perspective on the person that Steve is.

<comment><USER12> If you've read the iWoz, you will see Steve Jobs was jerk from the beginning.

<comment><USER13> I was convinced already after reading Founders at Work and how Jobs screwed him out of money right from the start.

</comment></comment></comment><comment><USER14> In my experience this is correct. Work alone. It forces you to know what you're doing, and every part of this. So you're a deeper understanding.

Plus, there's nobody to tell you what to do (in all kind of meanings, eg, "maybe if you did xx that would be better!"). So you find your own solution.

On top of that, you'll sometimes reach walls that you have to destroy, again, on your own.

Basically, on your own, you gain more experience. It doesn't mean you shouldn't share it back of course. But you need to get some stuff done from A to Z if you want to be able to think by yourself (aka innovate, etc.)

</comment><comment><USER15> I've been spending a lot of time recently trying to plan the work we need to do in the next few weeks to deliver or product to market, planning, meeting, discussing, etc. It was looking like there's no way to finish all the work we have to do.

Today, I made a point to avoid email and discussions with coworkers and just crank through as many JIRA tickets as possible. I was shocked how much I accomplished.

Wasn't necessarily the most creative work, but still seems related to what Woz is saying.

</comment><comment><USER16> This reminds me of #18 on Hugh MaCleod's "how to be creative" -- Avoid the Watercooler Gang.

<http://gapingvoid.com/2004/07/25/how-to-be-creative/>

</comment><comment><USER17> Personally I think there is a large amount of value in wrestling with an idea until you are completely stuck on it and then talking to another engineer about it for a couple of minutes. Maybe I'm just an external processor, but some of the most creative and interesting things I have come up with have been the result of talking through a problem I've encountered with someone else.

<comment><USER18> Perhaps you just need a rubber duck? <http://en.wikipedia.org/wiki/Rubber_duck_debugging>

Joking aside, I absolutely agree with you. I enjoy working with other smart people I can bounce ideas off of.

</comment></comment><comment><USER19> Relevant TED talk: [http://www.ted.com/talks/lang/en/steven_johnson_where_good_i...](http://www.ted.com/talks/lang/en/steven_johnson_where_good_ideas_come_from.html) Basic idea is that open-ended collaboration > working alone. Which doesn't so much conflict with the idea that working alone > working on a "committee" or "team", in my opinion.

</comment><comment><USER20> I understand the point about needing time alone to think things over. However I worry that many will use this as an excuse to stay locked up in their office making "The next big thing" without consulting or talking to potential customers/users. It's important to keep in mind that Woz would not have started Apple if Steve had not been pushing him to do it and gone out and done the legwork. If you read Jessica's book Woz said that he would have been perfectly happy working at HP his dream was to work at HP not to build Apple.

</comment><comment><USER21> Designer Philippe Starck apparently never reads magazines or watches TV.

Finding time to be truly alone to work is becoming increasingly difficult. Silence is a luxury few get these days.

</comment><comment><USER22> If you want to be creative, be smart and well-informed. Being alone is primarily important for avoiding interruptions which destroy your train of thought. Being creative requires combining ideas: well, you can't combine them if you have never heard of them. So learn a lot! And learn good facts and proper scientific (ie disprovable) theories, not stupid, useless opinions and religious/political beliefs invented by overblown authorities. Learn everything and believe nothing. Then go create.

</comment><comment><USER23> >I don't believe anything really revolutionary has ever been invented by committee

The Internet would seem to be an obvious counter-example to this claim.

<comment><USER24> "The Internet" ? What definition of Internet allows it to be considered a single revolutionary entity that was invented, and by a committee no less.

<comment><USER23> ARPANET?

<comment><USER24> AFAIK ARPANET started as a project to implement existing ideas about networking.

<comment><USER23> It was the first packet-switching network, and thus an invention. It also directly grew into the Internet (the original ARPANET was the first network on the Internet), hence my response. And, it was designed by committee. So as far as my original comment goes, I still think the Internet is a pretty good counter-example to Woz's claim.

<comment><USER25> Packet-switching was the invention; ARPANET the implementation. Implementations by committees/teams/groups are commonplace. For you to call it a _good counter-example_ , you need to show that packet-switching was invented by a committee.

<comment><USER23> I don't think separating the two is reasonable. Was the invention of the internal combustion engine separate from its first construction? Was the invention of the atom bomb separate from the construction and testing of The Gadget?

Conception and implementation are, in my mind, both necessary for invention.

<comment><USER25> You can define things however you want but you're talking about something very different to what Woz is talking about.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER26> I find it's great to start ideas alone and work with others to see them completed. I suppose that's pretty much what Woz did with the Apple I and II.

</comment><comment><USER27> It's like any evolutionary process. You need a dynamic period when ideas are smashed together. But you need a lot more time when ideas are given the opportunity to independently arise. The diversity in the ideas going into the fusion/collaborative stage will determine the fitness of the output.

</comment><comment><USER28> Spot on. However, I cant think of a single achievement which was not created from unfiltered group brainstorming. Then again, I do things differently.

</comment><comment><USER29> My tip of the day: work hard in solitude - stop reading Hacker News :)

</comment><comment><USER30> Woz is famous because he worked with a team.

Alone Woz couldn't have had the sense to sell blue boxes, the gumption to complete Breakout in a crunch, or build a computer that worked with a color TV, or design the elegant Apple II. He would have stayed at HP and been a great mid-level manager. He now lives the life he wants, without having to worry about about money, all because he worked with a team.

<comment><USER31> Creativity and success are two different things. Without a team Woz would not have been as successful as he is today but he would still have been an insanely creative mid-level manager at HP.

</comment></comment><comment><USER32> I read somewhere saying Woz is Asperger, is it true? just curious

</comment><comment><USER33> He's right. Best stuff I've ever done involved zero noise and distraction. But really, I'm just antisocial.

</comment><comment><USER34> Except the work Steve Wozniak is most remembered for was done with Steve Jobs, so he did in fact work in a team. I think the quote is just a rant against the pains of pushing innovation in corporate environments, that any engineer could write just as well in a moment of frustration - anyone in engineering should recognize a familiar note as he starts talking about committees and marketing people.

Every engineer already goes through a lot of struggle designing the initial prototype of the thing being designed, analyses the constraints involved, tries out different alternatives attempting to find the sweet spot that will satisfy them all etc. Then, exhausted and in love with the product of his effort, he shows it to people at some company or institution and they all have something to say or add to something the engineer perceives as already perfect or almost perfect, some might have valuable criticism, but some might just have no idea about the constraints involved because they didn't put in that much time into analysis, some just want to have their share in the potential success, some have to think about how to actually sell it etc. That surely is overwhelming, but it is part of the engineers work and I don't think "Work alone" is advice of much value. You simply have to accept this is just as an important part of your work as the design itself - I think most people never do. Then, you can starting learning how to best deal with it. Also, find a team or/and organization that you actually like, or at least can tolerate.

<comment><USER35> "Except the work Steve Wozniak is most remembered for was done with Steve Jobs"

It was actually a common misconception. Nearly all the engineering work for Apple 1,2 was done by Woz alone (as per his book). And Apple 1 was completely done in isolation in his apartment. His book is such an awesome read.</comment></comment>


SIP Trunking to Replace My Landline Phone Using Plivo - <AUTHOR> http://plivo.com/blog/sip-trunking-to-replace-my-landline-phone-using-plivo/ <comment><USER2> Ugh, this is nothing new and the author is relatively uninformed on VoIP in general. SIP trunks got hot in the consumer space around 2005-2006 and there are much better alternatives than the author describes as well as far superior hardware (IMHO that Cisco ATA is junk for the price).

Do your research. Use something like the PBXIAF forums and software if you want a good place to start. If you don't need 911, which all providers have to offer (paid is the Q), leverage GVoice with an Obi (someone already mentioned) if you want to get it on the cheap but have hardware you can grow into an actual PBX.

$0.02.

<comment><USER3> You clearly know this stuff. You should expand this into a step-by-step article, with what to use rather than just what not to use. Denouncing the article we have without providing clear alternatives may give you and some in- the-know friends a good time, but it's useless to me. You might consider hooking the rest of us up with some actual knowledge, rather than a vague incitement to "do research" on "forums."

<comment><USER4> There are plenty of step-by-step articles out there. Personally, I use FreePBX to manage an Asterisk system with Grandstream, Cisco and Siemens endpoints. Any google search for FreePBX will find lots of guides.

</comment></comment></comment><comment><USER5> One thing to be wary of as with most voip providers is E911. I'm not sure if Plivo offers it but it's worth looking into before venturing down this path.

From their terms of service it doesn't appear that they do offer it.

"You also acknowledge and understand that Plivo does not currently allow you to access any 911 or similar emergency services (no traditional 911, E911, or similar access to emergency services). The Services are not intended to replace any primary phone service, such as a traditional landline or mobile phone, that may be used to contact emergency services."

<comment><USER6> I use voip.ms. E911 is $1.50/month, but I'd be an idiot not to pay it.

<comment><USER7> I also use voip.ms. Unfortunately their API and features have stagnated for quite a while. Even a basic feature like the ability to upload a voicemail greeting has not been implemented yet.

That being said the features they do have implemented work well and the pricing is attractive.

I can't really tell what Plivo offers other than an API to build custom solutions.

<comment><USER8> I use it as well. It does seem to have slowed in terms of new features.. but it's the absolutely no-hassle, reliable, functional service that I just love. It's cheap, it does what it does properly, you don't get spammed or tricked into anything whatsoever, and if you do happen to have a billing issue or something, their support has always come through over email with no problems at all for me. They have their act together.

</comment></comment></comment></comment><comment><USER9> _Custom voicemail system with per-contact messages._

I just ported my home VoIP service from Time Warner, with their Motorola ATA, to an OBi202 with Anveo. (The OBi202 is also connected to my Google Voice account, so when I'm home where I have terrible cell service, I can still receive/make calls from my "cell" #.)

Anveo's Visual Call Flow Builder is pretty neat and can do what the OP mentions. I have a white list of #'s that will ring through to my home, a black list of #'s that have to press 1 to leave a message, and everything else just goes straight to voice mail. It looks like this - [http://i.imgur.com/lEe8Nbv.png](http://i.imgur.com/lEe8Nbv.png)

It was all pretty straight-forward to set up and works great so far. Call quality is excellent.

<comment><USER10> OP here. That looks awesome -- exactly the kind of thing I want to set up one way or another.

I also want to have a Google Voice-style online interface for voicemail, starting conference calls, etc. I think there's a lot of potential in an open- source web app that has these features and makes the SIP setup stuff a little bit easier than having to go through the general Plivo dashboard.

</comment></comment><comment><USER11> This is cool. It's nice that you can register an ATA.

This is not really new functionality though, I mean any service can do this from voip.ms to flowroute.

I think it would be cooler if the article showed how you can use the scriptability of Plivo in tandem with their SIP registration to really make a professional supplemental phone. In addition, demoing how to provision your cellphone to call forward to your landline on no-answer would be useful.

Not a bad blog post, just missing that extra sauce that would really make it pop for me.

Source: I'm a big telecom nerd.

<comment><USER12> Funny enough, I did this last month using the Telephone Mac application (just as the author initially did). The real story that the article doesn't quite do justice to is how easy it was. From zero to a functioning phone (making and receiving calls) in less than 30 mins.

If you were to recreate this via FreeSWITCH/Flowroute, it's more like an hour and change from scratch. (Register for VPS, install everything, etc.)

<comment><USER11> That's exactly my point. In the article they highlight the end result, which is frankly boring, instead of the setup, which is where they shine.

There's always a market for well done abstraction.

<comment><USER12> Agreed.

Also, got to give them props on support. I've stepped away from doing this for a living, but wanted an easy way to call my relatives overseas. The first attempt resulted in poor quality to the foreign landline. Cell was crystal clear. I notified Plivo team via the built-in chat and they had it fixed promptly.

This was a request from an extremely low-volume user calling European country Plivo doesn't support for anything other than dialing to. In other words, not a lot of $$$ to be made, but service was top notch!

</comment></comment></comment></comment><comment><USER13> For easier setups and ludicrous pricing, I can recommend DIDlogic. Supports call groups, has incoming phone numbers in many many countries and is dirt cheap. Haven't had any issues with them either.

</comment><comment><USER14> While I love VoIP, for terrible _cellphone_ coverage you might want to look at getting a femtocell for your house. They're carrier specific, though.

<comment><USER9> If you can get your cellular provider to give you one (typically you have to be on a post-paid plan), great. Otherwise they are a few hundred dollars last time I looked, and still require you to have at least one bar somewhere in your home. I do not consistently have that from anywhere in mine, although maybe a femtocell's better antenna would.

</comment></comment><comment><USER6> Isn't this just a voip setup? I use a Cisco SP112 with voip.ms

Yes, it can be quite techy, but nothing new.

Edit: Phone bill is approx $10/month with $1.50/month for E911

</comment><comment><USER15> Nice. Makes you wonder why no one did this so far.

</comment><comment><USER16> Haven't used landline for a long time but the more I've used Skype, the more frustrated I've got with it. Really really frustrated on some days. Even plain old-fashion analog telephony was better experience I recall. Maybe there's something in this Plivo SIP thing that could take us to the next level on telephony.

<comment><USER17> 2/10</comment></comment>


Challenge HN: math game - <AUTHOR>

spent a lot of time writing this, sorry for bad english, not a native tongue speaker.
the purpose of this game is obtaining 100 as result of various math operations following some rules
1) every digit from 0 to 9 (0 1 2 3 4 5 6 7 8 9) included must be used once and only once in the expression
2) every basic math operation (+ - * /) might be used
3) these math functions might be used: -power: x^y -square root: sqrt(x) -cube root: cbrt(x) -factorial: x! (for example 4! = 4 * 3 * 2 * 1) -summation from 1 to x: S(x) (for example S(4) = 4+3+2+1)
4) parenthesis might be used
5) the 0 must be useful to obtain the final result of 100; if the 0 is removed from the expression and the final result doesn't change then the expression is unacceptable (example: expression + 0)
7) you can't juxtaposition (put together without operations/functions in between) digits (example: 78 is incorrect)
---
to value quality of solutions we'll use 3 indexes: 1) Single Occurences (SO): how many different operations/functions are used - the maximum is 9 of course
2) Multiple Occurences (MO): how many times operation/functions are used - the minimum should be 13.
3) Max Repetition (MR): the number of time the most used operation/function is used - the minimum should be 2.
You should maximize SO and minimize MO and MR
For the chart the first index that will be valued is SO, then MO and finally MR.
---
here's an example (it'd be correct if it had 100 as final result):
8 * (7+5) + 0 * (3+1) + (2+9+6) * 4 = 8 * 35 + 0 + 17 * 4 = 280 + 68 = 348
SO: * and + = 2
MO: 3 * and 6 + = 9
MR: + is used 6 times = 6
---
to submit the solution you should calculate your own indexes and final result like i did in the example. <comment><USER2> (((7^4)-1)/(2 _(3+9))+0!(5+sqrt(cbrt(sqrt(...8...))))/(S(S(..6..)))

I used an infinite number of square roots, cube roots, and sums. None of the rules require a finite expression :P

SO: ^ + - _ / sqrt cbrt S= 9

MO: infinite

MR: infinite

<comment><AUTHOR> i guess it's valid (as long as the result is really 100, you haven't provided calculations). but it's not the best avalaible, since doing MO 13 is actually easy

<comment><USER2> the end works out zero. lim (6)^(1/n) == 1 n -> inf

The second one is a bit tricky, SUM(N){1 to inf} == inf thus: 1*(5+1)/inf == 0

</comment></comment></comment><comment><USER3> You example is illegal. The operation 3+1 can be removed without changing the answer, violating rule 6. You should replace rule 5 and 6 with "Zero can only be used in power (as y) and factorial operations".

<comment><AUTHOR> ew thanks, i actually removed rule 6)

</comment></comment><comment><USER4> Can we assume only operators that return integers are valid? For instance, you can't do sqrt(2) factorial, but you can do sqrt(4) factorial. Kind of tricky when dealing with things like 2 * (3/6) though.

<comment><AUTHOR> as long as the result is 100 i'm fine with it, im not sure if you can still do 100 when you dont have an integer, i'd say why not

</comment></comment><comment><AUTHOR> 5! – S(6) + sqrt(9) – (cbrt(8) * (2^3)/4) / (7^0 + 1)

120 – 21 + 3 – (2*2/2) = 100

SO: 9 MO: 13 MR: 2

</comment><comment><USER5> I don't know if this is legal by rules but here my solution goes:

      9*5+(6*(7+2))+(1+4+3+8)^0
      =45+(6*9)+1
      =45+54+1
      =100

<comment><AUTHOR> yes it is, poor indexes but it is ok :)</comment></comment>


Why 'Innovate or die' is a lie  - <AUTHOR> http://boss.blogs.nytimes.com/2013/04/19/why-innovate-or-die-is-a-lie/

<comment><USER2> It seems almost obvious that failure to innovate does not lead to a fast crash-and-burn style death. It is the slow decline that they warn you about when they talk about innovate or die.

You can innovate and still die as someone pointed out the case of the Osborne effect[1] in another thread on HN earlier today. On the other hand, you can look at Kodak which still has a long way to go to recover to its former glory. Just take a certain Internet search company which apparently just reported its revenue jump 31 percent year over year. How do you sustain this kind of growth without innovating?

This is not to discredit either side but like most things in life, there are two sides to a story.

[1]: <https://en.wikipedia.org/wiki/Osborne_effect></comment>