Ndb – An improved debugging experience for Node.js - <AUTHOR> https://github.com/GoogleChromeLabs/ndb <comment><USER2> Because competition is good, I want to quickly name-drop VS Code here, which has had _excellent_ integrated node debugging for quite a while now. It integrates seamlessly with the entire tool ecosystem (eg I use ts-node-dev for autoreloading + typescript support, and the VS Code debugger Just Works). And because it's inside the editor, ndb features like the ability to put breakpoints in a file before it is required are irrelevant. It's all at your fingertips, just put a breakpoint right where you're coding, hit F5 to attach the debugger to your devserver and step through the code.

It's a pretty amazing experience, finally putting Node at the same level as, say, PHP with XDebug and NetBeans in 2006. Of course reloads are still slower, but that's all. JS is getting there!

<comment><USER3> WebStorm (and everything in the IntelliJ family) also has a really nice debugging experience. Very similar benefits to what you described: it mostly Just Works, at least for my use cases, and you just add breakpoints to where you're already coding rather than needing to do things in a separate window.

That said, with both VSCode and WebStorm, I've seen finicky issues from time to time, like source maps not working right or trouble getting it to work with non-trivial test suites. For example, my company's test suite uses a wrapper CLI that pre-loads certain files and sets environment variables in a specific way, and I need to replicate that configuration manually in order to run tests from WebStorm. I'm certainly excited to see ndb as a "baseline" great experience that everyone can use, regardless of editor.

<comment><USER4> Sadly I find IntelliJ to be the worst editor I've ever seen. Slow, weird shortcuts, graphics problems, focus stealing. The downsides are so bad that it almost negates it's benefits.

Unfortunately, for Salesforce development the alternative is VSCode with subpar plugin (and tons of features blatantly stolen from independent IJ plugin developer)...

<comment><USER5> Performance can be improved by disabling plugins you don't use, disabling features like code folding, etc. and finally by excluding non-essential files from indexing.

I don't know about the graphics problems but you can disable focus stealing in your window manager. During the first time setup you are given the option of using other keys. For a vim-like experience you can use IdeaVim.

For node, IntelliJ gives you: code completion across files, debugging (local, remote, including Docker), testing (e.g.: automatically recognizes test cases and creates a run configuration from them), code coverage, type inference from JSDoc documentation or flow, linting, version control integration with excellent blame integration, etc.

<comment><USER4> Wow that was a lot of plug-ins to disable. Took me a while. It's shocking how they left enabled by default.

> disable focus stealing in your window manager

Can you expand more on this. Two issues I have is:

\- Launching IntelliJ and another app simultaneously would pop IJ on top. Very indicative of how Windows platform works. Basically not an issue as I launch it like once a month.

\- Saving/building something would switch focus to Messages panel. Clicking on item in project view opens a file, but typing still happens on project view panel...

<comment><USER3> I've actually run into different focus issues, stuff involving WebStorm multiple project windows on Mac and the wrong one getting focus.

For focus within the editor, I've been pretty happy, but it does take a little learning to get a feel for the keyboard shortcuts. Quick rundown on focus, at least on Mac (other platforms/keymaps are mostly similar, I think):

• Cmd+1, Cmd+2, Cmd+3 etc focus and toggle the different panels.

• Wherever you are, Escape gets you back to the code. Shift+Escape closes the focused panel and moves back to the code.

• Option+Tab switches between code panes.

• Whenever you open code from any panel, Enter will open the code and leave focus on the panel, and Cmd+Down will open the code and move focus to the code.

I find it easy enough to switch focus that even if an action ends up in a focus state I don't expect, it's just a little muscle memory to move focus to what I want.

</comment></comment></comment></comment></comment></comment><comment><USER6> It somewhat blew my mind the other day that you can add an '\--inspect' flag to a locally-run node instance and inspect it via Chrome (chrome://inspect).

After building a server for many months now, and relying on far too many _console.log()_ s, this trick has enlightened me to the point where I feel as though I was a fool for not finding it out before!

Ndb looks like a promising improvement over this functionality and I'm excited to check it out.

<comment><USER7> Recently I discovered that you can flip to debug mode even on already running process without debug mode by doing 'process._debugProcess(<pid_of_process>)' on any other node process. This has made my life incredibly simpler by not having to remember whether I had run my app in debug mode with '\--inspect' flag.

<comment><USER8> IIRC, `process._debugProcess` just sends a SIGUSR1 to the provided PID.

</comment></comment></comment><comment><USER9> This looks really, really impressive. I'd love to connect this to Electron apps, too.

As someone who wants Windows users to have a decent time using and developing with Node.js, it warms my heart to see developers of modules to at least consider them. As the maintainer of `windows-build-tools`, it makes me so happy that more and more modules are including it as an installation instruction.

<comment><USER2> Yo, it's efforts like yours that make Node one of the best cross platform dev environments out there. Thanks!

</comment></comment><comment><USER10> As a secondary language, I find the repl and debugging pieces far lacking for Node.js. To be fair, I just use Node.js for developing SPA using frameworks like VueJS and React.

Ndb looks like a step in a good direction. However, I don't understand if you're really expected to have a Chrome browser open when you're already in the context of editing code.

That might sound strange, but my preferred setup is using tmux and splitting vim on the left and a couple terminal panes on the right (at about 80 chars). Is terminal debugging possible with ndb? Am I thinking about this wrong?

<comment><USER11> Agreed. I've been scratching my head over whether the rough debugging has been a lack of tools available, or me not knowing where to look. (From other comments, it looks like there are a few promising tools out there)

</comment></comment><comment><USER12> It's interesting to see Google build open-source tooling in this direction; catering to the developers ensures that Chrome keeps enjoying a large market share.

Google has made serious efforts here and as a web developer, Chrome's tools are by far some of the best I've seen (with an honorable mention to FX's tools for Flexbox & Grid).

<comment><USER13> Including "Works best on Chrome™".

<comment><USER14> Yes, this sometimes happens, but you shouldn't let that overshadow the Chrome team's commitment to web standards and open source.

<comment><USER15> You're right, you shouldn't let that overshadow the Chrome team's commitment to open source. You should maybe let the fact that Chrome is closed source overshadow the Chrome team's commitment to open source.

<comment><USER14> Yes, it's true that Chrome has closed-source components. Meanwhile, Chromium is still available. Node and Electron wouldn't exist without having Google's work to start off with, as a base for the work of many others. (Though of course Google was building on the early work at Netscape, and some features of web standards were invented at Microsoft, despite IE not being open source at all).

This way of building on the work of other people (hopefully giving due credit) is how open source is supposed to work. It doesn't mean Google can or should do everything for the community; if we don't like the direction Google is going we need to do some of the work ourselves.

<comment><USER13> I actually given that I have to deal with apps that should have been web based, but are not, 'cause dev convenience.

And having to untangle npm based builds to what used to be a simple set of scripts and HTML includes, because many JavaScript libraries assume a node based deployment and nothing else.

With those outcomes I do not consider it a good result.

</comment></comment></comment></comment></comment></comment><comment><USER16> Does this let me inspect network activity like I can with web apps? I currently use Charles Proxy for this because I haven't found a better way to do this (also for Electron apps and network activity on the main process).

<comment><USER17> you know that's something i think i've always wanted but never realized until you just brought it up - something like the network tab from chrome dev tools would be super useful in any ide that caters to a language that people write web apps in (node/python/etc.).

to answer your question:

from the screenshot it looks like the answer is no

[https://user- images.githubusercontent.com/39191/43023843-14a...](https://user- images.githubusercontent.com/39191/43023843-14a085a6-8c21-11e8-85b7-b9fd3405938a.png)

</comment></comment><comment><USER18> You can also use the builtin `inspect` arg to node [https://nodejs.org/dist/latest-v10.x/docs/api/debugger.html](https://nodejs.org/dist/latest-v10.x/docs/api/debugger.html)

For those comfortable with python's pdb, this provides a similar interface for debugging node applications. I was hoping this was an improvement on that as I prefer to stay within the commandline.

</comment><comment><USER19> This looks fantastic! My project has a build process that transpiles the source directory using Babel to a build dir, and then runs from that. Is it possible to use a sourcemap to debug based on the pre-transpiled source?

edit: i've built the sourcemaps, and like devtools, it is recognising them, but even though the source directory is in the working tree, it doesn't pick them up...

<comment><USER20> try mapping your workspace in Filesystembtab under sources

<comment><USER21> I have the same issue. I transpile code from ./src to ./dist

In NDB I am on sources tab and I see dist folder highlighted (src also appears in the tree).

How does one "map the workspace under sources" (I tried right clicking - and I don't see a menu)

TIA

</comment></comment></comment><comment><USER22> This might be a dumb question, but does anyone know how to "blackbox" the files that are not in working dir while debugging Node with VSC? I have a backend server that handle requests and often have to set a debugger, but find myself having to click through multiple "events_hooks.js" type of functions.

<comment><USER23> [https://github.com/Microsoft/vscode/issues/16208](https://github.com/Microsoft/vscode/issues/16208)

Try that (I haven't yet) - let me know if it works out for you! I was just wanting something similar the other day and this is on my to-try list

</comment></comment><comment><USER24> I never really understood how people are using a debugger these days, especially in a heavy I/O bound app such as Node.js services. I mean, once it hits the DB, there is no way of "stepping back".

I used to use debuggers back when I was developing desktop apps on Java using Eclipse. It made sense to use a debugger back then cause the whole app was running locally inside the same execution stack, including its state and its business logic. You were in control of how the data flow and in which direction.

But nowadays, you have an API request with a short lifecycle which 90% includes handing the execution to other processes through the network. What is the purpose of using a debugger? You can just write an automated test that would automatically run on every file change.

<comment><USER25> There's some crazy stuff floating around...think db like functionality written into node apps....

</comment></comment><comment><USER26> We do something like this already but because we have three processes that interact we scripted puppeteer to hook into all three in different tabs and automatically refresh the tabs when the processes restart.

It also clicks into the console to start and turns off screencasting, etc.

Here's a gist of the main part: [https://gist.github.com/natew/66515fb49d895315e139059302cd47...](https://gist.github.com/natew/66515fb49d895315e139059302cd471b)

</comment><comment><USER27> We are dependent a lot on childprocesses (I know it sucks, but it's a legacy system) in our app. This is just amazing letting the debugger attach to the child process. Finally no more console logs to figure what's wrong.

</comment><comment><USER28> It is indeed similar to Webstorm but it's free. For all the users out there who need an enterprise debugging experience for free without any annual fees, Ndb does the job really great imho.

<comment><USER13> That is why we cannot have nice things.

Anyone that wants to invest their career doing tooling needs to target enterprise customers.

<comment><USER29> We can't have nice things because non-enterprise historically (on the whole) will spend --zero-- dollars for software they use.

</comment></comment></comment><comment><USER30> This looks really well done, great work Chrome Labs.

</comment><comment><USER31> One thing I've missed is to be able to get a stack trace at moments of my choosing, in production mode.

</comment><comment><USER32> Amazing, glad someone built something like this, really cool to be able to debug via Chrome DevTools.

<comment><USER33> Debugging in chrome devtools was already possible by default. This just adds some features.

<comment><USER3> I would say it also lowers the barrier to entry.

Previously, you had to add a `debugger;`, visit "chrome://inspect/" in the browser, click "Open dedicated DevTools for Node", and leave it open while running node (mocha tests, in my team's case) from the CLI with --inspect. None of that is _hard_ , and certainly it's much easier than previous alternatives, but it's still enough that it needs instructions. I got it set up for my team and made our test script print out those instructions, but even so, I think most developers viewed it as more of an "advanced" mode for when a test issue is really hard to track down.

With this new way, you run the test in debug mode and it pops up a window with everything set up already, no need for instructions. I'm hoping it'll make debugging easy/welcoming enough that more people will use a debugger as their default way to work on code.

<comment><USER34> \--inspect-brk will start the node process then immediately break. It looks like ndb supports inspect-brk too.

<comment><USER3> At least in my situation, with no additional configuration, --inspect-brk works, but when it's paused at the start, I can't navigate to any of my files to set breakpoints, so the most straightforward way to set a breakpoint is a `debugger;` statement in the code. I guess that's one of the things that works better in ndb: "You can place breakpoints before the modules are required".

<comment><USER34> It looks like ndb solves that problem: "You can place breakpoints before the modules are required."

</comment></comment></comment></comment></comment></comment><comment><USER35> Good work. It would be nice to be able to use the network and perormance tools offered by chrome.</comment>


Nicholas Carr - Piracy and Privacy - <AUTHOR> http://www.roughtype.com/archives/2012/01/piracy_and_priv.php

<comment><USER2> This is a spurious comparison. Restrictions on piracy are immediately visible to people. They get blocked from doing something, they pay more for music or films, they go to prison. There is a tangible effect that gets media coverage.

Privacy and the loss thereof is almost always entirely invisible. So Google, Facebook et al collect all my browsing habits and use it to sell things to me. It's not an event that can make the average person upset.

SOPA got the internets aflutter because it's something they (think they) can understand. Privacy - not so much.

<comment><USER3> > It's not an event that can make the average person upset.

Not yet anyway, but public opinion is changing and faster than many think. Carr mentioned the updated European Data Directive due out today, but right on it's heels will be a report from the FTC[1] and one from the Department of Commerce[2] formalizing drafts released last year that outline privacy reforms in the US.

Events like Google recording Wifi spots, Carrier IQ gathering data and even the story of Apple secretly recording location data are becoming more prevalent. I think we are only 12-18 months out before scattered public opinion changes to real momentum for privacy rights activists.

[1][http://www.privacyrights.org/ftc-protecting-consumer- privacy...](http://www.privacyrights.org/ftc-protecting-consumer-privacy- report-comments)

[2]<http://www.iab.net/public_policy/1495162>

</comment></comment><comment><USER4> This meme of "The Internet People are Organized and Powerful" is nuts and wrong.

There would have been just as much hubbub had Wikipedia decided to run a national television advert during Modern Family asking people to call Congress.

This was a lot of things, and it was certainly successful. But it wasn't because people are well organized or that there was some serious campaign management going on. There wasn't. And truth be told, efforts like this have almost a half-life to them.

Think about Howard Dean's incredible run in 2004. Where are those activists now? Or Obama's 2008 list? Where is that now?

People are fickle on the Internet and they get tired of causes quickly. And there's no "universal consensus" amongst "people on the Internet"

Long story short, should Google try and somehow protest its own interests on Privacy, I suspect that you wouldn't see nearly as much universal consensus around that as you did around SOPA. It's hard to write legislation that lopsided or dumb, and even harder to generate the kind of public panic behind it more than once.

<comment><USER5> > Where are those activists now? [...] People are fickle on the Internet and > they get tired of causes quickly.

What we need is a permanent, federated, worldwide organisation to fight for internet freedom. We could call it a "Pirate Party".

<comment><USER4> I suspect most people believe that piracy is bad, and that free speech is good. The pirate party might have a problem in this regard.</comment></comment></comment>


Albert Camus: The Life of the Artist – A Mimodrama in Two Parts (1953) - <AUTHOR> http://www.newyorker.com/online/blogs/books/2013/08/the-life-of-the-artist-a-mimodrama-in-two-parts.html <comment><USER2> To anyone who hasn't read Camus: I cannot recommend reading The Stranger and The Myth of Sisyphus enough. They are probably the two most influential books in regard to my outlook on life.

<comment><USER3> Can you elaborate on how The Stranger influenced your outlook on life?

I ask because the person who recommended it to me saw the protagonist as a hero -- someone inspiring.

I read it as a cautionary tale. It showed me one could be apathetic to a fault in regards to their fate. The only thing he seemed to care about was actively not caring about his or others' lives.

<comment><USER2> I had a pretty troubled childhood, and I surrounded myself in an armor of logic. I acted a bit like Spock, I guess. I tried to reject emotion and act only on logic. This did lead me to develop early mathematical and programming skills, but hindered a healthy worldview. I was firmly convinced that the universe was based in logic and that the meaning and reason of everything could be derived by logical thinking.

When I got older and moved away from home, I began to better understand "The Absurd" that Camus talks about. I had been struggling with the idea that I sought a logical reason for absolutely everything, but was unable to find one in many cases.

The acceptance of "The Absurd" allowed me to deal with the fact that meaning is often obscured or unattainable. I find it much easier to accept the world as it is without burdening myself with attempting (futilely) to logically explain everything. Things just _are_.

That being said, I don't reject logic at all; a question I was struggling with was "logically, why should I value logic?" Camus helped explain to me the absurdity of this question, and existence, and to accept that it would remain unanswered.

Camus also helped me to find joy in struggle. He says "The struggle to the summits suffices to fill the heart of man. One must imagine Sisyphus happy." I now accept that there isn't any deeper meaning to struggle and it's important to live in the moment. Everyone is struggling in their own way. Everyone is struggling for their own desires, and at the deepest level, there is no reason for it.

Another book I recommend for the same reasons as above is Zen and the Art of Motorcycle Maintenance.

<comment><USER4> I relate to your description growing up quite a bit. To be honest, getting older I've become very disappointed by the world and its imperfections. In any case, I don't know if talking about me is interesting to anyone.

However, I have to disagree with your conclusion (based on Camus) that questions remain unanswered. I think that's a failure -- Camus's failure as well as yours. It's easy to throw up your hands and say "I don't know. It is what it is." This is precisely the reason why I think "The Stranger" is a book with a lot of potential but ends up a failure. I suspect leaving things in limbo at the end is often masking the writer's (or director's) shortcomings.

You're probably happy with your life as a result, but you're taking the easy road and that road leads to nowhere.

In the meantime, I'll continue to stay unhappy and flabbergasted by the discrepancy between logic and fairness on one side and society on the other.

<comment><USER5> All roads lead to nowhere.

<comment><USER6> Yes, precisely.

</comment></comment></comment></comment></comment></comment><comment><USER7> If I had heros, Camus would be one of my few heros. The idea that life is not just meaningless, but rather absurd is quite a relief. What I like about him is that in his writings, he does not offer any solace. He does not promise that we will magically become satisfied with life and existence, rather he writes about the confusion between living and suicide, and interestingly, he argues that both choices are equally absurd. He does argue for morality. The reader is thrown into that dizzying choice where no option is preferential, so the choice to live is rather arbitrary. The realization that life is absurd freezes you for a moment. Though, since life is rather meaningless, I feel it also unchains a person from all those pressures and norms set by society, religion and family. The thought represents true freedom.

Camus also seems to be one of the philosophers who actually looked cool.

<comment><USER8> I think that rather than trying to discover the meaning of life while we're busily burning fossil fuels on a single planet that we'd be better off punting on the issue until life in general, and humans in particular, have managed to sustainably spread beyond Earth (and of course demonstrate better care-taking of the world we do have). Until we achieve that end, Camus' philosophy is useless, and in some cases actively harmful.

(Once we're on a few tens of planets, navel-gaze all you want.)

<comment><USER2> Useless and harmful from your point of view.

Meaningless from a universal point of view.

<comment><USER8> The "universal point of view" should register an account and speak up for itself.

</comment></comment></comment></comment><comment><USER9> That was stunningly beautiful. I am really digging the new spate of literary articles that have been showing up in my HN feed. Thank you OP.

<comment><AUTHOR> Glad you liked it.

</comment></comment><comment><USER10> Beautiful. The only thing out of place was the "Posted by Albert Camus" anachronism.

</comment><comment><USER11> " _Encumbered, he cannot move and is stuck in this pose. Then an official painter, who paints his portrait, arrives, then a second painter, who paints a portrait of the first painter painting the hero, then a third, and so on. Everyone chatters in the light, the ribbons, the dogs, the easels. With great pageantry, somebody brings the painter a mirror so that he may gaze at himself._ "

Beautiful. I've never heard of this one, though I'm a french native speaker and was quite interested in post-ww2 literature during my twenties.

</comment><comment><USER12> Thanks for reminding me of the talent Camus possessed. The Stranger shaped me as a teen, and this brings me back.</comment>


Docker's killer feature - <AUTHOR> http://joyent.com/blog/dockers-killer-feature

<comment><USER2> >The problem with this pair of assertions is that they neglect one essential aspect of Docker — one that is arguably its killer feature: its open API.

Yes, that Open API is great but it does not seem relevant to CoreOS's criticisms.

To me, Bryan Cantril's highlighting of "Open API" as a counterpoint would make sense if CoreOS specifically stated that they will create a "closed proprietary API". I didn't think they stated that as an architecture goal. CoreOS wants to create a non-monolithic container system -- and presumably, their alternative will also be an "Open API".

Docker's "Open API" for flexibility doesn't allow you to "undo" how Docker internals would run as a pid on Linux. I'm genuinely confused as to why this Open API was brought up. My current interpretation is that it is almost a non- sequitur.

<comment><USER3> Yeah. My understanding of Rocket from the original blog post is that they don't have an "API" in the sense the Docker one is described at all. Since Rocket is just a container format/runner, there's no client/server relationship to document. You're running an executable on your system just like any other.

I'm new to Docker, so maybe there are some big wins surrounding the docker client/server architecture that I'm not realizing. But I already have tools in place to run commands on a remote server -- that's not the problem that I'm looking to Docker to solve. So if Rocket is able to get the containerization aspect working smoothly with fewer moving pieces _, I 'll count that as a point in its favor.

_In fairness to Docker, I haven't had too much trouble so far pretending that "docker run" commands without the "-d" flag are just running the process in that PID. So the extra hidden complexity of really running it in another process and piping stdout back hasn't affected me in any negative way either.

<comment><USER4> our team is running containers in boot2docker virtualboxes, rocket does not mention anything about being able to run on OS X visualization layer. so docker compatibility is paramount or a stable boot2docker alternative.

<comment><USER5> CoreOS runs on many VM platforms, Vagrant/Virtualbox being one of them. The current CoreOS kernel/userland (and most new kernels and Linux distros) is ready to run Rocket. Is that what you're looking for?

[https://coreos.com/docs/running- coreos/platforms/vagrant/](https://coreos.com/docs/running- coreos/platforms/vagrant/)

(CoreOS employee)

</comment></comment></comment></comment><comment><USER6> If anything, the cyclical hype/backlash Docker is getting proves that it is popular and that it works for some people. Consequently, the exposure it gets displeases the people for whom it doesn't work or whose philosophies differ. This feels like Politics 101 if you ask me (I know you didn't :) ), and I'm still surprised by how vehement some people get about this, and about software philosophies in general (particularly considering the average shelf-life of most software).

All of that aside, I really like Docker, for the API but also partly because of what the CoreOS people complain about, i.e. a relatively monolithic system.

I'm a big fan of modular systems myself and I completely get where CoreOS are coming from with Rocket. But sometimes, I just want to be able to use the tool. I don't want to screw around for hours/days/... to put all the pieces together.

The network overlay situation is a perfect example. I know there are different solutions out there, in fact I've been trying some of them out at home. But the truth is, I don't want to have/have time to deal with that stuff and I'd much rather get on with my original ideas.

Unfortunately in some situations, as beautiful as the theory and principles are, people justifiably simply want things to work out of the box. I find the criticisms on String Theory are a good example of that, whereby the theory is gorgeous, but in practice does not necessarily have the value it intends to. I digress.

I love the idea of a super-modular car I can put together myself, change pieces as and when I wish and so on, but most of the time, I just need to get to my destination.

<comment><USER7> > _If anything, the cyclical hype /backlash Docker is getting proves that it > is popular and that it works for some people. Consequently, the exposure it > gets displeases the people for whom it doesn't work or whose philosophies > differ. This feels like Politics 101 if you ask me (I know you didn't :) ), > and I'm still surprised by how vehement some people get about this, and > about software philosophies in general (particularly considering the average > shelf-life of most software)._

Frustration is palpable when there's so much _marketing_ of a technology that genuine engineering discourse suffers.

Docker and Joyent are businesses, and they're selling an idea to make money. If how they're selling the idea runs contrary to someone's "software philosophies", that someone has to contend with countering not just an intellectual argument, but also considerable (and often emotive, not educational) marketing.

This article — written by the CTO at Joyent — is essentially just marketing linkbait:

\- It's titled with the catchy "Docker's Killer Feature". _Killer_. _Feature_.

\- The first paragraph includes the phrase "CoreOS ... _declared war_ "! People love wars! See also: _" War on Christmas"_, _" War on the Family"_, and Fox News.

The rest of the article is marketing filler. There's no deep dive on the API — having read the article, I don't even know whether Docker's "Killer Feature" is:

1) Actually an API vended by a library.

2) Some sort of IPC protocol.

3) A network protocol, or

4) Underpants!

<comment><USER8> > Docker and Joyent are businesses, and they're selling an idea to make money.

And how is it different for CoreOS, Inc? They depend on a external product and they want to remove the dependency. That's fine. Smearing their ex-vendor isn't.

<comment><USER7> CoreOS advanced a _technical_ argument. Listen to the words you're using – " _smearing_ ", as if this actually is a " _War on Docker_ ".

</comment></comment></comment></comment><comment><USER9> Not sure why, but the tone of this post seems very antagonistic-- as I'm not involved in either community, I'm not sure why but it seems a bit off-putting to an outsider.

Is there some open source community beef I missed? Is forking/developing your own container product that evil? I somehow missed where Rocket equates directly to war on docker instead of pushing containers further into the mainstream by adding some differentiation to the space.

<comment><USER10> The tone is not so bad considering it was written by Bryan Cantrill, Joyent CTO. His blog post antics were discussed here a week ago [https://news.ycombinator.com/item?id=8663197](https://news.ycombinator.com/item?id=8663197). At least this time he didn't fake fire anyone.

Joyent is building some way you can run Docker images on a Solaris kernel.

</comment></comment><comment><USER11> I think Joyent's right here. Docker's open and progressively enhanced API is a godsend. Somewhere around 0.7x they basically enabled the entire existence of my business, just by virtue of having a good API.

I frankly don't even care about the rest of the orchestration vs bloat stuff - I want a good API and good performance. The rest is secondary.

<comment><USER12> What is your business? How has the API helped you? Genuinely curious :)

<comment><USER11> [https://coderpad.io/](https://coderpad.io/) \- It's a realtime tool for conducting interviews, for programmers. Docker lets me do a wide variety of tricky stuff involving the execution of untrusted code, like provide REPLs with very low latency.

<comment><USER7> Relying on containers for security is a recipe for none.

<comment><USER11> I didn't say solely :)

</comment></comment></comment></comment></comment><comment><USER13> In my opinion, Docker's killer feature is that installing and testing out Docker is dead-easy - the barrier is very low. People will make a lot of mistakes trying it out, not understanding it completely before they dive in. Hell - looking at most images pushed on the public docker repo makes me cringe and wonder if a lot of the people who get to that point actually understand what the strength of containers like Docker presents them is. But taking the first steps - even if they are wrong - is easy, it's the the first foot in the door.

But once you get familiar with Docker - yes the API is a killer feature.

Rocket on the other hand doesn't seems to be something someone might try out when he has 10 minutes spare time. Reading the specs and doc, makes me hesitant of trying it, creating an 'image' seems like a ton of work just to try it out. Yes there are some good ideas there, but it would be sad if there weren't.

</comment><comment><USER14> As someone excited about Docker and mildly annoyed by the idea that there would be _two_ "standard" container implementations, this is reassuring to me.

I hope shykes & co see the light and break the "new" aspirations out from the core Docker container; having one binary is aesthetically pleasing but understandably bothersome to anyone who likes modularity (most devs & unix folks, afaict).

<comment><USER8> Docker is modular, actually. They've got a plugin system, stable RESTy API and packages to work with various parts of their stack (libcontainer, libchan, libswarm etc).

</comment></comment><comment><USER15> Am I the only person feeling disappointment at the statements and attitude towards this from Docker and Joyent. I guess it's natural when you get your first piece of criticism, in the way of "the healthy open source process".</comment>


Apple new iPad Air Ad and MS Surface during NFL - <AUTHOR> http://ontechies.com/2014/01/12/apple-debuts-new-ipad-air-ad-during-nfl-game-while-microsofts-surface-is-used-in-half-time/

<comment><USER2> Interesting speculation about whether MS could turn back the tide of iPad, but I would not be surprised if those Surface devices were just there because of product placement.

<comment><AUTHOR> True about product placement, very possible. However, Microsoft made lots of changes to their entire platform and executive line up so I am expecting nothing but bold changes and interesting stuff coming from them this year- I guess we'll have to wait and see.</comment></comment>


Half of European flights delayed due to system failure - <AUTHOR> http://www.bbc.com/news/world-europe-43633094 <comment><USER2> Apparently the Enhanced Tactical Flow Management System (ETFMS) packed up.

>"ETFMS facilitates improvements in flight management from the pre-planning stage to the arrival of the flight. It maximises the updating of flight- related data and thus improves the real picture of a given flight, thereby contributing to the Gate-to-Gate Concept," Eurocontrol explains on its website.

>The agency initially reported that contingency procedures were immediately put in place which reduced the capacity of the European network by around 10 per cent. [http://www.airtrafficmanagement.net/2018/04/eurocontrol- give...](http://www.airtrafficmanagement.net/2018/04/eurocontrol-gives- allclear-for-normal-efms-operations-to-resume/)

They don't seem to say what went wrong but do say

>In over 20 years of operation, the ETFMS has only had one other outage which occurred in 2001. The system currently manages up to 36,000 flights a day.

Tech details from wikipedia fr:

Written in ADA , and running on HP-UX , the system is based on an exchange of messages between the airlines (who will file / change / update flight plans), the air traffic control bodies and the CFMU , the messages are written in ADEXP format.

ETFMS uses at least 5 fundamental notions:

flight plan : describes the 4D trajectory of an airplane. regulation: aircraft rate applied to a "volume traffic". Example: 50 aircraft / hour "Traffic volume": association of a geographical reference (air sector, waypoint, airport, etc.) and a set of aircraft flows. list of takeoff slots or called slot . Example: if the rate of regulation is 30 planes / h, there will be a slot every 2 minutes: 10 hours, 10 h 2, etc. the delay: difference in time between the take-off time desired by the company and the schedule calculated by ETFMS.

<comment><USER3> It would be fascinating to read about what bug took down a system with one outage in 20 years. I remember reading in the chubby paper (from google) that user error was the cause of more than half the downtime incidents. Wonder if that's the case here too.

<comment><USER4> If I remember correctly, a similar outage in the UK was due to increased flight volumes. The system had a hardcoded limit somewhere which caused issues as flight volume increased. The software was old enough that they weren't aware of that issue beforehand. I could imagine something similar happening here.

It definitely shows how well software can work with the right practices. Only one outage in 20 years and that one only caused a reduction of 10% in capacity. Don't think many companies can match that.

<comment><USER5> >It definitely shows how well software can work with the right practices. Only one outage in 20 years and that one only caused a reduction of 10% in capacity. Don't think many companies can match that.

This is what happens when you build software with the same meticulousness as other engineering disciplines. However a lot of software is so much more complex than what other disciplines can build (because you can build anything you can imagine), coupled with early deadlines and profit pressure, that it's unrealistic for most software to be developed this way. You easily have a cost factor of 100x in time as well as money.

<comment><USER6> I see this sentiment a lot. Intuitively it seems like it should be true, but I don't think the case is really quite so clear cut.

The costs involve way more than just the initial development. Maintenance eats up a huge, perhaps even a majority, of the total cost as well. And outages or other failures can be very expensive too.

It's also important to keep in mind that this isn't an all or nothing situation. We can have software that is more reliable without asking that it chug away without issue for a decade, or anywhere near as long as we expect bridges or buildings to last.

The process of developing more reliable software isn't necessarily more expensive than less reliable software. It can even be cheaper. I'm struggling to find the links (maybe somebody else has them handy, or I'll edit them in if I find them), but there have been a few case studies done a few years back by companies that moved to using Ada. In addition to the benefits of more reliable software, they also found development costs were better or at least no worse than C. I know that isn't exactly the language to compare to these days, but as I said these were done some time ago.

This is just my own argument, but I suspect that's because the same problems that ultimately cause problems after release also cause problems during development. With a more reliable programming system/environment, problems that might show up later during development are shown to be an issue immediately. This means the issue doesn't need to be tracked down, which can take some serious time. The developers are even fresh on problem area.

Personally speaking, I've been totally won over by Ada. It ain't perfect, but it's a hell of a lot better than anything else I've seen - and I've looked a lot. In my own projects (mainly personal or for school admittedly) development is much easier and ultimately quicker. I don't have to spend a day tracking down a weird bug because the compiler let's me know about the issue as soon as I try to cause it.

<comment><USER5> >The process of developing more reliable software isn't necessarily more expensive than less reliable software. It can even be cheaper. I'm struggling to find the links (maybe somebody else has them handy, or I'll edit them in if I find them), but there have been a few case studies done a few years back by companies that moved to using Ada. In addition to the benefits of more reliable software, they also found development costs were better or at least no worse than C. I know that isn't exactly the language to compare to these days, but as I said these were done some time ago.

I can believe that. Ada catches a lot of errors you would normally only notice by extensive testing at compile time. You're preaching to the strong-static typing choir here. I believe Ada and Rust could solve a lot of problems of companies working with C/C++ and make development cheaper. You can properly model your domain and abstract without sacrificing safety.

I'm also a strong believer that TDD makes you much faster and safer in the long run.

My experience tells me that most tools, languages or methods that catches errors earlier will save money.

Ada also has the best tested compiler I can think of.

However my larger point was about the engineering processes not the language itself. I think with languages and tools you can make it easier to make good software. The 100x time and cost is more in the sense of process changes when you're working on safety critical systems. How everything has to be traceable from requirement to test, how there are mandatory reviews before any code change that need to be documented, how there are qualification criteria for the toolchain, etc. All these things cost a lot of time and manpower, with arguably very bad cost-benefit analysis, which is only really worth it when human lives are at stake.

<comment><USER6> > The 100x time and cost is more in the sense of process changes when you're > working on safety critical systems. How everything has to be traceable from > requirement to test, how there are mandatory reviews before any code change > that need to be documented, how there are qualification criteria for the > toolchain, etc. All these things cost a lot of time and manpower, with > arguably very bad cost-benefit analysis, which is only really worth it when > human lives are at stake.

Absolutely. That's part of what I was getting at by mentioning all of this exists on a continuum. We don't need to, and really shouldn't, treat a SaaS startup exactly the same as a military aviation project.

We can, however, draw from the lessons learned on those safety critical projects and use parts of the process that make sense for the nature of whatever we're actually working on.

You're right that in general I suspect that comes down to strong static typing, particularly for the sorts of projects common to the HN crowd. When dealing with very large enterprise projects the balance might start to shift to more than just typing, though it would probably take a lot of real-word data that nobody is keen to supply to figure out where the tipping points are.

And I'd argue about how well Rust actually helps with these things, but that would really be going off the rails. Unfortunately.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> > Eurocontrol announced the system restart later in the day, after what it > called extensive testing.

So they turned it off and on again.

<comment><USER8> Bastards.

<comment><USER9> Its not brain surgery!

<comment><USER9> Whats with the downvotes? That guys username is and my comment are both references to a TV show.

<comment><USER10> That may be part of the problem.

Silly jokes don't go down well on HN, as they're distractions from the conversation. It's considered "Reddit-like" behaviour, and discouraged through downvotes.

<comment><USER9> Are you saying humour isn't allowed on HN?

<comment><USER11> Humour is allowed, and so is downvoting. In practice, the humour has to be to be really good to avoid being mercilessly downvoted. Meta-humour based on usernames and TV shows usually doesn't cut it. Many of us view this as a good thing.

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> 5hr delay on a 1,5hr flight from Berlin to Paris. If they'd use Docker with React this would have never happened!

<comment><USER13> > _If they 'd use Docker with React this would have never happened!_

It's probably because they wrote it in Go. Did you know Go doesn't even have generics?

<comment><USER14> What do you mean? Go has generics. Kind of.

[https://www.reddit.com/r/rust/comments/5penft/parallelizing_...](https://www.reddit.com/r/rust/comments/5penft/parallelizing_enjarify_in_go_and_rust/dcsgk7n/)

<comment><USER15> Wait, is that string using inuktitut characters as fake angle-brackets? That is monstrously evil.

<comment><USER11> Yup, that's even evil enough to quote in full:

      [–] pftbest 114 points 1 year ago
      can you please explain this go syntax to me?
      type ImmutableTreeListᐸElementTᐳ struct {
      I thought go doesn't have generics.

      [–]Uncaffeinated[S] 239 points 1 year ago
      It doesn't. That's just a "template" file,
      which I use search and replace in order to
      generate the three monomorphized go files.
      If you look closely, those aren't angle brackets,
      they're characters from the Canadian Aboriginal
      Syllabics block, which are allowed in Go identifiers.
      From Go's perspective, that's just one long identifier.

[https://www.reddit.com/r/rust/comments/5penft/parallelizing_...](https://www.reddit.com/r/rust/comments/5penft/parallelizing_enjarify_in_go_and_rust/dcsgk7n/)

</comment></comment></comment></comment></comment><comment><USER16> For those curious, Eurocontrol MUAC (Maastricht Upper Area Control Center) migrated to 50 virtual SUSE Linux Enterprise servers running under IBM z/VM hypervisor on a IBM z196 mainframe system in 2013.

<comment><USER17> Does any of this effect the nature of the failure? Have they said what went wrong?

<comment><USER4> No but the fact that this is the first outage in 20 years could indicate that mainframes still have their place if you need 100% reliability.

Which makes plans of banks to move core systems from mainframes to the cloud even more worrying.

</comment></comment></comment><comment><USER18> I was on a plane just about to push back at Heathrow, and the pilot informed us we'd be delayed 15 minutes due to this failure. In the end it was 10 minutes, and we landed only 5 minutes late at my destination. Doesn't appear to have been a big deal, at least for me.

<comment><USER19> I wonder if that is due to Heathrow using Time-Based Separation software.

[https://www.airport-technology.com/news/optimised-runway- too...](https://www.airport-technology.com/news/optimised-runway-tool-improve- efficiency-heathrow/)

<comment><USER20> Technically, Time Based Separation helps only arrivals since it tries to negate the effects of headwinds on final approach, but it does add a lot of resilience to the airport to absorb delays that would normally ripple to departures.

<comment><USER19> I'm pretty sure it doesn't I was reading about it and it mentioned even when the pilot can start the engines is calculated. It saves millions of liters of fuel just waiting a few minutes.

There is a digital display facing the pilot showing him when he can depart. Even which size aircraft are allowed to depart. It's extremely well organized.

</comment></comment></comment></comment><comment><USER21> "departures are now limited to 10/hour at #brusselsairport"

Impressive that they maintain this rhythm even during a once-in-a-decade unexpected system malfunction.

<comment><USER22> I guess that's the "paper and pencil" speed.

</comment></comment><comment><USER23> Yes, this sucked. I just had a 1 hour delay on a 1 hour flight (AMS-ZHR). Unfortunately, no compensation until its a 2 hour delay (but thank god it was only one hour!). Passengers who had a layover were noticeably less happy.

<comment><USER24> You'd probably won't have been eligable for compensation since this delay was definitely beyond the airline's control.

While a lot of airlines try to weasel out of their obligations (mechanical failue, for example, which however is the airline's responsibility) I would think such a case is pretty clear cut.

</comment></comment><comment><USER25> I was at a conference in Northern Virginia some months ago and saw a presentation from the folks at Upside, a startup specializing in booking business travel. They described the legacy system which handles pretty much all booking in the US, a system called SABRE. They described it as an ancient 6-bit computer system in Texas with no modern API. Everything they do tech- wise is a modern wrapper around that system. So I'm not at all surprised by any air travel computer failures if tech like that is central to the system.

<comment><USER26> I've heard of enough misguided "modernisations" (and failures thereof) that I think the "legacy system" was the part that stayed working throughout, and it's the newer stuff added around it that failed. The old stuff may be old but there's a reason it's old... it's outlasted any attempts at replacing it.

<comment><USER27> >it's outlasted any attempt to replace it

See, [https://en.wikipedia.org/wiki/Lindy_effect](https://en.wikipedia.org/wiki/Lindy_effect)

(my fave citation from everyone's fave source for non-academic citations)

<comment><USER28> The counteracting force to that will be that they complexity of the surrounding environment increases and becomes more brittle, or is just simply in the way, as constantly increasing demands for new features drifts further from the capabilities of the old system in the middle.

A few years ago, SAS introduced a new status tier. It took 18 months to introduce into the system (Amadeus). The system may be stable, but those kinds of turn around times for a minor customer service change simply isn't feasible. I don't have numbers, but I wouldn't be surprised if one of the reasons upstart airlines such as EasyJet are competitive is that their IT is comparatively modern and can actively support the organisation while IT is more of a millstone around the legacy airlines' necks.

</comment></comment></comment></comment><comment><USER29> Can confirm. My flight from Zurich was delayed by over an hour today, causing my family and me to need to run, OJ Simpson-style, through the Philadelphia airport to make our connection.

</comment><comment><USER30> No worries.

Everyone at that organisation is paid boatloads of money. [1]

They don't pay taxes on it. (~10%, "for solidarity", which means they get to enjoy healthcare paid by ~55% taxed nationals)

And 90% of the organisation (especially the management) has absolutely nothing, nothing whatsoever, to do with guiding planes anywhere. In fact, those departments are severely understaffed. The department doing "regulatory support" is about 2/3rds of the organisation (tldr: making sure half the local government officials don't have to get their own coffee - and before you say it, no, Eurocontrol employees don't get them coffee, they're merely in charge of making sure someone's there to get them coffee, and steak, cake, and ... The coffees, I might add, are baffling. Done from a steam boiler machine in front of you, with fair trade beans, sweetened not with sugar, but with expensive imported bars of chocolate meled in milk that's frothed in front of you (they put in the chocolate somehow while they're frothing the milk with steam, melting it in while not getting the steam on the chocolate somehow), and you get the rest of the case of that (expensive) chocolate to take home for the kids. No, not when you ask, they'll ask you if you want that. Btw, it's not really the rest of the case they give you, you get a fresh case. Oh and of course, of the bar they opened they prepare just one coffee (about 1/4th of the bar). The rest gets thrown into the trashcan, they don't use the same bar for the next coffee. As for the steaks ... oh my God)

And in case you're wondering: the odds of 2 planes colliding with zero guidance outside of the ATC zones around airports (which aren't covered by Eurocontrol) over even a region as big as Europe are more than 10 billion to 1, against, per year. So if Eurocontrol didn't exist at all, and we just allowed every plane to fly wherever ... nothing would go wrong at all.

So ... what is the problem here ? Disruption of millions of travelers for no reason whatsoever ? Let's please not pretend anyone at Eurocontrol cares (well, they care about not being interfered with, and that will make them care NOW, but if one thing's guaranteed it's that the Software/ATC departments will remain the same size, and only the bribery departments will grow)

[1] [http://www.eurocontrol.int/sites/default/files/content/docum...](http://www.eurocontrol.int/sites/default/files/content/documents/jobs- section/scale-basic-monthly-salaries-officials-annex3-staff-regulations.pdf)

</comment><comment><USER31> Just like there are no bugs without security impact, is it real to say that this has no impact on flight security? Any error can be a contributing factor.

<comment><USER32> Safety is ensured by ATC controlers. ETFMS is there to ensure that traffic does not increase beyond controlers capacity. I have read that without ETFMS, the traffic is reduced by 10%. I have been involved in ATC simulations where controlers had to land about 40 flights per hour using new procedures and tools. We have tried with 38 flights per hour, it was too easy for the controlers: their work was perfect even without tools. With 42 flights, controlers were getting angry because the traffic could not be managed. At 40, we could see the benefits of out new procedures and tools (more regular separation of flights). IMHO 10% less traffic gives far enough capacity margin to ensure safety.

</comment></comment><comment><USER33> Is that the Ada code base?

</comment><comment><USER34> So Trump and Putin finally hooked up. No need to get all SuSe over it... nerds

</comment><comment><USER35> Url changed from [https://www.theverge.com/2018/4/3/17193814/eu-eurocontrol- br...](https://www.theverge.com/2018/4/3/17193814/eu-eurocontrol-brussels- system-failure-flight-plans-airlines-delays-grounded), which points to this.

</comment><comment><USER36> I fear this sort of thing is going to become more and more common at airports.

<comment><USER7> Why?

Sure, the skies are more and more crowded, meaning more and more people will be affected by a once-in-20 year failure, but why would it happen more and more common?

<comment><USER37> Well the archaic systems are getting older and older. From what I've heard it's almost impossible to get replacement parts for some of the computer systems that run airports/airlines.

<comment><USER21> Not sure about aviation, but in other industries they virtualize the old hardware on a new architecture, and keep the software going.

</comment></comment></comment></comment><comment><USER38> Twenty years from now... _uber car service system failure affecting 90% of North America_

<comment><USER39> The only reason this will never happen is because there's a only snowball's chance in hell that Uber will still be around in 20 years.

</comment></comment><comment><USER40> In situations like this I'm glad I book my flights with Chase Sapphire Reserve. It comes with a trip delay reimbursement for up to $500 per ticket if a flight is delayed more than 6 hours. No sweat!

<comment><USER41> ...for a $450 annual fee. If you plan to get kicked off a flight more than once a year, perhaps it's worth it.

<comment><USER40> The rental car insurance benefit already covered $2600 worth of damage when a rental car I had got banged up a bit.

I also get a $300 travel credit a year.

<comment><USER42> Your normal car insurance covers rental cars.

<comment><USER43> not overseas, and has a deductible. I used a generic travel credit card and it covered my rental damage once, now I make sure to use such a card whenever I rent.</comment></comment></comment></comment></comment>


American companies are suppressing wages for many workers - <AUTHOR> https://mobile.nytimes.com/2018/02/28/opinion/corporate-america-suppressing-wages.html <comment><USER2> The linked article mentions outsourcing, but it was this other _fantastic_ article [1] on the structural issues of the current wage economy that really helped me understand just how different things are:

"Thirty years ago, she says, you could walk into any hotel in America and everyone in the building, from the cleaners to the security guards to the bartenders, was a direct hire, each worker on the same pay scale and enjoying the same benefits as everyone else. Today, they're almost all indirect hires, employees of random, anonymous contracting companies: Laundry Inc., Rent-A- Guard Inc., Watery Margarita Inc. In 2015, the Government Accountability Office estimated that 40 percent of American workers were employed under some sort of "contingent" arrangement like this—from barbers to midwives to nuclear waste inspectors to symphony cellists. Since the downturn, the industry that has added the most jobs is not tech or retail or nursing. It is "temporary help services"—all the small, no-brand contractors who recruit workers and rent them out to bigger companies.

The effect of all this "domestic outsourcing"—and, let's be honest, its actual purpose—is that workers get a lot less out of their jobs than they used to. One of Batt's papers found that employees lose up to 40 percent of their salary when they're "re-classified" as contractors. In 2013, the city of Memphis reportedly cut wages from $15 an hour to $10 after it fired its school bus drivers and forced them to reapply through a staffing agency. Some Walmart "lumpers," the warehouse workers who carry boxes from trucks to shelves, have to show up every morning but only get paid if there's enough work for them that day.

"This is what's really driving wage inequality," says David Weil, the former head of the Wage and Hour Division of the Department of Labor and the author of The Fissured Workplace. "By shifting tasks to contractors, companies pay a price for a service rather than wages for work. That means they don't have to think about training, career advancement or benefit provision.""

1 - [http://highline.huffingtonpost.com/articles/en/poor- millenni...](http://highline.huffingtonpost.com/articles/en/poor-millennials/)

<comment><USER3> What is it, in particular, about contracting that allows businesses to pay the same people less? What can they do with the contracting that they couldn't do without it?

I think this:

>"By shifting tasks to contractors, companies pay a price for a service rather than wages for work. That means they don't have to think about training, career advancement or benefit provision."

was an attempt at explanation. But I don't see how it leads to lower wages.

<comment><USER4> It doesn't. The real reason is due to reduced demand for labor, partly due to increased efficiency from technology, partly due to reduced spending, etc.

At the end of the day, it's always supply and demand. The contracting just helps with creating a third party to deal with employment laws and all that hassle.

I recently stayed at a hotel and didn't even need to talk to anyone. Bought the room on via the hotel's app, the digital key in the app opened the door using the phone's NFC, the receipt was received via email.

</comment></comment></comment><comment><USER5> And why wouldn't they? It's time to bring back mechanisms, legal or otherwise, to prevent this from happening again. Usually the collective workforce of a company has significant leverage over a company, but with the advent of globalization, the "gig economy", and technological unemployment in some ways this leverage is harder to capitalize on, or even worse, nonexistent.

I don't know if there's any empirical proof for this, but like competition between companies, I think "competition" or tension between employees and employers for a given organization is also good for capitalism.

<comment><USER6> yeah that's what unions are really about - to think about the employees for the employees good, where HR thinks about them for the good of the company. implementations of that idea are of varying quality which unfortunately gives them a bad rep.

<comment><USER7> > implementations of that idea are of varying quality which unfortunately > gives them a bad rep.

Also giving them a bad rep: propaganda efforts by big employers. Back when I worked for them, Walmart showed new hires a training video that could be summed up as "just say no to card checks; union organizers are trying to trick you into giving up your rights, and you don't need a union anyway because we value our associates so much".

<comment><USER8> Arguably, unions were so successful that people started asking "what do we need them for anymore?" It's shortsightedness that companies were/are all to happy to exploit.

</comment></comment></comment></comment><comment><USER9> All of the major unions have been broken, with the public sector unions coming up next re: the Janus case.

Even though there was always a limited number of union workers, their collective bargaining set the standard. That's not really a factor these days.

<comment><USER10> Interestingly, unionization in Canada is still as strong as the strongest years in the US. Despite that, wages are every bit as stagnant as the US and, looking at income data, there is a lot of mirroring between the two countries. The substantial decline of unionization in the US is one thing, but what is Canada doing wrong?

<comment><USER11> I am curious as to where you are getting the idea that "unionization in Canada is still as strong as the strongest years in the US". That's pretty much the opposite of my personal experience and observations, and it's not the consensus I've been hearing (which is that organized labour has been at an absolute nadir in the past few decades, as much in decline as in the US). Unions have shrunk, membership are down, political clout is down, and a newly unionized company is a rare bird indeed. Perhaps the high rate of unionization in the public sector skews the stats here, because in the private sector, things are pretty much a mirror of the US situation.

From what I can tell, all of the same factors that are driving down wages in the US - increased consolidation, far more 'temp' positions brokered by temp agencies - apply to Canada as well, and have had the same effect.

<comment><USER10> _> I am curious as to where you are getting the idea that "unionization in Canada is still as strong as the strongest years in the US"_

Based on the share of the workforce that is represented by unions. Canada is currently at ~30%, the US peaked at ~30% and is at less than 10% today.

 _> Unions have shrunk, membership are down, political clout is down, and a newly unionized company is a rare bird indeed._

Unionization is indeed down, but what I said is that it is still about as strong as the strongest years in the US. Canada had even stronger unions through the 80s, when it peaked at just shy of 40%. Interestingly, much of the same wage issues we face today were still present at that time. Wages have been stagnant since at least the 70s, according to the Canadian government (and American data echos this).

<comment><USER12> When you say "represented by unions", do you mean the unionization rate or the coverage rate?

In terms of unionization rate, in 2016 Canada was at 28.4% [1]. By comparison, the US peak was 34.8% in 1954 [2] . (It is now 10.7% [3], which is slightly higher than 10%, not less than.)

While the "~" can justify a rounding to the nearest 10% instead of 5%, that ended up hiding a difference of 6.5%, or 1/5th of the total unionized population. From what I can tell, the current rate of around 28% corresponds to the US unionization rate in about 1970 [3], and not its peak in 1954.

The US peak of 34.8% is closer to the Canadian peak of 37.9% in 1984 than it is to 30%, and corresponds to the Canadian unionization rate in 1991 [1].

The coverage rate for both countries is of course higher. For 2017 in Canada it was 30.4% [5] and in US is was 11.9% [3].

[1] "[http://www.statcan.gc.ca/daily- quotidien/170908/cg-a003-eng....](http://www.statcan.gc.ca/daily- quotidien/170908/cg-a003-eng.htm)

[2] "At their peak in 1954, 34.8% of all U.S. wage and salary workers belonged to unions" \- [http://www.pewresearch.org/fact-tank/2014/02/20/for- american...](http://www.pewresearch.org/fact-tank/2014/02/20/for-american- unions-membership-trails-far-behind-public-support/) .

[3] [http://unionstats.gsu.edu/All-Wage-and-Salary- Workers.htm](http://unionstats.gsu.edu/All-Wage-and-Salary-Workers.htm) . The BLS gives the same unionization numbers for 2017 (but no coverage numbers) at [https://www.bls.gov/news.release/union2.nr0.htm](https://www.bls.gov/news.release/union2.nr0.htm) .

[4] [http://www.statcan.gc.ca/daily- quotidien/170908/cg-a003-eng....](http://www.statcan.gc.ca/daily- quotidien/170908/cg-a003-eng.htm)

[5] [https://www.statista.com/statistics/442980/canada-union- cove...](https://www.statista.com/statistics/442980/canada-union-coverage- rate-by-province/)

</comment></comment></comment></comment></comment><comment><USER13> Post-contractual non-compete without any compensation. It's starting to be a thing even in EU. 5-10 years ago I could sign an employment contract blindfolded, now it's a freaking minefield where in couple of years I can end up without a job, unemployable, and owning multiple monthly salaries to the employer. We have too many bored lawyers.

<comment><USER14> For non competes, I wish the law was that companies could bench you, but they'd have to pay you 200% of your best comp of the past 5 years. I think it'd solve a ton of problems.

<comment><USER15> > _I wish the law was that companies could bench you, but they 'd have to pay > you 200% of your best comp of the past 5 years_

Legally-mandated golden parachutes?

<comment><USER16> It's not a payment for if they get rid of you like a golden parachute. It's a payment for if they want to use the legal system to prevent you from earning a living by working for another company.

</comment></comment></comment></comment><comment><USER17> Non-compete clauses are a pretty weird thing and I've seen them in contracts before. Definitely read up on them. I've refused to sign contracts with them before. They're totally unenforceable in California and a few other states.

[https://wikipedia.org/wiki/Non- compete_clause](https://wikipedia.org/wiki/Non-compete_clause)

<comment><USER18> Mostly unenforceable in Canada as well.

</comment></comment><comment><USER19> In addition it seems to me that labor is not a free market, simply because there is no choice to not offer your labor, since you'd starve. In large parts of the world anyway, and globalization has brought them into the 'free' market.

<comment><USER20> Food always seemed a pretty free market to me, even though it's necessary. I was taught that free market is more about competition and access to information while necessity of the product mainly affected price inelasticity but that was econ 101 so idk if it's entirely accurate.

<comment><USER4> Shopping for groceries might be close to a free market, but the production of food certainly isn't.

Also, a big problem with the "free market" is inability and/or disincentive to price externalities, such as environmental damage. Although, it still seems to be a better system than others, we need to work on that front.

<comment><USER21> Do you mean large subsidies to US farmers? Wholesale food markets dominated by few huge buyers, Walmart-style?

<comment><USER4> I'm referring to subsidies to US farmers and underpriced water also. I'm not familiar with other countries, but the domination by Cargill and Monsanto and John Deere also probably detract from a free market.

</comment></comment></comment></comment></comment><comment><USER22> _a flagrant monopsonistic tactic that brought down the wrath of the Justice Department._

Wrath? It was barely a slap on the wrist or a mild scolding.

<comment><USER23> Describing it as wrath is in proportion to the overwhelming lack of action against corporate issues these days... so yes, slap on the wrist on an objective scale, but 'hey, look, they DID something!'

</comment></comment><comment><USER24> One thing I wonder- to what extent has the digitization of the job search process contributed to reduced wages? I can imagine several mechanisms that would cause this to reduce wage growth: 1\. Widely available data on wages tends to introduce a lagging effect on wage inflation, because workers tend to look at data that is a least a couple of years old (imagine what pool of data is currently being used on glassdoor.com to create the salary estimate of that junior developer job you just looked at) 2\. Recruiters have large amounts of data on current wages, and can negotiate from a greater position of power. 3\. Recruiters have a larger pool of candidates to draw from and force to compete against eachother.

<comment><USER25> More like "widely available outdated data." Better (real time) access to data would help the situation, but the wording there makes it sound like you mean to say the opposite.

The affect of bad data on the labor market almost looks like the affect of fake news in politics doesn't it?

</comment></comment><comment><USER26> > For a long time, economists believed that labor-market monopsony rarely > existed, at least outside old-fashioned company towns where a single factory > employs most of the residents. But in recent decades, several compelling > studies have revealed that monopsony is omnipresent. Professionals like > doctors and nurses, workers in factories and meat processing plants, and > sandwich makers and other low-skill workers earn far less — thousands of > dollars less — than they would if employers did not dominate labor markets.

This is the most shocking part of the article for me. How could economists for years have denied something so plainly obvious?

<comment><USER27> > How could economists for years have denied something so plainly obvious?

And this is why we are surprised every time the economy crashes, yet again.

</comment></comment><comment><USER28> Interesting the authors cite unionization as an effective protection against this in the past but do not recommend it as a remedy for the future. The problem with simply passing laws as they suggest is that those laws once in place will be opposed by everyone with power simultaneously and forever, with no powerful organized collective force to defend them it is just a matter of time until corporate power grinds them into dust.

Unions give actual power to workers (and are great at motivating them to vote according to their interests!) instead of just passing laws out of the goodness of our heart to protect them and hoping they last through billions of dollars in corporate bribes.

<comment><USER27> The current problem with unions is labor arbitration. Unions were great when transportation was slow and expensive and communication didn't move at the speed of light. Now capital is more important than labor, and capital can be moved almost freely and at the speed of light. Labor on the other hand is stuck in it's national borders, and much of it has a huge amount of debt.

Giving a union the power to shut down a production line doesn't do much good when a new line can be setup overseas in hours. Corporate power has to be fought at the state and nation level

</comment></comment><comment><USER29> Like global warming, this may be a problem that we are unable to do anything about except adapt. We need to lean into the gig economy, instead of pulling away.

What we need are mechanisms to ensure that there's always a constant and steady stream of gigs available for any person to work. Many of these gigs might not be full-time or part-time jobs but rather micro-jobs or micro-tasks, that some entity needs to have completed to fulfill some larger mission, which is irrelevant to the gig worker.

The requirements for completing a task could range from simply "Being a human" to "Specialized skills in a specific domain". Profiles for workers could contain all sorts of information that could help them find relevant work quickly and easily, consisting of things like education and trade skills to even body metrics and IQ if necessary. And of course workers can be rated based on previous work history to help them better find future jobs without needing to keep a resume.

A worker should not need to get anything more out of their job than payment for services rendered. Healthcare should be handled by the government, and vacation time is handled by whenever the worker doesn't feel like working.

<comment><USER18> The major problem I see for the "gig economy" is that as a contract worker one is essentially on their own for things like health insurance and unemployment benefits. While neither are things often talked about on the HN boards, here outside the Valley those become real concerns for employees with families.

<comment><USER29> Health insurance I agree is a problem that needs to be solved independently from employers. In fact, if we actually manage to solve healthcare at some point in the future the gig economy will only grow more as it will become more feasible to move from employer to employer.

Unemployment is best handled by keeping your own savings I'd say, though that's tough for some to grasp in a nation with little financial education.

</comment></comment></comment><comment><USER30> Corporate America has trained the plebs well.

Every time a discussion on unions or any sort of organization to "push back" against the big companies in just our own industry is met with a good 50% of HN readers dismissing the idea outright.

And even talking about cutting off the supply of H1Bs - or at least the body shops that probably aren't as prolific at the top companies which are overrepresented here - is flagged and downvoted in minutes.

It doesn't surprise me, given the age of the average HN reader. Once you have a family, house, and have experienced age discrimination at 40, you'll have different views, I'm guessing. Maybe even sooner for many here if the blatant discrimination of white and asian males gets more traction.

I guess the thing that is so disappointing to me about this industry is that we're supposed to be smarter than the rest. But we have completely ignored the history of this country and the battles that our predecessors fought.

<comment><USER28> Tech folks are incredibly smart on technical subjects. When it comes to politics, power dynamics, seeing through propaganda, empathy, we are not trained in or likely to be interested in any of these "softer" but very important issues at all and it shows. Why do you suspect there are so many Libertarians in tech? It is the quintessential political philosophy of a smart successful person who does not understand these issues.

</comment></comment><comment><USER31> No-poaching agreements are very clearly illegal and _should_ have resulted in immediate charges being levied against a metric shit-ton of people as the only way that works with all these franchises is if many people are involved. The DOJ has formally acknowledged these practices are illegal and a serious violation of existing laws: [https://www.justice.gov/atr/file/903511/download](https://www.justice.gov/atr/file/903511/download) Well...it's been nearly 18 months since that announcement. Why haven't I seen a whole bunch of people get charged with felony antitrust violations, as per the DOJ's own statements about its intent to "proceed criminally against naked wage-fixing or no-poaching agreements"?

Where are the handcuffs?

</comment><comment> shady-lady Suppressing wages & over-working employees.

For salaried jobs in all companies, the only requirement for unpaid overtime should be responding to emergencies. So for engineering, this would mean _always_ 40hr week unless dealing with out of hours production downtime.

There is way too much abuse happening(frequently implicitly).

</comment><comment><USER32> How utterly pathetic that a company like Jimmy Johns, whose employees probably make single digit per hour salaries, would do this[0]! This is just one more way the rich crap on the poor.

[0] I realize the article said they stopped, but I still can't help but be very upset about it.

</comment><comment><USER33> There was similar wage suppression (or should I say, wage theft scheme) in Silicon Valley until very recently. That's why the wages skyrocketed. If the scheme could be broken up in one industry, it can happen again in others.

<comment><USER34> I wonder if the current high wages in Silicon Valley are a function of job competition in other cities (tech jobs in Austin, Denver, NYC, etc) plus a highly mobile workforce. Tech workers tend to skew younger and are also able to work remotely in many cases.

I bring all this up, because I'm not sure it will be quite as applicable in other industries. It seems that many workers aren't willing to move for work and don't have the competitive salaries in other cities required to bring up the salary. I'm sure it's possible that the scheme could be broken up through other methods, but I'm having trouble seeing an avenue there.

<comment><USER30> The SV wages I'm seeing seem to be concentrated in a few really wealthy companies who basically enjoy monopoly status in their domains.

It doesn't seem like smaller startups pay that well - though maybe that is fair due to the chance to hit it big.

What I will tell you is that software engineers in the rest of the country, especially in industries that have been decimated by offshoring and H1Bs (banking, insurance, and large companies in general) do not pay that well after about age 35 or so once you hit your ceiling (anywhere from $90K in the Midwest to $150k in high COL East Coast) no matter how talented you are.

I made way better money than most of my peers at 25 - they were still in grad school and paying off loans. By 30, I was still making more, but they were quickly catching up.

I'm imagining by 40, I won't be much ahead of anyone with a professional degree or even those who went into government and now have seniority, pensions, etc.

What I've seen so far with offshoring, H1Bs in my 20s was the first big warning sign for me. Then as I got into my 30's and started seeing how management treats older works, I'm beginning to realize that age discrimination in tech is for real - second warning sign.

And finally, if this whole war on white / asian males picks up steam in other companies, I'm probably going to attempt to pivot out of the industry completely. There is not much of a bright future.

<comment><USER35> "I made way better money than most of my peers at 25 - they were still in grad school and paying off loans. By 30, I was still making more, but they were quickly catching up.

I'm imagining by 40, I won't be much ahead of anyone with a professional degree or even those who went into government and now have seniority, pensions, etc"

I have seen that myself. I used to make more than people my age but over the years non tech friends have advanced steadily and have passed me. People in government often make around 150k too but they get a very nice pension in addition.

<comment><USER36> what sort of government work pays 150k?

<comment><USER35> The people I know work in DC at GAO, FBI and NSA make around that amount if you include paid overtime and bonus.

</comment></comment></comment></comment></comment></comment><comment><USER37> Why are low skill non-competes bad? You can just lateral into another low skill job in an unrelated industry. It's not as if you have a huge amount of human capital sunk into sandwich prep.

<comment><USER38> It still causes the same problem. It limits the opportunities people have available to them. Lets say 5 Guys opens up shop right next to Subway and is offering $3 more per hour than Subway. With non-compete's at Subway, those workers would be stuck and there would be no onus on Subway to improve their wages or benefits.

Without the non-compete Subway workers would apply for work at 5 Guys, which would force Subway to become a more competitive employer.

No matter what rung of the ladder you're on, non-compete's hurt employees and benefit employers just as they were intended to do.

</comment></comment><comment><USER39> The claim that sandwich-making is monopsonic seems dubious.

Statista has the largest employer at 12.7% market share and "Other" at 55%: [https://www.statista.com/statistics/307965/market-share- of-f...](https://www.statista.com/statistics/307965/market-share-of-fast-food- restaurant-corporations-in-the-us/)

Research Gate has similar figures, though I believe this one is international: [https://www.researchgate.net/figure/Market-Share-of-major- pl...](https://www.researchgate.net/figure/Market-Share-of-major-players-in- the-fast-food-industry_fig1_260796941)

<comment><USER40> The claim is not that it is intrinsically monopsonistic but becomes so through the use of non-compete clauses.</comment></comment>


The True Cost of AlphaGo Zero - <AUTHOR> https://keplerlounge.com/artificial/intelligence/2019/03/24/alpha-go-zero.html <comment><USER2> Very interesting read.

IMHO, such researches have become arms race between superpowers. If environment-friendliness is the only concern, the U.S. may not survive any attacks based on AIs from China.

</comment><comment><USER3> Good post. They are enslaved to their datacenters now that they have built them. It influences the way they think.

Every time I see Google's "searched X trillion articles in .5s" message, I do wonder what kind of wastage is happening.</comment>


Why PHP is (still) the easiest web programming language to learn - <AUTHOR> http://stackoverflow.com/questions/4699961/why-is-php-the-easiest-web-programming-language-to-learn/4699971#4699971

<comment><USER2> It's a bad comparison. PHP is not an alternative to Rails or Django. It's more like an alternative to Perl. PHP is a language, Rails/Django are frameworks and thus necessarily far-more complex.

<comment><USER3> I disagree. PHP is a web framework. It comes with built-in functionality for talking to databases, extracting form variables, setting cookies, outputting HTML, routing URLs - everything you'd need expect to need a web framework for with other languages.

<comment><USER4> If we follow your logic, C is a framework for building OSes.

<comment><USER5> You're going to need to explain further how C is endowed with all the capabilities normally associated with OS-building frameworks (which I've never heard of).

</comment></comment></comment></comment><comment><USER6> Also, finding a web host that supports Python or Ruby may be easy, but finding a web host that _doesn't_ support PHP is damn near impossible.

</comment><comment><USER7> That example holds true until you start using a framework :-)</comment>


Zed A. Shaw - The Web Will Die When OOP Dies [video] - <AUTHOR> https://vimeo.com/43380467

<comment><USER2> Great talk. Zed has a way of telling people to open their eyes and think for themselves that is admirable, even when you don't agree with him.

</comment><comment><USER3> Fuck! Bullshit! Zed is fun!

</comment><comment><USER4> Zed brings the zhit</comment>


Now Available – Developer Preview of AWS SDK for Java 2.0 - <AUTHOR> https://aws.amazon.com/blogs/aws/now-available-developer-preview-of-aws-sdk-for-java-2-0/ <comment><USER2> > In version 2.0, all POJOs are immutable and must be created through a > builder.

I appreciate the immutable-by-default conventions. But conversely, I'm not excited about more Java boilerplate conversion nonsense. You have to call toBuilder() to serialize it, and another build() to deserialize it. And you confusingly ser/de the builder class, not the POJO itself. Between Streams and builders and factories, reading Java code is an exercise in learning to ignore fluff and bullshit, and finding the narrow thread of stuff that actually matters in your program.

</comment><comment><USER3> Nice to finally see support for non-blocking I/O.</comment>


The American Diet: 34 Gigabytes a Day  - <AUTHOR> http://bits.blogs.nytimes.com/2009/12/09/the-american-diet-34-gigabytes-a-day/?partner=rss&emc=rss <comment><USER2> > The report suggests the average American consumes 34 gigabytes of content > and 100,000 words of information in a single day.

Whoa, that's a lot of data.

Interestingly, though, the Comcast ToS (just as an example: <http://www.comcast.net/terms/network/amendment/>) would see users capping out on bandwidth allotments in just a week at this suggested rate: _250 GB/month is an extremely large amount of data, much more than a typical residential customer uses on a monthly basis. Currently, the median monthly data usage by our residential customers is approximately 2 - 3 GB._

Granted, those gigabytes can come via non-internet channels, but that number still seems mighty high.</comment>


Korean County Achieves Its Goal: Less Birth Control, More Babies - <AUTHOR> http://www.nytimes.com/2015/12/01/world/asia/korean-county-achieves-its-goal-less-birth-control-more-babies.html <comment><USER2> They knew the replacement rate was 2.1 babies and still consciously pushed the birth rate far below that. Now they are aggressively pushing it in the other direction.

It's almost as if the government agency in charge of manipulating the population always needs to have something to do. They couldn't just say, "We've achieved our goal of 2 kids per family. Let's go home!"

I suspect that the new initiative to increase the birth rate will drive it to at least 3 births per couple, and then there will be a new expensive initiative to reduce it again. That is how you create jobs.

</comment><comment><USER3> There's a mildly amusing movie about the '70s Korean government's attempt to reduce population growth in a rural village: [http://asianwiki.com/Mission_Sex_Control](http://asianwiki.com/Mission_Sex_Control) It shows some of the concepts that resulted in the stunted growth they're addressing in the above linked article.

Nowadays the main issue appears to be that daycare is simply not affordable for the average young Korean couple, which is why you may see children still being raised by their grandparents instead. If the family is too far away, then the mother may give up her job until the children have entered school.

<comment><USER4> These days the government HEAVILY subsidizes day care. My wife and I have two in day care and we pay next to nothing for both.

This is in Seoul...I'm not sure about outside of Seoul but I imagine it's mostly similar. It's quite a controversial law and now always guaranteed month-to-month as politicians argue back and forth about it.

<comment><USER3> This is interesting, as I've heard the exact opposite from friends in Seoul. Is this a new law or s.th. tied to a specific income limit?

Out of my group of friends, none of them were able to afford day care and had to make plans accordingly. It was either by getting help from the grandparents, if the family was living close by, or by the mother quitting her job and looking after the child(ren) until they would go to school or kindergarten.

<comment><USER4> There's two situations in which you can receive gov't subsidies:

1\. Foreigners married to Koreans (multicultural families; 다문화가족), or 2\. Low- income/asset families

I'm not sure which applies to my family. Either could be as we are #1 but sorta #2 as well since I'm not employed nor maintain perm. resident visa status in Korea so my income doesn't really count.

I would encourage the people you know to look into it if they're multicultural families.

[http://southkorea.angloinfo.com/family/toddlers/childcare/](http://southkorea.angloinfo.com/family/toddlers/childcare/)

<comment><USER3> Thank you for the additional information!

My guess is that they would not fall under the 2. category if the spouse continues working, so that they may not be eligible for it then. The 1. category would not be an option for them, as they are all Korean/Korean couples. However, I will pass this on to my friends just in case they weren't aware of the 2. category already, as the high day care costs topic has come up quite often.</comment></comment></comment></comment></comment>


$10m NSA contract with security firm RSA led to encryption 'back door' - <AUTHOR> http://www.theguardian.com/world/2013/dec/20/nsa-internet-security-rsa-secret-10m-encryption <comment><USER2> The discussion seems to be here:

[https://news.ycombinator.com/item?id=6944118](https://news.ycombinator.com/item?id=6944118) (reuters.com) (274 comments)

Here are a few of the other submissions of this story:

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

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

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

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

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

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

[https://news.ycombinator.com/item?id=6944518](https://news.ycombinator.com/item?id=6944518) (theverge.com)</comment>


The Curse Of Smart People - <AUTHOR> http://apenwarr.ca/log/?m=201407

<comment><USER2> I am fortunate and privileged enough to have worked with a reasonably large number of very smart people ... and the very best of them seem to be characterized by a sense of humility and a seemingly instinctive preference to ask questions rather than answer them.

</comment><comment><USER3> Extensive discussion here from four days ago:

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

</comment><comment><USER4> This makes my dad make so much more sense.</comment>


Researchers Create 3-D Models With Flickr Photos - <AUTHOR> http://chronicle.com/blogs/wiredcampus/researchers-create-3-d-models-with-flickr-photos/28614

<comment><AUTHOR> For video of individual landmarks, visit: <http://www.cs.unc.edu/~jmf/rome_on_a_cloudless_day/></comment>


Expedient way to cd around Linux - <AUTHOR>

I have a solution for a common problem. When you're SSH'd into a server or AFS, it's a pain in the ass to cd around. Well, I wrote a small bash script that should make this much quicker.
It operates on the habit of bookmarking. If you're at a directory that you want to bookmark, you do this:
aguo@unix1:~/Documents/10605$ j add
Type an alias for the current working directory, or ^C to quit:
ml
and "j ml" -> ~/Documents/10605, etc.
To install, just save my .jrc file as "~/.jrc", and then ". .jrc" in your ".bashrc".
https://github.com/mallochine/jarvis2
--Alex Guo <comment><USER2> I have a similar script[0] that I use quickly cd to projects that I work on frequently. I maintain a ~/.projects file which is a space seperated value file with pairs of name and location. Then I just use 'project worldpeacexyz' to go to the appropriate directory.

[0] Here is the one liner...

      cd $(awk -v proj=$1 '$1 == proj { print $2; }' ~/.projects)

<comment><USER3> Every so often I see a one-liner like this and think to myself that I really _must_ sit down and learn awk properly. I never do though.

In the meantime, thanks for that - I'm pinching it! :)

<comment><USER2> Happy to help! I am certainly not a master of bash/awk/sed scripting but I do find the ability to express very complex file operations in minimal characters very rewarding :).

You will probably have to alias the script[0], as cd'ing in the script won't change the outside environment by default. I cut out a 'function' to make it one line, but I have attached the full source[1]. If you don't pass it any arguments it will tell you all of the available projects :).

[0] Add something like this to your .bashrc

      alias project='. project'

[1] The full source:

      #!/bin/bash

      if [[ $# -eq 0 ]] ; then
      	awk '{print $1;}' ~/.projects
      	exit 0
      fi

      cd $(awk -v proj=$1 '$1 == proj { print $2; }' ~/.projects)

</comment></comment></comment><comment><USER4> I've been using this for a few months:

[https://github.com/joelthelion/autojump](https://github.com/joelthelion/autojump)

It learns your commonly accessed directories so you can access ~/Projects/greatapp with `j gr`. I like your bookmarking idea though, would work nicely for some of my directories with similar names.

</comment><comment><USER5> That's smart. I typically hit Ctrl+R then use keywords from the path. Not flawless, but only a few keystrokes when it works.

</comment><comment><USER6> I think I have seen something similar a few months ago on HN.</comment>