XPath is actually pretty useful once it stops being confusing - <AUTHOR> http://news.rapgenius.com/Mat-brown-xpath-is-actually-pretty-useful-once-it-stops-being-confusing-lyrics <comment><USER2> XPaths are extremely useful. I actually enjoy writing them, much like I enjoy writing regular expressions. In fact, I consider both to return manifold the modest investment they require to learn well.

XPath : XML :: regex : text

<comment><USER3> Now you have three problems.

(But along with relational algebra, they are among the few abstractions that work really well)

</comment></comment><comment><USER4> xpath is awesome, especially once you understand what an axis is.

And that is what I've found most people who have trouble with it don't understand - like what exactly following-sibling or child means.

I spent about 2 months writing my own xpath evaluator once and it gets so much easier (to implement too) when you understand this is just a tree-traversal with an iterator following the axis.

Unfortunately the axis syntax makes it very verbose to read.

</comment><comment><USER5> W3C is full of terrible standards: the verbose dom, the obtuse xml schema, the crippled css (you can't have a variable), and others. XPath isn't one of them. It is the best way to query XML documents in a forward compatible way. Maybe someday we will able to use XPath in a CSS file instead of their crazy selectors.

</comment><comment><USER6> > it's a whopping 11 lines of code.

If you think 11 lines of code is a lot, you're overly focused on concision at the expense of readability. I've never (read: never) worked on any Ruby code, yet I find the posted example more readable than the supposedly more valuable xpath.

At the very least, they're the same. If you're writing code in Ruby, 11 lines is nothing. If you're writing code in Ruby and xpath is used nowhere else in the project, that single line of super-compact xpath might as well be 1000 lines of Ruby -- it doesn't matter.

If you're trying to compact 11 lines of code you're probably doing it wrong.

<comment><USER7> I may or may not agree with you- but one could make the argument that xpath is likely heavily tested and proven, and will handle unexpected corner cases that arise in the future, which those 11 lines of ruby will not. In that case, using xpath lowers the amount of future headaches with that code.

</comment></comment><comment><USER8> After a great article on what looked to be a handy tool, this part disappointed me:

 _for this particular task, XPath is actually considerably slower than the pure-Ruby implementation. Interestingly, that 's not true if you take out the
 part and only look for text at the beginning of paragraphs. My guess is that the following-sibling axis is the culprit, since it has to select all the following siblings of the br tags, and then filter them down to only the first sibling._

I was hoping selectors were lazy, in which case, selecting all the following siblings but then immediately filtering that selection down to the first would be cheap. Lazy or not, can there really be no efficient way to do the equivalent of jQuery next()?

</comment><comment><USER9> If you have great tools which keep the feedback loop short, then XPath, like Regex, SQL and CSS is extremely powerful and productive.

Just make sure that you document your test cases (i.e. what you should match) or your colleges will hate you.

</comment><comment><USER10> Years ago, I wrote a tool for wrapping .NET XmlDocuments and making them far easier to work with via XPath: [https://github.com/capnmidnight/xml- stuff](https://github.com/capnmidnight/xml-stuff)

On its own, .NET's XML libraries are really only good for consuming XML documents, but even that is a rather painful experience, especially as it forces a namespace on all documents, complicating the XPath expressions necessary to query it. Actually authoring documents is a nightmare. My XmlEdit project makes it almost as simple as key-value-pair config files.

<comment><USER11> That's cool. Do you have any example comparing your work to LinqToXml? [http://msdn.microsoft.com/en- us/library/bb308960.aspx](http://msdn.microsoft.com/en- us/library/bb308960.aspx)

<comment><USER10> Well, I wrote this off of the top of my head, and it has been several years since I've used the library heavily (though I have a project now that needs it, so I most likely will be dusting it off and fixing any hairy bits).

[https://github.com/capnmidnight/xml- stuff/blob/master/README...](https://github.com/capnmidnight/xml- stuff/blob/master/README.md)

However, just take note that the main concept of the library is "make it work". The idea was that, given an XPath expression with several attribute selectors, it would fill in any necessary nodes to just make it happen. So you can technically chain a ton of editing commands together, by using an appropriately complex XPath expression.

It came out of a need to repair thousands of broken XML documents. It's probably not very complete. It was written for one project--and though I took time to make it generalized--it didn't make it into a key role into any other projects; I just didn't ever again have the need to deal with XML documents on such a scale.

It's actually one of the first "big" things I wrote out of college. I'm not too happy with some of the design right now, but the functionality has held up over the years and it's not as shitty as some of the other code I wrote at the time. I guess I knew that a lot of the project was hinging on how easy it was to write XML documents, so I made sure I did a ton of testing to make it work.

</comment></comment></comment><comment><USER12> > But it gets more interesting if the lyrics are stored as an HTML fragment.

Is there any reason to store the HTML version with
s and
s instead of a plain text and converting it to HTML with simple rules à la markdown? (single line break =
, double line break =
)

<comment><USER13> Well, at a minimum, it saves the processing time required to format the text, which lessens the server cost of each page hit. It's a small optimization, but when the vast majority of the users are just coming to the site to read text, I'd imagine it would save a lot of CPU time.

<comment><USER14> Not really, the underlying text is just an HTML page that rarely changes and the requests rarely hit the database because caching.

</comment></comment></comment><comment><USER15> I also like XPath for some purposes, but I think it really suffers from (IIRC) having been designed before the xml namespaces, which it only integrates very awkwardly IMO and which ruins the simplicity of XPath. Or maybe XML namespaces spoil everything they affect to some degree :)

<comment><USER16> It's the latter (XML namespaces spoil everything).

In every single task I do that involves munching on XML with xpath, the largest timesink is figuring out how the ns needs to be set up. (Looking you you, PHP simpleXML).

<comment><USER17> > In every single task I do that involves munching on XML with xpath

And more generally that's true of every single task involving muching on namespaced XML. Namespaces are a good idea implemented absolutely terribly.

XPath is a good idea well-implemented (no, XPath 2 does not exist, there is only one XPath). One of the few I've found in XML-land. I still hate that we have to use CSS selectors rather than XPath (although that's understandable considering CSS selectors predate XPath), most of the improvements since CSS1 were in XPath day 1, and the rest (pseudo-classes) could probably have been implemented using functions.

Also, that might have finally gotten us a non-eye-stabbing standard function for "match any item of a space-separated list in an attribute" (matching HTML classes in XPath without custom helpers is the worst)

<comment><USER18> > Also, that might have finally gotten us a non-eye-stabbing standard function > for "match any item of a space-separated list in an attribute"

CSS handles this rather nicely:

        [class~=foo]

[https://developer.mozilla.org/en- US/docs/Web/CSS/Attribute_s...](https://developer.mozilla.org/en- US/docs/Web/CSS/Attribute_selectors)

<comment><USER17> Whereas xpath... does not. Which is a severe understatement considering the equivalent to the CSS selector you wrote up (or to `.foo`) in xpath 1 is something along the lines of:

        [contains(concat(' ', normalize-space(@class), ' '), ' foo ')]

the normalize-space can be dropped IIF you're certain all spaces are normalized, the spaces around the needle not.

xpath 2 does quite a bit better through `tokenize`:

        //*[tokenize(@class, '\s+')='foo']

but still not great. And god forbid you need to match multiple classes in the same selector.

[0] or xpath 1 + exslt if your xpath implementation provides it. exslt actually does slightly better as the pattern is optional and defaults to whitespace characters

<comment><USER19> Over in .NET land we appear to be stuck on XPath 1.0 forever. A project I used to work on used it extensively, but I now use the HtmlAgilityPack (badly formatted HTML) or XDocument (XHTML strict or XML) where I have the choice.

<comment><USER17> > Over in .NET land we appear to be stuck on XPath 1.0 forever.

I don't think it's a bad idea, most of the improvements in XPath 2 are the new standard functions which depending on your XPath implementation may be available as extensions (e.g. tokenize comes from exslt, an xpath 1.0 library) but along with that it brings significantly higher complexity and I think the spec has gone from "difficult to read" to "meaningless word-salad".

I really like XPath, but I can't say I was impressed by XPath 2, it loses much of xpath's simplicity with little to show for the added complexity.

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> "This is a perfectly reasonable solution, but it's a whopping 11 lines of code. Further, it feels like we're using the wrong tool for the job: why are we using Ruby iterators and conditionals to get at DOM nodes?"

Is it really that bad to have 11 lines in Ruby?

Initially I didn't get the wrong tool part but after reading it all that did make more sense. I haven't used XPath more than a few times and they were pretty simple so can't complain. Just something I'll have to keep in mind.

<comment><USER21> Agreed. I find the 11 lines of Ruby a lot more readable/obvious than that fairly convoluted XPath. Although I'd probably have opted for RSLT instead:

[http://hackpackers.lonelyplanet.com/2013/03/05/XML- Transform...](http://hackpackers.lonelyplanet.com/2013/03/05/XML- Transformation-With-RSLT.html)

</comment></comment><comment><USER22> One problem with XPath is that it can be a lot slower than native or JIT'd code depending on the implementation. Interestingly enough you can do xpath like things in Scala with native code using pattern matching:

[http://ofps.oreilly.com/titles/9780596155957/HerdingXMLInSca...](http://ofps.oreilly.com/titles/9780596155957/HerdingXMLInScalaDSLs.html)

</comment><comment><USER23> Here's how I use XPath - constant Googling! This is a good explanation, maybe I'll actually learn it now.

<comment><USER24> When do you use XPath?

<comment><USER23> Scraping mostly

</comment></comment></comment><comment><USER25> If you are curious about XPath and CSS you might want to play with [http://css2xpath.appspot.com](http://css2xpath.appspot.com)

</comment><comment><USER26> I'm happy to see many other XPath fans here.

But as far as the OP, this seems like a case of worrying about the code instead of the data structure. This would be easier to address before the lines are transformed into HTML. Which I assume is not how they are stored.

<comment><AUTHOR> Actually, they are! We host many document types on RG, not just song lyrics, so the "lyrics" field of a song is just a specific case of the general "body" field of a text. And texts can definitely have rich formatting via HTML markup.

</comment></comment><comment><USER27> XML gets a bad rap because of how much prettier JSON is, but there are a lot of cool tools associated with it. XPath is pretty awesome, I had to write a XPath parser/executor once (for a class) and it made me appreciate the value and simplicity.

Then there was XSLT, which was a pretty sweet way to turn a data format into a variety of "print" or "display" formats. Definitely been replaced by bigger and better things but it's a pretty awesome technology that does one thing really well.

<comment><USER28> XSLT is a turing-complete programming language. Really, the moment your source XML has a slightly different structure from the target output, XSLT files become monsters.

Programming in XML is _never_ a good idea. It isn't in XSLT, it isn't in Spring, it isn't in Maven. Anything that's XML and has elements or attributes with names like "if", "else" or "while", something went horribly, horribly wrong somewhere. It's horribly verbose, you can't reasonably debug it, and there's virtually no engineering best practices, which results in near- impossible maintenance tasks.

Any modern programming language with a good, consice, XML parsing library is a more effective tool to transform XML into something else than XSLT.

Don't code in XML.

<comment><USER29> Would you say _»Programming in S-expressions is_ never _a good idea«_ as well?

<comment><USER28> No. Why?

<comment><USER29> Then where do you draw the line between XML as data vs. XML as code (which seems to be bad) and sexpr as data vs. sexpr as code (which seems to be good)?

Just curious; it's just syntax, after all, and I think that XSLT really has an advantage in transforming XML to other XML (or text) compared to a program in other languages.

</comment></comment></comment></comment></comment><comment><USER30> I have made a little XPATH primer. Which is very much a work in progress. Check it out on my github: [https://github.com/GeorgeMac/xpath- primer](https://github.com/GeorgeMac/xpath-primer)

There are a few issues I am having with my markdown editor, in comparison to githubs markdown support.

</comment><comment><USER31> I prefer to use html parsers for such problems, such as beautifulsoup in python. I used xpath in the past but the ending code wasn't that much shorter then a more verbose version based on beautifulsoup. And, for someone looking at the code, the beautiful version makes so much more sense.. Xpath also feels like a big regex expression that magically works.

I'm not saying it's not useful. Actually, I believe that if you only have one use-case, then using xpath might be overkill because of all the added- complexity of maintaining a new library/technology/ideology. But if it's the sort of domain that xpath would be useful more than once, then sure use it.

<comment><USER32> The thing about xpath is that it runs in highly efficient native code. When iterating over a 100MB+ file it makes an _immense_ difference.

It's conceptually the difference between:

        count = 0
        for row in db.query("select id from
"):
          count += 1

and

        db.query("select count(*) from
")

I also don't find it at all confusing, you just have to understand the tree nature of XML.

<comment><USER31> Oh no, you've used the performance argument against me ;-) Obviously, when performance issues are on the line, you often need to trade simplicity and maintainability.

<comment><USER32> I'm not sure how using a platform specific library is more maintainable than an open standard with myriad implementations.

</comment></comment></comment></comment><comment><USER33> I just started getting into xpaths pretty hardcore with my trivia generator for [http://playhattrick.com](http://playhattrick.com) ... I use it for identifying tables of data to scrape. It's not as fun as regex IMO but it is powerful.

Pro Tip: the chrome inspector lets you right-click on an element and get its xpath.

Pro Warning: sometimes the xpath generated by chrome doesn't work when scraping with Nokogiri. I'm not sure why yet, I've just learned not to rely on it.

<comment><USER34> There's not "an" XPath for an element, as XPath describes the _route_ you take from the root of a document to the element in question. The correct route for your situation depends on your use case.

Describing an element as "the first child of the fifth child of the second child of the first child of the eighth child of the second child of HTML" is as much the right path to an element as if you described the way to your house as "Walk past the park then walk past the bus stop then walk past the hardware store then walk past the butchers then turn left then walk past the pizza shop then walk past the library"

<comment><USER33> I'm aware what XPath is/does.

And I'm not disagreeing with you–I'm only saying Chrome has this feature. I don't know what route they choose for you but I know they don't always work in tools that parse (HT/X)ML.

Here's a screenshot in case you don't believe me: [http://imgur.com/9FZSMSt](http://imgur.com/9FZSMSt)

The XPath Chrome returns for this page is: //*[@id="details"]/article/table[1]

</comment></comment></comment><comment><USER35> Interesting, (and this could just be a made up problem to illustrate the blog post), but wouldn't it have been much easier to just store the lyrics in another format (not HTML)?

For example, you could use TEI XML ([http://www.tei-c.org/index.xml](http://www.tei-c.org/index.xml)), and then use stanzas and lines. Then when you go to render your lyrics, you can capitalize the first letters in your presentation code.

</comment><comment><USER36> XPath is alright but as sixbrx noted it suffers from problems with namespaces. I keep using this xslt transformation to remove the ns info. Then it works just fine: [http://stackoverflow.com/a/413088/34022](http://stackoverflow.com/a/413088/34022)

<comment><USER37> This is fine, I guess, and it's clearly something people want to do based on how often it gets asked on Stackoverflow, but there's a reason XML zealots get snarky when people ask how to do this. Some questions you might want to ask yourself:

\- Why are the namespaces there in the first place?

\- Do I _really_ not care if the element is found in a namespace other than the one expected?

\- Does my host environment have a way to specify the namespace of the element I want to find (hint: it probably does)?

\- Is the reason that I want to remove the namespace that it's actually something I need to do or is it that I am ignorant of the method for specifying namespaces in my host environment?

<comment><USER38> The question is usually "is the author of this XML actually using namespaces in a reasonable manner?"

And the answer is usually "no".

I have seen SOAP responses with 20+ namespaces, all of them being essentially implementation details -- every different section of their internal API getting its own namespace. Inevitably, the elements are also prefixed in a way that makes them distinct, or wrapped in a distinguishing element (i.e. Contact/NameInfo/FirstName rather than FirstName xmlns="contact-name").

In situations like that, your best case scenario is that you do the grunt work of setting up aliases for all the namespaces, putting them into your XPaths, and you're done. The worst case scenario (which I've encountered) is when a version update of the API changes the URIs for half the namespaces, even though the structure of the data hasn't changed. In a case like that, you're actually penalized for doing the 'right' thing and not just stripping the damn things off.

</comment></comment></comment><comment><USER39> CSS selectors are much easier to remember than XPath. Python's BeautifulSoup allows you to select elements with selectors and is very convenient. XPath is a bit more verbose and most people already are familiar with CSS syntax.

<comment><USER40> And indeed, any CSS selector can be converted to an equivalent XPath query, at least for selectors on XML and HTML. [http://pythonhosted.org/cssselect/](http://pythonhosted.org/cssselect/) is a Python implementation of such a conversion. (Note that there is no XPath to CSS selector converter, as XPath can express certain things CSS selectors cannot, as CSS selectors are designed such that they can be matched using a streaming parser as soon as the first child of the element appears.)

</comment></comment><comment><USER17> > the / in an XPath expression plays the same role as the > in a CSS selector:

The `/` in an XPath expression is probably a better match for the space in CSS selectors.

<comment><USER41> I think you are thinking of "//", which acts like the space (ie: any number of children).

<comment><USER17> No, that's just a difference in default axis. I mean that `/` is a separator between traversal expressions, much like whitespace in CSS selectors.

<comment><USER41> Ah yeah, I understand what you mean now. XPath's `/` is something like a token that means "separate these two things". In CSS the separation between segments is the zero or more whitespace characters that live between the parts of the selector.

</comment></comment></comment></comment><comment><USER42> This is a great explanation and quick tutorial on XPath, but, like regex, don't think I'd ever use it in production code unless I absolutely had to.

I'm sure I'd have _fun_ coming up with an XPath solution, but for me, the ultimate goal is maintainability. If I wasn't 90% sure that the next person to look at that code already knew XPath, then I'd go with the Ruby solution.

Dealing with 11 lines of code in a language you know is better than dealing with 1 line of code in a language you don't (which ends up forcing you to read 1000 lines of documentation and examples to understand it).

</comment><comment><USER43> Writing an XPath 1.0 parser in C was fun. Maybe one day I'll use it to (partially) replace MongoDB's JSON query language.

</comment><comment><USER44> I use xpath way more than I care to at my job but it get's the job done.</comment>


How Will Automation Affect Different U.S. Cities? - <AUTHOR> https://insight.kellogg.northwestern.edu/article/how-will-automation-affect-different-united-states-cities <comment><USER2> I completely disagree with the article's assertion that 'knowledge professions like ... lawyers' will be relatively unaffected. 'DoNotPay' (the robot lawyer) has already helped overturn millions of dollars of parking fines. NPR article on the subject: [https://www.npr.org/2017/01/16/510096767/robot-lawyer- makes-...](https://www.npr.org/2017/01/16/510096767/robot-lawyer-makes-the- case-against-parking-tickets)

Also in reference to manufacturing processes, it appears that Toyota has learned some hard lessons in automation and is actually moving in the opposite direction: [http://www.thetruthaboutcars.com/2011/02/toyota%E2%80%99s-se...](http://www.thetruthaboutcars.com/2011/02/toyota%E2%80%99s-secret- weapon-low-cost-car-factories/)

<comment><USER3> Its possible that some mundane examples will be automated, but the law is not a deterministic code that can simply be interpreted and executed. Automation may make the job less tedious and might reduce the numbers of lawyers needed (or more likely, paralegals).

<comment><USER4> Many entry-level lawyers have historically been involved in document discovery. AI-based software and having a significant impact on the job market for freshly minted lawyers. Software now performs ediscovery.

[https://www.technologyreview.com/s/609556/lawyer-bots-are- sh...](https://www.technologyreview.com/s/609556/lawyer-bots-are-shaking-up- jobs/)

<comment><USER5> I've heard this example bandied about every time this topic comes up, but does this actually mean that those entry-level lawyers would be out of a job? Or does it simply mean that they would be freed up to perform other tasks? Wouldn't that be a win for a law firm that's presumably trying to grow and take on more clients?

<comment><USER6> The current job market for lawyers is kind of messed up. When in law school you can be applying and accepting job offers clerking or working at law firms 2 years before the start date.

I don't know what even more increased pressure on that job market would do to it.

<comment><USER7> I'm not sure I understand: do you sign a contract for when you finish your studies?

Or do you do unpaid work in the hope that when you finish you'll get a job?

<comment><USER6> You accept an offer conditional on passing the bar. But even once you're out of school, if you want to do a clerkship you have to apply for it 1-2 years in advance.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> Millions will wake up with no goals and no structure to their lives because they have all of their most basic needs satisfied by UBI if the democrats have their way. Republicans will require mandatory public service to obtain UBI. Optimists tend to think this means more time for artistic passions and inventive endeavors. Pessimists think people will spend more time watching Big Bang Theory. Usually and answer is in the middle.

I will be investing in antidepressants.

<comment><USER9> There are plenty of countries that have very liberal welfare payments. They're extremely easy to get and anyone that wants to can live on them for years and years without ever having a job.

You could look at those examples to see how society will be impacted...

Australia is a good place to start your research.

(It's not quite UBI because you have to apply for it and do _something_ to get it, but it's pretty close)

<comment><USER10> Anecdotally, from family members in the medical industry who work with low income patients, people on welfare (who could otherwise work) don't seem to have very fulfilling lives. I think it's pretty clear that people need _something_ to work for or towards in order to find some sort of meaning in their life.

<comment><USER11> People with welfare are in a very different situation than UBI due to the fact that the welfare will be lost if they do go work.

You bringing this up at this point in time as if it's relevant almost seems trollish.

<comment><USER12> It's definitely a relevant point. If a large group of people who are not working seem to be predominantly unhappy, that's legitimate information that may be useful for discussion about universal basic income. You can make a compelling argument that the _reason_ for that unhappiness is not innate to a lack of work, but rather due to the particular idiosyncrasies of the implementation of welfare, but that's not obviously true _a priori._

The commenter seems to have made this observation in good faith. It seems rude to me that you would insinuate the point is irrelevant and "almost seems trollish" just because you disagree with it, particularly when you did the bare minimum to mount a substantive rebuttal. It's true that we shouldn't conflate the unhappiness associated with welfare with some sort of ennui induced by a lack of productivity; but that doesn't preclude the point you're disagreeing with, which could still be true.

</comment></comment></comment></comment></comment><comment><USER13> I've spent a lot of time building automated assembly lines and I think the writers of the article (and the underlying research) gets a lot wrong. I doubt the smallest cities will be prime automation areas since areas with high degrees of automation require a few highly-skilled robot babysitters that are unlikely to relocate into the provinces. I think large cities are much more likely to see high automation rates due to economies of scale and small citiies will either stay the same or businesses will simply leave.

<comment><USER14> I think you'll find enough highly skilled baby sitters in the provinces living there for personal reasons. McDonald's shouldn't have any problem finding someone in a city of 50,000 to watch their burger flipping robots machines.

</comment></comment><comment><USER15> There is a presupposition in this article: The automated jobs will leave a vacuum. That is, routine jobs will be taken away with no other jobs to replace them.

What if reducing routine jobs frees up minds for higher pursuits? In the same way that high level programming languages such as Python have increased the amount of programming jobs, as contrasted with writing in assembly. A quick search on Dice shows Python jobs outnumber assembly 8 to 1.

This might actually lead to a jobs _explosion_.

<comment><USER16> You only have to go back a little over 100 years to a time when agriculture accounted for over 50% of human labor. Now it's under 2%. Yet unemployment is still under 5%.

While agriculture likely represents the largest shift in labor during the 1900s, there were a huge number of jobs automated away during that time. Assembly lines, factories, and automation have been displacing workers since the dawn of the industrial age.

75 years ago there were basically no information technology jobs, and now it represents nearly 10% of the workforce, or four times the level of agricultural employment.

In summary, I agree with you; freeing people from mundane labor will lead to an explosion of jobs for which people are better suited; jobs which are more engaging and fulfilling as well.

There are always people who fail to adapt and get left behind, but the rest of the world moves on. People like to work.

<comment><USER17> There's not much to learn from agriculture. People left farms for better jobs in factories. That's not a story of unemployment and displacement.

If a new source of jobs pops up that can employ 50% of the population at higher wages than they are currently earning, no one will complain about it (except maybe for the employers at their current jobs, but they will probably just buy the proverbial tractor).

<comment><USER18> Factory jobs started out being awful, and workers had to physically fight and die to get basic protections. Eventually we got a 40-hour work week, less child labor, etc.

<comment><USER19> And yet people lined up around the block in hope of getting one. I'm not quite sure what your point is here.

<comment><USER18> Well it's still better than watching your family starve, sure. Reshaping our society to accommodate a lot of people who don't have to work (because machines are doing the work) is going to be a long and painful process.

</comment></comment></comment></comment></comment></comment><comment><USER20> No matter how you shake this, we're looking at 60+% additional unemployment for every city. Some fare much worse. And I remember from my history studies that the Great Depression was officially around 33% unemployment.

I've listened to the national talking heads and political figures, and nobody publicly is talking about this. Not the Republicans, and not the Democrats. However, the Dems seem to have a better idea by bolstering all sorts of subsidy and welfare programs. Those work well and good for keep individuals out of poverty, but falls short when working with communities of impoverished. These end up counting on, and using tax revenues from well-to-do areas. And these unemployment numbers show that there won't be 'well-to-do' areas.

The WPA was one such way out of mass unemployment. But given how effective automation is, I question its use this time around, if the current political atmosphere would even have the stomach to discuss such things.

This is one result from capitalism. Accelerate until we hit the wall. And this wall, is that we will no longer need "labor" provided by humans. So, what do we do with the 95% of people that must work? That's the $64,000 question.

My personal plan: I'm learning electronics from the ground up. I'm teaching myself control systems theory. I'm learning how things are put together - electronics are very similar to code libraries. You do a function block to do something, and you chain them together. This means that I'm untraining specialities, and learning how to analyse and fix quickly. I guess being a sysad also helps in that. I'm not putting much trust in the national or state level government. I see more done at the local levels, but without tax revenue/money, they're up shit's creek as well.

<comment><USER21> 60% is unrealistic. It's still very expensive to make anything as reliable as a human being if we're talking about anything other than pick-and-place (and that was really expensive the first time around).

For a business to automate, it must invest substantial resources into the automation process and product. It must work in an industry where consistency is the most important quality customers are looking for.

Automation already affected most of what it's going to do in manufacturing.

Given the capital and talent being deployed, automated driving is on the way. Most other industries are not seeing similar talent and capital being invested into automation. Long-haul trucking is the industry I have the greatest concern for. Most of the others (e.g. short order cooks) will be fine for quite some time.

<comment><USER22> I have to admit I disagree strongly. How could you have this opinion and be in the workforce over the past 20 years? Automation isn't one day a human-looking robot shows up and does 100% of your job better than you did it and now you're unemployed.

Automation is we got a new machine in the shop that increased throughput, and we never replaced Betsy and George when they quit. It's getting that new cashier system that is idiot-proof and has pictures to tap of dollar bills vs. a keyboard or requiring any sort of math skills. It's redesigning the bathrooms to make cleaning take 30% of the previous time using basic automation and techniques.

It's a long slow reduction and dumbing down of the workforce that won't happen overnight, but has already been happening and on an accelerating pace for 20-30 years or so now.

Compare the skills needed to run a short-order cooking station 30 years ago to today - it's not even comparable. We would call such a position skilled or semi-skilled this day in age, as the average kid off the street couldn't be up and running in 6 hours of training. It would take months to replace that worker with someone in-kind, where now your labor pool for such jobs is basically "anyone who can show up on-time and sober" which of course pays considerably less.

I see automation as the long slow destruction of semi-skilled labor. You either are effectively a cheap very flexible human robot, or you get paid well in a highly skilled position. The middle is being hallowed out rapidly.

<comment><USER23> hollowed (emptied) not hallowed (sacred)

</comment></comment></comment></comment><comment><USER24> I have always wondered how automation will adapt to things like ice on roads/parking lots/equipment, or salt everywhere like in Minnesota/Wisconsin. Is this being considered in sunny California/Texas?

</comment><comment><USER25> I would love to see a breakdown by country. Given the endless rhetoric around manufacturing reshoring/offshoring/etc., it would be great to see if thats even something we should care about given how much automation already exists and how much more is about to come online. Owning the robots and supply chain will obviously have some value, but politically speaking, the value is often measured in jobs which seems like its minimally shortsighted if not downright disingenuous.

</comment><comment><USER26> There is a lot of confusion between "automation" and "artificial intelligence", I believe that automation facilitates, and modifies the professions in the short term. AI is something that should be discussed in a broader sense.

</comment><comment><USER27> I used to believe that automation will lead to greater unemployment. Now I think that two things happen: goods get cheaper which lowers the minimum amount someone needs to earn for a job to be acceptable. People who still have a great job have more spending our. This unlocks new jobs that previously nobody would have paid for and nobody would have accepted. But both maximum price somebody would pay went up and minimum price someone wants to perform went down. Recent examples are all these delivery services and obviously Lyft and Uber, although the car services are a little more complicated since there always were taxis.

<comment><USER14> I think there are three forces discussed here. Automation (removing work). Decreased cost good (reduced labor costs). Increased wealth (those with it spend more on goods and services).

Automation's effects on the economy larger depends on the pace it is achieved. If someone released a box that replaces truck driver's tomorrow and sells it for $1000 then there will be huge disruption. If drivers are replaced with automation slowly over 30 years the impact will be less because the rest of the economy will have time to absorb the impact.

Increased wealth is expanding the service industry, with petcare being a prime example. This will create more jobs, but those jobs are both at risk of being automated and might not be enough to replace automation.

Decreased good costs works for some things like toothbrushes and iphones, but they don't work so well for limited resources like gold jewelry or real- estate. It might improve quality of life in some ways, but it cannot help with everything.

</comment></comment><comment><USER28> from the article: "In a small town, there are likely a few small restaurants run by a few people who do many things—cook, clean, manage the books, etc. "Some of these tasks are easily enough defined to soon be automatable," Youn says.

By contrast, in a larger city there will likely be some much larger restaurants that require more specialized knowledge and skills—perhaps a marketing team, or a lawyer who specializes in the restaurant industry—that cannot be easily automated."

I have a small factory, we use a fair bit of automation. I disagree with the above quote - I think that the larger restaurant will be more likely to automate first, and arguably the franchise restaurant model is automated marketing and business management. The larger places will go full robot in the kitchen sooner, the smaller places will continue to have one person wearing many hats for a long time. Larger places have more budget, can afford more automation, and the smaller places would have a harder time justifying a burger cooking robot if it would only be in use a small fraction of the time.

My welding robots are super fast. I have two so that I can reduce setup and changeover time. The robots are so fast, the main headache is feeding them enough jobs - selling the work. The setup and changeover is very slow. I spend 5-10 hours getting a new jig built, programmed and tuned up.

This setup time is never discussed in the media. Sure the robot will be amazing and fast and super productive - once you spent 10 hours programming it to do so. If the task is a 'once-only' and it only takes an hour, who in their right mind would automate that? This setup time will be the biggest impediment - humans are pretty quickly adapted, autonomous fleshy robots, that outperform the best automation when it comes to setup time.

I love automation. I have 6 automated machines, and a couple 3D printers, that you can push a button and go get a coffee, and there is the part when its done. Sometimes one button push can make a couple thousand dollars in products - that is a great feeling! But the setup time is massive, and this is the greater expense over the cost of the machine.

Its like an algebra equation. y=ax+b where 'a' is the setup time, and 'b' is the time for one unit.

With a human welding a simple part, 'a' would be 5 minutes, and 'b' would be 5 minutes.

With a robot welding cell like a Panasonic PA-750, the 'a' would be 500 minutes, and the 'b' would be 2 minutes.

If you need 100 of them, no sense in turning on the robot. If you need 10,000 of them, the robot welding cell will be done in 20,500 minutes instead of 50,005 minutes for the human welder. My Panasonic costs $2284 a month for 60 months on a lease, $1 to purchase at the end. The human costs $1000 per week in perpetuity, with increasing costs due to inflation if nothing else. The robot is half the hourly, and its paid for in 5 years. The human is never paid for, it always needs compensation. In this example, the human takes 500 hours more to do the task, and that is $12,500 more in wages over the robot. My 7 year old son can run (not program) the welding robot and make parts, which he does for Pokemon money on the weekend.

So where does that leave the human? Doing small runs! Which is better for the human anyway! Welding the same small part for weeks at a time makes you a little crazy. Its like watching the same GIF every 5 minutes for weeks at a time. Welding the same part every 5 minutes for 2-4 hours is quite doable, can be fun to get in the groove. I think in the future that production runs will become smaller as CNC machines proliferate. Everyone will want something custom, which is what humans are best at. High volume will be robot welded, because its boring and machines do it faster and better.

I manufacture in America. Using automation, I am directly cost competitive with China and India in my core products that we have been making (and optimizing manufacturing) for 14 years. Its 1/4 steel plate mostly, and our cost to build is directly in line with the best quotes from Asia. Robot welders are cheaper than any welder in Asia. We loose on thinner stuff, like 16 gauge and lower, and we lose on items that need a lot of hand work. But we are right there for heavier items. We did a large welding job for Chinese factory last year that was for the US market. Our price was the same, but shipping was less since the product was already here. We got the deal over their own factory. 28,000 units.

TL;DR - things are better for humans than these articles would have you believe.

<comment><USER29> And you are underestimating the crowd that will prefer to buy "human made" and not "cheap automated robot crap"

Not saying they will be right or wrong, but that's the current dichotomy with US Made / Non US made goods.

<comment><USER30> There will of course be plenty of hold-outs, but most "robot made" will actually be better than human-made.

<comment><USER29> Sure, for most things. I am finding this not to be the case with things like furniture, clothing, small finer metalworks that require something like a blacksmith, food, soap, etc.

<comment><USER31> Human made soap is better?

<comment><USER32> For the purposes of being a Veblen good, yes.

</comment></comment></comment></comment></comment></comment><comment><USER33> Looks like software application development is listed as having a relatively high automation "risk", around 21%. Anyone know how this was calculated. Doesn't have to be a link for this particular site, just some good reading material.

My initial reaction was that this number is hard to nail down because on reflection, so much of what I do gets automated. That's the nature of software. When I started programming for money in the late 90s, I still managed memory. That's automated now through garbage collection (for me). I also used to do a lot of direct network and socket programming, also automated away. I managed my own database connection and pooling. JDBC came along and abstracted that away, but a decade later, I heard someone who used an ORM say he wouldn't want to write all that "low level" jdbc code ;) I guess you're getting old when the high level leaky abstraction of your youth becomes the low level code for a new generation of programmers.

My whole career has been one long progression of getting automated away, by this perspective. I remember when I proposed getting a web server up and running for a project in college, and a professor remarked on what I was doing. There was a time, he recalled, when doing a "spreadsheet" was fairly advanced and took some serious technical chops. The same would happen to web servers - but for the few years then they required specialized skill and had a big impact on business, this knowledge would be very valuable. The moment would pass, but something new would come up, and that would create all kinds of new apps that require an app developer.

To me, the moment when nothing new comes up - ie., when there is no new moment for human app developers, all software development is now automated - that is the moment when we _replaced_ by automation. I wonder if that's what this article is talking about? If that's the case, 20% might seem high, though not out of the question. But by a more general definition, the one I discussed above, I'd ay the odds that my current skillset will be automated away is roughly 100%. I want to be clear I'm not (necessarily) talking about churn, I'm talking about new breakthroughs that fundamentally change the job. That kind of change I don't mind at all, I enjoy it, it's probably why I'm in this field. Churn, on the other hand, is what makes me want to quit.

I'm rambling on here, but it occurs to me that software development probably isn't that unusual. It's the jobs that don't change as much that are unusual. Lawyers, for instance, have certainly changed over the years, but we expect people to still be lawyers in 100 years. How many horse and buggy drivers expect that job to still be around? How many lathe operators or truck drivers expect this?

I'm thinking, maybe the best metric isn't the odds that a particular job will be automated, since for many (most?) jobs, that's pretty much 100%. The question is, what are the odds that a job will be automated with no path to the next thing. That's the fundamental transformation going on here. And yeah, it actually is happening. A horse and buggy driver can become a bus driver, but what happens when the concept of a drive goes away completely? Will anything emerge?

Another aspect of automation I'm interested in is the complete bindside. Music, I think, was one of the interesting automation stories of the last 100+ years. There were various attempts to replicated the human mechanical process of playing an instrument, and they all appeared very unlikely to do much replacement. Yeah, piano rolls made an appearance, and you could try this I suppose by hooking up some contraption to make a flute play.

But what happened instead was that it turned out you can actually store music physically in various materials and play it back. Music went from 100% live to less than 1% live in about 50 years. But we didn't really automate music, we replaced it with a similar product.

My guess is that this will be the story with software development. It seems absurd to me that this could happen through automation, but that's because I'm locked into one way of thinking about it. Kind of like trying to imagine how a crankshaft could power a bunch of strings tied to a bow and some pegs to try to recreate the physical process of playing a violin. It won't happen like that. Something utterly mind blowing, like storing music in grooves of different depth in vinyl, of all things, utterly unanticipated. Yeah, that's generally how this massive shifts happen.

<comment><USER34> Yes, I'm right there with you, and the cool part about our jobs being automated away -- besides not having to write all that boilerplate -- is that when the automation takes a steaming shit, we get to be heroes. I'm fine with this. I guess until it doesn't matter anymore, but then I suppose by that time, it won't matter for a whole lot of people, and we'll have something worked out.

</comment></comment><comment><USER16> I find it bizarre that they single out fishing as a job that's likely to be automated away. I don't see this happening any time soon. Fishing crews are already pretty streamlined, and many things on fishing ships are mechanized. I can see automation replacing more of the post-catch processing on giant factory ships, but I don't see robots costing many other fishing jobs in the near future.

<comment><USER35> Could you elaborate more? From my very amateur point of view, fishing seems like something that could be completely automated pretty easily, but it seems like I'm not seeing the complexity.

<comment><USER36> A large part of it is liability. In theory you could just send a self-driving boat out with a giant net to scoop up a few tons of marine life to bring back to shore and stuff in a processing plant. Or even better maybe make a self- sufficient platform that uses current to turn turbines and just scoops up fish, sorts them, and puts them on ice for cargo carriers to come by and pick up.

The problem is the same one as self driving cars on a more massive scale - accountability. When you have human bodies at every step of the process you have someone to blame if you "accidentally" kill a protected species, overrun your quotas, put tainted meat in the market, etc - if everything is operating on its own you get the same situation where self driving car operators are going to try to blame the software engineers if something goes wrong, while the company gets to take the fallout.

And the fines on illegal fishing are _actually_ legitimate compared to the token paltry fines in other industries (depending on the country, of course).

The economics are completely on automations side here, you could get 97% good fish for a tenth the price with some substantial up front investments today. But that 3% false positive / sorting error case with the inability to blame line workers kills the business.</comment></comment></comment>


Ask HN: Is it possible to verify a phone without SMS or a call? - <AUTHOR> Hi,
I am curious why there are no well-known services that replace phone verification despite the fact that so many products spend much money on verification of their users' phones...
I see two possible directions of solutions:
1. Technological: deep understanding of android and ios possibilities to somehow connect to user's sim-card and verify phone. Or in general, doing it with any other protocol or request that does not require a call or SMS.
2. Iterative with existing options: to create a product that tries verifing via sending free imessage (if it is iOS). If it doesn't work, it tries verifing via What's up and so on. If nothings works, it uses the most expensive way - sending SMS.
Can you, please, recommend some technologies or services that are now state-of-the-art solutions of this problem? <comment><USER2> > Can you, please, recommend some technologies or services that are now state- > of-the-art solutions of this problem?

Between U2F, bank-issued eIDs, smartcards, SIM applications, blockchain-based solutions (think Metamask), keybase, email links, anything around SAML, NTLM and Kerberos/RADIUS there's quite a lot of options possible.

As for sign-on through Whatsapp, a lot of companies were doing it since 2012 or earlier, first checking if SIM is online (HLR -> IMEI) to confirm it was not replaced since last login, followed by trying to find active online session through 3rdparty gateways and using it.

AFAIK most of these are gone or changed their products lineup by now, engageSPARK and messagebird seem to be alive though.

<comment><AUTHOR> Thank you! This is very informative</comment></comment>


Why LinkedIN Should Have A Virtual Currency - <AUTHOR> http://www.skepticgeek.com/socialweb/why-linkedin-should-have-a-virtual-currency/

<comment><USER2> I don't use LinkedIn much so maybe I'm missing something, but what exactly would people use credits for? Virtual currency has been very successful for games, but LinkedIn doesn't have any games.

If their developer program is successful and 3rd party app developers utilize virtual currency then it would make more sense (like what Facebook is planning with credits)</comment>


Didn't see this coming: The Goldman Sachs Github Account - <AUTHOR> https://github.com/goldmansachs <comment><USER3> I can understand the reaction on this community to the news, and I'm sure that there are elements of PR and recruitment strategy here, but I happen to know that the primary driver is pretty sound; job satisfaction for top employees.

Goldmans has its share of top programmers and, like any company, is keen to retain them. One of these people made contributing to Open Source a major goal for last year.

Well done to him, and well done to GS for supporting him. The company (rightly) gets a ton of bad press, but that doesn't mean it can't do good things as well.

Disclaimer: I'm an ex GS employee, but have nothing to gain.

<comment><USER4> When I interviewed at GS last year, I was explicitly told that I would not be able to go on working on open source (they had checked out both my blog and my Github). This despite none of the technologies in my main project being in use in the group I was interviewing with...

<comment><USER3> I guess it probably depends on the position/team. I wouldn't expect GS to open source anything they consider a competitive advantage, but then I don't see Google open sourcing their search algos either :-)

<comment><USER5> There's a difference between "you can't open source some/all of our code" and "you can't work on unrelated open source projects in your free time".

<comment><USER3> I agree. I can't say I like standard practise of employers owning everything their employees do whether in or out of work, or requiring that you stop anything they don't own.

However, this is hardly something that is limited to Goldmans or financial services. I'm pretty sure that Apple require you not to work on side projects, for example.

We had a discussion regarding this at my company - Future Workshops - <USER2> week, and decided that what people work on in their own time is their own business, with the caveats that a) people don't work in conflict with any clients, b) the IP is clearly separate, and c) it doesn't affect their day job in a negative way.

<comment><USER6> Let's not call this a "standard" practice. In my experience, most companies do no make claims to your off-the-hours projects. And that is how it should be. Unless you're doing some cutting edge AI research or something of that sort, this kind of legal claim is just paranoid stupidity. Even if you do cutting edge AI research, it shouldn't entitle your employer to own a phpBB patch you've done in your free time.

</comment></comment></comment></comment></comment></comment><comment><USER7> From their FAQ:

      Why is Goldman Sachs open-sourcing GS Collections?

\- We believe that GS Collections offers a significant advantage over existing solutions. We hope others will benefit from it.

\- We believe in the power of the technical community to help improve GS Collections.

\- Technology is a huge part of what we do at Goldman Sachs. GS Collections exemplifies our commitment to technology.

\- We use open source software in many of our operations. We have benefited from the work of others and we'd like to give something back.

      Does Goldman Sachs use GS Collections?

\- Yes, we use GS Collections in many of our internal applications.

<comment><USER8> "We believe in the power of the technical community to help improve GS Collections."

They aren't accepting code contributions right now, so that doesn't make much sense.

<comment> nemanja-mit It's a recruiting tool, that's all. They want to be a bit open sourcey to attract top talent. The broken unit test battery that comes with it is a job interview tool.

<comment><USER9> I would guess this was initiated by IT employees (open sourcing the library might make life easier for them, assuming someone outside the company contributes) and approved by top managers (because it's good for recruitment and makes their IT staff happier).

However I would doubt this will make a big difference when attracting top talent. One important reason for that being (IMO) that the best IT people prefer innovative technologies and GS uses a proprietary in-house programming language and db for everything that's important. Some say their tech was perhaps innovative 25 years ago [http://stackoverflow.com/questions/3392636/slang-goldman- sac...](http://stackoverflow.com/questions/3392636/slang-goldman-sachs- proprietary-programming-language) .

Not to mention that if you work for GS you lock yourself in those in-house techs. When I went to a job interview at GS and asked what the advantages of using an in-house language and db were, I was told that it's very hard to hack their systems, because no one else uses them (Not sure how valid this argument actually is though).

</comment></comment></comment></comment><comment><USER10> Why not? It's a large corporation with many branches and technical needs, some of which are harmless to open-source. Despite its reputation, I don't think they go through their day thinking "hmm... we could open-source this, or we could go kick a puppy instead! Muahahaha!"

<comment><USER11> Why choose?

<comment><USER12> I believe GPLv2 has a clause against kicking puppies

<comment><USER13> Douglas Crockford puts an anti-puppy-kicking clause in his OS licenses.

www.json.org/license.html

<comment><USER14> I actually looked, there is no such clause :(

Well, to be specific, there is no clause that prevents you from kicking the puppy yourself just for the hell of it. There is a clause that prevents you from using 'the software' to kick a puppy, assuming 'kick a puppy' qualifies as evil.

Also gullible is not written on my ceiling.

<comment><USER15> It might be written on the bottom of your shoe, have you checked? :)

Sometimes I think I'd like to release under a "you cannot use software patents in anger" license that restricts behavior outside of the software usage. But that's probably too restrictive to catch on.

</comment></comment></comment></comment></comment></comment><comment><USER16> I'm not entirely surprised. A few months ago (a year and a half! wow!) GS hired Ulrich Drepper, the longtime project lead of the GNU C library.

I also read another article (no way I can find it again now) saying how big investment banks are hiring more and more software engineers.

Disclaimer: I work in IT for a large investment bank which's gradually outsourcing all its IT department to south asian countries.

<comment><USER17> In the same boat as you are. The bank that I work for is outsourcing very heavily to India and East Europe.

</comment></comment><comment><USER18> Ahh, it's Henry Blodget fault. He argued that Goldman lost the FB IPO partly because the other underwrites were semi geeks investment bankers, [http://www.businessinsider.com/morgan-stanley-goldman- sachs-...](http://www.businessinsider.com/morgan-stanley-goldman-sachs- facebook-ipo-2012-5)

<comment><USER19> Interesting article. There's something wrong with the interface for me (it doesn't pagedown properly), though.

</comment></comment><comment><USER20> There are a few other brands on there, including Walmart and Amazon:

<https://github.com/walmartlabs>

<http://www.readwriteweb.com/archives/walmartlabs_kosmix.php>

<https://github.com/amazonwebservices>

I can imagine Goldmans are using Github to acquire talent and new ideas. I am sure they have some complex problems and technology that needs fixing.

Stack Exchange had a discussion on this last year:

[http://programmers.stackexchange.com/questions/61062/why- sho...](http://programmers.stackexchange.com/questions/61062/why-should-large- financial-insurance-companies-use-git-and-or-github)

<comment><USER21> I don't think Amazon being on Github is really that surprising.

<comment><USER22> It is if you work at Amazon ;)

</comment></comment></comment><comment><USER23>
      ...
      import com.gs.collections.impl.block.factory.Comparators;
      import com.gs.collections.impl.block.factory.Functions;
      import com.gs.collections.impl.block.procedure.CollectionAddProcedure;
      import com.gs.collections.impl.collection.mutable.AbstractCollectionAdapter;
      ...

Gees, I feel sorry for people still stuck using Java.

<comment><USER24> Why? Because Java has good, built-in, worldwide namespacing that always works? Or because Java has IDEs that pull in imports automatically so developers don't have to think useless shit?

Or is it because you're fanboi who dislikes Java merely because it's Java and choose any opportunity, not matter how inappropriate, to disparege it.

Java is by no means perfect, but let's at least pick on it for the things it actually does poorly rather then just picking on it because it's no longer considered cool.

<comment><USER25> I hate auto-generated code by IDEs.

It always produces stuff like... that.

<comment><USER26> I never use an IDE to edit Java, and that's pretty much what it looks like. To use a class in Java, you must import it first. To import it, you type "import " and then the fully qualified name of the class. From there, you can use the unqualified name.

It's basically like that in every other programming language, though others are less opaque. In Perl, you get a variable called %:: that holds the symbol table, and you can directly manipulate it. That lets you write something like "use all" and use every CPAN module at once. In C, you can include arbitrary source files at arbitrary places, making it possible to import every library with one statement. But in both languages this is considered terrible practice, with most style guides wanting one use or include statement for each library. Exactly the same as Java.

If you were going to complain about the API, you might complain about the "impl" in every import. That's a silly convention that wastes typing. (Also, Google puts their collection classes in the "collect" namespace, saving a few letters over calling it "collections" like Goldman.)

<comment><USER27> But, if you're using a modern IDE, removing impl or going from "collections" to "collect" isn't saving anyone any time. Or, at least, it shouldn't be.

<comment><USER26> Sure, but it's always nice when imports fit on a single line without wrapping. Essential, no, but nice.

</comment></comment></comment></comment></comment></comment><comment><USER28> Any java guru think this is good stuff? Just curious. I moved on form java years ago.

<comment><USER29> Took a quick look, GS Collection seems to be a similar library like Google Guava; a nice functional library helper to perform operation against Java collection.

<comment><USER30> GS Collections also seems to have new implementations of the basic Java collections (implementations of List<T>, Set<T>, etc.). I haven't studied them sufficiently to say whether I like them better, though.

At first glance I think I dig Guava's API a little more, but I haven't looked closely enough to really have an opinion.

</comment></comment></comment><comment><USER31> _We currently do all development in an internal Subversion repository and are not prepared to take external contributions._

It's a PR and recruiting tool.

<comment><USER26> How is that statement good PR or good for recruiting?

<comment><USER32> It's not good for either, but if this was an attempt at open source 'out reach' then they're kind of failing at delivering by not taking pull requests. That leaves it being a weak attempt at PR/recruitment.

</comment></comment></comment><comment><USER33> Heh. Morgan Stanley open sourced Aplus a long time ago.

<comment><USER34> Have you ever used it or any other APL? I'm currently getting familiar with K, which is the language Whitney and the company he founded (Kx Systems) after he left Morgan Stanley made, but from an open source implementation called Kona by Kevin Lawler and Scott Vokes: <https://github.com/kevinlawler/kona>

<comment><USER33> No. I get the sense that Aplus was used by the Fixed Income division more. I was in Equities; our wacky custom language was Perl.

I still have "font kaplgallant not found" nightmares from time to time.

</comment></comment></comment><comment><USER35> Reminds me of the completely Open Source financial analytics company Open Gamma (<http://www.opengamma.com>). They also have a GitHub account with (in their own words) functional java code <https://github.com/OpenGamma>.

This Java paradigm of "private final static" all over the place and its ugliness is one of the prime reasons Rich Hickey considered creating Clojure.

</comment><comment><USER36> It has some nice features: parallel iteration and lazy iteration (return an iterator that is only evaluated when the values are needed)

</comment><comment><USER37> Software is eating the world. But I really shouldn't be surprised as I am at this one, since trading is well-known to be the most algorithmic math-geek industry at present.

</comment><comment><USER26> It's Guava, essentially.

</comment><comment><USER21> This does not seem to be new. According to their profile they have had an account since Dec 16, 2011. This might be the first time they have open sourced anything though.

</comment><comment><USER38> I'd be really impressed if they open sourced SecDB/Slang.

</comment><comment><USER39> No APL code? I'm disappointed!

</comment><comment><USER40> Why simulate Lambda? Couldn't they just have waited on Java 8? Or maybe just used JRuby, if Java was a requirement? Still- it's great that they shared this.

<comment><USER41> I don't think languages, large organisations, and backwards compatibility work in the way that you imagine.

</comment></comment><comment><USER42> I fucking hate goldman sachs.

Note because of politics. Not because of any financial action they've done.

Because they hired that despicable fuck Ulrich Drepper. Seriously, the amount of nice, young people who were forever turned away from GNU/open source with a bad taste in their mouths because of that scumbag dipshit.

I don't care if he was right % percentage of the time. The point of a project is to welcome users, and if you can't do that, why the fuck are you maintaining it?

I mean fuck, how many projects switched their libc implementation because of that fuck? Fuck. Fuck that guy.

The worst part? I didn't even get something rejected by him. I've just read enough of the communications with that guy to have his name seared into my brain next to the part that produces bile.

<comment><USER43> Who is he, and where can I read more about why he's a despicable fuck?

<comment><USER26> Ulrich Drepper is the maintainer of glibc. He is sometimes terse and unhappy on mailing lists.

<comment><USER44> Former maintainer of glibc. There was a vote in March which effectively removed him from power.</comment></comment></comment></comment>


Slack introduces threaded messaging - <AUTHOR> https://slackhq.com/threaded-messaging-comes-to-slack-417ffba054bd#.4uq59cisg <comment><USER2> If the only thing that ever comes of this is containing GIF reactions to the original message's thread this is the best, most productivity-boosting slack update ever.

</comment><comment><USER3> Very nice (and major) Slack update! The hardest part about this must have been the UX challenges to keep things simple while still adding the thread functionality and not compromising on the overall Slack appeal. Well done team.

Any Chatlio customers out there, we are interested in hearing how you might like this new functionality to used in Chatlio. (see sig for contact info)</comment>


Ask HN: Remote workers – What are the issues you are facing? - <AUTHOR> Would love to hear about issues/experiences related to work and also outside works such as logistics, travel, etc. <comment><USER2> Lack of people interaction, working remotely can be lonely. I used to think that working in an office was unnecessary but sometimes I miss the unproductive conversations I used to have with my co-workers.

<comment><USER3> Mostly this. I've been feeling the social isolation that comes with remote work pretty heavily lately. It doesn't help that I've recently moved to a new city and am finding that integrating into entirely new social circles is a slow process.

I do think that remote work is much more productive and I'm not exactly excited about the prospect of going back into an office, but if you don't have strong community / friends / family outside of work it can quickly become unhealthy.

</comment></comment><comment><USER4> None, really. I have been working remote for the past 5 years. By that I mean I live in Thailand but work remotely for company in northern Europe. The only issue in if hardware VPN dongles needs replacement. The tasks I do has only few dependencies to other people and that is a requirement to succeed in what I do. What makes it hard, at times, is if you need assistance from a colleague, because they are often sleeping when I am at work. If you all are in the same time zone that is a non issue. All in all. Working remotely is amazing. You will never have to get into the office, you can sit with your feet on the table, go shopping during business hours and no commute.

</comment><comment><USER5> _30% of respondents said a lack of community challenges their remote happiness most.

Newbies (those who've been remote for under a year) were more likely to be experiencing loneliness (33%). Those who'd worked remotely for over 7 years seemed to have overcome feeling left out, but were more likely to overwork themself (33%). Creatives were more likely to cite lack of career advancement opportunities as a challenge (25% vs. 22% of engineers and 20% of marketers)._

[https://www.and.co/anywhere-workers](https://www.and.co/anywhere-workers)

</comment><comment><USER6> Self-discipline. It's awfully hard to stay focused when there's no one to yell at you and the clients are very happy with your progress.

</comment><comment><USER7> Finding a position that will allow remote work. Problem is that I'm not a developer but an architect, over 40 and I work freelance. Apparently not a good combination for remote work according to many (possible) employers/clients.

</comment><comment><USER8> I switched to remote for a variety of reasons, but on the topic of issues, I find being one of only a few who work remotely that staying relevant and important is an insuperable challenge, especially when your boss is not remote. I find myself fading in to irrelevance. People who would swing by your desk once a week for your opinion now barely acknowledge you exist (i.e. months pass between IM messages, if at all). I find myself treated much more like a contractor compared to before. I think most of the company feel I abandoned them!

Time to move on I think. I'd give remote another go if I can find a company that has >50% remote workers.

<comment><USER6> Oh, I experienced this too. Once as the remote worker, once as the manager handling the remote workers.

IMO, it has to be a 100% commitment to remote work, where even the bosses are remote. First problem is communication - half of the team will rely on Slack, Jira, etc, while the other half rely on face to face. The tools that are used to handle remote work are abandoned by the team. The proper processes for handling remote work is never set in place.

The other big problem is that the non-remote workers get salty or distrustful. I find that they (consciously or not) try to sabotage remote workers. I find people can build even stronger relationships purely online than offline, but it has to be inclusive. They form cliques otherwise.

</comment></comment><comment><USER9> No issues I can think of, doing it for many years, because I am too lazy to drive 30 minutes to my office...

I see only benefits, can exercise during the day, take a nap after lunch, which makes me much more productive in the afternoon, at the end of the day, I just walk away from my office and I am home :-)</comment>


No company would ever hire Steve Jobs - <AUTHOR> http://www.techzone360.com/topics/techzone/articles/213519-tech-conundrum-no-company-would-ever-hire-steve.htm

<comment><USER3> The author is right that Jobs wouldn't get hired, but he also misses a larger point. No company, including Apple, would hire someone like Steve Jobs - <USER2> should they.

Steve Jobs, Bill Gates, Richard Branson--these aren't employees, they're founders. Founders take risks, look for big opportunities, work insane hours, and lead to places others might never go.

Employees, even executives, need to make the vision happen. You want people to be empowered to look for opportunities and take risks within the boundaries set for them, but if you have a company filled with Steve Jobses, they're going to either sink the ship going off in different directions, or leave and start their own companies.

Hiring a Steve Jobs as your CEO after he or she has already proven themselves is one thing - hiring a Steve Jobs at age 22 to work on your business is entirely another.

</comment><comment><USER4> Rubbish article. The main reason Jobs and Gates wouldn't get an interview at Microsoft or Google according to the author is because they didn't graduate college.

What the author doesn't mention is _why_ they didn't graduate college, and the reason is because they pursued the development of their own companies that would eventually make them billionaires. What a stupid line of reasoning to draw. If Gates or Jobs did not start Microsoft and Apple and instead concentrated on obtaining relevant degrees, you cannot conclude that they still would have failed in their careers.

I don't really see what point the author of this article is even trying to make.

<comment><USER5> Yes, Gates would have graduated and gotten a job anywhere. But Jobs quit college after 1 semester and then wandered around for a while. He would not have gotten a job outside of a hippie coffee shop.

<comment><USER6> Except Jobs did get a job at Atari. The article even mentions this, but hand waves it away as though it didn't count. He also had a job at HP in high school. That's where he met Woz.

</comment></comment></comment><comment><USER7> _Think about that for a moment…if you look at Steve's background and took it against engineering-centric hiring practices, the CEO of the decade couldn't get a job as a secretary let alone in management._

Conversely, the type of person described in the article that "no one would hire", would also be the last person in the world looking for an interview with a large tech corp, it's a two way street.

</comment><comment><USER8> > A running joke in the tech industry is that most of the CEOs wouldn't know > how to use most of the products they sell.

I would say that's the difference between a CEO who was a founder and a CEO that was brought on late in the game.

The founder-ceo's, like Gates and Jobs, are the ones that basically earned their spots by knowing their products well and being completely consumed by their company.

</comment><comment><USER9> The is a story that Mitch Kipor (Lotus founder) submitted resume's the of some the first employees/founders (including his own perhaps?) with some names changed to disguise them - and they didn't make it through HR.</comment>


Why Does Y Combinator Require a Video in Your Application? - <AUTHOR> Because every time I've applied, this has drastically slowed down my application. I mean, I'm just not great with a camera or microphone, and arguably don't have good stage presence in general.
As a result, I always struggle when it gets to this point:
> Please enter the url of a 1 minute unlisted (not private) YouTube video introducing the founders
Since well, I just don't think I can make a good video.
So why is needed? Why does YCombinator need a founder video in the application?
Because it seems like it's becoming a trend with startup accelerators and jobs now. Every single one seems to asks for a video of the applicant, their product or both.
And I suspect it's hurting people from poorer backgrounds (who simply can't afford the equipment for a good video presentation) or who are naturally not extroverts (and hence break down in front of a camera).
What's the reasoning here? <comment><USER2> The sad truth is if you don't have presence or aren't perceived as "likable" it's impossibly hard to get people to work with you.

The video is a way of testing for presence.

Personally, I've never care at all if people knew me or my name. Still don't. I didn't work on building a following for a blog, comment in places like HN, speak at conferences, or practice being on mic/in front of a camera. It's hobbled me.

I've watched people who with a "following" attract a good sized group of volunteers to build their projects for them while I've struggled to ship code by myself. In terms of effort we're talking about having to work 4-6 hours/day vs having to wokr 12-16 hours/day.

People don't scale but their "public personas" can.

If you have presence people will see you in a video or hear you on a podcast and come running to you. Crowdfunders, investors, partners, potential employees. Your life gets easier. Potential investors aren't your friends or a charity, they're trying to protect themselves from bad investments. If things are easier for you because you've practiced and can demonstrate presence, you're an easier sell to an investor.

I'm an introvert who grew up poor, so I get where you're coming from.

You options are:

1) Find people to handle messaging for you.. Which is dangerous because if you're unable to project an image of yourself or your company you may lose control over the way it and you are perceived.

2) Practice. You can do a lot with the camera/mic on an iPhone 5+ given the right lighting.

</comment><comment><USER3> First of all, don't use introversion as a crutch. It may be net-negative energy for you to perform in situations that extroverts find energizing, but this doesn't keep you from doing them. You just need to recharge afterwards.

I think the reasoning is that as a founder you are, like it or not, constantly having to sell your idea, company, and personal involvement. You have to sell to investors, to potential employees and of course to customers. You even have to sell to vendors, since you want to use their services as cheaply as possible.

If you can't do that, you need to find a co-founder who can. Otherwise you can go and do a startup by pure bootstrapping, but don't expect to get sympathy because you can't sell when investors need selling just like anyone else. I can't play basketball because I don't have the physical attributes necessary for the sport, oh well. Life doesn't owe me that opportunity and you're not owed an investment.

<comment><USER4> Some people who act or otherwise perform are basically introverted but do o.k. on stage or in front of the camera.

A one minute video is not very long. A good formula could be to have somebody interview you or have an informal (scripted or not) conversation with somebody about your company.

If you need a good camera at a low price, try

[https://www.amazon.com/Sony-PlayStation-Camera-Bulk- Packagin...](https://www.amazon.com/Sony-PlayStation-Camera-Bulk-Packaging- Pc/dp/B0072I2240)

The PS3 Eye plugs into a regular computer, you might need to pay another $5 for drivers. It has a built in microphone and overall the quality is close to an $80 Logitech camera.

</comment></comment><comment><USER5> To get more data.</comment>


Ask HN: Are there Coursera-like platforms for internal company courses? - <AUTHOR> We would like to provide "courses" on technical topics (such as internal tooling, modules and technologies used) during onboarding for our employees.<p>Has anybody heard of a platform, where you could build your own, private courses? Should have the possibility to include video, pictures, text, assignments, tests etc. <comment><USER2> Checkout other option:

1). EduPaas LMS - [https://codecanyons.net/item/udemy- clone](https://codecanyons.net/item/udemy-clone)

2). EduSaas LMS (For separate multiple domain based organisation LMS) - [https://codecanyons.net/item/teachable- clone](https://codecanyons.net/item/teachable-clone)

Detail alternatives here - [http://codecanyon.usercv.com/blog/10/how-much- would-it-cost-...](http://codecanyon.usercv.com/blog/10/how-much-would-it- cost-to-create-a-website-like-udemy-detail-comparison)

<comment><AUTHOR> Thank you for introducing me to the term "Learning Management System". Led me to a lot of further resources.

</comment></comment><comment><USER3> The closest thing that comes to mind would be something like Moodle[1] or Sakai[2].

[1]: [https://moodle.org/](https://moodle.org/)

[2]: [https://sakaiproject.org/](https://sakaiproject.org/)

<comment><AUTHOR> Thank you!</comment></comment>


Hackathon project: The "How About We" for fantasies [NSFW][Mobile Friendly] - <AUTHOR> http://unmasq.me

<comment><USER2> These 'fantasy' requests are equal parts hilarious and ridiculous. People are weird.</comment>


The Four Points Puzzle - <AUTHOR> http://www.solipsys.co.uk/new/TheFourPointsPuzzle.html?HN_rh08 <comment><USER2> I've found all the possible configurations by case-by-case analysis. I don't know whether my approach would be considered elegant by the author, but it wasn't exhausting (while being exhaustive).

My cases (or, rather, considerations) were:

1)Three points can form either an equilateral triangle, or an isosceles one;

2)The fourth point must lie on the perpendicular bisector of one of the edges of that triangle;

3)The fourth point may on one of the two sides of that edge.

Given the constraints, that doesn't leave too many cases to consider.

But I, too, wonder what other approaches to the problem there are.

<comment><USER3> Haven't looked for solutions but 3 points can also form a line. Maybe there is a configuration where 3 or even 4 points are colinear?

<comment><USER2> Three collinear points is just a degenerate obtuse triangle, so this falls under one of the cases above.</comment></comment></comment>


Amsterdam and drugs - <AUTHOR> http://mashable.com/2014/11/27/amsterdam-tourist-deaths/

<comment> digital-rubber yes if tourists could please do that in their own country, that would be great! thanks.</comment>


Obama will get an NSA enhanced blackberry - <AUTHOR> http://marcambinder.theatlantic.com/archives/2009/01/obama_will_get_his_blackberry.php

<comment><USER2> _On Monday, a government agency that the Obama administration -- but that is probably the National Security Agency -- added to a standard blackberry a super-encryption package.... and Obama WILL be able to use it ... still for routine and personal messages._

Whoa. Someone needs coffee before writing their blog posts. Does not parse.

<comment><USER3> You should apt-get install probabilistic-parser. (do probabilistic parsers exist by the way?)

<comment><USER4> Yes, actually. Perl uses one to handle cases of ambiguous syntax, where it's possible to "guess" the correct parse quite reliably from the surrounding context, but it's impossible to infer the true meaning simply by looking at the line by itself. (Thankfully, this technique is rare if you're writing clean code, and as far as I know, it's gone from Perl 6.)

</comment></comment></comment><comment><USER5> "Obama and other officials won't be able to use Instant Messaging in the White House."

Here are some considerations to pull inter-government communication out of the last century:

<https://www.yammer.com/>

<http://www.adiumx.com/>

<http://www.jabber.org/web/Main_Page>

as for the super secret nsa approved barakberry - me wants one, precious!

<comment><USER6> They're considered munitions by government employees, because of the encryption keys they're loaded with. Government employees have to 'check them in' and out like their service weapon, and aside from the encryption, don't really do anything special.

Oh, and they sell for something like $10,000.

<comment><USER7> Do you have a source for this? I'm genuinely curious, since I thought the "crypto == munitions" policies all died off years ago.

As far as maintaining proper records of who has which device, I say "bravo!" Just like stolen and lost laptops fueled much of the last 5-6 years' ID theft fears, I think mis-appropriated mobile devices will cause a whole lot of people a whole lot of stress as more and more critical information finds its way into pockets and purses.

<comment><USER8> let me help you with that, I think he was missing one of these: </sarcasm>

BTW, as I recall, most of Uncle Sam's krypto is 40-bit symmetric based on algorithms that predate Diffie-Hellman. They still have couriers carry the keys on specially made (aka, archaic) tape drives from point to point under two-man integrity and hand-cuff the briefcase to the courier. So Dr Strangelove. Skype is be better than that. A lot better. Here's a starting point if you want to find out about mil crypto. Check out the KY series, especially KY-58, 68, and 90, as I recall. A more complete listing here <http://hereford.ampr.org/millist/m25.html>

</comment></comment></comment></comment><comment><USER9> Yeah, it was coming. I hope the Obama administration changes NSA from being the cradle of evil to something useful.

<http://news.ycombinator.com/item?id=365948> (one of many)

Spy Master [http://www.newyorker.com/reporting/2008/01/21/080121fa_fact_...](http://www.newyorker.com/reporting/2008/01/21/080121fa_fact_wright?currentPage=all) A worthwhile long read.

<comment><USER10> I think you've got the NSA confused with the TSA or CIA.

<comment><USER9> <http://en.wikipedia.org/wiki/John_Michael_McConnell>

      From 1992 to 1996, McConnell served as Director of the National Security Agency (NSA). He
      led NSA as it adapted to the multi-polar threats brought about by the end of the Cold War.

</comment></comment></comment><comment><USER11> I'm surprised I haven't seen blackberry capitalizing on such a prominent spokesman in their advertising.

</comment><comment><USER12> Is Blackberry being genericized to mean a smart-phone? The General Dynamics device doesn't look like a modified RIM product.

<comment><USER13> Only if RIM is unsuccessful at preventing trademark dilution (like Kleenex and Walkman). If you're interested in reading on trademark dilution, I found that Wikipedia has a link to this source at Boston University School of Law: [http://www.bu.edu/law/central/jd/organizations/journals/scit...](http://www.bu.edu/law/central/jd/organizations/journals/scitech/volume122/documents/Simon_WEB_000.pdf)

</comment></comment><comment><USER14> I can't tell if the source is credible. It doesn't help that the article fails to spell "BlackBerry" correctly even once.

</comment><comment><USER15> But... will it blend?

<comment><USER5> yes.</comment></comment>


President Y combinator at the Bilderberg meeting - <AUTHOR> https://secure.gn.apc.org/members/www.bilderberg.org/phpBB2/viewtopic.php?t=7487 <comment><USER2> Thiel, Peter A. (USA), President, Thiel Capital

</comment><comment><USER3> Sam will give us the straight dope on all of InfoWars (lol) favorite conspiracy theories. ;)

</comment><comment><USER4> I see Demis from DeepMind is there too.</comment>


Segmented sleep - <AUTHOR> https://en.wikipedia.org/wiki/Segmented_sleep <comment><USER2> A couple of friends of mine got into polyphasic sleep a while back. They were huge fans of it, and basically said they felt more energized and well-rested as a result. I don't think they ever tried to radically reduce the total number of hours they slept like some polyphasic sleep proponents have [0]. Instead they just split eight to nine hours into two or three chunks throughout the day and night.

My friend is an artist and her then boyfriend now husband was working as a freelance developer so their schedules were pretty flexible. They had to give up polyphasic sleep when their work required them to keep more standard 9 to 5 schedules.

[0] For example, back in the 1940s Buckminster Fuller tried to only sleep 2 hours each day by taking several short naps throughout the day. [http://content.time.com/time/magazine/article/0,9171,774680,...](http://content.time.com/time/magazine/article/0,9171,774680,00.html) Also, the Wikipedia article on polyphasic sleep (which it has been suggested the linked article be merged into) is worth looking at if you're interested in this stuff: [https://en.wikipedia.org/wiki/Polyphasic_sleep](https://en.wikipedia.org/wiki/Polyphasic_sleep)</comment>


Is Google Glass Dying? - <AUTHOR> http://gizmodo.com/is-google-glass-dead-1659023012

<comment><AUTHOR> With apologies to Ian Betteridge for the headline, which is taken from the original article.</comment>