Python hasattr() Considered Harmful - <AUTHOR> https://hynek.me/articles/hasattr/ <comment><USER2> The opening line:

>Don't use Python's hasattr() unless you want its quirks or are writing Python 3-only code.

At this point, you should be writing Python 3-only code. Maybe I should write a post, "Python 2 considered harmful".

<comment><USER3> You should so it can give us a reason to discuss Python and how it's probably not going anywhere with its crazy versioning and how 2020 will probably never happen and people will still be using Python 2 and Guido will have to fly from the sky and hit us every time we use Python 2 in order for us to upgrade.

I love those comment threads.

</comment></comment><comment><USER4> > For what's it worth, Python 3 gets it right: > ... > Also, would you expect > hasattr() to raise that error?

Not really no. I would expect hasattr() to just answer whether the attribute exists, and getattr() to actually invoke it. If "hasattr" actually invokes the attribute and just checks for a non-empty value returned, is it even needed? It would completely surprise me, coming from a language with static types + reflection, that a query for a types attributes (mere existence) would invoke them.

<comment><USER5> Thing is, what does it mean for a property to "exist" in a dynamic language like Python? E.g.

      class P(object):
          def __getattr_(self, attrname):
              return "hello"

      >>> p = P()
      >>> print p.foo
      hello

Does "p" have an attribute "foo"?

<comment><USER4> That is the snag isn't it. It's really difficult to provide any meaningful "reflection" without having proper static types. So in your example you could say "yes, because it gets a value when called" or "no, because it isn't explicitly declared". Since python is dynamic, the "hasattr" method really just means "does_invoking_this_attribute_return_something", which is very much not reflection.

It would maybe be useful with getting only the explicitly _defined_ attributes (say e.g. if you wanted to convert an object to an xsd schema). Your __getattr__ based attribute would not show up in that list obviously.

</comment></comment></comment><comment><USER6> People usually don't believe these advices until they get bitten. I'm all the same, and got bitten: a hasattr was hiding a deeper error and it is a nightmare to debug, one couldn't even know where to start.

</comment><comment><USER7> Isn't this simply a bug? Why would hasattr() catch all exceptions instead of just AttributeError? IMHO a better title would be: "Python2 hasattr() has a bug".

<comment><USER8> Not a bug, just Python 3 choosing different trade-offs. getattr() and hasattr() are useful for replacing annoying boilerplate like:

        try:
            foo = x.y
        except Exception:
            foo = None

If getattr() and hasattr() can raise, then you have to wrap them in try/except blocks. So much for that previously useful shorthand.

There's no good solution here. Either hasattr() can raise (confusing), or it can return false for attributes that exist (also confusing). Maybe if the name was changed (validattr()?), everyone would be OK with the Python 2 behavior.

<comment><USER4> I prefer the Python2 solution actually. If we disregard for a moment the madness of "hasattr" actually invoking the attribute code -- if it does invoke it and an error occurs, hasn't that proven that the attribute _does_ in fact exist?

Picture a type that has a "t.connect()" function, and a "t.data" attribute. The data attribute will fail if connect() hasn't been called prior to accessing it.

I'd expect hasattr(t, "data") to answer true and never raise an error, regardless of when I do it. The only way to do that (if you have to invoke the code in the attribute -- not sure if that is the case) is to catch and return true.

Validattr would have been a much better name, yes.

</comment></comment></comment><comment><USER9> I've previously used hasattr() to check for the existence of an attribute qua instance variable to lazy-load and cache that attribute

        def kdtree(self):
          if not hasattr(self, '_kdtree'):
            self._kdtree = scipy.spatial.KDTree(self.xi.T)
          return self._kdtree

like ruby's

        @foo ||= expensive_calculation

is there a better way?

<comment><USER10> In this particular case you should initialize self._kdtree to None in __init__, and just check if self._kdtree is None: <calculate>

<comment><USER11> Works great unless None is a valid value for the thing, in which case you'll recalculate it every time. If that was the case you should just use hasattr().

<comment><USER12> Or try and except AttributeError. Exceptions are a good thing.

</comment></comment></comment></comment><comment><USER13> I am surprised to see a recommendation to use an exception handler for conditionals, especially for Python.

<comment><USER14> EAFP is in the Python coding glossary:

 _Easier to ask for forgiveness than permission. This common Python coding style assumes the existence of valid keys or attributes and catches exceptions if the assumption proves false. This clean and fast style is characterized by the presence of many try and except statements._

[http://stackoverflow.com/a/11360880/36092](http://stackoverflow.com/a/11360880/36092)

</comment></comment><comment><USER15> > hasattr() also is not faster than getattr() since it goes through the > exactly same lookup process and then throws away the result

In practice this only matters if you have a property. If you use hasattr to find a method within an object, it will not invoke the method while checking for existence.

</comment><comment><USER16> What about just agreeing that property getters should not throw? C# for example has similar code-defined properties, but the agreed and recommended practice is that property getters should never throw.

<comment><USER17> We could all agree never to have bugs in our code while we are at it as well.

<comment><USER4> That isn't quite the same thing now is it. There are always cases that may cause a getter to throw (Unpredictable things like OutOfMemory or IO errors), but the point is that they shouldn't be designed to throw. E.g. they shouldn't have "throw new InvalidOperationException("You must connect to the DB before fetching the Data")" exceptions thrown.

<comment><USER11> Why not? Would silently returning the wrong thing be better?

</comment></comment></comment></comment><comment><USER18> Everything can be abused. But most things are not, most of the time.

<comment><USER19> It's not about abuse, it's about behavior/consequences most people don't realize.

</comment></comment><comment><USER20> Isn't it either way best practise to better be sorry than to be safe? So the second approach is as far as I can see favoured by the community, because it declutters the code and keeps it simple.

<comment><USER21> I think it's usually better to be _safe_ than _sorry_. If the community favours the second approach it's probably because they're unaware of the side- effects (hence this article) or because they're writing Python 3 - as they should be.

<comment><USER22> The principle the above commenter refers to is known as "Easier to Ask Forgiveness than Permission", i.e. you're not meant to check preconditions – you should just try to do whatever thing you want to do, and it should signal an error if it didn't succeed.

The reason for this has little to do with "clean code" and more to do with the fact that when checking preconditions, programmers have a tendency to check proxies rather than the actual thing they want to do. An an example, it is common to see the following:

        if not file_exists(filepath):
            stderr("Invalid config filepath!")

        config = read_file(filepath)
        ...

This code has the glaring problem that even if the file _exists_ , that doesn't mean you have the required permissions to read it. What you really want to do is read the config file, but you check a proxy (does the file exist at all?) as your precondition.

How would you check for the right thing, that you can read the config file? Well, by trying to read the config file, of course!

        try:
            config = read_file(filepath)
        except IOError:  # can make this more fine-grained
            stderr("Invalid config filepath!")

This is longer code (one extra line, gasp!) but it avoids the problem of checking the wrong precondition which is so easy to do by mistake.

You may have heard of this concept in a different situation – e-mail validation. A lot of people go to great lengths to validate e-mail addresses by regex. Even if the address is perfectly conforming and passes the regex with flying colours it might not lead to an inbox. To really verify that the user can receive e-mail at the address they've specified, guess what you have to do? Send an e-mail and ask them to confirm they got it. It's the only way.

<comment><USER23> Don't forget the part where checking for preconditions opens you up to race conditions e.g.

        if not file_exists(filepath):
            stderr("invalid config filepath!")
        # filepath is removed by an external tool
        config = read_file(filepath) # blows up file does not exist

<comment><USER24> Is there still a chance of a race condition when you use the "with" operator? It seems like this is one of the major use cases it was designed for

<comment><USER22> It depends on how you use it! If you use it to acquire the resource, as in

        with open(fn, 'r'):
            ...

then generally the answer is no, since that is the same thing as the equivalent `try…finally`. If someone removes the file after it's being opened it will not be completely wiped until it's closed.

</comment></comment></comment></comment></comment></comment><comment><USER25> This shows that get __getattr__-code is executed even on lookup. If your __getattr__ or your property-getter have side-effects, then even the lookup will trigger them.

Then even a bare statement like foo.bar can have side-effects in the foo- object.

</comment><comment><USER26> "Considered Harmful" Essays Considered Harmful

[http://meyerweb.com/eric/comment/chech.html](http://meyerweb.com/eric/comment/chech.html)

<comment><USER27> Pointless, pedantic, patronising comments considered harmful…

<comment><USER28> It is silly IMO - those people using such click-baity titles for everything show a lack of creativity and really ought to try harder. "considered harmful" was already annoying when Dijkstra coined the term (and for very good reason).

</comment></comment></comment><comment><USER29> Regarding Python3 sample at the end,

What if the method y is mutating the object? Then when I just check for existence of y with hasattr, it will mutate the object. I wouldn't want that.

<comment><USER5> The reality is that almost any interaction with an object can cause it to mutate itself, since Python allows classes to override just about any operator. For example: "a > 3", "5 in a", "x = a.b", "len(a)", "print a", etc - all of these can cause a to mutate. In the end, you have to trust the code to do the Right Thing, or just not use it.

</comment></comment><comment><USER30> It's raining "Considered Harmful" stories. Come on. Be a little bit more creative with titles, please!

<comment><USER19> TBH it was just a quick write up to point ppl to in discussion as said in the intro. I never spent much time to ponder the attractiveness/SEOability etc.

<comment><USER28> the point is it's not "considered" harmful <\-- emphasis on quotes around considered but not on harmful because nobody "considers" it. Some might have a strong use-case for using hasattr(). The same applied to goto (and still does).

<comment><USER19> Look, nobody is defending the title. I've even apologized for it here and in the article and explained how it happened. But if you insist on keeping to beat the dead horse tells more about you than the title.</comment></comment></comment></comment>


Arq for Windows finally available - <AUTHOR> https://www.arqbackup.com/arq-for-windows/

<comment><AUTHOR> I really like the philosophy of Arq:

\- especially: owning the encryption keys [1].

\- agnostic of the storage (S3, Glacier, Dropbox etc. can be used)

\- documented backup format

[1] [https://www.haystacksoftware.com/blog/2014/10/its-not- about-...](https://www.haystacksoftware.com/blog/2014/10/its-not-about-the- encryption-its-about-the-encryption-keys/)

</comment><comment><USER2> (I'm the guy who wrote Arq) If you have any questions or run into issues, please let me know, either here or via email: support at arqbackup.com

<comment><USER3> Would you consider also creating a linux, preferably CLI, version?

<comment><USER2> Ys, it's on the to-do list.

<comment><USER3> That's the best news I've read in a while, thank you. Looking forward to it very much!

</comment></comment></comment></comment><comment><USER4> This is great news! Any chance I can use this to backup to Hubic's service? In theory I could mount Hubic on a Rapsberry and then sftp to the Raspberry from Arq, but it would be great if I could do it directly.

<comment><USER2> Not right now, sorry.

<comment><USER4> Thanks, no problem.

Do you think the mounting 'trick' would work or is that just a dumb idea? :)

<comment><USER2> Don't know enough about what you're describing. If you can mount Hubic as a drive, then maybe mount it to your Mac, and then tell Arq to SFTP to localhost. (Backing up to a local folder is on the to-do list but the SFTP approach is a workaround.)

</comment></comment></comment></comment><comment><USER5> I still use Backblaze to backup my media server (several TBs of data), but I recently switched to Arq on my laptop. It is fast, reliable, and at least if your data requirements aren't too vast, very cheap.

</comment><comment><USER6> As a long time crashplan user, I backup a few Tb of data and use the key based encryption. Does arq fall flate in comparison to anyone? I like the sound of this, but I am wondering if I gain anything versus using cradhplan to just write the files locally instead of sending to crashplans storage.

<comment><USER7> Open format.

<comment><USER8> I wonder. Assume you do not have arqbackup, and--for the sake of your short open format comment--arq_restore is outdated. You have downloaded all the data chunks (the many, many, many arq creates), how do you go by to decrypt it and get the original data in working state?

<comment><USER7> I'm not sure what you mean by outdated; it seems to work fine. If not, you read [https://www.arqbackup.com/s3_data_format.txt](https://www.arqbackup.com/s3_data_format.txt) and write your own. In contrast, what do you do with your Crashplan data if you don't have access to Crashplan? It's lost.

</comment></comment></comment></comment><comment><USER9> I don't really care much for the Windows version, but I'm a user of Arq on Mac OS. I used CrashPlan and Backblaze before that, for a couple of years, but had issues with both.

I would like to point out something many people overlook. If you use an online backup service, check how decryption is done. If you have to supply your decryption password to an on-line form, somebody has access to your data, and all the encryption has been for nothing (this was my problem with Backblaze).

Arq is great, because it decouples storage from backup. You pay for Arq, which buys you a backup program, and you buy storage separately, from any of the supported providers. You can also switch storage providers over the long term. I am very happy with this approach.

Arq has also proven to be much more reliable than either Crashplan or Backblaze's client app.

<comment><USER10> Arq's client app was much less reliable for me than Backblaze on OSX. But it has been over a year since I switched.

</comment></comment><comment><USER11> Arq is one of my favourite pieces of software.

</comment><comment><USER12> Where's the key file saved on the Windows' directory?

<comment><USER2> In C:\ProgramData\Arq\keychain.</comment></comment>


E-VGMs could be key to avoiding chaos from new container weight verification law - <AUTHOR> http://theloadstar.co.uk/e-vgms-key-avoiding-chaos-new-container-weight-verification-laws/ <comment><USER2> A bit of background: [http://www.maerskline.com/de-de/countries/int/news/news- arti...](http://www.maerskline.com/de-de/countries/int/news/news- articles/2015/07/solas-weight)

tl;dr: ships are not going to trust the weights supplied by packers of cargo containers after mid-2016, instead the weights must be supplied to each ship by the shipping companies or approved 3rd parties in advance of loading.

<comment><USER3> What's the safety reason behind it all? Are ships sailing with improper centers-of-gravity due to incorrect loading?

<comment><USER2> It sounds like it's more a they can't correctly load without knowing the true weights of the containers, and no doubt more than a few companies that are filling them lie about the weight.

<comment><USER4> The necessity of this law would suggest the imperfection of the free market.

<comment><USER5> > ...for the implementation of Safety of Life at Sea (SOLAS) verified gross > mass (VGM) regulations...

I wonder how you define "free market".

</comment></comment></comment></comment></comment><comment><USER6> The solution is of course to put load cells and automatic tracking equipment in all cargo handling systems. One could then tell if the weight of a container changed over time, spillage, out gassing, diesel use too high, etc. With a load cell on each corner of either the truck, loader or crane one could also tell if the weight has shifted internally. Easiest solution would be to put a large qr code like symbol on every side (should be resilient to corrugation) of a container. Could be tracked visually over long distances.

It sound ridiculous, but it looks like ships were loaded based on whatever the originator claimed was the weight. The more I dive into industries, the more I realize that everything is a huge hack job. Smoke, mirrors and make believe.</comment>


Greenland's melting ice raised global sea level by 2.2mm in two months - <AUTHOR> https://www.theguardian.com/science/2020/mar/19/greenland-ice-melt-sea-level-rise-climate-crisis <comment><USER2> Has anyone considered the albeit short term emissions impact of grounding flights due to COVID-19? Airlines have in some cases experienced over 70% reduction in volume in the past weeks[0].

Not to mention, so many companies have been forced to adopt remote working practices and social life has been forced into a sedentary routine. I wonder what the inertial impact of this pandemic will be on emissions over the coming years.

[0] [https://www.economist.com/business/2020/03/15/coronavirus- is...](https://www.economist.com/business/2020/03/15/coronavirus-is-grounding- the-worlds-airlines)

<comment><USER3> Air travel makes up for 2.5% of global carbon emissions. Not really worth micro optimizing a lot in those 2.5% if you asked me. At least not if you can focus efforts in energy production and cars instead.

<comment><USER4> Ya think?

"Unless market constraints are put in place, growth in aviation emissions will result in the sector's emissions amounting to all or nearly all of the annual global CO 2 emissions budget by mid-century, if climate change is to be held to a temperature increase of 2 °C or less."

(from: [https://www.wikiwand.com/en/Environmental_impact_of_aviation](https://www.wikiwand.com/en/Environmental_impact_of_aviation))

<comment><USER3> The article you quote validates my point by assuming other emissions can be decreased to a minimum. If all emissions we have to worry about in 2050 was air travel, that would be spectacularly good news!

</comment></comment></comment></comment><comment><USER5> I can't find 2.2 mm mentioned anywhere in the study they refer to. Where is that number coming from?

[https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2020...](https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2020GL087291)

<comment><USER6> I can't find it either. I only see gigatonnes. Even with a naive calculation that assumes no ice reclaimed elsewhere, I get 1.8mm. [https://docs.google.com/spreadsheets/d/1zC2c30kIkbx39v0gyY1P...](https://docs.google.com/spreadsheets/d/1zC2c30kIkbx39v0gyY1PrPJEFJW4LBMkYxW_RbdcKYc/edit#gid=0)

<comment><USER7> Why is that naïve?

<comment><USER6> Because in the opposite hemisphere, water is turning to snow and ice.

<comment><USER8> The ocean freezing anywhere is irrelevant: the mass of water in the ocean stays the same regardless of its phase.

The problem discussed here is the Greenlad ice cap melting, which we can assume increases the mass of water in the ocean.

The nature of ice caps in both Greenland and Antarctica is that they are in deserts that go for years with zero precipitation. Ice accumulates steadily through what we can think of as layers of frost every morning over centuries until it covers entire continents kilometers deep. On the other hand, surface melt due to increased seasonal insolation usually doesn't result in much runoff: these are not glaciers that slowly flow out to sea, either.

<comment><USER6> Just to make sure the context is clear, my main question is why the article headline says this particular melt caused a 2.2mm global rise in sea level. The melting described in the article would only account for a 1.8mm rise, in isolation. If anything happening in Antarctica had an effect, it would lower that number even further, making it more different from the headline. Does the 2.2mm number include other melting that the article and cited paper don't mention?

</comment></comment></comment></comment></comment></comment><comment><USER9> I was curious on the math for all this.

Surface area of earth = 510,064,472 km2

70 percent water = 357,045,130 km2

2.2mm = 0.0000022 km

volume = 785.499 km3

GIS area 1,710,000 km2

div vol by area = 459.3 mm

melting 1kg of ice from 0C = 333.55kJ

density of ice = 919kg/m3

785,499,000,000 m3 x 333.55 = 262,003,191,450,000 kJ

1J/s = 1w

2 months = 5,184,000s

= 50,540,739 kJ/s

= 50.540 GJ/s

= 181,944 GWh

making it the 24th largest electricity producer in the world (if it were all electricity).

That's pretty incredible!

<comment><USER10> I got inspired by your calculation to fact check the article's claim of the 2.2mm see level rise. They apparently base this on the reported melting of 600 Billion tons of ice as stated in the article.

600 Billion (metric?) ton = 600000 Billion kg (or liter water) = 600 km3

This doesn't quite add up. I wonder where they got the 2.2 mm from ..

</comment></comment><comment><USER11> Just been checking [http://grid.iamkate.com](http://grid.iamkate.com) and in the UK as a country it seems to me that we're about 7% down on power usage week on week as a result of people WFH.

The reduction in fossil fuels, the fact people are not necessarily able to get their favourite foods (and there was already a backdrop of a rise in plant- based diets in the UK anyway), the lack of commuting and travel, it all adds up to me thinking our emissions are going to be much, much lower this year, at least in the UK.

I'll be fascinated to see how much of that sticks, and whether we start to see any reversals on data like this.

Doubtful, but if habits change in the next six months for good, well, it's a silver lining. We can dream.

</comment><comment><USER12> Can somebody explain to me what the big problem of sea levels rising is.

Sure, at that rate, or even at that 100 times that rate, at some point in the not-so-close future the coastline will move inward significantly. Beach properties will become diving attractions.

I don't think I care. Tell my why I should care.

<comment><USER13> Well, it seems folk weren't impressed with the technical aspects of your question, but I'll give it a shot and ignore the moral aspect entirely.

What would happen at "100 times that rate"? That's about 10cm a month, or four inches a month for Americans.

Firstly, the coast does not slope back at a constant angle from the sea, so you can't just move uphill a few yards and think that everything will be fine. Even if you could, try it now: try moving to an area that's, say, 20 yards uphill from where you are. Today. Do you see the immediate problem?

But let's say you're already a fair height above sea level, so you've got a few years, and you live in a coastal town. What is going to happen? Well, after a few months, you're going to start having issues with high tides. Sewers will flood, so you'll literally have a river of shite flowing in the streets below. The piers down at the harbour will become dangerous at high tide. Breakwaters will become ineffective. Warehouses will flood.

You've probably got a coastal road out of the town. With the higher tides, you've got increased erosion, so after a particularly bad storm, there's a major landslip, and you lose not only the road but the rail link out as well. Goods can't get in or out of your town now.

The higher parts of the town are now islands, and you don't have a functional slipway so it's difficult to even use boats. The shape of the coastline is now in constant flux; it changes with every tide as mud and sand gets sloshed around, which means that tides are completely unpredictable. Sometimes you get a massive tide as more water is funnelled in, and other times it's barely noticeable as mudbanks cut off whole areas of water.

Now, all this might even be manageable, if you have access to plenty of money to rebuild, but who is going to rebuild when they'll have to do it all again next year? And you're not going to get help from anywhere else, because this is happening to _every_ coastal town all at once.

Of course, this is based on your extreme case of 10cm per month, so the real question is "at what stage does this become unmanageable?". Is it 10cm per year? 1cm per year over the course of a decade? Somewhere inbetween?

<comment><USER14> At the current rate of melt, how long is it until Greenland is out of ice and we don't have to worry about it contributing 1.1mm of sea level rise a month?

<comment><USER13> I dunno, a 1000 years or so? It doesn't seem worthwhile even roughly calculating since it's rather obviously going to accelerate as it gets warmer. It would be bizarre if it didn't!

</comment></comment></comment></comment><comment><USER15> I'm not buying this. Someone please explain, in detail, how 2.2mm of sea level can be measured precisely? What kind of tolerance are we talking about? 2.2mm +/\- 5mm?

<comment><USER16> If you have volume and divide by surface area you'll get height.

<comment><USER15> How do you accurately (down to mm precision) determine volume of a moving target?

</comment></comment></comment><comment><USER17> Is it even solid science to measure sea levels over 2 months? How do you measure "sea level"? It seems normal that ice melts as summer comes around. So there would be fluctuations in sea level? How do they account for all the possible variations to establish a sea level number?

<comment><USER18> I suppose they measure the missing ice, and deduce the sea level.

<comment><USER8> They don't measure the missing ice either. They estimate it based on all kinds of things (mostly models based on what they guess the answer should be). Some of the actual measurements include the deviation in satellite orbit as it passes over Greenland, from which they estimate the change in gravity, which leads directly to an estimate of the change in mass. Since the rock is unlikely to be changing on the time scale of a year or so, they assume it's a change in ice mass. Given a typical annual precipitation of zero in central Greenland, it's a safe bet that any change is mass is due to ice melt.

</comment></comment></comment><comment><USER19> It's hard to get excited about _2.2mm_.

I'm not saying it isn't a problem, I'm just saying it's not a scale humans are likely to panic about.

If it were 2.2m in one month you can bet your left shoe we'd panic.

<comment><USER20> The sea raises and lowers by up to 16000mm every day in parts in of Canada during spring tides

<comment><USER21> That would be over 600 meters, impressive :p. EDIT: the parent author corrected his entry to still impressive 16 meters.

And of course tides/sea level is almost the same duality as weather/climate.

<comment><USER22> > And of course tides/sea level is almost the same duality as weather/climate.

I tried to argue for the same point but lacked the word "duality" in my corpus. Thank you, will use in the future!

</comment></comment></comment></comment><comment><USER23> Geologists studying glaciers have determined we're in an Interglacial Period, where glaciers are contracting and it's also cyclical [1]

There's also natural wonders like the Great Blue Hole, a marine sinkhole off the coast in Belize, which show this has been going on for some time. It was "formed during several episodes of Quaternary Glaciation when sea levels were much lower.. as the ocean began to rise again, the [124M] cave was flooded" [2]

[1][https://en.m.wikipedia.org/wiki/Quaternary_glaciation](https://en.m.wikipedia.org/wiki/Quaternary_glaciation) [2][https://en.m.wikipedia.org/wiki/Great_Blue_Hole#cite_note- NA...](https://en.m.wikipedia.org/wiki/Great_Blue_Hole#cite_note-NASA-2)</comment>


Show HN: Short-term rental estimate for sites like Airbnb - <AUTHOR> https://www.eliotandme.com/estimator <comment><AUTHOR> For everyone wondering how much the White House could rent for on Airbnb (132 bedrooms/35 bathrooms). $157,920/week

[https://www.eliotandme.com/estimator?address=white+house%20&...](https://www.eliotandme.com/estimator?address=white+house%20&bath=35&bed=132&room_type=entire_place&sleeps=264)

<comment><USER2> Lincoln bedroom @ [https://whitehouse.gov1.info/visit/index.html](https://whitehouse.gov1.info/visit/index.html) 400$ / night. So 7 * 400 * 132 = 369,000 / week. Making that's a hefty bulk discount ;-)

PS: And yes this is a parody.

<comment><USER3> The statement is brilliant, I wonder how they could put that up with a straight face:

> We regret to announce that the "White House Overnight Guest Program" will no > longer continue under the Trump Administration due to the repeal of the > Obama Administration's openness and transparency doctrine. You are welcome, > however, to make a reservation to stay at the 5-star Trump International > Hotel just down the street.

The $400 a night is per double occupancy though, so really it's only $200 per head.

EDIT: Ok, it's a parody. Shame! :(

<comment><USER4> Obama's openness and transparency? haha.

<comment><USER5> To help, since you look to be somewhat new, the downvotes aren't just because this is place a bastion of liberal Democrat support, but because you didn't really contribute with your comment.

Make an actual argument with references to back it up and you'll likely still get argument, but not necesarrily downvotes.

<comment><USER4> For one, Obama was the worst president when it comes to prosecute whistle blowers that brought attention to illegal activities within the Government (it's like the opposite of openness)... Yeah, Obama liked to say that he was transparent or open, but actions speak louder. (I don't think that this needs references, it is a well known fact, but here you go: [http://www.politifact.com/punditfact/statements/2014/jan/10/...](http://www.politifact.com/punditfact/statements/2014/jan/10/jake- tapper/cnns-tapper-obama-has-used-espionage-act-more-all-/))

<comment><USER5> Firstly, that article itself notes, some of those cases were likely not whistleblowers (they were just relaying government information to news agencies, and even if trying to be transparent I doubt they intended internal negotiations with North Korea and Iran to to transparent _while ongoing_ ). Secondly, that's but one aspect of administration transparency, there are many to consider, such as how much other information was released, when it was released, and how complete it was. Looking at one metric, even if it's an important one, and using it as the sole basis for making that judgement, amounts to more of a PR move and clickbait headline than useful assessment.

That said, I agree, Obama didn't appear to run a very open administration. It appeared _very_ secretive. Then again, the prosecuting of of people for leaked information rather than quiet pressure and sanctions is itself a form of transparency (it's also noted in that article that past presidents used many other techniques to pressure reporters instead of the legal system).

In the end, this is a complex enough topic that without a massive investment of time and effort, most arguments are going to have a hefty amount of opinion, making useful discussion hard. It doesn't help that we don't have an easy comparison with Trump's administration. In one respect, it's likely the most open administration there's ever been. I just don't think that's by design...

<comment><USER4> but since this is place a bastion of liberal Democrat support (as you put it), proofs are only asked when you talk against democrats... (Do you think that Google would fire somebody for saying what I said? I do...)

<comment><USER5> > but since this is place a bastion of liberal Democrat support (as you put > it)

Actually I was implying that it may be _seen_ that way, and even if you see it that way that doesn't fully explain what was going on.

> but since this is place a bastion of liberal Democrat support (as you put > it)

Not true. There are some vocal Trump supporters here (out at least they were, they've been quiet of late). Unsupported statements are often called out on both sides. It may happen more for one side than the other, but that just means it's up to people like you to ask. If you can do it in a _respectful_ way, you're part of the solution (and I suspect you'll get upvotes for it).

That's also a very vocal set of libertarians that are happy to explain or argue the finer points of their reasoning.

> but since this is place a bastion of liberal Democrat support (as you put > it)

I don't think that really has any place in _this_ discussion, but I'll humor you. No, I don't think they would. There are many Republicans working at Google. This is about a specific aspect of the company policy which happens to align with professed democratic principles. An employee _publicly_ called that policy into question in a way that was easy for some to see as bigotry. That's a PR nightmare, and puts a spotlight on the company in a way they don't like, all because of one person. The PR nightmare alone is enough to cause the firing. Everything else just made the decision easier.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> I found this to be really inaccurate. I've been a host of an Airbnb for a few years. I've slowly moved my price up until I hit the maximum 70£/day. I have hundreds of positive reviews.

The price the website suggested was 120£.

I then went in to put an obscure address where there is no demand, and the price was $140/day. I've rented a hotel in the area for $30/day.

<comment><USER7> $30? Where is such a place, Siberia?

<comment><USER8> There are _plenty_ of AirBnB places in fairly touristed places in the developing world for 15-20€/day.

<comment><USER9> Room or a whole house?

<comment><USER10> Using Airbnb, I rented an entire 2 bedroom apartment in downtown Belgrade, Serbia for about 13 days. With fees, the price was $380-ish USD, just under $30/night. It was a really good deal!

</comment></comment></comment></comment></comment><comment><USER11> Airbnb already supports this [https://www.airbnb.com/host/homes](https://www.airbnb.com/host/homes)

<comment><USER12> That's a city-level estimate. OP provides estimates based on your actual address.

</comment></comment><comment><USER13> For my own reference point in Wilmington DE. It was saying daily 130 for home, 55 for room. I rented out rooms at 15$ a night. I was constantly told I was overpriced for the area. Despite providing free weekend breakfast, and Friday night dinners.

<comment><USER14> $15/night sounds really cheap! $55 for a private room seems reasonable compared to what's on Airbnb: [https://www.airbnb.com/s/Wilmington- de/homes?guests=1&adults...](https://www.airbnb.com/s/Wilmington- de/homes?guests=1&adults=1&pets=false&allow_override%5B%5D=&room_types%5B%5D=Private%20room)

</comment></comment><comment><USER15> How is this "Artificial Intelligence" (from the about page: [https://www.eliotandme.com/about](https://www.eliotandme.com/about))?

<comment><USER16> For some, AI is just another buzzword. :/

</comment></comment><comment><USER17> It's a nice idea, and your UI is nice, but I hate the name as it's very forgettable and using it against my parents Airbnb cottage, and a friends flat, it is wildly inaccurate.

</comment><comment><USER18> Looks great. Consider adding dishwasher and washer/dryer as factors too — I found those made a big difference (20%+) when doing my own comps research.

</comment><comment><USER19> Gave me the exact same rate for my current apartment (1600sq ft Capitol Hill Seattle) and my previous condo (1100 sq ft NuLu Louisville, KY). My rent here is 3.5x what my mortgage was in Louisville and from personal experience in both places the demand for short term rentals in Louisville is nothing like it is in Seattle. So yeah... probably not accurate for the addresses I checked.

<comment><USER20> or maybe you overpaid for your apartment. it's not uncommon in cities on the west coast for prices to irrationally exceed the possible rental income.

<comment><USER19> I should have better specified... the rate per night makes sense for the place in Seattle, but is way overpriced for the place in Louisville.

</comment></comment></comment><comment><USER21> This could also be used when looking for an Airbnb. You could use it to get a rough price estimate in an area near your destination.

</comment><comment> nick-cortes Curious to see how it relates to the mortgage of some houses.

<comment><USER22> I did a quick check in the Sunnyvale area, a $2M mortgage on a 4 bedroom, 2.5 bath house that can sleep 6 at $2700 a week is about the same as a mortgage. (note you'd insurance, pay taxes on the house, and have more expensive maintenance) So bottom line you'd lose money on the deal.

<comment><USER23> I have the understanding that no one expects residential real estate rental to be cash-flow positive with a full mortgage. It's extremely rare and basically a complete no-brainer if you can find a property that is cash-flow positive with a mortgage. Generally, one looks at equity and tries for net-worth positive. Which is simple to say, but is made more complex by older mortgages giving more equity for an equal payment.

Of course, with an interest-only mortgage, yes one would need to be cash-flow positive, because there is no such thing as gaining equity. Again, my understanding is that such properties are extremely rare.

<comment><USER24> If you're investing in real estate you always want a mortgage and you always want it cash-flow positive. If it's not cash-flow positive on the first day of renting it out, then you don't buy the property. Investing for equity is about the dumbest mistake some real estate investors make. Always invest on cash- flow. Investing for capital appreciation is a recipe for disaster. With positive cash-flow, the underlying value is irrelevant.

When I say you "always want a mortgage" I mean that if you have a mortgage you have your tenants paying for the house. Your cash on cash return is far higher. If your potential property doesn't support that, then find another property. Paying $200k cash for a house that nets $500 per month is far less interesting than buying 10 houses at $20k down that each net $200 per month -- and it takes exactly the same cash.

<comment><USER23> I don't disagree with you. I was speaking solely about full mortgage -- ie, minimum down payment. Turning a positive cash flow with a large mortgage is very difficult, especially after accounting for all costs. (Mortgage, taxes, insurance, maintenance, hoa, vacancy...) Turning a positive cash flow without any mortgage is very easy, but kills your ROI. So you're going to end up shooting somewhere in the middle...

EDIT: Here's a fun Reddit thread on the topic:

[https://www.reddit.com/r/RealEstate/comments/36ikp6/landlord...](https://www.reddit.com/r/RealEstate/comments/36ikp6/landlords_how_many_of_your_rental_properties_are/)

Here's an example from that thread on how quickly the math takes you to roughly cash-flow neutral -- and this is with 25% down and 1% rental price:

[https://www.reddit.com/r/RealEstate/comments/36ikp6/landlord...](https://www.reddit.com/r/RealEstate/comments/36ikp6/landlords_how_many_of_your_rental_properties_are/crf9n7n/)

</comment></comment></comment></comment></comment><comment><USER25> There's no way a 4BR/3B house in Las Vegas (Summerlin, to be exact) is going for 1500 a week.

Nice try, though.

<comment><USER26> Forgive my ignorance but is that too high or too low?

<comment><USER25> Waaaaay too high. Probably by an order of magnitude.

<comment><USER14> I'd be very curious to know on what you base your judgment. Here is a search on Airbnb for Summerlin Las Vegas 4BR/3Baths and I'd say $200-$250/night looks reasonable (apparently average is $429) [https://www.airbnb.com/s/summerlin- las-vegas/homes?allow_ove...](https://www.airbnb.com/s/summerlin-las- vegas/homes?allow_override%5B%5D=&min_bathrooms=3&room_types%5B%5D=Entire%20home%2Fapt&min_bedrooms=4)

<comment><USER25> There's a difference between what's listed and what actually moves.

</comment></comment></comment></comment></comment><comment><USER27> I'd add a privacy policy. I didn't want to enter my real address since I didn't know what could be done with my address. I know your intentions are not nefarious, but a simple blurb around what you do w/ collected data would be nice.

</comment><comment><USER28> Apparently Trump could get $1,150 per week letting out the White House.

<comment><USER29> "White House, Pennsylvania Avenue Northwest, Washington, DC, United States 2 bedrooms 1 bathroom 4 people"

Huh, I've always thought the WH was bigger than that.

<comment><USER30> I think that's just the east wing.

</comment></comment></comment><comment><USER4> Is that how much you could get if you are aiming to getting close to 100% occupancy?

</comment><comment><USER31> How is my data being used here? Not super comfortable giving my address and then giving information about the house when there's no information about how the data is being handled/stored.

<comment><USER32> You can get all this info off Zillow. Not sure what the concern is.

</comment></comment><comment><USER33> This is brilliant, for commercial Airbnb operators. Depending on who you are that might be good or bad, but I won't wade into the debate :)

I did a more basic analysis when looking at the most profitable Airbnb cities a few months back: [https://www.travelstatsman.com/06022017/cities-airbnb- hosts-...](https://www.travelstatsman.com/06022017/cities-airbnb-hosts-make- money/)

</comment><comment><USER34> Quite accurate estimate on our apartment in Stockholm, Sweden (we rent out sometimes at a slightly higher price than estimated)

</comment><comment><USER35> Hobart, Australia: the estimate from this page for 1 week of renting, would cover a monthly of an interest only mortgage.

<comment><USER36> When I have looked into it before, that's more or less what you would expect. 1 week holiday let = covers mortgage for month.

It's almost exactly that (within 10%) for the estimate of my house.

<comment><USER26> There is a big difference between a regular mortgage and an interest only mortgage.

</comment></comment></comment><comment> m-j-fox It seems like I could get more for my rental on bbro, if it was 100% occupied. It would be helpful to know occupancy stats and average length of stay to estimate turn-around costs.

</comment><comment><USER37> Nice, I like this a lot. I'm curious: How did you get the event data? It's really accurate a clean for San Francisco (Dreamforce, Fleet Week, etc.)

</comment><comment><USER38> question for people who use airbnb: If you've had a good experience with a host and you're going back to the area would you bother booking through Airbnb or just contact the host directly?

<comment><USER39> I'd go through airbnb again unless i really expected to stay there frequently. Dispute mitigation cuts both ways.

</comment></comment><comment><USER40> Shouldn't it be EliotAndI.com?

<comment><USER41> Most likely yes, but that didn't stop 23andme.com haha :)

It is interesting how language morphs over time. Some people will be quite opposed to grammatical errors taking root.

But language has a tendency to not only accept those errors as dual-truths, but eventually replace those errors as sole truths!

This is to the point where "you and I" sounds stunted, overly formal and archaic, compared to "you and me", in my opinion.

<comment><USER42> "He gave it to Eliot and me," is correct.

"Eliot and me gave it to him," is not.

"He gave it to Eliot and I," would be an example of hypercorrection.

</comment></comment></comment><comment><USER43> I know some superhosts who use airdna.co to find new properties to invest in and price listings. It's not free though.

</comment><comment><USER44> If only it was legal in my state!

</comment><comment><USER45> Seems accurate, might be better to consider current rating, amenities, etc.

</comment><comment><USER46> awesome! well done.

</comment><comment><USER47> Cool idea, very inaccurate.

<comment><AUTHOR> Do you have an example?

<comment><USER48> Well for one, it lists my house as having the wrong number of bedrooms and bathrooms, and then proceeds to give an inaccurate number for rents in the area if you actually go look at Airbnb.

<comment><USER49> I think it is a default, 2 bedrooms , 1 bathroom.

Wouldn't you be worried if it showed the exact numbers?

<comment><USER50> No, such data isn't hard to come by.

</comment></comment></comment></comment></comment><comment><USER51> If I could get the bank financing, I could buy 5 properties in the market I am in and all would generate 25% cash on cash returns after a few months of renovations. With the scale I could hire full time staff and centralize laundry.

And before anyone jumps down my throat for this, it would be a social good in this particular market and help the local housing market (there is a surplus of housing and ample very affordable housing, the problem here is lack of jobs)

And if anyone thinks this would be a soft option, it would be a lot of work and a lot of responsibility and a lot of value added.</comment>


How did Candy Japan get its first subscribers? - <AUTHOR> https://www.candyjapan.com/behind-the-scenes/how-did-you-get-your-first-subscribers <comment><USER2> Dear Sujan/Bemmu/Others

I constantly fear the Japanese and other Asians may have invented cool things that I am unaware of.

I have discovered Japanese sweets, Japanese hot water bottles (the metal tortoises) and Korean washlets.

What else is there to discover?!

Little known fact as we head into Winter.

Japanese hot water bottles remain hot for much longer than the Western rubber versions, your hot water bottle remains warm until noon the next day.</comment>


Show HN: A simple Unix-like operating system that runs Doom - <AUTHOR> https://github.com/ozkl/soso <comment><USER2> Love the test case "but can you run Doom on it?" Great work!

Personally I'd like to see a homebrew OS that attempts some kind of compatibility with 16-bit Windows, with some modern design/conveniences (sortof a ReactOS for the 3.11 world). It seems like people make either 8 bit or 32 bit OSes. Maybe I'm not searching the right terms. Anyone know of anything, or a starting point?

<comment><USER3> AFAIK you can run 16 bit Windows programs in Wine.

<comment><USER2> Thanks, I'll check it out for some ideas!

</comment></comment></comment><comment><USER4> Nice job ozkl! Cool to see another OS being built in Qt Creator :)

Your generic DOOM looks really easy-to-port, gonna try it ASAP: [https://github.com/ozkl/doomgeneric](https://github.com/ozkl/doomgeneric)

<comment><AUTHOR> Thanks! Yeah it is my favorite editor and the os is entirely written in it :) In fact, doomgeneric is created just for Soso in order to port easily.

</comment></comment><comment><USER5> Nice. Why 32bit, not 64bit? I don't program much assembler - but after seeing how much simpler (sane) 64bit is (amd64), I'd have to be really motivated to do a hobby project in 16 or 32bit (for x86). So curious about that choice in today's hw world, where you'd have to hunt for real 32bit x86 hw.

<comment><USER6> I'd like to hear from OP also. But in my experience, x86 documentation is much more wide spread and available esp regarding system startup.

<comment><AUTHOR> I chose x86 because I wanted to try the os in my ancient PCs like a Celeron 333MHz. And articles I was reading at the start was for 32bit.

<comment><USER5> That makes sense. It's been so long since I've seen a 32bit x86 (apart from single board industrial type stuff) - that I didn't really consider anyone would keep one around... Then again, we do have our old commodore vic 20 in a cupboard somewhere...

</comment></comment></comment></comment><comment><USER7> This is cool, based on the title I was expecting [http://psdoom.sourceforge.net/](http://psdoom.sourceforge.net/)

<comment><USER8> Exactly. I read the title as `A simple Unix-like operating system that runs on Doom`

</comment></comment><comment><USER9> Having lua on it is a great way to help spark more interest! Good call.

<comment><AUTHOR> Yeah, and Lua is also great at dependencies. It doesn't depend anything :)

</comment></comment><comment><USER10> Nice. Reminds me of the opengl32.dll's that were made to be only just enough to run GLQuake.

What made 4Mb pages easier than 4Kb?

<comment><AUTHOR> By using 4Mb pages, we can skip one step which is page tables.

In other words, Page Directory points directly to a 4Mb Page Frame. In 4Kb mechanism, Page Directory points to a Page Table which then points to a 4Kb Page Frame.

</comment></comment><comment><USER11> Nice work! But one question, what's up with the naming scheme? Some functions are camel case, other are not. It seems like variables are camel case, but not all of them. And types are whatever it's called when you capitalize each word, but some have underscores. What's the reasoning?

<comment><AUTHOR> Thanks! In fact, I prefer camel case for functions. You must be saying this for HashTable and List functions. I came from C++ world (where i name classes Pascal case and functions camel case). I wanted to group HashTable functions together like a class and named them that way. Yeah, it ended up being inconsistent unfortunately. I named structs in PascalCase.

</comment></comment><comment><USER12> This is awesome. How long did it take you and how familiar were you with the low-level details before you started?

<comment><AUTHOR> Thanks. I think it would take 8 months night works. But it took longer because of breaks. I was always interested in low-level stuff especially about syscalls (how they jump to kernel from userspace). So, I was familiar with syscall internals and memory protection. But I learnt all including how paging is done in x86 when I was writing Soso thanks to OSDev.

<comment><USER13> Any books or other resources you used for guidance?

</comment></comment></comment><comment><USER14> This looks like awesome work. Will be studying the source to learn about how it works. Serious code envy for people who take the time and effort to build OS'es like this.

Could see this having potential on SBCs and usage in IOT/PLC applications.

</comment><comment><USER15> That's really nice, I enjoyed reading the code.

</comment><comment><USER16> all i need, thanks

</comment><comment><USER17> But can it run Do... ...oh wait.

Cool project!

</comment><comment><USER18> Pure awesome</comment>


Riot Games sends private info of wrong account for a user's GDPR data request - <AUTHOR> https://www.reddit.com/r/leagueoflegends/comments/8ubnn3/riot_just_sent_me_account_data_of_someone_elseif/ <comment><AUTHOR> The company behind League of Legends recently opened up a ticketing service to request your account data per GDPR regulations. At least a couple people now have received account data for _someone else 's account_!

List of data included, from the support site [1]:

\- Your Summoner name, username, and

\- The phone number attached to your account

\- Your registered date of birth

\- Aggregate report history, including reports made and received, from the last 3 months. Report notes are not included.

\- In-game chat logs for the last 3 months (other player names will be redacted)

\- Login history for the last 3 months

\- Account modifications for the last 3 months

\- All store transactions (skins, champions, etc.)

\- All monetary (RP) purchases

Highlights being usernames, date of birth, phone numbers, and according to the linked post, all IP addresses.

[1] [https://support.riotgames.com/hc/en- us/articles/360001299888](https://support.riotgames.com/hc/en- us/articles/360001299888)</comment>


Be your own Wizard - <AUTHOR> http://billflagg.blogspot.com/2009/09/wizard-is-in-you.html

<comment><USER2> I am the black wizards.</comment>


To keep cities safe in the face of climate change, we need to end homeownership - <AUTHOR> https://www.thenation.com/article/california-fires-urban-planning/ <comment><USER2> I guess this means cities will not be safe.

</comment><comment><AUTHOR> And this is in _The Nation_, not some ultra-wacky publication. Wow!

</comment><comment><USER3> * delegitimize private property

* use "climate change" as excuse to ban private property/impose socialism

[Quote] If we want to keep cities safe in the face of climate change, we need to seriously question the ideal of private homeownership.

The growth of urban regions in the second half of the 20th century has been dominated by economic development, aspirations of home ownership, and belief in the importance of private property.

The valorizing of homeownership and property rights results not only in increased exposure to climate-change-fueled fires, but also in our inadequate responses to them.

* promote government planning of housing

[Quote] There has been resurgent interest in government-planned and -built public housing, including recent legislation proposed by Ilhan Omar, Alexandria Ocasio-Cortez, and Bernie Sanders that would shore up and invigorate the federal system.

* move people into cities

[Quote] In California, that would mean more than moving away from fire-prone areas.

* dispel the american dream

[Quote] Even with the threats of climate change and rampant fire looming, the ideals of the American dream that have been instilled for more than 150 years will be difficult to dispel. Those ideals have blinded us to other possibilities.</comment>


GitHub Cancer - <AUTHOR> https://medium.com/@sAbakumoff/github-cancer-180db780d99d#.4kirys4j4 <comment><USER2> "Please check .gitignore file of your project and make sure that it excludes node_modules from the files to track"

Some dependencies might use "isArray" or "leftPad", that is the reason why I commit my node_modules, it's stupid but I don't want to lose anything when someone decides to remove his code from npm or github...

<comment><USER3> I guess that is a problem with npm. Past versions should be immutable.

<comment><USER4> Absolutely, a package manager server should state in their license file that when you submit a package you consent to it being cached on said server.

Having someone remove a package and breaking a ton of other packages is nonsensical.</comment></comment></comment>


What would you do in life if money was no object? - <AUTHOR> Assuming you've got enough money to support yourself till the end of your days and then some, how would you spend your life?<p>I mean after funding all the dreams you might have initially, how would your day to day look like? <comment><USER2> I'd go back to making games. I've never had the time & money to build the concepts I've wanted to pursue.

</comment><comment><USER3> I'd work full time on my open source projects. I've got so many ideas that I couldn't complete them all in a single lifetime. Each one would take 2-3 years to complete full time, but take 4x that long with a day job.

</comment><comment><USER4> Travel a lot and hack on free/opensource software, especially KDE software.

</comment><comment><USER5> Open source projects that require no monetization or business model. I'd love to make a big open source game next.</comment>


Lessons Learned Moving from Native to React Native - <AUTHOR> https://ckl.io/?p=5334 <comment><USER2> JavaScript is dynamically typed, Swift statically typed.</comment>


How Old Is Your Globe? - <AUTHOR> http://www.replogleglobes.com/howOldIsYourGlobe.php <comment><USER2> Well, mine has Abyssinia on it, in a nice shade of pink, and a large chunks of inland Africa are just this big old white expanse with some pictures of funky looking lions. Antarctica is made of brass as there's nothing important down there.

It's 1860something, when the last bits of terra incognita were being mopped up. Like to be reminded that only recently there was still wonder and mystery in the world.

<comment><USER3> When did white spots disappear from maps? Going by my parents' off-hand comments, maps showing Africa and South America still had big white blobs in the 1960s. Eventually they were filled in with satellite maps, but when was that? 1970s? 80s?

<comment><USER4> The only one I have with a white spot is from the mid 1930s (one of the few Globes in which all of Africa, sans Liberia, is a colony). There's a white spot on the southern bit of the Arabian peninsula, just north of Yemen / N Yemen / Oman.

</comment></comment></comment><comment><USER3> > You will need the Flash plug-in to view [the products page].

How Old Is Your Website? :-)

(And the list is missing South Sudan, which gained independence 4 years ago…)

<comment><USER5> Perhaps not all globes show Kosovo as independent, but it's also missing Kosovo (2008).

[https://en.wikipedia.org/wiki/2008_Kosovo_declaration_of_ind...](https://en.wikipedia.org/wiki/2008_Kosovo_declaration_of_independence)

Wikipedia has a great list that could help in dating both other websites with this kind of information and globes. :-)

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

<comment><USER6> It's not a sovereign state at least not a recognized by the UN it lacks about half the votes it needs in the general assembly so it hasn't even been brought to the UNSC yet.

On this same note you could get claim that South Ossetia is an independent nation, and to be fair at least it has a permanent member backing it even if it's "just" Russia ;)

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

</comment></comment></comment><comment><USER7> It's rather sparse since 2000. For example South Sudan in 2011 is missing in the list.

</comment><comment><USER6> I got some island in the middle of the med that's called Atlantis on mine can you help me date this globe?

</comment><comment><USER8> Ceylon caught my eye. It's the former name of Sri Lanka as well as being the name of a cross-platform language that's currently on the homepage.

</comment><comment><USER9> Brilliant!

>Related: 13 people trying to figure out how old a globe is on Quora [https://www.quora.com/How-old-can-this-globe-be](https://www.quora.com/How- old-can-this-globe-be)

</comment><comment><USER10> 1948 for mine!

[https://twitter.com/incanus77/status/659401447830777856](https://twitter.com/incanus77/status/659401447830777856)

</comment><comment><USER11> Discussed in 2011: [https://news.ycombinator.com/item?id=2946430](https://news.ycombinator.com/item?id=2946430)

</comment><comment><USER12> Some areas are fractally similar on a smaller scale, or even more active than the world on average, think of the Spratly Islands, or the Balkan peninsula.

</comment><comment><USER13> Ha! This is a game I play pretty much every time I see a globe for sale or in someone's house.

</comment><comment><USER14> Isn't Burma Myanmar these days?

<comment><USER7> From Wikipedia: "Many political and ethnic opposition groups and countries continue to use "Burma" because they do not recognise the legitimacy of the ruling military government or its authority to rename the country."

</comment></comment><comment><USER15> My globe's so old it's flat.</comment>


An ancient memorization strategy might cause lasting changes to the brain - <AUTHOR> http://www.theverge.com/2017/3/16/14950798/memory-palace-method-of-loci-brain-fmri-activity-neuroscience <comment><USER3> There is a very interesting book on this topic - memory competitions - <USER2> book is about how ordinary people using an ancient Roman technique (Memory palace) becomes extraordinary memorizers. Moonwalking with Einstein: The Art and Science of Remembering Everything [https://www.amazon.com/Moonwalking- Einstein-Science-Remember...](https://www.amazon.com/Moonwalking-Einstein- Science-Remembering- Everything/dp/0143120530/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=&sr=)

I could pickup the technique to help me in my day to day life. For very little investment in efforts it managed to drastically improve my life.

Context: I consider myself quite challenged when it comes to memorizing numbers.

The technique described in the book (and in this article) allowed me to remember details of a financial instrument which involves 32 numbers without any pattern. Whenever I have to use this instrument I have to input random 6 numbers out of those 32. Before I discovered this technique I had to pull out the hardcopy of the instrument every time for reference (it was painful - sometime it will be not in my possession, or it would be buried inside some cabinet etc.)

The technique that I use/adapted essentially is, I use mental map of a roadway which I'm intimately familiar with to place the 32 numbers on the various 32 landmark along the way (landmarks can be anything - a funny looking rock next to the road will also do. The key is one should be able to visualize it very clearly). So, whenever I need to retrieve numbers I mentally 'drive' on the road and start checking out the landmarks. Example: I need to retrieve number corresponding to landmarks 5,9,15,20.. I start 'driving' reach landmark no. 5 and able to remember immediately this landmark is associated with number 29, then I move on and reach to next landmark, when I 'reach' that one I'm able to recollect that this landmark has number 89 associated with it, and so on…

Somewhere I read that it works so well because as a human species we have ability to remember geo spatial things much better than abstract things like numbers. I would guess that it has to do with our hunter-gatherer days when we were primarily dealing with spatial concepts; brain is hard wired to store those information much better than things like numbers.

<comment><USER4> Another good books to suggest are books written by Harry Lorayne[0]. You could also see his demonstrations in youtube. His books were published long before Moonwalking with Einstein, most of them are similar to Lorayne's system and I would recommend it for those who want to improve and train further on memorizing things.

Also for those who want a book that demonstrates the use of creating a memory palace, I would recommend The Memory Palace - Learn Anything and Everything[1]. You'll just learn the 37 plays of Shakespeare wherein almost of the descriptions were funny.

I also listen to a free audiobook Memory: How to Develop, Train and Use It by William Walker Atkinson[2].

[0] - [https://en.wikipedia.org/wiki/Harry_Lorayne](https://en.wikipedia.org/wiki/Harry_Lorayne)

[1] - [https://www.amazon.com/Memory-Palace-Anything-Everything- Sha...](https://www.amazon.com/Memory-Palace-Anything-Everything-Shakespeare- ebook/dp/B007V3FLTE/ref=sr_1_5?ie=UTF8&qid=1489937650&sr=8-5&keywords=memory+palace)

[2] - [https://librivox.org/memory-how-to-develop-train-and-use- it-...](https://librivox.org/memory-how-to-develop-train-and-use-it-by- william-walker-atkinson/)

<comment><USER5> +1 for Harry Lorayne. I learned how to memorize long lists, numbers, dates, as well as decks of cards (backward, forward, by card number or if given a card, I'd call it's number in the deck). Fun stuff, and quite useful too.

</comment></comment></comment><comment><USER6> Dumb question I've always wondered. How do you reset the memory palace? I feel like old things you stored would stick in your memory and get confusing.

<comment><USER7> I read "moonwalking with Einstein" and can relay what it said in the book about this.

You mentally walk through your memory palace and clean it out. You walk through every room and look at every nook and cranny and imagine them clean.

As far as I understand you don't do this every day, but every once in a while or before competitions.

<comment><USER8> This sounds analogous to a stop-the-world GC. I wonder whether it's possible to construct a method for dealing with memory palaces that is more analogous to a non-stop-the-world GC?

<comment><USER9> If you can figure out how to have two active conscious thoughts simultaneously, please share!

<comment><USER10> Learn to play and improvise on a polyphonic musical instrument.

[http://www.radiolab.org/story/301427-head-full- symphonies/](http://www.radiolab.org/story/301427-head-full-symphonies/)

</comment></comment></comment></comment></comment><comment><USER11> Some good resources for beginners: [https://mullenmemory.com/](https://mullenmemory.com/) [http://artofmemory.com/](http://artofmemory.com/)

You can't just imagine something and remember it forever, combine mnemotechniques with: [http://www.retrievalpractice.org/](http://www.retrievalpractice.org/) [https://www.supermemo.com/en/articles/20rules](https://www.supermemo.com/en/articles/20rules) [http://rs.io/anki-tips/](http://rs.io/anki-tips/)

<comment><USER12> Thanks for the mention. :)

If anyone is near SF you can learn how to do the techniques (free) at our memory club: [http://artofmemory.com/sf](http://artofmemory.com/sf) and train for our upcoming memory championships (SF Bay Area and internationally) at [https://memoryleague.com/](https://memoryleague.com/)

</comment></comment><comment><USER13> Source study without The Verge garbage-ification

[http://www.cell.com/neuron/abstract/S0896-6273(17)30087-9](http://www.cell.com/neuron/abstract/S0896-6273\(17\)30087-9)

</comment><comment><USER14> Memory palace tutorial: [http://artofmemory.com/start](http://artofmemory.com/start)

<comment><USER15> How easy is it to reuse the memory palace?

Ultimately I'd like to use this technique to remember played cards during a card game. I can remember most cards quite easily, but often when it comes to the last 3-8 cards, I can't be 100% sure what they are.

Though I'm not sure it's worth my time. I already remember more cards than my usual opponents.

<comment><USER3> Think remembering birthdays is difficult? Try memorizing two decks of cards in five minutes or less. That is what Joshua Foer did to win the 2006 U.S. Memory Championship...

"Moonwalking With Einstein" does just that: It takes the reader on Foer's journey from memory novice to national champion.

[http://www.salon.com/2011/03/06/foer_moonwalking_with_einste...](http://www.salon.com/2011/03/06/foer_moonwalking_with_einstein/)

<comment><USER16> even the opening of the article is misleading. memory palace is great for silly memory competitions but I've never seen anyone mention they used it to remember birthdays.

<comment><USER11> I'm using it for that, I have database of all my friends and family. You can use memory palaces for everything. Just remember that you need to use spaced repetition as with every other thing you want to know forever.

<comment><USER17> How do you structure it? Do you have a palace ordered by months/dates with people placed in?

<comment><USER11> No, I have these people standing in locations on the journey. Each person have information stored in parts of their bodies. Place for scenes encoding birthdays is on their heads, I need to "zoom" there to see it. E.g scene on my girlfriend's head: Joanna Jędrzejczyk (01) is standing in the heap of chestnuts (october), while Adam Nowak (19) is stomping dynamically (71) on something. I'm using PAO ( [http://artofmemory.com/wiki/Person-Action- Object_(PAO)_Syste...](http://artofmemory.com/wiki/Person-Action- Object_\(PAO\)_System) ) with Dominic System ( [http://artofmemory.com/wiki/Dominic_System](http://artofmemory.com/wiki/Dominic_System) ) which gives me ability to store up to 6 integers as one image, but I encode months symbolically and not as numbers.

</comment></comment></comment></comment></comment></comment></comment><comment><USER18> I started practicing the method of loci when I was in Toastmasters. Over the course of a year, I went from literally reading my entire speech off of paper, to speaking without any notes at all. That one change made an unbelievable difference in my confidence and helped turn me into a pretty damned good public speaker.

I highly recommend it to anyone who dislikes doing presentations.

<comment><USER19> how do you apply this technique to speeches? Like, what do you store in the locations? Topics, or whole sentences?

<comment><USER17> Key ideas of the speech.

Some people remember transition phrases but that never seemed helpful for me.

In the end spend time remembering a few core ideas and practice the speech freely a few times.

I actually don't write speeches anymore - i just think of a rough structure and practice until i get through it in a way i like. Then refine beginning and ending, make sure the core ideas are clear to me - and it's in my head for a while. Means I'll never give the same speech twice, but it's also more fun for me as i learn new things/ideas while speaking :)

</comment></comment></comment><comment><USER20> From PGP's Passphrase FAQ:

> _" Shocking nonsense" means to make up a short phrase or sentence that is > both nonsensical and shocking in the culture of the user, that is, it > contains grossly obscene, racist, impossible or other extreme juxtaposition > of ideas. This technique is permissable because the passphrase, by its > nature, is never revealed to anyone with sensibilities to be offended._

[https://www.unix-ag.uni-kl.de/~conrad/krypto/passphrase- faq....](https://www.unix-ag.uni-kl.de/~conrad/krypto/passphrase-faq.html)

</comment><comment><USER21> Interesting, Whenever i have trouble understanding an algorithm/code its usually because of not being able to remember what everything does. It usually not a due to a lack of logical reasoning.

<comment><USER22> As much as I disliked my time spent with perl several decades ago, the terseness did allow for some impressive "stunts" due to the amount of moving parts one ~80x40 window of code could present to the coder.

God help anyone trying to read that stuff after the fact.

</comment></comment><comment><USER23> > one group was trained in the method of loci, and they practiced using an > online course for six weeks, 30 minutes per day.

Does someone know if the course referred to in the article is available to anyone?

<comment><USER12> You can train with the techniques at [https://memoryleague.com/](https://memoryleague.com/)

Start with "images" by linking each image to the next one to form a story, and pick up the techniques for the other disciplines at [http://artofmemory.com/start](http://artofmemory.com/start)

<comment><USER24> Wow, this is why HN is awesome. Just wanted to say thanks for Art of Memory! It's helped me a lot, especially the discussion forums.

<comment><USER12> Thanks for mentioning the site, and glad to hear that it's useful. :)

</comment></comment></comment></comment><comment><USER25> I kind of used that technique when I was working as sales for small gastronomy single-use plasticware.

I went to a customer without notepad, he was telling me what he needs like 20-30 items with amounts, and the way I was able to remember that list was because at the time person was telling what he needs I was imagining place in the truck where I had what he needed.

So only reading that story I realised that I was using some technique that I never heard before.

</comment><comment><USER26> I enjoyed Moonwalking with Einstein, but I felt that it was more story than technique.

I found [Unlimited Memory]([https://www.amazon.com/Unlimited-Memory-Advanced- Strategies-...](https://www.amazon.com/Unlimited-Memory-Advanced-Strategies- Productive-ebook/dp/B00I3QS1XQ)) a nice follow-up to the former.

</comment><comment><USER27> Nearly any habitual task causes "lasting changes to the brain". Plasticity is not only real, but normative.

<comment><USER28> This is true. Indeed, the true question usually revolves around transfer. That is, as your brain changes in response to a certain memory task (e.g. recognition of visual objects) to get better at it, will those changes transfer benefits to other types of memory tasks (e.g. recall of visual objects), or tasks which have a memory component (e.g. navigation).

Transfer has been the bane of most cognitive training paradigms. Improvements are seen in the same task, but do not seem to transfer to conceptually related tasks. One idea to overcome problems in transfer has been to identify tasks which inordinately rely on core cognitive processes of memory (e.g. recollection vs. familiarity; Yonelinas, 2002), or relational binding (Konkel & Cohen, 2009). Another idea might be to train using memory strategies, like loci. Typically that research looks to whether using a particular strategy benefits memory, and frequently, does that strategy work in a particular population with poorer memory (e.g. children, adults with Alzheimer)

<comment><USER17> Very interesting. Did these ideas bear fruit?

<comment><USER28> I diverted my attention to lower hanging fruit in my Ph.D., so stopped following that literature closely. Overall I think that unless you already exercise regularly, exercising will have a larger effect on cognitive ability than any task-based cognitive training regimen.

</comment></comment></comment></comment><comment><USER29> On a dofferent note this story is on the front page from past several days even though it has only 49 points as of now.

</comment><comment><USER30> How unusual :) I'm reading Conceptual Blockbusting, based on the recommendation in programming pearls (another great book btw). It just walked me through the method of loci technique as a demonstration of using long term memory.

</comment><comment><USER31> Does this explain why it's easy to remember complex concepts using analogies as we're mapping new ideas to something we're familar with?</comment>


Professional gamer explains why League of Legends has nothing to fear from DOTA - <AUTHOR> http://venturebeat.com/2012/01/15/professional-gamer-explains-why-league-of-legends-has-nothing-to-fear-from-dota/

<comment><USER2> Good really like it</comment>


Wages Up, Prices Low: Shake Shack's Food for Thought for the Fed - <AUTHOR> http://www.nytimes.com/2015/12/03/upshot/wages-up-prices-low-shake-shacks-food-for-thought-for-fed.html <comment><USER2> Did I miss it, or does this article not make clear what they _are_ planning on doing to offset the increased cost? Are they switching to cheaper ingredients or reducing portion sizes? Closing locations that underperform? Reducing hiring? Or are they really just going to take the reduction in profits?

<comment><USER3> The article just keeps quoting executives saying that they will "manage through it".

<comment><USER4> So they don't fully understand the repercussions I assume. Why else would there not be a straightforward answer to the inevitability of economics.</comment></comment></comment>


Access Logs for Elastic Load Balancers - <AUTHOR> http://aws.typepad.com/aws/2014/03/access-logs-for-elastic-load-balancers.html

<comment><USER2> very cool, shame you can't stream them via syslog or scribe or something though. would love to just pipe it straight into kinesis.

<comment><USER3> Cool idea; I'll pass this along to the team ASAP.

<comment><USER4> To be able to consume incoming data in a streaming fashion it would be great if the ELB could publish to an sqs queue for every uploaded file to s3, to eliminate polling s3.

<comment><USER4> Correction, it would publish to a sns topic that could multiplex to sqs queues ;)</comment></comment></comment></comment>


How to Increase Your Page Size by 1,500% with Webpack and Vue - <AUTHOR> https://css-tricks.com/how-to-increase-your-page-size-by-1500-with-webpack-and-vue/ <comment><USER2> My favorite quote from the article:

"As a side note, the next time you think about refactoring something, don't. Just leave it alone. If you don't leave any technical debt for the next generation, they're going to be extremely bored and that's going to be on you."

</comment><comment><USER3> TL;DR (hopefully I'm getting this right): the issue was that Vue.js creates scoped styles, and because the Sass styles were imported into every VueJS component, it rendered (and duplicated) the CSS in every component at runtime.

</comment><comment><USER4> I like Vue, but I don't like aggressive webpack+babel pushing.

What's the use of a module loading/splitting script that ends up with net increase of your bundle over non compresses/pruned JS _every_ time?

</comment><comment><USER5> Cute article.</comment>


Show HN: SCUNM-Text adventure engine. I was having fun while learning JavaScript - <AUTHOR> https://github.com/jlvaquero/SCUNM <comment><AUTHOR> As requested by nailer. Here you are a video of the demo:

[https://youtu.be/DKBtBOK7imI](https://youtu.be/DKBtBOK7imI)

</comment><comment><USER2> This is cool but would be more HN-worthy if you added a video!

<comment><AUTHOR> Done ;)

[https://youtu.be/DKBtBOK7imI](https://youtu.be/DKBtBOK7imI)</comment></comment>


An alternative view of keyboard layouts - <AUTHOR> http://harishankar.org/blog/entry.php/an-alternative-view-on-the-whole-keyboard-layout-business

<comment><USER2> My experience exactly.

On a related note, I never understood how anyone could touch-type comfortably on a non-ergonomic keyboard. The keys are slanted in the same direction for both hands, even though the hands are naturally at different angles. For the right hand it works great, both for the left, the finger will run into its left neighbour when hitting a key above home row (e.g. R), and into its right when hitting below (C).

<comment><AUTHOR> Thanks for the feedback. I personally find touch-typing awkward. On the other hand, without touch-typing, most of the analysis of non-qwerty layout does not make much sense from the POV of hands and finger usage.</comment></comment>