Macbook screen coating issues - <AUTHOR> http://staingate.org <comment><USER2> Apple's customer service is hell. Don't envy anybody to have to deal with this. The "Cosmetic damage and not covered by warranty" line is similar to what I had as answer when after one week of sitting on a desk without any mistreatment I had a crack in the glass of my pre-retina MBP.

Called them and had an endless loop of

\- "I think this is a manufacturing fault"

\- "Cracks in the screen are ALWAYS accidental damage and not covered under warranty"

\- "But I didn't have an accident with it, so ..."

\- "Cracks in the screen are ALWAYS accidental damage and not covered under warranty"

... and so on and so on.

Now, after the most recent graphics board meltdown I am on an XPS13 with Ubuntu, and I can honestly say that apple are off my shopping list for good.

<comment><USER3> I am really tempted by the new XPS 13 (with possibly a dual boot Ubuntu/Windows) instead of a new Macbook Pro 13 retina.

I know that a lot of info is out there. In your case, any comparable experience with Dell support?

<comment><USER2> This must be karma for bitching about Apple, but I just opened the lid of my XPS13 and it has a crack in it. I cannot believe it. It feels like groundhog day!

In any case, I shall report back on how they handle it. Fired off a twitter message to @DellCares and they asked me for the service tag. Go on Dell, impress me!

</comment></comment></comment><comment><USER4> Calling it "cosmetic damage" is ridiculous. The screen's entire purpose is to be looked at. Cosmetic damage to the screen is functional damage.

<comment><USER5> Absolutely. Also claiming that the screen was damaged by bad cleaning method actually means that all my 5 laptops I had in the past are somehow super- strong but only Macbook Pro Retina 2013 is normal.

<comment><USER6> My retina 15" laptop has this plenty. It is clearly markings from the touchpad and the keyboard (and then something along the sides). So it has nothing to do with the way the screen is cleaned.

</comment></comment></comment><comment><USER7> This is the sort of reason I stopped buying Apple products.

Whilst they use ground-breaking advanced engineering, thermal design and materials and all that marketing garb, I feel merely like the pilot of an experimental aircraft about to tumble out of the sky at any moment.

The last three Apple computers I bought ended up being returned on warranty and the replacement sold due to electrical, thermal, software and quality issues. Fortunately we're covered here in the UK for 6 years with a small argument but none of the machines lasted more than 12 months in normal "at home" usage.

Now that's not exclusive to Apple but I don't expect to have these issues on a premium product. £183/month for a computer over its usable lifetime is a lot of money.

On the side I fix Apple kit for people. I recently replaced the screen on a 2008 MBP which had failed. It was a joy to do. I can't help anyone with a Retina MBP onwards though; warranty return only. That's a big red flag for buying any recent kit.

Second hand plastic ThinkPads now. Not had any problems for a couple of years and to replace the entire unit is less than a 2010 MBP screen and they're easy to replace bits in. #00 Philips and a swiss army knife and you're sorted.

<comment><USER8> Second hand plastic ThinkPads are hardly an alternative... They are seriously outdated now.

<comment><USER9> > Second hand plastic ThinkPads are hardly an alternative... They are > seriously outdated now.

And how does that affect their day-to-day usability?

I'm a big fan of new and shiny, but my primary laptop is a Dell Inspiron I bought in 2006/2007, because I'm also a big fan of using things until they break. I popped an SSD into it a couple years ago and it is very snappy and performs perfectly well as a development machine, web browser, and (small) VM host. In fact, it's actually snappier than my i7 desktop for most tasks because of the SSD. So why would a secondhand (and probably newer) ThinkPad not be a suitable alternative?

The biggest downsides of having an older laptop are that the screen is a mere 1680x1050 and it's pretty thick, probably a around a full inch when closed. The former is still not terrible by today's standards (what's with the absurd popularity of 1366x768?), but I do consider it to fall into the bare minimum of acceptability, and the latter is simply not a problem for me - it's not enough weight to bother me on my daily 1.2 mile walk into work and most of the time it's sitting on a desk or on my lap, not anywhere space-constrained.

</comment></comment></comment><comment><USER10> My 13" MBPr has this stain pattern.

Here's my guess, I used an alcohol-based solvent to clean my keyboard and then closed the machine. Now I have stains of the oleophobic coating coming off in the places you'd expect it ... where the keys manage to come in contact with the screen.

So I suppose it's my fault, but I have a Lenovo T440s here with a beautiful matte screen that has no need for a fancy oil-resistent coating that comes off when you breath cleaning solvent on it.

Color me unimpressed, Apple.

<comment> X-Istence So Apple has to figure out how to stop people from using abrasive cleaners on their computers that would also cause issues if it came in contact with switches/circuitboard or anything else in a laptop?

<comment><AUTHOR> None of the scratches on my MBP are from cleaners. They are 100% from the keyboard touching the screen.

Here's a photo ([http://i.imgur.com/gnAqDqk.jpg](http://i.imgur.com/gnAqDqk.jpg)). First you can see the main scratch is a very straight line. Not something that would come from wiping. Second below the man scratch you can see a pattern of small scratches about every 1/2 inch in pairs corresponding to the corners of keys on the keyboard.

I'd be happy if there was just way reasonably priced way to get it re-coated.

<comment><USER11> I believe its oils from your hands rubbing off on the case, and then onto the screen.

</comment></comment></comment></comment><comment><USER12> Enough with the gates. Please. Anything else. I'd even accept stainghazi.

That said, my MBPR has some screen coating issue. But I'm not sure if I scratched it or not, so I won't join their database.

<comment><USER13> > Enough with the gates. Please. Anything else. I'd even accept stainghazi

I won't accept Stainghazi.

RIP Sean Smith / Vile Rat. We miss you, buddy.

<comment><USER14> Mac -> problem with mac -> problem with title -> change title -> reference to eve on line .. and to a goon (therefore SA)

How deep does the rabbit hole go?

</comment></comment></comment><comment> X-Istence The coating on a MacBook Pro is similar to the anti-reflection coating you can get on glasses.

Chlorine and heat will affect glasses, I bet the same can be said for these laptop screens.

I have a feeling that with a database of 258 people, you should be able to find out what people are using to clean their screens and damaging them. Cleaning your screen using those bleach wipes is a sure fire way to damage it!

<comment><USER15> I've never used anything but water and a paper towel to clean my screen, and frankly I resent the fact that you and people like you keep assuming that it's user error. The coating is clearly defective.

There is very clearly a problem with the screen coating on a (in my case) $3500 machine, and Apple needs to be called out on this one. Bravo to the OP for bring this to light.

<comment><USER16> > The coating is clearly defective.

The problem is that 258 some-odd people, out of the what, several tens of thousands of people who have experienced this issue is not a "clearly" situation.

That's, conservatively, about .1% of owners experiencing a problem, and it is entirely within reason to believe the issue is user-caused, baring some reproducible test case.

<comment><USER17> That's, not so conservatively, the number of people who have heard of the site now.

What grounds do you have for believing that web reach is an accurate estimator for this problem?

<comment><USER16> I have no real idea how wide-spread the issue is, but I tend to go with what's concretely known, as opposed to just making crap up.

</comment></comment></comment></comment></comment><comment><USER18> I just, last week, bought my first MacBook Pro -- my first Apple laptop ever. It was much more than I usually spend on a single computer.

And now I hear about this.

Probably one of the most widespread issues -- that Apple is not willing to cover -- in the history of an Apple laptop.

It's not even been 14 days yet, so it's still eligible for return.

Would be lying to say I wasn't considering it.

<comment><USER19> What would you buy instead?

This is my 3rd Macbook (best in terms of hardware, bar the display issue and worst in terms of software - too many glitches) and I'm really looking for an alternative when I next replace it.

<comment><USER20> I have a feeling a lot of people are going to say thinkpad. I have one and haven't turned it on for a couple years but I still think that's a common suggestion. The dell XPS 13 that someone mentioned in this thread seems like a decent macbook air replacement.

<comment><USER21> Thinkpads are pretty awesome, to be honest. Best keyboard of any laptop (even the new chiclet style), they don't overheat on your lap, they're pretty much bulletproof, and replaceable parts means the laptop is serviceable for a longer life-span (after all, parts like batteries have a limited life, shame to throw away a nice laptop because the battery pack is running at less than 50% capacity after a few years of use).

<comment><USER20> I have a newer, faster thinkpad given to me by my company but I still use my 6 year old macbook. I'm really more of an OSX fan vs Windows now. I could probably get by on Ubuntu or something if I really wanted to. I'm just not a fan of the aesthetics of the thinkpad, which might seems weird but it plays a part of why I don't use it. It's heavy, and ugly, and has hooks sticking of the screen.

I never found the keyboard to be much better than others but I have heard many others say it is great so maybe I'm the exception. I use a daskey mechincal on my gaming PC and it's pretty great. The track pad sucks compared to Apple's even though they are made by the same people.

I'll give you service ability (though my old macbook was upgradable). I'm really surprised I haven't had battery issues after 6 years. Being an IBMer we always had to order Lenovos. I think that is changes with our Apple deal. You could get a macbook through some exception but soon they will be available and supported for all employees. I've also heard there is a Toshiba option available though I'm not sure who would pick that over a ThinkPad.

<comment><USER21> To be fair, I wouldn't use a ThinkPad except with Linux (using SUSE right now). Thankfully, many Linux developers are big Thinkpad fans, so any 'classic' Thinkpad (basically the T, W and X series), even the new generations will generally work flawlessly (or close to it) with Linux.

Really I think the only thing that might sway me is Dell's new-found love for Linux.

</comment></comment></comment></comment></comment></comment><comment><USER22> Protip: Use iKlear to clean your machines. It's what they use at the Apple Store. [http://www.amazon.com/s/ref=bl_sr_electronics?ie=UTF8&field-...](http://www.amazon.com/s/ref=bl_sr_electronics?ie=UTF8&field- brandtextbin=iKlear&node=172282)

<comment><USER23> It's certainly iPriced, too.

$19.95 for 8oz (240ml) and a cloth...

<comment><USER24> Not accurate. It's actually $19.95 for this full kit:

1- 2 ounces iKlear Spray Bottle; 1- 6 ounces iKlear Spray Bottle 1- Medium DMT Antimicrobial Cloth; 1- Travel Size DMT Antimicrobial Cloth 1- Large "Chamois" Cloth; 1- Travel Size "Chamois" Cloth 12- iKlear Travel Singles (Step 1 Wet)

So two bottles of the stuff, four cloths, and 12 travel singles.

[http://www.amazon.com/iKlear-iK-26K-Complete-Cleaning- Kit/dp...](http://www.amazon.com/iKlear-iK-26K-Complete-Cleaning- Kit/dp/B0023WU6OI/ref=sr_1_1?s=electronics&ie=UTF8&qid=1426697344&sr=1-1)

<comment><USER23> While you are correct (sorry, I missed the extra stuff), my point was that noname microfibre cloths (~$0.70) and less overpriced cleaners (~$1/oz) are just one click away on Amazon...

</comment></comment></comment></comment><comment><USER15> My 15" rMBP has this problem, and Apple told me it would be $300 to fix it at the depo, or $600 at the store. I wrote a blog post about it[1]. Glad to see it's getting some coverage, and I've added myself to the database.

BTW who's doing this and what are you doing with the data/with Apple?

[1] [http://blog.javajosh.com/2015/02/when-apple-screws-its- custo...](http://blog.javajosh.com/2015/02/when-apple-screws-its-customers- over.html)

<comment><USER25> Good post, I especially liked the closing phrase:

> It's not like Apple is hurting and can't afford to do the right thing: Apple > Computer has 40% profitability, $75B in cash reserves (more than the US > Government) and here they are nickel-and-diming the people who are critical > to their success.

<comment><USER16> I heavily dislike the whole "they have money!" thing.

Apple has been more than willing to extend warranties and repair issues once they're sure the problem is a defect.

Until they're sure, it's not "nickel and diming". It's charging people for a service.

Paying 4 grand for a laptop doesn't magically mean Apple is obligated in anyway to make you happy, costs be damned.

<comment><USER26> >> Apple has been more than willing to extend warranties and repair issues once they're sure the problem is a defect.

The problem is that this can take a long time. So long, in fact, that it can be too late to get any benefit from these repair/warranty programs.

Some people who had the problematic 2011 Macbook Pro had already sold their laptops for parts at a loss before Apple finally acknowledged the issue (check out the huge thread on the support.apple.com forums).

I was lucky that I kept mine (it bricked itself a few months before the repair program was announced) because I had a feeling a replacement program might come out of the class action lawsuit related to the defect.

I ended up buying a new laptop when my 2011 Macbook Pro died because I wasn't going to fork out $500 for another defective logic board. I had already replaced it once while it was still under AppleCare, and it developed the same problems as the original within 6 months. Some people replaced their motherboards as many as 5 times with the same results.

>> Paying 4 grand for a laptop doesn't magically mean Apple is obligated in anyway to make you happy, costs be damned.

They don't have to make you happy "costs be damned", but they should be obligated to at least fix a product that is defective.

<comment><USER16> Once they know it's defective, sure. There's not enough evidence to say they are, in this specific case.

</comment></comment></comment></comment></comment><comment><USER27> I'm one of those with an affected screen. Upper left hand corner has quite bad banding that really get in the way in anything other than neutral light. In no way it this merely a cosmetic issue. As others have pointed out the screen is what you look at and its called anti-glare... preventing glare is literally its function.

I've been buying MacBooks for about 10 years now and quality control wise they seem to be struggling a bit which is to be expected when a manufacturer takes on mass production using edge techniques. Thats no excuse for not fixing the issues that do arise though particularly given the margin they have. My 2006 MacBook Pro is still chugging along whilst I've a 2009 with a few issues (one of which Apple did fix under warranty) and now my 2013 screen is quite literally coming apart.

I'm seriously considering jumping ship at my next refresh but what to is the problem. I actually like the aluminium construction of the MacBook so perhaps the Razor Blade with either Mint or Ubuntu is an option (anyone have any experience of this combination?). It has the added benefit of having a semi- respectable GPU on board for some light-weight machine learning play (again anyone have any experience using a Razor Blade 2014 for this?)

</comment><comment><USER28> I wonder if there is something which accelerates / causes this issue, like climate, cleaning with a particular cleaning agent, or touching the screen. I've had my rMBP since it was released in 2012 and have not seen the issue yet, despite using it nearly all day every day since purchase.

<comment><USER29> From what I hear it could be heat related. Do you use it all day, let it get very warm and then just close the lid to put it in standby?

I am wondering if this is because of a hot unibody case coming very close to the screen when it is closed. So, someone who uses his MacBook very lightly so it doesn't get very hot and then powering it down completely and then waiting a bit before closing the lid might not have this issue as his MacBook is already rather cold when the lid gets closed.

</comment></comment><comment><USER30> I had the same problem. Used nothing but a microfiber cloth. No liquids and the screen coating started coming off. Took it to the apple store and had the screen replaced for free. My MBP Retina was still under warranty. Had it for 11 months before the issue with the screen.

</comment><comment><USER31> I've had this problem around the edges of my screen after about a year. I've only used the anti-static monitor wipes to clean my screen...

</comment><comment><USER32> 13" MBPr purchased 2013-12 Have never used anything other than damp paper towel on the screen. Have the "stain" near the camera only, so far. Nearly identical to image 14.

<comment><USER33> Unrelated, but note that paper towels can scratch glass/plastic. Something with softer fibers is better.

<comment><USER15> Given the similarity in pattern (starting near the camera along the edge) do you _really_ think this is caused by user error? Do you think that everyone is cleaning their screen in the same wrong way in the same area of the screen?

<comment><USER33> No, I have no idea. My comment above was a tangent to the original article and only pertaining to paper towels. That's what I meant by starting my comment with "Unrelated, "

</comment></comment></comment></comment><comment><USER34> Image 3/19 is very interesting and numerous show fairly specific markings indicating scratches near the center of a stain which would support a chemical leaching through a broken protective coating. Similarly a chemical near the edge of the screen/coating could leach into the area there as well.

</comment><comment><USER35> There has been a long standing issue with Apple laptops where the keyboard damages the screen. The screen and keyboard are so close together when the screen is closed that it doesn't take much pressure to get the two to rub. This causes keyboard marks on the screen that can't be removed.

There could be other issues with the screen coating but a lot of the pics on this site look like keyboard damage. You need to be very careful about putting pressure on the screen while it's closed.

</comment><comment><USER36> This happened to one of my rMBP 15" near the camera, Apple Store told me that its caused by oil in your fingers. They basically said to avoid touching the screen when you open the lid.

<comment><USER37> That's ironic:

"The point, explains Carmine Gallo, who is writing a book on the inside workings of the Apple Store, is to get people to touch the devices. "The main reason notebook computers screens are slightly angled is to encourage customers to adjust the screen to their ideal viewing angle," he says -- "in other words, to touch the computer.""

[http://www.theatlantic.com/technology/archive/2012/06/the- sc...](http://www.theatlantic.com/technology/archive/2012/06/the-screen-of- each-laptop-in-the-apple-store-is-set-to-the-exact-same-angle/258592/)

</comment></comment><comment><USER5> Great effort. Same issue here. It is clearly a problem in production of Retina. Any other computer i have from apple does not have this issue and is still OK while being older. I honestly feel embarrassed to display my own work to clients on such screen, nevertheless it is really annoying to see the stains all the time during work.

<comment><USER38> > I honestly feel embarrassed to display my own work to clients on such screen

and you should be, you look like a hobo with a broken laptop asking people to pay you for good work. Im surprised you get any clients :)

</comment></comment><comment><USER39> I would be interested to collect data on two things:

1\. In what city/region does the laptop spend most of its time in? 2\. A few places the laptop sees heavy use (home office desk, coffee shop, etc.)

I wonder if there are environmental factors at play here that a database like this could build a correlation on. Maybe people live near salt water, or their environments are more humid, or temperatures fluctuate.

Please note that this sort of thing should NOT be required to repair a faulty product, but it might be of some benefit to the general public.

</comment><comment><USER40> I had the same on 15" rMBP, basically touchpad's edges "printed" on the screen with some more "stains" in other parts of the screen. It began with a barely noticeable horizontal line after around 8 months and got progressively worse and worse up to the point it was taking around 1/16th of the screen. I always used water to clean the screen. Ended up paying ~300 EUR for a replacement screen, no issues since. Apple didn't offer replacement for free.

</comment><comment><USER41> Something missing from the victim shaming party is comparing the glass screen to other common household objects that are made of glass and stared at, such as house windows, TV screens, dishes, bottles, glasses, and car windshields.

A glass product that is not fit by manufacture and design to tolerate glass cleaners is obviously poorly designed.

Because Apple is the definition of good design even when they aren't, the problem must transmute into moderately annoying victim shaming.

</comment><comment><USER18> How is this site going to use the data? I don't see it ever really mentioning the intention of collecting the various bits of data on its form.

Would be nice if we saw some more information, at least attached to the images. Maybe even some other aggregates, since there seems to be a lot more submissions than they have images.

I think the effort is noble, but would be nice if we had a bit more info behind the intentions of the data being collected.

</comment><comment><USER42> Blaming apple seems a little dishonest.

The same happened to me too. When I cleaned the screen with an alcohol-based wet tissue...

It does get worse on the edges as when wiping it the liquid tends to get on the edges so it affects that part more.

The screen is coated with a fine (a few microns) layer.

If you care so much about your Mac to read the actual care guide, you can see it clearly says not to use anything else but a cloth with _water_.

<comment><USER5> Wow. You probably mean the "Hello." manual.

</comment></comment><comment><USER43> I noticed this a while ago on my 2012 MBA. The "stains" on the screen take the shape of the keyboard, so I wiped it down (can't remember the material I used) and then from then on I keep a sheet of A4 paper between the keyboard and screen when it's closed and it hasn't come back since.

<comment><USER44> The MBA seems to have a different screen coating. I regularly got these "keyboard stains" on my 2013 MBA and I could just wipe them off. They never became permanent.

</comment></comment><comment><USER45> I once had a Vaio that lost paint from the volume buttons. It happened to more people. They also said they wouldn't cover cosmetic damages. I kept bugging them saying I didn't pay the extra for a premium looking laptop to have this cheap thing happening. They fixed it in the end, for free.

I have a friend that always makes a huge scene at an apple store when something breaks (latest thing was a failure of the Ati card in a iMac from 2011), he always gets everything fixed, for free. You need to have a big mouth.

</comment><comment><USER46> I remember back in the days when people tried to justify the MBP prices by using some ambiguous "build-quality" only Macs had, but you couldn't get with Dells or Lenovos.

Yeah. Not convinced.

</comment><comment><USER47> I've got two rMBPs from 2012, one is 15" (with the infamous LG display, retentiongate anyone?), the other is 13". 15" is heavy used and has some marks from the keyboard on screen, but coating is intact. 13"'s screen is in nearly perfect state.

No "staingate" at all. Sure, there are many other gates like magsafecrapgate, yosemiteslowgate, unbearablyslowgraphicsgate and such. But no staingate.

</comment><comment><USER48> Why is it only happening on Macbook Pro's? Is it only happening to matte screens? (afair there's no matte screen option anymore?)

<comment><USER49> It seems that the MacBook Air for instance has other screen coating. So maybe it's more resistant.

As far as i remember the Air has a "plastic screen" while the MacBook Pro has a real glass layer with some special anti-reflection coating.

</comment></comment><comment><USER50> I've had the exact same thing on a flat screen CRT monitor from 1998 :P This is most definitely a result of cleaning the screen with some detergent that damages the anti-reflective coating, you can achieve the same effect on literally any screen, and someone is trying to make it look like only MacBooks have this problem.

<comment><USER20> I've used solvents on prior macbook screens. Maybe I shouldn't have but nothing like this has ever occurred. Nothing like this has ever happened on any LCD screen I've owned. It seems like a design flaw or a manufacturing defect to me.

</comment></comment><comment><USER51> I'm having this problem around the edges of my screen. The only cleaning product I've used is windex.

<comment><USER52> Windex contains ammonia, according to Apple it's not safe to use on screens:

> Don't use window cleaners, household cleaners, aerosol sprays, solvents, > ammonia, abrasives, or cleaners containing hydrogen peroxide to clean the > display.

[https://support.apple.com/en-us/ht204172](https://support.apple.com/en- us/ht204172)

Stick with a damp cloth.

(I use 99% isopropyl alcohol to clean my computer, screen and all. It's notably absent from Apple's list of forbidden chemicals, but I'm not sure that it's safe so I won't recommend it.)

<comment><USER53> I typically use isopropyl alcohol as well. Although I've periodically used Windex on my 2012 rMBP; no issues thus far, still looks brand new.

</comment></comment></comment><comment><USER54> Apple immediately replaced the display on my late 2013 MacBook Pro after I reported this problem last week. I had only cleaned the display a few times, always using a damp microfiber cloth. I purchased an extended warranty when I bought the computer, so AppleCare paid for the repair.

<comment><USER5> Lucky you. But this is a problem that should be solved independent of warranty. The quality of the display is clearly not reaching customer expectations.

<comment><USER54> I totally agree. If I hadn't purchased AppleCare and I was asked to pay $700 for the repair, I would be very upset! This is clearly a manufacturing defect, and Apple will eventually have to address it in a systematic way.

</comment></comment></comment><comment><USER55> I have seen many damaged computer screens, desktop and laptop. One of the most common themes is the cleaning solution used to clean the screen. A lot of people admits they are using the common household cleaning solutions to clean the screens.

<comment><USER38> and? screen is plastic, non abrasive cleaning solutions should NEVER affect it, whats more they NEVER did before those bullshit anti glare pure marketing reflective coatings came along.

<comment><USER55> huh?

Those screens were damaged, both plastic and glass alike.

Some people think that since it is a glass screen, using cleaning solution like Windex is ok. That's so not recommended.

</comment></comment></comment><comment><USER56> Seems like a superficial problem, most of the LCD is in order. Couldn't Apple issue a recall for the small number of affected user, give them a new screen back. Meanwhile they de-laminate and re-laminate the stained ones ?

</comment><comment><USER57> Problems like this are the reasons why i will only buy Apple notebooks after they get a spec-refresh (upgraded CPU etc., but same technology). I am not willing to be the beta-tester for a $1500++ notebook.

<comment><USER58> How does that help an issue like this?

<comment><USER20> I think what they are saying is hopefully there is some mid cycle refresh that fixes this problem quietly.

</comment></comment></comment><comment><USER59> I'm curious to know if any particular models are affected. For those of you with the issue, what model do you own? (Aside: It would be really nice if they'd open up their data.)

</comment><comment><USER60> Did not know it's such a widespread problem. Had my 15'' retina display replaced for free at an end of warranty period, but they seemed puzzled about this type of damage.

</comment><comment><USER61> I had something similar happen to me after I put my brand new MBP in my bag on a really cold day. Went away after I cleaned it with a microfiber.

Not exactly confidence inspiring.

</comment><comment><USER62> This is a frustrating problem, especially since MacBooks have such a high price tag. However:

"The stains start to appear after 12 to 18 months."

That's beyond the warranty period of the MacBook. When you purchase a MacBook, Apple makes it very clear that the warranty will expire after a year. I don't think it's reasonable to hold a company accountable beyond their warranty period if the price and warranty are clearly defined at time of purchase. If Apple products continually fail just outside of their warranty, the market will adapt to reduce the amount people are willing to pay for Apple hardware.

<comment><USER63> One thing though: Apple always states their one year warranty (and tries to push Apple Care). Legislation in your country might disagree and Apple has to adhere to it. In Europe there are vast differences, ranging from 2 to 6 (!) years.

I'm a Macbook Retina owner myself and I'm not happy. Having a 2500 Euro machine that lasts as long as a 400 Euro crapbook?

</comment></comment><comment><USER64> I find the initiative is very interesting. Have you noticed there are no social media contacts? No follow us on Twitter?

</comment><comment><USER65> I guess it is not the company i expected. Samsung next time with linux...

</comment><comment><USER66> Best hardware, think different, walled garden ecosystem etc etc etc.

Ah the power of choice.

</comment><comment><USER67> I damaged mine (very slightly) with a Clorox wipe. It was my own damn fault. I've had good luck cleaning my sunglasses with them and figured it would work for the computer.

I accept responsibility for this bad decision.

<comment><USER67> Oh, cool! Down voting with no explanation because I didn't express agreement!</comment></comment>


Ask HN: What are your favorite podcasts? - <AUTHOR> <comment><USER4> Radical Personal Finance - a non-traditional view on the topic of personal finance, with a goal of providing listeners with the knowledge they need to build financial freedom "in 10 years or less":

[https://radicalpersonalfinance.com/archive/](https://radicalpersonalfinance.com/archive/)

Crypto-Gram - a monthly security-themed digest podcast (it is actually an audio version of the identically titled Bruce Schneier's newsletter):

[http://crypto-gram.libsyn.com/](http://crypto-gram.libsyn.com/)

And, of course, "Hardcore History". It's just teriffic, Dan Carlin has a talent in painting live historical pictures using just words.

[http://www.dancarlin.com/product-category/hardcore- history/](http://www.dancarlin.com/product-category/hardcore-history/)

<comment><USER5> Thanks for this. I tried radical personal finance, the episode 'what's wrong with radical personal finance' is very good!

</comment></comment><comment><USER6> In Our Time (BBC)

The host and a panel of professors talk about subjects ranging from ancient history to nuclear physics.

[http://www.bbc.co.uk/programmes/b006qykl](http://www.bbc.co.uk/programmes/b006qykl)

<comment><USER7> Any favorite episode i should start with?

<comment><USER8> An episode that really stood out for me when I first heard it was about Imaginary Numbers: [http://www.bbc.co.uk/programmes/b00tt6b2](http://www.bbc.co.uk/programmes/b00tt6b2)

</comment></comment></comment><comment><USER9> No Agenda Show. Media deconstruction, no advertising, listener supported. [http://noagendashow.com](http://noagendashow.com) Or use the excellent web based player [https://noagendaplayer.com](https://noagendaplayer.com)

<comment><USER10> Thank you for your courage

</comment></comment><comment><USER11> This shows up at least monthly; maybe eventually I will get around to writing up the recommendations but for now you're on your own:

Ask HN: What are your favorite podcasts? (62 comments 20170721) [https://news.ycombinator.com/item?id=14819798](https://news.ycombinator.com/item?id=14819798)

Podcasts to make you smarter (49 comments 20170711) [https://news.ycombinator.com/item?id=14737772](https://news.ycombinator.com/item?id=14737772)

Ask HN: What Podcasts are you listening right now and why? (77 comments 20170623) [https://news.ycombinator.com/item?id=14616998](https://news.ycombinator.com/item?id=14616998)

Ask HN: What podcasts are you listening to? (62 comments 20170611) [https://news.ycombinator.com/item?id=14529759](https://news.ycombinator.com/item?id=14529759)

</comment><comment><USER12> Not the answer you requested [https://hn.algolia.com/?query=ask%20hn%20podcasts&sort=byPop...](https://hn.algolia.com/?query=ask%20hn%20podcasts&sort=byPopularity&prefix&page=0&dateRange=all&type=story)

</comment><comment><USER13> Marketplace - amazing host, fun and informative to get a daily update what's up in the economy, politics , tech

This week in startups - I am big fan of Jason and his work

Startup for the rest of us - no ads , pure useful content

Montley Fool Monday - great weekly update about the market , a lot of talk about tech

<comment><USER14> Jason joined our podcast last week to talk about his new book and our podcast's focus of corporate innovation. Here's a link to the episode on aCast if interested..[https://www.acast.com/insideoutsideinnovation/ep.65-jasoncal...](https://www.acast.com/insideoutsideinnovation/ep.65-jasoncalacanisw- angel)

<comment><USER13> Sounds good! Bookmarking to check it out.

</comment></comment></comment><comment><USER15> Indie Hackers! [https://www.indiehackers.com/podcast](https://www.indiehackers.com/podcast)

<comment><USER16> I second that, Courtland does a fantastic job

</comment></comment><comment><USER17> Song Exploder, Coding Blocks, Strangers (really good series of long conversations with Trump voters began not so long ago, but haven't check in on it for a while), Judge John Hodgman, Front End Happy Hour, Bullseye, Jordan Jesse Go!, More Perfect, 99% Invisible, Hidden Brain, Oh No Ross and Carrie. In general lots of NPR stuff and the following networks: Maximum Fun, Earwolf, Radiotopia.

</comment><comment><USER18> "You are not so smart" [http://youarenotsosmart.com](http://youarenotsosmart.com)

<comment><USER19> +1!

</comment></comment><comment><USER20> Few of my favorites in no particular order.

Grant Cardone's podcasts mainly: [https://grantcardonetv.com/podcasts/](https://grantcardonetv.com/podcasts/)

Masters of Scale [https://mastersofscale.com/](https://mastersofscale.com/)

Techcrunch Equity [https://techcrunch.com/tag/equity- podcast/](https://techcrunch.com/tag/equity-podcast/)

How I Built This [http://www.npr.org/podcasts/510313/how-i-built- this](http://www.npr.org/podcasts/510313/how-i-built-this)

</comment><comment><USER21> I started with Gimlet Media StartUp podcasts. Start from season 1. It's great!

<comment><USER22> +100 to StartUp. Fantastic show, even the episodes that aren't as good are fantastic.

</comment></comment><comment><USER23> One My most favorite & motivational Jocko Podcast:

[https://www.youtube.com/channel/UCkqcY4CAuBFNFho6JgygCnA](https://www.youtube.com/channel/UCkqcY4CAuBFNFho6JgygCnA)

</comment><comment><USER24> Omega Tau - Interviews with tech and science people talking about their area of interest. Lots of episodes on aviation, and space exploration in particular. It has a good level of technical depth. Highly recommended!

</comment><comment><USER25> [https://soundcloud.com/bodega-sushi/](https://soundcloud.com/bodega-sushi/)

Only podcast I listen to, the Bodega Boys, to guys from the Bronx that started out as amateur comedians on Twitter and ended up with a TV show: [https://www.viceland.com/en_us/video/thursday- august-10-2017...](https://www.viceland.com/en_us/video/thursday- august-10-2017/5980df54b3b6c84a2f1a0565)

</comment><comment><USER26> Accidental Tech Podcast - A tech podcast with a strong focus on Apple. Commentary by Siracusa makes this one worth it.

Film Sack - Film reviews of bad, strange or unique movies. They only do movies that are currently available via streaming sites and encourage their listeners to watch the movie before the episode.

Judge John Hodgeman - Two people, usually a couple, call in to the show with a disagreement. John Hodgeman will listen to both sides and cast his judgement. Both sides agree to abide by whatever he says.

</comment><comment><USER27> Both 'Hardcore History' and 'Common Sense' by Dan Carlin are near the top of my list. Hardcore History especially on long trips :)

</comment><comment><USER28> Several good mentions here already--

Worth considering, Dave Asprey's Bulletproof Radio > [https://blog.bulletproof.com/bulletproof-radio-episodes- dire...](https://blog.bulletproof.com/bulletproof-radio-episodes-directory/)

</comment><comment><USER29> 99% Invisible - Really great mix of interesting topics you wouldn't normally think about.

</comment><comment><USER30> Stuff you should know No such thing as a fish - random trivia/comedy The infinite monkey cage - scientific trivia/comedy Sawbones - <USER2> history/trivia Go time - golang community IRL - Internet cultured topics by mozilla

</comment><comment><USER31> Hardcore History!

<comment><USER32> I enjoy this and History on Fire, but I've had a hard time getting into other history podcasts. Any recommendations welcome.

<comment><USER33> Not exactly a podcast but America: Empire of liberty by David Renoylds is a masterpiece.

It can be listened like a podcast as each chapter is self contained and 10 mins or so with first hand accounts from actors etc.

</comment></comment></comment><comment><USER34> Startup Handmedowns is pretty cool

[https://www.stitcher.com/podcast/startup- handmedowns](https://www.stitcher.com/podcast/startup-handmedowns)

</comment><comment><USER35> VR: voices of VR, Rev VR

Startups/Business: How I built this, a16z, masters of scale, startup, indie hackers

Other: talking machines (NLP/ML), Mogul (more of a mini-series then a real podcast), Acquisitions Inc (DnD)

</comment><comment><USER36> The Daily NY Times Axe files The art of manufacturing Containers

</comment><comment><USER37> [https://player.fm/podcasts/cryptocurrency](https://player.fm/podcasts/cryptocurrency)

</comment><comment><USER38> The Daily by NYT is good daily listening before hitting bed, though Barbaro tries a little too hard developing his style.

Planet Money is well produced and entertaining.

</comment><comment><USER39> Chapo Trap House

</comment><comment><USER40> [https://designyourthinking.com](https://designyourthinking.com)

</comment><comment><USER41> I recently started listening to some fiction podcasts, and they are amazing!

Limetown, Message, Black tapes.

<comment><USER42> You should check out Reddit's /r/audiodrama subreddit.

Some recommendations:

Mabel - Mysterious ghost story.

We're Alive - High quality Zombie TEOTWAWKI.

Our Fair City - Dystopian adventure with comic momments. Stay with it until Season 2, it takes a while to warm up but is one of the best.

EOS-10 - Scrubs in Space.

Wolf 359 - Space mystery adventure.

Liberty - There are two related series: I recommend starting with 'Critical Research' for the worldbuilding and then proceeding onto 'Tales from the Tower', which is extraordinary.

</comment></comment><comment><USER43> On this note, what applications do you guys use for listening and discovering podcasts?

</comment><comment><USER7> 1) Marketplace (regular, morning, mid-day and tech)

2) Planet Money

3) The Daily

4) 50 Things that made the modern world

5) The inquiry

6) Crimetown

7) Criminal

8) Pessimists archive (should be called Luddites archive)

9) More Perfect

10) Science Vs

<comment><USER44> Crimetown was just absolutely fantastic. Wonder if Season 2 will compare.

</comment></comment><comment><USER19> * Freakanomics (Pop Eco)

* Youarenotsosmart (Pop Psych)

* Revisionist History (Malcolm Gladwell)

* Partially Derivative (Data Science Stuff)

</comment><comment><USER45> Here's a few examples of Podcasts I've done recently:

        + https://soundcloud.com/dez_blanchfield/ibm-fast-track-your-data-2017-podcast-series-talking-with-lillian-pierson
        + https://soundcloud.com/dez_blanchfield/conversations-with-dez-podcast-series-talking-about-cloud-ascend-from-engility-with-kevin-jackson
        + https://soundcloud.com/dez_blanchfield/conversations-with-dez-podcast-series-talking-about-behavioural-economics-with-guy-shone
        + https://soundcloud.com/dez_blanchfield/conversations-with-dez-podcast-series-talking-about-cloud-on-mainframe-with-steven-dickens
        + https://soundcloud.com/dez_blanchfield/conversations-with-dez-podcast-series-talking-gdpr-with-ian-moyse
        + https://soundcloud.com/dez_blanchfield/conversations-with-dez-podcast-series-talking-social-selling-with-ian-moyse
        + https://soundcloud.com/dez_blanchfield/conversations-with-dez-podcast-series-talking-with-joe-speed
        + https://soundcloud.com/dez_blanchfield/ibm-interconnect-2017-podcast-series-talking-with-david-mathison
        + https://soundcloud.com/dez_blanchfield/ibm-interconnect-2017-podcast-series-talking-with-jeff-spicer
        + https://soundcloud.com/dez_blanchfield/ibm-interconnect-2017-podcast-series-talking-with-dr-bob-hayes
        + https://soundcloud.com/dez_blanchfield/ibm-interconnect-2017-podcast-series-talking-with-steve-ardire
        + https://soundcloud.com/dez_blanchfield/ibm-interconnect-2017-podcast-series-talking-with-kevin-jackson

I also now have 10x of the top 10x publisher platforms now syndicating me:

        1. iTunes
        2. GooglePlay
        3. SoundCloud
        4. aCast
        5. MixCloud
        6. iVoox
        7. ListenNotes
        8. Stitcher
        9. PlayerFM
        X. Ustream

        + http://bit.ly/dezsoundcloud
        + https://itunes.apple.com/gb/podcast/conversations-with-dez-blanchfield/id1223831564
        + https://play.google.com/music/m/Ic4aqobisb6om245wujxsxmgyoa?t=Conversations_with_Dez_Blanchfield
        + http://www.acast.com/dezblanchfield
        + http://www.mixcloud.com/dez_blanchfield/
        + http://www.stitcher.com/podcast/dez-blanchfield/talking-with-2/
        + http://cxoguide.com/conversations-with-dez-blanchfield/
        + https://player.fm/series/conversations-with-dez-blanchfield
        + http://www.ivoox.com/en/Dez-Blanchfield-Talking-With_sb.html
        + https://www.listennotes.com/channels/1929359/conversations-with-dez-blanchfield/

</comment><comment><USER46> Aside from the standard Rogan / Harris / Ferriss...

The Bike Shed

Developer on Fire

Travel Like a Boss

Invest Like a Boss

Tangentially Speaking

The James Altucher Show

Digital Communion

</comment><comment><USER47> I'm currently going through the entire JAMStack radio archive.

</comment><comment><USER48> I've really enjoyed 'Waking Up' with Sam Harris lately. Some fascinating and eclectic conversations.

<comment><USER42> Check out the one with David Krakauer of the Santa Fe Institute

</comment></comment><comment><USER49> 99 percent invisible

</comment><comment><USER50> The Top - Nathan Latka

Everyone Hates Marketers - Louis Grenier

How I Built This - <USER3>

</comment><comment><USER51> Open Source Security Podcast

Late Night Linux

Chemistry World Podcast

</comment><comment><USER52> Security now

The vergecast

Accidental tech

Ben Shapiro

Sometimes chapo trap house

Sometimes Sam Harris

</comment><comment><USER53> -99% Invisible

-Hardcore History

-The History of Rome

-True Crime Guys

-Reply All

-Criminal

-Myths and Legends

-Crimetown

-Internet History Podcast

</comment><comment><USER54> Mixergy

</comment><comment><USER55> I've got a few I look forward to every single week (or so). I listen for pleasure and to get my mind off work. With that said, here are my favorite weekly podcasts (I've included descriptions from their website or my own if none was provided):

[0a] Giant Bombcast and [0b] Giant Beastcast (Note I'm a premium member)

The Giant Bomb staff discuss the latest video game news and new releases, taste-test questionable beverages, and get wildly off-topic in this weekly podcast.

[1] Thirty, Twenty, Ten

A pop culture time machine that examines TV, movies, music and video games from the 80s, 90s and 2000s.

[2] Retronauts

The original classic gaming podcasts continues its endless quest to explore the history of video games, one game at a time.

[3] The Talking Simpson's (Note I still love The Simpson's)

Join your friends at the Laser Time Podcast Network for a chronological and cromulent exploration of the greatest show ever made!

[4] Game Informer

No description available: Weekly podcast about video games. Professionally produced and in depth and I highly recommend listening to the episodes where they discuss the origination and founding of Funcoland/Gamestop/Game Informer and the current episode about Game Freak the developers and creators of Pokémon.)

Honorable mentions:

[5] 8-4 Play

Bi-weekly podcast about Japan video games, culture, and everything Japan that's making the news. They also run a video game translation business and have ported many popular games.

[6] Laser Time

Laser Time is a show featuring folks in the video games industry, although not necessarily about video games.

[7] Game Dev Club

The Dev Game Club looks at older games and plays through them in a form similar to a book club!

[8] Player One

Join ex-game journalists Chris Johnston (ex-EGM), Phil Theobald (ex-GameNow), Greg Sewart (ex-EGM) and their buddy Mike Phillips as they talk about console/portable/PC games, babies, and the meaning of life.

[9a] Radio Free Nintendo and [9b] Famicast

No Description Available: Podcast about all things Nintendo, old and new. It's very well done and balanced. The Famicast comes out less often and is mostly Japanese focused.

[10] Genesis Gems (I was a Nintendo kid.)

Genesis Gems is a retro gaming podcast focused on the Sega Genesis console. Family friendly, fun, and goofy!

\---

[0a] [https://www.giantbomb.com/podcasts/bombcast/](https://www.giantbomb.com/podcasts/bombcast/)

[0b] [https://www.giantbomb.com/podcasts/beastcast/](https://www.giantbomb.com/podcasts/beastcast/)

[1] [http://www.lasertimepodcast.com/category/thirty-twenty- ten/](http://www.lasertimepodcast.com/category/thirty-twenty-ten/)

[2] [https://retronauts.com/topic/podcast/](https://retronauts.com/topic/podcast/)

[3] [http://www.lasertimepodcast.com/category/talking- simpsons/](http://www.lasertimepodcast.com/category/talking-simpsons/)

[4] [http://www.gameinformer.com/p/gishow.aspx](http://www.gameinformer.com/p/gishow.aspx)

[5] [http://8-4.jp/blog/?cat=8](http://8-4.jp/blog/?cat=8)

[6] [http://www.lasertimepodcast.com/category/lasertimepodcast/](http://www.lasertimepodcast.com/category/lasertimepodcast/)

[7] [http://www.devgameclub.com](http://www.devgameclub.com)

[8] [http://www.playeronepodcast.com](http://www.playeronepodcast.com)

[9a] [http://www.nintendoworldreport.com/rfn](http://www.nintendoworldreport.com/rfn)

[9b] [http://www.nintendoworldreport.com/famicast](http://www.nintendoworldreport.com/famicast)

[10] [http://genesisgems.podomatic.com](http://genesisgems.podomatic.com)

\---

I have others, but these are the podcasts I look forward too every time they pop up in my feed. If you can't tell, I like pop culture, video games, and listen for fun and to escape. That work life balance thing.

Edit: Formatting.

</comment><comment><USER56> Boat radio

</comment><comment><USER57> \- Tim Ferris

\- Sam Harris

\- Joe Rogan

</comment><comment><USER58> Joe Rogan Podcast check it out!

The Joe Rogan Experience

TRAIN BY DAY JOE ROGAN PODCAST BY NIGHT, ALL DAY!</comment>


Using www.domain.com for mobile web app - <AUTHOR>

We plan to launch our mobile web app, which will be solely be mobile-only. Instead of using m.domain.com sub-domain, www.domain.com/sub-directory, or domain.mobi new domain name, can't I just use www.domain.com for my mobile web app?
People who go to www.domain.com on their PCs will see a small mobile site homepage!
Or perhaps I can redirect all people from PC to eg. www.domain.com/PC which will basically be a simple homepage instructing people to access the site on their mobile devices.
Feedback welcomed! <comment><USER2> Stuff like this bugs me, when I go to a website and I'm told I can't access it because I'm on a _PC_. I find myself spoofing my user agent and looking through directories I shouldn't have to just to get in, even if I don't want to use the app, because to me, telling me I can not under any circumstances use your web app on my PC might as well be challenging me to find a way in.

<comment><AUTHOR> Thanks for the different perspective.

It's not that we want to peeve off anybody.

Would you be alright going to m.domain.com on your PC only to be redirected to domain.com? Would you still want to try getting into m.domain.com on your PC?

There's no difference with using domain.com for mobile web app only. It's just the URL address being used is different (domain.com vs m.domain.com). Let me know your thoughts.

</comment></comment><comment><USER3> My personal preference as an end-user will be to get a redirect to www.domain.com/welcome (note: not "PC", or "desktop" ... but "welcome"), with a playable slideshow or demo of the mobile site + clear instructions on what I need to do access it on the phone.

<comment><AUTHOR> Noted and thanks for the feedback. www.domain.com/welcome is definitely better.

My main concern is whether there is any issues using www.domain.com for the mobile site (and not m., or .mobi, or .com/directory). Any thoughts on this?

<comment><USER3> I can't speak for any issues (are you thinking in terms of SEO?) except for the fact that it would be better if you drop the "www." in your marketing as well. It distracts.

<comment><AUTHOR> Yes, can drop www ie. straight to domain.com on a mobile device to access the mobile web app. Just that I can't seem to find any mobile web app or site that uses domain.com as it's homepage. Its normally a m., .mobi, or .com/sub- directory.

So wondering whether I am missing something if I don't follow the norms and just use domain.com for my mobile site exclusively.

</comment></comment></comment></comment><comment><USER4> Are you OK with losing me as a customer? Because I don't have a smart phone.

<comment><AUTHOR> Unfortunately the app is a mobile web app that will only work on a smartphone.

Instagram is also a phone only app, so users without smartphones are not able to use Instagram</comment></comment>


Show HN: A web-based Excel/Database hybrid - <AUTHOR> http://www.ragic.com/intl/en/home

<comment><USER2> It took me a long time to figure out what it actually is. Similar to what other commenters have mentioned, the three things I'd recommend focusing on are:

1) Stupidly simple messaging. To do this, talk to the people that are already using it and ask them how they'd describe it to someone who's not that tech- savvy. Try and phrase what they say as close to word-for-word as you can. "Supercharge your database development" meant nothing to me.

2) A very clear list of use cases/examples. I didn't actually get what it was until I saw the expense report example at the bottom of the page. These examples need to be called out very quickly.

3) A stupidly simple demo before requiring any input. I'd have the call to action say "Try a simple demo" and definitely don't require registration before seeing it. Trying to get me to start a 30-day free trial right away makes me leave the page before I even try a demo.

<comment><AUTHOR> OK, let's try this for a title.

"Build your database with online spreadsheet"

I've already updated this to the website.

<comment><USER3> That doesn't quite read correctly. "Build your database with _an_ online spreadsheet" or "Create your database as easily as a spreadsheet" or "Build with the power of a database and the ease of a spreadsheet"

Ps. Love the idea for the project, I have been looking out for something like this for a while.

<comment><AUTHOR> I changed to the first suggestion: "Build your database with an online spreadsheet"

We try to make the sentences as short as possible.

</comment></comment></comment></comment><comment><USER4> I strongly recommend you offer a demo without needing to sign up. I was intrigued enough to take a look, but not enough to go through a sign up process.

<comment><AUTHOR> We had a sandbox account log in at the registration page, but after some testing we found that it made a lot of people who would have signed up just go to the sandbox instead.

The original page is here: <http://www.ragic.com/intl/en/registerSandbox>

For people who would like to use the sandbox instead.

<comment><USER5> You could generate a unique key for each visitor as a sandbox user and then give the prompt to convert to a full account once the user has started interacting with the site. Be sure to make it non-intrusive though.

See how they have done it on <https://hollyapp.com/>

It took me a while to find that link again, but I thought it was worth it as an example.

Good luck.

</comment></comment></comment><comment><USER6> Great idea, I have been actually thinking about something like this for a long time.

Great product, but weak marketing. It is targeted for non-technical small businesses, but homepage and everything looks complicated, and makes less sense for these people. There should be a one sentence which clearly explains what the product is meant to do. Customers are more interested in the end result, show them some examples of what they can do with this product. Unfortunately , this looks like a product for developers by developers.

</comment><comment><USER7> Here's the discussion from the last time he submitted this: <http://news.ycombinator.com/item?id=3959486>

Would be interested to hear how the product has evolved since then. Have they incorporated any of the feedback they received the first time around?

<comment><AUTHOR> Yes, we've worked on A LOT of items from the last submission.

The biggest problem was that it's not really easy for people to get started on how to build applications with Ragic. People don't like to read documents, so we added an "Interactive Tutorial".

The interactive tutorial takes new users step by step to build a simple application on Ragic, pretty much like how you do it on a flash game or online game. If you click through the tutorial, you will have built a simple Ragic application. We really hope that this can help our users get the hang of it.

<comment><USER8> I love the idea. the interactive guide is horrible. far from simple. Sorry for being blunt.

<comment><AUTHOR> Hi, did you run into some problems in the tutorial? Or because the steps of the tutorial is too complex?

<comment><USER9> Trying to answer here for him: I ran into troubles with the third field added - the demo didn't react anymore, I couldn't type in the field name. Also I agree that it should be a bit less restrictive. For example it only accepts the step when I actually type in "Customer". I'd prefer arrows and a fixed help box instead of the overlays - as it is at one time had to look around where it wants me to go next.

A few more things:

\- It was hard for me to get into design mode again after having tried the form view. I'd make that more prominent. Right now I think it's only in the context menu for the entities, not for the whole db however.

\- I see forms, but do you have (dynamic) list views as well? How do I format / generate them?

\- Try to get rid of all the "leave this page" browser warnings.

\- paragraph text fields behave very odd in Chrome (graphical issues after resizing, I think it also cut some pasted text). I also think rich text capability might be critical there, but I can understand that you wanted to avoid that beast at first.

In general I like the approach - I think it's a very valid business idea to try to give benefits to all those businesses with Excel 'workflow applications'. The ability to do multiuser editing might be a big enough benefit alone to get some customers - maybe you could accentuate more on that. IMO however the UX from the developer end needs a lot of streamlining.

<comment><AUTHOR> Hi,

1\. What browser/OS version are you using? I would like to reproduce this issue.

2\. It's in the context menu you mentioned, and in the upper right corner of the form. We should find some way to make it more prominent.

3\. The dynamic list views are generated automatically. When you finish designing a form, just click "<< Back Listing" and it will take you to the listing page.

4\. We added the "leave this page" warning because a lot of users have mentioned that they accidentally click on the exit button.

5\. There's some special feature that we added to the copy and paste function that might confuse new users. I think we need to disable it by default. The feature is mean to match the field names from the source with the field names in the Ragic form, and put values from the source to their corresponding fields.

Really appreciate the feedback, please let me know if there's any other advices. I can be contacted at jeff at ragic dot com

<comment><USER9> 1) OSX 10.8.x, latest Chrome (omw right now, can't check)

4) How about a save-by-default stance? is versioning and rollback hard to implement on your stack? (those two characteristics should be used together IMO) Alternatively I'd just implement a message that asks whether to save, forget changes or cancel.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> A couple of thoughts:

Is Javascript really the language to use when you're seemingly trying to talk to non-developers - either small business owners or business analysts at larger companies?

I can see lots of uses for Ragic, but I don't know any business analyst types who'll just knock out some Javascript code to do a function, when they're fairly happy to use Visual Basic for Applications.

Finally, your samples all seem relatively small, which is understandable, but you don't mention how large a data set you can cope with - a lot of Excel based apps now seem to have 100,000s of rows of data (which is why they end up so slow).

</comment><comment><USER11> It seems like this would be most useful for non-developers, but the use cases (I'm assuming that's what 'regic solutions' are), sit obscured at the bottom of the page.

Look at how Twilio markets their paas to non devs.

<comment><AUTHOR> Great suggestion. I think Twilio is a great role model for development tools. We'll try to learn a thing or two from it.

</comment></comment><comment><USER12> I think I don't want a registration process before trying the demo. That's the whole meaning of demo!!!

Not trying to take away anything from the app. It might be wonderful, I didn't try it because of the unnecessary registration.

</comment><comment><USER13> DabbleDB again. Don't break my heart.

<comment><USER14> Exactly. Before a company invests in moving all their processes into a system like this, there needs to be some kind of legal statement that says 'should we ever get acquired / close down, we'll release the code to paying customers'.

</comment></comment><comment><USER15> 1\. works like excel 2\. looks like excel 3\. has reports -> everything basic "business" data application needs

seems like you will swim in money in a few months if you reach the right target market...

</comment><comment><USER16> The app seems pretty slow, it cannot be perceptibly slower than Excel for this project to kick off. You can find lots of low hanging fruits by running the Chrome audits.

</comment><comment><USER17> I think you can also charge a lot more than you currently do

</comment><comment><USER18> I am unable to receive a demo key at email@example.com at this time. Please re- think your demo process.

</comment><comment><USER19> Google Fusion Table is very similar to this, however, their API documentation is not very good in my opinion. I think a product like this is very useful if you want to give a client access to their database in the form of a spreadsheet.

</comment><comment><USER20> Also see <http://ethercalc.com>

</comment><comment><USER21> Let me just compliment the design of your website, with design being not just the visuals, but the structure, presentation and the content as well. It is clean, simple (but not simplistic) and comes across as a frontend of a company with a substance. Not to technical, not too fluffy, good balance. I would however expand the About section to add some specifics - where and whos.

</comment><comment><USER22> The speaker in the intro video doesn't seem to be a native english speaker.

There are some grammar mistakes and you can hear mouse clicking when he switches slides.

The information is there, but I think it needs a bit more polish in terms of phrasing ("Special need is nothing special.") and a proper speaker.

</comment><comment> clark-kent It would be great if the software was open source, you can also still run a SAAS based on it. I wouldn't want to depend on a closed source Database for my data. And I say this because I like the Excel/Database hyrid idea.

</comment><comment><USER17> you should hire a native english speaker to write your marketing copy

<comment><AUTHOR> We hired a native English speaker to edit most of our copies.

<comment><USER17> Then you should not hire them again! The quality is very poor. There are many grammatical mistakes and the style is quite clunky. It makes your company seem a lot less professional.</comment></comment></comment>


Pattern-defeating quicksort - <AUTHOR> https://github.com/orlp/pdqsort <comment><USER2> I think it's fair to say that pdqsort (pattern-defeating quicksort) is overall the best unstable sort and timsort is overall the best stable sort in 2017, at least if you're implementing one for a standard library.

The standard sort algorithm in Rust is timsort[1] (slice::sort), but soon we'll have pdqsort as well[2] (slice::sort_unstable), which shows great benchmark numbers.[3] Actually, I should mention that both implementations are not 100% equivalent to what is typically considered as timsort and pdqsort, but they're pretty close.

It is notable that Rust is the first programming language to adopt pdqsort, and I believe its adoption will only grow in the future.

Here's a fun fact: Typical quicksorts (and introsorts) in standard libraries spend most of the time doing literally nothing - just waiting for the next instruction because of failed branch prediction! If you manage to eliminate branch misprediction, you can easily make sorting twice as fast! At least that is the case if you're sorting items by an integer key, or a tuple of integers, or something primitive like that (i.e. when comparison is rather cheap).

Pdqsort efficiently eliminates branch mispredictions and brings some other improvements over introsort as well - for example, the complexity becomes O(nk) if the input array is of length n and consists of only k different values. Of course, worst-case complexity is always O(n log n).

Finally, last week I implemented parallel sorts for Rayon (Rust's data parallelism library) based on timsort and pdqsort[4].

Check out the links for more information and benchmarks. And before you start criticizing the benchmarks, please keep in mind that they're rather simplistic, so please take them with a grain of salt.

I'd be happy to elaborate further and answer any questions. :)

[1] [https://github.com/rust-lang/rust/pull/38192](https://github.com/rust- lang/rust/pull/38192)

[2] [https://github.com/rust-lang/rust/issues/40585](https://github.com/rust- lang/rust/issues/40585)

[3] [https://github.com/rust-lang/rust/pull/40601](https://github.com/rust- lang/rust/pull/40601)

[4] [https://github.com/nikomatsakis/rayon/pull/379](https://github.com/nikomatsakis/rayon/pull/379)

<comment><USER3> Comparing sorting algo's often says more about your benchmark than the algo's themselves. Random and pathological are obvious, but often your dealing with something in between. Radix vs n log n is another issue.

So, what where your benchmarks like?

<comment><USER2> That is true - the benchmarks mostly focus on random cases, although there are a few benchmarks with "mostly sorted" arrays (sorted arrays with sqrt(n) random swaps).

If the input array consists of several concatenated ascending or descending sequences, then timsort is the best. After all, timsort was specifically designed to take advantage of that particular case. Pdqsort performs respectably, too, and if you have more than a dozen of these sequences or if the sequences are interspersed, then it starts winning over timsort.

Anyways, both pdqsort and timsort perform well when the input is not quite random. In particular, pdqsort blows introsort (e.g. typical C++ std::sort implementations) out of the water when the input is not random[1]. It's pretty much a strict improvement over introsort. Likewise, timsort (at least the variant implemented in Rust's standard library) is pretty much a strict improvement over merge sort (e.g. typical C++ std::stable_sort implementations).

Regarding radix sort, pdqsort can't quite match its performance (it's O(n log n) after all), but can perform fairly respectably. E.g. ska_sort[2] (a famous radix sort implementation) and Rust's pdqsort perform equally well on my machine when sorting 10 million random 64-bit integers. However, on larger arrays radix sort starts winning easily, which shouldn't be surprising.

I'm aware that benchmarks are tricky to get right, can be biased, and are always controversial. If you have any further questions, feel free to ask.

[1]: [https://github.com/orlp/pdqsort](https://github.com/orlp/pdqsort)

[2]: [https://github.com/skarupke/ska_sort](https://github.com/skarupke/ska_sort)

<comment><USER4> There's lots of pathologies to watch out for... Imagine sorting 10 million random ints, where 1% of them are random 64-bit values and 99% are in the range [0..9]. Might be extra fun in parallel.

</comment></comment></comment></comment><comment><USER5> Rust's stable sort is based on timsort ([https://doc.rust- lang.org/std/vec/struct.Vec.html#method.sor...](https://doc.rust- lang.org/std/vec/struct.Vec.html#method.sort)) and unstable sort is based on pattern-defeating quicksort ([https://doc.rust- lang.org/std/vec/struct.Vec.html#method.sor...](https://doc.rust- lang.org/std/vec/struct.Vec.html#method.sort_unstable)). The documentation says that 'It [unstable sorting] is generally faster than stable sorting, except in a few special cases, e.g. when the slice consists of several concatenated sorted sequences.'

<comment><USER6> I like merge sort. Average time may be worse, but it's upper bound is better and it is conceptually cleaner and easier to understand (IMO).

<comment><USER7> Just that it takes extra space and that's sometimes a constraint.

<comment><USER8> [https://stackoverflow.com/questions/2571049/how-to-sort- in-p...](https://stackoverflow.com/questions/2571049/how-to-sort-in-place- using-the-merge-sort-algorithm)

In place merge sort exists. It's hard to write tho

<comment><USER7> Which decreases the space complexity but increases the time complexity.

<comment><USER2> No, the time complexity is the same: O(n log n). The author of the top answer links to his book, where you can find a proof of time complexity:

[https://sites.google.com/site/algoxy/home/elementary- algorit...](https://sites.google.com/site/algoxy/home/elementary- algorithms.pdf)

<comment><USER9> ...but it increases run time. It's fine not to care on hidden constants while analyzing algorithms, but not while using them in real life

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> I would love to see the benchmark results against Timsort, the Python sorting algorithm that also implements a bunch of pragmatic heuristics for pattern sorting. Timsort has a slight advantage over pdqsort in that Timsort is stable, whereas pdqsort is not.

I see that timsort.h is in the benchmark directory, so it seems odd to me that the README doesn't mention the benchmark results.

<comment><USER11> There are multiple reasons I don't include Timsort in my README benchmark graph:

1\. There is no authoritative implementation of Timsort in C++. In the bench directory I included [https://github.com/gfx/cpp- TimSort](https://github.com/gfx/cpp-TimSort), but I don't know the quality of that implementation.

2\. pdqsort intends to be the algorithm of choice of a system unstable sort. In other words, a direct replacement for introsort for std::sort. So std::sort is my main comparison vehicle, and anything else is more or less a distraction. The only reason I included std::stable_sort in the benchmark is to show that unstable sorting is an advantage for speed for those unaware.

But, since you're curious, here's the benchmark result with Timsort included on my machine: [http://i.imgur.com/tSdS3Y0.png](http://i.imgur.com/tSdS3Y0.png)

This is for sorting integers however, I expect Timsort to become substantially better as the cost of a comparison increases.

</comment></comment><comment><USER12> I always wondered if there would be a way to have quicksort run slower than O(n ln(n)).

Due to that possibility, when I code up a sort routine, I use heap sort. It is guaranteed O(n ln(n)) worst case and achieves the Gleason bound for sorting by comparing keys which means that on average and worst case, on the number of key comparisons, it is impossible to do better than heap sort's O(n ln(n)) forever.

For a stable sort, sure, just extend the sort keys with a sequence number, do the sort, and remove the key extensions.

Quicksort has good main memory locality of reference and a possibility of some use of multiple threads, and heap sort seems to have neither. But there is a version of heap sort modified for doing better on locality of reference when the array being sorted is really large.

But, if are not too concerned about memory space, then don't have to care about the sort routine being _in place_. In that case, get O(n ln(n)), a stable sort, no problems with locality of reference, and ability to sort huge arrays with just the old merge sort.

I long suspected that much of the interest in in-place, O(n ln(n)), stable sorting was due to some unspoken but strong goal of finding some fundamental _conservation law_ of a trade off of processor time and memory space. Well, that didn't really happen. But heap sort is darned clever; I like it.

<comment> torrent-of-ions It's cool to play with a pack of cards and run sorting algorithms on them. To see the worst case of quicksort, use the first element as the pivot and give it an already sorted list. It will take quadratic time to give back the same list.

<comment><USER12> Right. So, for the first "pivot" value, people commonly use the median of three -- take three keys and use as the pivot the median of those three, that is, the middle value. Okay. But then the question remains: While in practice the median of three sounds better, maybe there is a goofy, pathological array of keys that still makes quicksort run in quadratic time. Indeed, maybe for any way of selecting the first pivot, there is an array that makes quicksort quadratic.

Rather than think about that, I noticed that heap sort meets the Gleason bound which means that heap sort's O(n ln)n)) performance both worst case and average case can never be beaten by a sort routine that depends on comparing keys two at a time.

Then, sure, can beat O(n ln(n)). How? Use radix sort -- that was how the old punched card sorting machines worked. So, for an array of length n and a key of length k, the thing always runs in O(nk) which for sufficiently large n is less than O(n ln(n)). In practice? Nope: I don't use radix sort!

</comment></comment></comment><comment><USER13> Just because I was confused: this is by Orson Peters who first invented pdq. It's not brand new (as in yesterday), but is a very, very recent innovation (2016).

</comment><comment><USER14> Question as a non low-level developer, and please forgive my ignorance:

How is it that we're essentially 50 years in to writing sorting algorithms, and we still find improvements? Shouldn't sorting items be a "solved" problem by now?

<comment><USER2> Basically all comparison-based sort algorithms we use today stem from two basic algorithms: mergesort (stable sort, from 1945) and quicksort (unstable sort, from 1959).

Mergesort was improved by Tim Peters in 2002 and that became timsort. He invented a way to take advantage of pre-sorted intervals in arrays to speed up sorting. It's basically an additional layer over mergesort with a few other low-level tricks to minimize the amount memcpying.

Quicksort was improved by David Musser in 1997 when he developed introsort. He set a strict worst-case bound of O(n log n) on the algorithm, as well as improved the pivot selection strategy. And people are inventing new ways of pivot selection all the time. E.g. Andrei Alexandrescu has published a new method in 2017[1].

In 2016 Edelkamp and Weiß found a way to eliminate branch mispredictions during the partitioning phase in quicksort/introsort. This is a vast improvement. The same year Orson Peters adopted this technique and developed pattern-defeating quicksort. He also figured out multiple ways to take advantage of partially sorted arrays.

Sorting is a mostly "solved" problem in theory, but as new hardware emerges different aspects of implementations become more or less important (cache, memory, branch prediction) and then we figure out new tricks to take advantage of modern hardware. And finally, multicore became a thing fairly recently so there's a push to explore sorting in yet another direction...

[1] [http://erdani.com/research/sea2017.pdf](http://erdani.com/research/sea2017.pdf)

<comment><USER15> It's always good to remember that while Big-O is useful, it isn't the be-all end-all. The canonical example on modern hardware is a linked list. In theory it has many great properties. In reality chasing pointers can be death due to cache misses.

Often a linear search of a "dumb" array can be the fastest way to accomplish something because it is very amenable to pre-fetching (it is obvious to the pre-fetcher what address will be needed next). Even a large array may fit entirely in L2 or L3. For small data structures arrays are almost always a win; in some cases even hashing is slower than a brute-force search of an array! __

A good middle ground can be a binary tree with a bit less than an L1 's worth of entries in an array stored at each node. The binary tree lets you skip around the array quickly while the CPU can zip through the elements at each node.

 __It is more important than ever to test your assumptions. Once you 've done the Big-O analysis to eliminate exponential algorithms and other basic optimizations you need to analyze the actual on-chip performance, including cache behavior and branch prediction.

<comment><USER16> > It's always good to remember that while Big-O is useful, it isn't the be-all > end-all. The canonical example on modern hardware is a linked list. In > theory it has many great properties. In reality chasing pointers can be > death due to cache misses.

My favorite example is adding and ordered list of items into a a simple tree, all you've really done is created a linked list. Big-O doesn't know what your data looks like but you generally should.

<comment><USER17> Simple binary tree is O(n^2) just like a linked list.

Unless you know what you know your distributions and are generally proficient in probability theory (in 99% of the cases, neither can be relied on) the only relevant big-O metric is the worst case one

</comment></comment></comment></comment></comment><comment><USER18> [Post-edit] I made several edits to the post below. First, to make an argument. Second, to add paragraphs. [/Post-edit]

Tl;dr version: It seems to me you should either use heapsort or plain quicksort; the latter with the sort of optimisations described in the linked article, but not including the fallback to heapsort.

Long version:

Here's my reasoning for the above:

You're either working with lists that are reasonably likely to trigger the worst case of randomised quicksort, or you're not working with such lists. By likely, I mean the probability is not extremely small.

Consider the case when the worst case is very unlikely: you're so unlikely to have a worst case that you're gaining almost nothing for accounting for it except extra complexity. So you might as well only use quicksort with optimisations that are likely to actually help.

Next is the case that a worst case might actually happen. Again, this is not by chance; it has to be because someone can predict your "random" pivot and screw with your algorithm; in that case, I propose just using heapsort. Why? This might be long, so I apologise. It's because usually when you design something, you design it to a high tolerance; a high tolerance in this case ought to be the worst case of your sorting algorithm. In which case, when designing and testing your system, you'll have to do extra work to tease out the worst case. To avoid doing that, you might as well use an algorithm that takes the same amount of time every time, which I think means heapsort.

<comment><USER11> The overhead of including the fallback to heapsort takes a negligible, non- measurable amount of processing time that guarantees a worst case runtime of O(n log n), and to be more precise, a worst case that is 2 - 4 times as slow as the best case.

Your logic also would mean that any sorting function that is publicly facing (which is basically any interface on the internet, like a sorted list of Facebook friends) would need to use heapsort (which is 2-4 times as slow), as otherwise DoS attacks are simply done by constructing worst case inputs.

There are no real disadvantages to the hybrid approach.

<comment><USER18> Thanks for your reply.

> Your logic also would mean that any sorting function that is publicly facing > (which is basically any interface on the internet, like a sorted list of > Facebook friends) would need to use heapsort (which is 2-4 times as slow), > as otherwise DoS attacks are simply done by constructing worst case inputs.

Why is that a wrong conclusion? It might be, I'm not a dev. But if I found myself caring about that sort of minutiae, I would reach exactly that conclusion.

Reasons:

* the paranoid possibility that enough users can trigger enough DoS attacks that your system can fall over. If this is likely enough, maybe you should design for the 2-4x worst case, and make your testing and provisioning of resources easier.

* a desire for simplicity when predicting performance, which you're losing by going your route because you're adding the possibility of a 2-4x performance drop depending on the content of the list. Ideally, you want the performance to solely be a function of n, where n is the size of your list; not n and the time-varying distribution of evilness over your users.

Finally, adding a fallback doesn't seem free to me, because it might fool you into not addressing the points I just made. That O(n^2) for Quicksort might be a good way to get people to think; your O(n log n) is hiding factors which don't just depend on n.

<comment><USER19> I'm sympathetic because it may not be clear:

pdqsort is a hybrid sort; when it encounters apparently pathological input, it switches from a strategy resembling quicksort to heapsort—it doesn't share quicksort's worst case characteristics.

Your thesis is wrong:

> you might as well use an algorithm that takes the same amount of time every > time, which I think means heapsort

Heapsort has a variable runtime. It will selectively reheap. Whether this happens is dependent on the state of the heap and your next element, which means the total number of times you reheap will vary with input.

<comment><USER18> > pdqsort is a hybrid sort; when it encounters apparently pathological input, > it switches from a strategy resembling quicksort to heapsort—it doesn't > share quicksort's worst case characteristics.

I understand how hybrid sorts work. I thought that would be clear enough. I guess when you're a stranger on the internet, people don't automatically trust you to know what you're talking about. I imagine this is even truer when you say something counterintuitive or controversial. In spite of learning that, I'm responding chiefly because of that quote.

> Your thesis is wrong: > > Heapsort has a variable runtime

Let's not get hung up on heapsort. My thesis is if you have an algorithm with a gap between the worst case and average case, then you shouldn't use it on the web. That gap might _not_ manifest as gap in the big O -- it could be 4x slower in the worst case than the average case, and that would still be bad.

To see why, try imagining this world of pure evil:

You create a website that uses _gap_ sort. Gapsort is an algorithm that is 4x slower in the worst case than it is in the average case, for a fixed value of n (the size of the input). On top of that, triggering the worst case by accident is hard. You deploy your site for several months, buy servers, and get a userbase. In your performance testing, you only encountered the average case, so you only provisioned hardware for the average case. Now imagine that suddenly all your users turn evil, and start triggering the worst case; this leads to a sudden 4x performance drop. You may have underprovisioned for this.

So my thesis is it _looks like_ having differences from the worst case and average case is great, on average. But in a hostile world, that actually makes things more complicated. When doing empirical performance testing, you'll test for the average. _Moreover_ the gap can be just 4x; _this will not manifest as a difference between the big Os of the worst and average cases_ (as I've said previously).

Changing from quicksort to heapsort on some inputs may manifest as a performance gap between the QS case and fallback case. Maybe that's not such a good idea. In fact, maybe you shouldn't use any quicksort variant, even introsort, in a potentially hostile environment, _because of the unavoidable average-to-worst-case gap_. In introsort, that gap is merely a different coefficient, but it's still a gap.

I hope that wasn't too repetitive.

[edit] I deleted and reposted this because the edits weren't being applied.

[edit] Done it twice now.

<comment><USER20> I hear what you're saying, but it seems like this is potentially a problem only in cases where you are devoting significant resources to sorting. Like if sorting takes only 1% of your CPU time, worst-case input will only bump that to 4% - and that's only if every user starts hitting you with worst-case requests. Even if you spend more, it's a question of how much work can the malicious users cause you to do.

</comment></comment></comment></comment></comment></comment><comment><USER21> Has HN ever discussed the possibilities when purposely crafting worst-case input to amplify a denial-of-service attack?

<comment><USER22> If whoever you're targeting uses libc++, I already did the analysis: [https://bugs.llvm.org/show_bug.cgi?id=20837](https://bugs.llvm.org/show_bug.cgi?id=20837)

To my knowledge it's still not fixed.

</comment></comment><comment><USER23> This book is one of the most general treatments of parameterized Quicksort available: [http://wild-inter.net/publications/wild-2016.pdf](http://wild- inter.net/publications/wild-2016.pdf)

</comment><comment><USER17> Anyone knows how this compares to Timsort in practice?

A quick google turns out nothing

<comment><USER24> [https://github.com/rust-lang/rust/pull/40601](https://github.com/rust- lang/rust/pull/40601)

"stable" is a simplified Timsort: [https://github.com/rust- lang/rust/pull/38192](https://github.com/rust-lang/rust/pull/38192)

"unstable" is a pdqsort

<comment><USER25> To summarize:

If comparison is cheap (e.g. when sorting integers), pdqsort wins because it copies less data around and the instructions are less data-dependency-heavy.

If comparison is expensive (e.g. when sorting strings), timsort is usually a tiny bit faster (around 5% or less) because it performs a slightly smaller total number of comparisons.

</comment></comment></comment><comment><USER26> Where is a high level description of the algorithm? How is it different from quick sort, it seems quite similar based on a quick observation of the code.

<comment><USER27> The readme file actually contains a fairly thorough description of how it differs from quicksort. Start with the section titled "the best case".

<comment><USER26> > On average case data where no patterns are detected pdqsort is effectively a > quicksort that uses median-of-3 pivot selection

So basically is quicksort with a bit more clever pivot selection, but only for some cases.

<comment><USER2> You're forgetting probably the most important optimization: block partitioning. This one alone makes it almost 2x faster (on random arrays) than typical introsort when sorting items by an integer key.

</comment></comment></comment></comment><comment><USER28> Is there a analysis of its complexity ? The algorithm looks very nice !

<comment><USER22> Hey, author of pdqsort here, the draft paper contains complexity proofs of the O(n log n) worst case and O(nk) best case with k distinct keys: [https://drive.google.com/open?id=0B1-vl- dPgKm_T0Fxeno1a0lGT0...](https://drive.google.com/open?id=0B1-vl- dPgKm_T0Fxeno1a0lGT0E)

<comment><USER29> Best case? Give worst and average case when describing complexities.

<comment><USER22> I already did, you may want to re-read my comment.

<comment><USER29> Am I misinterpreting your usage of "best case"?

<comment><USER22> Without enlightening me on what your interpretation is, I have no way of telling.

pdqsort has a worst case of O(n log n). That means, no matter what, the algorithm never takes more than a constant factor times n log n time to complete.

Since pdqsort is strictly a comparison sort, and comparison sorts can do no better than O(n log n) in the average case, pdqsort is asymptotically optimal in the average case (because the average case can never be worse than the worst case).

On top of the above guarantees, if your input contains only k distinct keys, then pdqsort has a worst case complexity of O(nk). So when k gets small (say, 1-5 distinct elements), pdqsort approaches linear time. That is pdqsort's best case.

</comment></comment></comment></comment></comment></comment><comment><USER30> it's interesting that .Net built-in quicksort is actually doing the same thing, with introsort behind the scenes.

</comment><comment> torrent-of-ions I can see why one might blindly call qsort on already sorted data (when using user input), but why sorted data with one out of place element? Presumably that element has been appended to a sorted array, so you would place it properly in linear time using insertion and not call a sort function at all. Why does such a pattern arise in practice?

<comment><USER22> You would be surprised how often people just use a (repeatedly) sorted vector in spite of a proper data structure or proper insertion calls. It's a lot simpler to just append and sort again. Or the appending happens somewhere else in the code entirely.

As a real-world example, consider a sprite list in a game engine. Yes, you could keep it properly sorted as you add/remove sprites, but it's a lot simpler to just append/delete sprites throughout the code, and just sort it a single time each frame, even if it only adds a single sprite.

So yes, technically this pattern is not needed if everyone always recognized and used the optimal data structure and algorithm at the right time. But that doesn't happen, and it isn't always the simplest solution for the programmer.</comment></comment>