A surprisingly potent technique can boost short and long-term recall - happy-go-lucky http://www.bbc.com/future/story/20180208-an-effortless-way-to-strengthen-your-memory <comment><AUTHOR> Just as quiet contemplation can induce memory formation, playing Tetris after a traumatic event (like a car accident) seems to help prevent the formation of intrusive memories.

[https://www.nature.com/articles/mp201723](https://www.nature.com/articles/mp201723)

> _Preventing intrusive memories after trauma via a brief intervention > involving Tetris computer game play in the emergency department: a proof-of- > concept randomized controlled trial_

<comment><USER2> Thanks for sharing this.. when I was around 4 years old my parents, a relative, and I were in and out of a hospital.

We were going through a really tough time dealing with a life-altering diagnosis of one of my siblings. A lot of anger and sadness, especially from my parents.

But - the only thing I actually remember from the hospital was playing Galaga in the hospital game room with my relative. Since I was 4 years old, I always wondered (a) why it is such a vivid memory and (b) why I can't remember my family or myself being upset. Quite surreal to see that this specific scenario has been studied.

<comment><USER3> Hebbian theory: "neurons/cells that fire together, wire together".

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

<comment><USER4> If that were so I would expect aversion therapy to work.

</comment></comment></comment></comment><comment><USER5> Is it possible that people simply continue to think about what they were trying to learn, consciously or not, when given no tasks? Why is the control comparing people who tried to learn information and then took a break to people who tried to learn even more information? Would a more insightful control be to look at how people who took a break compared to people who continued studying the material during the break time?

I would expect those who continued to study for more time would have better recall, but that would be incredible if untrue, ie. you could literally learn more by doing less. Taken to the extreme you seem to learn more by doing less at times. For example you'll learn more sleeping 8 hours each night for a week than staying up for a week straight, but I wonder if these short breaks allow for fatigue recovery and memory consolidation, like sleep, or if they simply provide opportunity to think more about material, which would obviously give an advantage as compared to the people in the studies "controls" that have to learn new information.

Anecdotally, I definitely feel that meditation and breaks helps me consolidate my learnings and raise my overall productivity, but I'm not sure I find the particular scientific studies described here to be highly convincing of that.

<comment><USER6> My thought is too much focus on a thing can cause blockages in the deeper processing of that thing.

I'm sure many engineers are familiar with the concept of banging their head against the keyboard all day on what's a seemingly simple issue/bug, only to find the solution miraculously appear hours later in their heads out of thin air - maybe over dinner talking to a friend, maybe awaking in the middle of the night, maybe in the shower the next morning. The point is it all happened a good chunk of time away from the glow of the screen with their debugger at hand. It's a combination of having space to process subconsciously which is often spurred on by a context switch.

I imagine a similar thing happens with learning, perhaps even the act of trying to recall something that happened in the past itself causes a deeper processing/association in your brain. All of a sudden you're not relying so much on rote memory but deeper, somewhat disparate contextual cues to aid in the recall.

<comment><USER7> Being creative (debugging loosely falls in that category) and learning has to be different. When creating or inventing you can fall well and truly inside the box, taking a break helps you think outside the box, learning sounds like the more in the box/zone the more you get it.

TLDR; sometimes you want a new perspective, sometime re-energise, taking a break is an easy way to get both. You

<comment><USER6> But that's the thing - I believe deep learning is actually a creative process. The new information needs to fit in your existing model of what you already know/believe, and doing so is a creative endeavor. The more you move away from that the more you end up with rote memorization.

That's why people respond better to different teaching styles, different angles of explanation, top-down vs. bottom-up, etc - because they better align with how their creative mind works.

</comment></comment></comment></comment><comment><USER8> I feel (i.e. just my own subjective experience) it's not only the formation of memory that benefits from mental "down time" but also the gradual solution of abstract problems, such as the ones we come across in building complicated information systems.

I'm not sure about this:

>> we should aim for "minimal interference" during these breaks – deliberately avoiding any activity that could tamper with the delicate task of memory formation. So no running errands, checking your emails, or surfing the web on your smartphone.

Whilst I agree that cluttering up the brain with other similar sorts of information (so stuff in emails or web) is counter-productive, I feel (again just my own experience) that undertaking a completely different sort of activity which exercises the brain in different ways (so for me things like a bike ride, chopping firewood, kicking a footy with the kids) can have great results. Getting back to the original task, I do often find progress has come out of "thin air".

</comment><comment><USER9> A bit of sad irony with the interjected clickbait-like links:

"... You really need to give your brain the chance for a complete recharge with no distractions.

\- The mystery of why you can't remember being a baby \- The man who can't trust his own brain \- A new way to master your emotions

An excuse to do nothing may seem like a perfect mnemonic technique for the lazy student..."

<comment><USER10> The content of the linked articles is no worse or better than the original one. So I would not call that a clickbait. Actually red the one about children memory with pleasure.

</comment></comment><comment><USER11> Isn't this what people did this organically before the advent of smartphones?

There would be gaps of time where you would just 'think'.

Now it feels like you don't go a second without distraction. Any gap of seconds is automatically filled by picking up your smartphone.

<comment><USER12> _"All of humanity's problems stem from man's inability to sit quietly in a room alone."_

\- Blaise Pascal (1623 - 1662)

</comment></comment><comment><USER13> I've found this technique also helps when trying to learn challenging (for me) things on the guitar. The act of learning to play something new means inducing muscle memory as well as simply memorizing the tune. I work on it in the evening to the point where I don't feel like I'm making progress any more. When I come back to it the next day, I find I've made progress.

<comment><USER14> I had the same experience when I played the guitar.

Another thing is, a study was done where one group practiced the piano, the other group just sat in front of the piano imagining practicing, and another group did no practice.

The group that just imagined practicing ended up playing almost as well as the group that was actually practicing, and both groups were obviously better than the group that did no practice.

The mind is crazy.

</comment></comment><comment><USER15> Lot of comments about meditation here. The thing is, most forms of meditation are _active_ \-- for example, pay attention to your breath. Presumably at least some of the mind wandering that went on in this study was about the material, and most (though not all) forms of meditation would suppress that.

<comment><USER16> My takeaway from my thus far limited experience practicing mindfulness meditation is that (at least that particular form of meditation) it is not about suppressing thoughts. It's not about actively quieting the mind. Rather, it's about becoming an observer of the thoughts in your mind, rather than the active participant you usually are. You view your thoughts as if they were just another sense from the external world. i.e. you become a passive observer.

So, at least mindfulness meditation, is passive. And that's a rather popular form of meditation these days. It may have the same effects the article discusses, as a result.

(NOTE: The focus on breath during mindfulness training is temporary, and is really just a technique to get you to A) relax and B) begin to focus on the present and sensations you don't normally observe).

<comment><USER17> I have seen other people who have this conception of meditation, but I am not sure it paints the whole picture. Among the different schools of meditation there are both those that tend to "suppress thoughts" and those that simply observe whatever arises.

In the first category I would put techniques which teach you to focus on a meditation object, most often the breath or a mantra. If someone says "mindfulness meditation" I generally think they are referring to this kind of meditation, and examplars can be found in books like Mindfulness in Plain English or The Mind Illuminated (even though there are also both quite different approaches to meditation, one being focused on "insight" first and the other based on "concentration" first). They don't teach you to suppress thoughts, but they teach you to focus on a particular thing and IGNORE thought, which has the effect, long term, of causing those thoughts not to arise.

But there are also schools that focus on "open awareness" or "just sitting" styles of meditation. This is very common teaching in Zen Buddhism but is also practiced in some schools Tibetan Buddhism, at least in Dzogchen. This, I think, is what you are referring to; where you sit and observe at a mental distance whatever thoughts arise. Eventually, this also causes thoughts to arrive much less frequently.

If you are referring to the research literature, however, I think mindfulness generally refers to the first kind. As with everything, the borders blur together.

</comment></comment></comment><comment><USER18> This and some other tricks are covered in the "Learning How to Learn" course on coursera ([https://www.coursera.org/learn/learning-how-to- learn](https://www.coursera.org/learn/learning-how-to-learn)).

</comment><comment><USER19> Another effortless way to improve memory and concentration: put your phone away

<comment><USER20> phones can be pretty addictive, so "effortless" is not the word I'd use.

<comment><USER19> True, but the action itself really is almost effortless: put the phone in another room, then go to your desk and start working. You'll be surprised at how easier it becomes to get into "the zone"

<comment><USER20> You're ignoring the part of it that's difficult. Like saying that not being addicted to a drug or poker machines is effortless because the action of not picking up the needle or not pulling the handle is almost effortless.

</comment></comment></comment></comment><comment><USER21> For anybody perusing the comments here for tips on how to better learn, consider reading "Make it stick". It's a research backed book about the most effective study methods. It starts off with the most research backed and simple techniques to the more complex and less well understood learning concepts.

Here's the kicker: the two most common techiques, rereading and cramming, are the least effective.

The underlying theme about what is effective: anything you can to do to make learning take more effort, while not hindering it, generally improves it. That includes spaced repetition, practicing recall in different settings, and even something as mundane as pre-modifying the text to replace random letters with underscores. Also, testing is very important to both to measurement of learning _and the actual learning process itself._ Don't forget a proper feedback loop either.

Lastly, something I appreciated reading in the books was how as often as possible, there were studies done in classrooms to try to quantify how small technique and curriculum changes actually impact student learning.

</comment><comment><USER22> When my son was in grade school, he had to learn the 13 colony names. He could only get about seven of them before stumbling. I told him to try memorizing them before he went to bed and he would do better in the morning.

Needless to say, in the morning, he could rip off all 13 in a row without effort. I've found this method to work for me, too.

<comment><USER23> This worked for me in middle school when I had to memorize German-language poems while not knowing German. It was rather magical how I could go to sleep unable to regurgitate the words and have no problem the next morning. These days I don't have many opportunities to test my rote memory abilities, thankfully.

</comment></comment><comment><USER24> This 2012 paper seems to be the original research. [https://www.ncbi.nlm.nih.gov/pubmed/22829465](https://www.ncbi.nlm.nih.gov/pubmed/22829465)

</comment><comment><USER25> Seems like there could be an interesting synergy here with the Pomodoro technique (though the 15/5 cycle would need to be modified since the studies appear to use 10 minute breaks).

</comment><comment><USER26> > first documented in 1900

We should have put in 15 minutes of undisturbed rest after reading this in 1900. We didn't, and promptly forgot how not to forget.

</comment><comment><USER27> __Please skip the clickbait article, __the entire thing is: "daydreaming boosts memory"

</comment><comment><USER28> I'm wondering is meditation is the best possible way to take a break after learning new things...

</comment><comment><USER29> The downtime from not having a smart phone allowed more time for me to contemplate my life and sow the seeds for better future decisions.

Information and convenience is useful up to a certain point after which it can actually become a hindrance.

There are billions spent on making you believe otherwise.

</comment><comment><USER30> I wonder what happens if people meditate during the resting period.

</comment><comment><USER31> Yet, another argument against addictiveness of modern online services. I wonder how it will turn out in the end.

</comment><comment><USER32> What happens if you just go to sleep? Is stuff you learned right before bedtime easier to remember?

<comment><USER33> The article mentions that "stuff you learned right before bedtime [is] easier to remember". Perhaps you should have read it just before bedtime.

</comment></comment><comment><USER34> So, doing nothing is not doing nothing; it's thinking and remembering.

</comment><comment><USER35> Are the benefits of meditation really that new? For example this article from 2013[0]. Seems like this gets repeated every couple of years like clockwork.

[0] [https://www.theatlantic.com/health/archive/2013/05/study- med...](https://www.theatlantic.com/health/archive/2013/05/study-meditation- improves-memory-attention/275564/)

<comment><USER36> Don't forget the _dangers_ of meditation: [https://www.theatlantic.com/health/archive/2014/06/the- dark-...](https://www.theatlantic.com/health/archive/2014/06/the-dark-knight- of-the-souls/372766/)

<comment><USER37> This. A lot of people get so caught up in the benefits of doing nothing they forget it's dangerous to do _too_ little. One technique that's worked wonders for me is breaking up doing nothing with 15 minutes of doing something. That way I'm not doing nothing or something all of the time.

</comment></comment></comment><comment><USER38> The title claims this is effortless but at a minimum I have to at least read this article. Misleading title.

<comment><USER39> I had the same reaction to the title, however the article is extremely convincing: in one case an 11-fold increase in recall.

I will use this for the rest of my life. By the way I used the technique after reading the article. Likely this is why I recall the 11-fold figure. I even remember the numbers: 7% recall to 79% recall for the case I just quoted. This is far from normal for me.

This is probably the most important article I read in the past year on HN.

<comment><USER40> the 11 fold increase was for people with previous neurological damage.

For healthy people it was 10-30%

<comment><USER39> Yes I know, but didn't mention it as I wanted OP to read the article. Still a huge difference.

</comment></comment></comment></comment><comment><USER41> Doing nothing at all was the way I approached high-school homework, and it worked well enough for me.</comment>


UK open wifi ban proposed - <AUTHOR> http://www.theinquirer.net/inquirer/news/1594048/uk-kill-internet-cafes

<comment><USER2> Link bait misleading headline. Flagged.

>> "THE GLORIOUS BRITISH GOVERNMENT, upon which the sun finally set almost 100 years ago, has decided that having open WiFi networks is bad for the general population and it wants them all shut off."

No. One unelected lord Mandleson who was kicked out of the commons twice and then made a lord by his cronies, otherwise known as Darth Vader, is trying to get his poorly thought out bill through. He doesn't represent the government, and he _certainly_ doesn't represent the UK.

This is a mainly crazy _proposed_ bill that is pretty moot. Despite it being completely crazy, there's likely going to be an election very soon.

[http://services.parliament.uk/bills/2009-10/digitaleconomy/s...](http://services.parliament.uk/bills/2009-10/digitaleconomy/stages.html)

It's not even through the house of lords yet, let alone house of commons.

This sort of tripe anti-uk article has no place anywhere, let alone HN.

<comment><USER3> do you know why this sort of article is easily believable?

<comment><USER2> Because some people believe everything they read on Reddit?

For example the tripe about the UK being overrun with CCTV cameras that are centrally monitored by the government.

As more and more people get their news from the internet, and don't bother fact checking, this will only increase. Rumor will rule. Knee jerk will be standard. Sad really how mob rule works.

<comment><USER4> There are over 10000 cameras in the city of London alone. ([http://www.thisislondon.co.uk/news/article-23412867-tens- of-...](http://www.thisislondon.co.uk/news/article-23412867-tens-of-thousands- of-cctv-cameras-yet-80-of-crime-unsolved.do))

I'd call that pretty much "overrun", yes.

<comment><USER2> Yes, and the vast majority of those are going to some crappy VHS tape, which tapes over the previous days tape.

They are in place so that if a crime happens, the shop owner can replay the tape or give it to the police.

Why would I care if individual shop owners want to put CCTV in their shop?

The problem is, that people assume it's some big conspiracy, and all your movements are tracked by the government. It's all been setup by the government to spy on people.

The reality however, is that in the 70s,80s, CCTV became so cheap that individual shop owners could buy them and have them as a little deterrent.

Also "The city of London alone" is fact fudging. _Most_ CCTV is going to be in the city of London as it's the capital. Elsewhere in the UK usage is going to be less.

</comment></comment></comment></comment></comment><comment><USER5> Fortunately you can buy cheap 3G data SIMs with cash in the UK... so I am not exactly sure what this will prevent.

Why does the government care so much about such a small minority group (movie studios / bands), anyway? It's sad that nobody wants to pay money for creative works anymore, but that's an issue with the market, not with people. Stop making music and movies if it's not profitable anymore.

<comment><USER6> KK has eloquently explained the Internet is a copy machine. Money can/should be made on the so called 'generative values'. [http://www.kk.org/thetechnium/archives/2008/01/better_than_f...](http://www.kk.org/thetechnium/archives/2008/01/better_than_fre.php)

</comment></comment><comment><USER7> Another battle won for copyright lobbies. This bill as no upside for British society, neither for consumers nor for companies. >libraries and universities could not be exempted That sentence made me tick, reminiscence of autodafés.

<comment><USER8> It's certainly not won. As Axod points out this has barely made it's way past the proposal stage and I don't think it will actually make it through (due to the election coming, political climate etc.)

</comment></comment><comment><USER9> The craziest aspect is that this seems to be done in the name of copyright protection. At the very least, they should have claimed it is necessary to fight terrorism. But piracy?</comment>


The Brittleness Of Type Hierarchies - <AUTHOR> http://www.codegrunt.co.uk/2012/05/08/Brittleness-Type-Hierarchies.html <comment><USER2> As I've become more experienced over the years I've come to believe that the prolification of patterns to "fix" oop problems (dependency injection, immutability, builder patterns, events etc etc) are a symptom of inherent flaws in the object oriented model.

It feels like we're bending over backwards to fix a model that promotes lots of problematic designs while not doing much for resolving them (or supporting basic things like concurrency/parallelism). We can never predict all possible problems, or predict the future so no language can be "perfect", but a language could inherently be more agile and flexible. I wish I could say what a better model would be. I'd hazard a guess that its something more based on composition and functional programming than inheritance and classes. Perhaps even metaprogramming and/or code generation

For now it seems OOP is the worst paradigm for programming, except all other paradigms of programming

<comment><USER3> It's a good, if fairly old [1] insight. The fact is, there are two kinds of patterns: architectural patterns (e.g. "message bus", "web service", etc.) and there are language deficiency patterns (e.g. factory, double dispatch/visitor, etc.). A good way to gauge the power of a language is to see how many of these patterns you need.

For example, when I was exposed to Smalltalk I fell in love with it. So many of the patterns I was used to needing were not necessarily there. That's because Smalltalk is more expressively powerful than, say, Java. You see this directly in the GoF patterns book as several of the patterns only provide C++ code and say "Smalltalk doesn't need this as it does X".

Eventually, though, I begin to see that pg was right and single dispatch is a subset (in this case; inferior) of generic functions. The issue was double dispatch. Smalltalk needs it, Lisp doesn't. I never have to write boring double dispatch wiring in Lisp because of how generic functions work.

So I don't think it's OO itself that is flawed (though it's not as a big a deal as it's made out to be. It's a form of code organization, specifically global variable demarcation and code reuse), but rather many OO languages that are weak enough to require programmers to hand-code out these common patterns instead of either providing it in the language or providing a powerful enough language to let us solve it once.

[1] <http://blog.plover.com/2006/09/11/>

<comment><USER2> I agree that single dispatch seems to be a pretty obvious problem with most oop languages, if you have a method that has two different types as parameters, on which do it belong? Take a pick and hold your breath... or do some unwieldy manager class :) Smalltalk and Lisp seems (zealously) loved by many, and it's easy to like the simple elegance of languages like that.

For me they always felt wee bit too messy and academically oriented. I want a language that reads more like a book and less like a formula, perhaps that's just me :)

<comment><USER4> This problem is easily resolved by noting that you think the method has to 'belong' to one type or another instead of exist as a first class object of its own. In practice this was done first in Lisp (the 'generic function' works better with typical Lisp environments than endless (send object message) calls, in particular with functions like map), and then the fact that the generic function treated one and only one argument specifically was noticed. From here we get multiple dispatch in a very natural way, a concept that is quite awkward in a language like Smalltalk.

<comment><USER3> The concept is quite awkward in any single dispatch language. The biggest WTF ever is Racket adding single dispatch OO! You actually have to say (send object 'message).

</comment></comment></comment></comment></comment><comment><USER5> Apparently most of the readers have missed the point. He says up front that what he's describing doesn't really happen seriously in small pieces of code. The code example is an _illustration_ , one that I thought was very clear.

As for a solution? The only purpose of inheritance or subtyping is polymorphism. You may be doing polymorphism in a very roundabout way (if (isa(X)) { ...get a field from X... }), but it's still polymorphism under the hood. There's actually a very good argument against inheritance for polymorphism: you can't straightforwardly write a statically typed, polymorphic max function. You have to introduce generics to the language. That way lies the Standard Template Library and generic functions a la Common Lisp or Dylan (which is a pretty wonderful world).

Now, in implementation you may want some of the polymorphisms to be due to the same fields being in the same memory offset in all subtypes, which seems different, but why must it be? Why shouldn't it be a declaration about a family of types? I may have to go play with that...though I think it's equivalent to how it's done in Forth. So much seems to be.

<comment><USER6> There are compelling uses for inheritance polymorphism - GUI frameworks are generally examples of this technique put to good use.

I suspect that OOP systems would be a lot less likely to go haywire like the author describes if the Liskov Substitution Principle were better-known among programmers.

I'd even like to see it baked into a language. Get rid of overriding base methods. Instead the superclass's version is always called, and the subclass is only allowed to tack on some additional code that runs after the base method returns. Yes, returns - the subclass's code shouldn't be allowed any chance to modify the result. It shouldn't be allowed to directly modify non- public fields that belong to the base class, either.

I suspect that a language with those kinds of restrictions on inheritance polymorphism would encourage developers to be a lot more thoughtful about how they design class hierarchies. Which they should be, since someone might get stuck with the results of those decisions for decades.

Taking the C# example - Microsoft decided to push mutability in collection classes all the way down to the root of the object tree. Which creates a lot of pain for conscientious developers. Mutability isn't just a non-essential feature of most collections, it's also undesirable in a great many cases.

<comment><USER7> While I agree with you about the Liskov Substitution Principle, I don't think that would have helped in this example. If your assumptions about the behavior of the base classes are wrong, your code is wrong. Substitute a wrong super- class for a wrong sub-class, and it's still wrong.

What the LSP does do, though, is help you know when you really _shouldn't_ be subclassing things. If your implementation leaks beyond the class interface, it shouldn't be a subclass.

<comment><USER6> Agreed that it isn't a magic fix. I was only hoping that bringing such a restriction to the forefront of programmers' minds would encourage them to be a little bit more diligent about deciding what's really an essential feature of a category before they start to cut code.

It's all too easy to fall into the trap of automatically pushing things up to the superclass without thinking first. "I might want this elsewhere" is a common way to look at it. Following LSP encourages one to think, "I might get stuck with this" instead.

</comment></comment></comment></comment><comment><USER8> Here's the thing: while you do not have to do a Big Design Up Front, there's no reason in the world why you can't have a lot of conversations around future behavior of the system as you go about working through your first few sprints.

While good Agile teams can do whatever is put in front of them, there is an implicit assumption in project work: if you start out building as securities system you're not going to be changing over to a system to feed and care for circus elephants in the middle of the project. That is, there is a fixed and limited set of nouns and relationships which comprise 90-95% of the problem domain that can easily be discovered simply by talking about the problem.

I'm not trying to disparage the author: this is a real problem. I'm just pointing out that mature teams cover the domain fairly completely in an informal fashion (perhaps a few hours of conversation spread out over a week or two) before writing anything. That's not design, that's just understanding the world of the customer. [Insert long rant here about how most programming teams have forgotten or hardly use any sort of analysis techniques]

Of course, the best of these teams still run into the same problem down the road, but it should be a pretty long ways down the road. Like years. If not, you probably never really understood what the hell you were doing in the first place. (Not the programming part, the part about fully understanding the user)

Type hierarchies can allow for flexibility easily. It's up to the team to spot where flexibility is going to be needed and put it in there. Brittleness is a risk just like any other project risk.

<comment><USER9> I wish we could find a way to make non-programmers understand this. Just because programming doesn't involve moving lots of heavy stuff and putting it together physically, doesn't mean that there are no rules about how software needs to be built.

People tend to focus on the happy fact that you actually _can_ change your fundamental assumptions in software without loud, ugly demolition sounds, but they tend to stay blind to the fact that it still involves a lot of work.

It's partly our fault, too. We're the ones who have been promising that "this time it'll all work out with this fancy new methodology we've discovered". I've seen a lot of people assume that "agile" means "clients can change their mind as often as they want and we'll take it in stride" and that we'll do so at zero cost.

</comment></comment><comment><USER10> I commented on the author's blog, but I thought people here might be interested as well:

I agree with Chris Parnin (in the comments of the author's blog)--this isn't a type hierarchy problem. It's an incremental design problem. It's true that inheritance should be used with caution, and this example (intentionally) overuses it, but the deeper problem seems to be that the author doesn't understand how refactoring and incremental design work.

Let's stipulate that your initial guesses about a domain will almost always be wrong. In this example, the author assumed that all securities will have an Isin, but it turns out they don't. Options are a type of security that don't have Isin.

One solution is to hack Option as a subtype of Security. As the author shows, this leads to a big mess. A much better solution is to refactor as soon as you notice that the domain is wrong.

Here's how it works:

Step 1: Notice that Options are securities, but they don't have Isins. Observe that the domain model is wrong. Smack yourself on the forehead.

Step 2: Realize that Security is not in fact representative of all Securities. Rename it IdentifiedSecurity (or IsinSecurity, if you prefer). This is an automated refactoring in C# and Java, and will automatically rename all uses of the class as well.

Step 3: Create a new superclass called Security and move Description and Exchange to that superclass, if desired.

Step 4: Create Option as a subclass of the new Security superclass.

Step 5: Enjoy your improved design. Some parts of the application (such as Trade) will be too conservative and use IdentifiedSecurity when they could use Security; those are easily fixed on a case-by-case basis as needed.

For more about incremental design, see Martin Fowler's _Refactoring,_ Joshua Kerievsky's _Refactoring to Patterns,_ or the "Incremental Design" chapter of my book (<http://jamesshore.com/Agile-Book/incremental_design.html>). You can also see me aggressively apply incremental design in my Let's Play TDD screencast, here: <http://jamesshore.com/Blog/Lets-Play> .

<comment><USER11> i had a great experience with OO design in an internship in grad school. i was sole coder on a java project, a networked whiteboard app, and i had the time and flexibility to scrap the whole thing halfway through and rewrite it from scratch once i had some clue about the problem domain.

the best thing is that since the main functionality was a vector graphics editor, i actually got to implement one of the classic blackboard OO examples in practice, and see how it really worked out:

        Interface Shape
            AbstractShape implements Shape
                TwoPointShape extends AbstractShape
                    Rectangle extends TwoPointShape
                    Ellipse extends TwoPointShape
                    Line extends TwoPointShape
                        Arrow extends Line
                Text extends AbstractShape
                Icon extends AbstractShape
                Raster extends AbstractShape

(or something like that)

obviously this was the product of a lot of refactoring (i think the TwoPointShape "insight" came to me relatively late in the project)

of course, i ended up spending most of my time chasing ConcurrentModificationException and jumping back and forth between two or three boxes tracking down network synchronization bugs (client A begins moving an icon, client B begins moving the same icon, client C begins moving the same icon, client B releases the mouse, client C releases the mouse, client A releases the mouse: what happens?), but that taught valuable lessons too:

specifically, all they really ever teach in school is what i call the data paradigm: your app starts, takes input, does stuff, stops. gui- and network- event-based programs, and how to design, test, and debug them, barely come up.

of course once i got into industry, i got turned on to array programming and never looked back :-)

</comment></comment><comment><USER12> If I were solving this problem in C# I'd probably lean towards defining specific properties of objects in interfaces, rather than just through a type hierarchy.

So we might have the interface ISecurityWithIsin , IOption etc.

This has the advantage of allowing

a.) easy use of mocking, dependency injection for testing.

b.) Classes can implement more than one of these interfaces.

The question then becomes- where do you put your base, shared functionality (e.g. a method that is common to all stocks with Isin numbers). Possibly this becomes another set of classes...

<comment><USER13> The problem with interfaces is that you have to reimplement all the code for the basic functionality in every class. Scala-like traits, which are basically interfaces with optional implementation, should help here.

Also, if you're using a flat type hierarchy where classes never inherit, but only extend interfaces, you're better of using a different language which natively supports a structural typing style, such as Go, OCaml, or Objective C.

<comment><USER14> In the Moose / Perl 6 world, we use roles for this. (I know the idea is borrowed from elsewhere, but I don't know where.) As a Perl 6 programmer, I have almost completely given up on traditional inheritance, because roles capture everything I want from inheritance with greater robustness.

To be fair to original article, this does mean I'm doing my best to avoid type hierarchies...

<comment><USER15> _I know the idea is borrowed from elsewhere, but I don't know where._

It probably originated in Flavors, an object system for Lisp (see <http://en.wikipedia.org/wiki/Flavors_%28computer_science%29>)

<comment><USER16> It was a combination of dissatisfaction with multiple inheritance (see Perl 5, C++), interfaces (see Java), and mixins (see Perl 5, Ruby), as well as an acknowledgement that aspects (see Java) and multimethods (see Common Lisp) solve part of the problem well and part of the problem poorly.

Then Allison and I saw Dr. Black present the Smalltalk traits paper and she realized that their formalism was exactly what I'd been talking about informally, so we borrowed that instead.

<comment><USER13> How are roles different from mixins?

The only difference that I can think of is that mixins are declared at class declaration, is that what you mean?

<comment><USER16> Roles have specific composition rules which forbid name collisions; there's no last-in wins rule. Roles also provide type allomorphism which is much less ambiguous than duck typing.

</comment></comment></comment></comment></comment></comment></comment><comment><USER17>
        We are faced with the dilemma - a lot of the code is now reliant on Isin, and NullReferenceExceptions are getting thrown all over the place because the field isn't getting populated

Sounds like it's catching bugs. You get to fix all the Isin places in a single unit test pass. Or you change the types and it's all fixed by getting it to compile.

The examples provided by the author are absolutely horrible code. A type hierarchy can be more than two deep. How about adding another base type for securities with ISINs?

Moreover, if you ever see code like _security is Option_ or a switch based on the name of the type it is a great sign of poorly architected code.

The solutions provided aren't really solutions at all. How would functional programming solve the problem? If anything a lot of functional languages are even more rigidly typed than C#.

<comment><AUTHOR> (Author here) I agree that the code is horrible :-) that's kind of the point - if you choose to hack up your code, then you end up with horrors like if(foo is Bar) { ... } else { ... }.

The type declarations are, I'd argue, _not_ horrible at the outset, but once you introduce the new requirements then it becomes incorrect. I even suggest possible solutions including adding depth to the hierarchy - the point is doing that means yak shaving, not doing it results in a definitely horrible object-orientated design because it no longer fits the problem.

You can argue that you should have a better model from the outset given the coarse change which comes into play, which is potentially where my example starts to break down (I think it would be hard to find an example that would not break down in some way here, given the need to compress reality into a blog post), so take it as read that in reality the changes are often a lot more subtle than the example I give.

The point is that you're having to make far-reaching, _rigid_ decisions up front. I have encountered this over and over again.

I am happy to admit it's an inadequacy in object orientated design on my part, and if somebody were to suggest approaches that helps mitigate this problem I'd be very happy, but I do wonder whether it's an inherent property of the whole approach.

<comment><USER18> I agree that hierarchy-based OO can introduce real overheads. Favour composition over inheritance, and all that.

Having said that, I believe the problem is exacerbated because developers tend to worry too much about the structure of data from some _arbitrary_ point of view. Put another way, we don't tend to focus on how the data will be used in specific contexts, and therefore we don't actively structure our data to be helpful in those contexts, even if each context is well defined and known to be relevant, unlike whatever "natural" structure we instinctively impose.

In your particular example, my first questions would be about how ISIN data is going to be used: where is the value for each security originally determined, where is it looked up later, what kind of decisions are made based on it, and so on. My next questions would probably be about why securities that are used in that way are being stored and manipulated with securities that aren't. If there is no need to use both kinds of data at the same time, do the representations of the different types of security need to have related types in the code, or is that just an arbitrary decision we have made because it feels natural and in accordance with our view of the real world? Does a security even need to wrap up all of these properties in a single object, or are we really dealing with two or more distinct ideas that just happen to relate to the same real world activity at some point?

It's not possible to answer questions like these without context, but so often with OO, we instinctively dive in and start identifying the nouns first, without considering the verbs that go with them.

</comment></comment></comment><comment><USER19> One of the fundamental principles of OO is go for interface inheritance(design) as opposed to class inheritance(implementation). Better way to enable code reuse is through association. That is why languages like Java do not allow multiple class inheritance, but allow you to inherit from multiple interfaces. You are doing it the wrong way!

<comment><USER20> Wrong for some problem spaces, very right for others. There are many problem domains, and no tool right for all of them.

<comment><USER19> Very right. It is about how you think in terms of OO. If you feel the problem space cannot be modeled easily, just don't go for OO. That said, many problem spaces are amenable to OO thinking. But some are not (especially the ones that deal with serial hardware interfaces), just go for procedural thinking in these cases.

</comment></comment></comment><comment><USER21> As always: It Depends (tm).

Type hierarchies have their place, but can be overused and abused. My typical approach is to be fairly conservative with base classes, and rely on them more for shared implementations rather than polymorphism. Gosu also supports composition (See <http://lazygosu.org/> search for delegates) for shared implementations, but it is syntactically heavier-weight, even if it can be cleaner.

For polymorphism, I'm more inclined to use interfaces. I think there is a place for explicit (java-style) as well as go-style (implicit) interfaces.

The real culprit here is overdesign/premature abstraculation: you can go batshit early on in a project with almost any language feature and compromise your flexibility. Broadly, write as little code as possible, balanced with readability (e.g. don't go ape-shit with obscure macros) and using standard idioms, and let the underlying abstractions emerge when they are ready.

The older I get, the more I feel like less code is the most important thing by a long shot.

<comment><USER22> Um, aren't shared implementations exactly what you're _not_ supposed to use inheritance for? According to the Liskov Substitution Principle (<http://www.objectmentor.com/resources/articles/lsp.pdf>), if it's not transparently substitutable, it shouldn't be a subclass.

<comment><USER21> Probably. But I don't care what the OO academics say: look how they designed JUnit.

I find class-based inheritance most useful for reusing base implementations, and interfaces (explicit or implicit) for conceptual encapsulation. I wish Liskov the best of luck in her software writing.

</comment></comment></comment><comment><USER23> Here I've translated the example to haskell:

        data Exchange = Exchange { bic :: String, name :: String }
        data Security = Security { description :: String, exchange :: Exchange, isin :: String }
        data Stock = Stock { security :: Security }
        data Bond = Bond { security :: Security, expiry :: EpochTime }
        data Trade = Trade { price :: Decimal, quantity :: Decimal, security :: Security }

Now to add Option:

        data Option = Option { security :: Security, call :: Bool, lotSize :: Decimal, maturity :: EpochTime, strikePrice :: Decimal }

And in the example, the problem is that the Option uses Security, which has an isin, which doesn't make sense for Option. In haskell, this is a sort of problem which is typically fixed by adjusting the data types. There are many ways they could be changed, some will model the domain better than others. Let's just make the same quick fix used in the example, of allowing isin to not be set:

        data Security = Security { description :: String, exchange :: Exchange, isin :: Maybe String }

This means that isin is Nothing or Just a String. As soon as this change is made, every place in the program that directly accessed the isin will fail to compile. Fixing the compilation errors will involve adding a case to handle isin-less Securities.

        - foo (Security { isin = i }) =
        + foo (Security { isin = Just i }) = ...
        + foo (Security { isin = Nothing }) = ...

The code does become somewhat ugly with these cases, but you know every case has been covered, and that it will work.

Maybe later it's decided to go back and fix it to use the separation between physical and derivative securities that was originally considered but not done due to lack of time. It could then look like this:

        data Security = PhysicalSecurity { description :: String, exchange :: Exchange, isin :: String }
                      | DerivativeSecurity { description :: String, exchange :: Exchange }

Again this type change would drive a pass through the code, fixing it up to compile.

        foo (PhysicalSecurity { isin = i }) = ...
        foo (DerivativeSecurity {}) = ...

Again you'll know when you're done because the program will successfully compile. In this case, splitting the data type seems to have led to better, clearer code. It might be worthwhile to factor out a helper type to simplify the Security type:

        data SecurityBase = SecurityBase { description :: String, exchange :: Exchange }
        data Security = PhysicalSecurity { base :: SecurityBase, isin :: String }
                      | DerivativeSecurity { base :: SecurityBase }

Although you may find this complicates other things as you "follow the types" and change the code to match. There are surely other approaches; so far this has stuck with simple data types, but typeclasses could also be used. You may want to constrain Bonds to using a PhysicalSecurity, and Options to using a DerivativeSecurity, and there are various ways that could be enforced. And so on.

What was surprising to me coming to haskell from a background in loosely typed languages (and lowlevel langs like C) is that the types are not a straightjacket that is set in stone from the start, but ebb and flow as you refine your understanding of the problem domain. What well chosen types in haskell do constrain is the mistakes you want to be prevented from making. These days if I find myself repeatedly making a mistake in my code, I adjust the types to prevent that sort of mistake in the future.

\---

Side note: The above code will not compile as written, because it exposes an annoying problem in haskell's record syntax. There are several fields named "security" that conflict with one-another. This is typically dealt with by using ugly field names (stockSecurity, bondSecurity, tradeSecurity, optionSecurity), or more advanced things like lenses, or by putting the data types in separate modules and using module namespacing.

<comment><USER24> I find modules namespacing to be a more elegant solution than prefixed field names. (I haven't played around with lenses for this kind of use, enough.) It's just a shame that Haskell doesn't have an in-file syntax for modules like, say, OCaml but each module needs to put into a separate file.

<comment><USER23> I do too. I also tend to find that once I have a module for a particular record type, I eventually find enough other things to put in it, like instance declarations, that it's not a hardship to have a separate file.

<comment><USER24> Yes, it's not a hardship, but it does raise the threshold for doing the Right Thing. Quite unnecessarily in my humble opinion, since OCaml provides an example of how to add this feature to the language without colliding with any of Haskell established concepts. (I don't know about collision with the existing syntax, but you'd enable the modules like any other extention with a pragma.)

Do you know whether Template Haskell could be contorted to provide a syntax?

</comment></comment></comment></comment><comment><USER25> I spent a few years using type hierarchies intensely in the early 00s and found the experience excruciatingly bad. The crystalline structure of your types quickly shatters on the shoals of reality and you are left taping the pieces together. After a particularly bad experience I generally stopped writing OO beyond simple structs.

Around 2010 I started reading rpg's writings on Lisp and software development; that opened my thoughts to a different thought process of how to design software with objects that I haven't really finished working out.

I do agree with you: the C++ modality of inheritance doesn't really work in many cases. It's a tool, but a tool that works badly often. I think a more CLOS or Haskellian viewpoint will yield better results in the long run.

</comment><comment><USER26> I'm in favor of decoupling _data structure_ from _interface_ entirely, via records + protocols. Hierarchies have their place, but ultimately can't deal with cross-cutting concerns. Mixins with structural typing is one way to approach the problem, but for formal contracts I prefer Clojure's approach: [http://www.ibm.com/developerworks/java/library/j-clojure- pro...](http://www.ibm.com/developerworks/java/library/j-clojure-protocols/)

</comment><comment><USER27> How can he write such an article, stating that he used C# because he knows it, and not tackle the problem using the main resource for such issues in C# / Java: Interfaces. Using interfaces, you can decouple all of those classes from each other, and never have this issue in the first place. If the stated model is the way he would typically tackle a problem in C# then there are fundamental issues with his choices, something that is not a failing of the Type system.

</comment><comment><USER28> I'm surprised he didn't mention typeclasses as a solution to this general problem. In many cases it's an unambiguously better solution than inheritance. A particular strength is that typeclasses can be easily defined or overridden at call-sites as easily as at where data types are defined. OOP forces an uncomfortably close complecting of data and operations on that data, leading to the difficulties enumerated in this blog post.

</comment><comment><USER29> I stopped when I read this:

      Functional programming is enjoying a great upswing in interest
      and popularity these days. I wonder whether the stronger type
      systems of these languages...

Functional programming == stronger type system? I thought I can use JS in a functional way without a lot of safety nets. Clojure isn't Scala. Is he right? What am I missing?

<comment><USER30> Whoever wrote that was obviously referencing ML/Haskell

</comment></comment><comment><USER31> "Or do we find some other, less salubrious way around the problem?"

Since salubrious means "good" or "healthy", this statement doesn't make much sense. If you're going to use words your readers are likely going to have to look up, at least use them correctly.

EDIT: at least, it doesn't make sense insofar as I understood the intent of the sentence.

<comment><AUTHOR> I meant less salubrious as in more seedy, less wholesome, a usage I've heard before, e.g. 'a less salubrious bar'. The idea was to imply an evil, dirty hack - I was trying to add colour to the post, but perhaps didn't succeed :-)

I do try to endeavour to stick to the simplest possible expression, but sometimes still fall foul to the use of a word which I enjoy but in fact reduces clarity.

</comment></comment><comment><USER32> Could someone who understands CLOS well weigh in on how this problem might be approached from that point of view?

</comment><comment><USER33> Yeah, because it's so hard NOT to use inheritance.....

</comment><comment><USER34> I'm not quite sure what the issue is here. It turns out that the author modeled the domain incorrectly. At least that incorrect model is completely explicit in the code. If it weren't spelled out explicitly, the coupling that the author speaks of would be insidiously spread throughout the code. In order to make the change that the author wants, it's as easy as introducing a new abstract class. In fact, if all the existing code correctly assumes the existence of an Isin, we can create the following set of classes:

abstract class BaseSecurity { public string Description { get; set; } public Exchange Exchange { get; set; } }

then modify Security to derive from BaseSecurity:

abstract class Security : BaseSecurity { public string Isin { get; set; } }

Then you are done, except for two issues: first is that any serialized data needs to be regenerated, and second is that you can't trade BaseSecurities. However, this trading functionality can be written separately without disturbing the existing ecosystem of software. This is what your type hierarchy buys you.

On the other hand, if we insist that this is not correct, and Security should have Isin removed, then we can add a new PhysicalSecurity between Security and the various implementations, and Stock/Bond/Trade can inherit from PhysicalSecurity.

In that case, the problem is that a lot of code was written with the incorrect assumption that an Isin exists in every security. Now we have to take a step back and ask how to fix that code on a case by case basis. No matter what language you use, it's always possible to write bad code with incorrect assumptions, and in that case you must pay the price. Hopefully you would be clear with your client on the delays required.

Now we can ask ourselves how a static language treats the situation differently than a dynamic language. The author seems to think a dynamic language would help, providing only praise in his description of them.

With a static language, we can simply remove Isin from the definition of Option. This will cause a lot of compilation failures. However, every place where there is a compilation failure is a place in the code which had an incorrect assumption. Each of these incorrect assumptions must be considered individually. After all, this represents the model for a trading system, and any bugs would likely result in severe financial consequences.

In a dynamic language, the definition could be changed, but there would not be any inherent mechanism to catch the now-incorrect calls. Instead, we would just get the NullPointerExceptions that the author complains about and which jeopardize the viability of the financial trading system. Perhaps the coders would have written beautiful unit tests that would help, but that could be the case in any static language as well. Of course, it's also possible that the coders would have created trivial unit tests or no tests at all.

In any case, I see this situation as a win for static type systems rather than a loss.

<comment><AUTHOR> Hey, author here.

Indeed the domain is modelled incorrectly, the problem being that this realisation that this is the case has come late on in the development process. Perhaps in my simplified example that's something you could pick up on before work commenced, but in reality there are many little (and sometimes big) things which you either miss no matter how hard you try, or change later on.

The problem with your suggestions as to _fixing_ the hierarchy is that, yes this is something you ought to do and it resolves the problem, but it takes _time_ and is in essence yak shaving, or at least feels that way - are you really working towards making your software better, or are you just pandering to the abstraction you've created?

In any case, this is one of the 2 options I suggest to resolve the situation, and definitely the correct one (I cover the idea of separating out ISIN and non-ISIN instruments as e.g. physical/derivative), however it takes _time_ and the problem is it is so often the case that time pressures result in you hacking around the problem, making the hierarchy not only incorrect, but actively misleading.

I didn't mean to suggest dynamic languages were a silver bullet here, nor did I mean to put particular emphasis on them.

No matter what you will have to refactor, but the question is whether a rigid hierarchy makes that more or less difficult, and whether that rigidity tempts you into hacks which make this structure misleading.

I think the problem with putting any particular example in the article is that it will inevitably be inadequate for its purpose. The problem really bites when you've experienced a large code base have some small incongruity that doesn't quite fit the model, but I don't think I could clearly and simply express that in code.

<comment><USER35> There are always time trade-offs. When the overall software design becomes tightly coupled with the type system you simplify the code. You could abstract the way you handle messages, but at some point you need to get the ISDN for some security and no amount of abstraction let's you avoid that.

Now, as you say doing it the right way can take significant amounts of time. But so do the hacks it's just a question of when to spend the time. IMO, front loading the costs is much better because you get a clear understanding of what adding each feature actually costs.

</comment></comment></comment><comment><USER36> its a problem if you don't know your domain ...

you have no business designing type hierarchies if you don't have a clue about the domain you are modeling.

<comment><USER37> The OP clearly has more than a clue about the domain.

If you work in a complex domain for any length of time you realise that domains change. I don't just mean that requirements change but the actual real world domain changes.

As it happens, I have been babysitting a large system in this domain since 1996. ISINs were hardly used then, and many types of derivative financial instruments hadn't been invented. Government regulations too keep changing, often bringing into existence completely new data points.

'Knowing a domain' is a meaningless concept in long-lived business system.

<comment><USER38> "Government regulations too keep changing"

Excellent point. This puts some of the comments above about how agile methods could quickly identify these problems and address them by refactoring into doubt. You could build a very big system, understanding the domain well, and then have a regulation change introduce new issues that you could not have anticipated.

Beyond finance, health care would be another setting where this could be important (HIPPA must have caused a lot of hasty alterations).

</comment></comment></comment><comment><USER19> I think one of the fundamental issues here is how the programmer views OO as a programming methodology alone. OO is more a collaboration tool which helps large teams come up with complex functionality. The architect or lead designer comes up with system level abstractions and module contracts. The module designer then comes up with module level abstractions and interfaces. Finally the programmer is supposed to code to the interface given to him. Thus large projects can be managed better as each person knows their roles and responsibilities and system can be thought of as composed of blackboxes.

This works only when the architect knows his job and module designers are good. Good programmers often do not make good architects (it is a different thing that often good architects are good programmers too). In OO design comes first, second and third; implementation comes last. This creates a situation where programmers do not have enough work towards the beginning of the project. But as any normal scenario, this text book version works only 80%. Remaining 20% are situations where we do not know the abstractions to begin with or implementation feasibility is questionable.

This is where I use the programming resources to do prototyping of 20% functionality while the design is going on in parallel. In cases where abstractions may change, keep them at a very high level and evolve the design over time. By providing hooks to refactor and evolve the design over time, you can future insulate to some extent.

As long as every programmer is not forced to think in OO design terms and is given a simple contract of coding to the interface it works. That said good architects are rare and the job requires some experience and expertise in abstract thinking and most programmers do not end up as one.</comment>


List of 30 Slack Alternatives - <AUTHOR> https://startupstash.com/slack-alternatives/ <comment><USER2> A long and badly curated list of software -- at least from some I know, such as Trello or Freedcamp, they follow very different paradigms then Slack. They want to solve another problem.

Slack pretends to be a child of IRC. There are plenty of contemporary chat room alternatives, such as Gitter, Matrix, IRCv3.</comment>


Google's Self-Driving Car Crashed.  So What Happens Now? - <AUTHOR> https://www.linkedin.com/pulse/googles-self-driving-car-crashedso-what-happens-now-phil-lebeau?trk=hp-feed-article-title-like <comment><USER2> Well, It has been many years without and accident, I think this still better than me driving.

<comment><USER3> It would've caused ten accidents last year alone, if not for the human drivers overriding the software and preventing the crash. Statistically, humans are still safer drivers.</comment></comment>


Making Photo Tagging Easier - <AUTHOR> http://blog.facebook.com/blog.php?post=467145887130

<comment><USER2> This is the most anti-linkbait title I've ever seen. It's so prosaic for such an insanely powerful and sophisticated technology!

It's kind of like if Google developed working cold fusion and wrote a blog post titled "Making it easier to heat your home"

<comment><USER3> Thanks, Axiom. We're proud of the work we're doing here.

</comment></comment><comment><USER4> That's no good. I usually just want to be tagged in the photos I look good in, and out of a series of 50 wedding shots, those could be 2 or 3. So now I'll have to go untag myself in 47 auto-tagged photos.

<comment><USER3> Tag suggestions does not autotag photos. It does make it easier for people to tag photos that are already being uploaded. Many of these photos are actually already being tagged, albeit through a much more cumbersome experience.

We're not expecting a significant jump in the number of tags created, just a significant decrease in the time people spend tagging.

</comment></comment><comment><USER5> Same story:

<http://news.ycombinator.com/item?id=2010414> \- techcrunch.com - no comments (yet)</comment>


The Second Wave of Blockchain Innovation - <AUTHOR> https://medium.com/@Swarm/the-second-wave-of-blockchain-innovation-270e6daff3f5

<comment><USER2> I'm not trying to be snide but that article is very difficult to read b/c of the white text.

<comment><USER3> As well as readability (mentioned above), I find Evernote's Clearly to be a great extension for reading anything on the web (medium.com tends to be notorious to read)...

[https://evernote.com/clearly/](https://evernote.com/clearly/)

Note that you don't need a evernote account to use this (I don't, and it just works).

</comment></comment><comment><USER4> Argh, 'i.e.' means 'that is'; in the text, it is used to mean 'for example,' which is of course abbreviated 'e.g.'

</comment><comment><USER5> Interestingly, this leaves out any mention of what all of these systems entail: global state shared between all users of a currency.

Expecting every user to perform all calculations on the system is a rather tall order, and one that will influence investment dynamics far more than any of the factors looked at in this MBA analysis of the space.

<comment><USER6> Every user might verify just a random sample of all calculations and the system would still work.

<comment><USER7> Three approaches to blockchain scalability were discussed:

        1. jury selection
        2. multichains
        3. hypercube

1\. Jury Selection means that tx-s validated first by a small jury and only if there no consensus, theie entire network become involved.

2\. Multichains is like sharding. And just like in sharding you need to decided on criteria for sharding (i.e. you shard by asset ID, geography of the sender or receiver, by the amount transferred, etc.)

3\. Hypercube - you see every tx as an edge in the hypercube. Then this edges randomly assigned to the jury? I'm not fully understand this one.

<comment><USER8> It would be convenient if there was a data structure that could store the set of unspent transactions as a sparse tree, and easily add/remove transactions without knowing the full tree. Perhaps as a merkle tree. There might be something more efficient.

I think that if this has was included in each block, then a user of bitcoin could download the block headers starting from their last known-good block. Then download the structure containing the transaction set from a recent block (6-10 blocks back, perhaps) to prevent having invalid blocks with good proof of work at the end, as those wouldn't be built upon by other miners. Then download the transactions from the blocks after the one you have the transaction set from and only verify those blocks.</comment></comment></comment></comment>


Are you on Facebook? Check out MyPermissions - <AUTHOR> http://thenextweb.com/facebook/2012/11/02/are-you-on-facebook-check-out-mypermissions-now-seriously-just-do-it/?fromcat=all <comment><USER2> What does this do for me that <https://www.facebook.com/settings/?tab=applications> does not? Other than ironically nag me to share on social media and sign up for their newsletter for every app I drop?

<comment><USER3> I thought the ironic sharing on social media and reward system was a nice touch ;-)

Seriously though, I think the value add is that it can send you alerts when permissions change, or just nag you to clean up the permissions -- sounds like useful nagging. I don't see Facebook making any attempt to help me reduce the number of apps/permissions.

</comment></comment><comment><USER4> That's a great tool. I hadn't realized that every time when I was "sharing with Facebook", or "commenting with Facebook" I was actually installing all kinds of Facebook apps that would have long term ability to post as me.

Facebook needs to have some more tinfoil had granularity for some of that stuff. I'd be fine with allowing some of those apps some of their crazy permissions if I had to authorize it every time.

And wow, do app designers ever need to start doing a better job of naming their apps. The Pizza Pizza Canada app was uatpizza or something dumb like that.

</comment><comment><USER5> There was something like this a few years ago. Facebook changed something (and/or FB changes made maintaining the plugin impossible) and it stopped working. Like any business idea dependent on the goodwill of an API to third- parties, a conflict with business priorities will always resolve in the API owner's favor.

</comment><comment><USER6> I think most people would be more likely to click this if it didn't say "Seriously, just do it."

<comment><AUTHOR> Good call, fixed

<comment><USER6> Looks good though! I'll give it a go later

</comment></comment></comment><comment><USER7> Wow! This is really neat and useful. _Thanks for making this (if you created it, OP)!_

There was quite a few apps that I had forgotten I had given access too, that I revoked permissions. I also really love how it is a Chrome extension instead of yet another app I would have to give full access to, just to delete access for other apps (that would seem just plain silly haha). It makes me feel much safer using it. Great job! :)

 _Direct link for those that do not want to read the article:<http://mypermissions.org/*>

_Link to get chrome extension: [https://mypermissions.com/?utm_source=org_promotions_cleaner...](https://mypermissions.com/?utm_source=org_promotions_cleaner_text_link_default_no_test*)

<comment><USER8> FYI: "This extension can access: Your data on all websites Your tabs and browsing activity"

</comment></comment><comment><USER3> I really like the report that's generated, but it took me about 4 attempted scans before one finished. I'll be patient because I'm interested in this, but I don't think most people on the internet will be as patient.

Anyway, great start and looking forward to seeing it improve!

</comment><comment><USER9> Great wep app, it scanned and removed the applications without requiring sign up, providing email address, etc.

That is the key step so many things online mess up - let me try it out w/o having to create another user account!

</comment><comment><USER10> I go to the page and it shows "Sign in to Facebook to scan your permissions", I am however signed in, clicking the link takes me to my Facebook feed. Does anyone else have this problem? Chrome on W7.

<comment><AUTHOR> Yes and after a second it should redirect you back to MyPermissions.

<comment><USER10> No redirect after, just sitting looking at my news feed.

</comment></comment></comment><comment><USER11> Shouldn't the platform owner (e.g. Facebook) make sure that no intrusive apps can connect in the first place?

<comment><USER12> Well, they're defining "intrusive" to include things that Facebook supports on purpose, so they have different opinions about what should be permitted on the platform. For example, this scanner considers apps that have permission to post in your name as intrusive, while Facebook not only allows that, but even spent time implementing that functionality.

<comment><USER11> As far as I know, there are a lot of Facebook apps that ask for more privileges than they need. The question is, why doesn't facebook look at the app, its requested privileges and reject them if they ask for too much? This would prevent the most egregious problems, and make MyPermissions unnecessary.

</comment></comment></comment><comment><USER13> I like the analogy. There is anti-virus for security, but there should be an equivalent for privacy.

</comment><comment><USER14> How does an app get on the "MyPermissions' Safe Permissions Program" list? Where is this list?</comment>


Facebook Bans for Anti-Putin Poetry on Your Wall - <AUTHOR> After the ban they also enabled forced pre-moderation on all my wall posts (everything I post to my wall gets marked with ""We removed this post because it looks like spam and doesn't follow our"), so now I cant post anything at all. Do we need more proofs that Zuckerberg is a Putin's friend? Hello, Facebook! I'm a citizen of Russia who is just being critical of Russia and Putin. How much Russia pays Zuckerberg to censor dissent opinion and promote Russian puppets, like Donald Trump? <comment><USER2> so the new AI Zuckerberg keeps going on about doesn't seem to work so well?</comment>


GitHub now censoring repos critical of the Microsoft acquisition - <AUTHOR> https://twitter.com/UpEnd_org/status/1004308027078578176 <comment><USER2> Whoever is running this twitter account doesn't come off that well. The various tweets and replies read very similar to the rants of a 14 year old that had their Magic: The Gathering playing cards confiscated by their mother.

</comment><comment><USER3> I think this is the repo referred to in the tweet.

[https://github.com/upend/IF_MS_BUYS_GITHUB_IMMA_OUT](https://github.com/upend/IF_MS_BUYS_GITHUB_IMMA_OUT)

</comment><comment><USER4> Earlier discussion: [https://news.ycombinator.com/item?id=17247256](https://news.ycombinator.com/item?id=17247256)

</comment><comment><USER5> So it's business as usual for Microsoft. Unsurprising.</comment>


Documents Show Liberals in I.R.S. Dragnet - <AUTHOR> http://www.nytimes.com/2013/06/25/us/politics/documents-show-liberals-in-irs-dragnet.html

<comment><USER2> A relevant clarification from an earlier version of the list; the article includes it so you can judge for yourself: [http://www.nationalreview.com/corner/351930/lookout-list- not...](http://www.nationalreview.com/corner/351930/lookout-list-not-much- broader-originally-thought-contrary-reports-eliana-johnson)

" _A November 2010 version of the list obtained by_ National Review Online, _however, suggests that while the list did contain the word "progressive," screeners were in fact instructed to treat "progressive" groups differently from "tea party" groups. Whereas screeners were merely alerted that a designation of 501(c)(3) status "may not be appropriate" for applications containing the word "progressive" – 501(c)(3) groups are prohibited from conducting any political activities – they were told to send those of tea- party groups off "to Group 7822″ for further scrutiny.

That means the applications of progressive groups could be approved on the spot by line agents, while those of tea-party groups could not. Furthermore, the November 2010 list noted that tea-party cases were "currently being coordinated with EOT," which stands for Exempt Organizations Technical, a group of tax lawyers in Washington, D.C. Those of progressive groups were not. _"

</comment><comment><AUTHOR> The most relevant point for here I included in the title before it was changed by someone...

 _But groups with no political inclinations were also examined. "Open source software" organizations seeking nonprofit status "are usually for-profit business or for-profit support technicians of the software," a lookout list warns. "If you see a case, elevate it to your manager."_

<comment><USER3> Some of the HN mods are truly inept.</comment></comment>


Google Profiles Has a New Interface - <AUTHOR> http://googlesystem.blogspot.com/2011/03/google-profiles-has-new-interface.html

<comment><USER2> Looks a lot better organized, but also a lot like facebook. Not that that's a bad thing, the facebook profile page has clearly been successful.

</comment><comment><USER3> About time. Let's see what happens when Google finally starts taking social serious.

Now where's my Google social graph?

<comment><USER4> Right here <http://code.google.com/apis/socialgraph/>

<comment><USER3> I mean _my_ social graph. The one that's easy to use and immediately useful to me :)

<comment><USER5> Here: <https://profiles.google.com/u/0/connectedaccounts>

<comment><USER3> I mean the one that is useful to me, that has, as pg would say, "a quantum of usefulness" :)

Google treats the social graph as an engineering challenge, but they've never understood that it can actually be useful for stuff.

And the link you posted isn't a social graph, it's a list of accounts connected to my account. Nothing social about it.

</comment></comment></comment></comment></comment><comment><USER6> Er... there is <http://www.google.com/profiles/iworkforthem#buzz> and there is also <https://profiles.google.com/iworkforthem/about>

So there are 2 profile pages now?

</comment><comment><USER7> Doesn't work in the latest Chrome dev channel. Ironical?

No errors in the console. You just get a blank page.

</comment><comment><USER8> > Another change is that you can now hide the Google Buzz tab from your > profile.

Slowly admitting that Google Buzz was a complete failure...

<comment><USER9> I still like it. Works for me and my small group of friends and family and I can manage who I share stuff with better than broadcasting everything over twitter. I hope they keep it around.

</comment></comment><comment><USER10> looks like new facebook profile pages, especially the top part.</comment>


Bill Gates calls for income tax in Washington state - <AUTHOR> https://mynorthwest.com/1658307/bill-gates-income-tax-washington/ <comment><USER2> Luxury beliefs. The elite promote agendas that will never impact them directly but will fulfill their internal needs to feel righteous

<comment><USER3> What? He's explicitly saying it will impact him directly.

<comment><USER4> It won't, and Bill will and has spoken out against any serious proposals to tax wealth, which is a different kind of taxation than an income and even an estate tax.

Seriously this happened only a month ago, how has everyone already forgotten about it?

[https://www.commondreams.org/news/2019/11/07/taxing-bill- gat...](https://www.commondreams.org/news/2019/11/07/taxing-bill- gates-100-billion-counters-bernie-sanders-could-end-homelessness-and)

<comment><USER5> Why make such blatantly false statements?

In that article, Bill Gates said that he has paid 10% of his wealth in taxes, and proposed paying 10% more, but expressed concern about paying 90%.

I applaud you for having the chutzpah to link to a source you brazenly misquote.

<comment><USER4> Allowing the billionaires to set the reasonable taxation rates of this discussion is a testament to how brainscattered people are on this. 10% would still leave an enormous amount of money left over and far more than he would ever need. His great great great grandchildren would still be multi- billionaires.

</comment></comment></comment></comment></comment><comment><USER6> Having moved from CA to WA I don't see how the lack of an income tax has negatively affected the services up here maybe if someone can explain what WA is lacking compared to states with an income tax

<comment><USER7> You need look no further than the other side of the Columbia River to see the trade-off. Most years, Washington has the most regressive tax regime in the United States, Oregon has the least regressive. Oregon has an income tax and no sales tax.

<comment><USER8> What specific effect are observing to compare outcomes? OR has better strip clubs and more people blocking urban intersections and lighting stuff on fire.

<comment><USER7> I don't think I'd go that far. Except for the strip clubs, that's definitely a plus. We do know how the tax is distributed by income, however, which may be the only useful metric (absolute values having not much to do with method, I assume).

</comment></comment></comment></comment><comment><USER9> I wonder how much society would change if you were capped with how much wealth you could pass along after you died. The rest going directly to the govt. Maybe a cap that was more than enough per child? 1-10M?

<comment><USER10> Why should the government be entitled to it, though? The government has shown itself to be a terrible steward of wealth. I would rather we prioritize incentives to use existing money more efficiently and cut wasteful spending vs. increasing the amount of money pouring into the coffers.

<comment><USER11> There is a difference between "the government" and "the state" (not US states, and may also refer to "the people").

It's not that the state is "entitled" to it any more than it's entitled to any other tax - but consider the state is responsible for society, economy and infrastructure: overall the state created value. Whereas what is the moral entitlement of someone who had the sheer fortitude to be born to someone who had amassed that much wealth?

And if the state gets a decent amount of income from estate-taxes and it meets its budget-goals and creates value through spending it - or even if it chooses to lower taxes on everyone else instead, then consider who is the real net recipient of the estate tax revenue? - everyone.

</comment></comment></comment><comment><USER12> Seattle's problems aren't magically going to go away with more money. In fact I would argue that the city has never had as much money as they do now, its just that they are squandering it away and wasting it on programs that bring misery to the taxpayers, and dont really help those that they are supposedly trying to help. Seattle needs a functional police force, strong enforcement of current laws and more jails.

</comment><comment><USER13> This headline does a disservice to his statement. He addressed the need to tax wealth, including generational wealth, as well as incomes. The nature of the latter will be contentious in WA given the fact that the area has a high COLA, is tech heavy, and that many of the workers here are 1st generation immigrants whose only source of stability and wealth is their income.

<comment><USER14> > He addressed the need to tax wealth

Did he? Where? He said he supported an estate tax -- which he obviously wouldn't pay until dying.

Most talk of a wealth tax is about taxing wealth while you're alive.

</comment></comment><comment><USER15> His statement should be considered in the context of the fact that WA has the most regressive tax system in this country (source: [https://itep.org/washington/](https://itep.org/washington/)).

<comment><USER16> "Regressive tax" is simply a loaded pejorative for "uniform" or "fair" tax. Washington's tax system encourages taxpayers to actually consider what things they want to spend money on, since it is their own money that does it. A heavily graduated tax system (a "progressive" tax system) introduces moral hazards ([https://en.wikipedia.org/wiki/Moral_hazard](https://en.wikipedia.org/wiki/Moral_hazard)) because many voters would not be spending their own money.

</comment></comment><comment><USER17> I'm 100% against income tax or any other tax on workers. Close tax loopholes and make the billionaire and millionaire pay higher effective rates before you go after workers.

I want to see a higher capital gains tax directly tied to the value of your assets.

</comment><comment><USER18> This article is pretty substanceless, but especially since it references Bill Gates, got me thinking- why is no one calling for a tax on intellectual property? The article implies that a lack of income tax is regressive, but it seems that the value of the monopoly on IP accrues to a tiny slice of the populace.

<comment><USER19> The value of IP law for the consumer is in the work itself, which often would not exist but for the ability for its creator to profit from it.

Now as to taxing IP: property (wealth) just is not taxed right now, at least in the US and with the exception of land and/or buildings. There are reasons for and against that, and they pretty much apply to IP, too.

If some state decided to start taxing wealth, IP would be no exemption, although there are a few of specific difficulties with it. IP you created yourself is fiendishly difficult to evaluate, something that is easier if you just bought it, where the market-based price is assumed to be a good proxy for worth.

</comment></comment><comment><USER20> I'm pretty opposed to any income tax.

Property tax makes sense, I'm essentially supporting my country / region through payment to protect said land.

Tax on goods crossing boarder makes sense, I have to pay for inspections and potentially for protection.

Tax on sale of good kind of makes sense, because again we need protection (likely equivalent to worth of good).

Income tax is this weird one because it seems like punishment for being productive. Arguably we are paying back society for being productive? But that seems odd given we are taxed for everything else.

I'm any case, my gripe here is no one should be pro tax IMO, maybe pro "free medical care". But why would anyone call for taxes. Wealth redistribution already happens with estate tax and honestly (from what we've seen in history) wealth redistribution kind of happens automatically.

<comment><USER21> Progressive income tax reduces wealth inequality. People start in a very unfair game and it prevents the rich getting richer, and the poor getting poorer. Wealth inequality tears communities apart.

<comment><USER16> What does it mean for inequality to "tear a community apart"? That feels like emotional hyperbole. I also don't think reducing wealth inequality is a foregone goal that takes priority over other criteria. A progressive income tax also reduces the incentive to create economic value. And most of the time, the increased tax revenue is not managed efficiently - for example, California doesn't have "better communities" or improved services for all the tax it collects.

<comment><USER21> > What does it mean for inequality to "tear a community apart"?

A decent enough summary: [https://en.wikipedia.org/wiki/Effects_of_economic_inequality](https://en.wikipedia.org/wiki/Effects_of_economic_inequality)

_British researchers Richard G. Wilkinson and Kate Pickett have found higher rates of health and social problems (obesity, mental illness, homicides, teenage births, incarceration, child conflict, drug use), and lower rates of social goods (life expectancy by country, educational performance, trust among strangers, women's status, social mobility, even numbers of patents issued) in countries and states with higher inequality. Using statistics from 23 developed countries and the 50 states of the US, they found social/health problems lower in countries like Japan and Finland and states like Utah and New Hampshire with high levels of equality, than in countries (US and UK) and states (Mississippi and New York) with large differences in household income_

> I also don't think reducing wealth inequality is a foregone goal that takes > priority over other criteria.

See above "bad stuff".

> A progressive income tax also reduces the incentive to create economic > value. And most of the time, the increased tax revenue is not managed > efficiently - for example, California doesn't have "better communities" or > improved services for all the tax it collects.

There's maybe 15 socialist democracies with a higher HDI than the USA, with higher taxation (and more progressive taxation). People still work through higher brackets, buy expensive things etc.

<comment><USER16> Thanks for sharing. However, the paper the Wikipedia article is quoting is not publicly available, and therefore I can't verify how they establish _causality_ between inequality and those outcomes. Furthermore, even if there were a causal relationship, that doesn't mean the US is doing anything worse than these other countries. For example, countries like Japan or Finland may have different health outcomes that could wholly be due to genetic traits, eating habits, lifestyle choices, and other cultural elements. A statistical test wouldn't be able to easily introduce a qualitative variable like culture into the study, to separate the effect of such a variable relative to another input variable like income distribution.

But the point I was originally making regarding communities is slightly different. Even if there is variance in income locally, I feel like I belong to _a_ community and city. Most people around me would likely say the same thing. It doesn't make me feel like a "community" is being "torn apart" due to variance on income or wealth. The definition of "community" or what it takes to say that it is being "torn apart" is going to be inherently subjective and personal, and so such a broad claim doesn't seem reasonable to me.

Lastly, I think every choice has a tradeoff. It is worth noting that America has produced the bulk of innovations in the last 100 years, both from the work of public agencies and impactful private organizations. Other countries simply have not produced the same output in recent times. It is easy to claim that some other locale has a higher HDI but those same places are benefiting from the output of the American system as it exists today, with the very same tax structures that Gates is criticizing. For example: Washington State, which is specifically called out by Gates, has produced Microsoft, Amazon, Cray (supercomputers), Starbucks, Real Networks, Redfin, Tableau, Costco, Nordstrom, REI, Valve, Bungie, Expedia, Paccar, Boeing, and numerous other globally impactful companies that I have left out. It certainly seems like the impact and benefit on quality of life is there, and it is cultivated by an environment that has the right traits on multiple dimensions. Those socialist democracies you are referencing are not anywhere near in terms of their value add to humanity as a whole, and I think if they were isolated (not benefiting from global export of American outputs) they would definitely not have the same degree of development.

</comment></comment></comment></comment></comment><comment><USER22> Almost everyone supports taxes on OTHER people.

</comment><comment><USER23> That's nice Bill, how much of the money you made after moving Microsoft to Washington because they didn't have income tax are you gonna donate to this cause? Becaue I am sure a certain other company who set up in Washington because of their lack of income tax is gonna be spending a lot of money on keeping the status quo.

<comment><USER24> There are still corporate business taxes in Washington, and they are revenue based instead of profit based (extremely backwards, but it certainly isn't no taxation). The primary benefit is for personal income.

</comment></comment><comment><USER16> Bill Gates really disappointed me with this post. Washington's lack of an income tax, and its relatively uniform tax structure means that everyone has "skin in the game" and the state has to be focused and efficient with its spending. California is a great example of the inefficacy of huge tax revenues - the quality of life and services in California is not that great, and definitely no better than Washington, despite aggressive taxation.

</comment><comment><USER25> He's right. Seattle is suffering a crisis of mentally ill and/or drug addicted homeless people. However, the problem is much bigger than the city — many of these people come from outside Seattle and the city simply can't afford to solve the problem on its own.

This is both a nationwide and statewide problem. But the lack of state income tax makes it harder for Washington to better fund mental health facilities in the state. The state prides itself on its progressivism and compassion, but it's 23rd in the nation for per capita mental health funding.

<comment><USER14> San Francisco, LA, and Portland have similar problems, despite having access to income tax dollars.

<comment><USER26> Fun fact, the percentage of homeless in Seattle is the highest of major American cities, at ~1.68%.

For comparison, ~0.90% in SF, and ~1.45% in LA.</comment></comment></comment>


Ask HN: Why is it hard to get a job in California? - <AUTHOR> If you're from a different state, how hard is it to find Software Engineering work in another state? I'm finishing undergrad from a State School in December. <comment><USER2> its 100x easier if you are local.

sublet a place in sf for 3 months, odds are you'll find a gig.

in order for companies to call an out of state fresh grad staying at home, you really need to stand out (great gpa, "hard programming" personal projects)

<comment><AUTHOR> I have "hard programming" personal projects. All my projects are in low level C. I have a data structure library, (think C++ stl). I also have a programming language I built in C with an AST, and function calls, variables, all that.

<comment><USER2> Yeah, that's the type of stuff you'd need to stand out.

Its still harder to stay home, but if you are, here are a few tips: leave your address off your cv. Recruiters will still see the location of your undergrad but hopefully you'll get a phone interview (and pass it) and when they ask you where you are located, tell them, but then also say something along the lines of "I am moving to sf January 15th" something like that.

Bigcos will play more ball than start ups.</comment></comment></comment>


Clarifying the differences between what animals and humans hear - <AUTHOR> http://nautil.us/issue/70/variables/what-makes-music-special-to-us <comment><USER2> One point of contention in this otherwise interesting article: in some languages, pitch is absolutely salient. It doesn't generally happen to be in English, but in Bantu languages, Chinese, Vietnamese, etc., pitch or tone is an important discriminator. How and what it encodes differ, and it is indeed relative pitch or contour rather than absolute frequencies, but it is definitely not secondary.

<comment><USER3> Some languages also use rhythm to distinguish words, such as Finnish or Japanese.

It could arguably be a factor in English as well, and the cause of such effects as the "sesame street F-bomb" where the odd rhythm led many people to hear something else that what was said.</comment></comment>


Why Search Is iOS 9's Killer Feature - <AUTHOR> http://arc.applause.com/2015/06/23/ios-search-developer-faq-ios-9/

<comment><AUTHOR> Really, look at the search features coming in iOS 9 and tell me Apple isn't going after Google's core business. Every search result that comes up in iOS 9 is a click that Google doesn't get. </comment>