Copyright Office Ruling Imposes Sweeping Right to Repair Reforms - <AUTHOR> https://ifixit.org/blog/11951/1201-copyright-final-rule/ <comment><USER3> As an automotive mechanic, this is awesome. You have no idea how many sensors/controllers in a car can only be reset by violating the DRM.

Example: the suspension control computer for newer fords (so far just raptor and newer commercial F series) is separate from the ECU, and if it faults out you need to buy a new $2500 computer and sensor pack. You can, however, replace a commonly blown diode or fuse on the computer but opening the case causes the device to stay "in fault/service"

With a raspberry pi and a bit of python however you can reset this tamper code once the whole assembly is closed. but since it "violates the DRM" most shops generally just bill for the part and labor.

<comment><USER4> > With a raspberry pi and a bit of python however you can reset this tamper > code once the whole assembly is closed.

This sentence is interesting to me. It tells me that now mechanics need to learn programming skills to be successful. Software really is eating the world...

<comment><USER5> I'm convinced most successful mechanics could be successful programmers. The skill set of looking at a problem and debugging until you really understand the architecture and design of what you're looking at is very similar in both fields.

<comment><USER6> I'm convinced most successful programmers can be successful mechanics for the same reason!

Most programmers I know tend to be handy in some way, whether that's fixing their own cars (myself), wood working, or some other skill which requires them to think through problems and work with their hands.

I actually view fixing cars as not only a hobby of mine, but as a fall back career should I ever become bored of software or need some quick cash.

<comment><USER7> That's what I thought, and then I fragged a Ferrari engine. Dunning-Kruger is not a river in Egypt...

<comment><USER8> Had to look this up. Denial, is a river in egypt. But thats just a meaningless pun. The Nile is a river in egypt. What do you mean by your saying?

<comment><USER9> I think it's just supposed to carry the same meaning as "Denial is not a river in Egypt," which is: hey, denial is a real thing, and you're facing it right now.

I'm not the OP but I hope that helps.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> Great decision, though it'd be better if it was embedded into law and couldn't go away down the line. At the least DRM and legal protection should be either/or, like secrets vs patents. Part of the return the public is supposed to see for granting legal protection to IP is that the IP is then made widely available (as well as eventually entering the public domain) and can be built upon for personal use, commentated upon, etc. If somebody wants to just try to keep something secret or protect it with technology maybe that's fine to try to do indefinitely, but they shouldn't be able to do that and then _also_ get the full benefit of IP law that was originally created around non-technically restricted information.

This is also a good starting balance in that legal subsidies are removed but it doesn't require manufacturers to nerf their tech either, which is an area that needs to be navigated very carefully in law given the security implications and the risks of unintended consequences. I still wish "right to repair" was "right to have work" but this seems like an unalloyed Good Thing regardless. Maybe it can catalyze a bit of renewed fight against the worse parts of the DMCA and the like.

<comment><USER11> > though it'd be better if it was embedded into law and couldn't go away down > the line

I'd go further and say that there's nothing of any significance in this decision since it will likely go away down the line since it was not codified in law.

<comment><USER10> > _I 'd go further and say that there's nothing of any significance in this > decision since it will likely go away down the line since it was not > codified in law._

I don't believe you're correct here. If down the road the LoC and USCO did not continue this exemption, it still would have applied for the whole intervening time and anybody who took advantage of it during that time would be in the clear. At a bare minimum this is a specific material benefit to many people, and any knowledge, tooling and techniques developed to aid that during that time would still be valuable. That's not insignificant.

More long term, ultimately this is politics and that can definitely be influenced by "temporary" measures which later become permanent. In general in politics it's much harder to take away something specific granted to people who gain a concentrated benefit from it then it is to not offer it in the first place. Before having it people may not be able to visualize a future benefit, but after getting used to it they'll resent having it removed if it was at all useful. Constituencies develop. So if for 3+ years some people were more easily and cheaply able to get something dealt with or saw more competition for it and in turn better quality/reliability/price, and then all of a sudden one day they walk in and get told "well the politicians just rescinded this so suddenly you can't but only because they said so" well that tends not to go over so well. Particularly if it seems like "common sense" and there is no harm any general member of the public can see from it either. Appeals to distant corporate profits tend to be curiously unmoving...

</comment></comment></comment><comment><USER12> It doesn't mention it in this article but this could also have a profound effect on John Deere and allowing farmers to fix their own hardware.

[https://motherboard.vice.com/en_us/article/xykkkd/why- americ...](https://motherboard.vice.com/en_us/article/xykkkd/why-american- farmers-are-hacking-their-tractors-with-ukrainian-firmware)

[https://hackaday.com/2018/02/11/will-john-deere-finally- get-...](https://hackaday.com/2018/02/11/will-john-deere-finally-get-their- dmca-comeuppance/)

<comment><USER13> I'm terrified. I saw John Deere code, and its tortuous. Nobody should try to fool with it without serious study.

<comment><USER14> "If it's not broken, don't touch it"

For the longest time Zara used an MS-DOS based POS system, and hey, it worked.

<comment><USER15> Is POS point of service/sale or piece of <expletive>?

<comment> yjftsjthsd-h The former is a strict subset of the latter.

</comment></comment></comment></comment></comment><comment><USER16> This is nice, but it isn't as nice as it should be. This is a section 1201 exemption[1] which is where the Library of Congress decides there needs to be an exemption to the law and puts it into place for a period of 12 months. Every year they review these exemptions and they often fall off. If you go to the link below and replace 2018 with 2008 - 2017 you can see exemptions for the last 10 years that have been added and removed. If it isn't on the list in the following year, it is no longer an exemption.

What we need is Congress to update copyright law to make these exemptions permanent.

[1] [https://www.copyright.gov/1201/2018/](https://www.copyright.gov/1201/2018/)

<comment><USER17> Exemptions last for three years I believe (your link doesn't work for the other years, BTW), and the law has recently been changed to make them more permanent, requiring significant change in order to prevent automatic renewal.

<comment><USER16> That is awesome, I didn't know they had upgraded the exceptions to 3 years.

For folks who want to look at previous exemptions

2015 - [https://www.copyright.gov/1201/2015/](https://www.copyright.gov/1201/2015/)

2012 - [https://www.copyright.gov/1201/2012/](https://www.copyright.gov/1201/2012/)

2010 - [https://www.copyright.gov/1201/2010/](https://www.copyright.gov/1201/2010/)

2008 - [https://www.copyright.gov/1201/2008/](https://www.copyright.gov/1201/2008/)

2006 - [https://www.copyright.gov/1201/2006/](https://www.copyright.gov/1201/2006/)

2003 - [https://www.copyright.gov/1201/2003/](https://www.copyright.gov/1201/2003/)

2000 - [https://www.copyright.gov/1201/2000/](https://www.copyright.gov/1201/2000/)

</comment></comment></comment><comment><USER18> This sounds like a niche for a small Pacific island. Islands like Jersey and the Cook Islands tailor their legal systems to cater for those who want a looser financial system. A small state could tailor their laws for those who want to repair things and potentially make a very nice "high tech" economy out of reverse engineering, importing broken stuff and exporting fixed stuff. Copyright holders might try and block an import, but they would be fighting a harder battle against "parallel import" laws.

\--

Edit: And they could set up a network of embassies around the world, with integrated repair shops. Instead of visiting the Kiribati embassy to get a visa, you might visit to get your device fixed.

<comment><USER19> Apple already has some sort of sweetheart deal with US Customs that gets Apple parts shipped from China rejected at import time unless they're part of an Apple-tracked shipment. This blocks devices have been third-party-repaired in China from being re-imported; but also blocks "ghost-shift" (but otherwise first-party!) Apple parts from coming into the country. Literally, anything that _looks_ like an Apple part, but isn't an Apple part _according to Apple_ , gets blocked. Think about the implications of that.

If you can't even import a real part into the US from the _very same Chinese factory that the "officially-supplied" parts would be shipped from_, then I doubt you'll be able to import those parts from the Cook Islands.

<comment><USER20> > "Literally, anything that looks like an Apple part, but isn't an Apple part > according to Apple, gets blocked. Think about the implications of that."

The implication is that we are correctly enforcing trademark law... Or are you saying that anyone should be allowed to import anything with anyone's brand on it? Because congratulations, you have now destroyed the value and purpose of every single trademark.

Remember, the issue was NOT that they "looked like" Apple parts, the issue was that the parts had an actual Apple logo printed on them when they were not parts sourced through Apple.

This is just the stupidest issue. All Louis Rossmann had to do is purchase his non-genuine third party laptop batteries without an Apple logo printed on them, and he would have been legally entitled to them. He could have his batteries, he could perform the repairs, everyone would be happy.

With his complaint he is effectively saying is that trademarks mean shit and anyone can use anyone else's brand whenever they want. It's absurd. And it's a loser case. If he tries to fight Apple, he won't win.

<comment><USER21> To my knowledge they had Apple logos because they were Apple products.

Maybe there's more to it but that's what I understood so far.

Removing the Apple logo from Apple products in order to ship them to the states so they can be used to fix Apple products seems unnecessary.

<comment><USER20> > "Removing the Apple logo from Apple products in order to ship them to the > states so they can be used to fix Apple products seems unnecessary."

Putting an Apple logo on something that is not an Apple product seems unnecessary.

These parts are not Apple products. In order for a product to be an Apple product, it has to have been sold by, through or under license from Apple at some point in its life.

These were not, which makes them counterfeit by definition. They might be perfectly identical to the real thing, they might be slightly inferior, or they might be dangerous junk. You don't know.

<comment><USER22> Wasn't the whole point of the Louis Rossmann imports and similar stories with LCD screens a few months back that these were in fact refurbished Apple products? From what I've read they had the Apple logo on a connector or something because that part of the product was original. In the car analogy, if I repair my car by replacing or refurbishing a broken part and clearly stating that fact when I resell it, would that make it a counterfeit car?

</comment></comment></comment></comment></comment></comment><comment><USER23> > Specifically, it allows breaking digital rights management (DRM) and > embedded software locks for "the maintenance of a device or system … in > order to make it work in accordance with its original specifications" or for > "the repair of a device or system … to a state of working in accordance with > its original specifications."

It would be interesting to know what "original specifications" means. How deep do these original specifications have to be adhered to? I'm sure DRM could be argued to be part of the spec at some level. I don't think this is quite the win Free Software Folks are looking for.

</comment><comment><USER24> This is great! The push by large companies to replace personal asset ownership with perpetual rent is worth fighting against.

<comment><USER25> On that note, I wonder if the law will ever view misprepresenting the ownership of a device as fraudulent business practice.

Suppose some hardware is sold to you, in the ancient ownership sense[1]. Then some time later, the maker decides that you must use only authorized parts, or they will not continue to provide a cloud service for it, or that it's just plain EOL. Then, you never really owned it - you were renting it. So was that original purchase actually a lease, but misrepresented?

1\. [https://en.wikipedia.org/wiki/Code_of_Hammurabi](https://en.wikipedia.org/wiki/Code_of_Hammurabi)

<comment><USER26> This is not just with hardware. It annoys me no end that there's a big "BUY NOW" button on Amazon when you're looking at an ebook, but with their digital restrictions management, you are really only leasing the ebook.

<comment><USER27> Could you get a class-action lawsuit together from everyone who's "bought" a digital book, and sue them for false advertisement?

</comment></comment></comment></comment><comment><USER28> I'm so grateful to EFF and the iRepair folks and everyone else who is out there "fighting the good fight" on behalf of us regular end-users! Great news!

<comment><AUTHOR> Links to two of the main organizations involved in case anyone wants to donate:

[https://repair.org](https://repair.org)

[https://www.eff.org](https://www.eff.org)

</comment></comment><comment><USER29> For all the times the government does stupid things and we complain about it, this is a step in the correct direction.

I hope that at some point, this exemption will be written into law, and not just an exemption by the LoC. OTOH, if you think of this as the government being able to attempt this as a 'Free Trial' for 3 years, we can show them that this exemption does not have oodles of unintended side effects.

Edit: substantially clarify.

<comment><USER30> Under common law, case law is the largest part of the law. Codified law is only a small part

</comment></comment><comment><USER31> Based on "the maintenance of a device or system … in order to make it work in accordance with its original specifications" can I or can I not legally unlock a device to use a different OS/apps on it?

<comment><USER32> I don't think so, FTA: _" "I read it as the ability to reset to factory settings," Nathan Proctor, head of consumer rights group US PIRG's right to repair efforts, told me in an email._

Although you could make an argument that the device never performed according to its specifications and your unlocking the device is merely an attempt to repair a fundamentally broken product, but that seems like it'd be a hard sell.

<comment><USER33> Yeah, sounds very narrow. Basically you can take things apart for repair, but not to turn them into something else, or modify them for interoperability.

But it does create a gray market for the information obtained by people who legally break DRM for "repair and maintenance." Information set free can be used for anything, wink wink.

<comment><USER34> Could interoperability be argued to be returning them to their original specifications in some cases?

E.g. the product could interact with most computers when it came out, but since then a competitor has come onto the scene and the manufacturer hasn't implemented features to make it work with them. Therefore, jailbreaking and making it work with them would sort of be returning to what the situation was when you first purchased.

<comment><USER35> 17 U.S. Code § 1201 (f) already seems to provide some protection for reverse- engineering (including the circumvention of "technical measures") if it's done for the purpose of making a program interoperable with other programs.

</comment></comment></comment></comment></comment><comment><USER36> I was curious about one of the exceptions that he mentioned:

> _Our game console repair petition was denied, meaning repairs of PS4 and > Xbox One systems are going to stay expensive._

Wonder why game systems were excluded? They're basically computers too.

<comment><USER37> Likely related to the third point in that list.

>An exemption request by Bunnie Huang and EFF to bypass HDCP ... was denied.

Both of these are too close to real money that it would be hard to get exemptions. All the conventional blu ray (i.e., not 4K) DRM stuff and HDCP has been broken for a while. If you can replace the optical drives in game consoles legally, you can circumvent DRM too. There are/were non compliant dvd and blu ray players that don't give a shit about DRM or geo blocking (region locked media).

</comment></comment><comment><USER38> This isn't enough.

Make it illegal to put DRM on hardware for anti-competitive purposes.

<comment><USER32> > _Make it illegal to put DRM on hardware for anti-competitive purposes._

Can anyone give an example of DRM that isn't anti-competitive?

<comment><USER39> The Content Scramble System on DVD's isn't anti-competitive, since all players can obtain a license for it, it's just anti-consumer.

The example I'd like to see is of a single work that wasn't pirated due to DRM. DRM is hidden behind this wall of lies where ostensibly it's about piracy but in reality it is not. The true purpose is to control legal playback behavior, like how all legitimate hardware DVD players respect the flag that marks ads as unskippable because that's a requirement to obtain a DVD-CSS license, even though that DRM was already cracked in the 90's.

<comment><USER40> Without trying to be picky, I would say that copying is not consuming. So DRM is not anti-consumer, but anti-freedom.

The way words are thrown around theses days is kind of orwellian, and this has gotten into everyday's vocabulary. Part of this issue is philosophic in nature, and the absence of a proper public discussion is conditioning the way we speak in a perverse way.

Consuming requires the exhaustion of the good being consumed: food is eaten, and consumed; clothing is worn, and consumed. This does not apply to data, and to culture in general.

We consume tickets for the right to watch movies in a theater, or visiting a gallery. But we do not consume the movies or the art exhibition.

We could argue whether the limitation of freedom is justified in a given situation, and that is a whole different and interesting discussion, but confusing concepts has led to the generalized (and wrong) conclusion that scarcity pertains to any good we buy, in particular those of cultural nature.

<comment><USER39> Today the word consumer is basically a stand-in for citizen, which is really what I meant. There's a whole podcast episode dedicated to this peculiar change: [https://www.ridiculoushistoryshow.com/podcasts/rhs- citizens-...](https://www.ridiculoushistoryshow.com/podcasts/rhs-citizens-vs- consumers.htm)

</comment></comment></comment></comment></comment><comment><USER41> >"I read it as the ability to reset to factory settings,"

OK so what if the factory default is "does not work" and it requires an authenticated command to put it in the non-default mode of "working"?

I do not put it past any manufacturer to work around such a ruling, not least of all Apple whose entire history has been: we do not sell hardware, we sell experiences. And they have always insisted they have the exclusive right to repair (or not, and you just have to buy a new one, but here's a $10 credit toward a new purchase, thanks).

</comment><comment><USER42> I think it's sad that people have to go beg some "copyright office" for permission to do this in the first place.

</comment><comment><USER43> This is obviously applicable only in the US jurisdiction, but do any IP experts know how similar or different the self-repair situation is in the EU?

Am just interested if this may have the momentum to become a somewhat global "norm"

</comment><comment><USER44> Would this apply to say, a third-party bought Cisco device? For those who don't know, Cisco devices have software that is non-transferable, despite being required to use the hardware, which can be freely sold. So technically if you sell a Cisco device to someone else, it can no longer be legally used because the software on it is pirated.

Wouldn't this exemption arguably guarantee your ability to use the hardware you own in accordance with its original specifications, provided you can acquire the software somewhere?

<comment><USER45> Interesting. It seems like Cisco's attempt to make their firmware non- transferable is not enforceable because it's in conflict with first sale doctrine, which is part of the copyright act of 1976:

[https://en.wikipedia.org/wiki/First- sale_doctrine](https://en.wikipedia.org/wiki/First-sale_doctrine)

<comment><USER44> I read it as an attempt at a workaround for first sale. That they can't stop you from selling the hardware, but can prevent you from selling the license. IANAL, if it's invalid, great.

AFAIK Cisco doesn't actually "enforce" this, so much as uses it to withhold providing updates. You need a support contract to download updates yourself, and while you can request an update be sent to you if there's a vulnerability you need to patch while not under a support contract, that is only applicable if your license is legitimate (i.e., that you are the original owner).

In practice, most old third party hardware just gets used for homelab purposes, since it's not "legitimate". Which, as a side perk, actually keeps the resale prices of old Cisco hardware super low, which is nice for people who want enterprise class hardware at home.

<comment><USER46> IMHO (not a lawyer), this is one of those things the companies put in a EULA that won't stand up in an actual court of law. It's basically bullying their own consumers. If pressed on it they would probably fold, but not before making you spend a ton of money on lawyers.

</comment></comment></comment></comment><comment><USER47> This isn't enough because DRM is actually winning and lots of devices are approaching "unjailbreakable."

<comment><USER48> Nah, have a look at what's happening with Apple II cracking. Now that people don't have to worry about going to jail over it, archivists (well, one archivist going by 4am) has automated it so that copies can be preserved for the future.

</comment></comment><comment> dis-sys I watched the following video last week and I was shocked. APPLE charges its customer up to almost $2k ($1200 for the motherboard and $780 for the screen) to repair something a small laptop repair shop did for free. What is more shocking is the fact that dozens of such cases happen everyday in that small laptop repair shop.

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

</comment><comment><USER49> That's a really great overview of the situation. I much preferred this to the Vice article that's also on the HN frontpage.

<comment><USER17> I think both posts have been merged?

</comment></comment><comment><USER50> You can legally bypass the DRM on a 3D printer to use generic filament from suppliers other than the printer's manufacturer. I'm not sure there are many manufacturers doing this anymore. The rise of cheap, open source 3D printer changed the market pretty drastically over the last few years.

</comment><comment><USER51> Anyone have any thoughts about now investing in the industries that this ruling has removed the chains off of? From the article, you got smartphone, home appliance, and home system repairs, and also repairs of motorized land vehicle software. Also, the market for repair tools.

</comment><comment><USER52> But these are just temporary exclusions that needs to be renewed every three years, right?

Can someone explain why three years? It feels like it is not even worth the risk of "breaking" the laws in 4 years not knowing if they're renewed or has been revoked.

<comment><USER53> They actually (mostly) fixed this recently (in no small part due to being beaten down pretty hard by iFixIt a few years ago filing a crazy number of new exemption requests ;P). Now existing exemptions have a streamlined renewal process where the opposition needs to demonstrate that there was an important shift in the underlying evidence during that time.

[https://clinic.cyber.harvard.edu/2017/10/25/update-on- the-20...](https://clinic.cyber.harvard.edu/2017/10/25/update-on- the-2018-triennial-1201-rule-making/)

[https://www.copyright.gov/1201/1201_streamlined_renewal_tran...](https://www.copyright.gov/1201/1201_streamlined_renewal_transcript.pdf)

</comment></comment><comment><USER54> As the owner of a very heavily modified muscle car, I wholeheartedly agree with this. Half the fun of a muscle car is modifying it. This was easy to do with the older ones, there's an entire industry catering to it.

With modern cars, manufacturers only make parts for them for 10 years or so. What are you going to do after that when the computer system in it fails? Aftermarket parts would be illegal, etc. The whole car just becomes trash.

<comment><USER55> > The whole car just becomes trash.

It's a fairly safe argument it was trash before it was purchased. Planned Obsolescence should be the last thing on a car manufacturer's mind. But they see the phone companies making disposable hardware and charging a thousand bucks every year for it, and their mouth drools with the prospect of those kinds of returns...

Vote with your dollars folks.

<comment><USER56> > Vote with your dollars folks.

Unfortunately the vast majority of people don't realize or care about this, but out of curiosity, do you know which manufacturers are less guilty of this?

</comment></comment></comment><comment><USER57> Does anyone know how this interacts with 17 U.S. Code § 117 - Limitations on exclusive rights: Computer programs

[https://www.law.cornell.edu/uscode/text/17/117](https://www.law.cornell.edu/uscode/text/17/117)

IANAL, but to me it would seem you're already allowed to copy and modify e.g. tractor firmware to make repairs, eh?

</comment><comment><USER58> Great, but DMCA 1201 should be repealed completely. Patching it with exceptions is just fixing the symptoms, not curing the disease.

<comment><USER27> Realistically, the whole DMCA needs to be repealed, not just one piece.

<comment><USER59> DMCA is also the source of Safe Harbor provisions, which are fairly important to anybody running a site for which users can post content.

</comment></comment></comment><comment><USER60> !YES!

Basically I've been doing those kinds of things my entire life. Good thing I'm not illegal.

It is just nice to have a little good news.

</comment><comment><USER61> This is one step in ending the hurtling of all of us into digital sharecropping. We need more steps taken.

</comment><comment><USER62> With this allow people to hack iPhones to disable "brick if 3rd party screen"?

<comment><USER63> This isn't a thing currently. (I run repair shops and the #1 thing we do is fix iPhone screens.) Independent, non-Apple-authorized repair shops do significant enough volume that Apple has been forced to fix anything that trended toward this.

Exception: The home button on iPhone 5s and above cannot be replaced by anyone except Apple. If third parties replace it, Touch ID won't work. On iPhone 7/8, the button won't work at all. However, it doesn't brick your phone.

<comment><USER64> Reason: this prevents someone from opening your phone and replacing the home button with the one that has been trained on someone else's fingers (or hacked to work with any fingerprint?) please correct me if this is wrong.

<comment><USER20> As an iPhone owner, I'm glad that this part has this restriction. I don't mind paying a little bit more for repairing parts that are integral to the security of my phone, because the security of my phone is important to me. It's worth a LOT more than the value of the phone itself.

That bears repeating.

The security of my phone is worth a lot more to me than the dollar value of the phone.

<comment><USER65> And this is why the government mandating repairability is dangerous - <USER2> infringes on the consumer's freedom to buy locked down products.

<comment><USER20> I hope you're not being sarcastic, because I wholeheartedly agree. Consumers should be allowed to have choice, and that includes choices that some people think are wrong.

I do think that there's some middle ground between where we are now and where the Right To Repair people are advocating for. Right To Repair should absolutely apply to mechanical devices. And maybe it should even apply to most electronics. But it should not _force_ manufacturers to distribute tools that can "repair" security related features of its devices.

</comment></comment></comment></comment></comment></comment><comment><USER66> I have a feeling John Deere will be pissed to no end...and I will laugh endlessly.

<comment><USER67> Why do you believe they would be pissed?

<comment><USER68> Deere infamously has a EULA for their equipment that forbids farmers from breaking DRM, thereby locking them into first-party parts and service. Notwithstanding the jacked-up costs of first-party parts and service, this policy idles farm equipment at very inconvenient times, occasionally ruining the luckless owner of Deere equipment.

<comment><USER67> Thank you.

</comment></comment></comment></comment><comment><USER69> I would argue that for software right to repair implies open-source.

</comment><comment><USER70> Now it's time to outlaw setting DRM in place in order to prevent people from fixing their electronics.

</comment><comment><USER71> proposed new rules? thats not a decision.

</comment><comment><USER72> Two-word comment: "Thank you"

<comment><USER73> that's five.

<comment><USER72> Fine, three-word metadata header, two-word comment!

</comment></comment></comment><comment><USER74> This is a pretty big win for everyone.

</comment><comment> gjsman-1000 YEAH!!!

</comment><comment><USER75> Oh let us bow down and give thanks for being "allowed" to fix shit we own. What. The. Serious. Fuck. The fact that someone has the power to restrict this and or grant us the right makes me absolutely sick. The fact that there has to be a hearing means the forces of evil have won.

<comment><USER76> But sir, have you ever considered why Apple would ever make a phone if you could just replace the battery yourself? Think of all the innovation that would have been lost without copyright laws! /s

</comment></comment><comment><USER77> How is the effort to require manufacturers to provide an unlock for repair different from law enforcement efforts to require an unlock for lawful searches ? Or isn't it ? Argument has been that any backdoor would make encryption vulnerable.</comment>


Macbook Pro helps Core i7 hit 100 Degrees Celsius - <AUTHOR> http://www.pcauthority.com.au/News/172791,macbook-pro-helps-core-i7-hit-100-degrees.aspx <comment><USER2> Yikes, let me point out smcfancontrol:

<http://www.versiontracker.com/dyn/moreinfo/macosx/31029>

</comment><comment><USER3> Doesn't this mac have two video cards? I didn't see in the article which one was being used but wouldn't the high end card off load the cpu when doing the 3D or Photoshop tests?

</comment><comment><USER4> Thought this might be an article about running Flash on OSX due to the title.</comment>


I'm a Developer. I Won't Teach My Kids to Code, and Neither Should You - <AUTHOR> https://slate.com/human-interest/2018/12/against-teaching-kids-to-code-creativity-problem-solving.html <comment><USER2> This is mostly obnoxious. Coding is a great way to build logical thinking, mathematical maturity, and creativity.

Perhaps OP is confusing teaching syntax with teaching coding. At least on my end working with kids, it got creative almost immediately, and mathematical not long there-after.

It's fun.

</comment><comment><USER3> Teaching them to code means teaching them to solve problems. It helps greatly their development and their thinking.

Before you code you think about what you need to solve. When you write the code, you think about the potential outcomes of the line/snippet you're writing.

I think that's a skill that is worth having.

</comment><comment><USER4> I would add, that we should teach kids the modern version of the lemonade stand, which can be a the classic lemonade stand, but also add more bits of advertising, product differentiation, marketing, etc for something that isn't necessarily lemonade but already of interest to the child. Coding isn't the important thing as it is identifying characteristics of it and presenting them to others. It would be fun to make a website together with them for their friends to use. They would provide the ideas and the adult would do the coding.

What's better than teaching your kids to code? Teach them to lead with vision and ideas. Let the other 99% of kids become coders.

</comment><comment><USER5> Slightly off topic, but I'm reading this on Brave for Android with an ad blocker. The site manages to show an ad. No big deal. The site also hijacks my back button. When I try to come back here, it says please don't go, read some more stuff.

Perhaps someone should teach that web developer how websites and browsers are supposed to work.

Good thing Brave allows me to block JavaScript, and a little ironic given that Brave was founded by Brendan Eich, creator of JavaScript. Genie, back in bottle.

I'll just add Slate to the list of sites I don't visit. Surfing on my PC has become obnoxious due the JS (ads?) spinning up my CPU fan to 100%.

<comment><USER6> I used Bromite (another fork of Chrome mobile) and had non of the issues you mentioned.

<comment><USER5> Interesting. I can't always repro. Maybe it depends on the ad.

Is Bromite available on Google Play?

</comment></comment></comment><comment><USER7> Teaching children "coding" is as useful as teaching them any other trade, like carpentry. Something that can be a hobby, side business or become a real occupation. But it's absolutely non essential. Most people will never even gain an ounce of understanding for any aspect of software development and THAT IS OK.

I would argue that the majority of people that are considered successful do not know how to code. Also, responsible parents do not want to let their children become software developers just like they generally don't want them to become prostitutes and drug dealers.

<comment><USER8> I highly disagree with this. Programming, if taught correctly, teaches kids how to think, similarly as to how math does. In my opinion people in most professions would benefit tremendously from being able to reason correctly deductively and from knowing how to approach complex problems, which are skills that a good programming education will give you.

<comment><USER9> Does it really? I've worked with good programmers who will look thick as two short planks if you ask them to solve a maths problem, summarise a science article, rebut a philosophical argument, analyse a novel's structure, figure out an unknown word's meaning, etc etc. We all know STEM people who seem bafflingly stupid outside of their chosen specialties. Those who have well- rounded educations more often seem more smart and able to reason than people whose only tool is the rigid logic of programming/math. I don't think STEM is an automatic pathway to above average smarts.

<comment><USER8> That is very much an over-generalization and dramatization. While there certainly are people who fit your description, not all people with math or CS backgrounds fit into that category. Also the existence of such people says nothing about the potential benefits of programming for people with different backgrounds. I didn't day that everybody's only tool should be the rigid logic of programming/math, but merely that learning those skills would probably complement most people's skill set nicely.

</comment></comment></comment></comment><comment><USER10> I'm sceptical about this article. I think author contradicts himself at a time, and certain ideas aren't well presented (like, coding is not syntax, unless we disagree on definition of "coding"). While at the end author talk about good values, somehow the subject is viewed in harsh light.

Coding, like reading, shouldn't be forced blindly. But that doesn't mean parents, who're literate, shouldn't be also familiar with code.

</comment><comment><USER11> More to the point, if every child learns to code, when they all grow up, coding will not be such a useful skill to have. Just like reading and writing. Of course you need to know how to read and write, but reading and writing is such a common skill nowadays that it's not something that you can realy on for job security.

That's not an argument against teaching kids to code- quite the contrary. You don't want your kid to be the odd one out, that doesn't know how to do what all the other kids know (to a greater or lesser extent). But we should maybe rethink the degree to which learning how to code as a child right now will ensure one can make their living coding in the future.

<comment><USER12> I can think of few skills that do more for your career than excellent writing.

<comment><USER11> Unfortunately, that's not an absolute. I've often been told to basically dumb down my writing in my papers because reviewers who are not native English speakers will not understand what I'm trying to say and will feel frustrated. And you don't want to frustrate reviewers...

For example, I once used the plural "lemmata" for "lemma". That is correct English, "lemma, lemmata", although it's much more common to use the Anglicised form "lemmas" (as, e.g. in formulae/formulas). I've also had colleagues "correct" my grammar when I've used expressions like "Absent X, Y occurs" or "X need not be Y", etc.

Sometimes, "excellent" writing is not the goal; writing that gets the point across, is. Much like code, indeed.

</comment></comment></comment><comment><USER13> This seems like a clickbait title. Author makes the coding to be some sort of strawman to mean just learning the syntax and then attacks upon it just so he can have a controversial title, but not wrong at the same time.

</comment><comment><USER14> This article is utter drivel and full of contradictions. This guy claims to be a developer and he seems to think its all about syntax. He thinks problem solving is alien to coding.

I pity the fool who hired this developer.

</comment><comment><USER15> The article is junk. Nebulous blather ... Something which software unlike math, physics, Chem, EE, Chem Eng I think tolerates too much.

We could restate title as: "I'm _x_ and won't teach my kids to _x_ and niether should you"

where x is anything more complicated that cleaning a room:

\- gardening

\- writing a paper

\- interpersonal skills

\- etc

</comment><comment><USER16> I'm a Developer. I will teach my kids to code, not just the syntax of a specific language. There's a big difference. "To code" is language agnostic. That's were the important things like logical thinking and problem solving skills are.

</comment><comment><USER17> I agree that "coding" shouldn't be mandatory, but would the author still refuse to teach it if his kid expressed interest in the field?</comment>


Show HN: AlDente.io – A ProductHunt like community for food and drinks - <AUTHOR> https://www.aldente.io <comment><AUTHOR> Hey guys - today I wanted to share the #1 Startup for a perosnal challenge - "12 Startups in 6 Months"

AlDente - [https://www.aldente.io](https://www.aldente.io) \- A ProductHunt like community for food and drinks enthusiasts where users can share and discover tasty new dishes.

The first version was ready in about 7 days of "after-hours" work - <USER2> about 3 hours per night and I tried to follow Reid Hoffman's rule for the MVP : "If you are not embarrassed by the first version of your product, you've launched too late."

Please check it out and if you have feedback of find bugs please feel free to shoot me a message.

<comment><USER3> That's a really ambitious challenge OP.

How much time did you spent in building back end vs front end ?

<comment><AUTHOR> I think it was 50/50 even though initialy I thought that the front end would take longer since I wanted to just use the bare minimum features from Vulcan.js.

Since Vulcan is still an early stage project there were (and still are) some stuff that I needed to change also some stuff in the backend.

Also - there were some problems with the DNS records and almost a day was spent working on it.</comment></comment></comment>


How to submit an app to Apple's App Store when it uses encryption - <AUTHOR> https://carouselapps.com/2015/12/15/legally-submit-app-apples-app-store-uses-encryption-obtain-ern/ <comment><AUTHOR> Last year I learned that to publish an app in the App Store or Mac App Store, if it uses encryption of any kind and yes, HTTPS and SSL count, you need an Encryption Registration (ERN) from the US Bureau of Industry (BIS). Some people claim it's fine to lie to Apple, claim no use of encryption and get in the app store. I'd rather do it the right way.

When I started the process of getting the ERN, I quickly notice it was going to be a long and arduous process and that other people could benefit from the lessons I was learning the hard way, so I decided to document it all in a long blog post.

This is probably one of my most researched pieces ever. The whole process took about two months from the start, researching this thing called ERN, to getting the app published in the Mac App Store, satisfying that what I did was (more or less) correct.

<comment><USER2> Holy crap that is a bureaucratic nightmare. Why does encryption even need to be registered in the first place? I don't see any point beyond the holdover of 'encryption is munitions' which is a pile of crap in the first place.

<comment><USER3> Encryptions is munitions. It is the modern day "arms" that that the spirit of the 2nd amendment to the US constitution was trying to protect as a fail-safe to an overreaching corrupted government.

We don't need to bear arms anymore because we don't walk around dueling people at high noon anymore, but being an information based economy and information based society, encryption is the new gun in the wild world web.

<comment><USER4> We continue to need to bear arms of all sorts, equal to those that the military uses. As you pointed out, the purpose of the 2nd amendment was to avoid tyranny in a powerful central government. As long as the (federally funded & led) military uses firearms, responsible civilians _must_ also keep & bear them.

<comment><USER5> If that is so, then we have already lost. No firearm held by the citizens can compete with the firepower of the military of today.

The spirit of the amendment may have been in the right place and surely worked when the constitution was written but we live in a very different world now and if you still think the an armed citizenry will avoid tyranny, you need to go to youtube and see what the military can now do.

<comment><USER6> Are you sure about that? Look at Iraq. Also, while soldiers in the military might be fine oppressing a compliant populace, how many will jump ship if they are forced to wage actual war on their countrypersons?

<comment><USER7> All fine and well until the drone army comes online.

Only half kidding.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> At the same time Apple encourages the use of HTTPS with App Transport Security (ATS).

       Starting in iOS 9.0 and OS X v10.11, a new security feature
       called App Transport Security (ATS) is available to apps and is
       enabled by default. It improves the privacy and data integrity
       of connections between an app and web services by enforcing
       additional security requirements for HTTP-based networking
       requests. Specifically, with ATS enabled, HTTP connections must
       use HTTPS (RFC 2818). Attempts to connect using insecure HTTP
       fail. Furthermore, HTTPS requests must use best practices for
       secure communications.

[https://developer.apple.com/library/ios/documentation/Genera...](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)

Does that mean that in the future nearly every App will need the ERN?

<comment><USER9> This is a really interesting point, I was caught out by this during an update. All of a sudden my REST client broke. Took a little digging to find out Apple had enabled HTTPS by default.

Given this, it would seem odd that you would need to apply for an ERN (is this true for app outside of the US?)

</comment></comment><comment><USER10> I read this entire article thinking it was overly elaborate satire, but there was no punch line at the end, and the links are actually valid.

The TP pool memo[1] in Neal Stephenson _Snow Crash_ seems sane by comparison.

[1] [http://soquoted.blogspot.com/2006/03/memo-from- fedland.html](http://soquoted.blogspot.com/2006/03/memo-from-fedland.html)

</comment><comment><USER11> Not everything that "just uses HTTPS" necessarily needs ERN. Here's "note 4" which exempts a lot of apps: [http://www.bis.doc.gov/index.php/policy- guidance/encryption/...](http://www.bis.doc.gov/index.php/policy- guidance/encryption/identifying-encryption-items#Three)

A big part of our app was "sending, receiving, and storing information", so we weren't sure this exemption would apply to us. So, we did the ERN anyway, and it took a couple of days calendar time, and a couple of hours of working time, IIRC.

By the way, nowhere does it say that using HTTPS is fine if you just use Apple's APIs and frameworks. I don't think it's relevant here.

<comment><USER12> > Note 4: Category 5, Part 2 _does not_ apply to items [...] meeting all of > the following:

> (a) The primary function or set of functions is _not_ any of the following: > [...]

> ...... (3) Sending, receiving or storing information ( _except_ in support > of entertainment, mass commercial broadcasts, digital rights management or > medical records management);

(Emphasis mine.)

Triple negative - now that's something. And DRM and the entertainment industry gets a special case, isn't that great?

<comment><USER13> I would have thought that DRM is a loophole you can drive a truck through. As long as any of your data is of value, you can claim the reason for encryption is DRM. Even if you let the end user have access to all data, you could always send some sort of DRM heartbeat.

<comment><USER14> No loophole! It only count's if you exclusively need encryption for DRM. Not for other stuff like, to protect your users chat communication for example.

<comment><USER13> I don't see the word exclusively. If you had a chat application you could protect the user content by sending along a DRMed ping.

</comment></comment></comment></comment></comment><comment><USER13> Great guide. If you are into these sort of guides of how to deal with the US government I have written a couple for the W8-BEN-E form [1] (you need this if you have any US customers) and also for registering to do business with the US government [2]. These are biased towards Australians, but they should be helpful for others too.

1\. [http://www.tillett.info/2015/06/20/how-to- complete-w-8ben-e-...](http://www.tillett.info/2015/06/20/how-to- complete-w-8ben-e-form-for-australian-companies/)

2\. [http://www.tillett.info/2015/12/01/how-to-register-an- austra...](http://www.tillett.info/2015/12/01/how-to-register-an-australian- company-for-business-with-the-usa-government/)

<comment><USER15> US customers here must mean that if you sell directly to US customers. If you sell via App Store to end users in US, then this is not needed, because Apple will be your customer (Apple Luxembourg for Europeans), not the end user.

<comment><USER13> Yes this is true, but lots of people sell directly to US customers. As soon as you do you have problems :)

</comment></comment></comment><comment><USER16> Not specific to Apple. Same thing has to be done for any other app store, like Google's. Some mentioned that there is an exception if you use OS libraries for encryption. I think that's not the case, but I think using some third party SDKs like Game Center (for which I guess the providers did the paper work) is excepted.

<comment><USER17> > any other app store, like Google's

Not sure. This looks like a US-centric, bureaucratic thing. I doubt that F-Droid [https://f-droid.org/](https://f-droid.org/) requires this kind of nonsense when submitting apps.

<comment><USER16> Yeah, that's true. I meant US company app stores. But some other countries have these kinds of rules. I know of France.

</comment></comment></comment><comment> Pirate-of-SV How is this different from Android apps distributed through Google Play? Legally I mean, why don't Google Play do the same thing?

<comment><AUTHOR> Apple requires the ERN because Apple is very US centric. For Google, there might be cases in which the ERN is not required because the app never leaves the US (because for other countries it comes from other countries).

Apple is required the ERN to cover their asses, I believe. The ERN is required by the US government, so, if you don't have it, you are breaking the law whether you are using Google Play or Apple. So, you should get it for Google Play too.

<comment><AUTHOR> To add to that, maybe Apple is more liable because of their promises to check for quality and problems in the store, while Google allows more things in it. That just means a change for them, you, as the app maker, are always liable.

</comment></comment></comment><comment><USER18> If I inform everyone that their iOS app uses AES, SHA-1, and RSA at the lowest level (codesign and Fairplay DRM), does everyone have to register? I think a plain reading of the question poised by Apple would require a "Yes" answer.

<comment><USER19> There's an exception in the law for DRM

</comment></comment><comment><USER20> For cross reference, here is another list of steps based on our experience. It took about 3 days.

[https://www.chatmap.io/blog/iPhone-iTunes-ERN- Encryption.php](https://www.chatmap.io/blog/iPhone-iTunes-ERN-Encryption.php)

</comment><comment> jarek-foksa Which cryptographic algorithms are included in Atom Electron and NW.js frameworks? Does the page [1] list all of them?

[1] [https://www.chromium.org/blink/webcrypto](https://www.chromium.org/blink/webcrypto)

</comment><comment><USER21> ignoring anything else, that process seemed pretty smooth to me, esp for government. Sure you hit a few snags, but the main one (a lost email) could've happened signing up anywhere.

<comment><AUTHOR> I think the process had two issues. The main one being several steps that though simple, were not specified anywhere, so, figuring them out took a lot of time and phone calls. It's like someone tells you to drive from point A to B, that's easy, but they don't tell you were the car is.

The second problem was a lot of jargon that was in my opinion unnecessary and was internal US government leaking to the end users and you had to learn it to understand the documentation about what to do. Figuring out what SNAP-R stood for took me way to long and it's nothing more than a website registration (from my point of view).

</comment></comment><comment><USER22> How does this apply to non-US based app publishers?

Am I legally exporting crypto from the US if am not in the US?

<comment><USER23> Yes, this is explained in Apple's FAQ on the issue - they have servers that are distributing your app from the US, thus you are exporting crypto from the US.

</comment></comment><comment><USER24> Don't you wish you hadn't surrendered software distribution authority to a single faceless corporate party? When nobody tried to demand bullshit crypto paperwork?

Remember when you could distribute software yourself without getting threatened[1]? Remember when platform vendors didn't take a 30% cut of everything you earned just because they wrote an OS? Not even Microsoft was that evil.

I hope you enjoy the world you've built, hipsters.

[1] See the f.lux Apple distribution debacle

<comment><USER25> This is unrelated to Apple and it's AppStore. Even if you sold this on your own, you'd be subject to the same rules.

[https://www.bis.doc.gov/index.php/policy- guidance/encryption](https://www.bis.doc.gov/index.php/policy- guidance/encryption)

<comment><USER26> There is an important difference, though. Small companies and individuals often fly under the radar of wacky bureaucratic rules like this, whereas big companies are more visible and are stuck with them. By routing all the small- timers through a big company, they can no longer do that.

You might say, small companies _should_ be following these rules regardless so this is just as well. And I'd probably agree. But it's still a pretty big difference.</comment></comment></comment>


React Editor Enabled by Default - <AUTHOR> http://blog.atom.io/2014/07/22/default-to-react-editor.html

<comment><USER2> It seems like a lot of big projects are switching from Ember or Angular to React, or are choosing it for new projects. I think that's a good thing.

<comment><USER3> Am I being stupid/paranoid by not knowing if I want to trust React because it was created by Facebook?

<comment><USER2> Yes, you are. Read the source if you're really that concerned.

</comment></comment></comment><comment><USER4> I'm excited because this means two things for me and my QOL:

1\. Faster editor.

2\. Some of the missing features from go-plus will now be merged to the master branch of the package since it depended on React being default in the editor. Really excited. :) [https://atom.io/packages/go- plus](https://atom.io/packages/go-plus)</comment>


China just made a huge move against cryptocurrencies - <AUTHOR> https://www.cnbc.com/2017/09/04/chinese-icos-china-bans-fundraising-through-initial-coin-offerings-report-says.html <comment><USER2> Could this be a move to protect the stability of the highly lucrative Bitcoin market in China? From what I can discern from the article, this would only appear to significantly impact new cryptocurrencies and ICOs. Could it be a potentially shrewd move to maintain the state of token-based investment to that of a commodity rather than a 'futures' market (especially given the current exchange rates between existing tokens and fiat currencies)?

</comment><comment><USER3> Is the party over?

Can a company based in Zug get hit?</comment>


Biggest Eyewear Company Signs On With Google Glass - <AUTHOR> http://www.nytimes.com/2014/03/25/technology/biggest-eyewear-company-signs-on-with-google-glass.html?_r=0

<comment><USER2> Great move, what Google Glass really lacks is a posh sparkle. Ray-Ban and Oakley frames for Glass should make it so much more appealing for people in trend. It's when Fashion helps Technology.</comment>


Live Longer by Eating Apples, Drinking Tea Every Day - <AUTHOR> https://www.studyfinds.org/study-live-longer-by-eating-apples-drinking-tea-flavonoids-every-day/ <comment><USER2> The supporting study:

Flavonoid intake is associated with lower mortality in the Danish Diet Cancer and Health Cohort [https://www.nature.com/articles/s41467-019-11622-x](https://www.nature.com/articles/s41467-019-11622-x)

"Dietary data were collected using a validated 192-item food-frequency questionnaire, mailed out to participants prior to their baseline visit to one of the two study centers. Participants were asked to indicate their usual frequency of intake of different food and beverage items over the past 12 months, using a 12-category frequency scale that ranged from never to 8 times or more per day."

So... 50-65 year old participants in the study responded to an annual 192 item questionnaire for 23 years. Quick: How many blueberries did you eat in the last 12 months and how frequently?

Anybody see an potential problems with this type of survey approach? Virtually guarranteed to be wildly unreliable.

</comment><comment><USER3> Go easy on the apples. That's a lot of sugar and insulin resistance is one of the biggest health problems causing a cascade of preventable chronic health conditions and costs. This would be good advice in moderation for people that are already healthy.</comment>


The Little Book on CoffeeScript - <AUTHOR> http://arcturo.github.com/library/coffeescript?

<comment><USER2> Correct link: <http://arcturo.com/library/coffeescript/>

<comment><USER3> I think this was to get it on HN again. It was already on with that URL at <http://news.ycombinator.com/item?id=2653594> :-) I've seen this tactic used a lot lately and it's a natural response to HN having a time-diverse audience and no mechanism to prevent dupe posts.

All that aside, it's a good little introduction to CoffeeScript and works well alongside Burnham's CoffeeScript book published by the Prags.

</comment></comment><comment><USER4> It should be a coffeetable book that folds into a coffee table.</comment>


Project Mosaic–Front end Microservices - <AUTHOR> https://www.mosaic9.org <comment><USER2> I'm astonished by the complexity this architecture brings. Is this really solving a problem that is worth it?</comment>


Review my project – Interestin - <AUTHOR> http://blog.interestin.co/post/89058218638/experiment-interestin

<comment><USER2> As an aside, it honestly confuses me why the vast majority of company blogs don't have an actual link to their home page, but instead prefer to have the header link to their blog subdomain.

<comment><USER3> This is a huge pet peeve of mine, but at least in this case there is a link to the actual home page in the first sentence of the blog post.

The real problem, which happens shockingly often, is when a blog post doesn't obviously link to the main site anywhere -- or otherwise buries the link deep into the post -- and neither does the blog.

</comment></comment><comment><USER4> 1\. The first part makes me think you're solving the problem of "long form" comments -- providing better tools for writing in depth responses to things. On more careful reading it sounds like you're _not_ doing that. I left unsure of what the project really is.

2\. We're NSA proof! No you're not. Being "just anonymous" is really more than enough and overstating -- and then contradicting -- the actual level of anonymity you provide is counterproductive if you're trying to build trust.

3\. Get rid of the lorem ipsum. That section confused me most of all. We need examples to understand the product.

</comment><comment><USER5> You can learn a LOT from HN itself.

HN is heavily moderated and the best part is a lot of people collectively do it and everyone accepts it. That's how the quality is maintained. You need to enforce this from the beginning. Quora did it and has quality. Yahoo! Answers didn't, and doesn't have that professionalism that Quora has. Also, HN has quite a complex rating algo in place for upvotes. You might want to be inspired with that too.

Are you planning to give rating to users based on a voting strategy? It usually attracts people to be more interactive and get more visibility on a platform.

From my own experiences in managing a community/platform, concentrate more on the quality and quantity will increase gradually. Getting a lot of people joining initially itself can open roads for destruction in the future, which you might not be able to see now.

<comment><AUTHOR> Thanks you so much!

As for the ratings - users get karma (a la HN) for each upvote they get. There isn't any user-rating algorithm behind it, but I plan to do it in the future. Thanks again!

</comment></comment><comment><USER6> I don't understand how this is unique over the hundreds of blogging and quite frankly opinion article platforms out there. They all moderate, I think controlling how people respond and communicate is a much more difficult process than you might think.

<comment><AUTHOR> It's not meant to be a blogging platform, mainly because we don't need another one. It's all about content, and so I agree it is a HUGE challenge, and definitely one of my biggest concerns. I don't really have an answer for that, except moderation. I guess we'll have to see how it grows.

<comment><USER6> Wait a second. Now I'm lost, what is this exactly?

</comment></comment></comment><comment><USER7> You want the honest truth? Absolutely awful. Not a hint of originality, creativity, or authenticity. Your "Lorem Ipsum" examples scream dishonesty and fakeness. You can't even be bothered to use your own platform a single time to demonstrate how it's actually meant to be used. You built a CMS and are now asking quality contributors to just drop in content without any compelling reason to do so whatsoever other than "I coded this".

</comment><comment><USER8> "I'd like to invite you to join to something called Interestin."

You have a typo in the first sentence. Kind of tough to read much further when that happens...

</comment><comment><USER9> The problem you are trying to solve seems very real. But not sure if the solution is right. I dont find it much different or novel than many other similar platforms.

</comment><comment><USER10> I like the idea of a place where one can express opinions. Kind of a hub for op-ed pieces about any topic. I myself miss some platform to express my opinions about some services, industries, countries, etc. How are you going to organize topics and relevance?

</comment><comment><USER11> Seems promising! This is a problem I've been trying to solve as well and have had some ideas but nothing substantial, so I definitely think there's a gap in the market.

Looking forward to the beta.

<comment><AUTHOR> Thanks, Kiro!

</comment></comment><comment><USER12> I like the idea but dislike the name. It's hard for me to pronounce. My brain kind of get's stuck between 'interest in' and "interestin'"

<comment><AUTHOR> Thanks, I'll think of something better (open to suggestions).

<comment><USER13> Some keywords to perhaps start your brainstorm:

Debate

Retort

Opine

Topical

Quibble

Squabble

Fence (as in "what side of the fence are you on" or the sport of fencing)

Argueable

Rebuttal

<comment><USER7> We've found him. The man who is responsible for all Web 1.5 domain names (including the subsequently-removed vowels).

</comment></comment></comment></comment><comment><USER14> > Please keep in mind that we will be able to link the content back to your > account, in cases of spam, harassment and such.

And on _request_ by The NSA.

<comment><AUTHOR> It is indeed problematic. You don't have to use your full name though (usernames-only are allowed too). Thanks!

</comment></comment><comment><USER15> Its an interesting idea.

However, I would replace the pictures with better screenshots. When I scrolled down I, at first, thought my browser was fouling up

<comment><AUTHOR> Thanks, will do.

</comment></comment><comment><USER16> Why do I need to be invited? Why can't I just sign up

<comment><USER17> I can think of the following reasons:

* The product might not be ready yet, OP probably wants to gauge the community opinion before spending precious time on building his project.

* OP might not want to overload his server, in case this goes viral.

<comment><USER7> > in case this goes viral

It won't.

</comment></comment></comment><comment><USER18> Promising - I think it fits a nice gap. I never really know how/where to voice my opinions on current affairs etc, so would look forward to this.

<comment><AUTHOR> Thank you, jp1989!

</comment></comment><comment><USER19> What's the difference with reddit?

</comment><comment><USER20> What advantages does this provide over something like Branch.com?

<comment><AUTHOR> Interestin mostly focuses on user-generated opinion articles and the conversations grow around those articles (in the form of comments and response articles). I think it offers a less-artificial, more natural way of conversing.

</comment></comment><comment><USER21> Great blog post, where's the actual product?

<comment><USER22> [http://www.interestin.co/](http://www.interestin.co/)

<comment> Jean-Philipe So this is another thing I don't get. Why don't startups just open their product up for everybody right away? Are they afraid users might come by the millions and crash their servers, because their product is too much awesome to be let unprotected in the internets? Getting users onboard is hard, you should actually want them to come and use your product.</comment></comment></comment>


An entrepreneur wants to track the residents of a high-crime American community - <AUTHOR> https://www.theatlantic.com/ideas/archive/2019/06/mass-surveillance-tech/592117/ <comment><USER2> Thinking of UK football 'hooligan' violence, after lots of surveillance being installed within stadiums, violence enthusiasts organized their confrontations at areas reconnaissance proved to be unmonitored. Nearby industrial parks etc... If you are involved in a high risk activity you take steps to outwit any surveillance. A relative was recently mugged by Sheperds Bush tube/Westfield London UK in a busy area. She was rescued by an Uber driver but the incident was orchestrated by a hooded individual who knew where the cameras were so there is no footage.

<comment><USER3> > _Thinking of UK football 'hooligan' violence, after lots of surveillance > being installed within stadiums, violence enthusiasts organized their > confrontations at areas reconnaissance proved to be unmonitored_

At the risk of sounding like a heartless libertarian, sounds like in this case, the outcome was a net positive. People who want to and are willing to suffer violence are going to a specialized place to do so, rather than involving a bunch of football fans who just want to see some people play a sport.

<comment><USER4> Except for anyone who needs to make a living at the industrial park.

There is a difference though between surveillance at a massive event known for both violence and family entertainment and wide area, persistent surveillance. I'm OK with a lot of cameras at stadiums, when they follow you home that's a problem.

</comment></comment></comment><comment><USER5> Here's a fix: Ban guns, end privatized jails, invest in education and social programs, and redistribute wealth.

Mass surveillance? That will not end well. There is historical precedent and plenty of speculative fiction to persuade us away from this path.

<comment><USER6> I know the article is about the US use case, but cities like London (in Europe) and Beijing (in Asia) fit most of the criteria you mention and are incredibly closely surveiled. I suspect that if someone wants to deploy mass survillance they are going to find reasons no matter the on-the-ground reality.

Too much crime? You need 24/7 surveillance to cut that. No crime to speak of? Let's put cameras all over the place to keep it that way.

<comment><USER7> Is mass surveillance working to reduce crime in the UK? I recall anecdotes about police throwing their hands up over moped muggings.

<comment><USER8> It appears that it isn't working, since crime has risen quite a bit in London for the past few years.

</comment></comment></comment></comment><comment><USER9> The flip side to the public being surveilled, is the police and other organs of the state being hidden.

Can I make a prediction? I predict that within 10 years, all police officers will carry with them a little transponder that transmits a signal that disables the camera of any cell phone within a certain radius.

Think of the difference between the Vietnam war and the iraq war; during the Vietnam war the press was allowed to take full color images of the whole conflict, from the inside, showing the burning monks and children and so forth. In the Iraq war, we got a few blurry pictures from Wikileaks and look what happened to Assange. From the point of view of the state, us seeing what they are doing is a problem to be corrected, nothing more. And likewise if they don't have total surveillance of us, it's a problem to be solved.

Edit: apple's already got the patent: [https://www.theatlantic.com/technology/archive/2016/07/what-...](https://www.theatlantic.com/technology/archive/2016/07/what- if-cameras-stopped-telling-the-truth/491150/)

<comment><USER10> That's the thing: A few people in government and private companies will have full information about citizenry whilst at the same fiercely protecting their own secrets.

<comment><USER11> I believe that it's fundamentally impossible to "roll back" the degree of surveillance in our global society in an effective way. Our technology is already converging to a near-total degree of surveillance. And it's going to accelerate, for example, auto-autos (self-driving cars) and the road infrastructure to support them will be able to develop a near-real-time history of everyone walking down the street.

We can't (I believe) prevent total surveillance but we can certainly control how the data are used, and we can set up systems that allow the data to be used without being abused. The system must be recursive. Whatever form the system takes, it shall necessarily have to be able to detect and correct its own self-abuses.

<comment><USER10> Agreed. How we can create laws. Weh also can't roll back the capability of people to steal things or kill each other so we have laws. For example I strongly believe that face recognition in public spaces should be outlawed with maybe a few (!) exceptions for law enforcement.

</comment></comment></comment></comment><comment><USER12> Could of just help by giving kids in that community loans to start businesses, jobs, and opportunity. But no let's not do that cause that seems like welfare.

<comment><USER13> I assume you mean grants. It's generally bad policy to load money to people who are unlikely to pay it back. Unless you mean the government should suppress the interest rate. And those would sort of be a form of welfare. It's ok to just admit that you like welfare.

<comment><USER12> I mean the same type of investment that an engineer in SV would get or a Kiva gives out. It bad policy only if theirs no turnkey solution, but if you look at immigrants have created hair stores, convenience stores, and such it would be easy to train and capitalize those Americans to do the same in their very own neighborhoods.

<comment><USER13> So private individuals lending money to each other on a case by case basis? Nobody views that as welfare.

<comment><USER12> I assure you that people would and there Americans fully against doing that because it makes you lazy.

<comment><USER13> Well then I wouldn't go to those people for a loan.

</comment></comment></comment></comment></comment></comment><comment><USER14> Just theoretically if surveillance was good enough to catch every single crime in public, would this be "worth it"? I think maybe some cities/countries would opt for this such as Singapore and China. I can even imagine cities in the US would trade privacy for safety.

<comment><USER3> > _Just theoretically if surveillance was good enough to catch every single > crime in public, would this be "worth it"?_

No.

Problem #1 is unfair and biased prosecution. If every time someone smokes a blunt, the police get alerted, but only minorities are actually arrested and prosecuted, that's bullshit.

Problem #2 is that not every crime _should_ be punished, period. Nobody is harmed if I walk across a street without waiting for a green light.

Problem #3 is that every crime being captured means that literally every citizen has a backlog of blackmail material waiting for them that the government could use to pressure them for one reason or another. Commit a more serious crime, and you could be pressured into a plea bargain in exchange for not bringing the others to bear. Speak up against an unpopular policy the government is trying to push, and suddenly you're being arrested for something that happened three years ago.

No thanks. This would be a nightmare world.

<comment><USER15> I agree with arguments #2 and #3

However, just as a thought experiment, wouldn't total surveillance actually help stop #1?

If there existed video proof of illegal bias, it could be targeted and stopped, vs now, where you just have to imagine that all groups are committing crimes at the same rate and police are only focusing on minorities.

<comment><USER3> > However, just as a thought experiment, wouldn't total surveillance actually > help stop #1?

How would it? Prosecutors decide who to prosecute based on available evidence. It's systematic societal bias (and obviously, personal bias, too.)

But it's not like video surveillance would show anything new - we already have statistics on which groups get sent to jail over minor crimes, and which ones get slaps on wrists.

<comment><USER15> > How would it? Prosecutors decide who to prosecute based on available > evidence.

You answered your own question!

> we already have statistics on which groups get sent to jail over minor > crimes, and which ones get slaps on wrists

I think you will find those statistics correlate almost exactly to income and only overlap race because there is also a correlation between income and race in the US.

So without video that is hard evidence of actual racism (eg. arresting blacks and ignoring whites committing the same crime) we have to do a two-step mental trick to get to the racism. Poor people that are arrested can't afford lawyers (or good lawyers) and have worse outcomes. Black people tend to be poorer than Whites, so the courts are racist!

I believe it would be a different case altogether if you had "actual" direct proof (ie. video that could be counted and compared to outcomes), not just correlational proof that involves a lot of other noise that may or may not be racism or that is a couple of steps removed.

<comment><USER3> > > How would it? Prosecutors decide who to prosecute based on available > evidence.

> _You answered your own question!_

The point is that they don't have to prosecute everyone. It's hard to not see this as a willful misunderstanding of my point.

> _a two-step mental trick_

Just what I'm thinking, but mirrored, actually.

> _I believe it would be a different case altogether if you had "actual" > direct proof_

I think some people will never be convinced. Also, I'm going to stop responding to this thread. Without direct video proof, there's no way to prove the two are related.

</comment></comment></comment></comment></comment></comment><comment><USER16> I wonder about the actual workability of this scheme. The cities mentioned cover a large area and have things like buildings and airports.

Due to the airports, you can't fly too high without air traffic clearance. You can't fly too low or the buildings are going to block large portions of your view. From a practical point of view, you are going to be limited to flying over specific segments of the city, which leaves your and the city that authorized your flights open to lawsuits claiming that you are profiling residents of that specific neighborhood.

</comment><comment><USER17> Hm. So stalking is legal, if you stalk a lot of different people and take notes. Hm. Hm. Doesn't seem ideal.

</comment><comment><USER18> There must be some wrinkle of copyright law that offers a (legal) defense against this sort of unrestrained mass surveillance. It's my cynical take that courts will be far more respectful of property rights than privacy rights/civil liberties.

Something akin to the laws that (on paper at least) forbids people from taking photos of the eiffel tower at night or commercial photos of mount rushmore.

<comment><USER19> The article _barely_ hints at blackmail as a method of getting around those laws. Near the end, it says:

>Did his company retain video of the Baltimore officials who could approve or thwart its return?

To me, I read that and think they probably began surveillance much earlier than they let on. After collecting dirt on people who could stop it, then they approached them and got their cooperation. I could be wrong of course, but that's my 2 cents.

</comment></comment><comment><USER20> I have friends and relatives in London but seriously wonder how long it will be before they are forced to leave - things just seem to go from bad to worse on all sorts of indicators of quality of life, and the authorities appear acquiescent in the decline. Whilst in the UK one admittedly can never get very far away from built up areas, my plan is to get as far away as possible.

</comment><comment><USER21> Here's an idea that I wanted to get a grant to try in Detroit. Take a high crime neighborhood where the majority of its residents were working class poor. Give every house a ring doorbell and then sprinkle cameras where lots of assaults or drug transactions take place. Then have license plate readers on major streets but don't store the locals license plates in the database.

Would it allow the police to zero in on the criminals causing most of the pain? Would it make a meaningful difference in these peoples lives?

Bet it would be cheaper than flying over the neighborhood with a drone 24 by 7.

<comment><USER22> That would get wrecked right quick. First is the assumption that every house had internet for the doorbell. Next is that they wouldn't be broken or spray painted over. Third, how easy are they to steal? That is a high ticket item. Lastly, would the residents fear retaliation if they cooperated with police?

</comment></comment><comment><USER23> One aspect that's not emphasized here is that _the drones are also tracking the police_. It's a redundant system for body cams.

</comment><comment><USER24> This is a bit of an opinion piece, but that said I disagree. We are already being surveilled by private companies, whether we like it or not, I don't think it's possible to really prevent the government from using that. I don't think we're there yet. I don't want the government to get that data to watch us all the time, but I don't see any way to really stop at anytime soon. It will take major events and major public exposure before that, but it will only take one terrorist attack to take us all the way back to the beginning

<comment><USER25> > I don't think it's possible to really prevent the government from using that

Yes it is.

Private entities do stuff all the time that the government is expressly not allowed to get away with and we generally hold them to it. Free speech is the classic example that comes to mind.

<comment><USER26> As the grandparent alluded, one 9/11 and privacy rules go in the garbage. The PBS special, "The United States of Secrets" documented this period well.

<comment><USER4> And then some major activism and those laws go away. We can't afford a fatalist attitude to this. It very much is not inevitable that airplanes with cameras with monitor everything we do. And even if the data is gathered there may be some ways to control or delay its use for nefarious activities.

It's a choice, and we have a voice in that choice. There is a broad range of possible outcomes here some much worse than others.

<comment><USER26> Preaching to the choir here.

</comment></comment></comment></comment></comment><comment><USER10> A lot of people are uncomfortable with mass surveillance but there seems to be an unstoppable wave to implement it. Same with climate change. A lot of people want to do "something" but there s no will to really change things so we will just deal with the consequences in the future.

Get ready for a mix between 1984 and Brave New World.

<comment><USER27> Not to be glib, but... that uncomfortable feeling you get when reading about this kind of stuff?

This is exactly why the GDPR was written into law in the EU.

<comment><USER10> I am all for GDPR. I am not sure if GDPR will stop the trend towards surveillance though.

</comment></comment></comment><comment><USER28> Why do they never target the areas teeming with highly organized crime, like Washington DC, Silver Spring, or Northern Virginia?</comment>


Some SQL Tricks of an Application DBA - <AUTHOR> https://hakibenita.com/sql-tricks-application-dba <comment> munk-a All of those tips and no mention of MATERIALIZED VIEWS[1] it's a pretty wonderful tool to use for data caching (potentially highly safe data if you use on action trigger based refreshing) that can allow you to have a nice normalized data layout to write into and a beautiful de-normalized cross-table index supporting place to read from. If you've never heard of mat views please do look them up[2] and play around a bit.

1\. As they're called in postgres at least

2\. [https://www.postgresql.org/docs/current/sql- creatematerializ...](https://www.postgresql.org/docs/current/sql- creatematerializedview.html)

<comment><USER4> Materialized views are also nice for many modern DW applications where you don't live in legacy "once in a hour/day/week" ELT/ETL environment, but more in a real timeish or micro batch world. You can have data marts / reporting tables composed with these materialized views over many kinds of underlying DW models. Just dropping this to promote the Materialized View functionality :)

<comment><USER5> dbt (data build tool) is awesome for managing this.

<comment><USER6> [https://www.getdbt.com/](https://www.getdbt.com/)

</comment></comment></comment></comment><comment><USER7> I'm not sure if it's just me, but when I see DELETEs that use CTEs like that I start to get nervous. It's easy to get wrong and it's hard to undo.

I like to have an intermediary table where I can verify what's going to be deleted (or updated) before it runs. Even better it lets you save the mappings of old ids so when you find out some downstream system was using them you can fix that too.

I know it's just an example but soft deletes solve a huge range of problems.

<comment><USER8> Rule of thumb for me is that every DELETE or UPDATE query should start life as a SELECT query.

The eight stages of DELETE:

\- SELECT what you're deleting;

\- fix the mistake in the query (there's always one);

\- SELECT again;

\- BEGIN TRANSACTION;

\- DELETE;

\- SELECT to confirm the right deletion -- twice for good measure, and maybe ROLLBACK once or twice if you're feeling twitchy;

\- Hover finger anxiously over the un-entered COMMIT command for several seconds while resisting Dunning–Kruger effect;

\- COMMIT. :)

<comment><USER9> Here's my insanity

Give the table an DeletedTimestamp and DeleatedReason column.

Mark the records as deleted.

Run around like a lunatic and fix queries so they don't show "deleted" columns to the rest of the app.

Make a page in the application where people can "restore" deleted items. Because they do stupid things too once in a while.

<comment><USER10> My fix for this is to rename the table to something like _b_<table_name> then create a view <table_name> that excludes the 'deleted' values (based on the value in DeletedReason column). That way you make one change to the structure when you create the column, and everything else Just Works

<comment> munk-a We use the same approach and specifically use a "...withdeleted" suffix for the table - you got a table of containing widget objects there? how about a "widgetwithdeleted" table.

</comment></comment></comment></comment></comment><comment><USER11> Please add to this otherwise excellent list:

LATERAL JOINs (PGSQL). In SQL Server & Oracle they are CROSS APPLY & OUTER APPLY.

This will change your SQL habits forever. Lateral joins give you the power of iteration in set-based operations that are mind-numbingly easy to implement and understand.

<comment><USER12> I think this is really only helpful in terms of readability if you come from a world where iteration is the norm, and really hurts readability for most database folks where set-based operations are the norm.

<comment><USER13> Long time database person here (~20yrs), probably very much akin to the "Application DBA" in the article.

The solve some classes of performance related issues, especially if you're joining to certain kinds of group-by sub-queries or need to join on the output of a function. If your surrounding query is defining the constraints, you can push that into otherwise unconstrained sub-queries.

There was a minor learning curve, it took me a couple hours for it to be worked into my default mindset. In the end, wonderful technique that can save dropping into procedural code in any number of cases. The biggest danger is that it is a kind of iteration and where the performance can be greatly enhanced in say OLTP style queries, but it may not be a net gain in larger unconstrained queries that will cause that sub-query or function to get hit many times... I think getting that into your head is the larger part and the declarative nature of SQL will cause that to be a little outside of your vision no matter your background.

</comment></comment></comment><comment><USER14> Things I learned while making a database of songs on Jango Radio:

1\. Create covering indexes sorted by each column to be searched.

2\. Enable sqlite_stat4

3\. Use WAL mode.

4\. Set a busy_timeout

5\. Vacuum and analyze daily.

6\. Nobody has heard of Jango.

<comment> munk-a Covering indexes are a really careful thing to investigate, sometimes you'll get big wins out of it but often times those indexes can easily be misaligned with really minor application changes so it's something I tend to approach in very limited situations.

Vacuum & Analyze are two fun ones and I think postgres in particular would do well by investing a bit more into the default configuration of autovacuum since the out of the box settings are pretty conservative compared to the state most out of the box DBs are used - but I think that DB configuration is very much an unsolved problem in general and can be a quite surprising source of major performance gains (or losses!).

I mentioned mat views elsewhere - but if you are really hitting quite predictable usage patterns (where covering indexes are stable enough) then some well defined mat views might go a long way to tuning performance that little bit more - just be aware of the fact that rematerialization isn't instantaneous and if you have a high rate of change in the data then you'll probably want time based re-materialization instead of trigger based which means you'll need to account for some inconsistent data (as is the case with caching in general).

<comment><USER14> I wish there were different recommended configurations for SQLite when used as the backend of a web site versus the storage format for an embedded system. The defaults are really not suitable for concurrency or for tables with millions of rows. Also I wish I didn't have to recompile to enable sqlite_stat4 histograms.

SQLite doesn't have materialized views.

</comment></comment></comment><comment><USER15> This post was great - I've been using PostgreSQL for different projects for fifteen years and there were a bunch of neat tricks in here that I haven't seen before. Thanks very much.

</comment><comment><USER16> Normally I read these and expect to learn nothing applicable. But the UNLOGGED table tip was exactly what I needed for the ETL project that I'm working on.

Thanks!

</comment><comment><USER17> I would also add, for data-science esc tasks (or bulk queries in general) - COPY {} TO is unreasonably fast - often much faster than executing the standard select (especially if that select is being executed by a driver in a slower language).

_

[0] [https://www.postgresql.org/docs/9.2/sql- copy.html](https://www.postgresql.org/docs/9.2/sql-copy.html)

<comment><USER18> See this

[https://hakibenita.com/fast-load-data-python- postgresql](https://hakibenita.com/fast-load-data-python-postgresql)

</comment></comment><comment><USER19> Hot damn, looks like CLUSTER is exactly what I need to handle a pending performance problem! I'd searched for this before, but not knowing the keywords just ended up with people saying "add an index", which was not useful:

We have a table of denormalized data that's used as one of the inputs to an ETL system, and it has to be sorted by one of the columns in the table. This is the table's only purpose. Unfortunately, postgres refuses to use the index because random-access across the entire table is slower than loading and sorting it all, when retrieving all data in the table. This means the ETL system has to wait for about 15 minutes before any data is returned.

Some preliminary tests on a copy of the database indicate that, using CLUSTER to order the data, it will do an index scan instead of a the table scan+sort, and start returning data immediately. As long as the correlation remains high enough with regular updates, I'm thinking maybe this can be a scheduled once- a-week operation...

<comment><USER20> Highly recommended to check out the pg_repack extension for this situation. CLUSTER requires an access exclusive lock, preventing anything from reading or writing the table during the cluster operation. pg_repack works around this by creating new tables with your data, clustering those, recording/replaying all of the transactions that happened on the original tables during that time, and then renaming everything (something along those lines). Very noticeable speed improvement and reduction in read loads when I did it last.

<comment><USER19> In my tests earlier, CLUSTER only took about 5 minutes (8 if you include creating the index (which would already exist) and an ANALYZE afterwards), and the only things inserting into this table are background celery processes. It would also be offset from when ETL runs by half a day, so I don't think there'll be any performance problems.

My goal for now is minimal effort to set up, so it takes minimal maintenance later on, but I'll keep pg_repack in mind in case something weird does happen.

</comment></comment></comment><comment><USER21> A few other tips:

1) A reminder that when you have a foreign key, such as Order table has a UserId column, and UserId has a FK to User -> Id table, there is an implicit lookup that will happen on the Order table if you attempt to delete a User, to validate its deletion wont violate the Order UserId FK.

For example: DELETE FROM User WHERE Id = 1

This will require the database to first check that won't violate a FK on Order.UserId:

\-- Implicitly (something like this) is done to validate UserId = 1 is not in use on Order.UserId that has a FK to User. SELECT Count(*) FROM Order WHERE UserId = 1

This can lead to poor update/delete performance on the User table (if the row was deleted or the User.Id was ever changed-- a convoluted example), unless you remember to place an index on Order.UserId column to help with FK enforcement.

2) If you use SQL Server, and you have a large table, and a few times a month for some reason queries that were working fine yesterday suddenly timeout, but then start to run quickly again for a while, its probably because of SQL Server suddenly deciding to recalculate statistics for its optimizer, and the query that is timing out, is the lucky query chosen to require the recalculation to happen first.

The recalculation usually involves SQL Server scanning the table before proceeding ahead with your query, and if the query times out, its re- computation of stats is rolled back (so it keeps failing, until it eventually gets to complete the query).

A workaround that has worked for us is to enable asynchronous statistics, so that the re-computation won't block the query that happened to trigger the re- computation in the first place:

[https://www.mssqltips.com/sqlservertip/2904/sql-servers- auto...](https://www.mssqltips.com/sqlservertip/2904/sql-servers-auto-update- statistics-async-option/)

</comment><comment><USER22> I was expecting a punch line on that comic strip. nothin.

Regarding the "Always Load Sorted Data" section, it says to insert the data into the table so that the column you want to select on is already sorted, thus having a correlation of 1.

What if I'm adding a single record to the database, how do you re-sort them all upon insert?

<comment><USER8> By "load" I'm pretty sure they mean "insert initial data into an empty table." So a different use case.

In ETL work, for example, it's not uncommon to truncate and reload source and staging tables on each batch run. So the tip would be helpful in those scenarios, more than in an OLTP case (insert this record, update that one).

</comment></comment><comment><USER23> First trick shows that update and delete should have a special syntax for when you really mean all rows:

       UPDATE users SET email = lower(email)

This should return an error: "do you mean all rows?"

       UPDATE users all rows SET email = lower(email)

Or something like that.

<comment><USER24> I've often thought the WHERE clause should be required. You could just say WHERE 1=1 if you really meant all rows.

<comment><USER19> This is a settable option in mysql: [https://dev.mysql.com/doc/refman/8.0/en/server-system- variab...](https://dev.mysql.com/doc/refman/8.0/en/server-system- variables.html#sysvar_sql_safe_updates)

<comment><USER25> That option is slightly less convenient than just requiring a WHERE or LIMIT clause, because it specifies that the WHERE clause has to have a key constraint. You can still do approximately the same as the 'WHERE 1=1' trick with something like this:

           UPDATE users SET email = lower(email) LIMIT COUNT(email)

if you want. I kind of like that, because it requires you to be more explicit than just putting 'WHERE 1=1'. It seems like mistakes would be fewer, too, because putting LIMIT COUNT(email) isn't just some default boilerplate you can get used to typing.

<comment> uhoh-itsmaciek Doesn't that skip counting null emails (though not filtering them for lowercasing), meaning you may not lowercase all emails if you have any null emails?

<comment><USER26> Nice catch, Google searched it:

> Not everyone realizes this, but the COUNT function will only count the > records where the expression is NOT NULL in COUNT(expression) . When the > expression is a NULL value, it is not included in the COUNT calculations.

</comment></comment></comment></comment></comment></comment><comment><USER27> Well written and informative, thank you for sharing.

</comment><comment><USER28> Nice list, but maybe worth mentioning that the slightly dangerous "invisible" index suggestion can in many cases be avoided with planner hints if the query- under-tuning only touches one index. So a much better approach would be smth like:

SET enable_indexscan TO off; SET enable_indexonlyscan TO off;

</comment><comment><USER29> That gave me flashbacks to using a dreadful ORM years ago that was incredibly bad at doing updates. Combine that with code generated from UML diagrams resulting in tables with hundreds of columns and every time you updated a single field _every_ column got written out.....

<comment><USER30> ORMs should probably be treated as technical debt in the sense that they help you deliver something more quickly but force you to refactor your code once you need scalability/performance.

<comment><USER31> I would argue otherwise. The way I see it, technical debt is code that is more complicated than necessary for a feature. On the other hand, a good ORM makes your app code less complicated.

You only need to refactor to use raw SQL in the rare edge cases where you need more performance. At least working with RoR I find these cases extremely rare (less than 1% of the cases by my estimate).

<comment><USER32> my 'go to' recently has been - use the basic ORM if I'm dealing with one (or maybe a small handful) of things where I'm doing work local to the request on those specific items.

use _just_ a query builder that returns a raw array for times when it's just being shipped down in JSON to a client. The overhead of full ORM - <USER2> to full objects internally - often for hundreds or thousands of records - <USER3> not worth whatever small conveniences might be afforded via a full ORM usage.

</comment></comment></comment></comment><comment><USER33> The role "Application DBA" doesn't seem right. Is this common?

<comment><USER19> I haven't heard it by name, but the description is something I've heard of before - usually when app devs are complaining about only being able to query/update the database through provided views/stored procedures, so it becomes a pain to support new features.

I remember one story in particular where the app devs discovered one of the stored procedures could be manipulated to run arbitrary SQL, so they started using that instead of talking to the DBA...

<comment><USER32> war story:

worked in at least 2 different shops with the same restriction: "developers can never touch production database".

actually, it's been that way in _most_ places large enough to have enough staff to separate things out. however, in most of those places, a dev or two would still have access to use, whether for emergencies or debugging or whatnot.

In 2 places, there was an enforced rule, where the DBA (in both cases, one and only one person) had the sole password/credentials for production. "Devs can't ever be on production, they could write random SQL - everything has to be tested". The person who said this would _routinely_ write his own sprocs on the DB - on production only - without tests. he acted as a support person for the owners - he'd just write sprocs and custom query on production only for any reports or data updates owners and upper mgt wanted. But... those sprocs were never documented, tested, or pushed back to dev, so we never knew what was running there. If we asked for a new table, or new index, or whatever, that might cause some trouble for his hidden/untested code, we'd get blanket denials. "that causes a performance bottleneck - won't do".

The "complain about the DBAs" issue is real, but is just symptomatic of bad culture all around. It's just as bad to have any cowboy running rampant without any visibility in to what they're doing. But sometimes (often?) DBA folks seem to escape this scrutiny (perhaps just at smaller shops?)

</comment></comment></comment><comment><USER34> Usually this job title is development DBA or PL/SQL developer.</comment>