Show HN: I built a free app to help devs create more accurate software estimates - <AUTHOR> https://www.estimatrapp.com/ <comment><USER2> I've a theory about that too. If you take a software development project, 80% of the stuff takes 20% of the time and 20% of stuff takes 80% of the time. Let's call the former noise and the latter the bottlenecks.

A beginner estimates everything like the noise. So he's dramatically wrong. The novice though, estimates everything like bottlenecks. So he's dramatically wrong too.

This is actually why, in the industry, those agile methods works quite well. They handle that without people realizing.

The next key is to understand that estimates never determines the deadlines. What you can tell the stakeholders does.

So, the only way to succeed is to get the best dates you can from the stakeholders, then build the scope of the app accordingly. Then start treating everything like noise. Find the bottlenecks, focus on them, solve them, repeat.

Lastly, my manager setup a meeting with engineers to estimates the tasks in order to determine the launch date of our app. Before the meeting, he was saying that currently, the date was 15th of may. Then we've made the meeting, the novice estimates 750 days of work. 2 days after, we learn that the launch date is for 15th of may.

<comment><USER3> It's more like: The first 90% of the code takes the first 90% of the time, the remaining 10% of the code takes the other 90% of the time. [[https://en.wikipedia.org/wiki/Ninety- ninety_rule](https://en.wikipedia.org/wiki/Ninety-ninety_rule)]

</comment></comment><comment><USER4> The problem with software estimates is making an estimate based off of the unknown for the first time.

Somebody asks you to walk a certain route through a city and give them an estimate of how long it's going to take. This is the first time you've ever been asked to do this. The route has stop lights, paved walkways, thick forest where you have to trample your own path, crowded areas, construction, and all sorts of other characteristics.

Think you're going to estimate that perfectly the first time? Nope. But guess what, you'll estimate it pretty well the next time you're asked to do the same route.

Therein lies the problem with software and estimates. Many times what engineers are asked to estimate is an unknown or has portions of unknowns. Without having solved the problem prior to being asked it's going to be real tough to estimate it properly. Second time around, your estimate is going to be much much better.

Most software is _not_ being asked to do something you've done once, twice or thirty times before. It's solving problems for the first time, estimates will be wrong.

<comment><USER5> Yep. I like the idea of an agency or internal team that does the following:

Come up with risk classes and complexity classes, with objective measure for what is or isn't in each class. ("Class X risk involves a library/technique/platform with we are not yet familiar.").

Measure time spent on all tasks.

Collect statistical distributions for each portion of the risk/complexity grid.

Use those distributions and monte carlo simulation to estimate future projects to an appropriate degree of confidence (e.g. 95%).

This probably means scheduling lots more time than you would have before, more than you will often need, use the rest for refactoring, training, completing unforeseen and therefore unestimated tasks (bug fixes?) maintaining the FOSS you are dependent on, etc.

</comment></comment><comment><USER6> Please, please, stop adding background music to these sorts of videos. It adds nothing but noise, and makes it hard to hear what the person is saying.

If for some inexplicable reason you feel compelled to add music to an informational video, turn the volume way down and pan it left or right so those of us without perfect hearing can have some idea what's being said. Better yet, add subtitles.

<comment><USER7> I have good hearing and the music bothered me too. Way too loud.

<comment><AUTHOR> Noted and fixed ;)

</comment></comment></comment><comment><USER8> Here's one way: double the estimate and then cut the scope in half.

<comment><USER9> Or the other standby: take the dev estimate, double it, and increase the order of magnitude:

      Dev Estimate     Quote
      </comment></comment><comment></comment><comment>     </comment><comment></comment><comment>-----
      2 hours          4 days
      1 day            2 weeks

etc...

<comment><USER10> There's only one problem with that rule: This is not done to dev estimates, but to the estimate of the next lower level of management. If your project has 5 levels of management before all participants are under one umbrella, team estimates in days will lead to a project taking years.

Claiming that the organization is flat is no cheat though: Create phantom managers so that ever 6 people have a manager, and those managers have managers, until the structure has a root. 300 programmers without managers would get 50 phantom first level managers, who have 9 phantom second level managers, 2 phantom third level managers, and a single phantom project managers. If an organization has more management layers than that, they will be even slower.

</comment></comment><comment><USER11> I'd like to give this a try, if only because I am not sure I believe anyone can accurately estimate non-trivial programming tasks. However, there doesn't appear to be a way to get any information without connecting your app to my github account. Seems like that process ought to go the other way around.

</comment><comment><USER12> The thing that helped me the most personally with my estimate accuracy is estimating times beforehand, and then tracking the actual time and evaluating the accuracy of my own estimates. This is partly to get out of the mindset of trying to explain why past estimates were over/under and focus on being more accurate in the future.

<comment><USER13> Did it help? How often did you end up repeating the same task?

(Personally, I have this feeling that my tasks tend to be varied enough that 'number of times done' would almost always == 1, however, I don't have any actual data to back that assertion up. (And maybe you used this to hone in on the "true hour cost of a 2 story point task"???)

<comment><USER14> Surely you're getting the sense of the patterns of things you're doing.

Maybe something like "that's probably 3 loops and an email"

That's a couple hours for the loops... A couple more for the email, assuming HTML has to be dynamic based on a model with 5 values... Etc...

Sure it's not identical every time, but the patterns are the same.

<comment><USER13> Sure, sometimes. Between that, the story point ideal of "... relative to other tasks completed in the project", and a long enough term project, things may start to look the same _in that project_.

It also depends on how much leeway your estimates can have: if it turns out to be waaaay more than two loops and an email, what happens? Does management just nod, or do they start "negotiations" about not paying for the work it took you over the "estimate"?

</comment></comment></comment></comment><comment><USER15> This classic is still relevant today:

"Evidence Based Scheduling" by Joel Spolsky

[http://www.joelonsoftware.com/items/2007/10/26.html](http://www.joelonsoftware.com/items/2007/10/26.html)

</comment><comment><USER16> Definitely do the video again without background music. It is hard to hear you.

<comment><AUTHOR> You're right! That's my job for Monday now that I have a proper audio unit setup. Thanks for the feedback ;)

</comment></comment><comment><USER17> I spent a lot of time messing around with doing something similar and not succeeding[1].

I wanted to do full-on decomposed 3-point estimates. Which means representing something that is not quite a tree and not quite a table. Turned out to be harder than I was smart. I got the underlying calculation code to work fine, but never worked out how to get HTML to play along.

I _did_ find reading about estimation to be quite enlightening though. My suspicion is that most of the improvement seen in 3-point estimates comes from decomposing the elements, _not_ from the PERT formula.

[1] [http://confidest.com](http://confidest.com)

</comment><comment><USER18> Please, please, please remove the background music -- it's annoying and overly loud.

The product looks very interesting, and it's nice that you offer a free tier. I'd hate to see your pitch hampered by the music.

</comment><comment><USER19> I appreciate more attention being given to software estimates, but it seems like there's a lack of looking at the research in this area of software engineering. Most people have a single hocus-pocus equation that generates numbers they find convincing. Furthermore, it's often the case that these numbers are never changed over the life of the project.

That would be like predicting the weather with a single model, once, for the next three months. Of course that isn't going to work.

There are a few key points I think are often overlooked:

* Estimating is less about understanding time, and more about sizing a project and effort -- a study in software economics.

* Bottom-up estimates need to be based on historical performance. They should always be ranges and should include a notion of confidence. They should be democratically created if you're estimating for a team. You can do something simple (like Estimatr) or use a tool with a lot of data behind it (like Personal Software Process) - I do both.

* Top-down estimates should also be used. I often use COCOMO and COSYSMO, with monte carlo risk calculations ([http://csse.usc.edu/tools/COCOMOII.php](http://csse.usc.edu/tools/COCOMOII.php)).

* The two approaches will give you two answers (both in ranges), with confidence intervals, which provides you a better sense of the size of the effort.

* Generating and publishing an estimate has a psychological effect on the team - consider that wisely (read Peopleware).

* Estimates are good for about two weeks, after that, they've become stale.

* You're not done with a project until you've recorded your performance data (for future bottom-up estimates).

* If a project is going to last three months or less, the research shows that nothing matters at all -- estimates, process, etc. -- do whatever keeps you/the team motivated.

<comment><USER20> Do you have a source on the last point here? Hadn't heard that before but seems pretty noteworthy.

<comment><USER19> It's a finding from a Capers Jones report (I believe on the analysis of agile vs waterfall projects of varying sizes and durations). I'll see if I can dig up the exact report for you...

</comment></comment></comment><comment><USER21> Love the idea.

But, please, if you do a demo video please include an alternative way to learn about your product. I recommend either a list of features and/or screenshots.

I can't always watch video:

1\. Sometimes I don't have the time

2\. Sometimes I don't have audio

2a. My headphones are packed away

2b. I'm using my cell phone in a public place

3\. You have 30 seconds to sell me or at least get me to learn more. If your video is 2 minutes make sure you don't burry the lead. I have no idea if this is the case here because I couldn't watch the video (see: 2a) :(

I'm using "I" and "my" here but I'm sure I'm not alone. Same goes for the trend in news sites now to only have a video on their website and no summary.

</comment><comment><USER22> Thanks for making this, it's definitely useful and the UI is very clean.

Bug Report: If you enter a non-int value for one of the values it returns NaN. I.e. I entered 1.5 for a worst case estimate and it did that.

</comment><comment><USER23> Reminds me somewhat of this[1] article.

[1] [http://xkcd.com/1658/](http://xkcd.com/1658/)

</comment><comment><USER24> Cool idea and this is probably the first time I've seen Vue.js be used in production (that I'm aware of). I'm in the US so I think changing the currency symbol (as a profile setting) would be a nice feature. Very clean design!

<comment><AUTHOR> Thanks man! I really enjoy Vue. Multi-currency is definitely on the road-map for sure. It's all baked in really except for the user settings area.

</comment></comment><comment><USER25> That seems pretty useful, thanks!

Would be perfect with an export function to send it to the client.

</comment><comment><USER26> Is there any more to this app than a spreadsheet/data input form?

<comment><AUTHOR> Not yet. I wanted a prettier way to use standard deviation for assessing the most likely value for estimate line items as well as saving those in a nice convenient way. So I built this. Eventually this will branch out to have more features, specifically for agency-style businesses where they may have several worker types with associated internal / external rates etc. For now though, I'm just gathering feedback as to whether this is a problem for people or not.

<comment><USER5> Nitpicks, the term you want when you've been using "standard deviations" is either:

Distribution - general term for the shape of the relationship between probability and task length.

Triangular distribution or PERT - the specific shape of least/greatest/most likely you are using

Risk or Probability - the general concept that things are not definite and involve chance.

And where you are using "Total" for each item, you want "Mean" or "Median" depending which it is.

And I don't care to know the total mean or median time for scheduling, because the project will exceed that time 50% of the time (if it's the median, more if it's mean with long-tailed distributions) I would instead want some high quantile such that the chances of exceeding the schedule/budget are low (and which quantile I pick depends on my project, what's at risk if the schedule is exceeded).

</comment></comment></comment><comment><USER27>
        (let [estimate XXX]
          (* estimate 2))

</comment><comment><USER28> My formula:

bestcase * 1.3 + (worstcase - bestcase) * 0.5

<comment><USER29> So worstcase * 0.5 + bestcase * 0.8?

<comment><USER30> So if you think it might take 2-4 weeks, use this calculation to arrive at 3.6 weeks?

<comment><USER28> Indeed. Better safe than sorry and we're all happy when we finish earlier. It works well for me ;).

</comment></comment></comment></comment><comment><USER31> what is it called, "multiply by three"?</comment>


Transparency and the AMP Project - <AUTHOR> https://github.com/ampproject/amphtml/issues/13597 <comment><USER2> Pretty dismal communication from @cramforce.

Seemed like a political response to the questions raised, and I don't think "making the web competitive to native apps and walled gardens" is the real goal (err, Google happens to control the world's biggest mobile platform and it's app ecosystem)

I think Google have just realised that if they create an obviously closed platform, a la Apple, everyone will resist it and it will fail or be supplanted by a more open one.

What gave Android power? The thousands of other companies that jumped aboard. And Google won all the spoils. Billions of devices running Android, with Google search by default.

Make it "open", but control it. Win.

</comment><comment><USER3> One thing is what some technical lead thinks about the project. Another thing is its real purpose, its strategical value.

</comment><comment><AUTHOR> I've been engaging with AMP Tech Lead @cramforce about the serious concerns many have about the nature of the AMP project.

His response is perhaps the most direct explanation of the motivations behind the AMP I've seen to date. You can read the thread, or read his post here:

===

 _I first want to acknowledge that we are learning how to run such a big open source project and so many things are being figured out. E.g. we are currently rewriting our Governance guidelines to answer many of your questions more directly._

 _Having said that, I think amp-stories is a great example of our process. The Intent to implement (ITI) was send here in September and it has since been worked on with a set of publishers producing content to test out what the team working on code was producing. In that feedback loop between publishers and devs the product evolved. You can find the traces in dozens of issues in this project. It was "announced" last week. But only to people who weren't paying attention to this project._

 _In AMP for email we took a different path (post ITI only on public announcement) but we are working with a product team (GMail) that is building a product they way they want to and we respect that. The ITI was posted last week and has not yet been approved (so is in active discussion). The scope of the ITI is not whether GMail launches the product, just whether the AMP project accepts the responsibility of maintaining the E-mail specific fork of AMP._

 _For your (4) and (5) questions: The discussion is happening here with the scope of AMP. We cannot and will not extend the scope of this GitHub project to proprietary integrations of AMP. That may be frustrating but it is the way it works and a very common setup for open source projects. Similar with (6): You can argue here that AMP for email is a bad idea. The outcome would be if you convince us that we would deny the ITI and the main AMP repo would not accommodate the project. I can 't answer the questions for the various integrations of AMP since (by design) AMP doesn't mandate how partners like Baidu, Twitter, Microsoft and Google use AMP._

 _I 'd like to avoid taking email out of the equation for the other points. Both because I'm not an email expert and the answers aren't the same as for the web in any case._

 _First I 'd like to acknowledge that we are learning how to communicate about AMP. I don't think answering individual posts at this time makes sense. Although I have engaged in plenty of debate about them on the orange website and Twitter._

 _We were worried about the web not existing anymore due to native apps and walled gardens killing it off. We wanted to make the web competitive. We saw a sense of urgency and thus we decided to build on the extensible web to build AMP instead of waiting for standard and browsers and websites to catch up. I stand behind this process. I 'm a practical guy._

 _Now, and this should answer your question (7) we are increasingly pivoting towards taking the learnings of AMP and bringing them into web standards. The Feature Policy work is the primary focus of this effort and you will see significant increases in velocity in that over the coming months._

 _I said above and in my talk at AMP Conf that we aren 't idiomatic about AMP's implementation. With JS in AMP the "thingness" of AMP. But that is just the first step. Our goal was always to create a well lit path towards a web that can compete with native apps. We are hoping and working on making that path broader and not requiring people to use AMP. As said above: Work is under way and will accelerate._

 _To (10): As said above: We are working on revising the project governance to make it clearer how decisions are made beyond me being BDFL._

 _I will moderate this thread according to our code of conduct. In general, my statement from above remains that there is an open invitation to join our weekly design reviews (but put your topic on the agenda; and adhere to the COC)._

 _I don 't think that the discussion here will lead to everybody being happy, but I think my post give a good perspective as to the future plans. We are in this to make the web win. We might disagree on the means, but we can agree on the outcome we are all aiming for._</comment>


Modules in C99 - <AUTHOR> http://snaipe.me/c/modules-in-c99/

<comment><USER2> They are not modules.

Here is a short list of things that you can't do with these C structs. Modules can be "opened", they can store types, and they can be compiled efficiently (calling a function in a struct will always cost an indirection). Also, a proper implementation of modules would allow to obsolete the pre-processor and header files, this is not solved by your proposal.

In short, your solution is no different than prefixing each function name with the "module" name, M_foo, M_bar,...

You can look at (this)[[http://llvm.org/devmtg/2012-11/Gregor- Modules.pdf](http://llvm.org/devmtg/2012-11/Gregor-Modules.pdf)] for a better proposal.

</comment><comment><USER3> I wish C had a module system as well has a minimal class system,I dont even care about inheritance. But things like my_module_my_object_func(actualObject,argument1,argument2) are just plain ugly. C++ has way to much features.</comment>


Ask YC: RSS Feed: Whole Article or First Paragraph? - <AUTHOR>

I was wondering what your thoughts on this are. If I am giving my site an RSS feed, should I provide the whole article in the feed or just give people the first paragraph and force them to come to my site? Its more bandwidth but its also more advertising views. Is there an accepted convention on this? What are your thoughts? <comment><USER2> As a data point for you, I only have feeds that provide the full article.

I take that anyone who is looking for ways to force me to pay extra attention (just to get advertising views) is not worthy of that attention.

</comment><comment><USER3> You benefit from partial feeds. But readers hate them. So, are you absolutely awesome? Do you have ridiculous numbers of readers? Then it's your call. Otherwise, people aren't going to read your site.

Freakonomics converted to partial feeds with much fanfare. They lost a lot of readers. And they're Dubner and Levitt. I've never heard of you.

<comment><USER4> I certainly gave up when they did that.

</comment></comment><comment><USER4> The point of the partial feed is get people to click through so you can hit them with ads. The drawback is that a lot of people just don't.

I'd say that generally the best approach is to toss a tasteful text ad at the bottom of your RSS entries, like Engadget does.

Also, there are other, more engaging ways to get people to click through. Make something people want to respond to in the comments.

<comment><USER5> Also partial feeds make it more difficult for black hat SEO types to steal and duplicate your content which is bad for SEO all around. I run full feeds but I should really install this plugin because people jack our feed all the time on auto-gen black hat sites.

<http://redalt.com/Resources/Plugins/AntiLeech>

</comment></comment><comment><USER6> As a feed consumer, I actually thought about this too; but truthfully I haven't settled on any preference. Say if I wanted to leave a comment, I'll be heading to the site anyway. But the extra click, when necessary, hasn't aggrivated me at all.

(If you were running your feed through feedburner, you could have ads inserted into the feed as well.)

<comment><USER7> I'm with you on this one. Sometimes it's also nicer since you don't have embedded videos/images load up unless you find the article interesting and wish to click through.

That being said, I know a lot of people that prefer full article feeds, so I would go that route, since I don't know any who would stop reading something if it went from partial feed to full.

<comment><USER8> On a sidenote, the embedded videos/images is RSS reader dependent. I like having them load in my reader because I don't get any of the other cruft I don't care for half the time (e.g. comments on TechCrunch...).

</comment></comment></comment><comment><USER9> i inevitably get fed up with first-paragraph-only feeds. your site is slow compared to data already in my RAM, and i have 184 other feeds to get through.

i don't mind ads in feeds, though. stick it after the first paragraph, even.

(i even prefer getting a summary of the article over getting only the first paragraph, seeing as how most folks like to fill the first paragraph with fluff anyways. see the ars technica feed for an example.)

</comment><comment><USER10> Feed readers I've used do not work well for me for reading length posts, so even if the whole thing is in my reader I may click through to the site to have a better viewing experience.

Some folks say they flat out reject partial feeds. That seems like a win for both parties. The host isn't wasting bandwidth sending content to people who don't really care for it anyway.

</comment><comment><USER11> It depends on whether your blog (or whatever it is that you're feeding through RSS) is meant to achieve.

If you're trying to make money from it through advertising, then the paragraph makes sense. However, your blog better be one of the top blogs in the world if you're to make a living off it, so what's the point. Also, it's clear from the comments here that many people (myself included) are turned off by partial feeds, so that will only decrease your chance of being successful.

However, if you're trying to build a name for yourself or your company, that is - you're the advertiser (of yourself, your skills, your thoughts), and the ads are the blog posts, then it doesn't really matter where and how people read them, and it makes the most sense to provide whole article feeds.

</comment><comment><USER12> I thought I preferred single paragraph, and I went to a good bit of effort to code sane "beginning excerpt" extraction code for my feed generators. But now that you make me look at my habits it seems I prefer to get the full feed and then tell Safari to shorten them up. That way all the aggregated articles are similar within my groupings.

Clicking through isn't the issue for me. If it is a lengthy article I'll probably click through to see it as you intended... unless your site is so ad heavy it drives me away.

Now I'll have to go throw away all that lovely code I wrote to do the excerpts.

</comment><comment><USER13> Think of your RSS readers and website readers as different demographics with different habits. RSS readers are more tech saavy, easier to piss off, more willing to add or drop you, going to visit your site ONLY when they feel it's worth their time, and more constrained for time.

Basically, they're not the market you want to piss off, and partial feeds aren't going to be tempting for them. You want to keep them happy: Go full feed. I suggest simply finding innovative ways to advertise within feeds!

</comment><comment><USER14> I like clicking through to read the article if it's interesting.

It's like having the CD instead of downloading it. You get all the extra artwork and everything that comes with it.

</comment><comment><USER15> Living in the developing world, as I do, net connections can be pretty flaky and certainly far from ubiquitous. As a result, things work much better for me if I can grab feeds when I have a connection and then read them offline. For me, partial feeds are a pain in the ass; give me a full feed every time. And no, I don't mind ads in my feeds.

</comment><comment><USER16> Personally, I don't bother subscribing to an excerpt feed. I find its utility of little value.

In any case, isn't the net littered with enough AdSense-stained blogs?</comment>


Misconceptions about the Big Bang (2005) [pdf] - <AUTHOR> http://www.physics.uq.edu.au/download/tamarad/papers/SciAm_BigBang.pdf <comment><USER2> I got curious and looked up the expansion rate of the universe. It's 74.3 km/s per megaparsec, in other words 2.4 × 10^-18 Hz, or about 8 × 10^-11 year^-1. So each year one meter becomes one meter + the size of a hydrogen atom. Not very quick.

</comment><comment><USER3> If space is expanding, though, wouldn't the space between our atoms be expanding also, and proportionally everything would stay the same to our bodies?

<comment><USER4> No. The article addresses this. The accelerating expansion of the universe exerts a small outward force on objects, leading them to be in a steady state size that is very slightly larger than they would otherwise be.</comment></comment>


Micron Finally Announces a 3D XPoint Product: Micron X100 NVMe SSD - <AUTHOR> https://www.anandtech.com/show/15029/micron-finally-announces-a-3d-xpoint-product-micron-x100 <comment><USER2> Skimmed it looking for DIMMs. This is interesting at the right price point but the magic happens with Optane DIMMs.

<comment><USER3> An Optane SSD is a fast SSD.

An Optane DIMM is a slow DIMM. (Even if it is faster than an SSD)

Intel hopes that you can replace a smaller amount of fast DRAM with a larger amount of slow Optane and that it will be faster (e.g. you have more "RAM" so you are less dependent on disk) but that is by no means a sure thing.

Note the 16x PCIe connection is a key to AMD supremacy since AMD's microprocessors have many more PCIe channels to play with compared to Intel processors. In the end AMD + Micron might beat the pants of Intel + DIMMs that only work with the most expensive Intel processors.

<comment><USER4> Caches improve performance, Intel is banking on adding another cache layer between RAM and SSDs/HDDs. It could work very well for databases (being able to store 500GB+ indices in RAM without spending tens of thousands of dollars for RAM)

</comment></comment></comment><comment><USER5> Does anyone have any real world experience with these types of drives?

If so, what are the use cases?

<comment><USER6> Consistent, super-low latency for reads and writes, even with high queue depths; and high bandwidth, even with low queue depths. I have one in my home workstation, and operations on many small files are noticeably faster compared to the Samsung m.2 SSDs I have. Package updates, for instance, blaze through during the installation step.

<comment><USER7> I imagine hosting a high-usage rds would be a dream on one of these.

</comment></comment></comment><comment><USER8> How would these things work for database storage? Do you need to worry about them wearing out like with flash?</comment>


Why do electron shells have set limits? (1999) - <AUTHOR> http://www.madsci.org/posts/archives/1999-03/921736624.Ch.r.html <comment><USER3> I feel like this answer is "no, there is no reason for that to be the sequence you are seeing: it is an accident, as you can see from this careful analysis which demonstrates exactly why it is that sequence"... it is like saying "I noticed a bunch of random processes fall into a normal curve, is there a mathematical reason for that?" and saying "oh no, that is entirely on accident; here, let me show you the math for how a particular kind of random selection causes that exact distribution you are seeing, along with the equations that characterize if... as you can see, no math is involved here: this was just an accident" :/.

<comment><USER4> In this vein, I really enjoyed 1brown3blue breaking down why prime numbers form patterns when graphed in polar coordinates.

[https://youtu.be/EK32jo7i5LQ](https://youtu.be/EK32jo7i5LQ)

<comment><USER5> That is one of the most artistic expositions of mathematics I have ever seen.

<comment><USER6> 3blue1brown is most likely the greatest math teacher alive. I've looked far and wide and found nobody who competes. Any HN'ers have suggestions for other math educators working on his level?

</comment></comment></comment></comment><comment><USER7> It always seemed natural to me that the number of electrons would grow quadratically with the distance (principal atomic number), just like the surface area of a sphere grows quadratically with increasing radius.

I feel like the author of the comment calling it "by accident" would be extremely unhappy with number theory. In number theory all sorts of properties seem to crop up "by accident" but turn out to have incredible consequences and you realize that virtually every "accident" couldn't have gone any other way without destroying all of mathematics.

<comment><USER8> The electron shells themselves are in reality 3D objects _that go all the way to the center_ , so it is a little strange after all that it increases with the surface area.

<comment><USER9> Is this true? I mean its a model. Aren't electron shells the quantum states of the electron fields?

<comment><USER10> It is true. The classical wavefunction of a ground state electron overlaps pretty heavily with the nucleus of an atom IIRC.

<comment><USER11> Only for s-orbitals. Anything with a quantum number l>0 has 0 probability at the nucleus.

</comment></comment></comment></comment></comment><comment><USER12> Forgive me for posting this idiotic question in advance since I have very little knowledge of physics, but I have often been confused about one thing recently. From what I could gather a little isn't the whole electrons revolve in orbits thing proved false and outdated like universe is made of ether?

I heard that even the iconic atom logo is all wrong since it is proved that electrons don't revolve around anything rather come in and out of existence and present themselves in probability clouds. If that is true then why do we still keep talking about shells and energy levels?

Like I said my question may sound like a troll but I assure you it's not. Just want to know what's what.

<comment><USER13> You are correct, the Bohr model has been obsolete for almost a century. It continues to get trotted out because the more accurate model is quite unapproachable without a lot of math and study.

When someone says "revolves around something" they are mentally projecting a whole sequences of measurements of the electron's position, one after another, that trace out a path. We are evolved to regard the path as a natural thing as opposed to focusing on the measurements.

But we can't do that for electrons orbiting an atom, since measuring them involves wacking them with photons or something that bounce off in some direction so we can see that deflection. So all we get to talk about is the result of a measurement.

When someone says "it's in this orbital," that's a statement about the values of energy and angular momentum a measurement will produce. What measurements actually produce those? Ones that involve absorbing or emitting photons, mostly, and we measure those by the energy of the photon absorbed or emitted, and those don't give us information about the position of the electron. You may think that we could put an electron into a very high orbit and then try to triangulate where it was when it emitted the photon based on the angle...but then you have to know where the atom is precisely, which means another measurement, which means some unknown momentum imparted, which means the energy spectrum of the photon we're trying to measure gets smeared...

Meanwhile, if we measure position precisely, then we impart some new momentum vector to the electron. What the momentum vector would have been measured to be before that wasn't known, and so we have no idea how we have kicked it and the orbital (energy and angular momentum) can have various values if we measure them afterwards even if they would have always had a single value beforehand.

<comment><USER14> Is the accurate model that complex, though? An electron is a standing wave: one could show the first two standing waves on a drum and say these are the lowest two electron energy levels. Higher levels create more sophisticated waves, and non-flat potential adds more complexity, but the idea remains the same.

<comment><USER13> An electron isn't a standing wave, so apparently it is that complex. :(

<comment><USER14> What is it then?

<comment><USER13> It's own thing, and thinking of it as a classical wave or a classical particle isn't accurate. You go through the math and the experiments and try to build and intuition for what it is in its own right without reference to classical analogies.

</comment></comment></comment></comment></comment></comment><comment><USER15> This is such a classic physicist's answer. It starts off promising, with a lot of context and detailed exposition which leads one to hope that perhaps it will be pulled together into an enlightening explanation at the end.

But when one reaches the end, one finds merely the truism "It is this way because that's what you get when you solve the equations."

(yes, I have spent a lot of time working with physicists.)

<comment><USER16> You're right. The way to explain it intuitively is that at the quantum scale all particles are wavelike.

In order for electrons to achieve stability (such as within an atom), they must create a standing wave. Similar to the notes on a guitar string, each electron orbital is simply a harmonic.

The complication comes from the fact that atoms are 3d, so instead you need to use spherical harmonics, but it's the same principle, just standing waves in 3d space. These should look familiar if you've seen rendered images of electron clouds: [https://en.wikipedia.org/wiki/Spherical_harmonics](https://en.wikipedia.org/wiki/Spherical_harmonics)

It is quite surprising that this intuition is basically never taught in classrooms.

<comment><USER17> Thank you. That makes much more sense to me. I found this[1] video with an efficient explanation and visualization.

[1]. [https://youtu.be/Ziz7t1HHwBw](https://youtu.be/Ziz7t1HHwBw)

</comment></comment></comment><comment><USER18> Not sure what this says about me, but before I looked at the year I thought this was about electron apps as command shells

<comment><USER19> I was thinking like wow electron has been around a lot longer than I thought!

<comment><USER20> Or from a different timeline where its 1999 and you can create electron apps by bundling them with ActiveX and Internet Explorer 6 _~shivers~_

<comment><USER18> Yeah- it's not a pleasant thought. It's like some horrible episode of twilight zone made just for developers.

</comment></comment></comment></comment><comment><USER21> There's a series I've enjoyed recently: [https://www.youtube.com/watch?v=zKbZeUvPnWI&list=PLpH1IDQEoE...](https://www.youtube.com/watch?v=zKbZeUvPnWI&list=PLpH1IDQEoE8Q8842yVe-V8m7PN-R9rlwi)

"How Small is it" by David Butler. Offers a nice summary of electrons and goes deeper into the Higgs field.

My two cents - after watching it - is it could all (i.e., wave/particle duality of electrons) be explained a lot more clearly if we just accept there is another dimension in space that electrons move into and out of, which we've not yet figured out how to observe.

Would explain dark matter / dark energy a lot too. The model seems so incredibly simple to me that I just don't get why more people haven't tried to build on it (am so busy with other stuff I doubt I'll have the time to figure out unexplained Cosmological or other phenomena that could be better explained by this model).

But it seems really straightforward this way. Electrons are small enough, independent enough to move out of and back into another magnitude of space that we can't measure. To us in 3-space it looks like they leave and come back (the idea of a particle being a "wave with itself" is less clear if you ask me). Everything is particles, it's just some particles have axis of motion in space that we don't know how to perceive yet.

One can think about it by analogy. Suppose we all lived in 2 space. If particles in 2 space where small enough to detach from our plane and pop up and down above and below the plane they would seem to appear and disappear.

It's the same thing with 3 -> 4 space. At some point people will realize that thinking about space as 3 space only is like thinking that the world is the center of the solar system. Our three dimensions are simply the closest / most defined / perceived ones to us. They're not even the "central" ones. They're the closest one's to our perception / how we've evolved.

If you get into the smaller spaces of things, there's less binding energy that constrains matter and more flexibility in moving between other dimensions. Likely there's a major 4th dimension that matter moves through / oscillates if you prefer since it's smaller particles that move the most (though cosmologically we see the effects in the large). And likely once you get deep in the 4th, there's a fifth, etc.

Again the analogy from "Flatland" / 2d space is you don't realize the freedom to move into 3 space until you separate yourself from the structure of what Flatland is made of at the sort of macro level. For us in 3 space the macro level is atoms. As you dive deeper inside, you're not bound by these constraints.

Gravity, everything can be modeled as particle forces if you just realize there's dimensions we don't perceive at the macro level yet (but which can be perceived indirectly by their effects on our 3 space - just as in time you can figure out what something moving in and out of a plane is sort of doing in 3 space).

<comment><USER22> How would you reply to the Kochen-Specker Theorem [0] (or its consequence, the Free Will Theorem)? The main problem with treating subatomic particles as tiny spheres, rather than as waves, is that we immediately have problems with entanglement and Bell's inequalities. I would be interested in hearing how you're going to handle that.

[0] [https://en.wikipedia.org/wiki/Kochen%E2%80%93Specker_theorem](https://en.wikipedia.org/wiki/Kochen%E2%80%93Specker_theorem)

<comment><USER21> Thanks for the question and the link.

My sense is that being able to move through other dimensions (specifically a fourth spatial dimension) and into/out of our 3 space happens 'superluminally' since it's more or less instant. The speed of a particle in 3 space has no dependence on its speed in the 4th dimension (by analogy with flatland - <USER2> speed at which a particle on the plane moves out of the plane).

No reason to assume the 4th dimension is constrained by the speed of light. I guess I don't know enough about Bell's inequalities and entanglement (yet! Will look forward to reading more) but I think that might help. A fourth spatial dimension is both local and nonlocal (it affects particles at all points in 3 space but isn't constrained by 3 space). And it makes sense that it shows up only when we get down into the fabric of 3 space (subatomically) since...honestly am still trying to figure that out.

Is our 3 dimensional "flatland" hurling through 4 space really fast? Are we suspended like with a magnet on both sides of our flatland, holding particles in place - except for leptons and photons which can oscillate above and below the plane?

Is the many worlds hypothesis true? Do we mostly move through 4 space on an arrow of time? And there's a clear inertia there. But at the edges we can move through other 3 spaces? Why is there such inertia? How do we not be totally bound by it and move without its constraints?

</comment></comment></comment><comment><USER23> Because those are the values specified in the simulator's .ini file?

I suppose they probably upgraded to a .yml file recently..</comment>


Groklaw report on Apple v. Samsung start of trial - <AUTHOR> http://www.groklaw.net/article.php?story=20120731122403568

<comment><USER2> _[The issue of trade dress is] why, as Williams reports, the Samsung attorney is telling the jury that people know when they are buying a Samsung tablet or phone that isn't an Apple product. They are not confused, even if the tablet is a rectangle with rounded corners. People are not that easily confused. If folks are buying Samsung phones or tablets thinking they are Apple iPhones or iPads, then Samsung has a problem. That is what is at issue._

One wonders if the current TV ad campaign featuring a hapless consumer who has just bought a computer that he thinks is "basically a Mac" and who is put right by an Apple 'genius' is just a coincidence.</comment>


My Dead Girlfriend's Bot - <AUTHOR> https://medium.com/@fireland/my-dead-girlfriends-bot-9dc6a2f55ce3 <comment><USER2> [https://en.wikipedia.org/wiki/Be_Right_Back_(Black_Mirror)](https://en.wikipedia.org/wiki/Be_Right_Back_\(Black_Mirror\))

<comment><USER3> Came here to post exactly this, love this show. Can't wait for the new season, there are supposed to be 6 episodes which is awesome considering the other seasons only have 3 each, October can't come soon enough. I think my favorite episode was [https://en.wikipedia.org/wiki/White_Bear_(Black_Mirror)](https://en.wikipedia.org/wiki/White_Bear_\(Black_Mirror\))

</comment></comment><comment><USER4> From a strictly scientific point of view, it's an interesting challenge to have a bot that's trained to mimic interaction with an individual that's no longer alive. If there is enough data points on their lives and and how they interacted with other people, we should be able to create a profile and a trained bot that could to some degree interact as that person would.

But from completely social and human perspective, I question the morality of such a product. Is it really fair to feed into someone's need to hold on to something that no longer exist. Would this product solve a problem, or create a mirade of other issues. I personally would rather be part of a solution that helps people overcome grief and move on instead of feeding their immediate desires of holding on.

</comment><comment><USER5> This is fiction, right?</comment>


Edward Snowden thinks a global iPhone attack will happen this year - <AUTHOR> http://www.popsci.com/edward-snowden-thinks-global-iphone-attack-will-happen-this-year <comment><USER2> I would think attacks have been an ongoing thing for years. The thing to fear is a successful attack.

Let's analyze whether one is likely.

The FBI has stated that they cracked a single iPhone 5. Ignoring the possibility that they lie (which I give a small, but non-zero probability), we do not know whether that attack:

\- works against all iPhone 5s, irrespective of configuration.

\- works again newer iPhones

\- works remotely (either directly or through a very popular application that breaks through the sandbox)

The first two will limit any problem that occurs, the latter is required for this to become a huge problem. Also, the "via an application that breaks out of the sandbox" route, IMO, would lead to a relatively small-scale problem because Apple will disable the application fairly soon, and because it is less likely to be a truly popular app in the Twitter/Facebook range.

The big problem is how to assign probabilities to these. My guess would be that one shouldn't worry too much. If there is a way to do this, it apparently already is on the market, and whoever has it for sale, will want to sell it ASAP, because exploits can become as good as worthless overnight.

<comment><AUTHOR> Totally agree. Re: #3, I can imagine with the proliferation of SDKs, that could be a source of security risks.

Or it could just be like the heartbleed bug, the NSA has known about it for a while and has exploited it before to hack into other countries. Could be the same here once they find a way in. They could just throw a bunch of redherrings out there if they were actually smart.

</comment></comment><comment><USER3> That's really interesting. I hope he is wrong.

<comment><AUTHOR> I hope so too</comment></comment>


Ten years of Ubuntu - <AUTHOR> http://arstechnica.com/information-technology/2014/10/ten-years-of-ubuntu-how-linuxs-beloved-newcomer-became-its-criticized-king/ <comment><USER2> Ubuntu LTS is the only GNU/Linux distribution that keeps me on Linux on one of my laptops (an Asus netbook).

All the other distributions fail short of 100% laptop support out of the box.

As I am no longer on my 20's with lots of time to spare, either it works out of the box, or it doesn't. I don't care about starting weekend projects that become week long projects just to get something working.

Or just trying out distributions to see how they look like. My first distribution, Slackware 2.0, was a long time ago.

Ubuntu is great and I do like Unity as desktop environment on my netbook.

<comment><USER3> Why is this at the top? It's obvious flame bait.

Yeah, we get it. You are really worried about yourself and your time. Yeah, we get it that you want to make a generalization that "All the other distributions" don't have 100% support. Which is obviously not true by any respect. I'm typing on one right now that both Debian and Arch work without issue.

"I don't care about starting weekend projects that become week long projects just to get something working." It's been almost 10 years since I've had that experience with Linux. This is over 4 desktops and 3 laptops. Can we please bury this meme?

What is it with Linux that someone really needs to hop in an talk about what's wrong with it, no matter what the topic beyond the mere mention of Linux?

Edit: To clarify a bit about this silly meme. Many people find some hunk of junk that the don't use anymore and that they never thought about working with Linux when they bought it. Then they are surprised it doesn't just work. To me, that isn't much different then buying a PC and trying to install OSX on it and complaining about how it didn't just magically work. Many laptops and desktops are certified and targeted to work with Linux. From many of the large manufacturers. You obviously might have trouble if you are trying to cram something onto something that it is not designed for. Are you even an engineer? How do you not realize that?

<comment><USER4> > It's been almost 10 years since I've had that experience with Linux. This is > over 4 desktops and 3 laptops. Can we please bury this meme?

Maybe with desktops, but even just last year, trying to get wi-fi setup on my beagle bone or raspberry pi were hell. Multiple programs to do the same thing, and none of them work quite the same. So running scripts from the command line with the usual commands wouldn't work, so then the only thing that did work was the gui. But what if you don't want to use the gui, because you want the thing to reconnect automatically after power down (an option the gui didn't provide)?

Maybe running ubuntu, this wouldn't have been an issue, but beagle bone had archlinux, and then I tried multiple versions for the raspberry pi, most of them debian based.

So, no. This meme won't die just because most versions work out of box for desktops. It would have to work out of box for anything linux runs on.

<comment><USER5> Yeah, I have to agree with this. I used GNU/Linux on my laptop exclusively when I was in grad school, and every "sudo apt-get update && upgrade" felt like taking a turn in Russian roulette. The generic device drivers were almost always a nightmare. Power management was abysmal. And this was on a Lenovo machine that is generally considered to be pretty Linux friendly.

While I never did have a problem that wasn't eventually solvable, I finally came to accept that I really don't like playing sysadmin, and would much rather know that I can pick up my machine, perform library updates, and actually go work on something at a moments notice.

At least on a laptop. On a desktop machine, I'm willing to be much more patient.

<comment><USER3> Just for my own curiosity, did you intentionally chose a Laptop that you knew was 100% compatible to begin with?

Edit to the downvoter who can't use their words: The above comment said "Lenovo machine that is generally considered to be pretty Linux friendly". Seems like a relevant question as to whether that meant 100% compatible via Lenovo's declaration or online research and an educated guess. It was a sincere question as Lenovo does provide specific information about Linux compatibility.

[http://support.lenovo.com/us/en/documents/pd031426](http://support.lenovo.com/us/en/documents/pd031426)

Mind explaining to me what I did wrong there?

</comment></comment></comment></comment></comment><comment><USER6> What I really loved in Ubuntu is that they were the first distribution that really considered itself an OS, not "a way to install Linux" and make choices about what it should include.

All the other distributions started by asking whether you wanted KDE or Gnome, Abiword or OpenOffice, and ended up installing a bunch of software you may or may not want "just in case". Ubuntu made choices, if you didn't like it you could always change it later on or use a different distribution but you had a consistent OS to start with.

<comment><USER7> It's strange. I have a hard time remembering why I liked Ubuntu right away. Maybe a blend of good enough looking, works out of the box mindset, which made a community grow rapidly and kicking a nice network effect where you would quickly find solution on their board/wikis.

I was impressed later when they managed to bring new Window Management ideas without too much time or pain.

<comment><USER8> It was summed up for me at the time by the joke "Ubuntu is an ancient African word meaning 'can't install Debian'".

Their focus on getting stuff installed and working was a big deal then.

<comment><USER9> Wasn't this mostly Knoppix's accomplishment?

<comment><USER10> I believe Knoppix was the first to formalize the debian live cd concept—I don't think they did the major work for supporting hardware and supporting installation from the live cd.

</comment></comment></comment></comment></comment><comment><USER11> I was an Ubuntu user for a few years. I remember when they'd ship the CD's out for free. One of those things that made Ubuntu great. It was also really good at presenting a very usable Gnome 2.x desktop that was ready to use from the first boot, and I was a very happy user for a while, until they started shipping software a little bit too soon (PulseAudio for example; suddenly Ubuntu didn't have sound out-of-the-box anymore on my machine) and I've once been bitten in the behind by an update that made my video card unsupported all of a sudden, so that prevented X from starting... and then they replaced Gnome with Unity and I kind of stopped caring around that time so I went back to my previous distro. Hopefully for good. :)

Congratulations to Mark for starting this otherwise great project! May it have many years ahead of it!

<comment><USER12> Similar story. It started as a tidied up Debian fork. Then since about 12.04 LTS it turned into a tidied up Debian unstable fork with all the bugs in it. As a server only and LTS only user, I had no end of problems from there on with unstable kernels, duff and buggy packages, update roulette and terrible support.

We're on Debian 7 now and it's rock solid, relatively bug free in comparison and the support is good. Just where I want it to be.

The best outcome for me was that it caused Debian to rethink their release cycles a bit.

<comment><USER13> Totally agree. After 11.x, Ubuntu's "desktop" uses crashed for me and many I know.

</comment></comment></comment><comment><USER14> I was a Debian developer for a while, but gradually ran out of time for it, and eventually went with Ubuntu as my desktop and server OS.

By and large, I'm very happy with it, although I wish they'd sink a bit more time into avoiding regressions than trying to create new things.

I like the predictable release schedule, and the fact that it's a bit more focused than Debian.

Yet, underneath it's still all (almost at least) free software that I can hack on if needs be.

These days I use Xubuntu, with Xfce, because that's a bit more to my liking as a desktop: focus follows mouse is not something I care to do without.

<comment><USER15> May I ask what you are missing from Debian as a desktop ?

I went from Ubuntu minimal to Debian (stable, nonetheless),tiling wm for me, gnome for friends and guests, and found Debian easier to maintain (for me and my friends whose computers I manage).

I must say I feel Debian's desktop experience is really top notch and crosses all the check marks of what a desktop is supposed to do (for me at least) and so I don't really see what is gained from switching from Debian to Ubuntu regarding desktop features.

<comment><USER14> > May I ask what you are missing from Debian as a desktop ?

When I switched, Debian was in the process of taking 3 years to go from woody to sarge. After that it would be another 5 before etch.

I'm sure Debian makes a fine desktop these days. I could definitely see switching back at some point.

I do like that there is someone who takes decisions Ubuntu; I think that streamlines things in some ways. Debian can get into pretty long and involved flames/discussions about things. Sometimes good comes of it, sometimes it just distracts people from putting out a good OS.

<comment><USER16> I went down the same path when Ubuntu's appearance suddenly made Debian look slow and outdated. Now I have been back on Debian for a few years and it just feels better - Debian has come a long way... I believe that Ubuntu's mere existence gave it a good jolt !

<comment><USER14> Yeah, a better release schedule helps. I recall Debian servers from 'back in the day' where you'd start accumulating all this stuff from unstable because you started needing something that wasn't 4 years old, and then it would have dependencies, and so on. It could get a bit messy.

</comment></comment></comment></comment></comment><comment><USER17> So, before I knew what linux was (and was teased on various forums) I ordered some free CD's from Ubuntu. (I didn't have the internet at home). (eventually I got them; ubuntu 5.04 I think [Horny Hedgehog from memory])

When I received them I was pleased, everything worked.. well, not everything, but it sorta worked! I had a desktop environment and a command line and I felt a small sense of accomplishment because I'd navigated the strange menu's safely _before anakonda or full-framebuffer installers_

Because of the peer pressure I learned about how to do my bits, and I carried on.

Later in the year I found fedora, and Blue is a nicer colour than brown (I was young and fickle) but it was less user friendly, so I committed to learn that and get off the "Noob Friendly" Ubuntu OS.

Many years later I got a small laptop for my mother, at this stage in my life I was "awoken" and I knew the power a machine could hold if it ran linux, so I put ubuntu on it- She's not the most technically apt lady in the world but was able to do most things with ease, and I put that down to having a "Good UX outside microsoft" (since most people who learn the microsoft way are generally committed to a mindset and anything outside of that is pushed away).

A few issues with Flash, some performance hiccups on some websites that seemed to try and avoid supporting linux in strange ways (that I take for granted I know how to bypass) and eventually the machine gave up the ghost.

I bought a new machine and put ubuntu on it (13.10 I think) and she was somewhat less than pleased, the UX had changed, she didn't know what was available anymore, nothing was organised in a way she understood.. and so I installed mint, she's now happy.

So I'll say this for Ubuntu, they put linux in the hands of people who we should really be targetting, it allowed me access to linux acting as a base plate and later acting as a full blown system for someone who was not interested at all in computers. And they pushed a trend for that, so we should all be thankful.

<comment><USER17> A follow on from this story and many moons after my "fickle" switch to Fedora/RHEL.

At this point in my life I'd been involved in a half dozen large companies and used linux on enormous scale.

I moved to a company that was using ubuntu LTS (10.04) (old at the time) in production, it was heavily invested and I expected that wouldn't change as Developers were very hesitant to change to debian (which is too old/doesn't make things easy enough) or centos/RHEL which suffers the same issues and has the added benefit of having SELinux (which I'm an advocate of understanding rather than disabling).

I go through my daily security advisories and a local privilege escalation means all our virtual machines and virtual machine hosts are affected, luckily it's patched as 10.04 is still supported so I apt-get update;apt-get upgrade and send out an email saying the server will be down for 30 minutes while it receives patches.

I was wrong, it was down for 6 hours.

unfortunately someone upsteam caused that particular kernel update to rebuild all initramfs' on the machine, and had also named lvm2 to lvm, so now my drives wouldn't mount.

On any kernel version/initramfs version

normally you can drop to shell load the module, mount the drives and continue startup, but unfortunately that stopped a lot of things from loading such as the bonding we had in place on the nics.

obviously I didn't know why it broke at the time and was attempting to get help from #ubuntu on freenode.

the response was "Sometimes it's better not to know why it broke"

that server was smoothly running CentOS before I left that company.

So in my opinion support and enterprise is where it falls down.

</comment></comment><comment><AUTHOR> For me the biggest thing about Ubuntu is that it does not feel like a distribution. It's an OS. They don't just pack others stuff inside one image and call it a day. Ubuntu does things in a way that they feel is the correct way. If there is a suitable OSS package for that, great. If not, then they make it. Fedora, Debian and others just gather what's there and ship it. AFAIK Elementary OS is the only other distro that works kinda like Ubuntu, but it looks like an OSX clone.

<comment><USER18> Elementary does look like OSX, but I wouldn't judge them negatively for that. I've been using the distro for a while and I'm quite happy with it.

<comment> rkuykendall-com As a mac user that gets nervous when Apple announces new OS X versions, I'm glad there are linux users out there keeping the principles that make OS X great alive. If OS X ever goes too iOS / iCloud for me to bare, I hope Elementary is waiting for me with the same attention to detail, stability, and ease of use that god me hooked on OS X.

<comment><USER19> Same thing here.

</comment></comment></comment></comment><comment><USER20> There's gotta be a lot of OSX users like me who'd switch in a heartbeat given better laptop options. I know they're getting better, but it still isn't that close.

<comment><USER21> What we need is for Canonical to release their own laptops where they support the entire hardware+software combo. Canonical Nexus, please?

Any other company with their own Linux distro and hardware would also work, I guess. I really like Unity, though.

<comment><USER22> The Nexus model chooses a manufacturer and then works with them to create the current year's creation. I'm not sure Canonical has enough resource or leverage to do that.

That said, I'd love to see an Apple-esque model where I could point to 3 laptops each year and say "large, medium, and small" and know that they would work completely with zero fussing.

Maybe Canonical could start down this road by refitting their devs with new laptops on an annual cycle and saying, "these are the laptops we will be using this year."

I'm a NetBSD-to-Apple switcher (circa 2003) who has a fair bit of ambient familiarity with Ubuntu as his auxiliary OS. I don't run any proprietary system beyond what comes bundled with OS X nowadays. I could switch to Ubuntu for day-to-day work and be perfectly content.

I can say that the SOLE factor of why I haven't has everything to do with not finding a rival to my MacBook Air 11". Part of that may be there simply isn't a comparable machine. But part of that may be that the hassle of searching for alternatives is simply too great.

<comment><USER23> There is the Dell XPS 13 developer edition which comes from Dell with Ubuntu... ThinkPads work great with Ubuntu (at least the T, X, and W series), I've been using a T530 for a few years now and every single function key, the fingerprint reader, absolutely every feature it has works. And of course there are a few boutique manufacturers that ship Linux systems.

I'm sure other laptops work great with Ubuntu but these are the ones I'm familiar with...

<comment><USER9> I use one of the boutique systems (the ZaReason UltraLap) as my work laptop and like it a lot, but when my home laptop started to give up the ghost for the fourth or fifth time (a 6-year old Dell Inspiron 1525), I realized that for home use I need the secondary parts market to be active. I fix computers that break (the Inspiron is on its second motherboard, third power board, and the screen and backlight inverter of someone else's 1525 that they were throwing out.) The ThinkPad T430 is cheap enough that it often undercuts the boutiques, but I'm not locked out of ebaying for a new power board.

</comment></comment></comment></comment></comment><comment><USER24> As an Ubuntu user since 10.04, what I would really like to see is Ubuntu matching or beating Windows/OS X with regards to battery life. When I first installed 10.04, my ubuntu setup actually beat Windows Vista in battery life and stability. Then 10.10 came out with serious power regressions (related to kernel regressions, Unity, etc.) - which I still blame from killing my battery.

Since then, Windows 7 and 8 have gotten more stable and better battery life while Ubuntu has struggled to keep up. With 14.04, Ubuntu is better (finally with basic support for NVIDIA PRIME)but has yet to catch up with Windows.

Seriously, Mark Shuttleworth and Ubuntu devs, if you are reading:- Ubuntu is promoting global warming and creation of electronic waste with its current actions. Forget the features and fluff for now - Fix the battery issues and make sure things just work.

Thank you Ubuntu for all the great work you guys have done for Linux over the last 10 years. Still love you.

<comment><USER25> Have you tried TLP out?

<comment><USER24> No. I would like to, when I get the time (Also powertop -[http://www.phoronix.com/scan.php?page=article&item=ubuntu_14...](http://www.phoronix.com/scan.php?page=article&item=ubuntu_1404_powertop&) )

But thats the point. Lot of us depend on our computer for work and don't have the time to fiddle with lot of error-prone settings.

This is why Linux users have been migrating to OS X for years. Deep down, we are all idealistic hackers who would love for FOSS, and open-source to win, and give the finger to big brother, but we also need to put food on our tables.

Canonical lately has been chasing unicorns and leprechauns to find the Next Big Thing (never mind that they are late to mobile, tablet, and even unified interfaces). Canonical is right that mobile is the future. Mobile first of all includes laptops, tablets , phone. And the basic requirement for a successful mobile platform is battery life.

</comment></comment></comment><comment><USER26> I like Ubuntu, we use (LTS releases) at work and it's been very stable and easy to maintain. It's also by far the most popular Linux distro for a lot's of reasons. Although i rarely use it at home (switched to OSX) I still keep myself updated and try every release. Imho i feel they should get more in the "latest technologies" bandwagon like they did a few years before Unity (for those who remember Ubuntu pushed always the latest GNOME releases with the latest technologies developed by RedHat and get it right even before Fedora) and upstart in order to not cause more fragmentation on the Linux desktop. Let's take Unity example: First was desktop on top of GTK2 which looked and worked better than gnome-shell. Then the transition of GNOME3 started and now GNOME was able to get a ecosystem of applications that fit's on GNOME not Unity, so currently GNOME apps don't fit on Unity desktop and even gnome-shell perhaps it's more useful than Unity. Same for upstart: It started as an new modern init system but then systemd came out and become the standard in Linux (or at least it's trying to). Now Ubuntu is migrating to systemd because their init system never gained traction. Not to mention the manpower they invested and now they don't get any result out of it. I fear the same will happen with MIR since it will NOT become the standard on Linux like Wayland.

For the future I hope Canonical don't pull the plug on Desktop and Server (which is also very popular) and give it's users the choice of using Wayland, GNOME, X11, systemd, XFCE, LXDE or other technologies instead of the "home made" technologies. Also let's hope for more bright 10 years ahead trying to get Linux Desktop in the right direction giving people a choice between Operating Systems.

</comment><comment><USER27> I've had a play with Ubuntu on the Nexus 5. I don't think it's a daily driver for me yet, but I'm excited and they look like they are working hard to get there. Can't wait.

</comment><comment><USER28> "Linux for human beings" sounds like an oxymoron to me, after 5+ years of tinkering with Linux on the desktop.

After years of Ubuntu (and Arch, Debian, Mint etc.) I'm not ashamed to say I'm really happy on OS X. Less customisation and more time to focus on actual work/leisure.

<comment><USER29> Ubuntu is really user-friendly... until you are having any kind of non-trivial problem, which can happen to anyone if they are unlucky with their drivers, the sound doesn't work, etc.. Then you are relegated to copying command line gobbledygook from askubuntu into the terminal, being able to understand nothing about what it does. At least with those tedious "click on X, then on Y when that pops up"... you're able to understand the gist of what you're doing.

I'm a programmer so I've become somewhat accustomed to working with the command line. But it's hardly a nice user interface for most people.

<comment><USER30> I would estimate (from a relatively well-informed position) that about half the serious issues that users face are due to hardware interactions. You'll remember that a few years ago the famous example was WIFI chip-sets.

The reality for the distributions is that if there is good support from the component manufacturer and the OEM then you can provide a good user- experience. We put massive effort into enablement with manufacturers such as Dell, HP and Lenovo [1].

As a user the best thing you can do is to buy hardware with components that will work. In the old days that used to mean looking at hardware component and comparing them to whether they worked with Linux. Now we have certification sites.

The second sort of problem is the general end-user issues. I actually think that Ubuntu is beyond the point where you need to open the command line for normal end-user activities. The big weakness there is that there's no equivalent of the 'Genius Bar' for Linux users.

[1] [http://www.ubuntu.com/certification/](http://www.ubuntu.com/certification/)

<comment><USER29> I guess I was lucky in that installing Ubuntu on my Acer mostly just worked. I had some problems, which were not easy to figure out as a Linux rookie, but some help from forums and installation of some proprietary drivers were enough to give as good of an experience for casual use as I was having on Windows.

Since I installed Ubuntu initially out of necessity, I never really had the time to consider whether my hardware would be supported or not.

</comment></comment></comment></comment><comment><USER31> As someone who's current phone is more powerful than his laptop, I am really looking forward to seeing what Ubuntu Touch can deliver.

</comment><comment><USER32> I love, love Unity; I love keyboard shortcuts for getting things done quickly, and Unity's keyboard shortcuts are intuitive and cover just about everything. And the visual design is beautiful.

...I just know that if the average person could walk into their Best Buy and get a Windows laptop for $X and an Ubuntu version of that laptop for slightly less, we'd see Ubuntu everywhere. One can dream.

</comment><comment><USER33> I tried to switch from Windows to Ubuntu multiple times but I go back to Windows each time.

I have mainly 2 issues:

\- Upgrade to newer version always fails. I'm left with a broken OS at the end.

\- Although the UI has improved a lot since the early days of Ubuntu, I still don't like it. I know I can customize it but it always causes issues on some apps.

<comment><USER34> I've been upgrading my laptop through 6 releases (it's 3 years old), and never had a single failure.

Do you use the provided upgrade path? It's very surprising to me to hear that - we test upgrades pretty thoroughly.

Disclaimer: I work for Canonical.

<comment><USER35> I've had to rebuild with a new OS install twice. I've run Ubuntu for probably... crap, is it 10 years now?

It usually coincided with a oh-well-might-as-well-upgrade decision...

At least one was a two major version upgrade. But still.

</comment></comment></comment><comment><USER36> Ubuntu got popular during the 3 year period between Debian Woody and Sarge. I think many Debian users jumped ship because they got bored of waiting for a new release so a new distro that was basically Debian but up to date was welcome.

The joke around that time was that Debian was either obsolete or unstable.

</comment><comment><USER37> > Like it or not, Ubuntu or whatever your OS of choice is does have root > access to your machine. Not literally of course, but it's effective access > given that their code is running with root privileges on your machine and > chances are you haven't reviewed it lately. You trust your distro to make > sure that code is secure, stable, and acting in your best interests.

Actually, I trust that of the millions of Ubuntu users, there is at least one person who would sound the alarm if Canonical had slipped spyware into their distribution (as, of course, people did about the absurd Amazon lens). Free software means trusting the public at large to audit the software rather than trusting the software's producer.

</comment><comment><USER38> If Ubuntu is not avail now, _then I have to go payment course for learning Windows_

Ubuntu is pure white box to learn. I am enjoying it from my college life where I just touched the computer initially, then immediately ubuntu was loaded.

<comment><USER39> I love that it's becoming so common. I don't use Ubuntu personally but I think it is a great "first experience" with Linux.

</comment></comment><comment><USER40> I have an ambivalent relationship with Ubuntu. Personally, I hate Ubuntu but I'm glad it exists. It means a few more people who otherwise would have used Windows, don't. I keep coming back to Slackware because it's in a nice sweet spot where "stable", "just works", "lets me configure it just the way I want" and "doesn't bother me with needless distro-specific cruft" all intersect. So Ubuntu is definitely not for me. For the people it is for, it does a pretty good job.

</comment><comment><USER41> One of the main reasons Ubuntu got popular (compared to other distros) on Sri Lanka because they shipped free CDs. Lots of people in Sri Lanka didn't have Cable or DSL internet connections by that time. It was limited to a smaller area of the country - even when people had it, it was 512kbps.

No one was going to bother download a huge distro DVD to try out a new OS. However, when you get a CD, you tend to try it out. The smooth installation process certainly helped a lot.

</comment><comment><USER42> I actually think Ubuntu has done wonders to enhance the usability of debian out of the box. We've come so far in 10 years, when I first used debian, I had to write an X config by hand, now thats all automatic, its so much easier to use. I stopped using Ubuntu even though I was an early adopter, and went back to debian, but the development downstream of debian has clearly from my point of view rolled back up hill.

</comment><comment><USER43> This article overlook a few facts of history such as ubuntu actively trying to poach debian devs in an attempt to take over debian, or the fact that packages were out of date for 6 months and that the upgrade process from one version to the other often ended in a reinstall from scratch. Not to mention the numerous things that kept breaking (video drivers, pulseaudio and so on).

</comment><comment><USER44> I'm on arch linux with kde. I tried ubuntu several times, but I can't stick with it. The installation is a breeze, but for the rest it's not that exiting. Btw, I consider myself as a human being too!

Still, I am very happy with the existence of Ubuntu, helping millions of people moving away from Windows and OSX. This is a huge boost for the development of software for linux.

</comment><comment><USER15> I remember when I firs tried Ubuntu 10.4 [0] and forum acquaintances were teasing me about it because there were no MP3 support out of the box. `What distro doesn't include that ?`. Well, it certainly was way easier to install and run than the RedHat from those days (but the handbook was.. there actually was a handbook at least).

[0] edited

</comment><comment><USER45> I've been trying various distros for 15 years now and pretty much stopped at Ubuntu.

Every week I used to visit [http://distrowatch.com/](http://distrowatch.com/) and look for a new distro to try. I liked Mint and #! too, but Ubuntu gave me the most consistent experience with the best repositories.

</comment><comment><USER46> I used Ubuntu in 2004 right when I started college as a comp-sci student. It was the only distro that worked with my laptop with very minimal effort. I also love the package management (though Brew on OSX is a close second).

Great read, thanks for sharing!

</comment><comment><USER47> I am still unhappy with wifi detection/configuration and problems with Compiz. But overall, I agree, Ubuntu is getting better.

</comment><comment><USER48> > By Canonical's estimates, Ubuntu has roughly 90 percent of the Linux market.

Wat? Seriously? How is this measured?

</comment><comment><USER49> I'm surprised they didn't bring up shuttering Ubuntu One cloud service.

</comment><comment><USER50> I have transferred from Ubuntu to Mint recently.

</comment><comment><USER35> Ubuntu has been going backwards for at least two years.... \- Unity doesn't seem to improve, and just further fractures and balkanizes the linux desketop \- They dropped the installation versions where I can do software RAID setup... all my desktops are RAID0 dual HDD and SSD OS/swap/boot. \- Ubuntu desktops have been getting slower as I upgrade my hardware, not faster.

OSX has maddening keyboard shortcuts, and Windows is committing suicide.

With the excess cores, GPU power, huge disk space, virtualization, and other advancements, I should be able to seamlessly run several OSs at once. There is such amazing potential out there, but it is pretty clear that Canonical is now just putting minimal resources into Ubuntu.

It still mystifies me that Google didn't make a seriously good desktop distribution on par with OSX to destroy the windows monopoly. Instead... ChromeOS?

<comment><USER51> You can still install Ubuntu on a RAID0 or 1 mdadm device (I did so on a couple SSDs). You just have to use the Ubuntu Server iso instead of the Desktop one, and follow a few more steps:

[http://www.ubuntulinuxguide.com/software-raid- ubuntu-14-04-s...](http://www.ubuntulinuxguide.com/software-raid- ubuntu-14-04-setup-install-configure/)</comment></comment>


Friday Fun: Gravity (Safari/Chrome only) - <AUTHOR> http://www.eseidel.com/gravity/

<comment><AUTHOR> Sorry, just spotted this is Safari fun only - but then I tested it in Chrome and it's OK there - but someone beat me to that.

</comment><comment><USER2> Seems to work fine in Chrome too.</comment>


Performance comparison of Functional C++ 11, Java 8, JavaScript and Wolfram - <AUTHOR> http://unriskinsight.blogspot.com/2014/06/fast-functional-goats-lions-and-wolves.html <comment><USER2> It is rather sad that none of the 49 comments (at this time of posting) have made a mention of the underlying math problem, which is super interesting, and instead focus on dubious speed metrics (dubious in the sense these metrics change with the chip/cache/RAM/compiler/lang/coding-style & aren't that relevant anyways, compared to the underlying problem)

Lemme rephrase this rather interesting problem: There are 2055 startups, 2006 bigcorps & 2017 zombies. If the startup gets bought out by the bigcorp, the bigcorp has wasted its well earned money and soon becomes a zombie. If the zombie folks instead join hands with the startup, they suddenly make pots of money & the startup become a bigcorp. Finally, if the bigcorp uses its cash prudently and buys the zombie, it starts innovating & becomes a startup.

So the claim is that if you let this economy play out in all its glory, there will be 1.448 billion buyouts. To arrive at this giant figure of 1,448,575,636 takes anywhere between 335 seconds for the C++ hacker to 7000 seconds for the JS guys.

Now give it your best shot!

<comment><USER3> The code is very inefficient to say the least.

I made some modifications (diverging further from the "functional" nature, if you could call it that) and as you can see it is much faster[0].

Output:

      $ node new-magicForest.js 2017 2055 2006
      total forests: 6128
      { goats: 0, wolves: 0, lions: 4023 }
      total time: 20ms

[0] [https://gist.github.com/chapel/1c038b2bf64b3037aaea](https://gist.github.com/chapel/1c038b2bf64b3037aaea)

<comment><USER4> Your code contains a bug in the function getForestKey. See gist.

</comment></comment></comment><comment><USER5> But C++11 solution is not functional. It uses state variables: look at the while loop, it updates variable. Look at the next_forests.reserve, std::back_inserter. These are not clear functional constructs. Of course it is possible to model memory state with the monads :) but... The C++ code is quite different from other codes. So i was surprised by Java which is only 3 times slower than C++ while running a much less effective code

<comment><USER6> Glad someone pointed that out. It is cheating. It is doing a lot of state transformations like in-place sorting / filtering. I'd like to see some real C++ functional code here, using immutable data structures, not an imperative program using lambdas. I guess it would be both much harder to write (C++ is not really a functional language) and much slower, because dynamic memory allocation in C++ is more costly than in Java.

<comment><USER7> Isn't this just evidence of how broad of a definition "functional" programming is? It is the scottsman of programming debates. (Though, I suspect any "paradigm" example will fall into this trap.)

</comment></comment></comment><comment><USER8> It's pretty astonishing how easily C++ trounces everything else including Java. I guess there's still something to be said for compiling directly to optimised binaries.

<comment><USER9> Supposedly, Java is going to be faster than native code any day now. It's been said for years. The case was somewhat credible at one time, because the opportunity exists to optimize using runtime information. I think the reason it didn't go that way is:

1\. CPUs have gotten very good at doing runtime optimization kinds of things on their own, like predicting branches and reducing the cost of virtual function calls. 2\. Java only does optimizations that can be done quickly, since the optimizer has to compete with the executing program itself. 3\. The claim was overblown to begin with, and Java is trying to do too many other things, like be secure, that interfere with performance.

<comment><USER10> I have never seen Sun or Oracle make that claim. You seem to simply be ranting on about a strawman argument, with a rather strange java-hate obsession.

I mean, Fortran did worse than Java. Where is your writeup for that?

<comment><USER11> There was certainly a lot of talk within the Java development community about how Java was going to meet or overtake native code as the HotSpot VM matured. See, for example (from 1998):

[http://www.artima.com/designtechniques/hotspotP.html](http://www.artima.com/designtechniques/hotspotP.html)

"According to Sun Microsystems, the Hotspot virtual machine, Sun's next- generation Java virtual machine (JVM), promises to make Java "as fast as C++.""

<comment><USER12> I'd say that statements like that are subject to some degree of interpretation. It's hard for one runtime to be definitively faster than another runtime. It is, however, quite possible for one runtime to have cases where it is better, cases where it is worse, and cases where it is equivalent such that it is reasonable to say that it is "as fast as" the other. Java tends to be a bit slower than C++ still, but the differences between it and "as fast as" are trivial enough that a number of HFT systems, for example, are written in Java.

<comment><USER13> While I think the comment here leaves that open as a possibility, the second sentence of the article it's from makes it pretty clear. "Specifically, Sun says that a platform-independent Java program delivered as bytecodes in class files will run on Hotspot at speeds on par with an equivalent C++ program compiled to a native executable."

There's not a lot of wiggle room there.

<comment><USER14> Considering that I can get different performance for the _same_ C++ program simply by using different compiler, or even different compiler _options_ , I'd say that there's a lot of wiggle room.

</comment></comment></comment></comment></comment></comment></comment><comment><USER15> Few major points:

Using sort to filter duplicates is horribly worse compared to hashing (javascript for instance). Java version has rather poor impl, it's interesting to see the GC+allocation cost and the GC type used. C++ version does not use really use func. prog in find_stable_forests and meal...

<comment><USER16> _Using sort to filter duplicates is horribly worse compared to hashing (javascript for instance)._

Is this really true? A sort plus a linear scan has very low constant time factors, good cache locality (depending on the sorting algorithm used), and no need to allocate if you're sorting in place. I've seen good results using sort to filter duplicates in my own performance-sensitive code. Are you saying this technique is "horribly worse" based on your experience or intuition?

<comment><USER17> Just to add to the discussion: you're likely correct, based on this SO question:

[http://stackoverflow.com/questions/11227809/why-is- processin...](http://stackoverflow.com/questions/11227809/why-is-processing-a- sorted-array-faster-than-an-unsorted-array)

It will likely get faster the more duplicates you have, as it allows the CPU to predict a branch more reliably several times before being wrong and having to re-do some of its prediction stuff. (note that I'm not experienced with optimizing stuff, dealing with cache optimizations, etc., but I have read a decent amount, and I did take a class about CPU architecture) I would also suspect that hashing might end up messing with memory all over the place, causing the cache to be partly useless.

<comment><USER18> That question (and answer) is probably not relevant here. The important thing is likely cache locality, not branch prediction (as the test case is very different in that question, amplifying branch misprediction issues, which won't be the issue here).

</comment></comment></comment></comment><comment><USER19> I was curious how a non-functional version would fare, so I wrote one in Nimrod and it's a lot faster than the functional C++: [https://gist.github.com/def-/8187448ea7a5c8da8265](https://gist.github.com/def-/8187448ea7a5c8da8265)

      Goats Wolves Lions    C++11  Nimrod
         17     55     6     0.00    0.00
        117    155   106     0.17    0.01
        217    255   206     0.75    0.01
        317    355   306     2.16    0.01
        417    455   406     5.28    0.01
        517    555   506    10.75    0.01
        617    655   606    19.15    0.02
        717    755   706    31.58    0.02
        817    855   806    46.52    0.02
        917    955   906    67.94    0.02
       1017   1055  1006    93.75    0.02
       2017   2055  2006   731.42    0.04

<comment><USER20> The important word here is "functional" C++. This is not about "fastest" C++. What does your comparison tell us?

<comment><USER7> That functional might not be the best damned paradigm on the planet for every use case? :)

</comment></comment></comment><comment><USER21> The term "Functional" here is used _extremely_ liberally. In all 3 cases.

</comment><comment><USER22> Some of the WL code leaves a little to be desired. Here's a more idiomatic and readable Meal:

       Meal[forests_] :=
         Outer[Plus, forests, Permutations[{1, -1, -1}], 1] // Catenate //
           DeleteDuplicates // Select[AllTrue[NonNegative]];

</comment><comment><USER23> A message to the blog owner: get rid of that swipe to go forward/backward between posts when viewing on mobile. It looks good, but it is functionally frustrating. Why would a user expect different swipe behaviour in one direction to another?

<comment><USER24> I've seen this on other blogs too hosted by Blogger/Blogspot. I'm pretty sure it's their doing, not the blog owner himself.

</comment></comment><comment><USER25> I had a quick go at this with Racket: [https://gist.github.com/twfarland/a9d8ce9eff22b39d3136](https://gist.github.com/twfarland/a9d8ce9eff22b39d3136)

I'm not sure if I got the problem right, because it solves the hardest case almost instantly (2006 lions, 2055 wolves, 2017 goats -> 4023 lions), in 0.8s on my macbook air.

I used a general search algo that I've also used in the past for the missionaries and cannibals and snake cube puzzles.

It uses a set to store the past states seen, instead of deduping a list.

</comment><comment><USER26> Here is my natural (without any extra effort thinking about speed) F# solution: (for calibration I have the C++, unchanged, times)

       | 217 | 255 | 206 | 0.5 s (C++ 1.6s)
       | 317 | 355 | 306 | 1 s   (C++ 4.8s)
       | 617 | 655 | 606 | 3.5 s (C++ 35s)
       | 917 | 955 | 906 | 10s   (C++ 117.5)

code:

        let actions = [|[|-1; -1; 1|]; [|-1;1;-1|]; [|1; -1;-1|]|]

        let stable [| g ; w; l|] = (g = 0 && (w = 0 || l = 0)) || (w = 0 && l = 0)

        let isSound = function | [| x ; _; _|] | [|_; x; _|] | [|_; _; x|] when x < 0 -> false | _ -> true

        let stateChange state =  Array.map (Array.map2 (+) state) actions

        let deduplicate sequence = sequence |> Seq.groupBy hash |> Seq.map (snd >> Seq.head)

        let forest start =
          let rec search curforest =
                let nextforest = Array.collect stateChange curforest
                                          |> Array.filter isSound
                                          |> deduplicate
                                          |> Seq.toArray

                if nextforest.Length = 0 then curforest
                else match Array.tryFind stable nextforest with
                        | Some _ -> nextforest
                        | None -> search nextforest

          search (stateChange start) |> Array.filter stable

</comment><comment><USER27> It would be interesting how LuaJIT, PyPy and HHVM (PHP JIT) score against JS v8 and Java 8 on that test environment.

Also, the clang C++ compiler is (a lot) slower than gnu C++ compiler. (we had a benchmark on HN that showed that clang C++ is 5% slower and asm.js is 10% slower than gnu gpp) The comparision should be executed on Linux or Windows as OS X is known for shipping with older versions of Unix tools/applications.

</comment><comment><USER28> SBCL or at least Haskell by any chance? And then in terms of lines of code.)

<comment><USER29> Here's a Haskell translation of the C++ version. Runtume is around 10x of the original (probably vector vs list cache trashing and vector sort/unique vs list to set/set to list), code reduction is 3x.

      import qualified Data.Set as S

      data Forest = F Int Int Int
        deriving (Eq, Ord, Show)

      meal forests = (S.toList . S.fromList)
        [nextForest |
         forest <- forests,
         meal <- possibleMeals,
         let nextForest = forest <+> meal,
         valid nextForest]
       where
        possibleMeals = [
          F (-1) (-1)   1,
          F (-1)   1  (-1),
          F   1  (-1) (-1)]
        F x y z <+> F x' y' z' = F (x+x') (y+y') (z+z')
        valid (F x y z) = x >= 0 && y >= 0 && z >= 0

      findStable forest = iter [forest]
       where
        iter forests | not (done forests) = iter (meal forests)
                     | otherwise          = filter stable forests
        done forests = null forests || any stable forests
        stable (F _ 0 0) = True
        stable (F 0 _ 0) = True
        stable (F 0 0 _) = True
        stable _         = False

      main = print $ findStable (F 117 155 106)

</comment></comment><comment><USER30> Strangely, if the hashCode() method in the Java version is replaced with one generated by Eclipse, the java program runs much slower.

In fact, the execution time is more than doubled.

Why is this so?

The Eclipse generated version of hashCode():

    		@Override
    		public int hashCode() {
    			final int prime = 31;
    			int result = 1;
    			result = prime * result + goats;
    			result = prime * result + lions;
    			result = prime * result + wolves;
    			return result;
    		}

The version in the original code:

    		@Override
    		public int hashCode() {
    			final int magic = 0x9e3779b9;
    			int seed = 0;
    			seed ^= this.goats + magic + (seed << 6) + (seed >> 2);
    			seed ^= this.lions + magic + (seed << 6) + (seed >> 2);
    			seed ^= this.wolves + magic + (seed << 6) + (seed >> 2);
    			return seed;
    		}

The two HashCode() methods both have about the same execution time.

Example:

Forest.makeForest(517, 555, 506)

With original hashCode(): 8.177 s

With Eclipse generated hashCode(): 19.237 s

(100% repeatable with only a few 100ms diff between executions)

</comment><comment><USER31> If anyone is still reading this thread, I optimized the javascript solution and algorithm, speeding it up by almost 20,000x and beating the C++11 one by almost 1,000x. Post is here: [https://news.ycombinator.com/item?id=7858485](https://news.ycombinator.com/item?id=7858485) .

</comment><comment><USER32> Hmm... it doesn't mention anything about the used VM settings. System has 8gb ram. But as i remember java vm is restricted in its use of ram as is NodeJs ( i guess this test was performed in node). To use full 8gb ram you would have to run multiple nodejs instances? am i wrong?

</comment><comment><USER33> I'd love to see how Go stacks up here.

<comment><USER34> This post seems to focus heavily on using map/filter type commands, and Golang does not have functional programming features like this. The Go way of solving this problem would not look like the other solutions here.

<comment><USER35> Go has all the 'functional' features that Javascript, Java and C++ have demonstrated here. The difference is in the library implementation of collections/containers; the default ones in Go don't provide the filter/map methods (or any methods for that matter), but nothing prevent you to use that style with a collection that would implement it.

That is, there's nothing inherent to Go, as a programming language, that makes it less functional than Java or C++. Go has first class support for functions and methods as objects, with proper closures, anonymous funcs and such.

</comment></comment></comment><comment><USER36> Do the Java benchmarks include the start-up time for the JVM? If so, I wouldn't say it's a completely fair comparison. (At least for the times that are small).

</comment><comment><USER37> yeah, I'd like to see that Fortran code. There's some trivial mistakes that can be made by messing up array access orders for example.

<comment><USER38> I am almost certain it wasn't included for some reason like that. I also suspect that they were using an outmoded version of fortran. Clicking the extra links would tend to validate that suspicion.

Also performance of fortran code is quite dependent on the compiler and compiler options. Somethng that was not well described.

</comment></comment><comment><USER39> I would like to have DLang added to that benchmark.

</comment><comment><USER40> Haskell, anyone?

<comment><USER29> See my comment here [https://news.ycombinator.com/item?id=7857316](https://news.ycombinator.com/item?id=7857316)

</comment></comment><comment><USER41> Neat results, and a neat comparison of the languages.

I'm a bit curious how an asm.js port (via whatever means. maybe c++ -> emscripten?) ends up performing.

edit: heh.

> _Also note that FORTRAN is not included in the list [of relative speedups], > because no sane person would switch to FORTRAN from another programming > language voluntarily._

<comment><USER9> It's embarrassing that Fortran gets beat by Java.

<comment><USER6> It's embarrassing that Fortran got beaten by a very unoptimized Java code. But this is probably not because of Fortran is slow and Java is fast, but because the whole benchmark results are pretty much a coincidence of bad coding and if someone else wrote it, the results could be as well completely reversed. E.g. the Java code uses some of the worst performance antipatterns that are possible to do in Java, e.g. like creating small objects everywhere (Optional), while C++ version uses primitives like ints and bools.

</comment></comment></comment><comment><USER42> I don't think although all these languages have some functional characteristics that they should be called functional languages. It seems like the OP was more concerned with getting the results he wanted rather than answering the "Can a functional language do this as well?" question.

</comment><comment> alok-g See also: [https://news.ycombinator.com/item?id=7850394](https://news.ycombinator.com/item?id=7850394) (Code length comparison for several languages)

</comment><comment><USER43> Actually surprised Java lagged behind so far behind... It's usually the case that "Java is 95% as fast as CPP, but can be written with a fraction of the violence."

Any real explanations?

<comment><USER44> I've never heard anybody say that Java is that fast. It can be in very specific situations. Actually 2 - 3 times as fast as C++ is pretty awesome, especially since that is hardly low level Java, rather quite abstract. I suspect low level Java could get it down to a flat 2x in this case. For a huge range of uses 2x as fast is effectively as fast as C, especially since taking advantage of multicore / parallelized operations is significantly easier (in a cross platform manner) than it is in C/C++.

</comment></comment><comment><USER45> It would be very neat to see a Cuda or OpenCL solution

</comment><comment><USER46> what did you use for Javascript??...nodejs??

<comment><USER47> How each program was compiled/run is documented in the source: [http://www.unisoftwareplus.com/download/blog/2014-06/magicFo...](http://www.unisoftwareplus.com/download/blog/2014-06/magicForest.js)

</comment></comment><comment><USER48> don't know if am mistaken or not but I think I read somewhere that V8 got beaten by native</comment>


PHP: The Good Parts - <AUTHOR> http://phpthegoodparts.tumblr.com/ <comment><USER2> This post is obviously a troll but there is actually a very good website about the good parts of PHP : [http://www.phptherightway.com/](http://www.phptherightway.com/)

</comment><comment><USER3> Before I clicked the link I thought: That is going to be a short read ... and it was ;)

<comment><AUTHOR> Not a single post in 2 years :D

I hope this will change after the release of PHP7</comment></comment>