Ask HN: How do I understand Rust? - <AUTHOR> Serious question. I've been trying to learn Rust for a month now and I keep end up fighting the compiler with borrowing errors.
I'm really not sure where to turn for help. It seems like everything I know about structuring a program goes out the window when borrowing comes into the picture.
Thanks. <comment><USER3> > It seems like everything I know about structuring a program goes out the > window when borrowing comes into the picture.

Try to avoid structured programming and mutable state where possible. Apply functional programming idioms and use immutable data structures if you can. Rust adopts many features from functional programming languages: [http://science.raphael.poss.name/rust-for-functional- program...](http://science.raphael.poss.name/rust-for-functional- programmers.html)

Borrow checker will interfere only when you are trying to manage mutable state that is hard to reason about. If you absolutely must keep some mutable data structure around, you can fall back to unsafe code. There is nothing wrong with it, but make sure to put all unsafe code into separate module and provide only safe interface, that is absolutely unbreakable no matter how you use its public API.

Make sure you know about this module: [https://doc.rust- lang.org/std/mem/](https://doc.rust-lang.org/std/mem/) It is nearly impossible to create complex data structures without it, even linked list implementation requires it. Learn to use replace, swap and .take(). These functions provide great example of a safe API for unsafe operations.

<comment><USER4> > Apply functional programming idioms and use immutable data structures if you > can.

How would you implement efficient and flexible graph algorithms using these techniques? E.g., considering that edges need to be traversed quickly, updated quickly, etc., and graphs are arbitrarily complicated (not just trees or DAGs).

<comment><USER5> Indirect the graph connections. This is almost always a better design anyway. Instead of storing pointers from one graph node to another, give each node an identifier and store a map from identifiers to nodes. Each node then has a set (or other collection) of identifiers it's connected to.

You can use either a mutable or immutable map for this construction.

<comment><USER6> That's basically the "don't keep references into a Vec, keep indices" advise. I don't really like that because references explicitly encode the dependency in the type system. When you start juggling indices you're basically implementing poor man's malloc. You need to make sure you don't lose track of any of them.

I think owned objects should have lifetimes and a "points to non-moving memory" property. E.g. a vec can be moved and must outlive all the objects that take references from it. That way it would be possible to keep an owned object and refs to it in the same struct and pass the whole bundle around.

<comment><USER5> > You need to make sure you don't lose track of any of them.

This is a fair point, but note that in any memory management scheme except garbage collected, you run the risk of having a dangling reference if you use direct pointers to other nodes. At least with node identifiers, you can safely check that the other node still exists, in _any_ memory management scheme.

</comment></comment></comment></comment></comment><comment><USER7> I found that my brawls with Rust's borrow checker ended when I made ownership the focus of my code design. Coming from a C++/Objc/Go background I was used to creating an object on the heap and holding a reference counted/garbage collected pointer to the object wherever it was used. This is shared ownership of state, a style of coding Rust considers to be so egregious that it is a compile error.

Initially I would use constructs such as Rc<Box<T>> in an attempt to write Rust code in my old style. It took some time for me to realise that Rust's borrow checker was not just designed to avoid occasional data races, but shared ownership of state as a whole, and the problems it causes. Once I ceased trying to resolve each localised problem with the borrow checker, and I designed my code such that each and every object has a clear owner responsible for creating, maintaining and destroying it at all times during execution, I have had no further problems.

At the point you "get it", it is worth comparing the code you eventually wrote to the code you would have written initially. For me, it seemed that Rust's borrow checker had forced me to code in a better, safer style, rather than brainwashing me into thinking it had, so I have continued using Rust.

<comment><USER8> >" Coming from a C++/Objc/Go background I was used to creating an object on the heap and holding a reference counted/garbage collected pointer to the object wherever it was used. This is shared ownership of state, a style of coding Rust considers to be so egregious that it is a compile error."

Is the idea that because anyone else can come along and make reference to the same object on the heap mean "shared" in this context? If so would the opposite of "shared" be "owned" or "owned exclusively"? Is this what borrow checker is "checking" then?

<comment><USER9> In C++ the closest equivalent is probably unique_ptr [1], which only lets one reference exist at any given time and destroys the pointer when it goes out of scope, but also allows transferring the ownership to someone else. The C++ equivalent of Rust's Rc (reference counted pointer) is std::shared_ptr.

[1] [http://en.cppreference.com/w/cpp/memory/unique_ptr](http://en.cppreference.com/w/cpp/memory/unique_ptr)

<comment><USER8> Thanks for the responses, these are really helpful.

</comment></comment></comment></comment><comment><USER10> Basics:

When you're writing (or read someone else's) functions, you should be considering three types of parameters:

      * (&)     borrowed
      * (mut &) mutably borrowed
      * ()      moved

The borrow operator should be your default/go-to decoration. Don't use the more destructive exchanges until the compiler forces you to. As I write this out, I'm thinking this might be a small short-coming in Rust's design. I.e., read/borrowed should maybe be the default/undecorated behavior and special pains should be required to move a reference.

Anyway, borrowed means, "I just wanna read some stuff off of that. I promise not to change a thing!"

Mutable borrowing means, "Gimme that--I'm going to change it! Expect it to differ as part of the output of this function."

Moving means, "That's mine now! I'm going to wreck it beyond any usage you'd try to do after I'm done. If you think you still want it, better hand me a clone."

It might also be good to spend some time working through the book if you haven't already: [https://doc.rust-lang.org/stable/book/](https://doc.rust- lang.org/stable/book/)

Here're some HN comments about advanced patterns:

      * https://news.ycombinator.com/item?id=13470592#13470904
      * https://news.ycombinator.com/item?id=13470975
        * Also recommends http://cglab.ca/~abeinges/blah/too-many-lists/book/

<comment><USER11> Is the borrow syntax (&x) a reference while vanilla (x) is by value? Or are both passed by reference but with different ownership affects?

Reason I'm asking is I got hung up the other day on passing a String to a function that accepted &str which someone explained to me Strings dereference to &str but I think I just ended up more confused.

<comment><USER10> > Is the borrow syntax (&x) a reference while vanilla (x) is by value? Or are > both passed by reference but with different ownership affects?

This is briefly addressed in the FAQs:

"What is the difference between passing by value, consuming, moving, and transferring ownership?

These are different terms for the same thing. In all cases, it means the value has been moved to another owner, and moved out of the possession of the original owner, who can no longer use it. If a type implements the Copy trait, the original owner's value won't be invalidated, and can still be used."

[https://www.rust-lang.org/en-US/faq.html#what-is-the- differe...](https://www.rust-lang.org/en-US/faq.html#what-is-the-difference- between-consuming-and-moving)

There are more details in the chapter on the stack and the heap from the book ([https://doc.rust-lang.org/book/the-stack-and-the- heap.html](https://doc.rust-lang.org/book/the-stack-and-the-heap.html))...

"The stack is very fast, and is where memory is allocated in Rust by default."

"What do other languages do?

Most languages with a garbage collector heap-allocate by default. This means that every value is boxed. There are a number of reasons why this is done, but they're out of scope for this tutorial. There are some possible optimizations that don't make it true 100% of the time, too. Rather than relying on the stack and Drop to clean up memory, the garbage collector deals with the heap instead."

So unless your data structure is boxed, it's allocated on the stack and passed by value and different ownership effects apply as well.

> I got hung up the other day on passing a String to a function that accepted > &str which someone explained to me Strings dereference to &str but I think I > just ended up more confused.

String _literals_ de-sugar to &str. E.g.,

      fn borrow_str(s: &str) {}

      borrow_str("foo");         // This works
      borrow_str(String::new())  // this doesn't work

      fn take_str(s: String) {}

      take_str("foo")            // Doesn't work
      take_str(String::new())    // works
      take_str("foo".to_owned()) // works

<comment><USER12> Tiny bit: string literals don't desugar to str, that is their actual type.

&String will coerce to &str thanks to Deref coercions.

</comment></comment></comment></comment><comment><USER13> "I keep end up fighting the compiler with borrowing errors."

To set expectations, I tell everyone that I've encouraged to try Rust that they will hit this same problem, then hate themselves and want to give up on computers and live in a cave. Once they understand that they aren't just going to "get" Rust in four hours reading the book while Seinfeld is on in the background, I tell them that when they get frustrated with the borrow checker, just re-read the "Ownership" and "References and Borrowing", "Lifetimes" chapters from the book and then rinse and repeat. I tell them that by the fourth or fifth time it will "just click". So far, so good.

I know this isn't the most ideal method, but until it's cemented, you don't really understand the mechanics of what you're able to get away with. Persist... we've all gone through your frustrations, but can see the awesome bright light at the end of the tunnel (no, it's not a train).

</comment><comment><USER14> > I'm really not sure where to turn for help.

I get most of my help on #rust on IRC. But for those who don't prefer that the discourse site [https://users.rust-lang.org/](https://users.rust-lang.org/) is probably idea. Or if you prefer reddit, do /r/rust -- they have a weekly sticky thread for questions IIRC.

The community is super friendly so "I'm really not sure where to turn for help" should be easy to solve. IMO just keep asking questions until you can internalize the rules you're getting help with.

>It seems like everything I know about structuring a program goes out the window when borrowing comes into the picture.

I know squat about borrowing rules, but why not just toss things on the heap (is that 'Arc'?) until you get better?

BTW -- do you already have some familiarity with 'C'? IMO that might be a simpler place to start. It has virtually none of the borrowing rules but perhaps you could quickly find out why they exist in Rust.

<comment><USER12> Yes. OP, please drop by IRC, the forums, or Reddit. We are extremely happy to work through issues and help explain what's going on, generally. Half the time during US working hours you'll literally get me.

</comment></comment><comment><USER15> Here's my understanding. Please correct me if I am wrong. Visualizing your program as a tree of values that are borrowed, owned, mutated through variables helps in reasoning about the borrow checker

When a variable owning a value goes out of scope all the children goes with it. Remember in rust, there can only be one owner to a value (Rc and Arc variables lets you have multiple owners but that's for special cases). Therefore, if you're passing a variable to a function you should either

1.) transfer ownership to the function being called.

2.) have the function being called borrow the value through references. Since this doesn't transfer any ownership you can have multiple references to the same value. The value and its children (think of a Vec<Animal>) are taken down from the tree it belongs when the variable owning this value goes out of scope.

That's the cool thing that does rust does. The compiler knows when to free things just by following this one rule. A value should have only one owner. The responsibility of managing memory is now taken by the compiler instead. Hence no dangling pointers or segmentation fault unless you use `unsafe` blocks where this assurance isn't valid anymore.

Visualize your program to be manipulating these multiple trees made up of diverse types.

</comment><comment><USER16> I've been doing software dev since I was a kid. In my mid-30s now. I spent almost a month with Rust about a year ago. I was very disappointed. The borrowing rules seem to have changed as the language had evolved. I found the Internet documentation to be very confusing. My conclusion was to let Rust be. It felt like coding with restraints, and as my Rust expert friends tell me, that is the way it is supposed to be. My friends write kernel modules, do low level systems etc. where they know exactly what they are doing. I mostly do exploratory programming. I think Go, Elixir and Python are the best languages for the kind of stuff I'm interested in.

<comment><USER17> Interesting. I wonder what most people's thoughts are on the market/target area for Rust. My complete outsider perspective was that Rust was a "replacement" for C, C++, Ada, etc., and that "most" programs would be better suited to be written in higher level languages.

</comment></comment><comment><USER18> Whenever someone asks this question, I point them at this...

Learning Rust With Entirely Too Many Linked Lists: [http://cglab.ca/~abeinges/blah/too-many- lists/book/](http://cglab.ca/~abeinges/blah/too-many-lists/book/)

The point of this tutorial is not "wow it's hard to write linked lists in Rust", but that Rust supports a number of different memory models, and this tutorial takes you through each of them by writing a linked list using each one.

Additionally, it's snarky and entertaining.

All that said, I think it's a really good crash course on the Rust memory model, and once you have your brain wrapped around the various approaches, it should hopefully make it easier to understand how to avoid encountering those borrow checker errors.

</comment><comment><USER19> Do you understand how to write code in, say, C? Like do you understand the scope of manually managing memory, not making memory safety errors? When I run into borrow checker errors I try to think through exactly who owns what and who will free it when.

</comment><comment><USER20> I'd suggest having a look at the new (unfinished, but that affects mostly the later chapters) rust book. Here's the ownership chapter: [http://rust- lang.github.io/book/ch04-00-understanding-owners...](http://rust- lang.github.io/book/ch04-00-understanding-ownership.html)

</comment><comment><USER21> Object ownership varies widely by language (I just wrote up a survey of why - [https://codewithoutrules.com/2017/01/26/object- ownership/](https://codewithoutrules.com/2017/01/26/object-ownership/)), and no one ever teaches object ownership as an explicit skill (it's always implicit with each language's semantics). So it's pretty natural that switching styles would be difficult.

Perhaps if you understood _why_ these are rules are in place, or compare to other rules from other languages? GNOME project has nice strict rules for C: [https://developer.gnome.org/programming- guidelines/unstable/...](https://developer.gnome.org/programming- guidelines/unstable/memory-management.html.en)

(Full disclosure: never written any Rust, have just skimmed docs.)

</comment><comment><USER22> Your post might possibly drown soon here, so..

> I'm really not sure where to turn for help.

both StackOverflow and reddit.com/r/<yourproglanguage> have rarely if ever failed me..

</comment><comment><USER23> Hey, I also started learning Rust not so long ago (~5 months).

By the sounds of it didn't have _quite_ as much trouble as you're experiencing.

Having said that, I found experienced Rust developers grossly under estimate how hard it is for newcomers to the language (having asked questions on Reddit's r/rust which gave the impression these are some concepts developers can learn, then move on without too many troubles).

A re-occurring problem I found is while everything I could read made sense on paper - composing concepts to make real-world, you run into _many_ random problems that you don't even have the vocabulary to properly question or troubleshoot.

I found this works well:

* Ask general big-picture questions on Reddit.

* Ask spesific technical questions on StackOverflow.

* Ask various short/general questions on IRC (#rust).

As for fighting the borrow checker and compiler errors generally - ask some more experienced Rust developers if you're taking the wrong approach entirely. If this project is too complicated, try pick some simple projects where you're not continuously running into borrow checking errors. You'll still hit them from time-to-time, but then at least you're not overwhelmed by compiler errors.

</comment><comment><USER24> _It seems like everything I know about structuring a program goes out the window when borrowing comes into the picture._

You can substitute concurrency for borrowing. Congrats. You're on the path towards understanding another paradigm. You're on your way to expanding your mind and growing a bunch of new neural connections. The learning curve means the eventual triumph will be that much better.

</comment><comment><USER25> It really depends on what you are trying to do. Spending a month fighting the borrow checked doesn't seem normal to me.

If you are implementing data structures and stuff, you might want to read more about the actual limitations of the borrow checker. Some kinds of code just can't be done with the constraints of the borrow checker. Embrace unsafe blocks and then gradually try to move as much code as possible away from those unsafe blocks. Try to think of "unsafe" as merely "unverified by the compiler". There is nothing inherently evil about unsafe.

If you are doing more application-level programming, I recommend you to get acquainted with the functional style of programming, if you haven't done this yet. Pick a more conventional language and then try to implement something using as few assignments as possible. Get used to and embrace immutability. Once you are used to immutability, Rust will be much easier too.

</comment><comment><USER26> It is likely that your structure is in fact allowing _potential_ errors to enter into the picture. Most of the time in C or C++ you would ignore them since it is obvious to you where things will be owned and not owned as the program progresses, but the compiler is must more strict and it will not allow any potential errors to exist. I don't think you will find a shortcut around identifying those areas until you work through them a bit.

The other big thing that I wrestled with was my idea of in place mutation of data, and how much rust hates that. It took a while for me not to feel so bad about making a local variable to maintain ownership of some memory and "moving" it in and out of some parent structure. While it might look bad, there is a deal of trust you need to have with the compiler that it will in fact optimize out those move, and your main goal is to make sure ownership is explicit.

</comment><comment><USER27> Well, I think a couple of points:

1\. An outline of the problem you're trying to solve helps 2\. You should really stop by the #rust-beginners channel on IRC. Everyone is super friendly

Glad to see that you're trying Rust, and if I'm there when you stop by - <USER2> to help if I can!

</comment><comment><USER28> Try a "back-to-basics" approach of writing less structured code, as in, factor it less, use more plain data structures, just write straight-line imperative blocks of code. This is actually the path of least resistance in most languages, but they all offer shiny features and don't stop you from overcomplicating it by prematurely distributing functionality into abstractions.

</comment><comment><USER29> Read more open source code. I'm not sure what project to recommend, maybe some of the [https://tokio.rs](https://tokio.rs) related projects? (e.g. [https://github.com/tokio-rs/tokio-core](https://github.com/tokio-rs/tokio- core)).

</comment><comment><USER30> Try these screen casts: [http://intorust.com/](http://intorust.com/)

<comment><USER31> That `into` is so evil, I could not be used again if I'm `into_rust()` :(

<comment><USER32>
        pub fn as_rustacean
(&mut person: P) -> &mut R where P: Programmer, R: Rustacean;</comment></comment></comment>


Ask HN for help to find a missing person - <AUTHOR>

Hi guys,
I have a friend who's brother lives in Canada and has been missing for 3 weeks. When I say missing he has not returned calls (his phone is off), he hasn't been online (as far as she can tell) and the family does not know his friends v well (he's recently moved to Canada). They've messaged his FB friends to no avail.
Need any inspiration you may have - how do you find someone who is missing? I am sure he is ok but the family are understandably worried. He is known to be unreliable but not as bad as this. Any advice you may have would be great.
Thanks <comment><USER2> Contact your local police department. They should ask you some questions, and evaluate whether it is something they can act on. If you are concerned enough to ask on here, you probably have reason to ask for help.

Good luck, and don't ignore your gut feelings.

</comment><comment><USER3> _how do you find someone who is missing?_

Amass all the data I can about someone (personal details, online handles, trickery, etc) and crunch data.

HN really isn't a good forum for this, you should try <http://reddit.com/r/rbi/> or similar.

If you do post a request there, make sure you post plenty of details to go off of, otherwise you're wasting their time.

Alternatively, comb /r/rbi for techniques and go off on your own. They're a bunch of amateurs over there, but they're somewhat effective :)

</comment><comment><USER4> Ok since you are on HN let me tell you a hack that I learnt here.

Order him a pizza from a local pizza place near your friend's house with your credit card. Get the pizza guy on the phone when he is at your friend's address. This way you will at least know if he is at home and maybe talk to him if he is there. You can even make the pizza guy ask the neighbours or leave a note on his door. Dont forget to tip the pizza guy through paypal or something.

</comment><comment><USER5> If he wants to be missing, there might not be much you can do. If you know where he lives, you can find someone in the area to knock on his door and check if he's there. In some cases you can also call the non-emergency line of the local police and ask for a "welfare check" where they will drop by and check on the person. If the family suspects something is wrong, they can file a missing persons report with the police.

</comment><comment><USER6> There have been recent articles about police finding offenders by using Pintrest. Perhaps you can do something similar. I would suggest organizing an online campaign to disseminate your friends brothers image. Local distribution of his image will help as well, especially in stores. Ask if you can hang a sign in your friends brothers grocery store, CVS, etc etc.

</comment><comment><USER7> I don't have an answer for you but I recommend checking reddit instead, seems more suited for this type of question.</comment>


Ask HN: Shouldn't you want Corvid-19? - <AUTHOR> If you do not fit a high risk profile shouldn't you want to get corvid-19 when you're young and healthy and build immunity. Just how mothers want their children to get chicken poxs? What are people's thoughts on this? There has been countless epidemics in human history and that will continue. What doesn't kill you makes you stronger right? <comment><USER2> The virus isn't understood well enough yet. It's not your standard virus. For example animals are carriers and can be infected ie. pets. Let me answer your question with a question - do you want to get aids?

As an example, Not to stigmatize aids patients. Were also learning that recovering from virus does not mean immunity. Several cases of reinfection already present. Why put yourself at risk if it's not well understood.

</comment><comment><USER3> That last statement is not really a true. There are a great many things which do not kill you and leave long term negative impacts. There are many diseases that your body can fight off but long lasting damage remains and that damage can even be passed on to offspring.

While people are generally resilient it's a bad idea to knowingly get harmful diseases due to the long term impacts. Your example of Chicken pox parties are regarded as a bad idea universally by the medical field, it would be smarter to get the vaccine. Mother's who want their children to get it are miseducated on the subject.

While there will always be something new, modern hygiene practices, when followed, greatly hinder the spread of things until proper treatments and vaccines are developed.

One of things that I would like to see happen is the use of natural antibacterial and antiviral metals used for commonly touched items. We know that copper containing alloys do this. I'm sure with study there could be other cheaper ones found which would be an easy augment to standard hygiene.

<comment><USER4> > natural antibacterial and antiviral metals

[https://en.wikipedia.org/wiki/Oligodynamic_effect](https://en.wikipedia.org/wiki/Oligodynamic_effect)</comment></comment>


In Tech Buying, U.S. Still Stuck in Last Century - <AUTHOR> http://www.nytimes.com/2013/12/23/us/politics/in-tech-buying-us-still-stuck-in-last-century.html <comment><USER2> _Longstanding laws intended to prevent corruption and conflict of interest_ [impose significant costs]

Just because they have costs to them doesn't make them bad. But maybe there are more efficient ways to police corruption? Or maybe a small amount of corruption is acceptable, if the cost of preventing it would be greater than the amount lost?

 _The Standish Group, an information technology firm, deemed just 4.6 percent of large-scale government contracting projects executed in the past decade to be successful. More than half were "challenged," and about 40 percent simply "failed."_

[https://www.google.com/search?q=percent+of+software+projects...](https://www.google.com/search?q=percent+of+software+projects+that+fail)

Reported numbers vary widely, but a 40% failure rate doesn't sound clearly worse (or better) than private industry. The 4.6% success rate sounds rather bad, but a quick look doesn't immediately show private industry numbers to compare to.

<comment><USER3> Laws that were meant to provide fair competition now act as a barrier to entry for companies that don't cater specifically to the government. This leads to fewer bids from the same companies. Those companies are happy to keep the anti-corruption laws in place.

They also bias towards fewer, larger purchases, which is a recipe for failure for something like logistics software.

</comment></comment><comment><USER4> Bureaucracy ( where success is measured in how confidentially a PowerPoint can be presented and how well you can say "synergy" with a straight face ) can't design and manage software creation.

This is not going to change because why would the bureaucrats give power to the technocrats?

It's not like they're going bankrupt. Incompetent middle mangers, management by crisis of the month, accountants and contractors running the systems would mean bankruptcy in the business world. In government, it's more muddle to manage and "a budget increase would fix the problem".

<comment><USER5> > _Bureaucracy ( where success is measured in how confidentially a PowerPoint > can be presented and how well you can say "synergy" with a straight face ) > can't design and manage software creation._

How's that different from the private sector?

Note, I'm not asking if they differ in other stuff -- I'm asking what they do different regarding what you described above as a characteristic of government bureaucracy.

> _Incompetent middle mangers, management by crisis of the month, accountants > and contractors running the systems would mean bankruptcy in the business > world._

Well, not in the financial sector and "too big to fail" corporations either. Or how about Detroit and it's bailout?

<comment><USER6> The difference is the stakes to the employee. As a private-sector employee, unless you're committing fraud, you maximum consequence is termination.

The government is different. Violating procurement rules is often a criminal act. So the civil servants build walls of process to protect themselves.</comment></comment></comment>


Ask HN: For a greenfield API which would you use: REST, GraphQL, other? Why? - <AUTHOR> * This would be assuming current technologies (or those that are likely to be usable in production in the next 3 to 6 months). * Want to be usable by a wide range of clients that may be outside of the control of the API creator. * Normal caveats about security, maintainability, etc. * Assume a Web API.<p>Edit: added assumption about Web API. <comment><USER2> Depends on what does it need to do, but you most probably will need a regular RPC instead of trivial CRUD (REST) or mostly data query (GraphQL). Though RPC is not fancy nor sexy, so most web developers this days won't even look at that.

<comment><AUTHOR> The question is intentionally generic as I am trying to find out what most folks would do if they were starting with something fresh. Your comment reminded me I needed to narrow the focus a bit. I edited the question to add an assumption that this is a Web API.

<comment><USER2> I don't know why did you get the impression that my comment somehow doesn't apply to API-first web services.

<comment><AUTHOR> I didn't - it just reminded me that some might take it in a more general way than I intended. :)</comment></comment></comment></comment>


We say: Better social network is possible! - <AUTHOR> http://www.whapsy.com

<comment><USER2> TL;DR: Just another social network that claims it's different.

Their claims:

\- You can follow anything that interests you easily on Whapsy (Which you can do in any other social network or even content sites these days.)

\- You can reach a wider audience easily by using Whapsy (You can reach a wider audience when you sign up to any other social network as well.)

\- You gain an omniscient point of view on Whapsy (Wow, omniscient! WTF does that even mean? "You can see every event from a different point of view." What does that mean? Well, just go ahead and give them your email. What are you waiting for!)</comment>


Google Kubernetes Engine– How to Deploy Spring Boot Microservice - <AUTHOR> https://jhooq.com/deploy-spring-boot-microservices-on-kubernetes/#part-2 <comment><AUTHOR> Google Kubernetes Engine - How to deploy Spring Boot microservice

Step 1: Create a project After the login goto "My First Project" and click on it.

Step 2 : Create Cluster If you haven't selected your project then please do select from "My First Project " menu. After than navigate to "Kubernetes Engine" menu in the left hand side and then click on "Cluster"

Step 3: Push spring boot docker image to google container registry(gcr.io) 1- Download the google SDK from the ttps://cloud.google.com/sdk/docs/downloads- versioned-archives

2- Now you need to goto directory – google-cloud- sdk-294.0.0-linux-x86_64/google-cloud-sdk run the install.sh

$./install.sh

$ docker build -t gcr.io/jhooq-sprinboot-k8s-demo/jhooq-springboot:v1 .

$ docker push gcr.io/jhooq-sprinboot-k8s-demo/jhooq-springboot:v1

Step 4: Deploy the spring boot microservice inside kubernetes cluster

1– Connect to cloudshell. Click on the connect button for the cloudshell 2– Now we need to do kubectl deployment, use the following command for the creating the deployment

$ kubectl create deployment jhooq-springboot --image=gcr.io/jhooq- sprinboot-k8s-demo/jhooq-springboot:v1

deployment.apps/jhooq-springboot created

3- expose deployment on external IP

$ kubectl expose deployment jhooq-springboot --type=LoadBalancer --port 80 --target-port 8080

service/jhooq-springboot exposed

Find the external IP of service, so that you can access the spring boot microservice outside of the network

$ kubectl get service

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE jhooq-springboot LoadBalancer 10.64.8.231 126.96.36.199 80:32537/TCP 11m kubernetes ClusterIP 10.64.0.1 <none> 443/TCP

Now you can access your rest end point with the external IP .i.e. [http://22.214.171.124:80/hello](http://188.8.131.52:80/hello)</comment>


Aereo Wins Appeal - Trial Likely for Streaming TV - <AUTHOR> http://www.nytimes.com/2013/04/02/business/media/aereo-wins-in-appeals-court-setting-stage-for-trial-on-streaming-broadcast-tv.html?_r=0

<comment><USER2> I've signed up for Aereo when it comes to Tampa. We currently have Netflix, HuluPlus, and often buy movies on Amazon Instant. $8 Aereo + $8 Netflix + $8 Hulu = $24. Add in $4/movie on Amazon for one/two movies a weekend and you can spend less than $50/mo and have access to near infinite amount of good content and live content when you want.

Cable companies didn't have to offer à la carte packages because the market, despite tremendous barriers, made that possible. Instead of picking channels, we pick the medium - Aereo (live local), Netflix (vast archived library and hopefully premium new content like House of Cards), Hulu (latest TV shows), and Amazon Instant (relatively new movies). This is very different from deciding if you want Discovery, HGTV, or HBO. Instead of picking genres, we're joining libraries. And I'm perfectly happy with that. In fact, I think this is a much better outcome than relying on cable companies to provide a good selection of TV channels.

My Roku and AppleTV can stream from many different libraries and I can turn the subscriptions on and off easily.

<comment><USER3> Why not just use an antenna? I'm missing something here. Aereo sounds nice for people who want to stay connected to their hometowns when living away, but if you're in Tampa why stream Tampa OTA TV when it's free over the air?

<comment><USER2> I tried. I spent $100+ dollars on various digital antennas but because of my location/trees/neighborhood, I barely get one or two channels, none of them clearly.

</comment></comment></comment><comment><USER4> This is the first I've heard of what sounds like brilliant technology. It'll take the power away from the networks... so of COURSE it'll get shot down. The only reason I can see them hating this, is that a user seeing broadcast TV from NYC yet living in Salt Lake City is not likely to be spending any money at White Castle Hamburgers...so advertising dollars spent have the perceived effect of deflation. I don't think it's right at all. Would it be illegal if I bought the land, put up an antenna and ran a cable across the country?

</comment><comment><USER5> I'd really like to see them challenge the FCC's silly geographical restriction too. There is no good reason not to let us watch NYC broadcast television from anywhere.

<comment><USER6> The geographical limitation is inextricable from the copyright limitation. Just because I intended to let you watch my TV show for free in NYC (by broadcasting it over the air) doesn't mean I wanted to let you watch it anywhere in the country.

<comment><USER7> Copyright holders are going to have to learn that the Internet is here to stay, that it is free from geographical restrictions, and that we are not going to halt the progress of technology for the sake of their antiquated business models. It takes less time to send a HD feature-length movie from Japan to New York than it takes to go to a video rental store. Times have changed, technology has improved, and we are not stuck with the same restrictions we had in the 1960s.

Red flag laws did not stop the automobile; why should copyright stop innovative uses of the Internet?

<comment><USER6> The fact that the internet is free from geographical restrictions doesn't mean that copyright holders don't get to impose whatever terms they want on your right to view the content they create.

> Red flag laws did not stop the automobile; why should copyright stop > innovative uses of the Internet?

Terrible analogy. With red flag laws, the obsolete industry was just getting between the transactional relationship between car manufacturers and drivers. In this case, the "obsolete" industry is creating the thing that's of real value, the thing that people want: content.[1] There is nothing stopping internet-savvy content creators from allowing their content to be distributed over the internet under liberal terms, other than the fact that people don't want that content, they want the big name content from the big name content producers. And internet companies, like Youtube, etc, who make money off other peoples' content have tremendous incentive to make it seem like a battle of "progress versus outdated industries" when what they want is to be able to make a profit by inserting themselves in the middle of these transactions.

<comment><USER7> "The fact that the internet is free from geographical restrictions doesn't mean that copyright holders don't get to impose whatever terms they want on your right to view the content they create."

In fact, copyright holders cannot impose restrictions on my right to view their work. The only difference here is that the viewing involves the Internet and the outdated assumptions about copying and media distribution upon which copyright is based. A very long time ago, geographic restrictions made sense, but those days are decades past.

Do not make the mistake of thinking that the law is handed down from the heavens. Laws can be out of date, and laws that were once good at promoting progress can wind up impeding it.

"With red flag laws, the obsolete industry was just getting between the transactional relationship between car manufacturers and drivers"

No, with red flag laws an obsolete industry was trying to impose restrictions on the use of a new technology to the point of making it impractical. It had nothing to do with car manufacturers, it was a law that targeted the users of automobiles. That is exactly what is happening in this case: the broadcasters and media conglomerates are trying to impose enough restrictions on Aereo's technology that it becomes impractical.

The problem with your view of this is that you are connecting the production of entertainment to a specific business model. Broadcast TV killed Vaudeville, and the Internet is killing broadcast TV. We had entertainment before copyright, we have had it with copyright, and we will continue to have it in the hypothetical post-copyright world (if we are lucky enough to see such a day).

"Indeed, it's internet companies like Youtube, etc, trying to profit by getting in-between the content producers and the content consumers..."

You are ignoring the history of those companies. Youtube would never have existed had the RIAA and MPAA not conspired, lobbied, and abused the justice system for the purpose of killing peer to peer filesharing. A promising, decentralized technology that allowed anyone to broadcast entertainment on a global scale was destroyed and companies like Youtube took its place.

<comment><USER6> > That is exactly what is happening in this case: the broadcasters and media > conglomerates are trying to impose enough restrictions on Aereo's technology > that it becomes impractical.

What restrictions are they trying to impose exactly, other than "do whatever the hell you want just with your own damn content?" You're completely ignoring that crucial distinction between this situation and red flag laws. Cars were not taking advantage of horse driven carriages in any way. Aero exists only to distribute the content of the big media networks. Nobody would subscribe to their service without that content. Nobody is suing to restrict the technology --they're suing to force Aero to not free-ride on their content.

> A promising, decentralized technology that allowed anyone to broadcast > entertainment on a global scale was destroyed and companies like Youtube > took its place.

Nobody "killed" P2P. Last I checked, I could still torrent Ubuntu ISO's all day long.

You keep bringing up stuff like "allowed anyone to broadcast entertainment on a global scale" then ignore the fact that nobody has shut down the technology that allows people to do this. You can put together your 18th century murder mystery home movie and distribute it over Bittorrent and it's 100% legal. It's just that nobody wants the random crap filmed by some guy in their basement. They want $100 million Hollywood blockbusters.

What's happening is that content companies are fighting to protect companies like Napster, Youtube, etc, from free-riding on content they didn't create. And I don't think technology changes anything in this regard. Just because technology makes it easier to profit from other peoples' creations doesn't mean that it's "holding back innovation" to keep people from doing so.

<comment><USER8> "What's happening is that content companies are fighting to protect companies like Napster, Youtube, etc, from free-riding on content they didn't create."

No one is stopping content companies from creating their own Napsters and Youtubes and making the money that the "free riders" are now taking. They have shown no willingness to do so even with so many profitable examples out there. If the companies had come out with something like Spotify back when Napster showed what the appetite for music was really like I suspect they'd be in a much better place now in both a PR and Profit sense.

</comment></comment></comment></comment></comment></comment></comment><comment><AUTHOR> I'm very excited about this!

I feel it's the beginning of the slow demise to the cable TV business model.

Aereo could easily add third tier cable stations or up and coming stations looking for an audience, i.e. Al Jazeera, Current TV and others. To fill in the void of no CNN, Fox News and others. ESPN though is a different story.

<comment><USER9> Why should they settle for third tier cable stations? I want HBO, Showtime, ESPN. If you're in the clear rebroadcasting Fox News you're in the clear with ESPN. How could -or would- you possibly see a difference? Copyrighted content is copyrighted content.

<comment><USER10> The issue is that they'd need an agreement with these stations. They don't need one with, say, NBC, because NBC is broadcasting their content over the air, and Aereo's arrays of tiny antennas are all receiving them. To do a similar thing for a cable station you'd need one cable subscription per user, which is pretty likely to wreck their business model. Third-tier stations looking for more viewers are more likely to license their stuff cheaply.

</comment></comment></comment><comment><USER5> It is a Rube Goldberg scheme, to avoid even sillier copyright law(s). Good for them, and us, I think.

<comment><USER6> It's not really the copyright law that was silly, but the precedent case Cablevision that created this silly loophole to something being considered a "public performance."

<comment><USER7> No, it is copyright law that is "silly." When we need to build antenna arrays just to get around ludicrously outdated restrictions, the problem is the restrictions. What makes copyright worse is that the restrictions it imposes on our use of modern technology have not remained in place because the wheels of politics are slow, but because our politicians would rather protect anachronistic business models than push society into a new age.

<comment><USER6> The restrictions in this context have nothing to do with politicians or the statute. They come from a loophole in the case: [http://en.wikipedia.org/wiki/Cartoon_Network,_LP_v._CSC_Hold...](http://en.wikipedia.org/wiki/Cartoon_Network,_LP_v._CSC_Holdings,_Inc).

The case made a big deal about the fact that Cablevision was streaming separate streams to each user, and therefore it wasn't a public performance. The correct answer would've been: IP unicast is never a public performance.

<comment><USER7> None of that would have been an issue if we simply did away with copyright and created a new system that made more sense in this day and age. We do not need a system that relies on huge, centralized monoliths to distribute our entertainment anymore, we made something better and are desperately hoping the law will catch up.

<comment><USER6> Last I checked, the law didn't do anything to keep consenting content creators and content consumers from using P2P or Youtube or whatever "something better" you're referring to. Absolutely nothing is stopping anyone from creating and using this whole alternative, 21st century system, and leaving those big bad media conglomerates in the dust. Other than the fact that people just want to watch House, or SNL, or a Sony BMG produced music video.

It's not copyright law that gives NBC, Viacom, etc, their power. It's the fact that people really want their products and aren't willing to settle for alternatives. All copyright does is keep the Youtubes of the world from cashing in on that demand by inserting themselves in the middle and trying to profit from the popularity of the big media products.

</comment></comment></comment></comment></comment></comment><comment><USER11> I could see something like this being very useful for watching out of town sports teams. For the NFL, I might want to tune to the local Fox/CBS station to watch some game that I wouldn't normally get in my market. That is, assuming it's legal...

<comment><USER12> You need a credit card with a billing address in the market area: <https://aereo.com/zips>

<comment><USER13> Fortunately, there are companies offering private mail boxes and forwarding services in most medium-to-large cities, so obtaining a billing address in the market of your choice isn't particularly difficult.

<comment><USER14> Right, but you'd also need a CC tied to that billing address, one that will presumably be billed monthly, so not a one-time throw-away. So you need a CC and a private mailbox service in every city you want to see TV. But that is really just circumventing the must-live-in-service-area rule, so subject to being found out and cut off.

The limitation on transmitting copyrighted works essentially creates a geographical monopoly with respect to television. Even if you could fly to another city and watch TV for free there, it is a copyright violation for a company to send you the signal from an antenna there. That's also why the Zediva rent-a-DVD-remotely was struck down: even if you own or rent the equipment, it seems illegal for the company to transmit the copyrighted work to you.

The ruling in the Aereo case gets around this because they limit their transmission to people who get the exact same free-to-air signal. There is still a transmission (which is what the dissenting judge based his argument upon), but the practical effect of getting the same content you would get otherwise seems to have prevailed, fortunately.

IANAL so I don't know how accurate that all is, but it's the understanding I've gotten from reading around.

</comment></comment></comment></comment><comment><USER15> IIRC, Aereo only lets you watch channels you could pick up with an antenna in your current location. So it's a DVR for the free channels you're already getting OTA, but with a much more convenient delivery mechanism (straight to your phone). And no need to set up an antenna, as they take care of that.

</comment><comment><USER16> For that matter the 'private one copy per user', is even simpler to maintain without actually requiring to store multiple copies. All they need is a deduplication mechanism at the storage layer, and store the files block wise. Legally they could prove that they are recording a copy per user, while they would be paying close to a single copy cost in terms of storage.

</comment><comment><USER17> I'm surprised that PBS was one of the plaintifs. I can't fathom how Aereo's service harms them, given that they do not show commercials. Do they believe that this is going to reduce the amount of people that watch telethons or buy their show on DVD?

<comment><USER18> PBS relies on syndication fees to fund their programming. If viewers were able to circumvent geographic broadcasts, it would undermine their national network system. Soon, only a handful of broadcasters or producers would be left, and anyone outside their area wouldn't have broadcasts any more.</comment></comment>


Why Would Aliens Even Bother with Earth? - <AUTHOR> http://lithub.com/why-would-aliens-even-bother-with-earth/ <comment><USER2> Flashing ads and several pop-ups. It's really sad what's happening to the web. What's wrong with a simple text page?

</comment><comment><USER3> Because we're delicious.</comment>


The Difference Engine - <AUTHOR> http://en.wikipedia.org/wiki/The_Difference_Engine

<comment><USER2> Why do people put random stuff from Wikipedia on HN? What is the point?</comment>


Ask HN: Where can I find statistics about remote work? - <AUTHOR>

I am writing a blog post about remote work in terms of large-scale long-term software engineering projects.
Could anyone point me to some statistics about that? I am specifically interested in statistics about people who work from a different location or outside the office for at least 3 days a week.
Thanks! Stefan <comment><USER2> Are you researching the US? If yes, the Bureau Of Labor statistics has this information: <http://www.bls.gov/bls/proghome.htm#employment>

<comment><AUTHOR> thanks!

</comment></comment><comment><USER3> I remember that most of the research seems to refer to it as teleworking.

<comment><USER3> This from quick google of 'teleworking statistics' [http://www.teleworkresearchnetwork.com/telecommuting- statist...](http://www.teleworkresearchnetwork.com/telecommuting-statistics)</comment></comment>


CoreOS images are now available on Google Compute Engine - <AUTHOR> http://googlecloudplatform.blogspot.com/2014/05/official-coreos-images-are-now-available-on-google-compute-engine.html <comment><USER2> I'm anxiously waiting for it to come to DigitalOcean. But the momentum they built now seems to be really strong.

<comment><USER3> Same, but it's been a year so far since the initial request opened so...

</comment></comment><comment><USER4> Would it make sense to use CoreOS on just one machine or is it only useful with multiple machines?

<comment><USER5> It would be great on one machine. First, it's a lightweight host for docker containers, like less than half the size, so you can do more with that single machine.

Second, if it ever turns out you _need_ a second machine, you have room to grow, other than just getting a bigger box.

<comment><USER4> Thanks!

</comment></comment></comment><comment><USER6> I am really surprised as CoreOS is super new to a lot of people and yet they managed to convince Google and Amazon to provide an image. That's amazing...

</comment><comment><USER7> Are the official images on EC2 or any of the other cloud compute platforms?

<comment><USER8> Sure are! On the home page ( [https://coreos.com](https://coreos.com) ) you'll find links to directions for various providers from EC2 & Rackspace to OpenStack & Vagrant. Each has the exact directions that will get you started with least effort (including image ids where appropriate and URLs otherwise).

</comment></comment><comment><USER9> Why no one is discussing this? Just curious. Is it a bug?

<comment><USER10> Why is pretty much no one using Google Compute Engine? That's the interesting question.</comment></comment>


Our 6 week product cycles - <AUTHOR> https://www.whitesmith.co/blog/our-framework-to-build-products/ <comment><AUTHOR> Hello guys. We are currently using this framework at Whitesmith. Would love to see what you think about it.</comment>


PWA Coming to Chrome for Desktop - <AUTHOR> https://browsernative.com/pwa-chrome-desktop-install-3681/ <comment><USER2> So one problem I recently found with PWAs that are a real issue, is that the user can't easily control the browser that is used for them on android.

We had a PWA that was having some really strange issues recently, only to find that some users were on really old versions of what looked like chrome (like versions 49, 51 and 56 as of last week).

We eventually found out that this was actually the "samsung browser" which is the default browser on many samsung phones, which is pinned to an older chromium version, and our PWA when installed was using that rendering engine, which was causing compatibility issues that the user has no ability to fix themselves.

I love the web platform, but this is a big problem. We are going the "wrap our app in a compiled chromium browser" route now, as much as it pains me to do it, because there just isn't any other option here.

Imagine if lenovo were to randomly decide that any software run on windows on their PCs will be run in a windows XP vm, and that there wasn't any easy way to change it... All because the company wants to add their branding and "optimize for their hardware"...

Yes, we could try to support these older versions, but seeing as these phones will most likely never get updates from samsung again, it would just prevent us from using any new features or new performance increases until these users leave us. So our options are to wrap the app in a fat wrapper that allows us to continue writing the best app we can for the most number of people, or intentionally hamstring the app for everyone to support a minority of users that are using phones abandoned by their manufacturer. (FFS Samsung's latest release as of late october 2017 was 6 months out of date the day they released it!)

Edit: Just saw another issue come through, user agent comes from a nvidia shield tablet, based on chrome 44, released 2015-07-21... That will never get another update. The oldest chrome version i've seen in our logs looks like 41 which was 2 weeks ago!

</comment><comment><USER3> While there may be some important technological differences here, from an end- user perspective they already achieved this 5 years ago ([https://blog.chromium.org/2013/02/chrome-app-launcher- develo...](https://blog.chromium.org/2013/02/chrome-app-launcher-developer- preview.html)), removed it 3 years ago ([https://blog.chromium.org/2016/08/from-chrome-apps-to- web.ht...](https://blog.chromium.org/2016/08/from-chrome-apps-to-web.html)), and now they're adding it back in.

I like that we're moving forward, but on the desktop this just feels like, "Hey, look what you can do again!"

<comment><USER4> I completely forget its name but wasn't there was a Mozilla project to do basically this a dozen or more years back? Obviously without the benefits of HTML 5 etc.

<comment><USER5> Yep, Mozilla Prism - there have been plenty of similar efforts both first- and third-party: [https://en.wikipedia.org/wiki/Site- specific_browser](https://en.wikipedia.org/wiki/Site-specific_browser)

They may even retain some use - on OS X, for example, you used to get issues with PWAs being considered part of the main browser process for cmd+tab and cmd+`. I've had to use SSBs to overcome this in the past.

</comment></comment></comment><comment><USER6> Finally, HTML5 apps for desktop, running in separate window without any additional downloads. A win for developers - no more building installers for each OS, and a win for users - running web apps on latest (and presumably safest) version of internet browser.

</comment><comment><USER7> This is at least since the last 3 versions of chrome around. Firefox added it on android since v58, desktop pending.

</comment><comment><USER8> Where does the name "progressive" come from?

<comment><USER9> Supposedly the "progressive" in PWA means[1]:

> _Work for every user, regardless of browser choice because they're built > with progressive enhancement[2] as a core tenet._

But from my experience I'd say they have little to do with actual progressive enhancement, i.e. content first development.

One thing that certainly is progressive for PWAs is how deeply the user decides to integrate the web app into their browser/OS. You can choose to allow push notifications and "install" the PWA into your home screen for example.

[1] [https://en.wikipedia.org/wiki/Progressive_web_app#Characteri...](https://en.wikipedia.org/wiki/Progressive_web_app#Characteristics)

[2] [https://en.wikipedia.org/wiki/Progressive_enhancement](https://en.wikipedia.org/wiki/Progressive_enhancement)

<comment><USER5> The seeming incompatibility of PWAs with Progressive Enhancement is something that's been bugging me for a while now.

As an earnest question, is Progressive Enhancement (i.e. graceful degradation, "unobtrusive javascript", etc) simply dead now? None of the frameworks out there seem to encourage it, I'm not sure if many even support those paradigms.</comment></comment></comment>


Flash Carbon Footprint of NYTimes.com - <AUTHOR> http://blog.kalio.net/post/400184540/flash-carbon-footprint-of-nytimes-com-100-toyota <comment><USER2> Except those blinking ads aren't useless—they bring in substantial amounts of ad revenue for the New York Times. So what is OP's point, exactly?

<comment><USER3> Presumably they'd burn even less fossil fuel if they went out of business.

<comment><USER4> Or at least shut down their website - and, obviously, their even more wasteful print edition.

</comment></comment></comment><comment><USER4> OMG Flash kills the planet too!!! (BTW, wonder what would be the carbon footprint if NYT switches its background to black? All these #ffffff pixels burning bright..)

<comment><USER5> I distinctly remember claims that for modern monitors the color does not change energy use.

<comment><USER6> It depends on the display type. Some displays emit energy based on the intensity of the image (CRT, Plasma). Others always generate light but then mask out the light with a matrix display which typically has a pretty constant energy usage (LCD, Projection). Still others only require energy only when they change (eInk, future color pigmentation eInk variations).

And of course power variations in each technology, FL LCD v LED LCD. Older Plasma displays vs newer Plasma displays. The size of the display, (your 52" TV v 3" cellphone)

For CRT/Plasma there is also refresh rate to consider...

etc etc etc.

<comment><USER7> While it generally isn't true of computer displays, some LCD televisions do have slightly reduced power consumption on black. It's not from the LCD shuttering the light from the backlight, but from control electronics reducing the backlight brightness dynamically. Those "dynamic" contrast specifications on some displays are a little misleading. One tends to think of a display having a high contrast figure as being more effective at blocking the light when displaying black (less "Bleed-through"), but they cheat by dimming the backlight. That may result in small bright areas in dark scenes ending up a bit darker than they should be.

With all backlit LCDs, lowering the (backlight) brightness setting conserves more energy than having the content dim the same amount. Using the lowest acceptable brightness setting not only saves energy, but extends display life.

C.R.T.s usually have the greatest change in power consumption with content brightness shifts, particularly in Trinitron tubes.

</comment></comment></comment></comment><comment><USER8> Be interested to see the power consumption figures on a windows machine as opposed to a mac...

<comment><USER9> That was my exact thought. I doubt his numbers are even close to accurate as Flash doesn't stress windows machines like it does linux and osx. And given that most NYT users are probably windows users, I'd bet the real statistic would be way lower.

</comment></comment><comment><USER10> I think the article is a bit disingenuous. It's actually finding the carbon footprint of animated banner ads (since the only Flash content on the page right now seems to be a lone video player that does not autoplay). A more interesting test would be a comparison between these Flash ads and their equivalent HTML5/Canvas ads.

</comment><comment><USER11> Would also like to see HTML5/JS data. Or, even animated GIFs.

</comment><comment><USER5> Anyone any idea how these energy measurements were made?

</comment><comment><USER12> Can anyone point to why flash is so processor-intensive?

Is it a necessary property of doing what flash does, or is flash implemented inefficiently?

</comment><comment><USER13> _= 100 Toyota Prius._

It's OK to leave that in the title.

<comment><AUTHOR> Thanks for the hint. I classified that part of the title as _punchline_ and omitted it, since a) I didn't know how HN would react if I would've added it and b) I didn't want to give too much away in the submission title :)

</comment></comment><comment><USER14> This article raises a very interesting question: WTH is the plural of Prius? What _should_ the plural be?

<comment><USER15> The plural of radius is radii, so I'd assume Prii? (Pronounced Pree-eye)

edit: Because someone doesn't think Radii is the plural of Radius :/

From maths.org, CAMBRIDGE UNIVERSITY.

[http://thesaurus.maths.org/mmkb/entry.html?action=entryByCon...](http://thesaurus.maths.org/mmkb/entry.html?action=entryByConcept&id=18)

From the BBC,

[http://www.bbc.co.uk/skillswise/tutors/lessonplans/spelling/...](http://www.bbc.co.uk/skillswise/tutors/lessonplans/spelling/rtf/plurals_wsheet.rtf)

From the Oxford dictionary,

<http://www.askoxford.com:80/concise_oed/radii?view=uk>

From the Chambers dictionary,

[http://www.chambersharrap.co.uk/chambers/features/chref/chre...](http://www.chambersharrap.co.uk/chambers/features/chref/chref.py/main?query=radii&title=21st)

<comment><USER2> The plural of _radius_ is _radiuses_ , and the plural of _Prius_ is _Priuses_. I am so tired of comments where people make up 'funny' pseudo-Latinate plurals.

<comment><USER16> According to every dictionary I can find[1], _radii_ is at least as accepted as _radiuses_. As for _Prius_ , since it is a made up word the plural is essentially whatever the accepted English usage turns out to be. According to Toyota[2] anything customers want to use is fine, however online the general consensus seems to be that _Prius_ is the plural form as well.

I am so tired of comments where people assert their particular view as true without doing any research, especially when trying to correct someone else.

[1] See <http://dictionary.reference.com/browse/Radius>, for examples.

[2] From [http://www.greenhybrid.com/wiki/index.php/Interview_with_Ed_...](http://www.greenhybrid.com/wiki/index.php/Interview_with_Ed_LaRocque) , an interview with a manager at Toyota.

<comment><USER2> You shouldn't assume I don't know what I'm talking about just because I didn't take the time to include references in my comment. I have a graduate degree in linguistics and one of my concentrations is word formation. While it's true that _radii_ is definitely a plural form of _radius_ , it's not really the generally accepted plural anymore. (At least, not where I live in America, and at least in spoken language. I'm not sure about Britain.) Neither are _indices_ , _data_ , _corpora_ , etc. Highly technical people like hackers and engineers continue to use the fossilized plurals, because these forms are part of the prestige dialect that indicates to other people that you have been educated and can remember to use non-standard plurals. But normal people do not use these forms—they simply use the standard English pluralization rules because there is no reason not to. The poster who mentioned the relative density of each term in Google's indexes (sorry, couldn't resist) would have to somehow normalize the numbers to account for the fact that technical people are disproportionately more likely to be using these nouns in the first place, and so a simple tally doesn't show the real picture if we're talking about how the language is used 'in general'.

I don't have the book with me so I can't find the exact reference, but if you're truly interested there is an entire chapter in 'An Introduction to Modern English Word Formation' by Valerie Adams that talks about how these plural forms arose in English. They were basically made up by scientists and philosophers during the Middle Ages who felt that any English word with a Latinate or Greek root should use the corresponding root language's plural form, because Latin and Greek were more 'pure' languages. (No doubt this attitude contributed to the fact that they continued writing in Latin in general for a thousand years after Rome was no more.) These forms became fossilized in English because the people using them were educated and therefore part of what was considered a prestigious class. That is, using them makes you sound smart, and that's why they've persisted. By my own judgment, though, they certainly sound more out of place to normal English speakers today than the corresponding standard English plural. (I last read this book six years ago, so this summary is from memory—the details may be slightly different but I'm pretty certain that is the general gist of it.)

The reason this irks me in general is because we speak English, not Latin. Unless you speak Latin you probably don't know how to correctly form Latin plurals, which follow a relatively complicated scheme depending on the class of noun, its grammatical case, person, and number. See [http://itre.cis.upenn.edu/~myl/languagelog/archives/000814.h...](http://itre.cis.upenn.edu/~myl/languagelog/archives/000814.html) for a discussion. Japanese doesn't have a plural form—does that mean we should say in English things like, 'Hiroki is holding three kimono in his arms'? The only reason it sounds remotely acceptable is because you interpret _kimono_ as a mass noun that doesn't have a plural form (like _rice_ ), but physically speaking kimonos aren't like rice in that they are actually countable. The sentence 'Hiroki is holding three kimonos in his arms' sounds much better.

Modern English has a very simple pluralization rule. There are three allophones of the plural morpheme: the unvoiced allophone _–s_ is suffixed to words ending with an unvoiced phoneme ( _t_ , _p_ , _k_ , _f_ , etc.); the voiced allophone _–z_ is added to words ending with a voiced phoneme ( _d_ , _b_ , _g_ , _m_ , all vowels, etc.); and the allophone _–əz_ is added to words ending with a phoneme that is similar in articulation features to _s_ and _z_ ( _s_ , _z_ , _sh_ , _ch_ , _j_ , etc.). There are exceptions to this rule that show extreme resistance to degradation (such as _children_ and _teeth_ ), but in general the exceptions are slowly being replaced by the standard plural in normal speech. If someone said 'Look at all those oxes over there,' most people wouldn't blink an eye.

Finally, I wasn't trying to correct the OP. My point was simply that the jokes where you make up a funny non-standard plural are lame. As mentioned in the excerpt from the Jargon File that someone posted above, hackers (and railroad enthusiasts, among others) have been making these same jokes for decades. A variation over and over again for fifty years of the same old joke about a funny fake plural—enough already, ya know? Of course I'm aware that everyone's sense of humor is different, so I can't tell someone something isn't funny because it's a subjective assessment. So I'm just pointing out that these jokes aren't funny to me, because the people making them might not realize how overplayed and unfunny they are to a lot of people.

And please don't get me started on made-up fanciful names for groups of animals…

EDIT: See also [http://en.wikipedia.org/wiki/English_plural#Irregular_plural...](http://en.wikipedia.org/wiki/English_plural#Irregular_plurals_from_Latin_and_Greek) for more discussion.

<comment><USER3> _"Neither are indices, data, corpora"_

Seriously? Just a quick Google suggests otherwise:

36,900,000 for indices vs 29,200,000 for indexes

1,440,000,000 for data vs 11,900,000 for datums (Heck, many people aren't familiar with "datum" to begin with...)

7,710,000 for corpora vs 239,000 for corpuses

Linguistics student or not, do you have anything more than "people you talk to use these unusual forms" to base all this on?

<comment><USER2> I just went to great length explaining what my claims are based on. Do you have anything to say other than an exclamation of incredulity? I already explained that an anecdotal comparison of Google hits wouldn't be very meaningful.

I just asked four non-engineer, non-technical, non-mathemetician friends the following fill-in-the-blank question: 'The radius of a circle is the distance from the center to the edge. If there are two circles, there are correspondingly two ______.' Three said _radiuses_. One said _radii_ , however they pronounced it 'ray-di-eye'. I asked a similar question with _corpus_ and all four said _corpuses_.

There is also probably at least some effect due to age here. I'm in my late twenties and my social circle is as well. If you're twenty years older than me, where your language is is twenty years behind mine.

And sorry, _data_ was a stupid example, it doesn't really have anything to do with what I was talking about. _Data_ is already the plural form and I banged it out because nobody really uses _datum_ as the singular. But _data_ seems like a mass noun since the way it's typically used you don't really have a single 'data'. We use a counter, as in _piece of data_ in the same way we say _grain of rice_.

<comment><USER3> _"I just went to great length explaining what my claims are based on"_

Which struck me as a lot of unconvincing verbiage to support an absurd claim.

 _"I just asked four non-engineer, non-technical, non-mathemetician friends_ "

And you have a problem with Google hits?

I really have no more time for this.</comment></comment></comment></comment></comment></comment></comment></comment>


Funny Picture: How to Tell HTML[4] from HTML5 - <AUTHOR> http://geekmontage.com/funny-picture-how-to-tell-html-from-html5/

<comment><AUTHOR> Now what if IE8 becomes obsolete and all browsers support "HTML5"? And how would you tell HTML5 from HTML6?</comment>


Ask HN: What is the best resource for understanding Ted Nelson's ZigZag? - <AUTHOR> I have always been fascinated with this data structure, but the resources I found on the web are too confusing for me. I understand a few parts of it, but not enough to see the usefulness. Can anyone point me to the right direction? <comment><USER2> The usefulness is very much in doubt. A post here not long ago from a dev who worked on Xanadu said they tried to tell Ted that tumblers, his address locating scheme, was too brittle to use in practice. If a single character changed in text the address would change.[0] I posit that Ted's insistence on this storage and accessing method was part of the reason the software never got off the ground.[1]

[0] [http://www.xanadu.com.au/ted/XUsurvey/xuDation.html](http://www.xanadu.com.au/ted/XUsurvey/xuDation.html)

[1] [http://mimix.io/getting-to-xanadu](http://mimix.io/getting-to-xanadu)</comment>


CEO of SceneTap insists the technology "not creepy" - <AUTHOR> http://insidescoopsf.sfgate.com/blog/2012/05/21/ceo-of-bar-facial-detection-system-pens-open-letter-to-san-francisco-insists-its-not-creepy/?tsp=1

<comment><USER2> The CEO doesn't get to decide what is creepy - his audience does.

I saw an investment presentation of a new startup doing something with Twitter a few months ago. The first thing I thought was 'creepy'. This is not the first thing you want your potential investors to think.

For some customers, it may not feel that way, but if enough customers do, then you have a real problem that writing blog posts and doing interviews isn't going to fix.

</comment><comment><AUTHOR> I think this is a cool tech and not creepy at all. It doesn't recognize individuals, simply tells you the patron mix in a venue to help you make informed decisions.</comment>


Show HN: Google Spreadsheet AddOn to extract tables from images - <AUTHOR> https://gsuite.google.com/marketplace/app/extracttable_image_to_spreadsheet/387162865168 <comment><AUTHOR> Hello HN,

I'm Saradhi, taking care of the product and 60% of its development here at ExtractTable. We have launched the service with an HN post in Aug 2019. Today we are 700+ users strong, with over 17000+ free web demo conversions and 145000+ images and PDF pages processed combined through purchased credits.

Although we started to be a developer product, with the request from our premium user, we developed the addon, which I thought will be useful for non- developers and makes it easier for the companies with the workflow integrated to Google Spreadsheets.

Happy to take your feedback and questions.

Thank you.</comment>


Weighing the Sentencing of Parents in the College-Admissions Cheating Scheme - <AUTHOR> https://www.wsj.com/articles/weighing-the-sentencing-of-parents-in-the-college-admissions-cheating-scheme-11568155291?mod=rsswn <comment><USER2> Rich people as defendants, I'm pretty sure we will see this go the way of no jail time. Lots of suspended sentences, probation, possibly house arrest and fines, all of which are easy for the rich to deal with.

<comment><USER3> Would poorer people definitely get jail time? Are you certain of that?

The calculation by probation officials makes me think "no jail time" is the usual sentence here, and the prosecutors' demands are because of public pressure.

While equality of law is usually understood to mean that the rich don't get more lenient treatment, it also means that the rich don't get punished more harshly, just because the public wants a spectacle.

<comment><USER2> I understand your point, but ultimately this isn't something a poor individual is going to face. The fraud perpetrated here can only be carried out by the relatively well off so if the sentence is something that they can just brush off, e.g. A big fine, then where is the equality? A poor person who was facing the same charge would no doubt be unable to pay the fine and would get jail time as a result of failing to pay.

So while what you say is true, we need to ensure that the poor are not disproportionately affected by justice, and perhaps justice does need to factor in wealth when considering sentencing.

Although that does happen at present in the US, unfortunately the wrong way around. Rich kids getting lenient sentences for offences poor kids face time for.</comment></comment></comment>


Scientists Discover Gene that 'Cancer-Proofs' Rodent's Cells  - <AUTHOR> http://www.rochester.edu/news/show.php?id=3479

<comment><USER2> See also: <http://news.ycombinator.com/item?id=906581></comment>


Why passwords have never been weaker—and crackers have never been stronger - <AUTHOR> http://arstechnica.com/security/2012/08/passwords-under-assault/

<comment><USER4> The question about password strength is meaningless without looking at the attack. A 4-digit PIN with a 3 attempt lock-out (and no further information) is more secure than a 10 character password encrypted with MD5.

There will be people who say that it would all be fine if they just used bcrypt, but the fundamental problem is that if you don't use different passwords on every site, you're hugely at risk.

Consider a situation where you've given your "trusted" password to a site that you know does all the right hashing with password storage. Your super password is 20 characters of alphanums with specials and you're feeling pretty smug. You now hear that the site was hacked, but you're not worried as all they can get is the hash and let them just try brute-force, right?

Wrong. They hacked the site. They changed the login form and grabbed your password in plaintext. A hack means that they compromise part of the infrastructure. At this time it's sufficient to just grab database data. Changing presented HTML is possibly a little harder as it needs to stay up for longer, but if someone has access to the database, they probably have access to a whole lot more. This is why lastpass.com is less secure than storing your password database yourself.

TL;DR: make your passwords different.

<comment><USER5> This. I'm surprised more sites don't utilize a lockout. Even with a 10 or 50 attempt lockout (for a website not PIN) is still better than giving an attacker unlimited attempts.

<comment><USER4> Lock-outs are tricky to manage. I can flood 50 login requests and have the legitimate user quickly locked out. CAPTCHAs can help but they're annoying and it's cheap to pay people to solve them if necessary.

Forcing a CAPTCHA for a new IP address or when a "you-have-logged-on-from- this-browser-before" cookie added to a lock-out would definitely be an improvement.

<comment><USER6> Paying people to read the CAPTCHAs would not help you much with a naive brute force attack. Assuming you can break 1 CAPTCHA/second, you could hypothetically try 86400 passwords/day. Breaking a 6 character password would then take you 52^6/86400 = 228826.5 days ~= 627 years. But I bet you'd run out of money earlier! Of course, it's a different story if the CAPTCHA can be OCRed.

</comment></comment></comment></comment><comment><USER7> Here's my crazy crackpot theory for solving the password problem.

Users should have a handful of passwords, in the old security-level style; everyday sites use a short simple password, email a level up, banking a level up again.

But the passwords should not be entered directly into sites. Instead, they should be hashed by a browser feature / plugin, roughly equivalent to bcrypt(password + user-specific-salt + site DNS name). The output of this process is what gets provided to sites. Not all sites will accept the full entropy of bcrypt or similar, so there needs to be a central registry tracking acceptable mappings from the output of bcrypt to the input of a site's password. There's also an issue around sites that share accounts across different top-level DNS names - Amazon in particular - that can also be handled by the same central registry technique.

This way, there is no list of passwords to worry about backing up, losing or handing over to third parties - everyone should be able to remember two or three passwords. There is no Javascript vulnerability like you see with bookmarklets for things like SuperGenPass. Every website sees a unique and specific password, even if the same underlying password is used by different people.

The only thing you need to worry about is your browser getting completely owned, so that the memory space of its extension mechanism is accessed by remote websites. But if the attacker has that level of control, it's not unreasonable to think he has control over a third party password manager too.

What it doesn't do well is revocation and renewal of a password. It also has a single point of failure - if someone somehow gets access to your underlying password, and knows the mechanism and salt, they can open a whole lot of boxes. This, of course, is why I'm a crackpot: I can live with that.

<comment><USER8> <http://passwordmaker.org/>

But you still need to realize that this won't last forever. You can crack an application's hashing algo (and know what hash or field they're using for the salt) because 50% of its users picked crappy passwords. Then if you're really dedicated you can work on the double hashed passwords, knowing that most people use the domain as the salt for browser-side hashing... Also a pre- hashed password has to be pretty easy to spot in a list once you've cracked the server-hash.

Scary stuff...

<comment><USER9> That looks like they're using unsalted SHA-256 as a password derivation function? And they reimplemented every cryptographic primitive themselves?

I'll pass.

<comment><USER8> Not sure where you got that idea, but the Passwordmaker Pro chrome extension I'm using, let's me specify a different salt (domain of the site is the default), let's me pick the hashing algo, the length of the hash, the modifier, characters to use, etc.

You might want to look at it again.

<comment><USER9> _let's me pick the hashing algo,_

All of the choices are hash functions designed to be fast (like SHA-256, the default), which you do _not_ want for password derivation because being fast to compute means easy to brute-force. You can test billions of digests per second with a PC graphics card.

 _let's me specify a different salt (domain of the site is the default)_

Then every user shares the _same_ salt for a given site, which largely defeats the purpose of salting (to prevent rainbow tables).

<comment><USER8> Yeah the salt default being an issue, is what I said in my initial post. I'm going to go out on a limb and say that doing the following will make you one of the hardest passwords to crack during the event of a weak hashing leak like the linkedin fiasco.

1\. Install and use the Passwordmaker Pro extension. [https://chrome.google.com/webstore/detail/ocjkdaaapapjpmipmh...](https://chrome.google.com/webstore/detail/ocjkdaaapapjpmipmhiadedofjiokogj) 2\. Change the default password length to say 40 characters. 3\. Add a modifier like bOoo7&jd8$02jf 4\. Change whatever other defaults you want. 5\. Use a master password that's at least 10 characters long.

BTW it would be easy enough to fork this extension and provide a little more security if you wanted. <https://github.com/bitboxer/chrome-passwordmaker/>

</comment></comment></comment></comment></comment></comment><comment><USER10> "he recovered a 13-character password that he had spent several months trying to crack." -> "The technique is simple enough to do, although it increases the number of required guesses dramatically—from about 26 million, assuming the dictionary Redman uses most often, to about 676 million." -> "8.2 billion Average passwords combinations per second able to be tried by a PC running a single AMD Radeon HD7970 GPU."

Do the math. 676 million should have taken less than a tenth of a second. Unless some rather major details are missing...

<comment><USER11> 26 million squared is 676 _trillion_ , which would take about a day at 8 billion / sec.

<comment><USER10> nice catch.

</comment></comment></comment><comment><USER12> From the article:

> An updated version of LAN Manager known as NTLM was introduced with Windows > NT 3.1. It lowered the susceptibility of Windows passwords to rainbow table > attacks, but didn't eliminate the risk. To this day, the authentication > system still doesn't apply cryptographic "salt" to passwords to render such > attacks infeasible.

Is this true? Do WinNT-derived systems _still_ not use password salting? If that is the case, my opinion of Windows's security just dropped quite a bit. I know security can exist without salting, and I've not done any in-depth Windows development, but from experience w/backend dev and Linux dev it seems like it'd be pretty cheap to add . . .

<comment><USER13> The LM hash hasn't been stored by default for years now: <http://en.wikipedia.org/wiki/LM_hash>.

The problem wasn't the difficulty of adding a better hash algorithm. The lousy hash was kept around to maintain compatibility with network clients that didn't support the new algorithms.

</comment></comment><comment><USER14> The gist of the article is sites ought to be using BCrypt for hashing passwords and users should be using password manager apps for storing strong passwords (not "password123").

<comment><USER15> Being the second in command of a development team I made the decision to change ALL our authentication to bcrypt a week into the job overnight (luckily we where storing password encrypted in way I could retrieve all the passwords), had to hack into the database server though. The result was an angry customer service department, and the realization that our security was complete shit. I also ended up working with the IT guys to secure our networks. The real result is that now we don't get huge security meltdowns every couple of months. I got a bonus for the initiative... Oh and the customer service guys still hate me :D

</comment></comment><comment><USER16> The more I read about this, the more I think that 2-factor authentication is the future, whether it's using robocalls / texted codes sent to mobile phones, or just a security token. It's easier to just add one of the 3 types of authentication* to the mix rather than wrapping yet another layer of complexity around a single one of them.

* _(what you have, what you are, what you know)_

<comment><USER17> I have been reading the list of 2 factor at lastpass [1] and in addition to mentioning the yubikey, it talks about the grid multifactor [2] - <USER2> about on par with what was used in WW2 but it seems extremely simple, low tech solution to multifactor that doesn't require computers, phones or electronics - solving that problem of 'something you know' + 'something you have'

[1] <http://helpdesk.lastpass.com/security-options/>

[2] [http://helpdesk.lastpass.com/security-options/grid- multifact...](http://helpdesk.lastpass.com/security-options/grid-multifactor- authentication/)

<comment><USER16> Sounds like you're referring to a one-time pad[1], which is what that grid looks like. Google's 2-factor auth has a simpler version of this -- they just give you 10 or so one-time passwords. I like the grid; it seems to have a much longer potential "lifetime" of use.

[1]: <http://en.wikipedia.org/wiki/One-time_pad>

</comment></comment></comment><comment><USER18> More and more I feel like _passwords are a fundamentally broken system_. We need a better system of locks and keys.

What is is, I don't know. I just know that it's not "passwords".

Especially when there are still sites that limit you to like 8 characters out of a highly restricted set. Usually of course these are banks.

<comment><USER19> I m in favor of things like browserid, provide a centralized point of failure. It's futile to assume that because people can have different passwords they will have them. Most people use 1-3 passwords, and it sucks whenever you have to learn a new one.

</comment></comment><comment><USER20> Hypothetical question - say I'm an idiot and I already have a database full of md5-hashed passwords. What do I do now?

The best I've been able to come up with is bcrypting the md5's. But unfortunately, while bcrypt^-1(ALL STRINGS) is hard to compute, it's not clear that bcrypt^-1(range(md5)) is. I see no compelling reason why it wouldn't be, but I don't know enough about the subject to offer a strong claim.

Can any experts offer advice on this?

(I'd also replace the `bcrypt . md5` password with a regular bcrypt one after the user authenticates.)

<comment><USER21> If inverting bcrypt(md5(.)) was easy then you'd have a preimage attack on md5: given your value md5(x), compute a bcrypt digest of that and attack that instead. (Which is not exactly the same as inverting bcrypt(md5(.)) given a dictionary of likely inputs, though.)

Anyway, if there's _any_ input set X for which bcrypt(X) can be inverted more efficiently than brute force, then you could say that bcrypt is flawed. If that set is the random-looking hashes of user passwords, instead of a carefully constructed one designed to attack bcrypt, then you can safely say bcrypt is catastrophically broken.

<comment><USER20> _Anyway, if there's any input set X for which bcrypt(X) can be inverted more efficiently than brute force,_

Here is one:

        [ (bcrypt x salt) | x <- dictionary, salt <- all_bcrypt_salts ]

Now I do think it's unlikely that range(md5) is a good domain on which to attack bcrypt, but I also recognize I'm not smart enough to be sure.

<comment><USER21> I don't get what you're saying here. Is your input set a bunch of outputs of bcrypt? Is your input set `dictionary`? Either way, how can you invert the output of bcrypt more efficiently than brute force?

<comment><USER20> In my particular example, you need only brute force it over a dictionary, which is not that hard to do (even for bcrypt). That's because the input set for bcrypt is being artificially constrained.

My concern is that artificially constraining the input set to range(md5) might similarly make brute forcing (or other attacks) easier.

</comment></comment></comment></comment></comment><comment><USER22> "The whole password-cracking scene has changed drastically. In the last couple years. You can look online and you can generally find passwords for just about everyone at some point. I've found my own username and passwords on several different sites. If you think every single website you have an account on is secure and has never been hacked, you're a much more optimistic person than I am."

This guy is realistic. And he is right. I started revoking access for my google account from a lot of websites.

BTW I've seen a blog post that a guy was able to access his stackoverflow account by getting the session cookies (which was very easy, the parameter names, etc) just by using a cookie chrome extension.

This guy is totally right.

"If you think every single website you have an account on is secure and has never been hacked, you're a much more optimistic person than I am."

</comment><comment><USER23> This reminds me: I need to go through my 1Password DB and change all the passwords. This is a PITA but I only do it quarterly, and 1Password syncs nicely to my phone and iPad, so it's not the end of the world.

<comment><USER7> It would be a huge help if there was a standardized web API for changing passwords on a site. I don't know how many sites you need to change passwords for; I've got several hundred, all unique, and I certainly don't change them quarterly.

(It would also help attackers, of course - they could instantly lock owners out of whole heaps of accounts once they got a password that got reused. On balance, though, I think the benefits would be positive, since a motivated hacker can already lock people out of high-value accounts, and the drudgery factor of changing passwords regularly is very high.)

<comment><USER23> This would be nice. Even better would be to do away with passwords entirely in favor of email + physical token. There's no getting away from the fact that crackers will always get access to a certain number of passwords; properly incentivizing people to pick excellent passwords seems like a fool's errand. Cue xkcd here. I hold out some hope that Apple (my computing vendor of choice) will roll 1Password-like functionality into the OS (both of them). Only a default-secure system will get the general public into a more secure state -- how long has the computer industry tried to strong-arm people into strong passwords, only to be defeated by 12password12 &c.? It's not that users are stupid, it's that the technology to secure computers is an utter failure.

<comment><USER18> Well, there's the Keychain. But its password generation is hidden deep in the program, not right there when you're asked to create one. And it doesn't synch to anything, not even iOS devices, so it's pretty much useless for generating passwords that are, say, 2k of line noise.

It would be totally awesome if Apple acquihired 1PW or LastPass or somesuch, and set things up so that it's always right three, helpfully offering a new super-entropic password whenever you're joining a new site.

</comment></comment></comment></comment><comment><USER24> This is why websites should start to adopt solutions like Rublon (www.rublon.com).

7 reasons why you should add Rublon to your website <http://blog.rublon.com/2012/why-add-rublon/>

I'm the inventor of this technology. Sorry if this looks like advertising, but I think that the problem with passwords nowadays is huge nowadays and has to be solved. BTW: We're releasing a new Android app in a few hours.

</comment><comment><USER25> The real solution is to switch to public keys. No more shared secrets - <USER3> just prove your identity by using your private key to sign an authentication challenge.

<comment><USER26> I lost my private key. Now what?

I'm using my friend's laptop; I don't have my private key with me. Now what?

I'm travelling and forgot to bring my private key with me. Now what?

(Similar questions apply to password managers as well, but I'm curious as to what the problems/solutions are for PKI.)

<comment><USER27> I believe, in an ideal world you'd have your private key stored safely on a _private_ webserver, or maybe your mobile phone.

<comment><USER28> In an ideal world, we wouldn't need to worry about unauthorized access. Unfortunately, that world doesn't exist.

But I sincerely hope a requirement for me to use the internet doesn't demand we have a private server instance or a smartphone of any variety (my Nokia candy bar variant serves me just fine).

I can think of many problems we'd need to account for (lack of internet, dead/lost phone, corruption, older folks, etc).

<comment><USER27> You know, sometimes the simplest problems are the hardest to solve. You'd think right? "What's the best way to know if this guy is who he is claiming to be?"

1\. Shared secret/Password - He tells me something during registration and then I use that information to verify if he's saying the same thing when he want access the site.

2\. PKI - Describes itself.

3\. Something he claimed to have during sign-up, so let me check if he has it now.

The problem is, every system is going to have a point of failure/point of absolute control. This is because, you _want_ someone to be able to reset their password/public key/auth token if they forget/misplace/get stolen. Sure, things would be a lot easier if you left the liability on the user, by explicitly stating that if Acts of God (legal term) happen to him, you are not liable. But in this day and age where I see every service tending towards dummifying and hand-holding, I don't see this approach being popular at all.

In the above approach, by pushing all liability onto the user, you tell him that HE and ONLY HE is responsible towards the safe storage of his credential. It's not like in real-life, people can't come up with a gun pointed at you and tell you to give up your auth token, assuming they MitM'ed your password.

<comment><USER28> I'm not sure we really disagree, if I understand your response correctly. I _do_ think there can be improvement (and, probably, should).

My main objection was calling for using a device that is expensive, requires special/additional phone plans, and doesn't _really_ solve the problem (especially for most of the global population). I have a rather diverse set of friends by age, income and technical experience - and smartphones aren't the majority.

<comment><USER27> You are correct. I am not in disagreement with you. We definitely need a way to authenticate people. But like I said, authenticating systems need to be fool-proof enough to not allow false positives yet flexible enough to allow people to screw up and get a fresh start without wiping all their data. These two goals, by definition are the equivalent of trying to look towards the left and right at the same time.

</comment></comment></comment></comment></comment></comment></comment><comment><USER29> I'd really wish some sites would not force me to change the password every other month or every time I clear my cookies or use a different IP: every time, I have to use a simpler password because I just can't come up with a better one without having to write it down somewhere...

3-5 tries with a half hour lockout with an email alert seems like a good solution to me...

<comment><USER30> Definitely annoying to have to reset pw frequently but the shorter passwords part can be avoided by using a secure pw db like keepass (keepassX on Mac). Storing the db file on dropbox makes it very convenient. Throwaway pw aside, you really only need to remember 3 pws: db, dropbox, and main email (for convenience). I have many passwords I've never even seen thanks to keepassX.

<comment><USER31> If it doesn't work easily on a mobile device, it might as well not exist.

<comment><USER32> Keepass has mobile applications that synchronize easily via webdav or Dropbox.

Unfortunately, you can't create new records from the mobile device with Keepass (at least, with the app I'm using; there are others). My technique is to not create high-value accounts from my mobile and for low-value accounts, I'm OK with just using a semi-secure, temporary password that I update when I'm back in front of the desktop.

<comment><USER33> _Unfortunately, you can't create new records from the mobile device with Keepass_

Perhaps pwSafe is the app you need? Works beautifully on iOS and syncs with Dropbox and/or iCloud too!

</comment></comment></comment></comment></comment><comment><USER34> The article talks about brute forcing hashes. This is why a good login system will rehash the password multiple times to exponentially increase the length of time it would take to brute force the passwords.

Accounts could still be cherry picked but it would stop blanket brute forces. This is why BCrypt is good.

<comment><USER35> How does re-hashing exponentially increase the amount of time brute forcing takes. The time it takes to do N iterations of a hash is N times as long as 1 iteration, so the amount of time it takes to make M guesses is still just N times as long.

</comment></comment><comment><USER36> Why aren't security experts and hackers mixing and matching the characters that make up the password? I.e. instead of super!!!think3rs, try Supr3Think0rz. Is the added required processing too large of a trade off?

<comment><USER37> I don't know what the best practices are, but some crackers definitely do do that. And yes, the added processing is generally too large for non-cracking applications.</comment></comment>