A Parable by Dijkstra (1973) - <AUTHOR> https://www.cs.utexas.edu/users/EWD/transcriptions/EWD05xx/EWD594.html <comment><USER2> When the shunting person persuaded everyone to imagine the two-car units as if they were symmetrical, the passengers still complained. Toilets can break, and when they did the doubly unlucky passenger would be forced to walk _four car lengths_ to get to the nearest toilet.

Also, those helpful arrows would be guiding the passenger the wrong direction for two of those car lengths.

So we have comments that go out of sync with the running program, a spec that lies about reality, and an implementation that doesn't match the spec. Yep, that sounds like programmers to me.

Legit parable.

Edit: just realized the least lucky passenger would have to walk _six_ car lengths. If the passenger is already at the wrong end of the "symmetrical" two-car unit with a broken toilet, the arrow will point them in the direction of the broken toilet. If the broken toilet is the last car, then they must walk back two car lengths to get where they started. Now if the next two-car unit is turned the wrong direction they must walk two more car lengths.

So add to this a spec that's difficult to reason about.

Again, legit programmer parable.

<comment><USER3> > the least lucky passenger would have to walk six car lengths

I just want to elaborate on this to show which assumptions you are making. There are two ways to make a paired unit: \--+ and -+-.

In your scenario I think you assume the first. The end of the train is thus ...+----+, since you mention the second last car's orientation being reversed. The +'s represent toilets. Then, what you are saying is to consider a passenger located at the ^ symbol: ...+--^--+. In this configuration, your observation makes sense.

I do think that a more practical solution is to work only with (-+,-) pairs. The symmetry that Dijkstra talks of is then that (-+,-) and (-,+-) are equivalent for the purposes of the problem. Then an end of a train would be: ...-+-+-. This is then the "extra few feet" that he talks of.

<comment><USER4> Indeed. Dijkstra specifies two cars joined with the toilet in the middle:

" _When each car with a toilet was coupled, from now until eternity, at its toileted end with a car without a toilet, from then onwards the shunting yard, instead of dealing with N directed cars of two types, could deal with N /2 identical units that, to all intents and purposes, could be regarded as symmetrical._"

<comment><USER2> I think what bothers me about this is that it's an analogy which crosses the digital divide.

On the physical "train" side of the analogy, we've got a believable scheme to save money by only having a toilet in every other car. Given the constraints, it is indeed clever to make these two-car atomic units and reimagine them as symmetrical. All the fixes in the story taken together could pale in comparison to the cost of putting a toilets all the cars.

But when we cross the digital divide we get a completely different set of constraints. Even if dealing with 100 million train cars it may be cheaper to just fork the entire train yard and add a toilet object to each car.

</comment></comment></comment></comment><comment><USER5> For those who want to see Dijkstra's mathematics of programs in action:

1) basic (great for kids, math novices, whatever): [https://www.amazon.com/gp/product/0470684534/ref=dbs_a_def_r...](https://www.amazon.com/gp/product/0470684534/ref=dbs_a_def_rwt_bibl_vppi_i0) (ignore the two star review, this book would get 5 stars from me)

2) advanced (free, complete with videos): [http://www.cs.toronto.edu/~hehner/aPToP/](http://www.cs.toronto.edu/~hehner/aPToP/)

3) advanced: [https://www.amazon.com/gp/product/0470848820/ref=dbs_a_def_r...](https://www.amazon.com/gp/product/0470848820/ref=dbs_a_def_rwt_bibl_vppi_i1)

4) advanced, theoretical, from the man himself: [https://www.springer.com/gp/book/9781461279242](https://www.springer.com/gp/book/9781461279242)

<comment><USER4> Also, slightly less advanced:

 _A Discipline of Programming_

[https://www.amazon.com/Discipline-Programming-Edsger-W- Dijks...](https://www.amazon.com/Discipline-Programming-Edsger-W- Dijkstra/dp/013215871X)

For more practical fun, consider Frama-C, SPARK, and Dafny.

</comment></comment><comment><USER6> Moral: The engineer who conceived of the innovation was forgotten and not compensated for it, and the train owners made the bulk of the money.

Sounds like software engineering to me!

<comment><USER7> I feel like the actual moral of the story should be "don't underestimate how trying to scrimp on a vital resource can result in horrible logistical complexities and a nightmare UX".

<comment><USER8> All true, but I would add that "in order to get back to the previous system that actually worked, you may have to provide a fig leaf for management, so that they can pretend no such thing is happening." We are back to one toilet per car, but we have to use cars of twice the size (with superfluous coupling in the middle that is never uncoupled) in order to pretend that we did not go back to the original system.

</comment></comment></comment><comment><USER9> The final paragraph is my favorite. I have a PhD in mathematics but I've since realized I'm not a mathematician, I'm more of a logician/philosopher. I find the parable very interesting, but I can totally believe a lot of real mathematicians don't. Too many mathematicians, if you crack open a random page of their work, you'll see lots of opaque integrals and calculations. None of that ever appealed to me. Even when I was the top of the class among undergraduate mathematics majors, I was basically doing the bare minimum I could get away with of that kind of "grind", and focusing all my time and passion on things more closely resembling this kind of "parable".

<comment><USER10> I don't think he was saying mathematicians don't find it interesting because it lacks sufficiently convoluted mathematics.

Rather a 'true mathematician' (who by definition ignores all practical considerations) would find it unsatisfactory because the problem of finding a way of allowing toilet-less carriages is solved by not allowing toilet-less carriages.

Frankly I think they should have just put the toilet in the middle of the toilet-carrying carriages, but maybe I'm weird.

</comment></comment><comment><USER11> So in the end the permanently coupled tuple of cars is handled as a single car, it kind of proves that every car must have a toilet? Or perhaps the next manager reiterates the rationale and decides to put just one toilet every two car tuples...

<comment><USER4> But twice as long and articulated.

<comment><USER11> Yes, the articulation is the only difference from a span-bolstered car with 8/12 axles.

</comment></comment></comment><comment><USER12> The director got fired for causing actual losses and the shunting yard workers got huge bonuses and promotions for saving the company, right? Right?!

<comment><USER13> Almost. The director got the bonus and the yard workers got more work.

</comment></comment><comment><USER14> For me, one moral of the story is when approaching any issue in a live system, it often pays to go back to modeling the actual problem instead of iterating on broken assumptions. Good solutions should have documentation which explains their take on the problem and the reason the solution in particular was chosen versus other potential designs.

Of course, outsourcing, interdepartmental or interpersonal politics can create commercial misincentives to remove such time and money saving features...

</comment><comment><USER15> The greater point I took away was that sometimes someone who's not involved in solving a problem can see a solution while those who are do not.

In that respect programming is often as much an art as it is a practice.

</comment><comment><USER16> I thought the moral was going to be that accommodating toiletless cars cost more than simply building all cars with toilets.

<comment><USER17> I feel like that's still the point irrespective of Dijkstra's apparent view on the parable. Creating exceptional cases is the best way to increase costs.

</comment></comment><comment><USER18> Is Haskell still a preferred introductory language to enter the Functional Paradigm with? Or do you think other alternatives do a better job at that than Haskell ? I'm learning Scheme with the SICP Book ATM, and am confused where to go next to get better at Functional thinking(and programming).

<comment><USER6> Haskell. If programming languages were mountains, Haskell is Everest. Conquer it and other languages can be mastered in your sleep.

Go further.

<comment><USER19> I never did alpinism, I guess Everest would be a good place to start with...

<comment><USER20> it's not even in the Alps!

<comment><USER21> [https://en.wikipedia.org/wiki/Mountaineering](https://en.wikipedia.org/wiki/Mountaineering)

"Mountaineering is often called Alpinism, especially in European languages"

<comment><USER4> "Alpinism" sounds like a disease.

</comment></comment></comment></comment></comment></comment><comment><USER22> Note that the arrow solution failed because to the shunting yard the cars were immutable objects. They could only control the direction of the arrows in the non-toilet cars by how they oriented the whole car when they composed it into the train they were building.

If the non-toilet cars were made mutable, specifically if they were made so the arrows could be reversed, then the shunting yard could compose the cars without regard for the orientation of the non-toilet cars, and someone later could go through and set the arrow directions. I'd guess there is some sort of preload inspection done by the crew, which might be a good place to handle setting the arrows.

</comment><comment><USER23> > I have told the above story to different audiences. Programmers, as a rule, > are delighted by it, and managers, invariably, get more and more annoyed as > the story progresses; true mathematicians, however, fail to see the point.

I see the point. In fact I'd go so far as to call myself "delighted". But I thought I was a _true mathematician_.

'Scuse me while I go have a little existential crisis.

</comment><comment><USER24> I'll bite. What's the morale that he's implying?

That algorithms can be simplified by slightly lifting the constraints?

<comment><USER25> That some problems can be solved more easily with a different data structure.

I think it was Robert Tarjan that wrote a book on that topic, but I can't find it.

</comment></comment><comment><USER26> I guess the ultimate solution assumes that all the turntables are long enough to deal with at least two-car consists? Seems strange that the company would cheap out on a little bit of porcelain in each car and then overprovision its turntables in such an extravagant way.

<comment><USER27> With the toilet at the end of the carriage that is connected to its corresponding non-toilet carriage, and consequently approximately in the middle (the offset is the "last three feet" that Dijkstra mentions), there is no longer a need to reverse any two-carriage set.

<comment><USER28> Turntables are not just for reversing. A turntable also moves cars (and engines) between multiple tracks and storage facilities. Two-car sets need to be moved even if not reversed.

<comment><USER27> You can do that with tracks and switches - in fact, you can also reverse rolling stock with a 'Wye'. I believe turntables were mostly used to reverse steam locomotive - tender sets, and to build engine sheds in constricted urban areas where there wasn't a lot of room for a switch network.

</comment></comment></comment></comment><comment><USER29> TGV trains in France have a very strict structure. For the TGV atlantique lines, for example, "short" trains contain exactly 10 cars (and "long" trains are composed of two "short" trains), with the following distribution:

\- Car 1 and 10 are engines, and include some second class seats. \- Cars 2 and 3 are first class. \- Car 4 is the bar-restaurant. \- Car 5 is first class. \- Cars 6, 7, 8 and 9 are second class.

All the infrastructure is designed to treat the train as a single unit, during all operations at the shunting yard, in repair workshops, and son on.

And the position of toilets (including special toilets for nappy changes) is fixed.

</comment><comment><USER30> This seems like it has potential for being the core of an interesting interview question. Maybe something along the lines of "You are hired as the Chief Shunter (lol) of a new rail company and the CEO, to cut costs, has stated that only half of all cars will have toilets. What instructions will you give the shunters? What complications could arise? What is the optimal solution and how would it impact UX?" etc. etc.

<comment><USER13> Often people is nervious at job interviews. It might not be the best place for this sort of creative problems.

</comment></comment><comment><USER31> This solution is wrong.

Rolling stock needs maintenance, and if you keep units permanently paired you can easily run out of units.

In fact there is no easy solution given realistic business constraints. You can either put toilets in every car, which has a cost because it reduces available seating. In the best case you'll lose money because of the lost seats. In the worst case overcrowding will make the toilets ineffective.

Or you can buy enough spare units to allow for maintenance, which has a larger up front cost, and continuing costs in terms of stabling, and possible issues with shunting yard size.

Working out the most efficient answer given real trains, real passenger loads, likely future passenger loads, and shunting yard constraints, is not a trivial problem.

Unlike Dijkstra, some of the managers in his audiences will have understood this. It's no wonder they found his glib hand-waving annoying.

The actual lesson of the parable is the opposite of the one Dijkstra is making: the real world is hard, and if you think a solution fits neatly into a trivial software construct, _you're almost certainly wrong._

<comment><USER32> It's a parable which means it is fiction that that ignores details to make a point. As such it does it's job quite well unless you yet to read more into it than the author intended.

<comment><USER33> To me this says that parables are fairly useless: with enough padding any trivial insight may seem wise. I can't at the moment imagine something that I would think important to communicate which would be made more clear by a parable. I would also be concerned about being patronizing. I'm sure this makes good fodder for academic quibbling, but I am beginning to doubt whether Dijkstra was more insightful than arrogant.

</comment></comment></comment><comment><USER34> I don't quite understand why 'true mathematicians' fail to get the point. Any ideas?

<comment><USER35> Because you get to the solution and you say, "But that's just the same thing..."

<comment><USER36> It's like the joke with boiling the pot of water and just dumping out the water; reducing it to the previous problem with a known solution ... or something like that...

</comment></comment></comment><comment><USER37> The math is simple. This did not require a mathematician, just an cost benefit analysis.

($ * toilet each car) < shunting{($ * action * yard) + ($ * training * employee)} + ($ * accident cleanup) + ($ * customer bad will)

<comment><USER38> Read until the end again. The solution they came up with still only put toilets in 50% of the cars.

<comment><USER37> And from a system perspective, I would wager that the cost is still higher given the complexity of their final solution.

</comment></comment></comment><comment><USER39> KISS - Keep It Simple Stupid and put a toilet in each car of the train.

<comment><USER4> Because it is cheaper than the cost of figuring out how to do it the other way?

</comment></comment><comment><USER40> I don't get it. (And I don't think it's because I'm a "true mathematician".)

</comment><comment><USER41> > _With growing size or sophistication of the program, the operational > argument quickly becomes impossible to carry through, and the general > adherence to operational reasoning has to be considered one of the main > causes of the persistence of the software crisis._

What "software crisis"? Since its inception in the 50s or so, software has only gone from strength to strength.

<comment><USER42> [https://en.wikipedia.org/wiki/Software_crisis](https://en.wikipedia.org/wiki/Software_crisis)

<comment><USER4> Projects running over-budget

Projects running over-time

Software was very inefficient

Software was of low quality

Software often did not meet requirements

Projects were unmanageable and code difficult to maintain

Software was never delivered

Yeah, that one.

<comment><USER41> A "crisis" would imply that:

1) we don't get increasingly bigger and more powerful systems

2) we're behind some previously existing "no crisis" state

Both (1) and (2) are factually wrong.

Projects running over-budge, over-time, often not meet requirements etc, are not a crisis in the actual meaning of the world.

It's just a normal state of affairs.

And despite that we have got from the laughingly primitive software in the 50s and 60s, to the software "eating the world" today, and have systems with 10 to 100 or 1000 more lines of code, and way more functionality -- even in our pockets.

If only "crisis" looked that way in other domains too.

It's not a crisis, it's just unrealistic expectations.

Even if we could do 100x better in the _future_, it wouldn't justify the term crisis for the state we're in, and have been for decades.

<comment><USER42> > Both (1) and (2) are factually wrong.

 _You_ are factually wrong because you know only the status quo that _emerged_ from that crisis.

> Projects running over-budge, over-time, often not meet requirements etc, are > not a crisis in the actual meaning of the world.

> It's just a normal state of affairs.

To _you_ it is.

To the people in the 1960s, it wasn't.

Because they had previously experienced a state where the hardware imposed such drastical limits on the possible size and complexity of software that each programmer working on a project could intimately know and understand every piece of code in it and the requirements that influenced it.

The change from that to one where programmers understand only part of a project is absolutely fundamental and completely changes the way you have to work to achieve your goals. Now your project _will_ fail if you cannot manage and divide-and-conquer its complexity in some way.

</comment></comment></comment></comment></comment><comment><USER43> Since we're talking about Dijkstra, thought I'd bring up the letter he wrote to the University of Texas when they replaced Haskell with Java in their introductory programming course:

[https://chrisdone.com/posts/dijkstra-haskell- java](https://chrisdone.com/posts/dijkstra-haskell-java)

[https://www.cs.utexas.edu/users/EWD/OtherDocs/To%20the%20Bud...](https://www.cs.utexas.edu/users/EWD/OtherDocs/To%20the%20Budget%20Council%20concerning%20Haskell.pdf)

<comment><USER44> Great letter (2001). It predictably focuses on language quality and side-steps practicality-- the assumption being practicality isn't as important as learning a high-quality language in an introductory course.

<comment><USER45> Depends on what you think you're teaching. Are you teaching computer science, or are you teaching software engineering?

Hint: Of your graduates, probably 95% will work as software engineers, and only 5% will be computer scientists. But CS departments think they're _computer science_ departments, even though they mostly are located in the college of engineering. (I accidentally typed "enginerring", which I thought was amusing...)

<comment><USER46> > _Depends on what you think you 're teaching. Are you teaching computer > science, or are you teaching software engineering?_

> _But CS departments think they 're computer science departments, even though > they mostly are located in the college of engineering._

I used to think this is true in the form you presented, but now I feel it's really a more relaxed form that's true - CS departments in universities think they're still in universities, not in glorified vocational schools. They try to teach you more than the immediate needs of your likely job, so that you understand the context of what you're working with, and are exposed to more powerful ways of thinking.

(I mean, 99% of the time, your typical JavaScript-slinger doesn't need to know what an "algorithm" is and what can be solved with one. These days, a popular language, StackOverflow and open-source libraries are enough to do acceptable levels of work. However, some extra theoretical knowledge will help tackle more complicated problems, solve them better, and will enable one to do something more challenging if they want to leave the web/CRUDsphere.)

Related: we now have "vocational schools" for programming too. They're called "bootcamps", for some reason.

Tangential: there's a feedback loop between workers, universities and employees in every industry. Progress of the "industry standard" must come from somewhere. If all the new people are being exposed to is Java(Script), the industry will forever keep being stuck on Java(Script). So I feel it's good that at least some people in some universities try to teach above the level required by the industry.

<comment><USER47> > Related: we now have "vocational schools" for programming too. They're > called "bootcamps", for some reason.

Bootcamps are a joke. Germany has had proper vocational schools for programmers for decades. After high school, you can spend three years to become a Fachinformatiker (it's difficult to translate, but basically means "applied computer specialist"). There are two subflavors, Anwendungsentwicklung (application developer) and Systemintegration (systems integrator, this curriculum combines sysadmin and development tasks).

All that is entirely separate from CS courses at university, which is an alternate path that one can take (and one that has a higher entry barrier since you need to have at least 8 years in secondary education, i.e. until 12th or 13th grade). In the vocational training, you alternate between weeks at school and weeks at your employer where you work on actual projects under supervision of a qualified mentor.

<comment><USER48> In Finland we have three tiers of formal programming education. There's vocational secondary school awarding "technician" level degrees, an alternative to more academic _Gymnasium_ type secondary education (grades 10 to 12). The learning is very hands-on and practicality oriented.

Then there's "vocational" or "applied science" colleges you can enrol in after either vocational or academic secondary school. They offer four-year bachelor- level degree programs in various fields from healthcare to engineering. The education attempts to mix theory and practice (with varying success).

Finally there's the "real" universities, offering primarily five-to-seven-year BSc+MSc programs (before the Bologna Process you used to go straight to master's; these days the steps are somewhat more discrete), and of course PhD programs for those wishing to pursue an even higher level of education.

<comment><USER47> Ah yes, we have "applied science" colleges as well. What you describe sounds pretty much identical to the German system.</comment></comment></comment></comment></comment></comment></comment>


Better Python Scraping - Installing lxml and Beautiful Soup - <AUTHOR> http://wesleyzhao.com/python-web-page-scraping-installing-libxml

<comment><USER2> Ive scraped dozens of sites beautiful.soup is great, but if you want the job done as quickly and cleanly as possible, PyQuery is thr best.

Its the same as jquery, but in Python.

Working with beatiful soup quickly becomes.long.and messy and tedious

With pyquery, you get what you want with just a couple of CSS 3 selectors simplw and nice

wow android 2.2 is terrible for inputting text

<comment><AUTHOR> Hm interesting thought. Any good tutorials/sites I can use to get going on this? Or is it so simple I won't even need that. I find myself scraping a lot, so finding the best lib for that is a priority.

<comment><USER3> Just tried this out last week. The docs are pretty sparse, but it seems to mirror the jQuery interface fairly closely so if you're familiar with one, you'll have a fair idea of the other: <http://packages.python.org/pyquery/api.html>

That's the key advantage as I see it. If I'm scraping something it's often in a hurry and I just want it done. Not having to internalise a new API is a significant win in that respect.

</comment></comment></comment><comment><USER4> I'm learning python on the fly, but I tend to ask a lot of question on freenode's #python. Installing lxml wasn't so bad. I just did "pip install lxml" (easy_install lxml should work too) on my Debian VPS and home server. Seemed to work for me.

I am sticking with lxml only for my scraping and html5lib to do my richtext parsing.

<comment><AUTHOR> Glad to hear it was so easy for you! For some reason, before I found a great tutorial, I kept running into errors on my installations. First it was because I didn't even have setuptools installed, then I didn't have some other dev dependencies, then I just got plain stuck. But after I got it up and running it was smooth sailing RE scraping!

<comment><USER5> Installing development headers is an essential sysadmin skill. Any failed python extension install should make it clear which headers are missing, and you will want to search for the matching package, usually suffixed with "-devel" (at least on Debian and RedHat systems). So if you see an issue with libjpeg, you will look for libjpeg-devel, zlib -> zlib-devel, etc.

</comment></comment></comment><comment><USER6> I much prefer Scrapy (<http://scrapy.org/>). BeautifulSoup is pretty outdated.

<comment><USER7> XPath/CSS path selectors for scraping are definitely the "now" way to do it. I recommend Nokogiri (<http://nokogiri.org/>) for the Ruby users, it does pretty much the same thing in a nutshell.

What it really comes down it is 2x-3x smaller code, plus much faster to write it since you can just test your CSS selector in your web browser such as with FireBug before sticking it into your code.

<comment><AUTHOR> If I'm not mistaken LXML uses XPath and CSS path selectors right?

</comment></comment></comment><comment><USER8> Why not "sudo apt-get install python-lxml python-beautifulsoup"? Difficult to make the "olde" argument when you're installing dependencies from apt.

<comment><AUTHOR> Does that work? If I remember correctly I may have tried that and it was one of the things that failed. Something would not compile I believe. I am still a noob so if that works and I just messed it up I wouldn't be surprised. Do you know by experience that is all you need?

<comment><USER5> ... of course it will work. And there's no compilation step involved, either, as I've never encountered a Debian package that was not a binary distribution (but maybe there are some, requiring build-essential? This package surely does not depend on build-essential).

<comment><AUTHOR> I'll run this on a clean Ubuntu instance and if this works I'll update my post! Thanks!!

</comment></comment></comment></comment><comment><USER9> Is mechanize (<http://wwwsearch.sourceforge.net/mechanize/>) considered outdated or convoluted? It's what I've used for my scrapings.

Also, how well do these other scrapers handle Javascript? I've had to abandon some scrapes from ASP pages because they wouldn't properly handle it.

<comment><USER10> it's a different tool. Mechanize concentrates on navigating pages and downloading pages, following links, handling cookies etc. BeautifulSoup and lxml parse information out of the html.

There's some overlap, but not much. I have tended to use BeautifulSoup and mechanize together. As mentioned above, BeautifulSoup is no longer being actively maintained, and I'd recommend starting with lxml in most cases. I'm still using BeautifulSoup mainly because I have most of the package memorized.

<comment><USER9> Thanks, I use the same combination, but haven't needed to make any new parses in a while. I'll read up on lxml for the next time.

</comment></comment></comment><comment><USER11> Maybe I missed it: why aren't you using pip? As I recall, the set up is as simple as: sudo pip install lxml or sudo pip install BeautifulSoup. If you're learning Python, definitely learn pip. Pip will make your life easier! :)

</comment><comment><USER12> Just to throw in my own "I like X" better. I recently had some pages that Beautiful Soup just choked on and couldn't parse.

I like html5lib, which will even spit out a Beautiful Soup parse tree if that's your thing.

</comment><comment><USER13> Does this page kill the chrome tab for anyone else?</comment>


Debugging Your Operating System: A Lesson in Memory Allocation - <AUTHOR> https://lukasa.co.uk/2016/12/Debugging_Your_Operating_System/? <comment><USER2> This was a great read, thanks for posting.

It also ties in with the other recent post shown here:

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


The Most Common Error in Media Coverage of the Google Memo - <AUTHOR> https://www.theatlantic.com/politics/archive/2017/08/the-most-common-error-in-coverage-of-the-google-memo/536181/?utm_source=feed&single_page=true <comment><USER2> Active discussion: [https://news.ycombinator.com/item?id=14959601](https://news.ycombinator.com/item?id=14959601)

</comment><comment><USER3> I wouldn't really characterize the headline as an error in the inadvertent sense. The "error", propagated across so many leading news portals appears deliberate, wilful, and tailored to suit a narrative.

<comment><USER4> Is there any narrative beyond click-bait headlines to get page views?</comment></comment>


I started a mobile ui resource blog, hope you like - <AUTHOR> http://mobilegui.net

<comment><USER2> very cool, very relevant and very useful.

Web apps - they're not just for computers anymore.</comment>


Apple & Dow 15000: Update - <AUTHOR> http://blog.adamnash.com/2012/09/17/apple-dow-15000-update/ <comment><USER2> ...and this is why the Dow is a ridiculous barometer for the stock market. With only 30 stocks - none of which are part of the original index, and very few of which are actually "industrials" - it's severely dependent upon _which_ stocks are included. If you want to draw conclusions about the market, you're better off looking at the Wilshire 5000 or at least the S&P 500.</comment>


WWDC 2019 Keynote Livestream - <AUTHOR> https://www.apple.com/apple-events/livestream/?xyz <comment><USER2> Nice to see a new Mac Pro, but no one has mentioned price. The "entry level" Mac Pro from 2006 was $2199 and $2999 in 2013 (the last update). Even the top- of-the-line "trashcan" Mac Pro was ~$6500 with 12 cores.

I don't doubt the hardware is top-notch again, but an 8-core machine (I get it's Xeon), with a 256GB SSD and 32GB of RAM with a nice graphics card for $6000 is ludicrous. Is the new case and a "revive" worth the 100% price increase for a base model? Or has Apple come to revelation that pro's will pay any price?

Sidenote - 6k monitor is beautiful but $5000? The live stream I'm following jokingly mentioned the stand is $1000 extra (is that true?). Have we truly moved into $1/ pixel territory?

<comment><USER3> _The live stream I 'm following jokingly mentioned the stand is $1000 extra (is that true?)._

Yup, it was on the screen and the presenter spoke the number without even cracking a smile. Must have practiced in the bathroom mirror for _hours_ to pull that off.

<comment><USER4> Somehow I doubt they'll be selling $1000 monitor stands in a few years.

I can't quite believe they were saying someone would turn one of the monitors 90 degrees to write code. Why anyone would spend $6k on a monitor to write code is beyond me.

<comment><USER5> I believe that girl never wrote a line of code. Why would you use a vertical monitor to write code???

<comment><USER6> More lines viewable at a time. Most places have line length limits and they're well below full screen width. There are people I've worked with who enjoy reading and writing code on a vertical orientation.

<comment><USER5> That's something new to me. I though people want more horizontal tabs/columns. Scanning a very "tall" display(like this 32" one) doesn't seem very comfortable to me.

<comment><USER7> The ability to understand code at a macro level improves the more code you are able to see at once, because scanning with your eyes is more efficient than scrolling can ever be. So using a portrait orientation for your monitor does make sense.

</comment></comment></comment></comment></comment></comment></comment><comment><USER3> So they brought back the cheese grater Mac Pro. Now, was that so hard? Let the shutting up and money-taking begin...

However, watching them demo the new one is just a painful reminder of what an over-priced bad idea the trashcan was, and we had to put up with that shit, and the apologetics to go with it, for six years. Demo's not done, but I'm hoping I don't have to listen to Ive's smooth British accent telling me it's the best, we really mean it this time. Get the person that slayed the management dragon to get this thing built and let _them_ do the voice-over.

<comment><USER8> Do we know if the expansion slots will take 3rd party products? Or, is it all proprietary?

<comment><USER9> Looks like fairly arbitrary PCI-E, but I'm going to throw out there that kexts need to be Apple notorized now so the driver situation might be rough.

</comment></comment></comment><comment><USER10> Feeling a bit "everything old is new again". So they're finally making a "real" power desktop again, and the big thing about iPadOS is a multi-window feature that we've basically had since Windows '95... even the macpro design looks like a direct riff on their own 20-year-old "cheesegrater".

I mean, I'm obviously happy (although i'll likely never be able to afford a macpro). But all the rivers of (digital) ink spent on the "paradigm shift" of iOS-like forms and conventions now look pretty silly.

</comment><comment><USER11> Sign in the Apple is a great idea for users. I can see developers not wanting to adopt it due to loss of customer data. I'm curious to see how adoption plays out.

</comment><comment><USER12> I think its a big deal that they're able to capitalize on the user data abuses of Google and Facebook by making a single sign in service simply because "we wont give everyone your entire contact list when you click this button."

</comment><comment><USER13> Link for viewing in VLC etc:

[https://p-events- delivery.akamaized.net/3004qzusahnbjppuwydg...](https://p-events- delivery.akamaized.net/3004qzusahnbjppuwydgjzsdyzsippar/m3u8/atv_mvp.m3u8)

<comment><USER14> This one wasn't limited to certain browsers/platforms like they have been in the past. You could just go to apple.com and it was there for everyone.

</comment></comment><comment><USER15> Much useful stuff, but why oh why can't I tag photos? Or have a sane folder management in Photos?[0] Or edit MP3 metadata in Music?

There's lots of low-hanging fruit on iOS. But they've been left hanging for years now.

[0] Despite that I've taken the plunge into managing all my photos on iPad's Photo app. But it's painful.

<comment><USER16> One thing I'm missing is a decent way to monitor your data plan[0]. Even my previous Windows Mobile 10 (formerly Windows Phone) had this.

[0] Yes, there is something, but it doesn't reset automatically. It doesn't limit. It doesn't notify. It is not more useful than the packet count of the TCP/IP properties in Windows.

<comment><USER12> This is a good example of how the consumer pays for so-called "competition" between service providers. The practical effect is that they collude to fix prices and never work with downstream/upstream companies to provide obvious features like the one you're asking for.

<comment><USER17> > The practical effect is that they collude to fix prices

Any proof of collusion? Is Apple really working with AT&T to make you use more data? There's absolutely zero evidence of that.

<comment><USER12> Whoops sorry, i said that wrong. I was talking about things like this: [https://www.nytimes.com/2018/04/20/technology/att-verizon- in...](https://www.nytimes.com/2018/04/20/technology/att-verizon-investigate- esim.html) (att and verizon colluding to price fix.) I dont think apple is colluding with carriers.

</comment></comment></comment></comment></comment><comment><USER18> The new Swift UI framework reminds me so much of Flutter.

<comment><USER19> I think that was the most interesting part of the presentation. Does it mean the end of AppKit and UIKit?

<comment><USER20> It looks like SwiftUI just gives a better interface to Appkit and UIKit than before.

</comment></comment></comment><comment><USER21> Finally a new mac pro. I hope I can get my company to buy me one. If i could shrink my huge C++ compile times that would be awesome.

<comment><USER22> If you don't need macOS you can get a lot more hardware for your buck w/ PC hardware.

</comment></comment><comment><USER5> Is it just me or the pro display is overpriced?

2nd why do they compare it(a led display) with an oled pro display from Sony? What a bunch of misleading marketers!

<comment><USER23> There are also rivals to that sony monitor in the $4000 range for reference hardware. It's extremely misleading. It is a really nice display though, but $5k is a painful price point. I would have preferred a retina 27" with those features, 4k is more than enough.

</comment></comment><comment><USER24> I wonder how they force a full desktop-web experience for Safari on the iPad. macOS user agent?

<comment><USER25> Probably. I wonder if sites will start gating on screen sizes?

<comment><USER26> This is what I don't really get about "request desktop site" or this kind of announcement... I don't know the last site I saw that serves different layouts based on browser agent, it's all based on screen size and resolution. Unless Apple is spoofing a higher resolution on an iPad, I don't see what will change.

That being said, on Bootstrap (and Bootstrap-like sites) turning the 2018 base model iPad on its side will give you a col-md layout which is usually enough to trigger the desktop size.

<comment><USER25> See Google Docs.

<comment><USER26> Will the new desktop site mode actually enable Safari features that mobile Safari does not support? I can actually name a few sites that don't work in mobile Safari because the browser doesn't support features those apps need (AWS Cloud 9 is one) but I don't think just requesting a desktop site would actually make those sites usable.

</comment></comment></comment></comment></comment><comment><USER27> Overall that was a very good WWDC keynote IMHO.

The Mac Pro and Pro Display XDR certainly seem to deliver on what "everyone" has been asking for over the past few years. Those prices are in another solar system to consumers so we will without question hear a lot of moaning that Apple are over-charging and such which isn't really true. The reality is that kind of performance is _way_ beyond what a consumer would need and those prices are perfectly in line with similar devices.

Some nice additions iOS/iPadOS (Am I the only one who is irked it isn't iPhoneOS, iPadOS, etc??) that certainly makes the iPad Pro a more _Pro_ device.

I bought and returned an iPad Pro back in February because iOS was a huge limiting factor. I said at the time "iOS on iPad Pro is two years behind the Pro hardware" and I stand by that but it seems iOS 13 with bring that down to one year behind the hardware.

Hopefully in 2020 we will see iPadOS mature to the point that the iPad Pro is a true professional device.

Info on macOS Catalina was basically zero though. Some new apps to replace iTunes which we have known about for months now. Sync moving into Finder. The only interesting thing was Voice Control which is think is superb. I always champion accessibility so seeing Apple expand voice control is great. I feel they can improve the experience as there was a lot of needless filler words but it is a great step.

Some interesting improvements to Safari on iOS/iPadOS but no word on what, if anything, is changing with Safari on macOS? With their new extension model coming into effect with Safari 13 I was hoping to see Apple say something about improvements to adblocking/tracking as we will be losing access to Unlock Origin which is a huge blow and I am unsure if I will be able to use Safari without it tbh.

Sidecar will be nice although it is a damn shame that the iPad Pro screen will be the _better_ screen with its beautiful 120Hz Pro Motion display compared to the lower resolution 60Hz one in the MacBook Pro. Hopefully we will see Pro Motion screens in next years MacBook Pro!

For me personally the most interesting new feature is "Sign-in with Apple" and their unique email forwarding service. I have always refused to use the Google sign-in but with what Apple showed I think I would use Sign-in with Apple. At least for new services that I am unsure about at first. For all Apple's faults I respect that they do take users privacy seriously.

So with the exception of macOS news I thought it was a very strong keynote that positions Apple well for the next few years providing they deliver on their words with the Mac Pro! The only _mistake_ was mentioning the price for the new display accessories. $999 for a stand wasn't going to go down well and the audible groan was amusing.

Now to check out the actual _developer_ news over the next few days :)

<comment><USER20> > no word on what, if anything, is changing with Safari on macOS?

Probably because the WebKit team is doing it's own thing and releasing stuff when it's ready. Their blog is pretty interesting to read[0], at least when new changes are happening.

[0]: [https://webkit.org/blog/](https://webkit.org/blog/)

</comment></comment><comment><USER28> This monitor the "Pro Display XDR" is to glossy for hours of coding imho. That is, you don't need 6k for coding either, so that's probably not their audience.

</comment><comment><USER29> No mention of the refresh rate for the monitor? Seems strange that it's not mentioned so I'm guessing it's 60Hz which sucks when you've used 144

</comment><comment><USER30> Was U2F or FIDO2 or WebAuth announced for Safari? Chrome, Firefox and Opera have it, about time Safari added it too.

</comment><comment><USER31> The find My tracking, and activation is very worrying.

<comment><USER32> How come? You can already do that with Find My Mac; this is just making the remote locking ability more lower-level.

<comment><USER31> While Apple has been pretty good with privacy, there are long been rumored exploits in apple hardware (iirc snowden talked about it) used by state intelligence agencies.

Providing this capability gives an additional vector to be exploited.

It also may be implemented less securely in other devices, as other manufacturers see the market appeal, leading to more invasive tracking.

And, while I generally trust Apple, I don't like the idea that Apple can lock me out of my device should they choose too.

<comment><USER33> It's much easier just to buy location data from the cell phone providers. They were selling it willingly.

<comment><USER10> Selling? State authorities get it for free in most countries.

</comment></comment></comment></comment></comment><comment><USER34> Who is going to give up that money on an Intel in 2019 ?

A few months later it will be running at half the speed due to new sploits being found.

</comment><comment><USER35> $999 just for the stand for the new display! Audible laughs all round.

<comment><USER36> and a $199 VESA adapter to escape from that to a more versatile $50 monitor arm.

That stands height range looks laughable for the size of the screen.

The comparably huge bezel was cleverly hidden with the black backdrop.

<comment><USER37> $50 monitor arm for a $6k monitor? You are braver then I am.

<comment><USER36> I even sit on chairs half that price, so now you know my net worth ;)

</comment></comment></comment></comment><comment><USER17> Apple could literally cure cancer and people would complain about the price or lament that it doesn't also cure diabetes.

<comment><USER38> I work for Novartis. We did cure a couple of cancers using bespoke technologies that don't scale particularly well. The prices are ludicrous ($250-500k), but then it does take a team of scientists weeks of time per patient and its a single treatment... but it doesn't cure diabetes.

The Apple-ifying of cancer treatment has started.

</comment></comment><comment><USER39> I don't get iPadOS - it's just macOS with every power user feature disabled.

But then again, I just don't get iPads...

<comment><USER40> -

<comment><USER41> Is it really that hard to imagine? There are a significant number of computer users out there who want to do things like use Facebook, check their email, order stuff from amazon, do a bit of web browsing, watch a bit of Netflix, read a book… a tablet covers those use cases in a form factor that's a bit more convenient and portable than a laptop, and with a bigger canvas than a smartphone.

I get that they might not fill a niche for everybody, but it's not hard to see the use-cases, right?

<comment><USER42> _Is it really that hard to imagine_

It's not. People just like to hear themselves moan on the internet. It beats working.

</comment></comment></comment></comment><comment><USER43> MacOS, iPadOS, iOS. Mark my words, in 5 years Apple is going to come up with a brilliant idea: merge all OSes into one! BRILLIANT! (sarcasm)

<comment><USER39> Don't forget watchOS and tvOS :)

<comment><USER44> homepodOS!

</comment></comment></comment><comment><USER45> The 6k screen is mind blowing. But, you know there is a macbook pro with a 6k screen somewhere deep in apple labs.

Hopefully in time for when apple does the switch to arm in 2022. Apple, my money will be ready!

Edit: damn the price is high, alright, I'll pay $10k for a mac pro developer edition! :P

<comment><USER25> 6k on a 13" display?

<comment><USER46> Why not? I'm typing this on a fairly typical 2k 5" display, so, about the same pixel density.

<comment><USER47> You probably hold that 5" display a lot closer to your eyes than you want your computer screen to be.</comment></comment></comment></comment>


Missy Elliot encryption algorithm - tom-lord https://github.com/tom-lord/missy_elliot

<comment><AUTHOR> This isn't encryption as much as encoding - there's no key or password involved.

<comment> tom-lord Yeah, I guess so... At least the gem does use the methods "encode" and "decode".</comment></comment>


Physical therapy exercise has left me disabled - <AUTHOR> http://hatchme.blog.com/2015/01/07/physical-therapy-exercise-has-left-me-disabled/ <comment><AUTHOR> They are saying now it is not a Lipoma. Nothing is showing up on am MRI. My genitofemeroral nerve has been blocked and it is a culprit. The illingual nerve is also an issue along with my right side si notch. They say if they can not find the exact place of the entrapment they will not operate. I have adrenal insufficiency so getting this fix can mean life or death for me. I know it is trapped up along my iliac crest going to try and have another shot there to see if that is the source of my pain.

</comment><comment><USER2> If your genitofemoral and ilioinguinal nerves have pain, perhaps you have a hernia triggered by PT? Did you get a nerve block or imaging done? What is the lipoma attached to? Are you male or female?

I'm not a doctor, best to consult with one. Good luck either way.</comment>


Rust's Huge Compilation Units - Bella-Xiang https://pingcap.com/blog/rust-huge-compilation-units/ <comment><AUTHOR> The very idea of having compilation unit boundaries look like project boundaries squicks me :/... the lightweight compilation unit structure C/C++ has--with the ability to elide information but the requirement that it be prototyped--frankly always seemed like the perfect tradeoff, and it generally means that projects are able to be compiled in massively parallel environments as all of the dependencies are explicit. This is why distcc is such a trivial project to just drop on almost C codebase, and is why I have been able to get our builds doing like 100x parallel compiles on AWS Lambda (and like, before someone tries to claim that header file bloat somehow prevents this: it doesn't, and build engineers do massively parallel build farms for C/C++ all the time, and it is only in some specific corner cases of C++ projects defined entirely as templates where this comes up, and even then there are trivial techniques you can use to help break the translation units apart). Every time a new language comes out and tries to "fix" translation units by adding tons of cross-file information dependencies without the explicit definition vs. declaration difference I kind of roll my eyes as I know there's almost no chance the build is ever going to fast, and these "we need all the code at once to even begin to analyze it" languages are the worst :(.

</comment><comment><USER2> >In my experience though projects tend to start in a single crate, without great attention to their internal dependency graph, and once compilation time becomes an issue, they have already created a spaghetti dependency graph that is difficult to refactor into smaller crates.

This happened to me too. One important problem to overcome is the orphan rule. This means: you can only implement a trait you own or for a type you own. If both the type and the trait are not in your crate, you are out of luck.

So my first attempt failed utterly. It was very disappointing. You see, by splitting the project in different crates I put one type and one trait in different crates.

After thinking about this problem for a few weeks I accepted that I needed to write wrappers, so called newtypes. But this hurt a lot. I managed to abstract away a lot of the boilerplate by writing macros but still am not very happy about the complexity.

Growing pains.

<comment><USER3> I agree. Something must absolutely be done about the orphan rules, IMO they are Rust's biggest wart. They damage composition in a fundamental way, and gimp the otherwise extremely expressive trait system.

I find it hard to believe that there exists no set of import declarations which remove all ambiguity, i.e., allowing orphan traits but requiring that they get imported explicitly.

<comment><USER2> I think this is a fundamentally difficult problem. Life is sometimes not nice and you have to choose. I chose to write newtype wrappers and to accept the complexity.

> I find it hard to believe [...]

I think you should read up stuff about the orphan rule, then you will understand better.

<comment><USER3> Yes it does seem to be a very difficult problem. That being said, some hard problems deserve hard solutions!

</comment></comment></comment></comment><comment><USER4> Its not just a Rust problem, I've run into the same thing in Java and I'm sure it exists elsewhere. The only answer I can come up with is to keep your app cleanly divided into modules. There's some cognitive overhead but its usually worthwhile.

I recently divided a 100k line Java app into 5 different modules and it compiles 4 times faster. The new boundaries have encouraged better code as well. Suddenly we have things like interfaces and IoC. Before, people just stuffed things wherever.

<comment><USER5> I work with both Java and Rust.

Definitely not the same. With Java, you decide what you want to compile with your build script. You don't need to compile entire application as a single unit. If you have to recompile a lot of code when you only make small modification it is likely because did not use many of available ways to just recompile the classes that you modified.

Also, with Java some optimizations are pushed to runtime. JIT has access to all code running even if it wasn't available at compilation time.

<comment><USER6> Java also does optimizations at AOT, it is all a matter which toolchain one uses, plenty of choice since 2000.

</comment></comment></comment><comment><USER7> Just for the record, orphan instances, although possible in Haskell, are regarded as a big problem and something that should be avoided as much as possible. The problem being, you can declare an orphan instance yourself, later discover you need another library, only to discover it implements the orphan instance as well, preventing compilation. Worst case scenario is that the two implementations are semantically different and you no longer have any idea what your code should do.

(Orphan instances in apps are horrible, orphan instances in libraries run the risk of making your whole library unusable.)

As useful as they sometimes are, I can't help feeling Rust made the right call here.

</comment><comment><USER8> In Haskell two libraries that define conflicting orphan instances can't be linked together. Given the culture around code sharing and crates.io, this would probably be a big problem for Rust. (As I recall I was the first to propose forbidding orphan instances, although at the time I didn't realize they were called that.)

<comment><USER9> Can you expand on that? What about the culture would make this problematic for Rust specficially?

It does seem like Rust is just enforcing the rough consensus in the Haskell community re: best practices.

</comment></comment><comment><USER10> >In my experience though projects tend to start in a single crate, without great attention to their internal dependency graph, and once compilation time becomes an issue, they have already created a spaghetti dependency graph that is difficult to refactor into smaller crates.

Maybe there should be a lint for not having modules be mutually dependent?

</comment><comment><AUTHOR> The URL of this article was changed to the following (so the one linked on Hacker News as of when I posted this comment is now a 404).

[https://pingcap.com/blog/Rust-s-Huge-Compilation- Units](https://pingcap.com/blog/Rust-s-Huge-Compilation-Units)

<comment> Bella-Xiang Sorry, the problem is being fixed now</comment></comment>


Makerbot Digitizer: Desktop 3D scanner goes on sale - <AUTHOR> http://www.bbc.co.uk/news/technology-23795303

<comment><USER2> Here is an alternative way to scan. [http://www.david-3d.com/](http://www.david-3d.com/) Software is free to download, and I bought a Ryobi laser at Home Depot that worked fine ($20).

</comment><comment> jack-r-abbit For what it is, I think it is a huge progress that one day will be a big deal. But too expensive for the average at home hobbyist at the moment.

For those wishing the article linked to the product... here you go.

Product: [http://store.makerbot.com/digitizer.html](http://store.makerbot.com/digitizer.html)

FAQ: [https://s3.amazonaws.com/downloads-makerbot- com/digitizer/MB...](https://s3.amazonaws.com/downloads-makerbot- com/digitizer/MB_DIGITIZER_FAQs_3.pdf) [PDF]

</comment><comment><USER3> This is pretty cool, I'm glad that we're starting to see these prices come down. I've been wondering if something could be put together with either a kinect or a small pico projector + webcam to do the full structured light sort of scan without the huge expense. The laser line scanner deals are pretty cool but if you can vary the light used under computer control you can work around problems with relative positioning of line/object/camera by changing the pattern you are projecting.

</comment><comment><USER4> I love the idea of being able to scan, modify and print. Am I nuts or does this seem like a steep price to be able to do it?

<comment><USER5> If you are so inclined, you can build a similar (if not superior) system for under $75.

A laser diode that makes a line, a 3.3V power supply, a stepper motor+driver, a CCD based webcam, and a copy of 'Davids Laser Scanner' [1] (or similar photometry application).

I've been using this setup for about 3 years now (occasionally using a Kinect for larger, less precise scans). The scans people have done of insects are quite amazing. [2,3]

[1] [http://www.david-3d.com/](http://www.david-3d.com/)

[2] [http://www.david-3d.com/gfx/gallery/highlights/01-Real- size_...](http://www.david-3d.com/gfx/gallery/highlights/01-Real- size_Wasp_and_Fly_%28by_Bongobat_and_Hal%29.jpg)

[3] [http://forum.david-3d.com/download/file.php?id=1951&mode=vie...](http://forum.david-3d.com/download/file.php?id=1951&mode=view)

</comment></comment><comment><USER6> Now this is exciting stuff! Makes me hopeful that we might reach star trek level of mass replicators in every room within my lifetime

I wonder how well it actually performs though?

</comment><comment><USER7> Can someone tell us what the relevant metrics are in this space? Capture time? Accuracy? How is accuracy measured?

<comment><USER8> Accuracy is measured in distance - a bound on the maximum distance from any scanned point to the true surface. Manufacturer accuracy ratings should be taken with many grains of salt.

Makerbot is claiming +/\- 2mm. In comparison, high-end laser scanners claim accuracy in the tens of microns, 50-100x better than MakerBot.

12 minutes is a slow capture time for small parts like that.

$1400 is cheaper than any good 3D scanner on the market, by far. The only competition is a Kinect, which costs much less but doesn't have enough detail for small parts yet.

<comment><USER9> Hmm, I wonder if a LeapMotion device could do it. It's more accurate than a Kinect.

<comment><USER10> Totally different technology - motion sensing does not = high resolution object capturing</comment></comment></comment></comment>


Bitbucket: Autocompleting your username mentions - <AUTHOR> http://blog.bitbucket.org/2012/12/21/autocompleting-your-username-mentions/

<comment><USER2> I really, really like this apparent arms race between bitbucket and Github lately. It might just be observer bias, but both seem to have put in more and more features since bitbuckets big revamp (which imo made it actually usable).

<comment><USER3> Atlassian have been doing some really great work recently - the recent updates to Confluence and GreenHopper have been brilliant.

<comment><USER4> I use confluence for work and it's absolutely dreadful! BitBucket is a AAA piece of software, better than Github hands down for me. But Confluence seems like it was outsourced to a shoddy backwater software developer.

</comment></comment></comment><comment><USER4> Thank you for open sourcing Cursores.js!

<comment><AUTHOR> I was just looking for something like this for a project, when their blog post shows up in my reader :)

Related submission: <https://news.ycombinator.com/item?id=4956386>

</comment></comment><comment><USER5> This is a tad annoying when writing comments with indented code blocks, since it pops up with every `@` you write, which in Coffeescript or Ruby can happen frequently. Great, otherwise.</comment>


Press UP UP DOWN DOWN LEFT RIGHT LEFT RIGHT B A B A on Thrillist - <AUTHOR> http://www.thrillist.com/

<comment><USER2> Here is the javascript and css for this little trick:

<http://pastebin.com/krHi5bMF> [http://s3.amazonaws.com/moovweb- marketing/playground/harlem-...](http://s3.amazonaws.com/moovweb- marketing/playground/harlem-shake-style.css)

</comment><comment><USER3> um, the logo shakes.

<comment><USER4> Sound required to "get" it</comment></comment>


Ask HN: Should I let someone poach me? - <AUTHOR> Hi HN,
I work as a consultant/software engineer for a rather small (~500 employees) consulting company. Currently I am consulting/developing in a project at a large (~500.000 employees) company. Today, the manager at my project's company offered to poach me into his team for 1.5 the salary I currently get at my home company. This raised some questions for me:
- Is it realistic to demand for a 1.5 raise in my next salary negotiations, considering I am rather fine in my current company? Until yesterday, I was planing to demand a 1.25 raise at max. How aggressive can/should one be? Would it be wise to say "raise by 1.5 or I leave" if they decline at first?
- Could I demand for even more than 1.5 at the project's company, considering they currently pay ~3 times what I earn to my home company?
- Where do you think my salary would rise faster?
- What would be the best point to start off for a possible change of employment in the future, that I have been a consultant/developer in many different projects, or that I have been at a big and well-known company?
What would you do?
-- denoyse <comment><USER2> _Would it be wise to say "raise by 1.5 or I leave" if they decline at first?_

The very fact you're asking these questions means you don't necessarily want to leave, so don't put yourself in the position where you have to if your employer offers less than 1.5. If your employer is sensible any negotiation that uses the phrase "or I leave" will result in you leaving. They will pay you what they believe you are worth to them - any offer you have from someone else is largely irrelevant.

Also, check your contract _and the large company 's contract_ very carefully. There's probably a clause that says you shouldn't leave to work for a customer in your contract, and the large company shouldn't approach you with an offer in theirs. Accepting the job could be difficult, and if you leave before checking you'd end up without a job at either company.

<comment><USER3> Good point, though you should also check the laws in your area because such contracts may not be enforceable.

<comment><USER4> It is rare that an employee is unique enough to be worth the cost of bringing lawyers to the table.

<comment><USER2> True, but the small company would presumably lose the contract if he left and went to do the same job at the larger company. That might well be worth fighting for.

</comment></comment></comment></comment><comment><USER5> You're distracted by the money. Take that out of the equation, then answer the question—then add the money back in and see if that changes your answer (it probably shouldn't). This will force you to answer questions like: "Do I want to work for the client PM full time?" "Do I like the work at BigCo?" "Does the big company / small company divide concern me?"

If you're going to be doing the same work for the same people _anyway_ , take the money and run. If you want to do something different, then do something different.

Remember how consulting works: your hourly cost rate to BigCo is easily 1.5x your take-home pay. Your client PM is doing simple math: he'd like to keep you around for the long term, and it's easy to cut out the middleman. He might even be coming out ahead: it's a win-win. (The loser is your current company.)

Because of this, it's unlikely you'd get 1.5x from your current company... because the client won't pay 2x. It never hurts to ask, but recognize the economics of the situation.

<comment><USER5> I keep coming back to this. What I think a lot of the other comments are missing is:

1\. This is a LATERAL move 2\. You are being paid at MARKET RATES in BOTH COMPANIES: the business models just differ

You are NOT being underpaid and this is NOT a foundation for negotiation.

Think about it this way. You take home $20/hr currently. Your _costs_ to your current company (salary, benefits, taxes, overhead, etc.) are probably around $35/hr. They're billing you out at $45/hr and making a 20% margin.

Your client sees an opportunity to pay you $30/hr directly (call it $40/hr loaded with benefits, taxes, etc.) for the _EXACT SAME WORK_. They are _saving_ $5/hr.

If you go back to your current company and demand a 1.5x raise... well, let's do the math. You make $30/hr. $40/hr loaded costs. So they'd have to bill you at $50/hr to make it worth their while. The client won't pay that, so the market won't bear a raise.

<comment><USER6> Market rate means what can be achieved in the market. Only being able to offer low wages means that the company cannot compete at the market rate. Typically a consultant will have a multiplier of at least 2x and more likely 3x. They have to cover overhead and risk and generate a profit directly from the rate. A company that makes widgets makes their profit mainly on the price and sales volume of widgets...reducing overhead helps but isn't the driving force.

The consultancy may need to raise its rates or its principals may need to accept lower rates of return on their equity in order to pay market rate salaries. Or they can bill out staff with lower expertise at lower rates. Particularly if they are competing on price.

But if a consultancy is competing on price, then their also probably looking to profit from the buy out clause on their employees. Letting talent go to their clients is good for business. If the OP moves on to the client, the consultant has a relationship with someone inside. This is good [usually] when it comes to getting future work.

</comment></comment></comment><comment><USER7> I think you may have covered this, but I would first check whether there's some sort of contractual agreement between your current (consulting) company with the client, where no person would be poached (or recruited) within a certain period of time, during and after providing consulting services. This alone will save you a lot of grief.

From the gist of your questions, I can certainly say that you're driven with the financial rewards. But do note that _money_ is only part of the equation. There's a lot of stories abound similar to your situation where they've chosen the side of salary numbers and ended up being unhappy and downright unproductive.

If you know your value, and the value for which employees at the client company pays, then you could certainly do the math. Asking a n% increase should be commensurate to the business value your bring to the table.

</comment><comment><USER8> Well. Don't go into negotiations with, I make 100k, I need 150k to come over. Just say your price is 150k.

Without knowing either company, hard to say. Probably the smaller one though just because they are more likely to not have a corporate structure that will take forever to move up in.

Both have their advantages and disadvantages. Consultant = Ability to move from problem to problem quickly, ability to solve problems in any number of ways. Big Enterprise = "Proven" track record (in theory a well known company isn't hiring just anyone that walks in).

</comment><comment><USER6> My opinion, for what it's worth:

The manager at the big company wants you. You want the money. Working at the big company doesn't seem so bad that you're unwilling to consider it.

Your current employer forces you to demand raises raises rather than just paying you what you're worth. This is basically an adversarial relationship and your demands only have teeth if you are willing to walk out the door.

Assuming that both companies are more or less equally acceptable as places to work, the choice is:

      Big company: guaranteed 50% pay bump on the table.
                   same sort of work you are doing now.
                   more room for growth.
                   clearly sees value in the work you do.

      Current company: maybe a pay bump, maybe not.
                       paying below market rate.
                       makes salary increases confrontational.

One thing to consider is that if you get the 50% raise at your current company, how long will it be before you resent the fact that they were underpaying you before you played hardball? My experience tells my gut that once someone has to threaten to leave in order to get a raise, everyone is usually better off if the person just takes the other job.

Finally, in any large company, it is likely that a manager in a position to offer you a job has already worked through any contractual obligations in regard to hiring you away from your current firm. Such contracts typically acknowledge the possibility ways that are reasonable on both sides. But, it is important to ask the manager offering you the job, what the process is.

Good luck and congratulations on the offer if nothing else.

</comment><comment><USER9> Could I demand for even more than 1.5 at the project's company -> Yes absolutely. First, decide if you want to move for double the salary. Then ask for 2x. If they say yes (they likely would), tell your employer: I love it here, but they're doubling my salary, I have to take it.

</comment><comment><USER10> On wage negotiations: the big corp offer and your current wage as per negotiations are unrelated. You can use the offer as a datapoint as you estimate your own worth but you cannot use it as a rationale to ask for a wage increase. You can always ask for more.

I'm not sure what the situation with the big corp offer is but if you want to move I would use the initial offer as merely as an anchor point and ask for more (as much money that the decision to move does not feel wrong). Negotiate, point out your value.

I don't know where your salary would rise faster. Be aware that some big corps keep people tenaciously on the wage level they are at.

As per future career prospects - signaling that you are smart and get things done is always a good bet. This means that you should have a brief description of what you've achieved at your current project at the end of it. This means if you can't describe your experience as "achieved x at y which delivered value z" it's time to try to change your current assignment. If this red flag condition is not met then careerwise you could be doing worse.

A well known reputable name in a CV creates a sense of positive familiarity, no doubt about it.

It sounds to me you need to figure out what _you_ want to do, formulate a plan how to achieve it, and observe at yearly intervals have your goals changed and is your plan working. Figuring out ones career is an empirical and personal thing - the most important thing you can do about it is to be proactive and have a plan (that probably needs adjustments at intervals).

</comment><comment><USER3> You are grossly underpaid at your current company. A company as large as the one that wants to hire you might be paying above market salary, but not by 3x. Say you are making $50-60k, and they offered $75-90k but other developers make $150-200k. Staying at your current company is holding you back financially, do you should take the offer at the new company if everything else looks good (hours, workload, people). Don't bother with a counter offer from your current job for a jump that big. 25% is about as big as you want to go when threatening to leave. I would start the negotiations by letting them know you are aware of what people make and that you should be in line with that, or there should be a valid reason why not. That should get you somewhere between 1.5x and 3x. Big companies usually have strict raise guidelines so you might be capped at 5% a year so you need to get all you can in the initial negotiations.

</comment><comment><USER11> Don't take the offer from this bigger company as an indicator that you need to demand that much from your current company, they are two completely different situations.

If you choose to negotiate with your current company, only do it from the standpoint that you are worth that much to them because of the revenue you bring in or because of your productivity. They don't care what someone else is willing to pay you, only you care about that.

If you choose to go to the new company, just make the decision and do it, don't give an ultimatum or anything like that... if you do that, they might give you what you want initially but there is likelihood that you will be let go in 6-12 months, or at least shoot your chances for advancement in the foot.

As far as career... having varied experience is probably good, but working in the bureaucracy of a large organization can be soul-sucking and exhausting.

</comment><comment><USER12> To demand a raise of that size from your current employer would likely sour your work environment there. Put yourself in the current employer's shoes: it is either an admission from the company that you're severely underpaid or carries the expectation that you'll be more productive to earn that raise. Yes they didn't have to try to recruit and train to replace you, but a raise of that size quickly overcomes the cost of a new hire (if they're brought on at 1x or less of your current salary).

If the money is important enough to you that you want it, then I think you'd be best off getting it from the poaching company. They'll be glad to have you - it's why they made the offer - and they are bidding for your current/potential productivity level.

</comment><comment><USER13> Is there really no clause in your contract with MediumCo that you won't leave to work for a company you are consulting for without approval? Seems like both employee -> consulting shop, and customer -> consulting shop often both have some kind of agreement in place.

</comment><comment><USER14> > What would be the best point to start off for a possible change of > employment in the future; Consultant or Big Company?

Depends-- McKinsey and Accenture are considered strong consultancies known for their smart talent. But people really like to buy Brand Names. Recall the old slogan "No one ever got fired for buying IBM"? Same idea, if Big Company has strong brand, that experience is typically a CV plus.</comment>


Permanent magnets could be a solution for delivering fusion energy - <AUTHOR> https://phys.org/news/2020-03-permanent-magnets-stronger-refrigerator-solution.html <comment><USER2> During undergrad, I worked with permanent magnets in a plasma physics laboratory, mostly using them to build instrumentation to accelerate gas plasma plumes for spectrographic analysis. This sounds neat in principle, but I'm skeptical of any meaningful application. Dealing with permanent magnets of any meaningful size (let alone arrays of them the size of which would be required) becomes extremely dangerous, and requires a lot of care and attention to detail. Especially considering some of the progress in lowering the cost of high-temperature superconducting magnets, this might be a tough sell. I'm curious if there are any statistics for accident rates of magnets vs. cryogens like liquid nitrogen in development environments.</comment>


Resisting a mobile future is futile - <AUTHOR> http://blog.contactlight.co/posts/resisting-a-mobile-future-is-futile <comment><USER2> It's not that I dislike other people using mobile, it's that as of 2016 I have yet to see any mobile devise that isn't awful for my needs. At this point anything that makes desktop computing more like mobile can only hurt me.</comment>


Elm Debugger: Stamps [video] - <AUTHOR> http://www.youtube.com/watch?v=zybahE0aQqA

<comment><USER2> The debugger has been available online for a while ( [http://debug.elm- lang.org/](http://debug.elm-lang.org/) ). It explains how it works and has some more interesting examples than stamps :)

</comment><comment><USER3> How is he able to rewind through time?

<comment><USER4> He talks about how he does it here: [https://www.youtube.com/watch?v=lK0vph1zR8s](https://www.youtube.com/watch?v=lK0vph1zR8s)

Basically, it's a consequence of Elm's design. All input to the program (timers, mouse, keyboard, etc) comes from signals. Think of a signal as a variable that changes over time. Each signal consists of events over time.

Because Elm's a pure functional language, there are no side effects, meaning, if you put the same parameters into a function, you'll always get the same result. That means if you put in the same event into the program, you'll get the same result. If you record all events of the signals over time, you can replay the state of the program at any time.

<comment><USER5> Purity has little to do with it since the debugger isn't incremental in replaying the events at all. Local program state is perfectly ok, for example, since you are restarting from the first event anyways (otherwise nothing physics would work), and there are well known ways of dealing with it incrementally.

Swift's Playground, in contrast, is probably checkpointing in addition to recording events given performance concerns (elm, being non incremental, doesn't have a performance story for time travel). Note there is nothing pure or monady about swift, which is not required for time travel debugging at all, really.

<comment><USER4> I don't understand your first sentence. What does "debugger isn't incremental" mean?

And do you mean that purity has little to do with implementing this kind of debugger in general? Or do you mean that purity is little to do with the Elm debugger shown?

The question asked was, "how does the elm-debugger do this?" not "how do you write this kind of debugger in general?" In answering the former, purity has much to do with it, as I understood his talk.

<comment><USER5> If you have 1,000 events, make one change to the code, then you must replay all 1,000 events. If you are at event 999, and want to go back to 998, you have to replay 998 events to get there. If it was incremental, you would have much smaller chunks to compute in the average case.

Purity has little to do with implementing these kinds of debuggers, effects need to be explicit, but this can be dynamic explicitness rather this static kind.

The question can be interpreted in multiple ways, but this is not a feature novel of Elm (see "time steering" in the 90s...and debuggers like xstep).

<comment><USER4> I see where things are confused. In this case, I guess it depends on whether you store the entire sequence of states of the application or if you're storing the entire sequence of events emitted.

I was thinking of the former, while you were thinking of the latter. If the entire state of the application is contained in one place, you don't need to reply events from the beginning. You just need the application state at the point.</comment></comment></comment></comment></comment></comment>


Chaos Engineering Upgraded - <AUTHOR> http://techblog.netflix.com/2015/09/chaos-engineering-upgraded.html <comment><USER2> Great to see the principles codified. We practice them at PagerDuty with our Failure Fridays - [https://www.pagerduty.com/blog/failure-friday-at- pagerduty](https://www.pagerduty.com/blog/failure-friday-at-pagerduty). Seeing the production system handle a data center failure gracefully during practice gives us real confidence that we can handle an unplanned region outage (and we have, in fact).

<comment><USER3> PagerDuty - YC S10

</comment></comment><comment><USER4> They practice something I grabbed onto early in my computing life, error handling is critical. There's pretty much one way for an application to succeed, and that's by doing what the user told you do to without error. However, there are potentially an infinite number of ways to fail, and it's important to think about that early on. I spent the better part of wednesday debugging what should have been very simple DB stuff because things were failing silently, no errors at all.

<comment><USER5> This interestingly leads I believe to the "let it crash" philosophy of Erlang (and apparently Akka?) -- see e.g.: [http://c2.com/cgi/wiki?LetItCrash](http://c2.com/cgi/wiki?LetItCrash), [https://lwn.net/Articles/191059/](https://lwn.net/Articles/191059/).

I do believe it's a very good and important approach, in that I don't really know of a better one. Still, on the other hand, I've learned that it seems to also have it's own weird and counter-intiuitive risks -- vide Systemantics: [https://en.wikipedia.org/wiki/Systemantics#System_failure](https://en.wikipedia.org/wiki/Systemantics#System_failure). As I understand the premise: it's easy to over-rely on one's "fail-safe" measures, to the point where the "regular" mode of operation is allowed to deteriorate such that the fail-safes are actually running the system (or even they're just hit too often); then, failure of a fail-safe takes the system down, and unexpectedly ( _" Why, when we had so many and so good fail- safes!"_).

<comment><USER4> Oh, I'm all for the "let it crash" ideology, just make it crash in a loud and verbose manner. Let me figure out what went wrong. :)

</comment></comment></comment><comment><USER6> On the same subject, Facebook also turned off one of their data centers last year. [http://bit.ly/1gX6E6h](http://bit.ly/1gX6E6h)</comment>


Show HN: Stretchpaper, an Infinite Drawing App for iPad - <AUTHOR> http://stretchpaper.com <comment><USER2> I didnt even know I needed it. Makes mindmapping while learning something much more fun. Thanks for sharing it here.</comment>


Garbage collection in a large Lisp system (1984) - <AUTHOR> http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.125.2438 <comment><USER2> One day a student came to Moon and said: "I understand how to make a better garbage collector. We must keep a reference count of the pointers to each cons."

Moon patiently told the student the following story:

"One day a student came to Moon and said: 'I understand how to make a better garbage collector...

<comment><USER3> If something is purely functional and doesn't have any fixed point loopholes or other nonsense, you can know that there is no program with circular pointers.

<comment><USER4> I don't think that's true. I think you could design a purely functional language where everything is immutable, but something contains a circular loop by definition. You could just declare that l is the list of integers going from 0 to 5 and then back to 0 ad infinitum. IMO, circular references can exist without mutation, if the language specifies that something is circular/recursive at the moment it's created. Defining a circular linked list in a declarative way rather than in terms of the instructions that build the linked list. The list is created all at once. It comes into existence with a cycle into it.

<comment><USER5> Like, say, Prolog?

        A = [a | A]

Prolog implementations provide destructive operations and mutation, but here above this is done with unification only. Arguably, you could say that unification performs mutation (but only once).

<comment><USER6> Better than that, you can "mutate" if you're not invalidating information about the variable. Oz (not incidentally, developed by Prolog people) lets you add constraints to a variable as long as they don't contradict the previous ones. Binding to a specific value is just a very strong constraint. Re-binding to the same value is okay.

This is less strict than pure functional programming, but still feels declarative and makes concurrent programming easy: no piece of code that looked previously at your variable will have its assumptions about it broken.

</comment></comment></comment></comment></comment><comment><USER7> Having switched to managed code a little over a decade ago, I can say that garbage collection is a godsend, but something in this article flipped a switch for me. A conventional C programmer is taught, in a somewhat moralistic way, that it's their _responsibility_ to track every resource and manage its lifetime, but with managed code we can delegate that to an admittedly very complicated program that takes care of it for us. Just like if I live in Manhattan, I don't need to know how to take my bag of garbage to the dump. I wonder what other metaphors are lurking right under our noses like that.

<comment><USER8> One example I started to think about is driving.

I wonder if C programmers only drive manual.

<comment><USER9> It's true that in the UK, the vast majority of us drive manuals for no other reason than to maintain our practice at driving manuals.

<comment><USER8> I drive mostly manual, because of the price difference on car prices here in Europe.

</comment></comment></comment></comment><comment><USER10> (1984), so large=small. The Symbolics machine used had a whopping 1M words (=4.5 Megabytes) of real and 15M words (= 67.5 Megabytes) of virtual memory.

They used that 1:15 real:virtual ratio in their experiments and claim typical use used 1:30.

I think this system swapped quite a bit more than most modern systems. That must have had an impact on optimizing the garbage collector.

<comment><AUTHOR> 1MW RAM was very expensive in 1984. It was actually 36bit + 8bit ECC memory. That was a limiting factor. Disks with >100 MB capacity were also quite expensive. With RAM, Disk, Tape and possibly other extensions the price was easily $100k for a new system.

1 MW was not really enough for practical development use. After a few years 4 MW = 18MB was a useful RAM size. Disks might then be 300MB or even larger. Which made virtual memory of 200-400 MB possible. Mid 80s onwards.

> That must have had an impact on optimizing the garbage collector.

That is one of the topics of the linked paper... ;-) We are not only talking about 'the' garbage collector, but the whole memory management system, which provided static/manual memory management and various forms of GCs.

</comment></comment><comment><USER11> This is basically the system Java uses today, isn't it?

<comment><USER12> Yes. The general term these days is tracing garbage collection. ([https://en.wikipedia.org/wiki/Tracing_garbage_collection](https://en.wikipedia.org/wiki/Tracing_garbage_collection))

There are all kinds of bells & whistles you can add on top of the general approach, mostly time-space tradeoffs, such as with a copying collector. But the overall time-space complexity generally remains the same. Sometimes it can get worse, like when you add concepts like ephemerons.

<comment><USER13> Well defining the java GC as tracing is underspecifying it a bit. Virtually all GCs are non-refcount, AFAIK mostly because touching refcounters all the time destroys memory performance. A tracing GC can do that in a batched and parallel fashion.

And then you realize that they are more or less the same in the end:

[https://pdfs.semanticscholar.org/91dc/a25f8cb407fc68218f7d5a...](https://pdfs.semanticscholar.org/91dc/a25f8cb407fc68218f7d5adb912e7db35e81.pdf)

"A Unified Theory of Garbage Collection" TL;DR: Refcount and tracing are a duality.

<comment><USER12> That paper discusses a reference counting GC which also has a trace phase in order to reclaim cycles.

      "Reference counting must perform extra graph iterations in
      order to complete collection of cyclic data. This is
      typically viewed as a major drawback of reference counting"

What that paper really shows is the equivalence of any kind of tracing collector.

In practice when people refer to reference counting it's usually implied that there's no trace phase, and that the GC cannot reclaim cycles. Perl, Swift, etc, are the typical examples. Python is the counter example because it does reference counting and tracing.</comment></comment></comment></comment>


Show HN: JavaScript has Yarn, Ruby has Bundler, and now R has Jetpack - <AUTHOR> https://github.com/ankane/jetpack <comment><USER2> And D has Dub, c# has nugget,... It's like a package/bundling system is all of a sudden something new thing. Nothing to see here, carry on.</comment>


Computación cuántica, circuitos cuánticos - <AUTHOR> https://medium.com/@josueacevedo/computaci%C3%B3n-cu%C3%A1ntica-compuertas-o-circuitos-cu%C3%A1nticos-27910f5338c8 <comment><USER2> [Hi from Argentina!]

I think this is on topic, but this is an English speaking forum, and posts in other languages are usually ignored or flagged (unless there is no alternative in English and it is very very interesting).

(In this case, there is a lot of material in English, some is better, some is worse, ..., but there is a lot.)

I suggest to write two versions of the post, one in Spanish and other in English, and post the English version here. I do something like this, and the English version usually gets x10 more traffic than the Spanish version.</comment>