Understanding Daemons - <AUTHOR> https://blog.digitalbunker.dev/2020/09/03/understanding-daemons-unix/ <comment><USER2> With systemd (and afaik other service managers) you don't need/should to do all that daemonization dance. The application can run in the foreground, keep any fds open, don't worry about tty etc because the service manager will take care of them for you. As a cherry on top, anything you write on stdout gets automatically forwarded to journald or wherever.

further reading [https://www.man7.org/linux/man- pages/man7/daemon.7.html](https://www.man7.org/linux/man- pages/man7/daemon.7.html)

<comment><USER3> The more I use systemd the more I love it. It simplifies so much, and adds all the little features I see so many projects using custom implementations for.

The people who keep complaining about it seem more and more like children who just refuse to learn something new and better because they've already stumbled through all the holes it fills.

<comment><USER4> I was a fan of upstart. It was simple, it knew how to perform the task it did it, it didn't try to be everything plus the kitchen sink, it worked well and it didn't get its tendrils in everything like systemd does (something that concerns me as it increases the attack surface).

It was a technically superior solution murdered by politics.

What's worse was all of the people who were going "why are you moaning? what's wrong? systemd _is still_ an improvement on sysvinit!" as if being better than a bunch of bash scripts held together with bits of sticky tape and string was all the qualification needed to be PID 1.

<comment><USER5> People liked to paint it as politics, but there were technical critiques such as Russ Allbery's for starters.

* [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727708#172...](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727708#1729)

And yes, people do erroneously paint it as only a choice between van Smoorenburg init+rc and systemd, as if they were the only two possibilities, when in fact in the Debian Hoo-Hah (for one) it was effectively a choice between systemd, upstart, and OpenRC, nearly all parties agreeing at one point in the proceedings that van Smoorenburg init+rc was last choice, either before or after "further discussion".

* [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727708#672...](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727708#6729)

<comment><USER4> The criticisms levied at upstart there are more about lack of features, not really about overall approach. It's easier to add features than it is to fix a deficient design.

Moreover, I'm not really so sure a couple of those features even _belong_ in an init system.

Debian's decision effectively doomed upstart and led to an init system monoculture. The practical upshot is that no competition for systemd means no pressure to improve. Even for systemd it was a bad decision.

<comment><USER5> Actually it was about overall approach. Read M. Allberry's further discussions in that bug with Colin Watson, Steve Langasek, and others. Josh Triplett critiques it as well. Cameron Norman's discussion with Nikolaus Rath is also relevant. There were actually quite a lot of technical discussions about the fundamentals of the various architectures. Ian Jackson's and others' discussions about readiness protocols is worth reading, for example.

One cannot truly portray this as either "politics" or only about lack of features.

* [http://jdebp.uk./FGA/debian-systemd-packaging-hoo-hah.html](http://jdebp.uk./FGA/debian-systemd-packaging-hoo-hah.html)

* [http://jdebp.uk./FGA/unix-daemon-readiness-protocol-problems...](http://jdebp.uk./FGA/unix-daemon-readiness-protocol-problems.html#Choice)

</comment></comment></comment></comment></comment></comment><comment><USER6> > Simply put, a daemon (pronounced dee-mon) is an intentionally orphaned > background process. Additionally, daemons are detached from the terminal in > which they're spawned, operate without user interaction, and are descendants > of the system's init process.

A memorable way to think about this is that a daemon is a child process whose parent has literally disowned it, forked off, and died.

<comment><USER5> ... except that that's most definitely _not_ the defining characteristic, and the defining characteristic is rather that the process isn't part of a login session, which ironically on modern operating systems with all of the one-way trapdoors that now exist one cannot reach by forking.

* [https://unix.stackexchange.com/a/606902/5132](https://unix.stackexchange.com/a/606902/5132)

Thinking that forking makes a dæmon is much the same error as thinking that su drops privileges, it conflates what happend to be a _mechanism_ from years ago with the actual purpose, totally missing that things have changed since (long since, decades ago in fact).

<comment><USER7> What do you mean by the one-way trapdoors?

<comment><USER5> See the StackExchange answer.

</comment></comment></comment></comment><comment><USER8> Of all the great content in APUE, I think W. Richard Stevens' (RIP) coverage of daemonization is the only piece I've ever used.

Fortunately I recently replaced my lost 1st edition with a 2nd edition, and the coverage looks similar. From what I can see there are two details left out of this article:

* _Why_ changing the working directory is important (so the daemon doesn't accidentally prevent a file system from being unmounted in the future).

* WRS emphasized logging.

Some of the details are different (umask as the first function instead of the last), but the highlights are comparable.

</comment><comment><USER9> I was hoping this would be an article for beginners to understand daemons, as in the Ancient Greek daimon (δαίμων: "god", "godlike", "power", "fate") :-)

Growing up on a (quasi fundamentalist) christian household, daemons were for a long while a very real threat, and my mom would not allow me to watch horror movies, "receive things from strangers", an other procedures to protect us from "inviting the daemons home".

My rational mind leaves no room for such creatures these days, but even so under the right circumstances, sometimes my lizard brain begins to think maybe the Bible (and my mom for that matter) was right :-). Hard to erase some emotive memories from childhood I guess.

A while ago I read this book [1] which is pretty cool, covers the mind mechanisms behind things like the placebo effect, "daemonic possession", alien abductions, mass hysteria, out of body experiences, etc...

1: [https://www.suggestibleyou.com/](https://www.suggestibleyou.com/)

<comment><USER10> Usually I see δαίμων latinized as "demon" not "daemon". You got me looking and I found an interesting discussion on these words over on stack exchange [1]. TL;DR, "daemon" sometimes means "demon", but without the negative connotations, other times it is just an alternative spelling.

[1] [https://english.stackexchange.com/questions/39266/what-is- th...](https://english.stackexchange.com/questions/39266/what-is-the- difference-between-daemon-and-demon-in-a-religious-context)

<comment><USER9> Oh! The good daemons! "benevolent or benign nature spirits...". Not in the Judeo-Christian tradition, for sure :-)

Also got me curious about the C.S. ethymology of the word. According to the venerable Jargon File (which has entries for both "daemon" and "demon"), it is named in honor of one of Maxwell's thought experiments! [1]

1: [http://www.catb.org/jargon/html/D/daemon.html](http://www.catb.org/jargon/html/D/daemon.html)

<comment><USER10> Ahh, neat. Thanks for the link.

</comment></comment></comment></comment><comment><USER11> Going by the spelling, isn't it pronouced day-mon?

<comment><USER12> No, in the same way that paediatrician isn't pronounced paydiatrician

<comment><USER13> To be fair, it's not obvious how to pronounce a way it's spelt. e.g. "record" and "record" are pronounced differently, but have the same spelling.

The poem "Dearest creature in creation" is a fun illustration of the differences between spelling and pronunciation.

<comment><USER14> It's called " _The Chaos_ ":

[https://en.wikisource.org/wiki/The_Chaos](https://en.wikisource.org/wiki/The_Chaos)

</comment></comment></comment></comment><comment><USER15> This function may do mostly the right thing in a process dedicated to it, but it is not safe to call as part of a more complex process - especially a multi- threaded one.

For example, malloc() may be holding on to a mutex in the parent process (on another thread), so subsequent malloc() calls in the child process will block waiting for the mutex to be released. Closing the file handles may help if this was a kernel mutex, but it may not help if this was a user-space mutex.

In general, fork() without exec() is only safe as the first thing done in a process.

Also, it looks like there is a minor race condition in the implementation: since the original process exit()s immediately after the fork(), control will return to its parent, which may close the session - this could happen before the child had a chance to call setsid() and detach from the parent session.

</comment><comment><USER16> A good practice for a classical daemon and any program in general after closing all descriptors is to reopen first three (0,1,2) to /dev/null. After that, any forgotten or unexpected diagnostics (rare printf in third party library) would not corrupt your open files.

<comment><USER5> No, that's a _bad_ practice, because since the late 1990s service management subsystems have been as the norm setting up standard output and standard error so that they are connected to loggers. daemontools did it, once it gained svscan; and so did the other toolsets in the daemontools family such as runit, perp, s6, and others. systemd also does it, but is very much a latecomer here.

Furthermore, this bad practice lands one in hot water with library functions, including ironically syslog client libraries, that open and retain file descriptors internally for their own purposes. Yet another case of this was just on Hacker News this week, in fact, at [https://news.ycombinator.com/item?id=24329540](https://news.ycombinator.com/item?id=24329540) .

<comment><USER16> That's still a good practice, _if_ you close descriptors. Such criticism and trouble comes from environments that are unable to follow the routine because reasons, e.g. they openlog() and construct other objects before daemonizing. Given how much can happen before python's main() to be called, it is obvious that daemonizing python-anything is a bad idea to start with. It only works for few controlled steps at int main(), after that you're screwed. All these pitfalls are discussed in literature, the real problem is that barely anyone bothers to read it and think for a second on their options. One of them being to use a proper service manager instead, like systemd.

<comment><USER5> No-one can follow the routine. "daemonization" is a fallacy.

</comment></comment></comment></comment><comment><USER17> > Conventionally, daemon process names end with the letter "d". If you're > interested in seeing all daemons installed on your Linux machine, use this > command:

> service --status-all

      $ service --status-all
      bash: service: command not found

<comment><USER18> Perhaps you're trying to make a point, but the command should work with /usr/sbin/service or prefaced by sudo. If you run `whereis service` you can see that the binary is located in /usr/sbin (at least on Debian/Ubuntu systems) which is typically placed in the PATH of root but not normal users. However --status-all doesn't require elevated permissions so the command works if you provide the full path.

<comment><USER17> A bit of both. My computer does not have the "service" command at all. While it's true that many systems still do, it's typically there as a legacy compatibility layer, to translate SysV style commands to systemd.

So while the command might work for many readers, I don't think it's a good idea to send beginners that way, and its inclusion (without any footnotes or other qualifications) suggests that the author's knowledge is out of date.

</comment></comment></comment><comment><USER19> So how does this work in windows? Edit, as for some reason it's getting downvoted: In windows, do you have to do the double fork etc? Do you have to close FDs etc?

<comment><USER15> Windows doesn't have fork() or any direct equivalent (instead, Windows has the CreateProcess() familiy of functions, that work essentially like fork()+exec()).

Now depending on what you actually want to do, you have some options:

\- Use the Windows Services API to ask Windows to start and manage your process as a system service - this is closest to a SystemD demon

\- Create a GUI process with WindowStyle=hidden (this will be part of the current user's session)

\- Create a Console process with the DETACHED_PROCESS flag, which should work similarly to the above

\- Use one of the CreateProcessAsUser() family of functions to create a process for another user - this should allow the process to run in the background, and allow it to persist even if the current user signs off

In all cases above, you can simply tell CreateProcess* that the child process should not inherit any FDs. You should probably also use the PROC_THREAD_ATTRIBUTE_PARENT_PROCESS flag to spawn this process as the child of some other long-running process, to ensure that the child process is not part of the same Job that the current process may be (usually, when a Job is finished, all processes in that job and any child they spawned, recursively, are killed).

<comment><USER20> Jobs, more precisely, nested jobs, are one of the best things (IMHO) that were added to Windows 8 from a technical point of view (then again, there ain't many good things added in Windows 8). I had to write a work-manager sort of application that would need to start worker subprocesses (which may also start some other subprocesses, which may or may not be programs under my control) and one of the requirements was that if the main process crashed, all the worker processes should be terminated (imagine if a part of what a worker process is supposed to do is to listen on some well-known TCP ports and provide an HTTP API on it: you can't restart the main process without killing the workers off first).

On Linux, it turned out to be surprisingly tricky. Process groups and sessions are not nested, you can easily break out of them and in fact there were some programs we needed to use that insisted on doing daemonization. Thankfully the most important one had a "\--foreground" flag but it still was buggy: this program sends SIGTERM to its process group as part of a shutdown — so it kills its parent, too. Amazing. In the end I believe we ended running each worker process as a separate Docker container.

Then there is a dance of waiting (or not waiting? SIGCHILD is truly horrible) on children PIDs to detect the crashes and unexpected hang in the shutdown (the worker process sends "I am done" notification to the parent, but then for some reason doesn't exit). The main process had to be made a sub-reaper to do all of that more or less reliably, and even then there were some strange sightings (signal handling is fun!).

On Windows, we just shoved each worker process into its own unbreakable-from job, and that was it. The main process dies for whatever reasons, its children just disappear. A worker process dies, its children just disappear, without affecting any other worker processes and their children. Detecting termination of the child processes too was a breeze: on Windows, when you spawn a child process you get not only its PID, but also a handle (think "file descriptor") to it. This handle refers exactly to this process, and you can (interruptibly) wait on it, and when the last open descriptor to a process is closed, the process is deleted from the process table. That's why BTW there is no PID 1 that is constantly reaping its children on Windows: each process implicitly has its own handle alway open, so if the parent exits before the child does, nothing bad happens: The child process had 2 open handles on it, now it has 1. When it itself exits, the last handle is dropped, and the slot in the process table is cleaned.

TL;DR: Process management is horrible, use Erlang.

</comment></comment></comment><comment><USER21> Very timely to see this. I was trying to daemonize some celery workers/celery tasks and I wasn't sure how to go about it. Glad this came up

</comment><comment><USER22> They have a double fork - forked tongue and forked tail, and often cannot be killed through normal means, re-spawning with the aid of an even greater evil known as SystemD.</comment>


MS TextWorld: open-source engine that both generates and simulates text games - <AUTHOR> https://www.microsoft.com/en-us/research/project/textworld/ <comment><USER2> They won a text adventure AI competition as well [1][2] and is now running their own with $2000 reward at stake [3]. Getting an agent to solve unseen RPG games like zork or modern games like Zelda and Witcher would be awesome and seriously impressive, but I don't think anybody is even close to that right now.

[1] [https://arxiv.org/abs/1902.04259](https://arxiv.org/abs/1902.04259)

[2] [https://github.com/Microsoft/nail_agent](https://github.com/Microsoft/nail_agent)

[3] [http://aka.ms/textworld-challenge](http://aka.ms/textworld-challenge)

<comment><USER3> I would be genuinely surprised if anyone can build an agent that can solve Zelda for the NES without any foreknowledge of the game. So much of that game is bound up in the human cultural tropes associated with the monomyth. To finish the game you need to have at least a basic working knowledge of what it means to be a hero. There is no obvious, short-term indicator of progress the way there is in Mario (increase the x position to win).

The process of obtaining just a single piece of the Triforce (the primary indicator of progress) is so complicated that you'll essentially never see it happen with random button-pressing. So any agent attempting to play and win Zelda is going to need to develop its own model of the game world and try to understand things that way. I don't see how that is supposed to happen though, without any context.

<comment><USER4> Zelda was simply a means for Nintendo to sell Nintendo Magazine subscriptions. They had to have made a killing on subscriptions, and they were absolutely required for solving games like Zelda. For example, you have to place a bomb in this one obscure location without any in-game clues as to said location. Or burn a tree.

Here's the connection to your post. I think a human and a computer have about the same chance of solving Zelda. At least a computer could be programmed to drop bombs in every rock wall in the game. For a human, that would be too brain-numbing hard.

<comment><USER5> You definitely do not need external hints to solve Zelda games. I've finished many Zelda titles without ever getting any hints. I've even finished A Link to the Past in German by using a dictionary to translate dialogue. Before that, I had not known a word of German.

<comment><USER6> He is talking specifically about Legend of Zelda, or Zelda for short, the first game in the series. [https://en.wikipedia.org/wiki/The_Legend_of_Zelda_(video_gam...](https://en.wikipedia.org/wiki/The_Legend_of_Zelda_\(video_game\))

<comment><USER5> Fair enough. The tree burning should had given me the hint.

That said, I did finish the original LOZ without hints too.

</comment></comment></comment></comment></comment></comment><comment><USER7> > TextWorld requires Python 3 and only supports Linux and macOS systems at the > moment.

Truly, this is a new Microsoft.

<comment><USER8> Yes and No. I think they understand the very real limitations of Windows and how developers and power users hate it.

Let's compare and contrast the two. Linux has a usable shell that has GCC, Bash, Awk, dozens of specific commands that can be piped together, Perl, Python, TCL...etc all built-in and easily composable. Windows has well...CMD which is horrible, Batch files, VBScript (deprecated), VBA, and Powershell (a mess). If you install Visual Studio Tools you can get a C++ compiler and .NET languages like C# and VB.NET. Linux might have its faults, but the design is coherant and you can get stuff done. With Windows your only options are use a GUI or write at least a 1/2 page of code for something that is a oneliner in Linux. Powershell is a sometimes great (mostly meh) attempt to right this, but the everything is an object design is just simply more complex than the Unix philosophy of strings, pipes, and interoperable pieces. It seems like the Windows approach is to recognize the failing, while keeping in mind that a lot of desktop software uses Windows. So give developers Linux via WSL and people can still run their other Windows only software without Wine.

<comment><USER9> Or maybe this came out of an MS R&D arm that had free reign on design and it's not some overall signal that MS has admitted defeat to Linux on the shell.

I have a hard time believing this couldn't have just as easily been windows based with the exact same amount of effort. Windows has fantastic developer tooling that I think you're downplaying quite a bit.

> Powershell is a sometimes great (mostly meh)

Powershell has a different philosophy for sure - but I have seen sys admins do some pretty powerful things with it, and quickly. What can a Linux shell do that power shell can't (that isn't specific to Linux platform needs)?

<comment><USER8> Quite a bit in my opinion. Of course if both are Turing complete the answer is nothing, but efficiency in development time and speed should be a factor.

To give an example, suppose you have a directory with 20 .CSV files that are all 200 MB. This is extremely common for me and the files are much larger for many developers. Say you want to extract certain data matching a string and then sort the whole thing into a new file. In Linux this is really simple with a oneliner and it also runs really fast. Powershell has a oneliner capability, but it is quite frankly abysmally slow. The Linux solution takes about 5 seconds and the Powershell takes 15 minutes. Now there is a way to speed up the powershell code. Running it in parallel helps, but the true performance aid comes in calling some C# within the script and now it is definitely not a oneliner. That is the overall issue. The Unix philosophy is simple to execute, understand, and fast to run. The Windows is complex to understand and often slow. Powershell is great in some instances. The language is certainly better than Bash, but if I have to constantly use C# with it...you might as well just use C#.

<comment><USER10> for anything more complex, I often just defer to a node/js script... mostly out of more comfort, but also because it runs everywhere I want it to (linux, windows, mac), usually with minimal effort.

<comment><USER8> There's obviously nothing inherantly wrong with that and it's great that you can run it anywhere. However, isn't it a shame you have to resort to that? Shouldn't there be a way to easily specify to the computer what you want without having to go so far outside the OS? Obviously this isn't Star Trek where you can ask the computer to do something and it knows exactly what you want. At some level of complexity you will have to start writing real code and at that point I agree it doesn't matter a whole lot whether you're using Python, Bash, C#, NodeJS, or Haskell. However, if you're doing something really simple like loop over some files that match a string in a directory, parse the files, and make a report, that should be easy. If your first thought is "let me go open Visual Studio"...then your OS has failed in my opinion.

<comment><USER10> Fair enough... tbh, if Git for Windows, registered `.sh` and `.bash` file extensions to execute via that version of Bash, I'd be content with that... as it is, I have re/used a little bash even in windows at work (everyone has git for windows) and have certain things installed via script+chocolatey. Second pass/configuration, etc, calls a bash script in windows... The first part I also have a bash script for mac, and the second script is shared.

That said, JS/Node is often my goto... I also do a fair amount of `npm i -g UTIL` mainly out of convenience between platforms. There isn't a really universal scripting system I can completely rely on where at least one of the three aren't oddities.

I do use bash pretty much everywhere, and that's what I _use_ ... it's just when I'm writing a script for reuse, I'm more inclined to use NodeJS.

<comment><USER8> Gotcha. Thanks for the additional thoughts!

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> What is the difference between _TextWorld_ and a design system for interactive fiction games like _Inform_ [1]?

It seems to be that the former has natural language processing/semantics integrated, while the latter relies on a rather old school approach to text- based games. Or am I mistaken?

[1] [http://inform7.com/](http://inform7.com/)

<comment><USER12> Hi, I'm with the TextWorld team.

TextWorld actually uses Inform7. The framework first builds a game object (e.g. objects, locations, quests) according to some settings. Then, it converts it into Inform7 code before being compiled into a playable game. See [https://imgur.com/oOcy5kk](https://imgur.com/oOcy5kk)

<comment><USER13> How could you run a TextWorld game in a web browser? Use a Glulx file interpreter like Quixe?

[https://eblong.com/zarf/glulx/quixe/](https://eblong.com/zarf/glulx/quixe/)

<comment><USER14> The "try it" example on the TextWorld page uses Parchment: [https://github.com/curiousdannii/parchment](https://github.com/curiousdannii/parchment)

</comment></comment></comment></comment><comment><USER15> There are interesting parallels between problem solving textworld agents and smart hypermedia client agents.

</comment><comment><USER16> Why not show a simple map of the room you're in, at least? It's a fairly simple change, but would make the orientation in space and remembering of location and few previous locations much more intuitive.

<comment><USER17> TextWorld environments have a render function that renders an SVG of the room and your inventory ([https://github.com/Microsoft/TextWorld#extras](https://github.com/Microsoft/TextWorld#extras))

<comment><USER12> Also, those games are intended for Reinforcement Learning agents, not Humans.

</comment></comment></comment><comment><USER18> Amazing! Yesterday while taking a walk I thought exactly about that ! A text based game and a text game engine.

</comment><comment><USER19> Is this Microsoft's response to Google's Stadia?

<comment><USER20> Microsoft's approach would likely be xCloud. [https://www.theverge.com/2019/3/13/18263405/microsoft- xcloud...](https://www.theverge.com/2019/3/13/18263405/microsoft-xcloud-game- streaming-demo-video)</comment></comment>


Show HN: Authority: ORM-neutral, OO Rails authorization - <AUTHOR> https://github.com/nathanl/authority Authority is my new Rails authorization plugin. Why another one?
Some things that make it different:
- 100% ORM neutral - No new DSL to learn; just plain Ruby methods - Authorization logic goes in authorizer classes, so any inheritance pattern you want is fine - Helps you organize your logic, but that logic can be anything you can write in Ruby: check permissions in a database, or how many points a user has (like StackOverflow), or a weather report from London for all it cares.
Extensive tests and friendly documentation await you at the repo: http://github.com/nathanl/authority <comment><AUTHOR> Authority is my new Rails authorization plugin. Why another one?

Some things that make it different:

\- 100% ORM neutral

\- No new DSL to learn; just plain Ruby methods

\- Authorization logic goes in authorizer classes, so any inheritance pattern you want is fine

\- Helps you organize your logic, but that logic can be anything you can write in Ruby: check permissions in a database, or how many points a user has (like StackOverflow), or a weather report from London for all it cares.

Extensive tests and friendly documentation await you at the repo: <http://github.com/nathanl/authority></comment>


Contract workers (USA): how do you calculate how many $$ to put away for taxes? - <AUTHOR> For people doing contract work in the USA who are working on a corp to corp basis, how are you calculating how many $$$ per month to put away for taxes for next tax season, and what is your preferred way of "parking" that $$$ so it earns some good interest? <comment><USER2> When I was freelancing I'd put a third of every client payment in a separate savings account. Wasn't really a sophisticated calculation, just making sure the money was set aside. As pointed out below, the need to make payments out of that account limits you to liquid cash accounts. Putting that money into a risky account to get a little extra interest seems like asking for trouble in the long term.

<comment><USER3> I also withheld a third and it was good enough. I would deposit checks in a business account and then transfer 2/3 of the amount to savings. I'd also pay for anything business related from the business checking account/card.

</comment></comment><comment><USER4> You can't really "park" it because you are supposed to file taxes every quarter. I do between 50% and 33% depending upon the needs at home. NEVER less than 33%. It used to be 40% but with the Trump tax law changes now we go as shallow as 33%. We bill once a month.

<comment><AUTHOR> Thanks for the response. Do you have any recommendations for tax software, or do you have your accountant handle tax payments? I'm a sole proprietor now but am going to upgrade to an LLC soon.

<comment><USER5> Filing for sole proprietor is really easy. You just make estimated tax payments. It really depends on how much income you generate. If you file quarterly, you're doing well I think.

Accountant can do more than taxes, so they are more like a business ally. Tax agents can file taxes for you and represent you if there's any tax issues.

I've been able to get by with Quicken & TurboTax for sole proprietor.

For LLC, hard to say. QuickBooks desktop or online seem to be the most common. It really depends on how complicated your business needs are I think.</comment></comment></comment>


Kevin Fox on recent Google UX changes: from strange-to-me to just-plain-crazy - <AUTHOR> https://plus.google.com/117599103108596130864/posts/47yZLnxcnhv

<comment><USER2> > First up is the 'new tab' chicklet in the Chrome tab bar. Somewhere around > Chrome 16 the '+' disappeared from it, leaving a little ghost of a button > that, to my mind, wouldn't be recognized for what it was by a user who > hadn't already formed their mental model on earlier versions of Chrome.

I'd noticed this and it was very irritating! I assumed it was a bug and for whatever reason the image was missing, not that they had intentionally removed it. That's nonsensical to me, without the + being there it indicates... nothing. His point is exactly right.

<comment><USER3> The lack of the '+' was annoying to me at first. I don't seem to miss it anymore though, but then I do use the keyboard a lot for opening up new tabs.

<comment><USER4> We all know Chrome very well, though. If you launched it for the first time it's very unclear what that button does- and given that the only thing it _does_ do is open a tab, why remove the +?

<comment><USER5> I think in a couple of months there will be a "+1" button at the top bar of Chrome so you can click it to "like" any page.. And having a "+" button next to it would've been confusing.

<comment><USER6> Mind blown. Also, I hate that you might be right.

</comment></comment></comment></comment></comment><comment><USER7> Search results not carrying over to Google News when you click the black header tab is something that drove me crazy for a good week until I trained myself to use the left-side menu for switching between result types.

It doesn't make sense, particularly when "News" is the ONLY tab which doesn't carry the search terms over. Try it with Images, YouTube and Maps; wonderful. I wouldn't necessarily expect convention to follow with Gmail or Documents, sure, but NEWS? Come on!

The missing + on Chrome made me think I had a screwy update.

<comment><USER8> > The missing + on Chrome made me think I had a screwy update.

I thought the same. Now that I know it was intentional, it actually kind of bothers me. Seems like something is missing. Fortunately, shortcuts mean I almost never have to look up there :)

</comment></comment><comment><USER8> I'm most confused about Google's decision to remove the links from the logos. This is a convention engrained in the interwebs and I can't come up with a single reason why they would change it. Sure maybe inexperienced users wouldn't know the functionality exists, but when has that ever been a reason to remove a feature?

I think there was a HN discussion about this recently, but I missed it. Anybody know why they made this decision?

<comment><USER7> Purely speculation, but it seems like the only reason they'd do this is to free up the space for a future use case? While it will probably annoy/stump a few people for a second or two, ultimately people will just learn not to click on the logo.

At that point, the Google logo could become... err... well they tried to turn it into an all-google-properties dropdown previously, so who knows, maybe they'll try again later?

<comment><USER9> "While it will probably annoy/stump a few people for a second or two, ultimately people will just learn not to click on the logo."

No trust me, you will try and click it everyday. My former college had, and still has, a link-less logo; that didn't stop anyone from trying to click it. It was actually a routine point of conversation in the beginning web classes about just how bad of a design flaw that was because the rest of the web adds a hyperlink to logo's.

If you have a company-esque logo, it should always, always, always take you to either the landing page; or your personal account page if in a logged-in state; depending on your personal needs.

</comment></comment></comment><comment><USER10> The + would have been removed from the Chrome UI because it reduces Google's claim to the "+" mark in their Google+ branding. Google wants people to think "Google+" when they see a button with a + on it (not "create new tab").

<comment><USER11> I think of addition and I don't see that changing any time soon.

<comment><USER12> I don't see why that would stop them for trying. For instance, search and Google are interchangeable in many discussions. ;)

The above is a bit tongue in cheek. That said, I see where grandparent is coming from. Chrome is Google's web-browser, and these Google+ icons are very often near the top of your browser. I can see how they could come to the conclusion that this could save some confusion. Say, friend calls to help and says "Click the plus sign at the top of your browser"...

Now, I don't think it's a good (or bad) decision. But the fact that I cannot click the logotypes is annoying me to no end.

</comment></comment></comment><comment><USER13> Its not just Google - most 'UI/UX experts' are actually really poor. Look at the mobile phone world for instance - it wasn't until the iphone that most people realised that every major company had overlooked the possibilities....

Company owners need not just to employ 'experts' but actually take an interest in these things themselves, which is rare. Otherwise you tend to end up with these kind of highly qualified fools.

I miss Google's early (engineer-led) minimalism...

</comment><comment><USER14> I've been using the logo-without-link UI for about two months, and I no longer even think about clicking the logo. It no longer registers as something that would make sense to do.

The designs of the individual applications provide stronger action buttons than a generic "reset" button would. This encourages users to be more efficient; instead of "returning home" after reading an email, you'll click "Archive" and have less clutter in your inbox. Similarly, Google+ provides many choices for what to do next. Maybe you want to look at your circles or photos instead of your stream. The new UI makes them all equally easy.

I feel like people use the logo as a "I'm bored, show me new stuff" button, but that is pointless because the Google apps automatically update as new stuff becomes available for you. Save yourself a useless click.

I wouldn't have made this change, but it makes a lot of sense if you think about it.

(As for the + going missing in Chrome... I can't even begin to explain that one.)

</comment><comment><USER15> Has anyone else been confused by the fact that in gmail when you are viewing an email there are two buttons with arrows pointing up and to the left. One takes you back to the inbox and the other replies to the email. One is curvy the other has a right angle. One is on the left and one is on the right. Neither have labels. Can I go back to the old design now please.

</comment><comment><USER16> The new Gmail is worse than the last one. I have dropped a few feedback lines. A few examples:

\- The decoupling of reply box and the email "cards". \- The removal of colors in the names, which was very useful to guide yourself through the different actors in a email conversation.

Just to new a few. The new Gmail pretends to be better, but it just can't cut it off.

</comment><comment><USER17> Honestly, google's UI for many things is just awful. I recently had to help an aunt who was trying to import contacts from her old gmail account into her new gmail account. It's a simple enough task if you're on our side of the digital divide, but it's impossible for anyone who isn't "good with computers." Of course the documentation for doing this was woefully out of date and unhelpful, so I couldn't just point her to that. Even the simple step of signing out of your gmail account is totally hidden and only available when you just try clicking on things (wich "we" do, but "they" don't). To get to your contacts you click on the red word "Gmail" (obvious, huh?), and then you have to click on "more", and then "export" (export what?). Absolutely none of this would be obvious to a non-savvy user. At the least they could provide up- to-date documentation or a more useful "help" feature. Gmail is great for me as a savvy user who employs all of the keyboard shortcuts, ala vim. But I can't blame the older generation for just giving up whenever they need to do anything slightly out of the ordinary, because we're just not designing/developing products that are usable to them.

</comment><comment><USER18> Agree wholeheartedly with this post. Thing is; I have _never_ come across a so-called user experience expert that had a single particularly insightful thing to say about a user interface.

Indeed, my experience has been that I get more insight from "lay" people than these guys.

I can't even be bothered to count the number of different items on the Google menu. Actually I just have... it's 17 items (for me), plus an "even more" item. I'd love to see the analytics for that one!

Now, you might forgive them because, well, if you have lots of products then you need a way to navigate to them... EXCEPT the millions they spend every year on making menu-based navigation completely redundant by their world- beating search.

If I want Google Maps, I will either type "maps" into Chrome's address bar, which auto-completes it, OR (as most non technies will do, I hazard a guess) I will type something (e.g "maps") directly into Google.

The unfortunate thing is that this is not just Google. It 99.9% of websites I have ever visited. OK, so most small companies do not have the resources for a dedicated UX person, but the only big-company website I can think of with a sane UX is Apple. Is it really all that hard? Actually I suspect it is - it's Conway's Law in full effect.

</comment><comment><USER19> What I find really shocking is how the UX of the main google search page has deteriorated for me. It gives me all sorts of crap that doesn't make any sense ... and I don't even know how to complain since all the content is personalized to me (e.g. photographs). Google's search page used to be an Internet treasure ... for me, it is now another example of how the quest for revenue growth destroys beautiful products.

<comment><USER20> Not just confusing...also buggy. I would say that about 1% of the time Google Instant just totally fails for me - I type a word or phrase and hit enter, and I just get an empty white box where the search results should be. To fix it I have to manually click the blue search icon.

</comment></comment><comment><USER21> I like the plus label removed.

For someone who _never ever_ used a tabbed browser, "+" doesn't mean "new tab". It doesn't even mean "add a thing". It means "sum".

Web browser is the most basic application to use this icon.

The icon just doesn't help because user has no prior knowledge of the metaphor anyway.

<comment><USER22> +1

</comment></comment><comment><USER23> My two biggest annoyances with Gmail:

One of my accounts has this bar at the top reminding me that a couple accounts are linked. It says this notice will remain for a few days, then disappear... it's been there now for 3 or 4 months.

Secondly, Gmail auto-trims signatures. This is annoying by itself, because I don't think Google should get to decide, by fiat, that signatures are passe. Worse, the trimming often trims much more than intended -- sometimes whole messages. It's totally unprofessional when e-mails to clients & partners go out sans signature, closing, and the bottom half of my e-mail.

Naturally, getting a hold of Google for help with this is a laughable Sisyphean endeavor.

<comment><USER24> I agree. The auto-trimming of the signature is another good example of going to far. Gmail used to elide repeated content, and would grey the signature. Eliding it behind a click changes the emotional tone of the messages that people send to you, and that's a step further than a UX should take.

</comment></comment><comment><USER25> The last few days, gmail has been a pain for me to use specifically because I can no longer click on the logo to return to my inbox after viewing an email thread. Navigating my mouse to the "Inbox" link in the nav menu is difficult because I have to actively distinguish "Inbox" between all the other categories that look similar, whereas I can click on the logo without thinking.

</comment><comment><USER26> I was more annoyed by the little head to the left of the tabs in Chrome which indicates the current profile. I don't use profiles. But I've just discovered that the head goes away if you delete the sample profiles that they created when they added the feature. Duh.

</comment><comment><USER27> "You will like it! You will get used to it! I know what's best!" The designers will scream to their users.

This may be, just the beginning.

It's not just the "+" missing from the new tab button or the logo issue, it's a LOT of things. Gmail's new "blank sheet of paper" look. The annoying notifications of Google+ that follow you around. I just logged into analytics yesterday and saw the new redesign and I just... my jaw literally dropped. Who the Hell did this?! Is this is a joke? A bad dream? What did we do? Who at Google did we piss off to deserve this? More importantly what's going on in the world of design? Everywhere I look I see designs that look like the crap I used to turn out.

For a moment I even ventured to think that maybe that radioactive water from Japan finally hit the west coast in full force.

Google's new redesign combined with Kotaku, Gawker, and TechCrunch's new redesign, Ubuntu's Unity and Gnome's, and the new Yahoo mail is making 2011 + 2012 the beginning of an era of atrocious UI. Even Microsoft is joining in, by removing the start button. Maybe the designer shortage last year caused companies to hire up a lot of beginner designers.

More likely this is all because Steve Jobs passed away and now every designer in town is trying to take his place. The king of UX has died, the throne is up for grabs, and everyone's eyeing it. Desperately trying to mimic Steve's "forcefully creative" attitude and ignoring all logic and design laws, these new designers are hell bent on overly simplifying and minimizing every interface until there's nothing left. Desperate for fame and glory the designers will infiltrate every company they can find that's hiring. "You will like it! You will get used to it! I know what's best!" The designers will scream to their users.

I bet you it will get worse.

<comment><USER4> _I just logged into analytics yesterday and saw the new redesign and I just... my jaw literally dropped. Who the Hell did this?!_

I'm not just being contrarian when I say this: I like the new Analytics design. I also happen to like the new Gmail design.

I guess what I'm saying is that not everyone hates these changes- I don't need a designer to scream at me to convince me so.

</comment></comment><comment><USER28> I got used to the new gmail thread display, although I agree that the old way was more suggestive, but the missing + in Chrome still bugs me.

</comment><comment> johnx123-up Currently there's no quick link to switch to Google Groups from homepage. I don't know if they're willing to kill Usenet and Groups for G+

</comment><comment><USER29> He's spot on. The removal of the plus to create a new tab in Chrome is bad design, period.

I hadn't noticed the lack of the logo link until someone else pointed it out. Why would anyone reduce ease of navigation, particularly from an object that is going to be there anyway?

I use Gmail as my main email application, and have since they first launched it. They've started to annoy me with the interface changes. I think they've lost some of the intuitive simplicity that made Gmail great. It feels about 10% like Yahoo's extraordinarily horrific web email, and that's a big step down.

<comment><USER30> After the full roll-out of Gmail's new UI, which was seemingly obligatory, my UI reverted to the old interface within a week. Perhaps it has something to do with the fact that I opted-in to the new UI when it was still in beta, and then opted out after quickly becoming dissatisfied with it (I just really can't get over how laggy the mouseover animations are).

In any case, I've noticed that my Gmail querystring looks like this:

      ?ui=2&shva=1

Perhaps adding the ui=2 parameter to your own querystring will cause it to revert to the old interface?

<comment><USER22> Doesn't work for me :-(

<comment><USER31> Nor to me. Interestingly, using <http://mail.google.com/mail/?ui=1> redirects to <http://mail.google.com/mail/?ui=2> !</comment></comment></comment></comment>


Ask HN: Why garbage collection? - <AUTHOR>

C programmers (myself included) can often write correct programs with manual memory management (malloc/free).<p>Why can't a sufficiently capable compiler/language manage its memory based on static analysis of a program?  (i.e. insert its own 'free's where a programmer would have put them) <comment><USER2> They can, and it's basically what LLVM does when you turn on ARC for your Objective-C program.

[http://stackoverflow.com/questions/6385212/how-does-the- new-...](http://stackoverflow.com/questions/6385212/how-does-the-new- automatic-reference-counting-mechanism-work/6418410#6418410)

<comment><AUTHOR> Read all about it and it seems to just be reference counting :-( Not as exciting as it seemed.

<comment><USER3> Well that's kinda in the name. ARC = Automatic Reference Counting.

Besides, who's looking for exciting? It's freedom from stupid memory errors. That's awesome!</comment></comment></comment>


Bertrand Russell: In Praise of Idleness (1932) - <AUTHOR> http://www.zpub.com/notes/idle.html <comment><USER2> There are a number of beautiful places in the United States where it is possible for a person to subsist quite luxuriously on $1200/mo and preserve the ability to throw parties for friends, buy books and tools, etc. As of January a person with such income will have free Medicare in Oregon.

"Fuck You" money is an illusion that keeps you working. The mind loves to believe that having enough of some external thing will give us control, safety, or whatever we most fear the lack of. It isn't true. A man with with excess money is absorbed in concerns of what to do with it and is hardly free. He might be able to say "fuck you" to people, but he can't say "fuck you" to money.

Freedom is measured by the scarcity of our concerns. And happiness, perhaps, by closeness with people to whom we need never say "fuck you" because we love them and accept them fully.

<comment><USER3> yea, but you still need $360k or so to be able to withdraw $1200/month forever without worry. That's still a decent chunk of change. I guess you can save it in 5 years, but if you don't like working those 5 years will be hellaciously long

<comment><USER4> How are you investing $360k to make $1200/month forever without worry?

<comment><USER5> [http://www.mrmoneymustache.com/2012/05/29/how-much-do-i- need...](http://www.mrmoneymustache.com/2012/05/29/how-much-do-i-need-for- retirement/)

See also:

* [http://www.mrmoneymustache.com/2011/05/18/how-to-make-money-...](http://www.mrmoneymustache.com/2011/05/18/how-to-make-money-in-the-stock-market/)

* [http://www.mrmoneymustache.com/2011/04/26/why-hardcore-savin...](http://www.mrmoneymustache.com/2011/04/26/why-hardcore-saving-is-much-more-powerful-than-masterful-investing/)

* [http://www.mrmoneymustache.com/2011/06/06/dude-wheres-my-7-i...](http://www.mrmoneymustache.com/2011/06/06/dude-wheres-my-7-investment-return/)

</comment></comment></comment></comment><comment><USER6> _The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers._

I'm down. We should be massively ramping up the amount of leisure time in our society so that we, as a society, never miss out on a potential Darwin or Lincoln or Jesus or whomever. How many world-changing, mental giants have we missed out on because they couldn't free their minds from working 40+ hours a week?

<comment><USER7> The problem is the decision to do this is never in the hands of the wage- earners...

Only the powerful and rich can really change this reality, and it's clearly not aligned with their interests.

<comment><USER6> I don't know. If the venture finance industry has taught us anything, it's that one big win can pay for a whole mess of failures, and then some.

If you tell a bunch of rich people they've got a good chance of financing the next Leonardo DaVinci or Thomas Edison by providing the living essentials to 5,000 people, you could probably get a few to take you up on it. Just make sure you're cutting them in on the profits.

<comment><USER7> Unfortunately from someone looking from the outside, it looks like the venture industry you talk about is very small and restricted to a few areas.

Maybe one day... but even with companies that come from that culture, normally after reaching a certain point of greatness, many stop helping the solution and give in to the system in pursuit of more and more profits.

I'm very skeptical when it comes to changes in society. I really don't think it'll change anytime soon. At least not for better.

</comment></comment></comment></comment><comment><USER8> As wikipedia notes on Bertrand Russell:

> His work has had a considerable influence on logic, mathematics, set theory, > linguistics, artificial intelligence, computer science (see type theory and > type system), and philosophy, especially philosophy of language, > epistemology, and metaphysics.

Plus he won the Nobel Prize in _Literature_!

For a very approachable overview of Russell's complex life, I highly recommend the graphic novel "Logicomix"

[http://www.logicomix.com/](http://www.logicomix.com/)

Then you will certainly find yourself wanting to learn more about this amazing person.

<comment><USER9> For a very approachable view of Russel's thoughts and work, you can try reading his own writing:

[http://www.gutenberg.org/ebooks/author/355](http://www.gutenberg.org/ebooks/author/355)

My personal favourite so far has been 'Mysticism and Logic and Other Essays' with 'Analysis of Mind' currently at the top of my reading queue. Not everything he did was like reading 'Principia Mathematica' and his writing is very open, readable and eloquent.

<comment><USER10> I liked a bunch of the essays I read by him, and loved "A History of Western Philosophy". I'm well aware (and felt his writing made it obvious enough) that it is not necessarily a 'accurate' history of philosophy, but it was a great book with a great approach.

<comment><USER11> What it lacks in accuracy it makes up for in entertainment.

</comment></comment></comment></comment><comment><USER12> It is rather strange. More and more things of everyday life are automated and computerized. Nevertheless, I have the impression to have less and less time to do all the things I want/need to do.

<comment><USER13> Something happened to me yesterday that I haven't quite had the time to figure out.

I'm normally the introverted "stay at home and relax" type, at least during the week. I frequently want to get home from work as early as possible to play video games, play music, or read. The only problem I've had lately is I've had little motivation to do the creative parts (e.g. creating music or programming something).

But last night I went to the gym after work, making me get home an hour later than usual. Then I went out to an open mic with some music friends and had food and beers. Then I came back home and played video games for an hour or so. Then I managed to actually write music for another hour and a half.

It was weird, because normally I'd feel like I had a huge block of time in front of me (in theory, "relaxing"), so I could do whatever I wanted. But the catch was that I actually _wouldn 't_ do them! I'd procrastinate, and feel like I wasn't using the time "best" way. Last night was so different, and I felt really energized this morning.

What's the takeaway? I don't know yet. Maybe I'll try to _do_ more. It was fun.

<comment><USER14> I think momentum plays a big part. That goes both ways in creative pursuits of getting things "done" or at least moving forward on projects, as well as stagnating.

The more time you "I'll do it later" on something, the easier it becomes, etc.

The book "Art of War" while some "hippie'esque"'ness breaks down "resistance" to getting to creative pursuits.

<comment><USER10> I think it is especially this. There's a reason for the thought that the best person to ask for help or a favor is a busy person, as they are more likely to reliably do it if they say yes (and often they do, just as much as less busy people).

I've experienced this quite often myself. I remember a period when I was particularly productive and creative, but also very busy two bachelors and three side-jobs.

</comment></comment></comment></comment><comment><USER15> "If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment."

What is "obvious" to Bertrand Russell is bad economics.

When the peasant puts his money in a stocking, he causes a slight deflation, so prices decrease, which increases the value of everyone else's money. So everyone else effectively has more to spend, if they want to.

However, everyone else would be prudent to assume that the peasant will eventually spend his money, which will correspondingly cause prices to rise again.

It might seem that an earlier gain is offset by a later loss.

But, those who benefit from the slight deflation can choose to invest the increased value of their monetary holdings into industry. At a later time, when the peasant decides to spend his money, the products of that industry will be ready for purchase.

Thus, with nothing more than surplus cash and a stocking, the peasant has driven investment in industry, productive employment, and long-term growth in the wealth of society, the benefits of which he has foregone since he chose not to seek a return of interest on his savings.

<comment><USER16> Keep in mind this was 1932 when there was the gold standard. Inflation was more volatile then and was -10% (minus!) according to [http://www.rateinflation.com/inflation-rate/usa- historical-i...](http://www.rateinflation.com/inflation-rate/usa-historical- inflation-rate?start-year=1915&end-year=1932)

</comment></comment><comment><USER6> I have to say there's a good chance that society is already moving toward Russell's ideal.

If you just look at accelerators like YCombinator, you'll see that two successful startups (Dropbox and AirBnb) are by-and-large paying for the investment of the other several hundred startups several times over.

So when will we see it going to the next level? Gather a bunch of people together, using whatever criteria you see fit, and tell them to do whatever they want. Pay for their room and board, and see what is produced from their complete leisure time. If the produce of that investment was one of the individuals simply having an idea on the scale of something like "Democracy" or "Altruism", wouldn't it be completely worth it if the other individuals never did anything more than eat, sleep, and play video games?

<comment><USER17> We called those "housing projects" and they were not exactly a paradise to live in. Superficially need some minimal level of education/civilization. Which merely excludes those bored by formal education, most of whom are idiots and a small fraction of them are geniuses. For lack of a better idea you could use some weighted GPA/IQ/GRE/SAT/ACT score system. Assuming the smartest people are those who come up with the best ideas. It does seem that to spread an idea you need a smart dude but a think tank should hire marketing people for that? Perhaps a lotto would work just as well for selection. A lotto instead of elections would likely give us a superior government, perhaps it would give us superior ideas on average.

Another interesting example is the Institute for Advanced Studies nearby Princeton, I think. You might want to examine whats been produced there.

</comment></comment><comment><USER18> Of a similar thinking is, I suppose, "The Right to Be Lazy" by Paul Lafargue.

I read it some time ago and if I remember correctly he believed that there isn't/wasn't any need to work more than 3 hours a day because of the technological advances of the time (and to think this was in 1883!)

After a quick search I found it is available online at: [http://www.marxists.org/archive/lafargue/1883/lazy/](http://www.marxists.org/archive/lafargue/1883/lazy/)

<comment><USER19> Trivia: Lafargue was Marx's daughter's husband.

<comment><USER20> Trivia: And one of the people Marx was referring to when he said that if they are Marxists then "what is certain is that I myself am not a Marxist."

</comment></comment></comment><comment><USER21> There is this thing about ancient China: each son, when his father died, had to mourn for three years. Yes, three years. And it meant stopping your official occupation, e.g. official employment. (This didn't apply to the peasant).

Result: most of the great products of Chinese culture are a direct consequence of this forced idleness.

<comment><USER22> Could you provide a source for this conclusion? I'm interested in the idea, but can't find anything on it.

<comment><USER21> It has been mentioned in Essays on China by Simon Leys (I read it in French).

</comment></comment></comment><comment><USER23> > If so, I shall not have lived in vain.

Notwithstanding that small matter of formally defining the logical foundations of all mathematics.

<comment><USER24> Well, having a good bash at that particular problem. Not sure if Russell and Whitehead actually _succeeded_.

" _Work is of two kinds: first, altering the position of matter at or near the earth 's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid._"

I've always liked that quote.

<comment><USER25> How does programming fit into this? It feels a bit in-between. On the one hand, you tell the computer what to do, in a way that feels similar to Type 2; on the other hand, you actually _have_ to do the work of programming, which feels much like Type 1, except you're not moving physical matter around, but stuff in 'concept space'.

<comment><USER26> In all seriousness, I've long thought of what I do as moving electrons around, getting pits onto CDs in the right place, things like that. Whatever I do in, say, C++-land, is a means to those ends. An intermediate step. I arrived at that way of thinking after trying to define 'work', and deciding that it always consists of moving matter around (transporting it, putting it into a desired configuration).

<comment><USER25> Interesting conclusion. However, notice that most of the energy (in thermodynamical sense) in this "work" is not spent on moving electrons in the computer around, nor even in the C++-land, but in concept-space. We do our work by building castles in the air out of abstract mental structures, and only then we formalize it in code that moves electrons around.

When I look at the end results of work, I come to the same conclusion that indeed it ultimately consists of reconfiguring matter. That's what we need to do to reach whatever goals we have. Maybe the conceptspace work maps to the levels of intricacy of the end-result matter configuration, i.e. the more complex, precise thing you want to get, the more energy you need to expend on thinking rather than arranging atoms. It's easier to move a ton of bricks from one place to another than to design a microprocessor.

So I guess that ultimately I agree with your comment.

(disclaimer: writing this after two beers)

</comment></comment></comment></comment></comment><comment><USER27> There is a great deal of anarchist and libertarian communist literature critiquing the modern concept of work, notably Russian anarchist Kropotkin's book 'the conquest of bread' originally written in around 1906. [http://libcom.org/library/the-conquest-of-bread-peter- kropot...](http://libcom.org/library/the-conquest-of-bread-peter-kropotkin)

</comment><comment><USER28> Anyone looking for more praise of idleness should look into the works of Tom Hodgkinson. How to Be Idle is particularly brilliant.

<comment><USER29> Here's the 5 minute summary: [http://www.wikisummaries.org/How_To_Be_Idle](http://www.wikisummaries.org/How_To_Be_Idle)

<comment><USER30> The irony of only having time to read a Cliff's Notes version of a book called "How To Be Idle" is truly sublime.

</comment></comment></comment><comment><USER21> I was half through and I suddenly had a click in my head, thought this was written by pg.

Same clean and efficient style, same nakedness without any philosophical scaffolding, while being bullet tracing a straight line through many philosophical stand points.

Two very clairvoyant minds. Let's go back reading.

</comment><comment><USER31> I wonder how much Mr. Russel was idle himself having written on average 2 books per year throughout his life and significantly contributing on so many levels.

</comment><comment><USER32> On the same note I would like to add another related and a great article: The Quality of life [http://www.ribbonfarm.com/2013/07/31/the-quality-of- life/](http://www.ribbonfarm.com/2013/07/31/the-quality-of-life/)

</comment><comment><USER33> I recently stumbled upon a great graphic comic (mostly factual) about Betrand Russell and his life. I'd highly recommend it. [https://en.wikipedia.org/wiki/Logicomix](https://en.wikipedia.org/wiki/Logicomix)

</comment><comment><USER34> I wonder what Bertrand Russell would say about Undercover Cop. If only he were alive today and given the chance to produce his on reality tv show. I wonder what that would be like?

</comment><comment><USER35> I notice that nobody has related this to the Swiss proposal to provide a basic income for all adults. If it works there, I wonder if other countries will move in that direction.

</comment><comment><USER36> "...there is no reason to go on being foolish forever."

<comment><USER7> Except there are...

Reasons that are not ours, but for those who control us.

</comment></comment><comment><USER37> I'm way too lazy while idling to read this. tl;dr?

<comment><AUTHOR> As automation increases and we have machines do most of our work. We don't seem to put that saved time into leisure. We rather seem to use that saved time to do more work.

Humans aren't too happy with every one getting the same, even if that is sufficient for every one's sustenance. We inevitable use our time to buy things that distinguish us from other fellow humans.

The theme was also propagated in the novel 1984,concept of equality among humans was/is going to be a big disaster.

<comment><USER38> From what I recall of the Party in 1984 (at least the Inner Party) they had no illusions about them holding power to benefit anyone else:

 _" The Party seeks power entirely for its own sake. We are not interested in the good of others; we are interested solely in power, pure power. What pure power means you will understand presently. We are different from the oligarchies of the past in that we know what we are doing. All the others, even those who resembled ourselves, were cowards and hypocrites. The German Nazis and the Russian Communists came very close to us in their methods, but they never had the courage to recognize their own motives. They pretended, perhaps they even believed, that they had seized power unwillingly and for a limited time, and that just around the corner there lay a paradise where human beings would be free and equal. We are not like that. We know what no one ever seizes power with the intention of relinquishing it. Power is not a means; it is an end. One does not establish a dictatorship in order to safeguard a revolution; one makes the revolution in order to establish the dictatorship. The object of persecution is persecution. The object of torture is torture. The object of power is power."_

[NB I find the natural antidote to this to be the speech from the end of The Great Dictator [http://www.youtube.com/watch?v=5IvPIWzQcUY](http://www.youtube.com/watch?v=5IvPIWzQcUY)]

<comment><AUTHOR> The problem with 'holding power' is you also need submission from the masses or at least need to keep them in order.

There is never ever going to be a period of time in the human history, there was none in the past, nor will there be in the future where we shall attain peaceful uniform equality among humans. The very concept is against our very internal wiring. Equality means, every one gets the same _regardless_ of their efforts in getting it. This is a very strange concept, and the human understanding of motivation rejects it. Those who contribute more, always assume they need to get proportional to their effort(which is justice), those who contribute less or nothing at all feel they are entitled to get the same as everyone because they think equality is justice.

Net result? The hard working no longer feel motivated to contribute, or worse move else where where they feel they will better rewarded. The situation in the system worsens with no one building anything of real value, while expecting to get the same. That's how socialists and communists systems across the world have collapsed over time.

Secondly, war will be perpetual state in which humans will live for many ages to come. In fact this too was discussed in pretty detail in 1984. War is basically an activity that destroys human effort, so that there is room to create more and more of it. That will ultimately be the only way in which more goods can be created and consumed.

Unless of course in the far future we colonize universe to an extent there is far too much space for us to interfere. Just like the very very early humans on earth.

<comment><USER39> "There is never ever going to be a period of time in the human history, there was none in the past, nor will there be in the future where we shall attain peaceful uniform equality among humans"

This is simply not true. Hunter-gatherer societies are typically egalitarian, and our species has subsisted by hunting and gathering for the vast majority of its existence.

<comment><USER40> In the tribe there was inequality of status (eg best hunters) and mate choice.

Between tribes there was inequality of where to live, or living at all due to border clashes, raids etc

<comment><USER41> This really isn't true on a wide scale. There are exceptions but most hunter- gathers tend to be very egalitarian. There were no permanent leaders, and everyone worked together as a team.

The best part about hunter-gather lifestyle was there was tons of free time.

</comment></comment></comment></comment></comment></comment></comment><comment><USER42> there's a great book in the same vein, How to be Idle. [http://www.amazon.com/How-Be-Idle-Manifesto- ebook/dp/B00DB3F...](http://www.amazon.com/How-Be-Idle-Manifesto- ebook/dp/B00DB3FUS0/ref=sr_1_1?ie=UTF8&qid=1381245066&sr=8-1&keywords=how+to+be+idle)

</comment><comment><USER43> "borrowing made it appear as if the future was nourishing the present"

</comment><comment><USER44> and now for something completely different [http://www.youtube.com/watch?v=k799LiPqu2g](http://www.youtube.com/watch?v=k799LiPqu2g) [Bertie in Bollywood]

</comment><comment><USER45> He also wrote "Conquest of Happiness".

</comment><comment><USER46> The trouble with the world is that the stupid are cocksure and the intelligent are full of doubt. - Bertrand Russell</comment>


Before the Electric Car Takes Over, Someone Needs to Reinvent the Battery - <AUTHOR> https://www.bloomberg.com/news/articles/2019-01-06/before-the-electric-car-takes-over-someone-needs-to-reinvent-the-battery <comment><USER2> This is a good article on solid state batteries. But I think it is all wrong in claiming that we will have to wait for them before BEV autos will take over.

The fact is that BEV's are already better than ICE's in many ways, and the best, Tesla's, are so good they are busy taking away market share. And lithium ion batteries are steadily improving in characteristics and also getting cheaper. Furthermore, China, the world's largest auto market, is putting a very big push behind BEV autos, and many other governments are also making efforts.

From what I have read a tipping point is coming around 2012-25 when consumers will star flooding to BEV's and ICE sales will start dropping rapidly. And then in another half decade or so solid state batteries will be ready and the trend will accelerate greatly.

The basic message is that the century-long dominance of ICE cars is coming to an end and in the not-so-distant future, it's just a matter of time.

</comment><comment><USER3> One question I've always had is, how much larger would charging stations need to be compared to gas stations when everyone is driving electric cars? Would they be like little oasis on the long roads of the US where people would get coffee and chill as their car super-charges after a 4 hour run? Would we get economies based around people waiting for their car to charge? Reserved chargers for auto-club members? Hyundai owners?</comment>


Accept Defeat: The Neuroscience of Screwing Up - <AUTHOR> http://www.wired.com/magazine/2009/12/fail_accept_defeat/all/1

<comment><USER2> This is one of the best articles linked from HN in the last few days. Well worth the read. I can't count the number of times I've hit a wall developing something and then as I explain it to someone else we simultaneously realize the solution. Or other times where a developer meeting (yes, they can occasionally be useful) does a better job of refining some new feature than days of development iteration.

<comment><AUTHOR> If you get the chance also read this HN article, _"Richard Feynman: Do We Live in A Cargo Cult Society?"_ ~ <http://news.ycombinator.com/item?id=1369781> and this one, _"The War of Art: An Interview with Steven Pressfield"_ ~ <http://news.ycombinator.com/item?id=1370128> Each have a degree of overlap. The first goes into detail why being truthful to experimental process should be mandatory. The second why we personally screw up.</comment></comment>


Ask HN: Emergency, site down. Whats the best GUI for ubuntu server mysql? - <AUTHOR> Went https and it is causing me to have infinity redirect loops.
Thinking WP is causing it and want to edit the wp_options file.
Doing select * from wp_options has the text going off the screen.
But yes, this is basically emergency, 250 people have not been able to get onto the site. I'm half considering reverting back to sunday undoing a week of work. <comment><USER2> Dump the database and replace all http urls; for instance: `sed -i -e 's|[http://mysite.com/|https://mysite.com/|g'](http://mysite.com/|https://mysite.com/|g') mydump.sql` and reimport it. Most often, there's always one setting that doesn't get switched.

(keep a copy of the original db just in case)

<comment><AUTHOR> How do I do this?

Ubuntu server, windows home.

I read the command to do this, didnt have permission, but I'm going to need the ability to edit the database. This seems to be my holdup.

</comment></comment><comment><USER3> Is your site still working if you go back to http? Why not revert it then? You'll have time to debug the issue, check the logs for what happened, stand up a test copy which won't impact anyone while you're trying things. You don't have to push for an emergency fix. (Possibly... Unless you can't revert easily, but that's a lesson for the future :-) )

<comment><AUTHOR> the certbot program for doesnt have a revert back. It seems to keep reverting everyone to https.

problem is not in .htaccess

I kinda want to know the lesson for the future? I upgraded from php 4 to php 7 without a problem.

<comment><USER3> > the certbot program for doesnt have a revert back. It seems to keep > reverting everyone to https.

If your certbot is set up to configure your webserver, you can remove its modifications manually. For some configs it does have a revert though: "certbot --nginx rollback".

> I kinda want to know the lesson for the future?

Before big changes like that:

\- prepare a rollback plan, so if things go wrong you don't have to learn new things in an emergency mode

\- stand up a test environment and try the change there, before applying it into production

<comment><AUTHOR> >you can remove its modifications manually.

Haha thats what my Physical Therapist wife said. I agree, where would I find these details on the website? I searched the documentation and even github but it was overwhelming.

Btw, good suggestion on doing a backup BEFORE the change.

Test environment sounds good as well. I have a hard time justifying the time cost. That said, this should be something that any decent programmer does casually.

</comment></comment></comment></comment><comment><USER4> Try a more specific query, or just scroll back to find the option you want</comment>


Do nuclear decay rates depend on our distance from the sun? - <AUTHOR> http://arxivblog.com/?p=596 <comment><USER2> Does this mean that carbon dating isn't as accurate as they thought if this is true?

<comment><USER3> I hope this is a joke, based on the roughly 3000 times this question was asked and answered "No!" on Slashdot.

It's also pretty unlikely to be true, I understand the correlation involved was weak, imperfect and not precisely timed.

<comment><USER2> No, I don't regularly read slashdot and no one asked the question here yet so...

I don't find it surprising though that that is the first question that would pop into most peoples heads as dating is the most popularly know use of decay measurements.

</comment></comment></comment><comment><USER4> I really, really hope this is true. :) Nuclear-weapon suppression field, anyone?

<comment><USER5> You are to be commended to think like that. But past evidence suggests we'd more likely use the knowledge to _increase_ nuclear decay and make improved weapons.

<comment><USER4> Given that the nuclear batteries for various outer-system probes still work properly, I think it's far less likely that an increase is possible. Standard decay rates seem likely to be close to the maximum possible, since only slowing was reported. I'm not sure if anyone's used nuclear-powered spacecraft closer to the sun; it doesn't seem likely, since solar power is plentiful there.

<comment><USER6> _I'm not sure if anyone's used nuclear-powered spacecraft closer to the sun_

<http://www.google.com/search?q=rtg+sun+nasa+Ulysses>

Ulysses was in the news in 1996-1997 because NASA's Cassini-RTG decision was being criticized. The argument was that NASA's can't-use-solar-at-the- distance-of-Saturn argument didn't hold water in light of the fact that NASA even chose to put an RTG on a Sun explorer.

 _it doesn't seem likely, since solar power is plentiful there._

That was the crux of the NASA-can't-be-trusted argument.

</comment></comment></comment></comment><comment><USER7> Probably not. But hey, I'd support strapping a geiger counter and a hunk of Si-32 onto a rocket and firing it into the sun, just to be sure.

(Or away from the sun, but into the sun is quicker and more fun.)

<comment><USER4> More likely to produce interesting results in a timely fashion, eh? :)

<comment><USER7> Rocket + radioactive silicon + crashing into the sun = all possible flavours of awesome.

I can't think of any better way to spend $200 million.

</comment></comment></comment><comment><USER8> _Unexplained periodic fluctuations in the decay rates of Si-32 and Ra-226 have been reported by groups at Brookhaven National Laboratory (Si-32), and at the Physikalisch-Technische-Bundesandstalt in Germany (Ra-226). We show from an analysis of the raw data in these experiments that the observed fluctuations are strongly correlated in time, not only with each other, but also with the distance between the Earth and the Sun. Some implications of these results are also discussed, including the suggestion that discrepancies in published half- life determinations for these and other nuclides may be attributable in part to differences in solar activity during the course of the various experiments, or to seasonal variations in fundamental constants._

From the original paper: <http://arxiv.org/abs/0808.3283>

What the above means: that the fabric of reality changes in relation to the distance from a large mass or a large source of neutrins.</comment>


"Chinese Women, Please Don't Sleep With Foreigners" (2010) - <AUTHOR> http://www.chinasmack.com/2010/stories/chinese-women-please-do-not-sleep-with-foreigners.html

<comment><USER2> There are racists in every group of people. Not really noteworthy unless you're interested in seeing examples of racism against other cultures.

</comment><comment><USER3> I don't want to bring this up like that but it might be related with the size of something.</comment>


Market Crashes (Is This Time Different?) [video] - <AUTHOR> https://www.youtube.com/watch?v=9PYsVkPtcXk <comment><USER2> Thanks for sharing this!</comment>


Firefox experimental build with support for LZMA2 compression (2013) - <AUTHOR> https://wiki.mozilla.org/LZMA2_Compression

<comment><USER2> Whenever I hear about HTTP compression I always think of Jeff Atwoods blog post: [http://blog.codinghorror.com/youre-reading-the-worlds- most-d...](http://blog.codinghorror.com/youre-reading-the-worlds-most- dangerous-programming-blog/)

Basically DEFLATE beats GZip because its faster at decompressing. Choosing a compression scheme should be about balancing the transmission time with the decompression time, compression time is the least important aspect of the problem since caching can help mitigate that problem.

Statements like "This algorithm compresses better than gzip/deflate, at the expense of slower compression. Decompression is much faster than compression." mean nothing because its not telling you if the decompression time on a mobile device is worse than if you had sent it without compression. Plus I'd be surprised if there was any algorithm that was slower to decompress than it is to compress.

<comment><USER3> I can't think of many scenarios in which this would be a win which aren't usually compressed archive downloads of some sort anyway, or might be better presented as a torrent with a tree hash and some multisourcing.

LZ4 might be a better choice. It compresses moderately well, but the packing and depacking speed are much better. Has anyone investigated whether it's viable?

Also don't forget that you need to be careful about compression in a few contexts where attacker-injected data and a secret could share a compression context (the BREACH attack, for example). Compression is usually a good idea, but you should really salt new CSRF tokens every load. HTTP/2's header compression is context-free to mitigate the related CRIME attack.

</comment></comment><comment><USER4> From the bug at Bugzilla, I thought Brotli looked even more interesting since it balanced ratio (somewhere in between lzma and gzip) with speeds better than I thought LZMA did, at least with the importance of speed with web servers, and I think using the right tool for the job is a good idea here: [https://github.com/google/brotli](https://github.com/google/brotli)

An interesting idea though. With cached lzma files, it would be more of a pure win for lzma, but I wonder what the real world results/use would actually be and how much web hosts would generally enjoy this idea.</comment>


Latex-mimosis: A minimal and modern template for your thesis - <AUTHOR> https://github.com/Submanifold/latex-mimosis <comment><USER2> While this is a nice work, it's unlikely to be applicable for its target audience.

in the US at least, individual (universities, schools, departments, degrees) have pre-existing Officially Sanctioned Templates For Theses, and normally failure to comply with them means your document isn't going to be accepted until it's reformatted.

For example, one of my degrees was awarded in 2016, and the version history of the thesis template I used goes back to about 1988, complete with commented out lists of contributors and notes to future generations.

<comment><USER3> > in the US at least

There is scientific research done outside the US, and they even have PHD students. ;)

This class is perfectly good for most of Europe, as highlighted by the Readme. Most of the time, the only thing that is imposed is the general shape and the title page.

<comment><USER2> As far as i can tell, the reason it's good for Europe is that it defaults to A4 paper.

I would be very surprised to discover that universities as old as many in Europe are would have _less_ byzantine document requirements than the comparatively young American unis have.

</comment></comment></comment><comment><USER4> It's nice that the readme links to an example :) I've come across countless github projects for something that seems cool, but don't have any links or screenshots of it in action.

</comment><comment><USER3> I wrote my (phd) thesis recently, which mean I got to do a survey of the various templates for that purpose.

KOMAscripts wins, hands down. This is cute, but KOMAscript is just ridiculously featureful and customizable. It's also very well documented, can be adapted to any page format and has very good typography.

<comment><USER5> This is based on KOMAscript.

</comment></comment><comment><USER6> Nice and clean! I wonder if it requires a lot of tweaking to make it work with letter (it might be as trivial as changing ``paper=a4'' in the cls.) If so, it might be worth the author's time to generalize it.

<comment><AUTHOR> It was easier than expected. Just add

      \KOMAoptions{paper=letter}

to the preamble of the document. I have also documented this now in the README.

</comment></comment><comment><USER7> For the record, another simple and elegant LaTeX template for thesis is: [http://cleanthesis.der-ric.de/](http://cleanthesis.der-ric.de/)

</comment><comment><USER8> I like it this way. My bachelor thesis also had no real guidelines. I frankendopted a thesis template from the Oxford University. It was ok. The biggest problem was it had already used too many latex options, so that I had to go through everything and disable what I did not understand and then make it look good again just to adjust a few settings. But else it was ok. So a new minimalist version is the perfect starting point.

</comment><comment><USER9> You might try _mathtools_ in place of _amsmath_. It is a wrapper that fixes some things, and adds lots of useful stuff.

<comment><USER10> Ohh I managed to miss until now that mathtools itself loads amsmath, so it's never necessary to manually load both. Thanks.</comment></comment>


Reopening Bars Is Easy. Schools Are Difficult - <AUTHOR> https://www.theatlantic.com/ideas/archive/2020/07/reopening-bars-easy-schools-are-difficult/613861/ <comment><USER2> Re-opening is a knapsack problem.

Your budget is Rt (effective reproduction number) which has to stay at or below 1.

All social and economic activities have a benefit to society and a cost in terms of Rt.

The goal is to get to Rt = 1 while maximizing the benefits to society. The problem is that covid is so contagious that many activities have a very high cost.

Seen this way, maybe it makes sense to throw bars and indoor dining out of the knapsack so we can put schools in.

</comment><comment><USER3> It's really hard to believe it when you have parents saying crap like "my daughter will never wear a mask and will hug her teachers and friends!". That was one of the comments made by a parent in a survey my school district sent to help them understand how to proceed for the upcoming school year (we had access to the answers; anonymized, of course). And there were a lot with the same tone.

I don't know, I'm afraid that even with all measures in place there are too many people that don't believe the pandemics is real and don't try even a bit to make their part as a member of the community.

Edit: typos.

</comment><comment><USER4> Here in Belgium kindergarten and primary schools were reopened in June for about 3 weeks until summer holiday started. The kids didn't have to wear masks, nor the teachers while in front of their class. Teaching was more or less like before, albeit with a bit more distancing between teacher and kids.

Outside the classroom the kids from one class were not allowed to mix with kids from another. The playground was divided up in several areas and each class was assigned one. Breaks were in two shifts and all toys were washed in between (and rotated between areas). Dropping off and picking up the kids was also in two shifts and spread over as much entrances as possible to reduce contact with other bubbles. No parents allowed on the school premises.

As far as could be judged from those few weeks this didn't seem to impact the infection numbers. Even better was that the kids could have a more or less normal ending of the school year. If nothing changes my guess is that in September schools will start again in the same modus operandi, which I'm okay with.

But high school and up, that's a different matter...

</comment><comment><USER5> The evidence is not rock solid, but points to schools being one of the more low-risk things to reopen.

[https://www.sciencemag.org/news/2020/07/school-openings- acro...](https://www.sciencemag.org/news/2020/07/school-openings-across-globe- suggest-ways-keep-coronavirus-bay-despite-outbreaks)

It's mistaken to be worrying about reopening schools if you are blithely ignoring problems with care homes, diabetes sufferers, etc.

</comment><comment><USER6> The author's argument seems to be that sending kids back to school _can_ be less risky than keeping them home, if appropriate measures are taken. And that will require community support, funding, sacrifice, and creativity.

I wish the article had _also_ explored solving the problem by mitigating the risks of staying at home. Perhaps applying the same level of community support, funding, sacrifice, and creativity to stay-at-home strategies would work even better.

</comment><comment><USER7> I'm convinced, sending my kids to bars this fall instead oof schools.

<comment><USER6> Bars are more dangerous than schools, so I think you have it backwards. We need to convert school gymnasiums into speak-easies.

<comment><USER8> Isn't that basically what Pizzagate was about?

</comment></comment></comment><comment><USER9> The article's beginning and very ending was very informative and made clear nuance of the situation of keeping kids/college young adults from school.

The author lost me completely when they started injecting in one sided political perspectives and hindsight bias:

"...opposition to public-health guidance."

Which public-health guidance? Not all of the "opposition" was bad. Example: Any guidance from the W.H.O early on in the pandemic [0]

"Had Trump implored his supporters to wear masks and be patient, case counts might well be dropping across the country. "

Author chooses to show a particular political bias again and fails to mention the other major event that caused a uptick in cases (nationwide protests).

This whole section seems very out of place with the rest of the article, almost like The Atlantic had a requirement to show a left leaning bias to be published...

0: [https://www.businessinsider.com/who-changes-timeline- first-c...](https://www.businessinsider.com/who-changes-timeline-first- coronavirus-report-from-internet-china-2020-7)

<comment><USER10> The protests largely included people wearing masks, and the hotspot problematic areas are not those aforementioned protest hotspots.

You have a political bias and it is showing.

<comment><USER11> There are tons of people in the protest not wearing masks. It's politically dishonest not to assume some spread came from massive gatherings, especially where protesters were gassed. I know it's dangerous to say anything negative about protests but we need to be consistent and honest in order to maintain our credibility.</comment></comment></comment>


Show HN: Datasette Publish – Turn CSVs into a SQLite-Backed JSON API - <AUTHOR> https://publish.datasettes.com/ <comment><AUTHOR> Way more information plus an animated screenshot showing how to use it on my blog: [https://simonwillison.net/2018/Jan/17/datasette- publish/](https://simonwillison.net/2018/Jan/17/datasette-publish/)

This is built using the brand new Zeit Now API, which makes it easy to write software that in turn deploys other software: [https://zeit.co/blog/api-2](https://zeit.co/blog/api-2)

<comment><USER2> Xmysql: One command to generate api for any MySql database. Generates api at blink of an eye (literally).

[https://github.com/o1lab/xmysql](https://github.com/o1lab/xmysql)

Has some really nice apis for group by, join and intutive way to perform 'where', 'order by' and other MySql clauses.

(shameless plug)

</comment></comment><comment><AUTHOR> Ryan Pitts on Twitter used this to build an API for UFO sightings in Washington state and the North West: [https://twitter.com/ryanpitts/status/953728651945627648](https://twitter.com/ryanpitts/status/953728651945627648)

Here's his datasette: [https://datasette-cmwqbwgnqe.now.sh/csv- data-5284def/nuforc_...](https://datasette-cmwqbwgnqe.now.sh/csv- data-5284def/nuforc_reports_WA)

And here's an example SQL query showing the cities with the most UFO sightings: [https://datasette-roborbllfq.now.sh/csv- data-b1429ef?sql=sel...](https://datasette-roborbllfq.now.sh/csv- data-b1429ef?sql=select+%22City%22%2C+count%28%2A%29+as+%22count%22+from+convertcsv++group+by+%22City%22+order+by+%22count%22+desc+limit+100)

</comment><comment><USER3> Related option for those who are less focused on the JSON API and instead want to make their datasets public and queryable: data.world added SQL support a little while back, joining the original SPARQL. One big advantage there is that folks can write queries that join your datasets to other open datasets on data.world.

</comment><comment><USER4> This can be a good solution to use with JS charting libraries that pull CSV/JSON data from an external data source. Add dynamic chart updates on source data updates and you get cheap and easy dynamic web charts.

</comment><comment><USER5> Original discussion around Datasette's launch back in November 2017:

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

</comment><comment><USER6> This is amazing. Great idea I will try it. I've also been using Zeit now and love it too

</comment><comment><USER7> been seeing a lot of these convert X into JSON api with query ...but what would be the use cases for this type of tool? who needs this type of solution?

<comment><AUTHOR> Datasette is specifically designed for publishing static data - it doesn't handle UPDATE/INSERT traffic at all.

This is a good fit for any time you want to share some static data with the world - instead of posting a CSV file, you can share your data as a Datasette instance with a browseable web UI and a JSON API instead.

The three use-cases I'm personally most interested in for this are:

Data journalism: newspapers collect data about e.g. police shootings [https://vice-police-shootings.now.sh/](https://vice-police-shootings.now.sh/) or actions under the antiquities act [https://fivethirtyeight.datasettes.com/fivethirtyeight-2628d...](https://fivethirtyeight.datasettes.com/fivethirtyeight-2628db9/antiquities- act%2Factions_under_antiquities_act) \- I want to make it as easy as possible to publish the data beneath the stories.

Government open data: cities like San Francisco publish huge amounts if interesting data. I used San Francisco's 190,000 line CSV of trees in the city to build [https://sf-tree-search.now.sh/](https://sf-tree-search.now.sh/)

Cultural institutions: museums, libraries and art galleries have the collection and sharing of data as part of their mandates. I want to make it as easy as possible to build things like the London Science Museum's collection API: [https://group.sciencemuseum.org.uk/about- us/collection/using...](https://group.sciencemuseum.org.uk/about- us/collection/using-our-collection-api/)

<comment><USER8> Why not convert the data from csv to json and serve the json blob from your object store or CDN (if this solution is immutable)? No need for the API interface, just gzip the json blob and have the client retrieve it entirely.

No need for an app, app server, and the json can be cached with the rest of your content. Unless I'm missing something?

<comment><AUTHOR> Size. The San Francisco trees database is around 50MB, and I've successfully tested it with multiple GB sized SQLite databases.

<comment><USER9> this was a key answer to a good question. I think you should emphasize that part (handling large data sets) as a key aspect of datasette

</comment></comment></comment></comment></comment><comment><USER10> Is this a managed hadoop/hive cluster with some sort of field heuristics baked in? Looks cool and very useful for a certain set of users.

<comment><AUTHOR> Nope, it's much more simple than that. Each CSV upload is converted into a SQLite database. Then I deploy a static, read-only copy of that database to a Zeit Now hosting account and fire up my "datasette" command-line tool (written in Python 3) which opens the SQLite database and starts serving up queries from it.

[https://github.com/simonw/datasette](https://github.com/simonw/datasette)

The magic here is that the SQLite database is opened in read-only mode, which means I don't have to worry about concurrent access or write activity. SQLite is screamingly fast if you use it in this context.

Because the data is read-only, if you ever DO need to scale to handle more traffic you can do so by firing up additional instances, each with their own copy of the SQLite database file.

<comment><USER11> This is awesome. Could this be extended so that new CSV uploads can be added at a later date and deduplicate?

<comment><AUTHOR> Zeit Now deployments are immutable, but I can have an "edit" feature which retrieves the data used for a deployment, lets you modify it (add new CSV files for example) and then deploys a brand new instance with the new changes. Zeit supports URL aliases (which I need to expose in Datasette Publish) so you can point an alias at the fresh deployment.

Stuff like CSV de-deplication is out of scope for Datasette Publish - it's something you would need to do with other tools (e.g. Excel) before uploading the data.

</comment></comment></comment></comment><comment><USER12> Now the bottle neck to publish data getting the API and dB to be hosted somewhere because that part is still not trivial for many

<comment><AUTHOR> That's exactly what Datasette Publish solves: it's a tool which you upload CSVs to and it deploys the application on the internet for you, for free.

Under the hood it's taking advantage of the incredibly generous free hosting tier offered by Zeit: [https://zeit.co/pricing](https://zeit.co/pricing)

As a user though, you don't need to worry about this at all. Sign in, verify your email address (which signs you up for an account with Zeit), upload your CSVs and Datasette Publish will deploy the application with your data and give you back a URL hosted on the public internet.</comment></comment>


Why I'm excited about Chrome OS - <AUTHOR> http://justinireland.com/why-im-excited-about-chrome-os/

<comment><USER2> This, and the crazy amounts of dirt cheap ARM tablets being previewed at Computex, reminds me of when the iPad was first announced and some people, perhaps momentarily dazzled, were predicting big successes because people would buy the iPad to use in warehouses, or hospitals to do fairly simple tasks that are currently on expensive, custom, difficult to use hardware. As this post says, you only need a browser for most of these tasks and if you can get everything but the "web" page cheap and in bulk then that's a game changer. Apple's many advantages don't really translate to this market.</comment>