Ask HN: The government has been exposed now what? - <AUTHOR>

We now know that our rights and privacy are being violated. What are the next steps? How do we protect and defend ourselves? <comment><USER2> There is a model for people winning freedom when they never had it before. It has been applied in some countries. It takes courage and solidarity, but people power can gain freedom. The most thoughtful writer on the model that works is Gene Glass of the Albert Einstein Institute. The institute has several different publications available for free download in multiple languages,

[http://www.aeinstein.org/organizationsde07.html](http://www.aeinstein.org/organizationsde07.html)

among which I especially recommend _From Dictatorship to Democracy: A Conceptual Framework for Liberation_

[http://www.aeinstein.org/organizations/org/FDTD.pdf](http://www.aeinstein.org/organizations/org/FDTD.pdf)

as a how-to guide for gaining freedom even when the dictators are willing to torture and kill to limit freedom. (I have seen one country make a successful transition from dictatorship to democracy largely by following this conceptual framework.)

</comment><comment><USER3> You can fight and win. The government is not omnipotent. Just don't expect to run a company under the protection of the government.

1\. Use Linux or a similar OS and use full-disk encryption. Truecrypt has a hidden os function built in ([http://www.truecrypt.org/docs/?s=hidden- operating-system](http://www.truecrypt.org/docs/?s=hidden-operating-system)). Maybe the government knows how to crack it, but they won't for bring it out for minor things like kiddy porn, drug trafficking, lone-wolf terrorists. The only time this gets used is when there is a suitcase nuke en-route to DC.

2\. The USA lost in Vietnam. The USA/British Empire/USSR have lost in Afghanistan. With the support of the local population, the army is useless to stop revolutionaries.

The population is not going to care about government crimes until the government is shooting people/turns off cellphones&tv&internet. When that happens you have what happened in the Middle East and might happen in Turkey.

</comment><comment><USER4> What most people are missing here is that the average American a) doesn't care b) doesn't actually know what their rights are c) is happy to allow this in the name of "anti-terrorism."

Seriously, step away from the internet/reddit/HN/blogs and go out on the street and talk to an average Joe/Jane about where this ranks on their priorities.

People who think there will be a "revolution" over something like this are seriously misguided. Revolutions happen when people are _hungry._ The average American is _not_ starving and will never be rioting in the streets over phone records.

</comment><comment><USER5> They've got the will and the power to do these things and frankly there's probably not much we can do about it. The key thing to do is to realize that the Constitution was the mistake that gave them their power. When they collapse under their own weight, remember the lesson and start listening to the folks with the ideas about how to provide services to the community (roads, security, etc.) without a government to manage it and without waiving your property rights in the process.

</comment><comment><USER6> We cannot. Ultimately, it boils down to the sheer audacity of the government and the fearful (and sometimes, falsely patriotic) apathy of our fellow citizens. We here on Hacker News are progessives who believe in liberty, freedom, choice, and equality for everyone.

Unfortunately, outside of our little bubble here online, the rest of the world is not the same. There are still millions of citizens, blissfully unaware, perhaps due to either ignorance or fear. Our job now is to educate these people and teach them that the government is an entity to be trusted no longer. No longer will elections entail cheering on corrupt candidates who break promises regardless of the political side they take. No longer will our citizens stand helpless as the entrenchment of totalitarianism continues perpetually. No longer will we be a slave to the whims and fancies of our government.

It's time the government worked for _us_. I think the bozos in command have all but forgotten that they are nothing but _LOWLY_ _SERVANTS_ , not saints who can deliver promises and change set upon a lie. We need to change that. Call your senator. Email your legislature. Tell them your utter dissatisfaction with this issue. Tell your relatives. If they say they don't care, follow them around everything they do and ask if they like that. If they don't, tell them this is what the government is secretly doing. If they still don't, repeat.

Tell your friends, your relatives, your brothers and sisters, to stand up to the oppressive government. Don't be hotheaded; now is not the time for mercurial emotion. Now is the time for reason. If your congresspeople cooperate, good. If they brush you off, say "fuck you" and hang up (I'm being blunt here), and vote for a third-party candidate the next time round.

We can make a difference. We will defeat the Empire, the evil, dark Empire founded by a father whose progeny has gone to the dark side.

Let's do this shit.

<comment><USER7> Sorry, but you cannot and should not fight. The asymmetry in power is too great. The last thing you want to do is find yourself labelled as a "troublemaker" or (worse) as an "enemy". The state has an almost unlimited capacity to ruin the lives of those whom it targets. The best, safest thing for us all is to keep quiet, stay out of politics, and learn to think carefully about what we say or do _before_ we say or do it. If you start to act aggressively, then you run the risk of putting yourself (and the entire community) in danger. I repeat again (for emphasis): Challenging the agencies is a sure-fire way to get yourself and those around you into a whole world of trouble. Do not do it. Do not even think about doing it:- just keep your head down and keep quiet - for all our sakes.

<comment><USER8> The only possible outcome of such behavior is a worsening situation. How is that defensible?

Nothing risked, nothing gained.

<comment><AUTHOR> Agreed. The only way for change is to thrash and thrash hard.

<comment><USER9> That sounds very violent...</comment></comment></comment></comment></comment>


You can't get entangled without a wormhole - <AUTHOR> http://www.tgdaily.com/space-features/82309-you-cant-get-entangled-without-a-wormhole

<comment><USER2> Yesterday's discussion: [https://news.ycombinator.com/item?id=6867638](https://news.ycombinator.com/item?id=6867638) (mit.edu)

Other sources of the same story:

[https://news.ycombinator.com/item?id=6771435](https://news.ycombinator.com/item?id=6771435) (aps.org)

[https://news.ycombinator.com/item?id=6843048](https://news.ycombinator.com/item?id=6843048) (wired.com)

[https://news.ycombinator.com/item?id=6843958](https://news.ycombinator.com/item?id=6843958) (sciencemag.org)

[https://news.ycombinator.com/item?id=6855635](https://news.ycombinator.com/item?id=6855635) (phys.org)</comment>


Ask HN: What code editor do you use? - <AUTHOR>

<comment><USER2> I use a combination of notepad++, webstorm 4.0 and visual studio 10 with resharper 6.0

</comment><comment><USER3> When I'm not in IntelliJ, I'm using Vim. I prefer vim as an editor, but I much prefer IntelliJ as a code organizer.

I know vim and *ix pretty well, but I frankly like that I don't have to spend time looking up or memorizing how to do an occasional task when a well- organized hierarchical menu will do it for me.

I don't get paid to fiddle with my coding environment, and I don't mind outsourcing that process to someone who is thinking hard about how to make my life easier. I am not creating additional value for my startup by playing with a few extra plugins to do what an IDE does more efficiently.

</comment><comment><USER4> Sublime 2 baby, never felt so happy while writing code :D Maybe it's just the default color scheme, or the code overview, or (most of the time) nicely working code completion.. it just 'feels' right!

</comment><comment><USER5> Previously Vim (MacVim actually) but been giving Emacs a world to expand my understanding if nothing else. Same with Sublime Text 2 albeit a bit less since others who were on the Vim/Emacs side have starting praising it so giving that a bit of a world too.

</comment><comment><USER6> Komodo edit or gedit. I usually switch between the two.

</comment><comment><USER7> Xcode for Objective-C. Chocolat.app for other stuff. MacVim for opening files quickly/temp stuff.

</comment><comment><USER8> Sublime Text 2 on Windows and Linux.

My secret shame is that when in CLI on Linux, I use nano.

</comment><comment><USER9> Mostly Sublime 2.

I am learning Vim because I am tired of paying for text editors.

</comment><comment><USER10> Vim with a few plugins(snipmate, supertab, vim-powerline, nerdtree, command-p).

</comment><comment><USER11> Eclipse for Java, Eclipse or Chocolat.app for Python.

</comment><comment><USER12> TextMate /rails-guy

</comment><comment><USER13> Eclipse/notepad++

</comment><comment><USER14> Sublime Text

</comment><comment><USER15> Netbeans

</comment><comment><USER16> vim/Sublime Text.

</comment><comment><USER17> Emacs.

</comment><comment><USER18> vim/Sublime Text

</comment><comment><USER19> JOE

</comment><comment><USER20> vim</comment>


Date and Time Manipulation – You're probably doing it wrong - <AUTHOR> https://3-screens.com/2016/date-time-manipulation/ <comment><AUTHOR> If anyone is getting blocked, you can read it here: [https://gordol.github.io/date_time_manipulation.html](https://gordol.github.io/date_time_manipulation.html)</comment>


Iframe + Polling = Cookie Fight - <AUTHOR> http://tech.picklive.com/2011/08/23/iframe-plus-polling-equal-cookie-fight.html

<comment><USER2> Just above iframe and ajax it needs to say memcache/queue/additional check and you will be fine. Seriously - it's not an architecture problem here, just a way of figuring out how to make your code aware of changes outside of its process.

Edit: forgot to mention - think about your worst case before/while you design and you will then have a problem in yours hands down the track that says - 90% of visitors do A (subset of B) and my design caters for B. How do I optimize for A?

Instead of - my design caters for A, but a fair few do B - how can I extend A cater for B?

Architects - agile, waterfall, whatnot - they can help you with this!</comment>


Policy Driven Storage for Datacenter Operating System - <AUTHOR> https://mesosphere.com/blog/introducing-policy-driven-storage-for-dc-os/ <comment><USER2> Is this CSI based?

<comment><AUTHOR> Yes. Mesosphere storage team participated heavily in developing CSI and DSS (the storage service) leverages it.</comment></comment>


French actor Gérard Depardieu, fighting 75% income tax, gets Russian citizenship - <AUTHOR> http://www.theglobeandmail.com/news/world/actor-gerard-depardieu-in-france-tax-fight-gets-russian-citizenship/article6890886

<comment><USER2> Depardieu brought France a lot of money from international markets, not to mention fame and culture. And he gave a lot of fun and joyful moments to millions. Much, much more good than the French bureaucracy which this super- extra tax is supposed to fund.

</comment><comment><USER3> The 75% tax is definitely punitive. I am a huge Francophile but the French are so frustrating, always missing the difference between the symptom and disease.</comment>


LXC 1.0 blog-post-series (2013) - <AUTHOR> https://stgraber.org/2013/12/20/lxc-1-0-blog-post-series/ <comment> nevi-me If you run your own infra, LXC/LXD is invaluable when you want long-term stateful containers (e.g. to run databases on).

If like me, you started using LXC around the time of the 1.0 blog-post series, and are stuck with 14.04LTS containers, this guide [1] is useful to help you upgrade the container.

[1] [https://www.cyberciti.biz/faq/upgrade-update-lxd- container-u...](https://www.cyberciti.biz/faq/upgrade-update-lxd-container- ubuntu-linux/)

</comment><comment><USER2> That's from 2013, what's the current state of affairs?

<comment><USER3> We're now at LXC/LXD version 3.x. Using LXD (LXC container orchestrator) is a breeze, with better and more polished UX than Docker, IMHO. Then again, LXC/LXD is more of an alternative to VMs than to Docker.

</comment></comment><comment><USER4> Is there a comprehensive resource for LXC based dev environment? There was LXDock which went unmaintained and had several bugs leaving me with Vagrant.

</comment><comment><USER5> If I want to learn Docker/containers, would it be beneficial to go through this? Will it enhance the background learning or do I need to go through this?

<comment><USER6> Not really. You could rather learn the underlying operating system concepts such as namespaces or cgroups directly.

<comment><USER7> Bocker is a good resource to learn what containers actually are: [https://github.com/p8952/bocker](https://github.com/p8952/bocker)</comment></comment></comment>


Do Enormous Magnets Affect the Human Body? (1983) - <AUTHOR> http://www.nytimes.com/1983/02/22/science/do-enormous-magnets-affect-the-human-body.html

<comment><USER2> The answer is obviously yes, Google for "Peripheral nerve stimulation", this is old stuff, any magnetic flux cause by the field changing or the person moving can generate a current, possibly with an enormous magnet high enough to be barely felt. I've occasionally wondered about those magnetic EMP bombs that are only semi-declassified, the superconducting rings, would it be possible to be close enough to feel the magnetic flux without being vaporized by the charge that sets it off? Probably not, but its interesting to think about.

Magnetic effects on biology suffer pretty badly from the same problems as radiation and RF. Terror / hatred of what isn't understood (which is usually a lot), lack of understanding about orders of magnitude, lack of understanding that being able to calculate something doesn't imply it means anything aka the astrological effect, binary thinking about safety and danger...

This is aside from the obvious physical dangers. I've ended up with band aids due to shattering magnets, luckily never anything worse.</comment>


TCP is UNreliable - <AUTHOR> http://www.cliffc.org/blog/2013/08/15/tcp-is-unreliable/

<comment><USER2> I voted this up (tried to submit, actually), but is this article correct, or is something in this person's stack not actually programming sockets correctly?

When you call shutdown() to arrange a FIN for a socket, especially after you've sent data and received no application-layer acknowledgement, you're supposed to verify that the connection closed properly. You do this by select()ing on the socket and then read()ing 0 bytes.

The error condition (the RST segment they're getting) is signaled by the "Connection closed by peer" errno --- and -1 from read().

The reliability signals this app needs are built into both TCP and the socket programming interface, from what I can tell. The application-layer acknowledgement it wants appears duplicative.

<comment><USER3> Without looking at the code, it's hard to say, typically errors like the one described won't be caught by return values of read/write, but by return values of close() -- which many many people don't bother to check. (Not saying that's what happened, but that's my bet)

<comment><USER2> Did they close() the socket? If you write data to a socket, and receive no signal that it's been processed, shouldn't you shutdown(2), select(2), then read(2) before you close(2) it?

</comment></comment></comment><comment><USER4> This doesn't sound like a TCP problem.

Mistake #1: The sender optimistically sends a first packet before getting a SYN reply. That implies that the sender issued a non-blocking connect, and then wrote without waiting for the connect to complete. Otherwise, the sender (kernel) wouldn't have any data to send right away.

Mistake #2: The sender sends a FIN, but doesn't block because all data has already been acknowledged. This is supposedly a problem because the app never receives the data, but a TCP ack has _never_ meant that data got beyond the receiving kernel to an app.

So yes, it's true that neither side ever got an error and unfortunate that it's possible for the receiving app to get no data in that case, but that doesn't make it a TCP problem. Somebody at a higher level - JVM or the app itself - over-optimized their "connection and first data" code without understanding the actual behavior of the TCP protocol and socket API. Then they "fixed" it by working with their own protocol instead of against the standard one.

Nothing to see here. It was just a false alarm. Move on.

<comment><USER5> It's not a TCP problem. It's a problem with the linux implementation of TCP.

<comment><USER6> No, it's not even that. The linked article ([http://www.cliffc.org/blog/2013/08/15/tcp-is- unreliable/](http://www.cliffc.org/blog/2013/08/15/tcp-is-unreliable/)) at the bottom tells you what's actually going on.

The only thing slightly fishy is that the peer application didn't receive any connection attempt, but if you're anyway quite overloaded, e.g. running out of file descriptors, that may well happen.

<comment><USER7> I still don't get how this can happen as described. If the client is using a blocking connect and checking for errors (as the author says it is), I don't see how that can succeed without the remote side at least seeing the connection. As you say, the receiver could be overloaded and ignore the connection, but the client should get a connect failure in that case.

<comment><USER6> The remote kernel sees the connection fine. It accepts it, receives the data, the client closes its end. What might not happen is, in a very resource strained condition, is for the remote application to get the data. There's no relation between you doing a connect() and the remote doing an accept() in TCP, it's handled asynchronously by the kernel. (Traditionally the backlog argument to listen() controlled this behavior, but that backlog argument is by and large ignored on modern operating systems)

The caveat here is that you close() the socket when you're done. close() does not, by default, wait until the remote end also closed its end. In the scenario described above, the remote end would eventually signal an error, but if you shoved the data into the remote kernel buffers, close and forget about that connection, your app will never see that error.

</comment></comment></comment></comment></comment><comment><USER6> Note that he links to [http://blog.netherlabs.nl/articles/2009/01/18/the- ultimate-s...](http://blog.netherlabs.nl/articles/2009/01/18/the-ultimate- so_linger-page-or-why-is-my-tcp-not-reliable) which more or less explains what's going on.

</comment><comment><USER8> Interesting! One thing that I don't understand (which might be a little off- topic): If it's an RPC call, shouldn't there be a response for each RPC request to ack that the RPC request is well processed by the application layer? Otherwise how do you make sure the application layer won't screw up? How do you notify the client that the request is not invalid?</comment>


Walk Away From Your Computer. Seriously. - <AUTHOR> http://kcurtin.squarespace.com/home/2011/9/24/walk-away-from-your-computer-seriously.html <comment><USER2> He's right, the "walking away" trick does work wonders some time. It gets you to relax, take a step back, and see the big picture.

The other aspect to this is reliance on Google. This is part stood out to me...

      I start to panic a little bit...I turn to google hoping
      for a quick fix and copy/paste one of my error messages
      into the search box.

Unless Ruby/Rails error messages these days are completely anemic (I haven't worked with Rails in a while), then the line number and error message should provide enough clues to debug a misspelling without having to go to Google.

Trust your analytic abilities -- it will keep you from that "panic" state.

Instead of seeing an error and panicking, be like Stanley Moss in _Wag the Dog_ \-- "This is nothing" :) Eventually you'll get to a point like Paul Graham where debugging relaxes you:

      I like debugging: it's the one time that hacking is as
      straightforward as people think it is. You have a totally
      constrained problem, and all you have to do is solve it.
      Your program is supposed to do x. Instead it does y. Where
      does it go wrong? You know you're going to win in the end.
      It's as relaxing as painting a wall.

Source: <http://www.paulgraham.com/hp.html>

</comment><comment><USER3> When I first started programming, I wasn't able to do this. Walking away meant I kept thinking about it. Trying to go to bed was impossible. I -needed- to solve the problem before I could sleep.

Now, if I get frustrated, I'm much more likely to walk away and do other things and come back with a fresh mind later. It has almost always been helpful.

<comment><USER4> This is _exactly_ what I came to say. I usually end up cooking food.

</comment></comment><comment><USER5> I have lost track the number of times where my coworkers and I will be pounding our heads on our desks for hours to find a solution to a problem, only to find the solution in the middle of a bathroom break.

Walking away is critical to any creative process.

</comment><comment><USER6> I completely agree with this, countless times it has been variables with the slightly wrong name, or forgetting to upload on filezila, or one of many small mistakes that afterwards seem obvious but cause a lot of frustration.

One comment that I saw on the original thread was talking to people. I wanted to highlight this because it has helped me more times than anything else. Even explaining step by step what my program should do to my girlfriend, who has very little computer expertise in general and usually gives me a blank stare, can help a lot.

I remember finding an image on reddit a while back of a programmer laboring over his code for hours only to find a greater than which was supposed to be a less than sign, my thought was 'a mistake we will all learn again and again'.

</comment><comment><USER7> Two things to add:

1\. As one of the article commenters pointed out: "git diff". Seriously.

2\. One of the best things I ever did was to buy a weight bench/barbell. When I do my twice-an-hour "walk away for five minutes" routine, I go and do 20 bicep curls or bench presses. I solve problems faster and also improve my health/strength. Win/win!

</comment><comment><USER8> Um, very true, but this would also be a sign that they need to read their stack traces / test outputs, and probably try a debugger.

Seriously. Debugger. For tests, it's as simple as `gem install rdebug` and put `debugger` in the failing test(s). When it stops on that line, type `eval instance_variables`, and viola - your array contains "@microposts" and not "@micropost". Running it against a full Rails application, especially with, say, Passenger, is a bit trickier, but it's still worth the initial effort.

<comment><USER9> Thanks for the tip. I'll plan to cover this technique in the next version of the Rails Tutorial.

</comment></comment><comment><USER10> Tangential to the main point:

The OP just learned a valuable lesson in what computers actually do. The single char oops is usually programmers' first insight into what it really means when we say "computers do exactly what they are told nothing more or less". This is one of those things we all have had frustrate us to no end. Similar mistakes abound, and are one of the those things that cause a lot of people to give up on the programming thing all together. Here's a real kicker about it: they don't stop with experience, we just get better at noticing them faster.

For example about 2 years ago -- 5 years into a programming career and 12 years into programming in general, I had this code give me trouble:

       // C Code:
       if (test_fails)
         do_crashy_thing();

So I decided to throw a quick printf in there (the situation was such that learning the debugging tools available to me would take a couple weeks, so printf was my quick solution here). I should note that I hade been working heavily in python for the preceding 3 months. My code looked like this now:

       // C Code:
       if (test_fails)
         log("info about test");
         do_crashy_thing();

Which caused my code to crash _every time_ instead of sometimes. C coders will know that multi-statement conditionals need to be wrapped in { } but single statement ones don't. Further python if statements are indent scoped. The recent python work sort of made me blind to the problem in the code. After 3 days of WTFing, talking to the rubber duck, and so on, I called over a colleague and he pointed out the mistake in something like 40 seconds. A younger me would have been embarrased, but this just happens in programming.

My point is: these things happen, and I'm glad to see a blog post about this, without the demoralization that normally comes with it. I think it should be more openly discussed in tutorials and other newb oriented posts.

A few tips for anyone who is experiencing this sort of thing and not sure what to do:

Get a rubber duck (or whatever) and start employing the rubber-duck debugging technique: <http://en.wikipedia.org/wiki/Rubber_duck_debugging> it really helps!

Be willing to include colleagues early and often. Experienced programmers understand and won't think less of you. Doubly so if you are new. (The will tease you a bit about it, but in that shared experienced bonding way, not in the "mock the outsider" way).

Realize that as you are chasing the bug by getting down and dirty with other bits of the program, you aren't wasting time, you are most likely fixing other bugs that would have otherwise just manifested later anyway.

<comment><AUTHOR> Are there any tell tale signs that help you notice these types of bugs faster? I am learning Ruby on Rails but I assume there is some type of continuity with how this rears its head between languages.

I will definitely experiment with the tips posted above - I am learning Github which could be useful for this I think, but do you recommend any simple tools for showing someone who is remote your code? The issue with copy/pasting is figuring out which code is relevant to show someone.

Thanks for your insightful comment.

<comment><USER11> To echo one of the comments on the linked post --- it is because of bugs like this that I am a firm advocate of languages with strong static checks.

A few claims: * no matter how good a programmer you are, you will make stupid mistakes (such as typos, as in the case of this article) every now and then. * it is statistically inevitable that you will make many such errors in a large code base. * bugs are easier and cheaper to fix the earlier you catch them; the best time to catch a bug is before the code is paged out of a programmer's brain. * it doesn't take too many experiences of discovering a typo bug in your "production" code base before you realize there must be a better way.

My personal approach is the following: * restrict the use of untyped scripting languages to pieces of code that can fit in one screen or so; that is, just small enough that you can keep all of the moving pieces in your head at once. * as much as possible, use languages and tools that provide strong static checks for larger projects. This includes language type systems (e.g., Scala, OCaml, Haskell, etc.) and tools that help you check your code (Prefix/Prefast, Coverity, Findbugs, etc.) * testing is good, but static checks are far better.

Unfortunately these opinions don't match common practice in the web programming world.

<comment><USER12> s/types/predeclaration/ and I 100% agree. I'm not a huge fan of Perl, but strict mode is something I really miss when working in Python/PHP/Ruby/Lua.

</comment></comment></comment></comment><comment><USER13> I'd say this wasn't counterintuitive nor particularly abnormal.

Sometimes you can, for whatever reason, get so close to something - a project, a situation, a problem, a case, etc. - that you get tunnel vision and fail to appreciate the bigger picture. That's just a product of focus, determination, and ambition, I think.

Once you step out of that tunnel and focus on something else, you can release the frustration you had before and return to the problem with a clear mind and even a totally fresh outlook.

The problem doesn't matter as much as your own wellbeing, so there's no point in stressing yourself out over one when there are million other things you could be doing. Such a laid back approach may allow you to be more productive, hence in that case it would be intuitive.

</comment><comment><USER14> The comments reading seems to diverge from the main post, but was fun reading anyway.

When I face the same problem and when my head is full of all the noisy - "why is this thing not working, I think I did everything right" s

\- I stroll around, walk a mile or two \- have some coffee there at some store \- look at the people there and think - 'what is running on their mind? Not a buggy code,I guess' \- and then come back, stare at the screen and voila! there it is! An insignificant pesky ';' was missing!

So, yes, walk away from your computer. What you and your computer have is a relationship and you need to spend some time apart to realize what you're missing in there.And to get it to work. ;)

</comment><comment><USER15> I, like the rest of the commenter's here, do certainly agree that a break can be all you need. However, I think the OP is missing a valuable lesson, which is that not only should they focus on getting the code to work they need to understand what was wrong and importantly - how to spot the symptoms that it was wrong. In this case, it was a misnamed variable. It's great that that's been fixed, but it's very easy to go hurtling on into the next problem. A few minutes of reading the error message again (and perhaps trying to cause it somewhere else in purpose) goes along way in building up a much more reactive way of working.

<comment><USER16> Also the process showed him his lack of knowledge very clearly: He can't read error messages. This is an useful skill in every language although it transfers not at all to any other activity (even reading compiler messages of a different vendor). Especially since this was a common error it is important to realize it early and fast. You just can't go to sleep every time you have a typo. OP only sees the immediate solution (insofar just waiting for a flash of genius counts as a solution) but no the actual error.

</comment></comment><comment><USER17> Absolutely valid.

When I'm doing something difficult, nothing is more important than giving my subconscious some time to work out a problem.

<comment><AUTHOR> I'd be interested to learn more about the psychology behind this and why our minds work this way..

<comment><USER18> Physically stepping backwards increases cognitive function. <http://psycnet.apa.org/psycinfo/2009-06873-006> (full PDF [http://www.aromatiseren.nl/cms/Uploads/manuscript_psychscien...](http://www.aromatiseren.nl/cms/Uploads/manuscript_psychscience%5B1%5D.pdf) ) The hypothesis is that stepping back is associated with avoidance, and that makes the brain more aware.

</comment></comment></comment><comment><USER19> This is such an important advice, it can't be repeated often enough. I can't even count the times making break helped me solve a problem in minutes that I tried before for hours.

</comment><comment><USER20> <half-trolling>Seems like that in this case the lesson should have been to use a statically typed language instead.</half-trolling>

(PS: dyed in the wool Python guy here)

<comment><USER8> Unless they were doing something exceedingly strange, they should've gotten the same kind of runtime error (undefined variable) as any statically-typed (or even compiled) language would have told them. Ruby crashes if you try to read from something that isn't defined.

</comment></comment><comment><USER21> I solve more problems taking a walk (to get coffee, fill my meter, or just walk) than staring at the screen for the same period of time. Often, walking around doing nothing, getting your mind off the problem is the answer.

Hence why you often hear great stories that start off "So I was in the shower yesterday..." and rarely hear great stories that start off "So I stayed at my desk for an additional two hours..."

</comment><comment><USER22> While solving problems on your own is a great way to learn things, another solution to this is to just talk to someone. They don't have to be an expert in the field, they just need to be there for you to confirm your base assumptions are sound. In fact, often the act of explaining the problem to them will force you to think through your problem differently, leading to the solution. Like Kent Beck said, "Once a problem is described in sufficient detail, its solution is obvious."

<comment><AUTHOR> Someone suggested the same thing over on my blog - it definitely makes sense, I just didn't think to apply it to programming. When I proofread papers it always helps to have someone around to read outloud to - things that seemed great in my head end up sounding completely different. I can see this applying to code as well.

</comment></comment><comment><USER23> I think the key here is the low quality work at the end of the day. I often knock off when I detect that I'm running at a very low productivity rate. Invariably the next day the overwhelming and seemingly massive task from the night before takes just a few minutes for the well rested brain.

There's also something about the "self control as a finite resource" that comes in to play here.

</comment><comment><USER24> Quite true, which is why you should stop banging your head against the monitor at 3AM, sleep a little and solve that bug in 30 seconds in the morning.

I must admit this is very controversial among startups I've worked in, as the policy is usually along the lines of "no one goes home until this works".

Good thing I have my own company now, and bugs are only solved by programmers that are "fresh" :)

</comment><comment><USER25> As a UI designer, this is something I need to tattoo on my forearm. Sometimes I'll spend so long banging my head against a problem that my bike-racer colleague will take me aside and remind me of the principles of overtraining.

Of course, I ignore him 80% of the time because I can't stand to step away from a problem before it's solved, but he's always right.

</comment><comment><USER26> I have never, in 20 years of programming, ever made this mistake; nor have I ever had to fix a bug that was caused by it. I generally do insert the braces anyway on the basis of almost a cargo-cult theory that someone else might make this mistake, but only because of received wisdom floating around on newsgroups an the like.

<comment><USER27> This is a copy and paste of another comment in this thread, that was referring to something completely different:

<http://news.ycombinator.com/item?id=3036988>

Is this some sort of spam account trying to get karma?

</comment></comment><comment><USER28> Sometimes I feel compelled to take a one-year break from all computers.

But I know that if I did, I'd just feel compelled to blog about it.

<comment><USER29> oblig <http://xkcd.com/77/>

<comment><USER7> Referencing two-digit xkcd comics in 2011 feels like the internet meme equivalent of a three-point-shot.

FROM DOWNTOWN!

</comment></comment></comment><comment><USER30> This is absolutely true. One of the most important lessons I ever learned in English class was to walk away. Always give yourself a day between when you write something and when you edit it. You come back fresh and with a new perspective.</comment>


Apparently We're Not Ready to Be Adults About Anything - <AUTHOR> http://chriszf.posterous.com/apparently-were-not-ready-to-be-adults-about

<comment><USER2> I'm sick of these "oooh no dick jokes" and "political correctness" fascism applied everywhere.

Come on, there's a difference between saying a woman directly to the face that you'd like to bang her, and to make jokes about sex in a group of people.

This whole mess of "oh we have to be politically correct in any f __*ing way to avoid lawsuits" has spread from the US to Europe. 1984 anyone? I'm free to think what I want and to make jokes to my friends about topics I want. Without any PC-fascists interfering and waffling about stuff they have no business at.

This does not mean that I dislike women in tech or think of them as free-for- all or whatever stupid cliché. I don't give a shit about boobs or dicks, I care about how _good_ someone is at his job only. As we all should. We have to take care of paying everyone equal, not firing people because they're LGBT (Don't ask, don't tell dropping was a first step, yay) and to eliminate _any_ gender or sexual related discrimination.

<comment><USER3> i don't think fascism means what you think it means.

<comment><USER2> In Germany the term "Feminazis" or similar is used as a (offensive) title for extreme feminists (which we unfortunately have a lot of!).

Nothing against feminism, but it has more and more turned into a war on men.

<comment><USER3> quite familiar with the term. That doesn't make these folks who are upset with the issue the same as those folks who you are referencing. IMO it is quite unfair to link them.

EDIT: there are extremes in every viewpoint, and there are probably some people who actually do dislike men. But does that really make it ok to bring it up in this context due to all evidence to the contrary in the tech fields?

</comment></comment></comment></comment><comment><USER4> I think this issue has been so inflammatory because it covers a lot of sensitive topics.

\- Women in one of the last male dominated tech fields \- Privacy between two people having a conversation \- The ramifications stories can have in todays twitter world (i.e. getting fired over hearsay)

There are so many issues one could discuss its difficult to know where to start. On one hand no one really knows exactly what joke was said except for those three individuals involved. At the same time while innocent until proven guilty, no one wants to be painted as unsympathetic to womens plight against sexism in the tech field.

Then there is the issue about whether its acceptable to assume there is a right not to be offended. One persons dongle joke is another person 'trigger'. Is it understandable that some individuals feel threatened by the heavy handed consequences that can come with what is assumed (rightly or wrongly) to be general conference chit chat.

Why is it that as a Muslim I have no right to be offended when people make jokes or down right derogatory comments about Islam (which are protected by the oft affirmed free speech shield) yet this person was allowed to be offended and seek retribution for a comment that she heard.

It's an interesting situation thats for sure.

<comment><USER5> No one has a "right" not to be offended insofar as such would trump any right to freedom of speech. That said, any company under the current circumstances has a "right" to fire an employee who might afford them negative attention one way or the other, and certainly under the conditions of sexual harassment.

Please note, I am not saying that I agree the company should have done so, merely that they likely have the right.

<comment><USER6> reminds me of a quote... 'It's now very common to hear people say, "I'm rather offended by that", as if that gives them certain rights. It's no more than a whine. It has no meaning, it has no purpose, it has no reason to be respected as a phrase. "I'm offended by that." Well, so fucking what?' —Stephen Fry</comment></comment></comment>


When do I stop doing customer interviews and start writing code? - <AUTHOR> http://blog.asmartbear.com/stop-customer-interviews.html <comment><USER2> Excellent article - being in a startup myself this is always in the back of my mind. An approach we are adopting is to purposefully _not_ capture explicit details of the conversations, rather just discussing each conversation openly afterwards, and allowing our own minds to map-reduce to the important points. When those points become fairly static, then I believe we are there.</comment>


Germany threatens to fine Facebook €500,000 for each fake news post - <AUTHOR> http://qz.com/865964/facebook-fb-could-face-e500000-fines-for-each-fake-news-post-in-germany/ <comment><USER2> Two significant words from that proposal are missing from this article. The fine is supposed to be _up to_ 500k. Other laws that are worded like that result in much much lower fines in every practical case. The linked DW article is more precise.

It's also not "Germany" that is threatening this fine but a single (though influential) politician. The proposal has sparked quite some debate and nobody can say whether it will result in any new law let alone any details.

</comment><comment><USER3> Totalitarianism, plain and simple. How are you even supposed to verify if a news piece is fake in 24h? You can't.

'<major politician> engaged in a <criminal activity>'. No way to verify. If genuinely fake news, delete - no fine, not delete - big fine. If true, delete - no fine, not delete - risk of fine, which may or may not be returned later, depending on how powerful said politician is...

So the end result is that only news from entities explicitly allowed by the government are safe to keep.

Here's a funny thing: the only government that's not going to abuse this is the one that's not hiding anything nefarious! So the end result is: all stories that uncover really bad things about the government are going to disappear, and the entity that made/published it is going to be labelled 'fake news' if it wasn't already. Which means the only way for a media entity to survive is to self-censor.

<comment><USER4> It is not that difficult actually.

It requires some human effort that fb and Google are idealogically unwilling to consider. it as simple as requiring accreditation to the national press associations as "real" news orgs have and validating credentials as event venues do for example. Automated solution only approaxg and democratisation of news(I.e bloggers) is an ideological stand not a practical limitations

<comment><USER5> But how does having 'credentials' mean that they're publishing real news? All that does is give the Government control over who can and can't publish news, and you cannot possibly argue that this is a good thing in any way.

In the US election coverage there have been numerous examples of established 'real' news outlets like CNN, and nice touchy-feely 'acceptable' outlets like Huffington Post publishing stories that have either been outright lies or completely misleading.

</comment></comment></comment><comment><USER6> "Fake news" is potentially the most blatant propaganda campaign I've seen in the last few years. It is a very transparent effort by large, established media groups to claim a monopoly on the dissemination of truth, and the campaign has thus far been frighteningly successful, as indicated by the OP.

There's also a bit of a motte and bailey argument involved in this campaign. In particular, when people ask "Can't the 'fake news' label just be applied to any politically unfavorable news source to suppress them?", the response is usually "Oh, this will only be used for those crazy clickbait sites that just come up with random titles and spam Facebook ads.". But then in other contexts, it's very obvious that NYT, AP, etc. are using this to refer to lower-quality but only marginally more falsehood-prone tabloids like Breitbart. Besides the differing political bias, the difference between breitbart and NYT is a matter of selectivity. Breitbart might publish more questionable or false stories (higher false positive rate) but they also publish true things that the NYT doesn't (lower false negative rate). For example, NYT's coverage of the Podesta leaks was garbage, and I had to turn to smaller, less reputable news sources to find (100% verifiable) coverage of leaked email contents.

Let's also not pretend that the media groups leading this campaign are innocent of (intentionally or unintentionally) publishing some outright false or misleading content themselves. Sure, they do it less frequently, but they're no saints.

As for the OP, it is absolutely unreasonable to allow the government to dictate the truth. I should not have to spell out how that can and will go wrong. Permit people to believe what they will. If you're worried about false information, try to make better information management tools rather than using the government to force people into some arbitrarily chosen "correct" belief system. This isn't some stupid appeal to the idea that objective truth doesn't exist; it's recognizing the fact that any one person (or government Ministry of Truth) is almost certainly wrong about a non-negligible number of things, and it's better for at least some people to be right about any given topic than for every single person to be uniformly right or wrong about any given topic.

<comment><USER7> If a news organization does it less frequently but has a much larger reach...where does that stand? If a website is 40% questionable with a low readership, but another is 10% questionable but reaches millions a day...who is more fake? Who is more accountable? NY Times and Washington Post run heavy political bias in their reporting with some questionable articles over the past month. Because of their resources and readership, if 10% of their content is intentionally misleading...is that fake news? Would they be considered a fake news site because they mislead a large segment of the population in 10% of their content? Or have they been socially deemed as "real news"? This is all for example sake..

..what is fake news compared to real news?

Are their really any news outlets that are unbiased, bipartisan, in- regurgitated, real news? My answer would be...what ever sells the most papers, that is what is printed. A news paper seing their shares fall because of a million small small sites acting as regurgitation machines is starting to take its toll, and papers are calling foul and continually running with that story. There is no real news anymore.

<comment><USER8> I think it is clear the "more fake" source is the one that is "more questionable".

The audience of a source doesn't lend or take credibility.

<comment><USER9> I think the parents argument is that that _harm_ done by disseminating false information is both a function of the inaccuracy of the information and its reach.

If a major news source intentionally slips subtle inaccuracies into their stories to push some agenda it could reasonably be argued that it causes more harm than a small no-name blog with no readership publishing blatant lies.

</comment></comment></comment></comment><comment><USER10> If Germany does this the EU will be next, I'm sure Facebook will fight this kicking and screaming.

Facebook has a moral responsibility to exercise some editorial control imho.

<comment><USER11> I'd rather have a shitload fo shit content (that i can choose or not to consume) than be censored to be honest.

Governments should stop taking for granted that their people are sheep, and maybe then they will stop being so easily manipulated

</comment></comment><comment><USER12> You know what is worse than fake news ? A government suppressing speech. Who decides what is fake and what isn't ? This is what despotism looks like. It stems from good intentions at first then gets abused because people in charge will always abuse their power to silence the people.

<comment><USER13> Germany as a country – and its constitution – does not subscribe to that US- american view of unregulated free speech. Never did, and has a healthy free press anyway.

<comment><USER14> Germany is also a country that murdered millions of people in concentration camps less than a century ago. Which happened because National Socialists were suppressing views opposed to their own. So maybe, just maybe, unregulated free speech was a good idea after all.

<comment><USER13> Pff. First, that is not Germany as the BRD, but the Third Reich (which did not have the same constitution). Second, to link the holocaust to supressing opposing views is utterly crazy. Third, Godwin's Law.

</comment></comment></comment></comment><comment><USER15> That's crazy. Facebook should absolutely take the government to court over this. They're probably doing this because Google and Facebook have already agreed to a lot of things which may have seemed "reasonable" but this is really taking it too far. It's not Facebook's responsibility to verify the truthfulness of all the posts on its site.

On the other hand, perhaps this forces Facebook to give up on being a "news platform", too, and not just a social network, which wouldn't be a terrible thing to happen.

<comment><USER16> >Facebook should absolutely take the government to court over this

This is not a contract between two corporations.

A private corporation should NOT sue a government for creating a new law. As long as it's legally feasible, Germany should do whatever it deems necessary to its own sovereignty and interests.

<comment><USER17> By that logic no individual has a right to contest any law no matter what

<comment><USER16> Your comparison is meaningless.

1) A corporation is not the same as a German citizen.

2) "Contest" is not the same as "suing"

3) No German has a net worth of over U$300B (FB's Market Cap)

<comment><USER17> If they are operating within Germany they ought and I'm sure do have a right to file a lawsuit.</comment></comment></comment></comment></comment>


A natural language shell based on GPT-3 - <AUTHOR> https://vimeo.com/427943407/98fe5258a7 <comment><USER2> This is really, really cool. I've been dreaming of a system like this for years (with better persistent context and a voice interface) - a proper Star Trek computer!

</comment><comment><USER3> Pretty impressive. I could see myself using this quite often.

Wonder if it has already scraped all the man pages for the various bash tools or if doing so would improve it even more.

</comment><comment><USER4> Are we supposed to assume that the only inputs for this model are the prompts shown? Is GPT-3 already trained on shells somehow?

<comment><USER5> I think the implication is that it has read a _lot_ of information on the web, I think their training data is (in some part) based on reddit links, and that information is then just passively encoded in the model weights. Some of the information comes from the few-shot examples, at least in terms of what meta- form an 'answer' takes, but I think the implication is that GPT-3 is really just that knowledgeable.

<comment><USER6> How do they separate bad or malicious commands learned from internet? Like "List all folders" rm -fr * (just a silly example)

</comment></comment></comment><comment><USER7> Yeah this is pretty damn incredible.

</comment><comment><USER8> (video)</comment>


Problems with Lisp - <AUTHOR> http://blog.jrock.us/articles/Problems with Lisp.pod <comment><USER2> _In conclusion, I really don't understand what the problem is here._

I think it's just that this:

      (setf (gethash "foo" *hash*) "OH HAI")

is verbose and funny-looking compared to:

      hash["foo"] = "OH HAI"

</comment><comment><USER3> Note, most of the discussion is taking place on this duplicate: <http://news.ycombinator.com/item?id=449345></comment>


Japan's fertility crisis even worse than before as births fall sharply - <AUTHOR> https://www.cnn.com/2019/10/08/asia/japan-fertility-intl-hnk-scli/index.html <comment><USER2> This isn't a crisis. It's a strike. When the birthrate tanks, it's because people have decided that the society they live in is not only not worth trying to fix, but not worth perpetuating.

And it's no wonder this is the case in Japan:

1\. Mothers seem to be expected to raise the kids on their own.

2\. Fathers seem to expected to work all day into the night, and not spend time with their spouses and children.

3\. Children seem to not get to be kids, but instead are expected to spend all day in school and then go to cram school.

4\. There's no meaningful support from society or government, and extended families aren't around to help with the load.

5\. Raising kids is hard, and expensive, and while nobody will praise you for doing it well you'll get plenty of blame if your kid doesn't turn out exactly the way others think they should.

6\. Thanks to climate change and environmental collapse, Ragnarok seems just around the corner.

Given these premises, there seems to be zero upside to having children, and an endless downside. Why bother? That's the question Japanese adults seem to be asking themselves.

It's also the question many Americans and Europeans are asking themselves for similar reasons, but the low birthrate in the US is masked by immigration so the "threat" of population decline doesn't seem as imminent.

Once there's an actual upside to having kids, and parents aren't expected to do everything on their own while also working to "earn a living", we might see this "crisis" reverse itself.

But that would require fundamental social and economic changes that _probably won 't happen_ because the powers that be profit from the way things are.</comment>


Tesla, the New York Times and the levelling of the media playing field - <AUTHOR> http://paidcontent.org/2013/02/15/tesla-the-new-york-times-and-the-levelling-of-the-media-playing-field/ <comment><USER2> I think we're seeing a trend, common in politics already, where the masses are much more susceptible to propaganda put out by special interests, simply because they're listening directly to the special interests themselves, rather than to a reputable third party who can filter out cheap tricks and attempt to disseminate information for the common good.

<comment><USER3> This is a good thing, mostly because the concept of 'reputability' is not very viable.

A third party is reputable as long as it is 100% objective. And there is no such thing as 100% objectivity in human world. Everything is relative. Reputation of third party will be questioned and tried every time third party publishes questionable information, which is every time.

I would rather have two distinctly biased parties with clearly established interests publish their stories, and then I will be the judge on whose story is right.

<comment><USER2> That sounds great, but in practice I believe it is difficult and wastes time. You cannot be as good a filter as someone who does it for a living. Division of labor is the foundation of civilization. I don't try to fly my own 737, diagnose my own diseases, or try to filter propaganda and fact check issues I have no context for or experience with. I haven't the time, and it would be better spent, but if I did, I would most likely be constantly manipulated without my being aware of it.</comment></comment></comment>


Google Distance Matrix API for Node.js – Find distance data between locations - <AUTHOR> https://github.com/edwlook/node-google-distance

<comment><USER2> This wrapper should grab more than just distance/duration.text (see [https://github.com/edwlook/node-google- distance/blob/master/...](https://github.com/edwlook/node-google- distance/blob/master/index.js#L41) \- I'm assuming Google's API includes the distance as a number, and unit of measurement).

If people want to use this API to convert to a different unit, they have to parse the text which would be very clunky.

<comment><AUTHOR> To use different units, you can specify 'imperial' (default) for miles/feet or 'metric' for kilometers/meters.

The wrapper fetches all of the data returned from Google (except for the value fields): [http://cl.ly/image/3M003N0s0z3q](http://cl.ly/image/3M003N0s0z3q)

It actually might be a good idea to fetch the value fields as well, since that would make conversion to other metrics easier. Thanks for the suggestion.

<comment><USER2> I do think it would be valuable to fetch the value field, as then the user can format the text however they want - for example, I may want to say "96 minutes" instead of "1 hour 36 minutes".

Additionally, it's much easier to compare two values (e.g. if one wanted to compare distances between X and Y versus X and Z).

<comment><AUTHOR> Good point. The value field is fetched as of version 0.2.0.

<comment><USER2> Awesome! That looks nice. Thanks for taking feedback.

</comment></comment></comment></comment></comment><comment> mck- The Google Distance Matrix has a limit of 10x10 locations (25x25 with business license) -- how do you get around that? I don't see any mention of API-key?

<comment><AUTHOR> The Google Distance API does not require an API key, but this is something that should be supported for business licenses and per-key quota limit tracking.

Here are the quota limits:

Users of the free API: 100 elements per query. 100 elements per 10 seconds. 2 500 elements per 24 hour period.

Maps for Business customers: 625 elements per query. 1 000 elements per 10 seconds. 100 000 elements per 24 hour period.

Read more: [https://developers.google.com/maps/documentation/distancemat...](https://developers.google.com/maps/documentation/distancematrix/#api_key)</comment></comment>


Problem of Time - <AUTHOR> https://en.wikipedia.org/wiki/Problem_of_time <comment><USER2> Is there any evidence of a fundemental quantized unit of time existing? Can I fundementally treat time as continuous or discrete? Plank time isn't good enough because it's possible that we see a phenomenon that happens over a shorter time period and that we need better instruments.

This question very important to me because I don't see a possibility that we can situate identity as existing metaphysically without quantized time. It also seems to imply to me that determinism is wrong.

But please correct me on this you big-brains I don't study quantum physics or general relativity

<comment><USER3> There is not. Both quantum physics and special and general relativity treat time as continuous.

</comment></comment><comment><USER4> So far many of the comments seem to have misread the article, which doesn't seek to address the mystery of what time is directly, but rather it describes a supposed mismatch between quantum and classical (via general relativity) interpretations of it's essence.

<comment><USER5> I don't mean to sound snarky, but aren't those two problems related?

<comment><USER4> Sure, and the article goes on to discuss time itself as a necessary consideration, but it's not the main focus - the title is somewhat misleading.

</comment></comment></comment><comment><USER6> The Order of Time - Carlo Rovalli, great read if anyone is looking for a book on time.

Also, Your brain is a time machine - Dean Buonomano

<comment><USER7> Thanks for the recommendation. I'm going to check out Rovalli's book.

</comment></comment><comment><USER8> Excerpt:

The quantum concept of time was invented by physicist Bryce DeWitt in the 1960s:[5]

 _" Different times are special cases of different universes."_

</comment><comment><USER9> Let me ask you this: if there was no change, no interaction even between qanta, would there be time?

<comment><USER10> Think of a donut. Think of a vertical plane through the donut. The plane has two disconnected circles on it. Imagine trying to move the two circles apart. They resist your effort because they are attached together through their three-dimensional structure.

In one view of time ("eternalism", roughly speaking) saying "there is no change" or "no interaction" between any particles in the universe would mean that in the fixed structure of the universe of which time is a dimension, everything is constant in the direction of that dimension.

So the two statements become roughly equivalent.

</comment></comment><comment><USER11> > no known physical laws seem to require a single direction.

What would a physical law that required a single direction look like?

<comment><USER12> I believe it looks like this: [https://en.wikipedia.org/wiki/Speed_of_light](https://en.wikipedia.org/wiki/Speed_of_light)

That physical limitation on how fast a mass can move is what keeps causality in check and things like the grandfather paradox from being possible.

Edit: now that I think more on it, this is probably a better law that ensures causality: [https://en.wikipedia.org/wiki/Entropy#Second_law_of_thermody...](https://en.wikipedia.org/wiki/Entropy#Second_law_of_thermodynamics)

</comment></comment><comment><USER13> As another HN member mentioned, this is a pretty awful article. What is the alleged conflict supposed to be?

It's my understanding that quantum mechanics necessarily describes systems in a single inertial reference frame, so for that system, time is absolute w.r.t to both general relativity and QM.

<comment><USER14> As the article explains, time in Relativity is not Absolute, it's.... Relative.

<comment><USER13> In General Relativity time is absolute throughout the same inertial reference frame...

</comment></comment></comment><comment><USER15> Why do I get the feeling that when they do finally figure out what time is it's somehow going to be related to imaginary numbers:

The complexity of things - the things within things - just seems to be endless. I mean nothing is easy, nothing is simple. ~Alice Munro

</comment><comment><USER16> Isn't time just a history of movement? For example, if you stopped the movement of everything in the universe (all the way down to subatomic particles) for a "moment" and then turned movement back on again, how long would that moment have lasted for? 1 second or 100 years? There's no way to define how long that moment lasted, since nothing was moving during that moment. So it seems to me that time cannot exist without movement which makes me think that time is a byproduct of motion (a history of motion).

<comment><USER17> > how long would that moment have lasted for?

0 seconds.

</comment></comment><comment><USER18> Maybe I'm not smart enough to find time as confusing as these things try to point out:

Time is the sequence of states every time the rules are applied, or am I missing something?

<comment><USER19> According to general relativity, the time order of events is relative depending on your position and velocity. This also seems to break causality in textbook quantum mechanics since local changes can lead to global adjustments (collapse, for one) of the wavefunction.

</comment></comment><comment><USER20> This is a pretty awful Wikipedia article. Unless it's a plea for an actual expert in the field to go in and fix it, I'm not seeing how this is a good submission :(

<comment><USER21> It is an interesting discussion topic, people are confined to their houses for many days now and naturally experience existential issues. And, because noone sees the world the same way, HN relies on a sophisticated algorithm that tries to minimize bias on what is a good and what is a bad submission. A more constructive approach would be to point out why you think it is an awful article and share some knowledge on the topic.

<comment><USER22> Just to add to what saagarjha said; there's large parts of the article that just don't seem to make sense on their own. I only have a Master's degree in Physics, and haven't specialized in general relativity - nevertheless I usually have enough background to at least follow along with Wikipedia.

In particular, the "Overturning of absolute time in general relativity" section is very hard to follow, and I suspect would only make passing sense to a reader already very familiar with the subject matter. It has a very stream- of-consciousness feel to it, it doesn't introduce concepts as it moves along, and it makes unexplained logical leaps from one idea to another.

I'm glad someone took the time to start the article and it sounds like an interesting subject; but it could certainly see improvement from someone with the right knowledge.

<comment><USER23> I think that the article which supports its definition of the problem with the article written by an author who "obtained a bachelor's degree in physics" and then "left graduate school during the first year in order to pursue a career in science journalism, and "has never looked back"" (1) should just not exist.

In my perception, even that article is such a "popularization" of the topics on which physicists work that it stopped "being even true." The Wikipedia article just continues in that direction.

The "problem" that exists should not even be present as a Wikipedia entry under that specific name. As far as I see it, even the name is wrong.

\---

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

<comment> chupa-chups TBH, >95% of the commentators here don't reach the education level of the editor of the article _by far_ in terms of the specific domain, but still this doesn't stop them from criticizing it.

Not meant to be snarky, and in general imho it is good the be critical always - but this should include oneself. The latter part is often lacking, and the amount of lacking very often appears to be proportional to the lack of knowledge of the commentator.

<comment><USER23> > The latter part is often lacking, and the amount of lacking very often > appears to be proportional to the lack of knowledge of the commentator.

Very good: how does your comment fare using that frame?

And since you commented under my comment, what parts of my comment do you agree with and what do you thing you can correct, and based on which sources? I've given mine.

<comment> chupa-chups Maybe i misunderstood your comment, if so I like to apologize.

In any case, would you please explain to me how you consider the title "The problem of time" being wrong. It appears to me as one of the most fundamental questions in physics. The wikipedia article does - from my PoV - a reasonably good try to explain the problem at hand in laymans terms. It touches the relevant aspects of the problem (no absolute time, time/space interdependency) and expands to a more speculative theory (thermal time hypothesis).

I will not at all claim to have even a basic understanding of the covered topics, despite being an avid reader of related bloggers and papers.

I just am astonished how people disregard work of others even without (basic) knowledge of the domain. Maybe I'm wrong, but noone in this thread even tried to show her/his accomplishments in the mentioned domain.

And thanks for replying without simply downvoting.

And please don't think i automatically included _you_ in the perceived group not having "even a basic understanding o the topic". Maybe you have, but since this is even less recognizable than the merits of the wikipedia author it is - from an outside PoV - even less credible.

<comment><USER23> > how you consider the title "The problem of time" being wrong.

Because as far as I understand it is not commonly accepted name among the physicists for the issues that prevents them developing the "Theory of Everything"

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

It's just how only a few authors name their articles and books. The title would be OK if it would be a title of the article about the specific book, but not as a title for the "problem" of physics. Because, as far as I know, it's not commonly called as such among the physicists, and that's why even the very support for the whole wikipedia article is a reference to the Quanta article and not some physics textbook, and that is what then confuses readers who don't have "even a basic understanding of the covered topics."

Reducing all the issues about "TOE" to the "problem of time" is not correct, from the perspective of physics. It is probably "fun" for "philosophers" though.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER24> The problem of time comes from the notion that we are matter existing through time, instead of realizing sentience is made of events.

<comment><USER25> Precise clocks don't care about your sentience or lack thereof. They still measure the gravity and speed-induced time dilation that is entirely missing in quantum mechanics. Relativity is a physical phenomenon that does not require sentience to operate, and time is part of that physical phenomenon.

<comment><USER26> _Relativity is a physical phenomenon that does not require sentience to operate_

We do not and cannot know that because all observations me make involve sentience. In fact, we can't even know if anything exists without sentience.

<comment><USER27> Nope. The universe 'notices', by reacting in exactly the way you'd expect if relativity was happening.

That last bit - "...we can't even know.." is sophistry.

<comment><USER26> There is nothing sophistic about this argument. It's pretty obvious.

This is why some people argue that we might be living in a simulation. Because we don't have direct (not mediated by our senses) access to the underlying reality.

<comment><USER27> True about everything, including relativity. Can't have the argument without assuming it.

The fact is, the universe operates consistent with Relativity.</comment></comment></comment></comment></comment></comment>


Facebook's mobile webstore, best solution for cross-platform apps? - <AUTHOR> http://www.businessinsider.com/facebook-iphone-web-app-store-2011-6

<comment><AUTHOR> If this will work on Android, too, and I believe it will, it could be an instant win for HTML5 app developers, because Facebook's webstore would be the first such "cross-platform" store where you can showcase your mobile webapp.

If they keep it iOS only, I don't see much incentive to build a lower performance webapp instead of a native app, unless you already have a html5 app and you want to use their webstore to showcase it there.</comment>


Why isn't server-side web made with XML libs? - <AUTHOR>

I'm not a professional web developer, far from it, to be fair I only have been taught PHP and JSP server-side web programming at school, and I poked around with Node.js; so far I noticed that, outside from ajax-based apps (which I reckon are becoming almost ubiquous), the dominant idiom is to represent the final HTML page as a text stream, and to append text to it in a sequential manner.
Two variants exist: 1) there is the continuation-passing model, used by POJO Java servlets and Node.js, of creating a request and a response objects, and passing them along the pipeline of the request handlers while adding text to the response stream, and 2) there is the tag model, which is the essence of PHP, JSP and if I understood correctly, ASP, where the page itself is raw HTML, with the option of adding actual code to denote business logic, with some syntactic sugar to append to the underlying HTML page which is the text stream.
Now what bugs me is that [X]HTML tries really hard to be a tree, and the current model of treating the HTML response as a fundamentally flat stream leaves the responsibility of creating a well-formed tree to the developer. XML probably is the simplest recursive grammar around, which is the cause of the woes of people who try to treat it with Regex, and Java almost treat XML like an actual extension of itself, and most languages offer decent libraries to read, create and generally mangle XML trees.
So why isn't XHTML created by building XML trees?
Why isn't it mainstream to do stuff like this? (in pseudo-Java)
Element root = new Element("html"); Element body = new Element("body").append(new Element("p").text("Hello, world!")); root.append(body);
Why don't I ever see that idiom? <comment><USER2> One templating approach that takes HTML's tree structure more seriously is Haml. Its syntax (mostly) enforces valid output, so you don't have to worry about closing/matching tags etc. This also makes it very concise, and (since its indentation matches the HTML tree) extremely easy to scan & read. It's basically a DSL optimized for markup trees like HTML.

Composing a DOM by instantiating objects for each node sounds awful, but I think you're right that flat plain-text templates miss an opportunity to leverage HTML's tree-like structure. Haml does a great job exploiting that structure.

</comment><comment><USER3> So you are correct that purely programmatically its a bit wonky to construct an XML document using a bunch of strings and then pass that to the client and pray that that your XML (HTML) is well formed enough.

I think the reason for why HTML construction is done the current way that it is is that it goes back to when most web companies had "software engineers" handling the system and "web developers/designers" who spruced up the data coming out of the system with HTML. The designers didn't know much deep programming per say but they knew HTML and would create HTML templates in plain text with placeholders to expose anything dynamic. Those templates would then be handed off to engineering whose sole concern was getting the system right and didn't really want to care about HTML. This workflow is also what gained PHP a lot of traction originally.

So ultimately I think stitching together HTML with strings makes the system a lot more accessible to semi-technical folks and its honestly probably a lot faster to do development by typing out HTML rather than building XML objects.

</comment><comment><USER4> Using DOM implementations like that quickly gets bloated and hard to debug, not to mention performance overhead from the DOM itself (e.g. PHP).

Personally, I tried working with HTML like that in PHP with a class that parsed HTML files into a hierarchical array which could be manipulated like:

$var['html']['body']['p']['strong'] = 'etc';

With support for attributes and CDATA and everything but no matter how seductive it may be from a programmer's point of view, it's always just more trouble than it's worth to work like that.

(I ended up just using that xml2array/array2xml crap to create XML trees for XSLT)

<comment><AUTHOR> Death of a thousand cuts, then.

Sad.

Thanks for the input.

</comment></comment><comment><USER5> Another reason is that this style of programming makes it very difficult to improve your TTFB (time to first byte). If the entire document can be manipulated at any time, you can't start sending anything to the browser until all your processing is done. This means a lot of unnecessary buffering on the server side and ultimately a delay in pushing data to the client. Modern browsers do pretty well at rendering incomplete HTML, so the faster you can start sending data, the faster the page load will be perceived.

<comment><AUTHOR> I actually didn't know web servers started sending packets before I was done with writing to the stream.

Interesting.

<comment><USER5> This depends on the configuration of both your web server and your application server. There's a good chance things won't work this way out of the box. But this is generally something that you want for high performance.

</comment></comment></comment><comment><USER6> That code is crazy verbose; that's why you don't see people using it. Even JQuery-like wrappers would still be more verbose than templating. Stuff like E4X and XQuery is more concise but I think it came out after XML's reputation had already been destroyed.

<comment><AUTHOR> Ok, interesting response, thank you.

But there's a point I'd like to be clarified, if possible: it's not the first time I read that XML is bad in some abstract way, so I'd really be interested in knowing how was XML's rep "destroyed"?

<comment><USER7> An important one is that XML does not map cleanly to any programming language's typical data structures, even those that explicitly support it. It always turns into an elaborate object hierarchy with awkward query syntax. The combination of unique named string-only attributes with ordered, non-unique named child objects is awkward and ambiguous (i.e. should that property be an attribute, or a child?). Contrast for example with JSON, which translates directly into arrays and hashes, structures available in any decent language.

E.g. you have <user name="john" address="123 Oracle Road"></user>

Now you decide you need multiple addresses per user. Do you: a) invent an ad- hoc string serialization scheme for the address="" property, or b) completely restructure your XML into:

<user name="john"> <address>123 Oracle Road</address> <address>456 XML Lane</address> </user>

But in that case, why not just make every property a child?

XML also spawned idiotic things like XSLT, which most agree is pretty terrible. If you try to use XSLT for HTML templating, by definition you have to escape every meaningful HTML character like "<>&'". If you wish to print one of those characters in your templates, you have to double escape them. No designer I know of would touch it with a ten foot pole, and every programmer I've met who loved XML and its associated technologies was terrible at their job.

Basically XML is strongly associated with the bloaty enterprise Java world, who used XML as their hammer to beat down anything remotely nail-like.

<comment><USER8> As a tree, XML syntax is largely isomorphic with that of Lisp's exposed AST.

<comment><AUTHOR> Well, yeah, but XML has attributes. I was writing about how that was a problem and so on, but I came up with this

<look attr="at" attr2="up"> this <awkward> problem </awkward></look>

(look (|attr at) (|attr2 up) this (awkward problem))

just by saving "|" as a meta to annotate an attribute pair.

And the weird problem of lone tags looking like unclosed ones magically flies away (I think) since

"}

is just

(script (|type text/javascript) (|src foo.js))

...sometimes I wonder why isn't everything ever made out of S-exprs.

<comment><USER8> Lisp has keywords:

       (look #:attr "at" #:attr2 "up" this (awkward problem))

Or to handle XML on the fly, cons cells are another option:

       (look '(attr . "at") '(attr2 . "up) this (awkward problem))

Going further since it's Lisp and we're just parsing, we could pretty much use whatever syntax we want by adding a macro:

        (look (attributes attr "at" attr2 "up") this (awkward problem))</comment></comment></comment></comment></comment></comment>


Writing an OS in Rust - <AUTHOR> http://os.phil-opp.com <comment><USER2> This is a dupe of [https://news.ycombinator.com/item?id=10448136](https://news.ycombinator.com/item?id=10448136). A related discussion was [https://news.ycombinator.com/item?id=10569463](https://news.ycombinator.com/item?id=10569463).

</comment><comment><USER3> I recently got started working with Rust and even though I have pretty decent programming experience in statically typed languages Rust has been quite a challenge. The borrow checker learning curve is very high. Even if you understand the basics you won't always know what macros and functions will be moving things until you run into an error. Lifetime management also requires a bit of time to grok. Some things that are simple in almost any other language can be frustrating in Rust, like someone wrote a book for how to write a linked list in Rust.[0]

My advice is that when you're getting started with Rust, compile often. Don't write a tome of code only to find out later it has no chance of compiling. It gets easier the more you do it, so don't give up, but move in small steps.

[0] [http://cglab.ca/~abeinges/blah/too-many- lists/book/](http://cglab.ca/~abeinges/blah/too-many-lists/book/)

<comment><USER4> to be fair, that book covers 6 different types of linked lists, not just "how to write a linked list". I could write a similarly-sized book (by word count) on different types of linked lists in C++

<comment><USER3> Writing a linked list is pretty hard in Rust for someone new to the language. Perhaps this wasn't as obvious from the book's introduction as I thought it would be.

</comment></comment></comment><comment><USER5> So there is this, and there is also [http://www.redox- os.org](http://www.redox-os.org). Are there any other OS' being built in Rust?

I'm curious about the intention of these two projects, this seems to be a bottom up OS in Rust probably oriented toward unikernel or possibly a server OS. To be successful I assume it's going to allow for NetBSD or Linux drivers to be integrated into the Kernel in some way?

<comment><USER6> Me and some other people are working on a seL4-based OS in Rust. We're getting ready to publically announce our first milestone by next week.

There's also [https://github.com/thepowersgang/rust_os](https://github.com/thepowersgang/rust_os), which is one of the oldest OS written in Rust, but never gets any press.

<comment> phil-opp Yeah, thepowersgang's kernel is severely underrated.

</comment></comment></comment><comment><USER7> I spent a bunch of time figuring out how to get to long mode in a multiboot kernel. Finally got it working and discovered that a 64 bit UEFI app _starts_ in long mode. Is it really so important to maintain support for non-UEFI x86-64 systems?

<comment><USER8> My guess why it's done:

BIOS booting is still standard in all Virtual Machines and UEFI might even be a pain in the ass to set up. This is where in the beginning your OS will run most of the time.

Also UEFI has it's own pitfalls (the main function you have to provide and the UEFI functions you can use use the windows calling ABI).

If you were to remove BIOS booting from an operating system that's actually used you would get lots of complaints from people that a) have a system that doesn't support UEFI b) are too lazy to switch on UEFI on their mainboard and c) the most vocal group probably would be people that hate UEFI

</comment></comment><comment><USER9> Reminds me of [https://github.com/intermezzOS/kernel](https://github.com/intermezzOS/kernel)

Do they work in parallel on same problem/same style/ veru similar codebases? When why not to combine efforts?

<comment><USER10> If I understand correctly, Phil started writing his series first. That tutorial prompted several people to start working on their own hobby OS, including Steve's and another one here: [http://www.randomhacks.net/bare- metal-rust/](http://www.randomhacks.net/bare-metal-rust/). I think Redox was already underway when Phil started writing, but I may be mixing up my timelines.

Edit: There is also [http://www.alexeyshmalko.com/2015/bkernel-a-rust- operating-s...](http://www.alexeyshmalko.com/2015/bkernel-a-rust-operating- system/)

Phil has stated his series is basically for fun and learning. I imagine Steve's and Eric's are similar. You don't necessarily want to "combine effort" with someone when you are exploring ideas on your own.

<comment><USER9> I mostly agree with you.

However part of it's effort is directed into producing tutorials/book material for the educational etc use.

It's obviously up to 100% to them how and where are they going.

From the educational perspective it's _imo_ something worth considering at some point. E.g. combining this collective know-how into some sort of book. I know I would buy it.

<comment><USER11> We are all very friendly with each other, and hang out in our IRCs, and #rust- osdev. I expect the situation to be better for all of us, as we can cross- pollinate, and improve each other's work. Ecosystems can be better than single monolithic projects.

There are a LOT of decisions that can go into making an OS. The compare/contrast in a few years should be really interesting.

</comment></comment></comment></comment><comment><USER12> This has been a very useful and educational project for me to follow – both in terms of low-level kernel bootstrapping, and in terms of understanding Rust and the tooling it provides. Absolutely love it and similar well-written pieces like this.

<comment> phil-opp Thanks a lot! New stuff is in the making :)

</comment></comment><comment><USER13> how do debug an OS? is the kernel debugger support from the OS, or it is from an even lower level of the system?

Do you get the debugability automatically? or you have to code to support the debugger?

<comment><USER14> the easiest way I found was to attach gdb to qemu (since you're normally running the OS in an emulator). there are instructions for how to do this in a comment on this blog post: [http://jvns.ca/blog/2013/12/04/day-37-how-a- keyboard-works/](http://jvns.ca/blog/2013/12/04/day-37-how-a-keyboard-works/)

here are the instructions:

> Sam Rose Julia Evans • 2 years ago

> If you haven't yet experienced the joys of remote debugging with QEMU and > gdb, you should totally try it out.

> Run qemu with the flag "-monitor stdio" and that should give you a terminal > into QEMU. Then in that terminal, run "gdbserver" and it'll open up a gdb > server on port 1234.

> Then, in another terminal, open gdb and run "target remote :1234" to connect > to the gdbserver running in qemu.

> At first you'll find that gdb has no fucking idea what's going on. This is > because it has no symbol data, so you'll need to load your kernel binary > into it with the "file" command.

> After loading your kernel symbol table, you should be free to roam around > the inside of your kernel using gdb as normal. If gdb isn't familiar to you, > I personally really enjoyed Beej's Quick Guide to GDB: > [http://beej.us/guide/bggdb/](http://beej.us/guide/bggdb/) (pretty much > everything by

<comment><USER15> This would make an excellent screencast (not a request)!</comment></comment></comment>


Don't Use Code Beyond Its Expiration Date - <AUTHOR> http://redbeacon.github.io/2014/02/11/Don%27t-Use-Code-Beyond-Its-Expiration-Date/

<comment><USER2> The problem isn't really code bloat, bloat will happen. The problem is that the original code was not made to be expandable as the scope of the project changed.

Within an organization making code that is extendable and flexible is often VERY difficult, and it can be a VERY hard sell initially. Why spend an extra 8 weeks on a project standardizing how socket intercommunication will be handled internally between your own project(s) code, when you only have 2-3 projects? It sounds like a complete waste!

But in reality it isn't.

Adding features, and changing operations are one of the most common things you'll do with tools on hand. Not planning for the future is the easiest way to ensure the future will kick you when your down.

This difference of 8-10 weeks can be the difference between your code working for 2 years, and your code working for 15.</comment>


Cog Blog: We are very happy to make the following announcement - <AUTHOR> http://www.mirandabanda.org/cogblog/2016/08/25/we-are-very-happy-to-make-the-following-announcement/ <comment><USER2> The title might be better as "Smalltalk company Cog, adds key developers".</comment>


A free escape for creatives – perfect with coffee and less calories than a biscuit - <AUTHOR> http://www.littlewalden.com <comment><AUTHOR> I'd love feedback on this side project - it's something I'd love to make even better and maintain as a free resource.

Please share any content you think creatives might enjoy.</comment>


Look ma, no "master": decentralized integration - <AUTHOR> http://make.bubble.is/post/79276393023/look-ma-no-master-decentralized-integration

<comment><USER2> I like the idea, except I'd prefer an option to rebase rather than merge when my code is out of date relative to upstream.

Merge is for when a major line of development departs. A minor feature written by a single developer is better as a rebase because it makes your history easier to understand.

Some people are purists who say "But that destroys history! It wasn't what actually happened!" Say that you implement Feature X. Six months later you want to implement Feature Y, and you say "I know that Feature X is similar enough to Feature Y, so I want to consult the patch for Feature X to see some working code that hooks into the interrupt vector table."

You don't want to see a sequence of six patches against different master commits, the first five of which don't even compile. You want to see a single clean patch. If you don't squash and rebase unclean patches, you're hobbling future maintenance that needs to look at that code.

You don't want to use Git to preserve what actually happened unless you're a historian. If you're a developer whose main goal is to get stuff done, you want to use Git in a way that makes the code as easy as possible for people unfamiliar with it to understand -- and months or years from now, your future self will probably be somewhat unfamiliar with the code you're writing today!

<comment><USER3> your last paragraph sums it all up the best it deserves more than just one +1. git is a tool to shape the codebase into a quality piece. i usually have about 8-12 private branches that needs others' commit before i can rebase and commit. in these branches i can test and play before anyone gets hurt.

</comment></comment><comment><USER4> Awesome. Just this past weekend I've been working on something similar. It's never been more obvious that continuous integration was developed pre-git than today. Everything about our workflow is distributed, why is the thing that blocks our code from going to production so centralized? Heroku built a company out of using git post-receive hooks, I can only hope we will find other interesting ways of using git to solve integration issues. Maybe someday we will be overusing git, but I don't think we're even close to that yet.</comment>


Ask HN: Where can one turn for design help/critiques? - <AUTHOR>

If you have a product design and you want some honest design critiques, is there a place to get those? <comment><USER2> Dribbble and Behance have proved to be great networks. Forrst is being revived again so thats where. I've seen most people turn to their social networks to get feedback and critique though.

I built something for private feedback which we just posted to HN in fact. (Lucky to see this post!) [https://news.ycombinator.com/item?id=5862176](https://news.ycombinator.com/item?id=5862176)

<comment><USER3> Dribbe and behance is for designers. The way I read this, it's a client looking for feedback from work done by designers. One thing: if you are looking for feedback make sure to also post the brief and the budget. Otherwise you'll receive feedback with no context.

</comment></comment><comment><USER4> Dribbble.com

<comment><AUTHOR> We hired a designer, just not sure if the design is quite _there_ yet, so I don't know if we can post his work to dribbble/behance

<comment><USER4> Dribbble isn't about showing off (well, not just). The people there can help you, and the least thing you want to do is find yourself working too much hours on a design.</comment></comment></comment>


Sears vs. The American Manufacturer - <AUTHOR> http://www.nytimes.com/2012/11/09/business/popular-wrench-fights-a-chinese-rival.html

<comment><AUTHOR> How can we have "free trade" and still have on-shore manufacturing succeed?

<comment><USER2> Higher quality product, better customer service, better returns policy.

Make the experience painless for the user, at every stage of the product's lifecycle.</comment></comment>