Common Python Mistakes - <AUTHOR> http://www.toptal.com/python/top-10-mistakes-that-python-programmers-make?utm_source=Engineering+Blog+Subscribers&utm_campaign=51aba2b5ff-Blog_Post_Email_Top10PythonMistakes&utm_medium=email&utm_term=0_af8c2cde60-51aba2b5ff-109835873 <comment><USER2> This is a pretty good list of gotchas, but it's important when writing something targeted at beginners to be as precise and clear as possible. Nearly every section here either uses terminology poorly, is slightly incorrect, or has difficult examples.

      Python supports optional function arguments and allows default values to be
      specified for any optional argument.

No, specifying a default is what _causes_ an argument to be optional.

      it can lead to some confusion when specifying an expression as the default value
      for an optional function argument.

Anything you specify as a default value is an expression. The problem is when the default is _mutable_.

      the bar argument is initialized to its default (i.e., an empty list)
      only the first time that foo() is called

No, rather it's when the function is defined.

      class variables are internally handled as dictionaries

As dictionary _keys_ , and that's still only roughly correct.

In "Common Mistake #5", he uses both a lambda and array index based looping, neither of which are particularly Pythonic. A better example of where this is a problem in otherwise Pythonic code would be good.

In "Common Mistake #6" he uses a lambda in a list comprehension -- for an article of mistakes mostly made by Python beginners, this is going to make it tough to follow the example.

In "Common Mistake #7", he describes "recursive imports" where he means "circular imports".

In "Common Mistake #8" he refers repeatedly to "stdlib" where he means the Python Standard Library. Someone is going to read that and try to "import stdlib".

<comment><USER3> Just to notice: this text is _not_ targeted at beginners, in my opinion. These are upper-intermediate to advanced level gotchas.

<comment><USER4> Did they add in "(Note: This article is intended for a more advanced audience than Common Mistakes of Python Programmers, which is geared more toward those who are newer to the language.)" later?

Because it states it right near the top of the article.

<comment><USER5> That note has been in the post since it was first published.

</comment></comment></comment></comment><comment><USER6> Slightly off topic, but does anyone know of a resource that has 'most common mistakes' for different languages all in one place? It's certainly possible to google for blog posts and stack overflow questions to assemble such a list, but it would be handy to have them all in one place.

My use case is when interviewing candidates I often ask them to rate themselves on a scale of 1-5 in the languages they know, and then ask them increasingly 'tricky' questions in each language to get a feel for how their "personal" scale aligns to their real knowledge. This works fine if we have an overlap of several languages, but in the case where I know nothing or very little of one of the languages they know I lose that data point.

I find it valuable to know what a "I am a 1 at X" vs "I am a 3 X" vs "I am a 5 at X" means to them, since I've found little correlation between how harshly someone rates themselves and their true ability. Sometimes self-rated 5s are really 5s by my book, sometimes self-rated 3s are really 5s by my book, and sometimes self-rated 5s are really 2s by my book. So I want to know how "my scale" translates to "their scale". If it was more formalized I'd go as far as to get a "confidence quotient" for a person as self-critical and self- confident people can be fantastic engineers or horrible engineers.

Does anyone else do this process when interviewing?

<comment> mark-r While such a resource would make your job easier, it would make the interviewee's job easier still. They'd just have to memorize all the points in the reference.

<comment><USER7> At which point they will no longer make these mistakes, and thus are more expert.

Everyone wins!

<comment> mark-r Except that you're risking hiring people that know all the trivia but still can't program FizzBuzz properly. The test loses its predictive value.

<comment><USER8> but at least employers will stop testing trivia and focus on problem solving skills.

Everyone wins!

</comment></comment></comment></comment></comment><comment><USER9> This list is an excellent summary. If tasked with a #11 I'd probably add the slightly more obscure, but still super painful (when you do run into it) implicit string concatenation:

        >>> l = ["a",
        ...      "b",
        ...      "c"
        ...      "d"]
        >>> l
        ['a', 'b', 'cd']

<comment><USER3> Still hugely useful when you want to write long string constants.

Imho, adding a comma after _each_ list element is a good practice. You can easily swap them, add more, and never run into a an issue you describe:

        foo = [
          "a",
          "bc",
          "def",  # comma here, too
        ]

<comment><USER10> You could easily use a + operator then. I find the behavior surprising. I would expect a syntax error. You get a syntax error if you write two integers next to each other (separated by a space) or two of any other thing but somehow "a" "b" got converted to "ab". If I've discovered it myself I would be tempted to fill a bug report. It goes against Python mantra:

"Explicit is better than implicit"

It seems someone thought along similar lines and took action: [http://legacy.python.org/dev/peps/pep-3126/](http://legacy.python.org/dev/peps/pep-3126/) but the issue got rejected.

<comment><USER9> Yeah, when I discovered this little "feature" I had a read through that. The folks that use this for blocks of multi-line text are very defensive about the practice. I do understand not wanting to break compatibility though, especially since finding instances of this is hard (which is another reason it shouldn't exist in the first place!). Oh well :)

<comment><USER11> > The folks that use this for blocks of multi-line text are very defensive > about the practice.

odd, because we have triple-quotes for that, don't we?

<comment><USER12> No, unfortunately we have not.

With triple quotes you get a string with newlines and indentation in it. While you can not indent the following lines it looks ugly, and you can't do anything about newlines.

Take a look at how F# handles the issue: [http://stackoverflow.com/a/14599828](http://stackoverflow.com/a/14599828)

And CoffeeScript: [http://coffeescript.org/#strings](http://coffeescript.org/#strings) (apparently implemented relatively recently ([https://github.com/jashkenas/coffeescript/issues/3229](https://github.com/jashkenas/coffeescript/issues/3229)) and borrowed from LiveScript.

There are other language which support multiline strings (Here docs) with indents stripped via means of syntax, like YAML (with |), Racket (which doesn't do dedenting, but being language it is it's very easy to add) and many shells (with <<-). Python doesn't have this feature, and parse-time string literals concatenation serves this purpose.

Of course, you can do something like:

        foo = """bar
              indented at first
              and after newline
        """
        textwrap.dedent(foo)

(or use list literals with str.join, or use a regex, or many, many other thing), but you can do this in _all_ languages. Languages with syntactic sugar for this make writing slightly-longer-but-not-too-long strings much easier and cheaper (only done once during parsing, no need for imports, etc.), and Python makes up for not having explicit way of doing this with implicit parse-time string literals concatenation.

</comment></comment></comment></comment></comment></comment><comment><USER13> Another one:

        class A():
          def __init__(self):
            self._x = 0

          @property
          def x(self):
            return self._x

          @x.setter
          def x(self, new_value):
            self._x = new_value

Using it:

        a = A()
        print a._x    # 0
        print a.x     # 0
        a.x = 4
        print a.x     # 4
        print a._x    # 0 wait WTF?!

The bug was not having `A` inherit from `object`. With old-style classes, properties do not work correctly.

<comment><USER14> For anyone wondering, this works just fine in Python 3 :)

<comment><USER15> Yes, but just because all classes in python 3 are new-style.

</comment></comment></comment><comment><USER16> My pet peeve with python is the classic:

        return x,

I have never wanted to declare a tuple without surrounding it with (). Too bad it's not a syntax error in python 3.

Also, as opposed to one of his examples, if you are using python 2.7, declare your exception blocks as:

        except (FooException, BarException) as e:

It's forward compatible with python 3, it's easier to read and the syntax errors are clearer.

<comment><USER17> _I have never wanted to declare a tuple without surrounding it with ()._

No? I do that occasionally, e.g.:

      x, y = 5, 6

<comment><USER18> Doing

        (x, y) = (5, 6)

makes it clearer to "visually grep" that it's not a normal assignment though.

<comment><USER19> It's the comma that determines an expression as a tuple, not the parentheseis.

<comment><USER16> Not all the time.

        x = ,

causes a syntax error, while

        x = (,)

creates an empty tuple.

<comment><USER20> Under both Python 2.7 and Python 3.3 I get:

        >>> x=(,)
          File "<stdin>", line 1
            x=(,)
               ^
        SyntaxError: invalid syntax

<comment><USER14> From the Python docs ([https://docs.python.org/3/tutorial/datastructures.html#tuple...](https://docs.python.org/3/tutorial/datastructures.html#tuples- and-sequences))

> Empty tuples are constructed by an empty pair of parentheses;

And it works fine

        >>> x = ()
        >>> x
        ()

I guess Herge mean that? After all, his argument was that a tuple is not always defined by the comma.

<comment><USER21> There's also the distinction between x = (3) and x = (3,)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER22> #6 is really confusing. Whenever I encounter something like this my first reaction is that whenever possible such obscure components of a language should be avoided and more verbose/clear code used instead.

Programming languages are meant to be read as well as written, and someone relatively new to Python (and many who have used the language for a long time) is certain to get confused about the difference between:

       return [lambda x, i=i : i * x for i in range(5)]

and

       return [lambda x : i * x for i in range(5)]

<comment><USER23> Agreed 100%, this type of constructions should be avoided in the first place in favor of more "readable" ones but this happens in a fair amount of code that I've seen (and I keep seeing).

<comment><USER24> Some of it seems to come from people cargo-culting their knowledge of anonymous and first class functions, so they end up believing that the only way to pass a function around is to construct it anonymously.

<comment><USER3> In the particular case of constructing _several_ similar functions that do essentially the same thing, lambda is a rather natural choice.

Being more explicit and less hacky can well be combined with staying true to functional style:

        from functools import partial

        mul = lambda x, y: x*y  # could use int.__mul__, too
        multipliers = [partial(mul, n) for n in range(5)]

It does the closure-capturing of n for you.

<comment><USER24> A function defined with def would work just the same there.

It would have a big ugly 'return' in it and be a few characters longer, but it would work the same, so I don't see what lambda brings to it.

<comment><USER3> Both def and lambda would fail identically in this context.

</comment></comment></comment></comment></comment></comment><comment><USER25> > "Python is an interpreted, object-oriented, high-level programming language > with dynamic semantics."

I have an issue with that statement. No languages are inherently "compiled" or "interpreted", that's a property of the implementation.

If we are talking about CPython here, Python code is compiled to bytecode which is then interpreted. Not unlike Java - with the difference that the main implementation has a JIT and afaik, Python's does not.

But that's CPython. What about PyPy? It has a JIT.

<comment><USER26> > No languages are inherently "compiled" or "interpreted", that's a property > of the implementation.

A language and it's implementation are usually designed at the same time. Compiled or interpreted will affect design choices that go into the language. While additional implementations may follow, it can be hard/impossible to design a compiler (machine code, not byte code) for a language that was designed to be interpreted without dropping features (ie eval).

It may be more correct to say 'Python was designed to be interpreted' than 'Python is interpreted'

<comment><USER27> Not really - Javascript was designed to be interpreted, and yet V8/SpiderMonkey/Nitro all JIT-compile it down to machine code, sometimes very effectively.

<comment><USER28> When people talk about "compiled" vs. "interpreted" they usually mean AOT compilation, not JIT.

<comment><USER27> Then Java and .NET are considered "interpreted"? And Android under Dalvik is "interpreted", but under ART is "compiled" (using Java as the language, which I'd always thought of as compiled, yet apparently is interpreted under your definition)? What if you embed Clang & LLVM in your application to run C++?

I think this just illustrates the fuzziness of these definitions. A compiler is just a piece of code; you can embed it into another piece of code and run it whenever necessary. Maybe in the world of shrink-wrapped desktop software there was a sharp distinction between AOT compiled languages and interpreted ones, but we haven't lived in that world for a couple decades now.

</comment></comment></comment></comment></comment><comment> mark-r I've always thought that #1 is a sign of an incorrect operation altogether. If you want to _always_ modify the passed parameter, it doesn't make sense to have a default. If you want to return a modified version of the input, you should make a copy immediately and then you don't get this problem. Doing both an in-place modification and returning a modified object at the same time is just wrong.

<comment><USER29> A slightly more realistic example:

        class Bag(object):
            def __init__(self, items=[]):
                self.items = items

            def add_item(self, item):
                # check the item is valid
                self.items.append(item)

        bag1 = Bag()
        bag1.add('an item')

        bag2 = Bag()
        print(bag2.items)

<comment> mark-r Again, the problem is not what it appears. You're keeping a reference to an existing item rather than making a copy. The results would be just as bad if you passed in an initial list rather than taking the default.

        initial = ['first item']
        bag3 = Bag(initial)
        bag3.add_item('second item')
        print(initial)

I think the surprising thing to most people is that you don't automatically get a _copy_ when you do the assignment. That's how it works in older languages like C and C++, and how it appears to behave when you use immutable objects.

</comment></comment></comment><comment><USER30> "Thus, the bar argument is initialized to its default (i.e., an empty list) only the first time that foo() is called, but then subsequent calls to foo() (i.e., without a bar argument specified) will continue to use the same list to which bar was originally initialized."

This actually happens when the function is defined, not when it's called the first time.

</comment><comment><USER31> OT but this page hard crashes Safari on iPhone.

<comment><USER32> Also crashes Safari on my OS 10.5 Mac, and is unusably laggy in Firefox on the same computer. All sorts of thrashy javascript nonsense seems to be going on.

<comment><USER33> I use JavaScript Blocker for Safari, which is sort of like a less paranoid (and more convenient) version of NoScript. Looks like this site attempts to load 45 JavaScript files over 12 iframes, 17 of which JS Blocker blocked.

Mildly excessive? /s

</comment></comment></comment><comment><USER34> I have been bitten by #6 in a similar situation in the past. My solution was the analogue of the rather convoluted

        def create_multipliers():
          def multiplier(i):
            return lambda x: i*x
          return [multiplier(i) for i in range(5)]

        for multiplier in create_multipliers():
          print multiplier(2)

I would still prefer that Python doesn't do this.

</comment><comment><USER35> In "Common Mistake #2", I'd say that the mistake is fairly obvious to anyone who understands even a little bit about OOP and inheritance. Since class C doesn't define its own variable x, it has to be that it inherits the x in class A, so there's no reason to be surprised that C.x changes when A.x does.

<comment><USER36> While I agree that the "problem" case can be seen as obvious when considered in isolation, really it's the behaviour of the two cases taken together that can seem inconsistent. Nothing about understanding OOP or inheritance will prepare a person for that.

<comment><USER35> >really it's the behaviour of the two cases taken together that can seem inconsistent.

Why do you think so? I think that both cases seem consistent, or rather, correct (and therefore this example should not be treated as a common Python mistake), because x is not assigned a value anywhere in class C, and C inherits from A, so it should be clear to anyone knowing OOP and inheritance, that C's x is the same as A's x. (And the same holds true for inherited methods.) Even the OP says that in the post:

>In other words, C doesn't have its own x property, independent of A.

<comment><USER36> What's happening here is that a variable is inheriting its _value_ from the superclass, except for when it doesn't. And when it doesn't, why is that? Well presumably it's because something's been overridden - OO tells us that's how we change the properties that are inherited from the superclass. No wait, that's not it; nothing's been overridden here. All that's happened is we've assigned a value to B.x, and doing so seems to have changed the inheritance of our class.

So this variable is neither completely shared across classes and their subclasses (per Smalltalk class variables), nor completely independent across classes and their subclasses (per Smalltalk class _instance_ variable), but instead its [in]dependence alters based upon whether (and where) you assign values to it.

While I can understand that in terms of the dictionary mechanism used to implement it, from my point of view it's just weird behaviour.

<comment><USER37> This is actually the same thing as regular Python scoping rules; there's not even any fancy OOP logic behind it. Here's the same thing, but using global scope and functions instead of classes and inheritance.

         >>> x = 1
         >>> def a():
        ...:     print(x)
        ...:
         >>> def b():
        ...:     x = 2
        ...:     print(x)
        ...:
         >>> def c():
        ...:     print(x)
        ...:
         >>> a(), b(), c()
        1
        2
        1
         >>> x = 3
         >>> a(), b(), c()
        3
        2
        3

I think there is an argument to be made that classes are special and "reaching upwards" into the superclass scope should not occur - a unique copy should be made - but I also think that Python's way of doing it makes enough sense that it is not confusing. The Python devs are at least consistent about having their own way of doing things.

<comment><USER36> That's an interesting point, that the behaviour of an inherited class variable is consistent with a case you show where inheritance plays no part at all.

So from that point of view, it comes down to whether we expect that an inherited class variable really is just some variable in an outer scope that we can shadow with a local variable of the same name (per your example), or whether we expect that inheritance provides some stronger notion of ownership of the inherited variable.

I dislike the former case, largely because I dislike the idea that the location at which a variable is stored can appear to change merely by assigning to it. But then, I dislike Python's implicit declaration of local variables for exactly the same reason. So you're right, there _IS_ some consistency there. ;-)

</comment></comment></comment></comment></comment></comment><comment><USER38> Here's a thought experiment for you—think of "common mistakes in language X" as "design flaws in language X" or "ways in which language X is surprising" and what could have been done to mitigate that.

<comment><USER39> Whether you choose 0-based indexing or 1-based indexing, somebody is going to be confused about indexing sometime.

<comment><USER40> That's why I always use 7-based indexing, to avoid any possibility of confusion.

</comment></comment></comment><comment><USER41> Regarding circular imports and #7: The main problem in arises when using the _from mymodule import mysymbol_ notion.

The example solved this by properly using _import mymodule_ , although this might cause some more problem if your design is wrong, as see in the example. Calling _f()_ from the module ("library") code itself is a very bad idea. Instead one should do this:

a.py:

        import b

        def f():
            return b.x

b.py:

        import a

        x = 1

        def g():
            print a.f()

main.py:

        import a

        a.f()

</comment><comment><USER42> For the first gotcha, using None as a default argument solves the problem, but checking `if not bar` instead of `if bar is None` can produce different results if bar evaluates to None in a boolean context.

        >>> def foo(bar=None):
        ...    if not bar:
        ...        bar = []
        ...    bar.append("baz")
        ...    return bar
        ...
        >>> bar = []
        >>> foo(bar)
        ["baz"]
        >>> bar
        []

<comment><USER17> True, but foo shouldn't be modifying bar anyway; make a copy instead:

      bar = list(bar) if bar else []

</comment></comment><comment><USER43> There are more than a few interesting points in here but this is funny to me coming from someone who is seemingly well versed in python: Mistake #5

numbers = [n for n in range(10)]

this should be: range(10)

<comment><USER44> not in Python 3, where range() replaces xrange()

<comment><USER43> interesting, haven't written in python 3 yet

</comment></comment></comment><comment><USER45> And I would have thought that incorrect usage of bytestrings for text and then asking on Stack Overflow about the UnicodeDecodeErrors would be quite common as well ...

<comment><USER46> Yeah, bigtime. I'm not sure that would make for a quick, easy countdown list of a blog post, though.

</comment></comment><comment><USER47> For #7, now you have a performance problem of importing every time you run that function. Rather, you can place the import at the bottom of b.py and be okay.

<comment><USER23> Python caches modules imported, you can check it out in your local shell with: import sys ; sys.modules. That's why whenever you make changes to a module which has been already loaded you won't see the changes until you load the module again, either quitting the shell or using reload(module) on Python 2.x

</comment></comment><comment><USER48> Any reason why you're using a slice here? >>> numbers[:] = [n for n in numbers if not odd(n)] I'm thinking that doing >>> numbers = [n for n in numbers if not odd(n)] wouldn't be a problem since the assignment is executed after the computation of the list comprehension.

</comment><comment><USER49> I have just been asked by a colleague about yet another gotcha when you have for example:

        # mypackage/__init__.py
        from .settings import settings

and when trying to import settings from mypackage

        from mypackage import settings

you get module instead of settings object.

<comment><USER50> from mypackage.settings import settings

</comment></comment><comment><USER51> Is the explanation for #1 correct?

"when the default value for a function argument is an expression, the expression is evaluated only once"

I would explain the behavior he shows as due to the default value being _mutable_. I don't see an expression there, just an empty list used as a default.

<comment><USER16> The default value is an expression which is executed when the module is instantiated, even if the expression results in an empty list. If I had:

        def f(now=datetime.datetime.now()):
            ...

now would be the time when the module was loaded, not when f is called the first time, or when f is called after that, despite datetime objects being immutable.

<comment><USER52>
      import datetime, time
      def foo2():
        def foo(a=datetime.datetime.now()):
          time.sleep(1)
          return a
        return foo()

      for n in range(10): print foo2()

      2014-05-08 11:23:01.642871
      2014-05-08 11:23:02.644276
      2014-05-08 11:23:03.644579
      2014-05-08 11:23:04.645146
      2014-05-08 11:23:05.646328
      2014-05-08 11:23:06.647572
      2014-05-08 11:23:07.647904
      2014-05-08 11:23:08.648213
      2014-05-08 11:23:09.648973
      2014-05-08 11:23:10.649742

So, not quite module load time, but evaluation time.

<comment><USER53> Kilink's comment apply again.

If you define several functions at different times, the default argument will be evaluated each time you define a new function. You'll have the same behaviour if you keep reassigning lambdas at the same function name, or if you keep edditing the globals.

You are misunderstanding how dynamic Python is. And, yes, the part about "module load time" was a simplification.

</comment></comment></comment></comment><comment><USER54> Does someone knows if the first mistake is also present in Ruby? I ran into this code:

        def get_analytics_data(options = {})
            options = options.merge({'ids' => GAReadonly.configuration.id })

and I wonder if I should fix it.

<comment><USER55> It's fine, Ruby takes the more sensible semantics here (IMO)

</comment></comment><comment><USER29> The scoping rules in #4, combined with being able to reference variables before definite assignment, is what leads to the 'variable hoisting' in Javascript.

Is #6 really called 'late binding'? That seems like the wrong term.

<comment><USER23> Please check out [http://en.wikipedia.org/wiki/Late_binding](http://en.wikipedia.org/wiki/Late_binding) to know more.

<comment><USER29> I've always heard it used to refer to method dispatch, which that wikipedia article also seems to. However, it seems like the Python spec does use it to refer to when variable values are resolved.

</comment></comment></comment><comment><USER56> Even the first argument doesn't make sense to me. The optional argument is within the scope of the function; why is the temporary optional argument getting carried over?

</comment><comment><USER41> Regarding common mistake #5, when using enumerate(mylist), mylist can be modified::

        for i, x in enumerate(numbers):
            if odd(x):
               del numbers[i]

</comment><comment><USER57> Some of the mistakes mentioned in OP (#1, #3, and #4) can be automatically caught by tools like PyLint (and to lesser extent, Pyflakes), as well as good unittests.

</comment><comment><USER58> Bookmarked it. Might not be the most complete list but appreciate the OP is taking feedback and updating it. Kudos to hsinger!

</comment><comment><USER59> Hmm, "Common Mistake #1" appears to be an error on the side of the Python interpreter, not the programmer.

</comment><comment><USER60> I now feel dumb, since Python most often burns me with "Assignment Creates References, Not Copies".

</comment><comment><USER61> For #4 use nonlocal keyword (python 3.x)

</comment><comment><USER62> Circular import is definitely one of the things I absolutely hate to deal with again and again.

</comment><comment><USER63> Common Mistake: ceate a blog that brings mobile Safari to crash reliably on every visit!

</comment><comment><USER64> Does this link crash anyone else's Safari on iPhone 5s?

</comment><comment><USER65> good stuff

</comment><comment><USER66> Great Article!

</comment><comment><USER52> Also, for the first example, it is a scope issue:

      def foo2():
        def foo(a=[]):
          a.append('ba')
          return a
        return foo()

      print foo2()
      print foo2()
      print foo2()
      print foo2()
      print foo2()

Gives

      ['ba']
      ['ba']
      ['ba']
      ['ba']
      ['ba']

<comment><USER67> I think the way he described it is pretty accurate. Default keyword arguments are only evaluated once at function definition, so supplying a mutable default keyword argument can cause issues.

Your example is pretty contrived and doesn't illustrate what he was pointing out, as you're creating a new function foo every time foo2 is called, and only calling it once.</comment></comment>


Trump likely to sign executive order banning Chinese telecom equipment next week - <AUTHOR> https://www.politico.com/story/2019/02/07/trump-ban-chinese-telecom-1157090 <comment><USER2> Good! As a network engineer I condemn the use of Huawei network equipment. They are a prime example of blatant intellectual property theft and backdoor spying for the Chinese intelligence apparatus. If your company uses this gear you are exposing everyone on your network to state level hacking.

edit: I was involved designing datacenters in China and one of our requirements was the network gear was all American. During a visit we were asked to coordinate with an engineer from ChinaTelecom to figure out where to place Gov. deep packet inspection devices on the backbone network. My take away from this was it was easier for them to add additional equipment than to hack the American routers.

<comment><USER3> > If your company uses this gear you are exposing everyone on your network to > state level hacking.

Why do you automatically assume that equipment made in the US (or any other country) is magically immune to 'state level hacking' by the country that made it?

IMHO, this is more of a power move to encourage folks to use equipment the US government has control over to do with as they please. In other words, trading one 'state level hacking' opportunity for another. But in this case, the other is close enough to pay you a visit.

<comment><USER4> Pick your poison. Although there are many examples of corruption and human rights violations in the US, compared to China US-citizens have significantly more leverage over their government and arguably more power to push back on this kind of surveillance.

A good example of this is Google encrypting network traffic between servers after the Snowden stuff was made public. [https://gmail.googleblog.com/2014/03/staying-at-forefront- of...](https://gmail.googleblog.com/2014/03/staying-at-forefront-of-email- security.html?m=1)

<comment><USER5> Yes, but practically speaking, China has almost no power at all to bother you if they successfully spy on you, aside of course from passing any secrets they learn from you to your Chinese competitors.

The US, on the other hand, is where you're located (in this example) and can easily use any information gained against you in a large multitude of ways.

Basically, everyone would probably be better off just assuming any network gear has backdoors open to the government of the country that it came from, then just adopting security policies to mitigate this, and buying network gear from countries that aren't their own.

</comment></comment></comment></comment><comment><USER6> It was about time... Should have done it sooner</comment>


Bill Gates loses to Magnus Carlsen in 9 moves - <AUTHOR> http://www.nbcnews.com/technology/bill-gates-loses-9-moves-chess-champion-2D11988269 <comment><USER3> Actually, Carlsen was playing for tricks (as might be reasonable when you have just 30 seconds). Bill Gates had a winning position on the 9th move. If instead of 9. Nxe5?? which allows an immediate checkmate, he had played 9. Re1!, he would have had a huge advantage. I'm an international master, and more importantly, my computer backs up my opinion.

I'm surprised Carlsen played a game with just 30 seconds on his clock; it's easy to lose in that situation since you simply don't have enough time to make more than about 30 moves. And by the way, the best player in the world at ridiculously short time controls ("bullet chess") like 1 minute for the game is Hikaru Nakamura, the top-rated American player, not Magnus Carlsen. Nakamura tends to play soundly in these time controls. Look at this video for a game where Nakamura plays against Grandmaster Max Dlugy (another bullet chess expert) with kibitzing by Grandmaster Ben Finegold: [http://www.youtube.com/watch?v=Bzrap8Vtyq8](http://www.youtube.com/watch?v=Bzrap8Vtyq8)

<comment><USER4> Is not knowing your opponent part of the strategy? Carlsen played the 'tricks' way he did because he knew, or felt reasonably certain that Gates would fall for them. Critiquing his play based on what _you_ would do in Gates' position is simply wrong, because I'm assuming the #1 chess player in the world would play differently had he been playing against an international master such as yourself.

<comment><USER5> I don't think Carlsen was at all certain Gates would fall for those tricks. I just don't think Carlsen would care if he lost. People are assuming a lot of things. They're assuming that Carlsen wants to win at all costs. The same with Gates. Carlsen did what he wanted because the outcome didn't really matter to him.

Kind of like Gates beating Shaq in a basketball game and then analyzing the strategy of each player to try to understand how that happened.

<comment><USER6> _> People are assuming a lot of things_

> _" Carlsen did what he wanted because the outcome didn't really matter to > him."_

Hmm.. didn't you just make an assumption too regarding Carlsen's state of mind and motives?

Honestly both you and the OP seem to be engaging in pure speculation.

<comment><USER5> no, i didn't assume anything. I reason that if you play a TRICK from the beginning, you don't really care to win. You're playing for a good time. To amuse non chess players.

</comment></comment></comment></comment></comment><comment><USER7>
       1. e4    Nc6
       2. Nf3   d5
       3. Bd3   Nf6
       4. exd5  Qxd5
       5. Nc3   Qh5
       6. 0-0   Bg4
       7. h3    Ne5

       ╔═══════════════╗
       ║♜ … … … ♚ ♝ … ♜║
       ║♟ ♟ ♟ … ♟ ♟ ♟ ♟║
       ║… … … … … ♞ … …║
       ║… … … … ♞ … … ♛║
       ║… … … … … … ♝ …║
       ║… … ♘ ♗ … ♘ … ♙║
       ║♙ ♙ ♙ ♙ … ♙ ♙ …║
       ║♖ … ♗ ♕ … ♖ ♔ …║
       ╚═══════════════╝

       8. hxg4  Nfxg4
       9. Nxe5  Qh2#

       ╔═══════════════╗
       ║♜ … … … ♚ ♝ … ♜║
       ║♟ ♟ ♟ … ♟ ♟ ♟ ♟║
       ║… … … … … … … …║
       ║… … … … ♘ … … …║
       ║… … … … … … ♞ …║
       ║… … ♘ ♗ … … … …║
       ║♙ ♙ ♙ ♙ … ♙ ♙ ♛║
       ║♖ … ♗ ♕ … ♖ ♔ …║
       ╚═══════════════╝

<comment><USER8> I'm no expert, but since all the other comments are just complaining, here are my (very amateur) thoughts:

1\. e4

The most common opening in chess. Bill knows he's supposed to bring out some knights and bishops in these next few moves, which is good!

1\. ... Nc6 2\. Nf3 d5

Both black moves aim for an open center so he can make it a fast game with plenty options to attack. His move invites Bill to waste a turn changing the center from pawn vs pawn to queen vs nothing. To his credit Bill resists capturing for a bit!

3\. Bd3

Doesn't make much sense to block your queen pawn like this. Of course he's trying to support e4 or win d5, but he's tying himself in knots.

3\. ... Nf6 4\. exd5 Qxd5

Magnus is ahead in development.

5\. Nc3 Qh5

I'm sure Magnus would have played more conservatively against a better player. But in this case, he might as well attack!

6\. 0-0

Seems like Bill stepped right into the line of fire here, but his blocked queen pawn makes everything else hard to move.

6\. ... Bg4

Pinning the knight. This immobilizes yet another piece and makes Bill's queen even more stuck.

7\. h3

Moving the pawns in front of your castled king usually weakens your defenses. And hxg4 is suicidal.

7\. ... Ne5

Attack! Magnus is happy to give up material to gain time and open vulnerabilities.

8\. hxg4 Nfxg4 9\. Nxe5

Getting greedy, but even if he did something else, was there was any way to stop that queen?

I've lost games more quickly than Bill, and not to grandmasters, so props to him for at least making reasonable moves.

<comment><USER9> That analysis looks fine except for the end.

At the end, Bill's 9. Nxe5 resulted in an immediate checkmate. Instead, 9. Re1 (Rook one square to the left) stops the mate since it gives white's king an escape route. In an even match, the game would be winning for white at that point because Magnus sacrificed a bishop for his now-failed attack.

Magnus screwed up big-time or was goofing around. He would still be able to beat Gates from that losing position, but I'm very surprised he let that happen.

<comment><USER10> I just watched the show on local tv and Magnus commented afterwards that he did something against his principles and gambled that he could trick Bill into it.

</comment></comment></comment></comment><comment><USER11> As a kid I played a lot of chess with one of my childhood friends. I was always (almost?) winning.

Imagine my surprise when in high-school I played with a guy who learned to play chess as a kid. He beat me just as fast as Bill Gates got beaten. Then he beat me, but slower in subsequent 7 games that day and then some over the following months. But one day I finally beat him. I guess he got a little careless after all that wins and I learned good bit from him.

Interestingly I beat his ass in checkers every time. Also interestingly roughly about the same time I played chess with an actual math genius (distance between two lines of his reasoning required whole page of careful explanation for me) and he was making dumbest moves I've seen because he barely ever played chess before.

Games are not about thinking. By thinking long and hard you can get to 5-10% of skill of a master. The rest is learning from books and stronger opponents.

I had another friend. He had played significantly more unreal tournament than quake, I just the opposite. I was kicking his ass 50 to 1 in quake even on a slower computer with smaller monitor and crappier mouse, but he was kicking my ass 50 to 1 in Unreal Tournament and I wasn't bad at that game. I was as good as any of my friends except for this guy.

I guess my point is that skill is very specific to the game and must be earned.

</comment><comment><USER12> "Bill Gates loses to LeBron James 232 - 0"

Not sure what outcome was expected...

<comment><USER13> The part that makes it news is that Bill Gates and Magnus Carlsen sat down and played chess, not that Gates lost.

<comment><USER14> Next time they should try doing a quick sort in Basic ;)

</comment></comment></comment><comment><USER15> Carlsen visited Google last week and played 10 simultaneous games against Googlers. Chessbase did a writeup here:

[http://en.chessbase.com/post/carlsen- google](http://en.chessbase.com/post/carlsen-google)

TL;DR: Carlsen went 10-0 with only one close game, against the highest rated player (2168)

<comment><USER16> Not a very avid chess player but I had a lot of fun going over your game notes. Thanks and congrats for the achievements in that game.

</comment></comment><comment><USER17> There is a Derren Brown (UK Illusionist) piece where he plays seven opponents at once, walking round in a big circle, and amazingly wins 4 out of 7.

Afterwards the explanation is simple - he played 6 masters or grandmasters, and one guy off the street. And simply (!) memorised the moves of player A and made them against player C, B to D etc. All he had to do was play a decent game against the guy off the street and he would always beat 50%

<comment><USER18> This works only if the colors are reversed in subsequent boards. To avoid this trick, all traditional simuls (short for simultaneous play - where one chess master plays many people) have two simple rules: 1)The chess master has the same color in all the boards 2) The color of the chess master's pieces are usually white

Since white always makes the first move in a chess game, it is not possible to copy the game from board A and play it in board B with reverse colors.

</comment></comment><comment><USER19> Make me appreciate Go that much more - to me, Go seems a much more enjoyable game when the opponents are mismatched.

Even though I'm pretty good at Go, it's enjoyable to play with a beginner. You don't have to trounce them to find satisfaction.

<comment><USER20> I'm very new to Go, but I am continually impressed and amazed at its depth and beauty. A few tiny simple rules producing such complex gameplay is really awe- inspiring. Chess, with its many types of pieces, limited moves, many rules just doesn't have the same elegance.

</comment></comment><comment><USER21> The amazing part for someone like me who knows just basic chess is how aggressive Carlsen was. It's scary seeing him coming on you with all those pieces and instantaneous moves. It also gives you a measure of his grandeur. It seems BillG got panicked given the little time he had to think his moves; at least I'd do.

<comment><USER22> Carlsen had a 30 second clock. Even an average player should've been able to put Carlsen into time pressure at that point, assuming you didn't fall into any silly traps like Gates did.

<comment><USER23> It is a trick actually. The more time the opponent has, the easier it is for Carlsen, as he uses his opponents turn time to think. An average player doesn't have the skill to put him under pressure.

+edit: you also usually get an extra second or two ( depending on the total time ) per move.

<comment><USER24> Yeah he has time to think when the opponent is moving, but 30 seconds just isn't a lot of time if you consider there is a minimum practical time per move just based on the physical reality of being a human that has to move the piece and hit the clock, as illustrated pretty well by Carlsen's move where he knocked over a piece and burnt something like 3 seconds on one move.

I think any decently skilled (but non-world-class) chess player could have run him down just by playing defensively. Of course, that would have been terrible tv, so we got someone who probably only plays casually getting steam-rolled by the "Justin Bieber of chess".

<comment><USER22> "Justin Beiber of chess".

'The Mozart of chess' is the general consensus. The 'Justin Beiber of chess' is rather insulting.

<comment><AUTHOR> I couldn't agree more! Why would anyone come up with "Justin Bieber of Chess"?

<comment><USER24> Freelance journalists aren't paid by the word anymore, they are paid by the Bieber. No sense writing an article without the word Bieber in it, that's not worth a dime.

</comment></comment></comment></comment></comment></comment></comment><comment><USER25> Surprisingly this has brought some memories, I remember my father beating me in a chess game exactly the same way in just a few moves, back when I was a kid, my chess knowledge to this day sums up to knowing how the pieces move, and my father I think knew some more chess theory regarding strategy, but wasn't even a competitive player, so my laymen impression is that this was a really unremarkable game.

Would someone competent at chess be so kind and explain what did Bill do wrong? Does this class of mistakes (castling "locking" the king in the corner) have a name?

<comment><USER26> My dad once challenged me (again) and I really didn't want to play, so I ran Fool's Mate on him (I had read it in some book of chess challenges). He never asked again, it was kind of ruined for him... Gotta watch those teenagers, I wasn't nice sometimes when my free reading was being interrupted.

Edit: glad I grew up some...

<comment><USER27> Not to nitpick, but I'm sure you mean Scholar's Mate, where you attack the pawn in front of the king's bishop with two pieces (usually queen and bishop/knight) and win in 4 moves or so. [http://en.wikipedia.org/wiki/Scholar%27s_mate](http://en.wikipedia.org/wiki/Scholar%27s_mate)

Many people erroneously call this fool's mate, but fool's mate is actually the shortest chess game possible (win in 2 moves), which is virtually impossible (you'd have to be playing against someone that really doesn't know what they're doing AND they'd have to move the two specific pawns to allow it). [http://en.wikipedia.org/wiki/Fool%27s_mate](http://en.wikipedia.org/wiki/Fool%27s_mate)

<comment><USER26> Thank you, yes, he moved a piece or two outside of the pattern, but everything else worked a treat: Queen and Bishop trapped his King, I think maybe 7 moves or so, including the stumbles.

</comment></comment></comment></comment><comment><USER28> If you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.

<comment><USER29> This was not about judging, it was just a bit of fun.

<comment><USER28> I know. I just thought this was a good illustration of this commonly stated aphorism.

<comment><USER30> Some fishes climb trees. [http://www.bbc.co.uk/programmes/p003c3jk](http://www.bbc.co.uk/programmes/p003c3jk)

</comment></comment></comment></comment><comment><USER23> They should play monopoly. The game would be over even faster.

<comment><USER31> Bill Gates already won all the Monopoly in 2001

</comment></comment><comment><USER32> Chess isn't his game, bridge is:

[http://www.buffettcup.com/Default.aspx?tabid=69](http://www.buffettcup.com/Default.aspx?tabid=69)

[http://www.thegatesnotes.com/Personal/What-Makes-for-a- Good-...](http://www.thegatesnotes.com/Personal/What-Makes-for-a-Good-Bridge- Partner)

[http://www.larryco.com/OldStuff/Gates4.html](http://www.larryco.com/OldStuff/Gates4.html)

</comment><comment><USER33> It's funny because you know that in there somewhere Bill Gates must still have his former extremely competitive self, and getting beat so badly has got to be humbling. He's a great sport about it though.

<comment><USER34> Letting yourself get beat at chess, made fun of by talk shows or using self deprecating humor are strategies for making people to like you more. He got what he wanted, if he was just doing this to gain geek admiration.

</comment></comment><comment><USER35> I watched the Skavlan show tonight, and found the whole thing very fun. The true story of Irish adoptions was particularly harrowing, but the chess match lightened the load.

It didn't seem that Bill knew he was going to be asked to play chess, and he seemed to take it in good humour.

Bill prefaced the game with apologies that nobody should expect much and that he was a much better Go player.

</comment><comment><USER36> Respect for Bill. That was impressive.

I'm not an avid Chess player but to play at that speed with his obviously gifted opponent and last that long is respectable.

<comment><USER37> There's nothing super special about an amazing chess player that would let them check mate you in 9 movies unless you play horrendously. Grand Masters are not super heros of chess. They are 'comprehensive.' Lets be real rather than gaudy.

I should mention that I am a chess _master_ and have played GMs online.

<comment><USER38> This. Bill is a smart guy but that doesn't mean he played impressively well at all.

<comment><USER39> Yeah, this looks like it was filmed live during a talk show. I highly doubt there was any interest from anyone involved, especially the audience, for a lengthy game.

</comment></comment></comment></comment><comment><USER40> The Gates biography 'Gates' by Stephen Manes recalls that Gates used to play chess against Paul Allen a great deal in the early days. IIRC, Gates would play very aggressively, leaving lots of opportunities to be attacked, and Allen would usually win the games. He was more of a poker player though.

</comment><comment><USER41> > "Wow, that was fast," he said to Carlsen, whose rockstar appeal has won him > the moniker the _" Justin Bieber of chess."_

 _" Justin Bieber of chess."_

really?

<comment><USER42> But... isn't Magnus Carlsen good at chess? I don't understand...

<comment><USER41> What exactly is Justin Bieber _so good at_ to earn such a comparison? Not singing, not composing music, not dancing .. no one has ever claimed he's the "world #1" at anything other than being celebrity amongst other pre-teen children.

And Magnus Carlsen is certainly not a celebrity amongst pre-teen children, so the comparison makes no sense.

<comment><USER43> Bieber is actually quite a good singer: [http://www.youtube.com/watch?v=ko8gepM8MBU](http://www.youtube.com/watch?v=ko8gepM8MBU).

It's easy to lose sight of that given his stardom, but he got his start based on raw singing talent.

<comment><USER41> Of course he's likely in the top 0.001% of singing talent, but would you say he's literally "the best" singer in the world regardless of age?

</comment></comment></comment></comment></comment><comment><USER44> Gates should challenge Carlsen to a speed game of Write the Disk Operating Sytem Before the Big Meeting Next Week, methinks.

</comment><comment><USER45> Seeing as I went 16 moves against Kasparov as a complete noob to chess, does that make me better than Bill Gates? My programming ability and checkbook seem to disagree, however. :/

</comment><comment><USER46> Bill Gates also famously plays cards and other one-on-one games with Warren Buffet. I would love to have an insight into the conversations that take place during those games.

[http://www.youtube.com/watch?v=oP1nAvi85g0](http://www.youtube.com/watch?v=oP1nAvi85g0)

<comment><USER47> Also, see [http://en.wikipedia.org/wiki/Nontransitive_dice](http://en.wikipedia.org/wiki/Nontransitive_dice)

Warren Buffet had a collection of non-transitive dice (dice with non-standard numbers, with special properties ... basically a paper-scissors-rock set of dice). He offered Bill a bet, and suggested Bill pick the dice first (and Warren would then pick the dice most likely to beat Bill's). Bill, of course, realised it was some sort of trick, and examined the dice, then suggested Warren pick first.

</comment></comment><comment><USER48> Best commentary of the match, by Jerry! [http://www.youtube.com/watch?v=_0QdI0rVoHA&feature=em- upload...](http://www.youtube.com/watch?v=_0QdI0rVoHA&feature=em-uploademail)

</comment><comment><USER49> When you have all the openings memorised, as the champs do, it is not really playing until 10 or 20 moves in. It is not really playing a game in this situation, it is Magnus going through the motions.

<comment><USER50> That's only the case when _both_ players know the openings and follow "textbook" moves throughout the opening. When playing against amateurs, you're usually out of the memorized lines in just a few moves, so at that point it just becomes tactical.

</comment></comment><comment><USER51> How long would it take you to lose against Mike Tyson in a boxing fight?

</comment><comment><USER52> How many moves did it take for Magnus to beat Anand ?

<comment><USER53> His final match was 58 moves

</comment></comment><comment><USER54> 3\. Bd3?

</comment><comment><USER55> Well, when I was a child, my chess playing future was taken down in flames by the chess program I had. In the easiest setting, I would lose in a few moves. That proved not to be very motivating.

</comment><comment><USER56> Magnus Carlsen didn't start a billion dollar company, and Bill Gates isn't a chess god.

Why is this article on HN? Who cares?

<comment><USER57> Because it's fun to watch and I must say I was surprised to see that a genius like Gates played rather badly.

<comment><USER58> Yeah I'd say being smart doesn't necessarily help you play good chess - <USER2> dumb hurts, though.

I wonder when the last time Gates even played chess? And even though he had way more time than Magnus did, 2 minutes is not a lot of time... Most blitz games are 3 or 5 minutes and if you're not an avid player (or at least used to it) then it's really hard to play fast like that. Magnus probably didn't have to think at all since he already knew the opening, whereas Gates was probably on his own from the third move on.

Kudos to Gates for being a good sport.

</comment></comment></comment><comment><USER59> What did people expect? For Bill Gates' bodyguards to break both of Magnus arms and Bill taunting him "whatsamatter bitch? are you gonna move? tick- tock".

Why is this on HN?

<comment><USER60> MS-DOS 13

</comment></comment><comment><USER61> How is this news? Magnus Carlsen is good at chess. Bill Gates is bad at chess. How does this story add value to anyone's life? What was learned here? (sincerely curious)

<comment><USER62> Fun.

If people are more interested in either Bill Gates or Magnus Carlsen, then here's a starting point. Many people likely don't know who Magnus is, now they do. Bill Gates' involvement makes it more likely that people would have watched the video.

Also, fun.

<comment><USER61> Hmm, I used to play lots of chess and still follow the chess world, so this wasn't interesting or educational to me. But if people who aren't familiar with chess or Magnus Carlsen still found it fun or interesting, then that's good enough for me. :)

Thanks for your sincere reply to my sincere question.</comment></comment></comment>


Ask HN: How would you build a proxy list with current tech - jonathan-kosgei <comment><AUTHOR> Do you mean like a [https://proxymesh.com/world- proxy/](https://proxymesh.com/world-proxy/) sort of set of proxies?

<comment> jonathan-kosgei More like a list of every proxy providers proxies</comment></comment>


The new Timeline, Facebook and why this isn't Semantics: a short analysis - <AUTHOR> http://apas.gr/facebook-timeline/

<comment><USER2> Interesting analysis. I think now Facebook has become when-AOL-bought-Time- Warner-big. As a new social network startup founder I'm happy about what Facebook released. We've launched before Google+ and then we saw G+ has bombarded with features and now FB. They both are becoming much more confusing. Everything for everybody.

<comment><AUTHOR> Thanks. I think it's much more about that they all compete for your time and the same user base, rather than "Everything for everybody."

<comment><USER2> Yes but what I meant was they have to be _Everything for everybody_. They cannot afford to offer less features.</comment></comment></comment>


Created this Nutrition Calculator app for iOS (tell me what you think) - <AUTHOR> https://itunes.apple.com/us/app/nutritioncalc-food-intake/id796311473?ls=1&mt=8

<comment><USER2> very cool</comment>


The man who screwed an entire country - <AUTHOR> http://www.economist.com/node/18805327 <comment><USER3> Here's another man who screwed up a country: Russia's Putin. In power since 2000, insane amount of fraud, perpetuating corruption, no free speech, no rule of law, police state and pretty much any other state-level deficiency you can think of, and at a much bigger scale than you can imagine. As a result Russia's state is much closer to Nigeria than pretty much any EU country (no, I'm not pointing at Nigeria randomly, it's true) and the brightest people are fleeing the country as if it's a sinking ship (and, well, it is).

<comment><USER4> I wouldn't say Putin is an asset to any country, but you can't blame it all on him either. With people like Lenin, Stalin and Jeltsin as your predecessors you don't really start off good.

<comment><USER5> > With people like Lenin, Stalin and Jeltsin as your predecessors you don't > really start off good.

At the same time, they did set the stage for a dramatic recovery.

<comment><USER6> Is Jeltsin the same as Yeltsin? Was he in the same league as the other two? He seemed OK from the news I read, not much worse than, say, Reagan, in terms of leadership and mental stability.

</comment></comment></comment></comment><comment><USER7> It's amazing that the Economist still touts Anglo-Saxon "panaceas" for growth: deregulate, get rid of red tape, focus the economy on services rather than manufacturing.

When Germany entered a period of stagnation after the Euro-introduction in 2002, the Economist made exactly the same prescriptions. Look what that ideology has done to the US and the UK: countless jobs in manufacturing have been offshored and growth was simulated through financial "innovations".

Personally, I buy lots of organic food products from Italy (e.g. laselva- bio.eu) as well as clothes (e.g. slowear.it), and for a simple reason: They're the best on the market. Therein lies Italy's potential.

<comment><USER8> You've responded to an objective assessment of Italy's economy --- it's hugely in debt and lags the EU in job creation and GDP growth --- with subjective claims about organic food and clothes. Everyone seems to realize that Italy's economy is dominated by exports, including those organic foods and designer clothes. They're still getting their credit rating downgraded. Now what?

<comment><USER9> Which country doesn't have a downgraded credit rating? Also who is doing this "credit rating"? Standard & Poor's? The same crooks who fluffed up the ratings of fraudulent MBS & CDOs a few years ago helping to setup the housing crisis in the first place?

But no, let's further deregulate & offshore jobs to countries that have poor humane rights records so our corporate overlords can get ever richer.

<comment><USER8> A mystifying comment. Because today's banks are loaded up with sleazy bad actors, there's no such thing as compounding interest? Because S&P sold its reputation for a few deals, there's no such thing as creditworthiness?

<comment><USER9> S&P, Fitch & Moodys didn't just sell their reputation for a "few deals". Pretty much every MBS or CDO was rated highly by these companies. Trillions of dollars worth. A large part of this is due to the fact that they are paid by the "bad actors" inside the investment firms & banks that they're suppose to be "independently" rating. If we banned that form of relationship that would be "regulation" which is "bad".

So, here we are with these same companies in charge of sovereign credit ratings. The same companies that played a large part in creating a credit crisis are the companies that get to set creditworthiness. Magnificent system we have.

So in order to make these credit rating agencies happy, we must deregulate further, lower taxes further, turn into a service level economy & freeze or depress wages so we can hope for short-term gains in our economy. Which makes corporations happy, banks happy & market makers happy thus our creditworthiness goes higher. It seems rather biased for those who are on top & those who caused the calamity in the first place. Once the economy stabilizes those smart rich people on top can start making imaginary investments with their friends until they create another crisis. Rinse & repeat. Look where prosperity has come from over the last 15 years. Bubbles & scams.

Does this look sustainable? Who really benefits from this?

<comment><USER8> Do you believe that an international banking conspiracy is deceiving us about Italy's debt standing at over 120% of GDP?

Do you believe that Italy's debt is that high because Italy overleveraged itself on mortgage-backed securities?

Did you read the other comments on this thread, where Italy's central bank director complained about Italian wage stagnation and its two-tiered employment system, and its poor tax revenues?

<comment><USER9> No they are not necessarily deceiving us on the outstanding debt in Italy. But they certainly weren't sounding the sovereign credit alarm or MBS/CDOs alarm when the money was rolling in, even though they had direct access to data & probably knew what was coming down the line. 120% of GDP is concerning but not end of the world. The USA has a higher ratio. Italy's credit rating has actually been lower before. If we were extremely concerned about GDP/debt ratio & credit ratings then perhaps we should all adopt a model like China.

Italy didn't get to where it's at entirely because of MBSs but the crisis certainly didn't help any country's financial situation & many countries had to shore up banks & took a credit hit.

There are definitely some issues with how Italy operates. Having a philandering-media-monopoly-owning-billionaire tyrant in charge certainly doesn't help.

While changes probably need to be made, the fact is that changes always need to be made. Radically switching to a pro-corporate/anti-worker strategy because shady rating agencies might downgrade you a point is silly.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> After a paragraph of how terribly Italy is doing in the world rankings, the governor of the Bank of Italy is leaving ... to take the reins at the European Central Bank?

Is this a case of being awful therefore promoted, or was he spectacularly good at stopping Italy from getting worse?

<comment><USER11> Central Bank governors are strangely resilient and separate from day to day politics. I'm Romanian and we've had a string of our own Berlusconis here, but since '99 we've had just one Bank Governor, and a very capable one. He even left his position to work as a Prime Minister for a about a year, and then returned to the Central Bank. He's completely uncharacteristic of everything else in Romanian politics.

</comment></comment><comment><USER12> I am Italian and I dislike Berlusconi. That said it must be recognized that all of Italy's issues were already there before him. We can't really say that Italy has worsened with him but we can surely say that it hasn't got any better. There were a lot of expectations in 1994 that he was going to change Italy and bring the liberal revolution it sorely needs. Alas, none of them were met.

</comment><comment><USER13> Italy's economy is a hard economy to judge because of an out-sized black market (to the tune of 30% - 40% gdp), any article of Italian economic statistics needs to a least mention this.

[http://italianthro.blogspot.com/2010/09/southern-italys- econ...](http://italianthro.blogspot.com/2010/09/southern-italys-economy- underestimated.html)

</comment><comment><USER14> The title implies that Italy would have done better with a different prime minister, but I have no reason to believe this would be the case. Lots of European economies have done worse and Italians are, well, Italians.

<comment><USER15> > Italians are, well, Italians

Care to elaborate on this? "Blacks are, well, blacks" would sound racist. I'm not sure this highly upvoted comment of yours is much nobler in spirit.

<comment><USER14> "Racism" is a somewhat vague term for which I believe the current usage is primarily born out of the American civil rights movement. Europeans on the other hand have been comfortable with labeling various national characteristics for centuries -- various national characteristics that are undoubtedly true. These come in negative, positive, and contested categories. For instance, the British are known for their "stiff upper lip," Germans (traditionally, not contemporarily) for their warlike sentiment, etc.

In America we have the sense that these things are mutable, and this is partially true, but it is unreasonable to expect people to change overnight, and it is especially unreasonable to expect that some external force (e.g. purely economic forces) will produce the massive changes that might be perceived as necessary for a society to adapt to modernity as the Economist writers perceive as necessary and laudable.

In any case, I think it is unacceptable to focus only on the negative aspects of a people. "Blacks are, well, blacks" would generally be racist since virtually no one would use that in a positive sense. Italians often self- perceive that their resistance to the way things are done in a capitalist world is based on some inner nobility -- and although I generally disagree, I think there is still a grain of truth there. Besides, Italians are among the most openly racist peoples in Europe -- people from Northern Italy are even comfortable calling Southern Italy part of Africa (not meant in a positive sense!).

<comment><USER16> Germans were traditionally known for beer, singing, and culture. It was the Prussians who were known for their militarism.

<comment><USER14> Not exactly. See, for example, Tacitus (c. 98 CE):

 _Repose is unwelcome to their race, and toils and perils afford them a better opportunity of distinguishing themselves; they are unable, without war and violence, to maintain a large train of followers. The companion requires from the liberality of his chief, the warlike steed, the bloody and conquering spear: and in place of pay, he expects to be supplied with a table, homely indeed, but plentiful. The funds for this munificence must be found in war and rapine; nor are they so easily persuaded to cultivate the earth, and await the produce of the seasons, as to challenge the foe, and expose themselves to wounds; nay, they even think it base and spiritless to earn by sweat what they might purchase with blood._

</comment></comment></comment></comment></comment><comment><USER17> Whatever happened to 'No politics' here?

<comment><USER18> _Whatever happened to 'No politics' here?_

The rule has never been absolute, but a strong preference. The HN Guidelines that appear as a bottom-of-the-page link on most HN pages

<http://ycombinator.com/newsguidelines.html>

say, "Off-Topic: Most stories about politics, or crime, or sports, unless they're evidence of some interesting new phenomenon."

The welcome message that briefly appears as a top-of-the-page link to newly registered users

<http://ycombinator.com/newswelcome.html>

(but appears not to be mandatory to read for anyone) says, "Essentially there are two rules here: don't post or upvote crap links, and don't be rude or dumb in comment threads."

By the way, the rest of the welcome message is a good reminder to everyone here about how to make Hacker News a better community.

I thought it was (barely) interesting to discuss why Italy, which is evidently full of smart industrialists, is not thriving better as a national economy. If a politics story doesn't have an angle like that related to the environment for forming new companies for hackers, I usually just ignore it, and I try to silently downvote purely partisan political comments in threads wherever I find them.

</comment></comment><comment><USER19> What is the particularly damning thing about this guy, moreso than a typical politician?

<comment><USER20> It's the scale, man. The sheer scale of it. Average corrupt politicians have a mistress, or two, or three; he has a harem of a couple dozen, several of which minors. The average corrupt politician casts his shadow on the media; he owns the media. He has brought the concept of "conflict of interest" to a whole new level.

<comment><USER10> _The sheer scale of it. Average corrupt politicians have a mistress, or two, or three; he has a harem of a couple dozen, several of which minors._

The allegation that some are minors is distasteful, but the fact that he sleeps with more women than you feel comfortable with is neither here nor there when talking about how he "ruined a country".

It's depressing to see The Economist's article open by talking about his sex life. It's utterly immaterial.

His grip on the media, his lack of reforms, his policies on this that and the other, his changing the law to avoid prosecution for fraud allegation - <USER2> things matter to the story of how he "ruined Italy"; how many people he sleeps with and how righteously outraged Americans are by it? Doesn't matter.

<comment><USER21> Multiple sexual partners aren't the issue. When one uses the term "harem" it paints a different picture - the casual disregard for half the human race. Perhaps that contributes to "The female-participation rate in the workforce is 46%, the lowest in western Europe."

I'm loathe to use "litmus test" type analogies, but I believe this behavior is telling.

</comment></comment></comment></comment><comment><USER22> Individuals are easy targets for finger pointing when it comes to "who screwed up X". In the case of something as large as a country ... what were the rest of the gazillion folks doing? Supporting the screwups?

</comment><comment><USER23> I remember him grab a meter maid's ass from behind on the street in front of other officials and cameras. il douche.

</comment><comment><USER24> I think all politicians suffer from Narcissism.

<comment><USER25> [http://www.google.com/imgres?imgurl=http://static3.businessi...](http://www.google.com/imgres?imgurl=http://static3.businessinsider.com/image/4de76b9fccd1d52920160000/anthony- weiner-crotch-shot.jpg&imgrefurl=http://www.businessinsider.com/oh-please-of- course-anthony-weiner-sent-that-picture-2011-6&usg=__WnkANvGHPIV4C8BaLVD8bk_- hyE=&h=319&w=570&sz=61&hl=en&start=0&zoom=1&tbnid=BL0tzenbS6qKAM:&tbnh=106&tbnw=189&ei=f9XyTeboI8iutwfPg8mSBw&prev=/search%3Fq%3Danthony%2Bweiner%2Bcrotch%26um%3D1%26hl%3Den%26safe%3Doff%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en- US:official%26biw%3D1276%26bih%3D591%26tbm%3Disch&um=1&itbs=1&iact=hc&vpx=283&vpy=102&dur=3388&hovh=168&hovw=300&tx=152&ty=128&page=1&ndsp=17&ved=1t:429,r:1,s:0&biw=1276&bih=591)

What good is karma if you can't use it?

</comment></comment><comment><USER25> At least Italy can put a name on their guy.

</comment><comment><USER26> He is their George Bush.

Seriously, in the last decade we have seen more direct, deliberate corruption and out right political douchebaggery than I would have thought possible. And in all of these scandals, not a single politician has paid.

Just like I said when Inside Job came out, if there was any doubt that we are living in a oligarchy, let all doubts now be cast aside.

<comment><USER27> Sorry, it isn't George Bush's fault. He is a nice scape goat. Congress has the purse strings. It's their fault and it is still their fault. They could have stopped him at any time they wanted. No balls on either side.

<comment><USER28> Only if you don't count Bush taking us into the trillion dollar Iraq war without a congressional war declaration.

not that i want to debate the merits of congress.

<comment><USER29> > Only if you don't count Bush taking us into the trillion dollar Iraq war > without a congressional war declaration.

Congress approved, via explicit votes, the Iraq war at multiple points.

There has never been a requirement for legislation that says "we declare war".

<comment><USER30> So who was that on TV constantly boosting the idea and bringing it into the State of the Union address, etc?

Are you making the case that the Bush admin doesn't 1,000,000% own the Iraq war? Really?

(FWIW, they were pushing tax cuts simultaneously). Just cause Congress got bullied into approving these things doesn't mean they weren't Bush initiatives.

<comment><USER29> > So who was that on TV constantly boosting the idea and bringing it into the > State of the Union address, etc?

Huh? The claim was that congress didn't approve the Iraq war. It did, several times. The above has nothing to do with that fact.

> Are you making the case that the Bush admin doesn't 1,000,000% own the Iraq > war? Really?

Do you really think that Congress bears no responsibility for the votes that it takes?

> Just cause Congress got bullied into approving these things doesn't mean > they weren't Bush initiatives.

Poor little congresscritters, can't stand up to that mean old moron Bush.

Obama hasn't varied from Bush's Iraq timetable at all. Is he also "bullied"? (As candidate Obama pointed out, President Obama could start withdrawing troops from Iraq and Afghanistan with 10 minutes after taking office. PO didn't.)

</comment></comment></comment></comment></comment></comment><comment><USER31> When I went to the page, I thought that was Gary Bettman.

</comment><comment><USER32> Blah blah politics blah blah blah. Flagged.

</comment><comment><USER33> Unfortunately when it comes to Berlusconi, the Economist has no credibility. They simply hate him.

<comment><USER34> That's actually true, the Economist has always been very critical of Italy. I have a couple Italian friends who cut their subscriptions a while back because of one article or another. I wouldn't go so far as to say they have no credibility, but they do have a sizable history of negative articles about Italy. Their criticisms may have been justified, but I think that's still a useful piece of knowledge.</comment></comment>


How Do the Google Web Projects Angular, Polymer and NG-Material) All Fit Together? - <AUTHOR> It seems like Google is doing a lot to assist front-end web development. Looking at AngularJS 2.0, Polymer 1.0 and Material Design (Angular Material), they all seem to do slightly different stuff, but with overlap. Are they designed to all work together? Polymer doesn't seem to cover all Angular Material features. Polymer seems top have some routing but not a patch on AngularJS. etc. If I was building a web app for Google (in-house pretend), maybe a google docs clone etc. which of these tools would I use to do which bits? <comment> T-A My 10 000 foot view:

\+ Polymer is a polyfill for the Web Components "standard" \+ a bunch of commonly needed components ready for use;

\+ Angular 2 is designed to use Web Components "natively", without any need to wrap them up in Angular-specific code;

\+ Material Design is just a look. You can style Web Components any way you want.

Disclaimer: I don't use any of the above. :D

<comment><USER2> Polymer is not a polyfill for the standards. It's just a library for creating web components in a less boilerplatey manner. The polyfill library is called webcomponents.js.

<comment> T-A If you wish to be precise, webcomponents.js was broken out of Polymer a while back. See e.g. [1]. In practice, if you use Polymer you are still using the polyfill + the elements from the catalog, as exemplified on [2].

[1] [https://github.com/Polymer/HTMLImports](https://github.com/Polymer/HTMLImports)

[2] [https://www.polymer-project.org/1.0/](https://www.polymer- project.org/1.0/)

<comment><USER3> You don't need the polyfills on Chrome.

<comment> T-A Sure, but as long as browser coverage looks like this,

[http://caniuse.com/#search=components](http://caniuse.com/#search=components)

you have to include the polyfills anyway, unless you are targeting something like Electron or an intranet where everybody is guaranteed to be using Chrome.

That's why I put "standard" in quotes; although it's been around for years, it's really only supported by one widely used browser.</comment></comment></comment></comment></comment>


Ask HN: Best Podcasts of 2018? - <AUTHOR> <comment><USER2> Criminal:[https://thisiscriminal.com/](https://thisiscriminal.com/).

Phoebe Judge's, the host, presentation style lifts the podcast from so so to great.

</comment><comment><USER3> [http://feeds.feedburner.com/TruthForLife](http://feeds.feedburner.com/TruthForLife)</comment>


Take Control Of Your Home With Sentri Home Automation - <AUTHOR> https://www.inmyarea.com/resources/home-security/sentri-home-automation/

<comment><USER2> A good example of how privacy and luxury meet.

On one hand, you have a device that can learn your habits, schedule, etc. This means you can have it handle controlling home conditions without having to admin it.

On the other hand, this is connected to the Internet. It has a webcam, a microphone, and intimate details about your personal life (when you come home, when you typically check your webcam, etc). This can be a huge privacy issue.

Is it possible for a device to provide all these services and yet assure you that your information is 100% safe?

<comment><USER3> Certainly; if you can audit the source and reflash the device yourself :]

But that's unthinkable until it's possible to build alternative devices locally as cheaply and easily as it is to buy one of these devices, without such competition we'll never have the choice.</comment></comment>


Ask HN: Is it ok to drop IE11 support for SaaS product? - <AUTHOR> We are spending a fair amount of time testing a debugging weird issues with IE 11. Do you think it is ok to simply drop the support since most of our users are engineers and analytics show pretty much zero IE traffic? Have you faced a similar decision recently? <comment><USER2> Always look at your traffic logs before making this kind of decision, but global usage is at 2.3%: [https://caniuse.com/usage- table](https://caniuse.com/usage-table)

I personally have dropped it for most of the apps I make (especially mobile web apps) so I can drastically reduce the final JavaScript bundle size by not having to polyfill a bunch of crap that all modern browsers already have built-in (Promises, fetch, fat arrow functions, let, const, etc.).

<comment><USER3> Definitely analyze traffic logs. Global usage may be 2.3% but if OP's product demographic overlaps with IE11's (most likely elderly folks) then dropping IE11 support could be costly.

</comment></comment><comment><USER4> If your analytics show almost no usage and you're not required to by any SLAs or similar, I'd say go for it. We did recently and it's definitely reduced the mental overhead in our development process.

Our official SLA now is to support the current version and one prior for Google Chrome, Firefox, Safari, and Edge. We also don't support any version that is no longer receiving functionality updates.

The most important thing though is communication. If your site isn't going to work well or at all on certain browsers, alert your users to this with a popup. There are lots of libraries for doing user agent detection that makes this trivial.

</comment><comment><USER5> It totally depends on who your target market is and what type of device they use.

</comment><comment><USER6> If you have the time/resources, show those users a message urging them to upgrade and provide links to newer versions. Then monitor traffic levels to see if usage declines to an acceptable level. Depending on the volume of remaining traffic you get, you may be able to contact those users and figure out why they haven't upgraded.

</comment><comment><USER7> Assuming your product is live, you should have hard analytic data to support your decision making one way or the other. If you don't have browser stats, your first step is installing google analytics or a similar offering (or just crawling your server logs).

</comment><comment><USER8> Yes unless your potential clients are in government, medical, insurance or financial industries.

Locked windows workstations, OS are frozen on Win7 For as long as possible.

</comment><comment><USER9> Perhaps controversial here, but in general, I've found developers who are having a hard time supporting browsers like IE11 tend to be the ones writing frontend code poorly.

JQuery is a great example of how you can create a library with some core functionality and know with 100% certainty that if you use it correctly it will work across all browsers that it was intended to support.

Whenever we have issues with browser support where I work it's almost always because a dev has gone rogue and decided to build something with a heap of vanilla JS instead of using or extending a library with cross browser support in mind.

Perhaps you need to ask why you're having so many issues when so many libraries and frameworks will support IE11 out-of-the box if you use them correctly.

<comment><USER10> > JQuery is a great example of how you can create a library with some core > functionality and know with 100% certainty that if you use it correctly it > will work across all browsers that it was intended to support.

Maybe 5 years ago. You cannot use modern JS and CSS in IE11, you need to use transpilers, polyfills and pray to god that all your dependencies are compatible. Testing and debugging is IE is slow and painful.

</comment></comment><comment><USER11> > analytics show pretty much zero IE traffic...

Is anyone begging for it? Your users problems are the problems to focus on. If it's not a problem for them, then it's not a problem for you

</comment><comment><USER12> _> analytics show pretty much zero IE traffic_

That's your clue. Go for it.

<comment><USER13> A IE banner telling them to upgrade to Firefox would be a good idea.

<comment><USER8> Most corporate workstations are locked.</comment></comment></comment>


The smug style of American liberalism - <AUTHOR> http://www.vox.com/2016/4/21/11451378/smug-american-liberalism <comment><USER3> I'm not sure who is more smug: Sean Hannity or Rachel Maddow. But, I know which of them consistently punches up, and which one punches down, and that is far more important to me. As for the current state of political discourse I think you can draw a pretty convincing line from the dawn of right-wing talk radio, though Fox News et al, all the way to pretty much what we have now. But that doesn't matter too much anymore and what's done is done. The political climate is polarized and that is the arena in which liberals have to compete to have their voices heard and their ideas implemented.

So, that said, liberal Democrats probably should not worry too much about hurting the feelings of white racist reactionaries as they go about building a coalition that can win more national elections. In fact, I'm not sure any wing of the Democratic party should do that. White nationalists already have a party that is happy to accommodate them, and trying to beat that is probably just going to alienate everyone else.

</comment><comment><USER4> I would recommend watching episode 1 of Louis CKs new show, Horace and Pete, for a discussion about how parties talk about each other, and how they should.

<comment><USER4> Found it: "How would you define a liberal? Like, to you, what is a liberal? - Just P.C., f..cking fake, animal rights, and gay agenda, always pushing the liberal agenda. They hate Christians and they hate white men. You know why? 'Cause they don't think it through. And they think they're better than everyone else and that they should tell everyone else how to think. They're just f..cking assholes.

Okay. How would you define a conservative?

Uh, just Jesus everything and they hate gay people and racist but pretending they're not, and they're selfish and they only care about money and they think everyone has to do their conservative Christian sh1t.

See, the fact that you start out by seeing each other like that, I mean, how could you possibly ever respect each other or agree on anything?

Yeah, well, they do that, I don't. (scoffs)

You just said you do. You just described us with a string of insults.

Just like you did.

Yeah--

Okay, okay, okay. This is getting interesting. Now, you, define conservative.

Conservative means values. Having values and sticking to 'em and defending what's right and not just saying what somebody said is right that year, you know what I mean? There's-- there's things in this world that are right and wrong and always have been. And you have to respect where this country came from, and you have to hold on to that. And the fact that country and God and life, those are all sacred things. And people should respect each other, and government is there to facilitate, all right? It's not there to control people. And the way you get the best out of people is to make room for their strengths, not by overcompensating for their weaknesses.

Well, that sounds reasonable. That sounds like something most people can respect, right?

Yeah.

Now, define liberal.

Just being open to things outside yourself, having your eyes open and thinking about others, and being aware that our planet is precious and we're responsible for that. And people need to listen to each other. And be decent and tolerant and that a diverse community is a strong community. And sometimes the little guy needs a hand. And we're a strong enough country to do that, and so we should.

Okay, how's that sound?

Sometimes, yeah. Yeah, okay.

Yeah? So, if you start by taking his definition of himself and he starts with your definition of you, don't you stand a better chance, have a better shot at getting to some sort of consensus?"

Read more at: [http://transcripts.foreverdreaming.org/viewtopic.php?f=568&t...](http://transcripts.foreverdreaming.org/viewtopic.php?f=568&t=25123&sid=9c3216fbdbd2c5f4d3dd587734a1a2e7)

<comment><USER3> Okay so we had eight years of a conservative President who pretty much ran on the charitable self-definition of conservative you have there, i.e. so-called "compassionate conservative". Especially in the 2000 election that was the message and it was largely successful and that was how he was able to present himself nationally.

And that President was a disaster.

On the other hand for the past eight years we've had a President who has, more-or-less, defined _himself_ as a centrist, but who has been successfully painted as the less-charitable definition of liberal from your post, in national media and especially in social media

For all his faults, he has not been a disaster on anywhere near that scale.

Now it might be that you're right and that everyone should take a deep breath and a step back and tone down the rhetoric. But when this article brings up the Daily Show and Rachel Maddow and John Oliver and so on, it forgets what all that stuff is _in response to_ , which is a largely conservative national media and a successful framing of pretty much every single national issue of import, by the right from 1990 or so right up to the present day.

And, furthermore, if I look at my Facebook feed, or on Reddit, and try to figure out where the most obnoxious posts are coming from, e.g. pictures of Obama being flushed down a toilet, or "proof" in the form of gruesome pictures that Hillary Clinton and Obama just lounged around and laughed their asses off while folks who worked _for them_ died in Benghazi, for literally no other conceivable logical reason than _they are just evil, evil shits_ , etc etc...

...I mean, maybe some of the stuff you hear about the Koch brothers or whatever, or the Kansas state government, isn't fair either, but it doesn't seem to be anything like on that level.

So on balance, an article that specifically calls out _liberals_ , for poisoning the well and arguing in bad faith, being condescending, etc. - <USER2> maybe not technically _wrong_ in each and every aspect, seems misplaced, you know? Like, seems like the concern for it is a little off-balance compared to what it should be if you _really_ wanted to address the broader issue.

And so, this article is trash.

e: I guess TL;DR what I'm saying is: where is the article suggesting that conservatives maybe should stop accusing liberals and the people they vote into office of literally wanting to destroy America because they just hate it so much? Where is this article, and are any conservatives reading it?

<comment><USER5> I think you kind of missed the point of the article. The point is not that liberals look at conservatives that way. The point is that liberals look at the lower class that way.

Liberals have become more of an "in crowd" that _thinks the right things_ and feels better than others because they think the right things. But the people that they claim to be trying to help don't think those things, so the liberals look down on them - look at _the people they claim to be trying to help_ in a very condescending way. That makes it hard to really help them, because there's no genuine empathy.

Conservatives, on the other hand, claim that those people are big enough to help themselves if the system would just get out of their way. That may not be empathy, and it may not work in the real world, but it's looking at people as competent grown-ups rather than ignorant or stupid people who need "the knowing ones" to tell them what to think and do.

</comment></comment></comment></comment><comment><USER6> TL;DNR smug liberal smug smug smug smug liberal smug smug smug.

<comment><AUTHOR> This comment is a demonstration of precisely the attitude criticized by the article.</comment></comment>