Language Design Deal Breakers - <AUTHOR> http://sebastiansylvan.wordpress.com/2013/05/25/language-design-deal-breakers/ <comment><USER2> As a language designer, I'm glad to hear my goals might resonate with somebody. :)

Dynamic typing is easy to implement, and that's about as far as its value goes, as far as I'm concerned. If your static type system is getting in your way, you need a better static type system, not a dynamic one. The same goes for dynamic scope—much as I like having it available in Perl and Emacs Lisp, it's best used sparingly.

Memory safety is also kind of a no-brainer. I _enjoy_ working at all levels of abstraction, and having control over memory layout is great, but I don't _miss_ it when working in a higher-level language. Compilers and runtimes for statically typed languages can usually be trusted on matters of value representation.

Efficient storage reclamation is something I'm particularly concerned with. In the absence of mutability and laziness, refcounting is an excellent GC replacement because you can't get cycles. :)

I came to that choice from working with Haskell—it's wonderful, but it suffers from performance issues due to the GC–laziness combination. Both immensely useful features, to be sure, but they come at a cost. OCaml hits a certain sweet spot: it uses GC, but also eager evaluation by default; has convenient access to mutable values; and the runtime uses unboxed primitives.

Windows support is…well, an unfortunate truth. The state of programming on Windows isn't great outside the Microsoft stack—MinGW and Cygwin notwithstanding, as "using Windows to emulate Unix" isn't the same as "using Windows". Language designers have a sad tendency to neglect Windows as a platform but I can't quite tell why. Can it be just because they work primarily with Linux, Unix, or OS X?

<comment><USER3> Refcounting?? I thought that idea died years ago.

Refcounting is an extremely poor choice for memory management on modern machines. Even putting aside the issue that it can't handle cycles: constantly writing to memory to modify reference counts can be a huge performance hit (you often have to do it even when you are accessing objects in a read-only fashion). Also it requires extra memory on a per-object basis. Also it doesn't play nicely with concurrent threads. Also it's not cache friendly.

I'd expect any halfway-decent modern GC implementation to be significantly more efficient than reference counting.

About the only valid justification I can see nowadays for _not_ using a GC is a hard-realtime latency requirement. Yep, GC pauses suck. But for efficient memory management in nontrivial systems, GCs are definitely the state of the art.

<comment><USER4> > Refcounting is an extremely poor choice for memory management on modern > machines.

Tell that to Linus:

        Data structures that have visibility outside the single-threaded
        environment they are created and destroyed in should always have
        reference counts.  In the kernel, garbage collection doesn't exist (and
        outside the kernel garbage collection is slow and inefficient), which
        means that you absolutely _have_ to reference count all your uses."

<https://www.kernel.org/doc/Documentation/CodingStyle>

Just to balance your downsides of refcounting, some downsides of GC: requires halting the program periodically and trashing all the caches, which is inconvenient and sometimes impossible. And performance-wise it's unpredictable and can require lots of tuning, as Java programmers who work on allocation- heavy workloads can attest.

</comment></comment></comment><comment><USER5> > but really people who think dynamic typing is suitable for large scale > software development are just nuts

I would argue that ITAs software ([http://www.itasoftware.com/solutions/travelers/flightsearch....](http://www.itasoftware.com/solutions/travelers/flightsearch.html)) is larger than most software efforts, and it is written in LISP. Not statically typed.

<comment><USER6> Because everything is a list.

<comment><USER5> No, not really.

</comment></comment></comment><comment><USER7> I don't get the following requirement:

        Great Windows support

That doesn't have _anything_ to do with the programming language. That's all about the libraries and toolchains that the language ships with. Sure, when I evaluate a language, I also take into account the maturity of the libraries and tools that the language includes. But I don't think lack of library support (especially for a single platform) should be a criterion in judging the _design_ of the language.

<comment><USER8> Yeah, this point is just plain dumb. And although he says windows is an extremely popular o/s, it might be, in general, but not for software engineering. A unix like environment is far superior for software dev, unless you stay in visual studio all day (or eclipse)

The other points are largely flame bait too. A competent developer can manage just fine in java, python, c++ or a host of other languages that fail his tests.

A classic case or the bad worker who blames his tools. My response to this kind of blog post is grow up, deal with the reality of the languages that are in every day use and stop whining about things like null pointers!

<comment><USER2> That's not what the post is about. He's saying that if you're designing a _new_ language, you should meet these criteria because they are deficiencies in existing languages.

We live with the flaws of old tools because they have other, more important value to us—a new language has no value without adoption, so it had better improve on its predecessors in order to convince people to adopt it.

</comment></comment></comment><comment><USER9> I love this post but I don't wholly agree with the null-purity system. I think that the existence of the 'null pointer exception' is a sign that global, total, error handling in anything but trivial applications is really hard.

So let's remove null pointer exceptions and lets require that anything that could return failure be wrapped in an option type. That way you can determine if there is Some x or None inside of the possibly-None value. Well, then you need to deal with how to fail in the case of possibly-None.

Even the best functional programmers I've seen fall back to some kind of exit- or-exception semantic in the None case. So we've kind of re-invented the null pointer exception, by having cases where the easiest thing to do in our program in response to some failure is to just abort the program.

I think that this is fine from a memory safety perspective. The terrible thing about the 'NULL' pointer is that it is a sentinel that is overlaid into the domain of valid addresses to the machine. When we add a layer that checks if the address is valid without relying on its literal value, then we gain a lot of safety in terms of not generating a hardware exception (that is difficult to reason about) or scribbling on some other object (which could be impossible to reason about). Terminating the program, to me, is a fine tradeoff to avoid corrupting and modifying the program in an unknowable way...

<comment><USER10> >Even the best functional programmers I've seen fall back to some kind of exit-or-exception semantic in the None case. So we've kind of re-invented the null pointer exception, by having cases where the easiest thing to do in our program in response to some failure is to just abort the program.

The difference here is that the programmer is making a conscious choice to violate the option type by writing a partial function which escapes it. It also makes very plain and clear (via type annotations) which functions are allowed to fail and which are not (pure functions). With NULL pointers you're basically making every pointer in the entire program an option type with the potential to crash if you haven't written the boilerplate to handle it.

Oh and by the way, Haskell's Maybe and Either types are monads which can be handled very elegantly via do notation, simple combinators or monad transformers (MaybeT and ErrorT).

<comment><USER9> Yeah, I just think that at every point in your program where you will have a Maybe the failure case could be as inelegant to program execution as raising an uncaught NullPointerException, and escaping that involves a lot more work than using a language without a NullPointerException.

Maybe I should write more Haskell code, but this has definitely been my experience with OCaml...

<comment><USER11> I've never used OCaml, but Haskell isn't as bad as you describe. When you use Maybe, you do not have to deal with the Nothing (ie. Null) case until you want to escape the monad (even then, you could still ignore it, and just crash if you do have Nothing).

If an intermediate calculation results in Nothing, then the final value will be Nothing. Handling this is as simple as:

foo :: Maybe Int -> Int

foo Nothing = 0

foo (Just x) = x

</comment></comment></comment></comment><comment><USER12> Ocaml? Static types, garbage collected, not sure about windows support, and it still has null (IIRC). [http://programmers.stackexchange.com/questions/62685/why- isn...](http://programmers.stackexchange.com/questions/62685/why-isnt-ocaml- more-popular)

It's C-fast.

<comment><USER2> Approximately C-fast, anyway. You still have a GC, tagged integers, and boxed floats by default. Also not sure about Windows support, as I haven't been using it long, and then only on Linux and OS X.

</comment></comment><comment><USER13> I think the trick is that any programming language that lets me operate on bytes (and hence makes me care about things like memory addressing) shouldn't prevent me from having nulls.

A NULL (usually defined as 0) is a valid memory location, especially if you are doing certain types of systems work--the fact that we've used it as a sentinel value in C/C++ is a separate problem entirely.

Maybe we need to use a taxonomy where languages that do not express anything about layout in memory (as bytes, quibits, or whatever) are kept separate from other languages.

The issue, of course, is that eventually you need to move out from algorithm space and start dealing with real hardware, which speaks bytes. Then again, a model where you only interface over JSON blobs might obviate the need for that, provided you don't talk to anything that speaks in something other than numbers and human-readable strings.

<comment><USER11> I think you are talking about a separate (and identical issue). "NULL" is not a valid memory location. 0 is a valid memory location. Because we have to express NULL as the same primitive type as valid memory locations, we have no way to distinguish between NULL and 0. In a language with a type system that prevents you from dereferencing NULL, this problem goes away. Now that the type system can distinguish between NULL and a pointer, we can once again use 0 as a valid pointer.

<comment><USER14> > I think you are talking about a separate (and identical issue).

Somehow, this reads very strangely to me. Are you saying something like "I think you are talking about the same issue from a different point of view"?

</comment></comment></comment><comment><USER15> Save for the Windows requirement, I think the author would actually really like Objective-C. The compiler checks types. Messages to `nil` resolve to `nil` (0), so no null-pointer exceptions. Automatic Reference Counting gives you memory safety.

<comment><USER16> I don't think objective-C satisfies any of those constraints. It _kinda gets close_ , but I don't think it does.

The compiler checks types... but there's no generics. Given that the author is coming from C++, they probably want a type system that can represent 'vector of ints' vs 'vector of strings'.

Nil doesn't cause null pointer exceptions... but it causes silent bugs, where you thought something was happening but it wasn't. The real problem (all types have an extra misbehaved value) is still present.

Automatic reference counting gives you memory safety... but it can't handle cycles automatically, and obviously it doesn't apply to the C subset.

<comment><USER17> > but it causes silent bugs, where you thought something was happening but it > wasn't.

In Objective-C, it could be a silent bug or just intended behavior to send messages to a nil object. It is explained here: [http://developer.apple.com/library/ios/#documentation/cocoa/...](http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/ProgrammingWithObjectiveC/WorkingwithObjects/WorkingwithObjects.html)

<comment><USER16> Of course, the behavior may be intended. I've certainly taken advantage of nil doing nothing.

I've also _accidentally_ had a nil where it wasn't expected, and lost time figuring out why particular effects weren't occurring. More time than I would have lost if the mistake had caused an immediate exception.

The same type of mistake is still possible (unexpected value), though the consequences are different, so I don't think it makes sense to say nil solves the null problem.

</comment></comment></comment></comment><comment><USER18> I find it fascinating that programmers working in C++ seem to spend a lot of time thinking about language design.

There is a lot of responsibility on the shoulders of language designers. There is the notion of technical debt that we all deal with as programmers, but the meta-debt the language designer accumulates is astounding.

Let's meditate a while. As we read this, some young, well meaning C++ programmer is writing another String class.

I don't even know if talking about Tony Hoare's NULL story is really that relevant. After all, that's a single feature of a programming language. In the context of C++, talking about NULLs at the language level is like arguing about the colour of your Edsel.

</comment><comment><USER19> had to take the whole article with a massive grain of salt. clearly the author has alot of experience writing Windows desktop applications in C++. Equally clearly the author has very limited experience with other domains.

</comment><comment><USER20> I used C# for a long time and consider it to be one of the best examples of a statically typed language. The generics are very well done. Implicit typing from 'var' makes half of your statements almost dymanic.

      var list = new List<int>();

Many of the base types are pass by value (int, bool, dates, etc...).

There is terrific functional support through LINQ.

It is a great language. I just don't want to work on windows and it only has full support there. The library support and community are also pretty bad.

</comment><comment><USER17> > Finally, performance.

Wouldn't Strongtalk and the research around it be the counter example to this claim?

</comment><comment><USER21> _but really people who think dynamic typing is suitable for large scale software development are just nuts_

Flame-bait. I happen to like static typing-- and I'd be excited to see more progress with optional static typing in Clojure-- but I disagree.

First of all, you can pretty easily get principled strong typing with a language like Clojure. One of the first things I write on a large Clojure project is defn-typed. If types were a major part of what I was doing (e.g. theorem proving) that wouldn't be acceptable, but for web programming it's generally enough. It's pretty easy using a few macros to make it so that you get almost all of the guarantees (from unit testing) that you'd get from compile-time type checking.

Remember: dynamic typing doesn't mean you _don't have_ types. You can include types in your contract system. It means that type sanity isn't checked at compile-time. For certain problems that require extremely high levels of correctness, you need static error-checking/analysis because runtime unit testing isn't good enough. For _every_ large system? No, not the case. What you need, in general, are good programmers and sane development practices; those matter a lot more than static vs. dynamic.

My experience is that static typing performs best when you're trying to solve a known problem extremely well, and that's not an uncommon thing in software. Dynamic typing is better-suited to a more chaotic world where you don't know the problem yet, because it makes it easier to "poke" at things in the REPL and build prototypes.

Also, improperly used, static and dynamic typing both fall down disastrously on large or distributed systems. For example, if you have circular dependencies in a large Scala project ("don't do that", you might say; but we're talking multi-developer now, with the full spectrum of skill) you're going to see gargantuan compile times because incremental compiles will fail you, and while Scala's compiler is an extremely powerful machine, it's not fast.

All this said, Haskell is still a very cool language and I think everyone who wants to be a serious computer scientist needs to get some exposure to what it has to offer. _Real World Haskell_ is a great book, for starters. I also think Scala is great if you have strong developers who won't be tempted to OOP things up.

<comment><USER9> I've found that static types help with prototyping because you can make changes to types used in your program and the compiler lets you know when you missed a spot, those locations could live for months in your code in a dynamically typed project.

static typing systems work with good programmers and sane development practices as a force multiplier. dynamic typing systems become something that requires you to have good programmers.

<comment><USER22> I've found that automated testing helps with prototyping because you can make changes to tests for your program and the tests let you know when you missed a spot, those locations could live for months in your code in a project without tests.

<comment><USER23> Yes, but this requires the additional steps (and work) of making the changes to your tests. Tests give a good approximation of what static analysis gives you, but it is more cumbersome. (Of course tests can also do things static analysis can't)

<comment><USER21> I usually write a macro (defn-typed) that generates pre- and post-conditions (contracts, essentially) for crucial APIs when I'm working in Clojure.

It's not as good as static analysis at catching _all_ type errors-- if that's what you need, I wouldn't recommend any dynamic language-- but it does mean that most type errors will be caught in unit testing, with minimal recurring work.</comment></comment></comment></comment></comment>


How Junk Food Can End Obesity - <AUTHOR> http://www.theatlantic.com/magazine/archive/2013/07/how-junk-food-can-end-obesity/309396/?single_page=true

<comment><USER2> All I see is a rehash of _bad science_ arguments regarding "calories", that have been roundly thrashed in Gary Taubes excellent book 'Why we get Fat'.

Oh and also, a "Stockholm Syndrome"-like kow-towing to the corporate food giants. Makes me wonder, what horse this author has in the race?</comment>


Next Hacker News DC Meetup on Wednesday, Feb 23rd  - <AUTHOR> http://meetup.hackernewsdc.org/events/16465705/

<comment><USER2> Have you thought about contacting MB (<http://www.moderndcbusiness.com/>) the new "Modern DC Business Mag"? Just started publishing and its bent towards VC and entrepreneurs. It's kind of fluffy but they might be interested to give some exposure.

</comment><comment><USER3> Definitely interested! I also have a recommendation for future events: Post the meet up information on hackernewsdc.org as well. DC is a big government town and a lot of federal agencies block meetup.com. It's hard to check out the information at work without blatantly circumventing the filters.

<comment><AUTHOR> Good call. Done: <http://hackernewsdc.org/news/> <http://hackernewsdc.org/rss.xml>

</comment></comment><comment><USER4> I should be there once again! Always a great event.

<comment><USER5> yay Patrick! looking forwarding to seeing you again.

</comment></comment><comment><USER6> Im one of the organizers of the DC meetups along with Rusty. We are planning a Hack-A-Thon in March, but have no place to meet!

If anyone knows of locations inside DC within a mile from the metro, we would love to talk to you! My profile has my email address.

<comment><USER7> I wonder if there would be some way to partner with Affinity Lab. <http://www.affinitylab.com/>

<comment><USER6> thanks for the link. Ill go ahead and put it on the list of Todos.

</comment></comment></comment><comment><USER8> Man, you keep making it on Wednesday. I would love to attend but all my soccer league games are on Wednesday. Hopefully the March one is before the 16th.

</comment><comment><USER7> Looks neat. Will also throw out that the Drupal meetup is usually at Stetson's on U St and they have a private bar and an awkward but usable projector.

<comment><USER3> I haven't been to Stetson's, but I would love to see more meetups in DC proper. The fact that I live off U Street certainly helps.

</comment></comment><comment><USER9> Argh, conflicts with django-district. I guess it's nice that there are so many local groups but it's exhausting my free evenings.

</comment><comment><USER10> I really wanna be there.... Unfortunately away at school here in Charlottesville.. Any HN readers in Cville?

<comment><USER11> UVA Grad here, wahoo wa! Computer Science Major '08. Maybe see you guys next month.

</comment></comment><comment><USER12> Is there a similar meetup in the San Francisco area?

</comment><comment><USER13> I'll be there</comment>


Ask HN: How often are you on call? - <AUTHOR> Please share a few words on what size company you work for, and what size team you're apart of. If you'd like to share, mention how often you're paged or activated! <comment><USER2> I just started working for the government, and I got yelled at for sending an email on Saturday. The union contract says we're paid for overtime if we work more than 40 hours, but in turn, we _never_ are supposed to work overtime unless maybe the world is ending.

I used to work for a company that had a departmental phone and we would rotate to a different person each week to be on call. However, waking people was essentially eliminated by adding people on third shift (including me) and in India.

In both cases, I was on a team of about 5-10 in an agency or division of a couple or three hundred, within a much larger organization.

</comment><comment><USER3> I'm on call 24/7\. It's fairly normal to wake up at 2 am because there's a pressing situation and a client is in need. That said, I actively chose this situation for myself and find it to be pretty rewarding. Of course, it requires some planning and coordination, so my team divvied up our responsibilities accordingly to ensure that there are always resources available for taking meetings on a normal schedule.

It's probably worth noting, we work with large brands and marketing agencies from all around the world and are often called upon to 'save the day' once someone's plans have fallen through. As a result, time is usually the one thing our clients don't have enough of and being able to solve their problems ASAP is what allows our clients to get back to normal operation. Given that, it's easy for me to pick up the phone at 2 am because I know that whoever is calling me is going to be having a worse time than I am.

</comment><comment><USER4> Small startup, tech team of about 10 (2 SREs + 7 devs + 1 biz, total company size is 20, fully remote distributed across 3 continents), roughly 8 hours twice a week and only during my local timezone business hours, then the same 8 hours in one weekend day every two weeks, also roughly. We have lots of automated checks and alerts and only react to critical ones paging us via Slack (most of the alerts that page us are known, some are flaky some are false positives we can't ignore).

It was kind of forced on everybody (prematurely IMHO) but respecting people's timezones and business hours was key to make it acceptable and you can take the next day off no-questions-asked if you were on call on a weekend day even if you didn't have to act on anything. It's far from ideal considering how we still react to the critical alerts and what in them usually triggers actual on-call support but I've had worse in the past so it's alright... for now.

</comment><comment><USER5> Largeish company (engineering staff around 1000, I think?), and my team owns the OS platform (packaging, config management), hardware purchasing, and the installer, as well as our private cloud, which hosts a good chunk of services (notably including dev machines, notably excluding the most money-making parts of the business). A separate team is first-line sysadmin+SRE for most of the company, so we don't respond unless you can't install machines or if _every_ machine is broken, or if the private cloud (as infrastructure, not a specific VM on it) is acting up.

Private cloud was originally a separate team, and we had about 5 people on a weekly rotation, where you'd do support and 24/7 on-call for a week. Now that we've merged, it's about a dozen people on the on-call rotation, though we still have a subteam of about 5 for the weekly rotation of who's paying attention to private cloud support tickets during working hours.

Thanks to some work that we did a bit after I joined, we got the off-hours paging to be much less frequent - in particular we no longer page if _any_ hypervisor is down, only if either a whole availability zone is down, or a hypervisor hosting personal dev machines is down _and_ it's business hours. (Otherwise, higher-level services ought to have failover between multiple VMs, and devs working odd hours can use backup machines.) Usually that second condition gets noticed by the support person (in Jira) before it escalates to the on-call person. So it's rare to have anyone actually paged, and it usually means something unexpected is on fire. So, any member of the team is as good as any other at figuring out what broke and whether it can wait until morning, which is why we were able to throw all of the combined team into the rotation without training them all in everything.

There are still improvements I want to do, but the expected number of pages rounds to zero (it looks like we've had 6 off-hours pages this year) so it's certainly manageable.

</comment><comment><USER6> SRE at Google. We are oncall for 12h then the other site takes over for the other 12h, so no night shifts. You do that for 7 days in a row once every 5 week-ish. Some team have slight variations on that.

We get paged around once per 12h on average but our service is fairly young. More mature services tend to page less I think.

<comment><USER7> What is the on-call compensation?

Last I knew it was 33.3% time credited for on call hours with 30 minute response requirement and 66.6% time credited for on call hours with 5 minute response time. And it could be taken as additional holiday or as cash.

</comment></comment><comment><USER8> Large company. Team of 12. Do very specialized work.

On call: Never and never have been in 25+ years across multiple large tech companies.

Seriously considered looking into a job at Facebook where this would have been required and it was definitely one of the considerations that made that position very unappealing.

</comment><comment><USER9> Currently contracting for a ~10 person company.

In the past I've mostly worked at small companies and have never officially been on call. I've fixed the odd out of hours issue here and there without there being a proper arrangement.

The systems I work on (trading / betting software) are such that by the time you're through testing it's very rare to hit a game breaking issue because there's a very large incentive to not like, lose the bank.

Dependencies in the critical path are kept to a minimum, etc.

Usually problems are more 'soft', like an API being turned off or changed or something.

</comment><comment><USER10> It depends on how many people we have on the team! Right now it's every three weeks. A while ago it was every 6 weeks.

I used to get paged dozens of times a week. Now it's either once a week, or a few dozen times a week (usually this is a blip that can just be ignored because something went wrong and then fixed itself). Typically there's one small actionable item every week I'm on call.

The company is 500 people, my team varies in size a lot as people quit and we try and hire replacements. It's been as small as 3 and as big as 12.

</comment><comment><USER11> I work at a 100-person startup. We currently do 1 week secondary followed by 1 week primary. This comes up every 2.5 months. On-call is 8am-8pm with any overnight pages going to execs. I'll not that we originally had people doing daily shifts and it was a huge pain for those who were religiously observant. It was much harder to get someone to cover a Saturday or Sunday shift since nobody wants to cover those. Will send much better

<comment><USER12> do you have any staff in other timezones to get better night coverage?

</comment></comment><comment><USER13> I'd also be interested if people could add if being on call is (a) voluntary, or (b) required on their team.

Also, it'd be good to know if on call comes with additional compensation?

</comment><comment><USER14> My tier 3 team is on 1-week point-Dev rotations. Roughly 1wk in 9 on primary, same again on secondary. They take about 2-3 calls per primary+secondary. I'm on Tier 4 in mgmt roster, and on call every other week. Take escalations and fall thrus every 3-4mths. Tier 4 also plays duty manager during events such as product launches.

</comment><comment><USER15> I feel I'm in the sweet spot. Work for a company based across 5 time zones. Our team of 12 has optional out of hours support and people have to volunteer. But it is only for Sev 1 issues where the entire app/service is down.

Since it is paid, we end up taking turns for the extra money. In the year I've worked there, haven't been pinged even once.

</comment><comment><USER16> Work for FAANG, team size is 6-8~. I'm oncall 24/7 roughly one week out of 6. Usually paged 1-2 times per shift except during 'peak' periods but we usually subdivide the rotation for those.

My worst shift I was paged during off hours twice, but was only woken one of those times.

</comment><comment><USER17> I run a bootstrapped SAAS business with total team size of 12. I am technically always on call if shit hits the fan. Not in the traditional sense though. If server goes down (has happened like 2 times in past 5 years), I get a call no matter what time of the night it is.

</comment><comment><USER18> Never, and I don't consider any job that demands this. Learn what work-life separation means.

<comment><USER5> That's clearly not a sustainable answer for the world - professions ranging from doctors to priests to soldier to sailor to CEO (can't ignore a crisis if it happens on Saturday morning) to lawmaker all require working the occasional unscheduled hour. And that's not even counting jobs like pilot or convenience store clerk or paramedic that require at least some people to work on what the world considers holidays (even if it's scheduled as part of their 40 hours a week).

Is there a meaning of "work-life separation" that encompasses these professions too, or shall we say the world relies on some people not having it?

<comment><USER19> If someone is dying, go ahead and page me!

Otherwise, companies need to hire night shifts if they want someone covering while the devs are asleep. If you want full uptime, then hire for it! Your employees shouldn't give up their sleep and weekends for a measly 0.003% of your company.

Also, I would strongly support extra pay for low-wage workers working holidays, weekends, or night shifts.

<comment><USER20> It's pretty naive to think you can just hire random people to step in and support complex business systems part-time.

Sure, you can have a global ops team that can deal with basic system issues like "this machine ran out of disk space", but not "we're seeing a spike in 500s in our payment system because something that got deployed earlier today broke a workflow". And saying "well just roll back!" isn't a solution either. Maybe you can't roll back. Maybe that won't fix it because data is now corrupt. Maybe it wasn't even a deploy to that system that broke things, but some feature flag in some distant system. No one except the team itself can diagnose these issues appropriately.

</comment></comment></comment></comment><comment><USER21> Large cross-site team. We do 12x4/12x3 rotations (Mon-Thu, Fri-Sun) so everyone stays fresh.

I've heard others are trying one-day rotations to make scheduling holidays fairer and more flexible for people who have commitments on certain days.

</comment><comment><USER22> I own a marketing agency. I check my email often just on case but I rarely have to hop on my laptop after hours. I'll probably pen an after hours short email a few times a week though.

</comment><comment><USER23> Presently, one week in five. Average shift has one overnight page and one other out of hours page (with high variance).

I am compensated for the oncall, but not a meaningful amount.

</comment><comment><USER24> Technically 24/7, except for clustered stuff that hardly goes down. More than a year since the last time; I think. Thousands of employees, team of 7 or so

</comment><comment><USER25> Large university, team of 8. All out-of-hours work is on a "best effort" basis only, i.e. I'll do what I can (which may be nothing) if emailed.

</comment><comment><USER26> Company the size of about 10.

I am the only person on call 24/7.

</comment><comment><USER27> Small bootstrappes company working on SaaS. Im the lead and has 2 programmers on the team, so Im the one usually on call, 24/7.

</comment><comment><USER28> Never ever.

Current company has 400 employees my team is around seven but we'll have to grow very fast very shortly.

</comment><comment><USER29> Company size: 2 programmers

only when the other guy is on vacation

</comment><comment><USER30> One week out of two, for a company size of 20.

</comment><comment><USER31> Quite a lot. 30% of the day on average.

</comment><comment><USER32> once every 5 weeks, FAANG

</comment><comment><USER33> tl;dr One week out of four.

I'm an SRE on a team of 4 (incl manager). The company is about 140 people. Each of my team members participates in on-call (incl manager) and is on for a week at a time. We've dialed things in such that we might get paged once or twice during that week and usually the pages wind up being minor/non-issues. It's really not bad, in my opinion.</comment>


Tell HN: Android 2.2 - Froyo Released for Nexus One. Get it now. [Screenshots] - <AUTHOR>

Google is beginning to phase in over-the-air updates to Android 2.2 / Froyo to Nexus One users on T-Mobile and will continue over the next couple weeks.
If you'd like to install it now, instructions are right here. Root access is not required; just download the update, drop it on your SD card, and follow the instructions to start the upgrade: http://phandroid.com/2010/05/22/manually-update-your-nexus-one-to-android-2-2-froyo/
For those without a Nexus One on T-Mobile, I've taken several screenshots around the OS and in a few applications. Check them out here if you like, and feel free to ask if you'd like to see something else: http://www.flickr.com/photos/cscotta/sets/72157623991007169/show/
The "Chrome to Phone" extension for cloud-to-device messaging is also available here: http://code.google.com/p/chrometophone/
Have fun! <comment><USER2> It installed fine on my Nexus One from bought from Google directly. Froyo is a lot smoother than Eclair. The most noticeable thing is that all transitions (opening apps, closing apps, opening up app list, sliding between home screen pages) have a higher frame rate.

Flash Beta is on the android store. Thankfully, the equivalent of FlashBlock is built into Android's browser - change the plugin settings to on demand, and you have to tap to enable Flash boxes. Flash ads etc. on pages generally murder scrolling performance.

</comment><comment><USER3> Live link to instructions: [http://phandroid.com/2010/05/22/manually-update- your-nexus-o...](http://phandroid.com/2010/05/22/manually-update-your-nexus- one-to-android-2-2-froyo/)

The shortened url <http://bit.ly/aCDBwh> translates to [http://android.clients.google.com/packages/passion/signed- pa...](http://android.clients.google.com/packages/passion/signed-passion- FRF50-from-ERE27.1e519a24.zip)

<comment><USER4> So update.zip is from the Google site. Why is Google not promoting this or why did they release this?

<comment><USER5> It's the zip file your Nexus One will download automatically in the background during low bandwidth times of day (to avoid strain on the cell network). It doesn't do so right away, as they also want to stagger the rollout. If you do the manual download and recovery method, you're just doing what the update will do eventually.

</comment></comment></comment><comment><USER6> This image is for T-Mobile phones only.

The error you get when trying to apply update.zip:

      assert failed: file_getprop("/system/build.prop", "ro.build.fingerprint") == "google/passion/passion/mahimahi:2.1-update1/ERE27//24178:user/release-keys" ||
         file_getprop("/system/build.prop", "ro.build.fingerprint") == "google/passion/passion/mahimahi:2.2/FRF50/38042:user/release-keys"

Looks like the version installed on the AT&T N1s isn't what the update script is looking for and it aborts. Wondering if modifying the update scripts would brick my phone.

<comment><USER7> Just mellow and know that it's coming soon. Honestly the way people are spazing to get it installed is a bit ridiculous.

I'll just wait until I get an update notice (on my GSM ["AT&T"] phone here in Canada)

<comment><USER6> Yeah, I'll bide my time and be patient. The new features and speed increases will be worth it.

<comment><USER7> Have to confess that I've checked my phone about 100 times today :-)

Ah well. It shall come at some point. Maybe not for weeks, but it will come.

</comment></comment></comment></comment><comment><USER8> Win! Thanks.

One glitch in the linked instructions: when you get to the warning screen (android + /!\\), hit power button, then volume+ - both at same time doesn't work. And the subsequent menus require use of the trackball, not the +/- buttons.

edit: wow...this feels turbocharged, in a variety of ways. Speed: better. Keyboard: better. Interface: much smoother. Flash: just works. Lots of small UI improvements. Feels like it's meant to compete against iPhone 4.

</comment><comment><USER9> I just can't wait until vanilla 2.2 is available for the Evo 4G. I find the general usability of Sense UI to be quite poor.

</comment><comment><USER10> Thank you for the "Chrome to Phone" link, I wasn't sure this was available yet!

I tried it, and it works instantly here.

<comment><USER11> I can second this thanks , I'll give it a try now.

</comment></comment><comment><USER12> i didn't have the patience to wait; downloaded it manually. I wonder if your chances of getting the OTA are improved if you turn on wifi.

froyo looks great!

they made good use of the extra space at the bottom of the screens by adding the phone and browser icons next to the drawer button. it frees up two spots on your main screen!

chrome-to-phone is unbelievably slow even with a nexus one and a great internet connection. it takes literally one minute for the map to show on the phone!

<comment><USER13> What is chrome-to-phone?

<comment><USER14> See this part of the Froyo presentation from Google I/O: <http://www.youtube.com/watch?v=dBQFXRW5ZiE#t=02m40s>

<comment><USER13> Cool, thanks! Exciting times.

</comment></comment></comment></comment><comment><USER15> Looks great, thanks for the screenshots.

Unfortunately my phone company locked my G1 down with android 1.5. So I'm waiting (impatiently) for the iPhone 4g.

<comment><USER16> Just install cyanogenmod to get most features of Android 2.1 in the meantime. You'll have to wait a few more weeks or months to get Froyo on G1.

I have CyanogenMod5-test5 running on my G1 and could install the official Twitter and Facebook apps and like it.

<comment><USER15> Rogers (in Canada) installed an update on my phone that makes it non-rootable and forced to use 1.5. So Cyanogenmod is not an option.

<comment><USER17> Seems like rooting is still possible: <http://forum.xda- developers.com/showthread.php?t=544654>

<comment><USER15> That post is from August 2009, the forced firmware upgrade was in December 2009. If you go to page 51:

"It is not currently rootable"

<comment><USER17> Well, that's what you get for doing business with a company that's out to fuck you. You get fucked.

Android is a tool like any other -- it can be used for good, and it can be used for evil.

(Why not return your phone as defective? It worked for people when Sony remotely disabled their Linux installs on the PS3.)

</comment></comment></comment></comment></comment></comment><comment><USER18> Just did it. Only a 44mb download and a surprisingly fast update.

</comment><comment><USER19> The link to the image stopped working -- here's a mirror: <http://filevo.com/6ns7wvd07438.html></comment>


Show HN: Algorithm Helper (Android app) - <AUTHOR> https://play.google.com/store/apps/details?id=edu.stanford.algorithms <comment><AUTHOR> I wanted to share a personal project I've been working on: Algorithm Helper gives you simple and clear explanations for algorithms and data structures. The goal is create a Wikipedia-style collection of articles about various concepts that is suitable for mobile reading, which means we favor intuition over proofs.

The content is open-source at [https://github.com/rpandey1234/AlgorithmHelper](https://github.com/rpandey1234/AlgorithmHelper). I'd love any pull requests or feedback.

</comment><comment><USER2> Wow, I was just thinking of spinning up something similar. This is a fantastic idea good sir. I'm going to make a pull request right after this comment.

</comment><comment><USER3> Why is it an app and not a website?

Does it have visuals/image/animations/videos to help understand?

\---

EDIT: Okay I saw there is a website as well. And also that there are no images etc.</comment>


Description and implementation of the core Knuth-Plass line-wrapping algorithm - <AUTHOR> https://github.com/jaroslov/knuth-plass-thoughts/blob/master/plass.md <comment><USER2> There is an interesting blind spot in the article. When the author has two paragraphs shown, one greedy and one Knuth-Plass and declares the second to be "more rectangular" it only looks so because of the colons added to the second to show the ideal length. The differences in the line lengths are actually identical. Measuring from the longest line the greedy is [0,2,3,1,many] where the Knuth-Plass is [2,0,3,1,many].

The author's assertion is true, the example data just doesn't show it although it looks like it does because of the extra marking.

<comment><USER3> Good catch. In fact, it's possible that TeX (and humans) judge the first paragraph as better. Here they are, with colons after each:

        xxxx x xxxx xxxxx xx xx xxxxx x:
        xx xxxxxxx xxxxx xxx xxxx xxx  :
        xxxxx x x xxx xxxx xxx xx xx   :
        xxxxxxx x xxxx xx xxxx xxx xxx :
        xx

        xxxx x xxxx xxxxx xx xx xxxxx  :
        x xx xxxxxxx xxxxx xxx xxxx xxx:
        xxxxx x x xxx xxxx xxx xx xx   :
        xxxxxxx x xxxx xx xxxx xxx xxx :
        xx

Note that in reality the paragraphs will not be typeset as above, but the spaces will be stretched or shrunk so that the lines have identical width.

The reason the first could be judged as better is that TeX has penalties (\adjdemerits) when consecutive lines belong to "incompatible fitness classes" (e.g. very loose lines following very tight lines), so it may be possible that the first paragraph can count as (tight, loose, loose, loose), and the latter as (loose, tight, loose, loose), which is worse.

</comment></comment><comment><USER4> Another implementation people might find interesting is the one in Minikin, the text layout library inside Android. It's all free software. This one has been optimized and tuned fairly carefully.

[https://android.googlesource.com/platform/frameworks/minikin...](https://android.googlesource.com/platform/frameworks/minikin/+/master/libs/minikin/OptimalLineBreaker.cpp)

</comment><comment><USER5> I'm willing to take pull requests if people find issues with the text—I'm not a strong writer.

<comment><USER6> Thanks for the write-up. I think too much about text layout. I know that web browser layout is a crazy mass of constraints, still trying for better implementations.

</comment></comment><comment><USER3> The classic paper in which Knuth and Plass described the algorithm is actually very readable and enjoyable [1] — though it's long (66 pages!), you can just stop at any point and still get a lot of value out of it.

PS: I started collecting a few of the more obscure implementations of TeX here ([https://github.com/tex-other](https://github.com/tex-other)) — please let me know if there are more that I missed (other than the popular ones: pdfTeX/XeTeX/LuaTeX which are in TeX Live / MiKTeX and don't require archival). Among these, there are JavaScript and C implementations of this algorithm.

[1]: [http://eprg.org/G53DOC/pdfs/knuth-plass- breaking.pdf](http://eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf)

</comment><comment><USER7> I wish there were also other attempts to create a paragraph breaking algorithms. For example one, which limits the total amount of white space on a line. Because, if you have a line with many short words on it, and all the glue is max stretched even not exceeding the allowed value, the line looks nevertheless somewhat holey.

<comment><USER3> Avoiding "holey" lines is in fact is what the Knuth-Plass algorithm tries to do, and in general it results in "tighter" (less whitespace) paragraphs than alternative algorithms (those that look at only one line at a time). If you'd like even less space, you can just set a smaller "ideal" width of a space — if you have an example of a paragraph (and font, and line width) for which you think the spacing is not optimal, I can show you what I mean.

<comment><USER8> An example of a paragraph (and font, and line width) for which the spacing is not optimal is trivial: anything done with the Knuth-Plass line-wrapping algorithm.

The trouble here isn't just the design of the algorithm. The specification itself is bad. The moment you start to mess with the kerning (spacing, both between letters and otherwise) specified by the font designer, you've gone wrong. The font ships with correct kerning. That kerning is what the font designed determined would look best and be most readable. Regular letter spacing also helps with readability. Hyphens are also trouble for readability.

<comment><USER3> Perhaps you, and the person I was replying to, are talking about different things. The Knuth–Plass algorithm does _not_ mess with the kerning specified by the font designer. In fact, despite some demand, Knuth never added a feature of letter-spacing into TeX, because all the typographers he spoke to agreed it was a bad idea. (It is now possible to do that, with hacks and with other engines like pdfTeX/XeTeX/LuaTeX, but in any case that's not relevant to the Knuth-Plass algorithm being discussed.)

What the Knuth-Plass algorithm is concerned with is merely where to choose line breaks. For justified paragraphs (as in any competently typeset book you can pick up), the space between words necessarily varies from line to line (barring some staggering coincidence). What the algorithm tries to do is break lines such that this inter-word space is as close as possible to the ideal specified in the font (and to minimize the amount of hyphenation required), and at this it does a better job than other algorithms (those that look at only one line at a time).

See Figure 4 in the paper: [http://www.eprg.org/G53DOC/pdfs/knuth-plass- breaking.pdf#pag...](http://www.eprg.org/G53DOC/pdfs/knuth-plass- breaking.pdf#page=12) (page 1130, the 12th page in the PDF).

<comment><USER9> Justified paragraphs are never justified. Proper typesetting has zero hyphenation and always obeys the inter-word space specified by the font designer.

<comment><USER3> That's an interesting opinion, stated like a fact. :-) I have three responses to that:

1\. The opinion is certainly a radical one, i.e. at odds with almost every typographer. Walk into a library and pick up a random book or magazine (by a good publisher), and you'll almost surely find justified paragraphs. It's only some self-published books or typewriter / computer printouts that tend not to justify. It is an interesting exercise to try to find a physical book (that you have access to) that contains non-justified paragraphs — I looked at 65 books at home (that have paragraphs) and _all_ of them (across multiple languages) use justification. (In the poetry books I had to look at the preface...)

I checked previews online of some books by typographers and font designers, and (of course) they also contain justified paragraphs: Robert Bringhurst's _The Elements of Typographic Style,_ etc. I am aware of Eric Gill's _An Essay on Typography_ that is not, and contains a section called "The Procrustean Bed", and that's about it.

2\. The problem being solved, for which the algorithms are being compared, is how to generate justified paragraphs. The top-level comment (by pgtan@) that started this thread, was also about justified paragraphs (that's what I was pointing out in the comment you replied to). As an analogy, when discussing algorithms for the traveling salesman problem, one can reject the problem by declaring that sales must be done online, which... seems somewhat a change of topic.

3\. Even if what you want is non-justified (ragged-right) paragraphs, you still need to choose line breaks. The choice is not always unique. The Knuth–Plass algorithm covers this case too (with the right choice of penalties and glue), and has something to offer here too. It's in the paper :-) [http://eprg.org/G53DOC/pdfs/knuth-plass- breaking.pdf](http://eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf) (Search for "ragged")

</comment></comment></comment></comment></comment></comment><comment><USER10> This is given as an interview question sometimes, which amazes me because someone spent a lot of effort to invent this within the past 50 years, and now you have to come up with it on the spot in 45 minutes (or more likely, leet code it ahead of time).

<comment><USER11> Well it's possible that it really only took them 45 minutes to come up with the solution and identifying the problem that needed to be solved is what took longer.

</comment></comment><comment><USER12> Wow, I never knew so much thought had been put into line breaking algorithms before!

I wanted to get a simple and fast solution into a one line regex a while back with the simple premise of: breaking on spaces before n chars, i was quite happy with it [1]:

        const wrap = (s) => s.replace(
            /(?![^\n]{1,32}$)([^\n]{1,32})\s/g, '$1\n'
        );

...this looks like a child drawing compared to the article, but then i'm heavily biased towards simplicity over sophistication.

[1] [https://stackoverflow.com/questions/14484787/wrap-text-in- ja...](https://stackoverflow.com/questions/14484787/wrap-text-in- javascript/51506718#51506718)</comment>


Dinosaurs Were Declining Way Before That Pesky Asteroid - <AUTHOR> http://www.theatlantic.com/science/archive/2016/04/the-long-diminuendo-of-the-dinosaurs/478668/?single_page=true <comment><USER2> Is "number of species" really the metric of interest? I'd think that the best metric to measure the success of a clade would be something like "percentage of total biomass". After all, humanity is _one_ species, yet few people would say primates are unsuccessful and in decline because humanity is taking over the globe and causing mass extinctions.</comment>


Tesla factory employees describe grueling work conditions - <AUTHOR> http://www.businessinsider.com/tesla-factory-workers-detail-grueling-conditions-fremont-2017-5 <comment><USER4> That's why workers need a union. If there's an assembly line station that's too hard, that's a union grievance. There's a way to work out a solution, with the worker being in a strong position. Happens all the time in a union plant.

Expecting someone to lift tires overhead for mounting on a production line is way out of date. Here's how it's done in a Ford plant. First, they show the old way, where they had a platform at just the right height to roll the wheel into position. The worker then pushes it onto the lugs and hub. Then, they show the fully robotized operation.[1]

Here's an older, manual system, but with a counterbalanced lifting aid to do the heavy part.[2] Simple setups like that are routine. If anybody is lifting anything heavy on an assembly line, you're doing it wrong. There are many simple ways to fix that. To see tires lifted entirely by hand in an auto plant, you have to go back to this famous Chevy film from 1936.[3] That was before the big GM strike.

Tesla is still learning how to run an auto plant. Tesla isn't as good at this as they pretend to be. Their head count in Fremont is quite high for the number of vehicles produced.

[1] [https://www.youtube.com/watch?v=imnAYcF05Yo](https://www.youtube.com/watch?v=imnAYcF05Yo) [2] [https://www.youtube.com/watch?v=rpeONe1qX-c](https://www.youtube.com/watch?v=rpeONe1qX-c) [3] [https://youtu.be/8bT6txm4RpA?t=1516](https://youtu.be/8bT6txm4RpA?t=1516)

<comment><USER5> While unions are a great thing I wish they they responded and did what they were created to do more efficiently.

More than a few times in the past year (probably 5-10 grivances have been sent in, and nothing has been done to solve the issue. (This is the USPS - not me but a relative)

<comment><USER6> Could a union be run as a direct democracy? Instead of a strike fund just verified segregated savings?

There are much better tools for group discussion and voting.

I feel like most employees would benefit from some form of collective bargaining as most employers present boiler plate agreements where your only choice are yes or no.

Edit: on second thought you'd probably get a lot of protectionist, xenophobic policies. Bye bye h1b, hello arbitrary certification requirements. The incentives of those in the union are for anticompetitive policies. I'm not sure how this can be avoided.

</comment></comment></comment><comment><USER7> I'm a huge Elon Musk fan and I deeply share his vision for getting humans on mars, being more environmentally friendly, etc. However, I'm starting to lose faith in him.

First of all, the guy is stretched way too thin. He runs two huge companies. Now he is starting some other company to be even more distracted. (Boring company)

It sounds like he really pushes his workers way too hard. I wouldn't want to work at one of his companies. Long hours, a lot of stress, and you're underpaid!

He rushes too damn much. I understand wanting to be first and beat the competition, but Telsa is moving way too fast with the Model 3. Rushing this car to production. With software, when has this ever played out well? They are building cars that real people will drive. You can't rush or cut corners with something that will kill people.

I really fear if he doesn't step back and change his ways a bit, he just won't be able to hire and retain the talent needed to change the world.

<comment><USER8> "how do we survive? How do we not die and have everyone lose their jobs?"

Pretty bad thought to entertain at the CEO level. You can justify nearly anything with that basic level.

What happened to Ford's "pay them enough to afford what they make"? Sheesh.

<comment><USER9> >What happened to Ford's "pay them enough to afford what they make"? Sheesh.

Henry Ford didn't do business in a global market where he could shop for labor in China or Mexico. A modern day Henry Ford doesn't need to care whether his employees can afford what they make, when he has the entire world to sell to.

<comment><USER10> You are aware Ford has thousands of employees in Brazil in the 20's and 30's?

<comment><USER9> I was not aware. Guess I stand corrected, then.

I think my general point still stands - a modern business doesn't necessarily benefit from enriching its employees or the community in which it operates.

<comment><USER11> The civility here never fails to disappoint me

<comment><USER12> Huh? Never fails to impress?

</comment></comment></comment></comment></comment></comment></comment><comment><USER13> A consideration when reading this article: the author Julia Carrie Wong was also the author of the Guardian article that posited the low number of females followed by the Twitter accounts of Elon and other tech CEOs like Tim Cook were indicative of their and their company's attitude towards employing females and female perspectives in general [1].

 _The Tesla CEO reacted to the report defensively, accusing the publication of engaging in "phoney PC police axe-grinding". But his choices do provide a certain amount of insight into what he, as an individual, finds interesting, and perhaps it isn't surprising that a leader in an industry notoriously averse to hiring women also appears to be uninterested in the views of women as expressed on Twitter._

[...]

 _So Elon, Tim, Bill, Brian, Eric, et al: here is a list of a few women in or around the tech industry you might want to try following on Twitter. They are not all CEOs, but they are all interesting tweeters who can help make your timeline look a little more like the world outside your companies._

[1] [https://www.theguardian.com/technology/2016/oct/04/twitter-w...](https://www.theguardian.com/technology/2016/oct/04/twitter- women-gender-elon-musk-tim-cook)?

</comment><comment><USER14> Tesla's preemptive response: [https://www.tesla.com/blog/creating-the-safest- car-factory-i...](https://www.tesla.com/blog/creating-the-safest-car-factory- in-the-world)

<comment><USER15> This is spinning so hard that I'm having a hard time reading it.

It sounds like they're increasing efficiency and improving safety but not actually sharing efficiency gains with employees who are being force to work "eager college grad at a startup" hours.

<comment><USER16> If that's true, how has "the average amount of hours worked by production team members dropped to about 42 hours per week"?

<comment><USER17> They introduced a third shift recently, but have been working around the clock since the very beginning. 5 years is way too much time for a management team to notice that working 12x6 with your body is way different than working the same amount of time behind a desk. That's what happens when Silicon Valley ethos meets the real world.

I guess nobody told the nerds that back-breaking work was not really a metaphore in the good old days.

</comment></comment></comment></comment><comment><USER18> > In February, Tesla worker Jose Moran published a blog post that detailed > allegations of mandatory overtime, high rates of injury and low wages at the > factory, and revealed that workers were seeking to unionize with the United > Auto Workers.

This could have a very serious impact on their expenses.

<comment><USER19> Union organizer runs blog claiming work force unhappiness. News at 11.

</comment></comment><comment><USER20> > How do we not die and have everyone lose their jobs?

So he is effectively telling workers that if they do not work until they collapse, not only they will lose their job but all the other workers will as well and that they are responsible for the destruction of Elon's company.

<comment><USER19> How is 42 hours a week working to collapse?

<comment><USER21> 42 hours a week in a physically demanding job is very, very different from 42 hours in a chair.

I did a temp job ages ago at a warehouse for 3 weeks, the first of which I was required to pack and move boxes, 8 hours a day, 5 days a week (2 15 minute breaks and 20 minutes for lunch, complete with a bell telling you when these things were happening). That first week was brutal.

Fortunately at the end of the first week I demonstrated that I was an order of magnitude faster at operating the computer for that packing line than the guy who was running it (also a temp) and I got to stop doing the physical labor so the remaining time was less terrible.

<comment><USER19> We've all had physically demanding jobs. After a few weeks your body would have fully adjusted.

<comment><USER21> And after a decade or two there would be irreversible damage, regardless of how "adjusted" your body was.

</comment></comment></comment></comment></comment><comment><USER22> It is not like the other car companies behave differently.

My father is working on the shop-floor of a large carmaker and they are setting up the line for a new model right now.

Normally, when something happens -- usually "something" is something you puke from and get PTSD from witnessing it -- the whole hall gets a security briefing.

Not now. No time. There is also a lot of pressure to get people working 7 days a week.

Luckily they get a bunch of days off after the new model is going...

<comment><USER23> You're echoing my base question.. as I read this, I was thinking:

"How is this any different than GM?"

One of my best friends worked to open the Saturn plant in Spring Hill - <USER2> after 30 years with GM, his body is worn out and broken from the experience.

The reason factory work has traditionally paid so well is to compensate you for the wear and tear on your body - and to entice people to do a repetitive, boring job.

<comment><USER24> GM's factory workers are represented by a union. That's the difference. If there are abuses, then there is an avenue for redress.

<comment><USER23> Yes, they are, they fought for and won that right for representation, the Tesla workers are welcome to do the same.

However, being unionized is not a forgone conclusion, generally (but not universally) companies EARN a union thru systemic long term mistreatment of employees.

</comment></comment></comment></comment><comment><USER25> Buried lede, from the article:

> The company did release more recent data, which indicates its record of > safety incidents went from slightly above the industry average in late 2016, > to a performance in the first few months of 2017 that was 32% better than > average. The company said that its decision to add a third shift, introduce > a dedicated team of ergonomics experts, and improvements to the factory's > "safety teams" account for the significant reduction in incidents since last > year.

Tesla's safety record is now significantly better than average for the auto industry.

</comment><comment><USER26> I often wonder how factual articles like this are. Under modern labor laws it would be difficult to create the kind of situations described. Especially in California. Unions have been trying infiltrate Tesla for awhile now. They have the most to gain by disseminating false information. On the other hand if the information is factual then Tesla really needs to improve working conditions.

<comment><USER18> > They have the most to gain by disseminating false information.

To be fair, management has just as much to gain by disseminating false information. (That everything is hunky-dory.)

Also, workers trying to organize is not 'infiltration by unions'. It's their lawful right, in a society which allows free association. Management bargains collectively - why can't employees?

<comment><USER26> That's true. An independent investigation is really the only way to know for sure.

<comment><USER18> This will never happen.

More likely, employees will unionize, and come to some agreement with management, or, they will fail to, and anyone attempting to unionize will be fired. (Illegally, but in at-will states, employees have almost zero recourse for that kind of termination.)

<comment><USER27> > More likely, employees will unionize, and come to some agreement with > management, or, they will fail to, and anyone attempting to unionize will be > fired. (Illegally, but in at-will states, employees have almost zero > recourse for that kind of termination.)

Actually, private-sector employees have recourse for that in all states under the federal National Labor Relations Act -- they can file a charge with the NLRB. The NLRB staff are very helpful and understand that most people are not lawyers, so they will even help you draft the charge form and walk you through the process.

</comment></comment></comment></comment></comment><comment><USER28> Sounds the the 'system' is working and things have improved dramatically:

"The company did release more recent data, which indicates its record of safety incidents went from slightly above the industry average in late 2016, to a performance in the first few months of 2017 that was 32% better than average. The company said that its decision to add a third shift, introduce a dedicated team of ergonomics experts, and improvements to the factory's "safety teams" account for the significant reduction in incidents since last year."

Of course the focus of the article is going to be the most inflammatory version possible because that's where the eyeballs come from.

</comment><comment><USER29> So here's the setup:

> _Watch for these articles to downplay or ignore our actual 2017 safety data > and to instead focus on a small number of complaints and anecdotes that are > not representative of what is actually occurring in our factory of over > 10,000 workers._

...and a citation to drive the point of Safety home:

> _In addition, through the end of Q1 2017, the factory's total recordable > incident rate (TRIR), the leading metric for workplace safety, is 4.6, which > is 32% better than the industry average of 6.7._

...and then we get to the whole "Can Elon Musk really scale Tesla to the heights he likes to claim are possible" notion of context:

> _Ford had 50,703 U.S. hourly workers as of Feb. 1, according to a report > from the UAW 's Ford department. A GM spokesman said the company has about > 50,300 U.S. hourly workers._[1]

So a 32% better safety record with 1/5 the workforce. Hm. Got it.

[1] [http://www.autonews.com/article/20150215/OEM/302169970/ford-...](http://www.autonews.com/article/20150215/OEM/302169970/ford- tops-gm-in-u.s.-factory-jobs)

<comment><USER30> TRIR = (Number of OSHA recordable incidents)*200,000 / (total number of hours worked)

It's already normalized for workforce size.

Source: [https://www.csmgroup.com/trir-a-key-safety-performance- indic...](https://www.csmgroup.com/trir-a-key-safety-performance-indicator- you-should-know/)

<comment><USER24> Maybe he's implying that it doesn't scale linearly.

</comment></comment></comment><comment><USER31> Try working in any restaurant for a couple years.

</comment><comment><USER32> > The supervisor came screaming because you guys cant get it done

Every car company ever. A relative works at BMW, one of the "Zeitarbeiter" hired fordisassembly work on a old production line cut the power-cord that supplied the whole new assembly line drive unit in the other part of the hall. Suddenly - lights out (Guy wasn't hurt). Then those faces starting to search for the source. Then the usual choir showing up, including if you delay long enough - factory management. Always the same tune.

Funny thing is also i you get the inter-weeks repair gap time to replace a stations robot. They are still producing at the line going out - when you rip the robot out, and replace it, measuring in, teaching - its all with the big stop-watch in the background.

Program changes are usually prepared ahead of time in this scenario- but when the unexpected hits, you get "Visitors"\- i guess supposed to improve the "productivity" by applying "pressure". Usually you play as a team then, one "Catcher" keeps the "Suits" busy and away from disrupting the guy who has to code as if his life depends on it. My boss would have to tell you more funny storys..

TL,DR; Yes, Tesla makes Cars

<comment><USER33> I put this whole post into Google.com/translate but I'm still completely lost.

<comment><USER32> > The supervisor came screaming because you guys cant get it done

Every car company ever. A relative works at BMW, and had a nice story. One of the "Zeitarbeiter" hired for disassembly-work on a old production line cut the main power-cord - that supplied the new assembly line drive unit in the other part of the hall. Suddenly - lights out (Zeitarbeiter wasn't hurt). Then those faces starting to search for the origin of the trouble. Guys like my brother are called to fix it, the clock starts ticking. If the clock ticks too long the usual choir shows up, including if the delay is long enough - <USER3> management. And they chant exactly what was in the text.

Funny thing is also if you get a task in the inter-production-weeks repair gap. They are still producing at the line going out - while your team rips the robot out, and replaces it, measuring in, teaching and - its all with the big stop-watch in the back of your mind.

Program changes are usually prepared ahead of time in this scenario- but when the unexpected Situation hits, you get a constant stream of "Visitors"\- i guess supposed to improve the "productivity" by applying "pressure". Usually you play as a team then, one "Catcher" keeps the "Suits" busy and away from disrupting the guy who has to code as if his life depends on it. My boss would have to tell you more funny storys..

TL,DR; Yes, Tesla makes Cars

</comment></comment></comment><comment><USER19> I'm not sure how the ambulance count is pertinent in this article. In such a huge workforce you will have events that need ambulances regularly. And sending for one can actually bee a pro-active measure that actual evidences care for their workers. For example if someone has shortness of breath, or faints, etc.

<comment><USER34> Those numbers are also pretty meaningless without a reference.

Having never worked in a 10K+-employee facility, I have no idea how many ambulances should be called per year. I would imagine that with that many people, even under idyllic working conditions, the number of medical emergencies/year would be non-zero, but I'm having trouble picking up an intuitive expectation for what it should be.

<comment><USER35> The "magic number" you are looking for is AFAICT between 0,05 and 0,07, i.e. it is reasonable to expect 5-7 events needing an ambulance intervention every 100 people per year.

Of course this is a reference for general population, and since the workers in a factory are by definition younger and healthier than the average population and hopefully road accidents don't happen in a factory, must be reduced but 1/12 or 1/10 of that wouldn't surprise me, that would be 0.4-0.7/100 per year.

As a reference a minimal requirement for ambulance service (with M.D. on board) here in Italy is to have an ambulance every 60,000 people, that would mean, with 3-4 interventions per 8 hours shift on average (2-3 hours/intervention), 365x3x8/3.5=2,502 interventions per year in theory, reducing this by 10% to consider maintenance, lost/idle time, etc. we have 2,250/60,000=0,0375 or 4 interventions every 100 people, and the number of vehicles roughly doubles considering the "simpler" ambulances without M.D. on board, fulfilling the needs. A reference data point (old) is roughly 4,000,000 interventions in the year 2005 on a population of around 60,000,000, that comes out as 0.66...

So, on a "population" of 10,000 workers 40-50 ambulance calls per year wouldn't be unexpected at all, but it greatly depends on local organization, and on actually _when_ (depending on seriousness of event) the ambulance is called, this may vary with local (state) policies and local-local (industry) ones.

At least here factories of that or comparable size have an internal medical service (and almost completely equipped infirmary) and ambulance for at least first aid/first responder chores and external ambulances are usually called only in the (much more rare) cases when the worker/patient needs to be hospitalized or however transferred to a hospital for further exams or the like.

</comment></comment></comment><comment><USER36> How is that even legal to cut pay from 22 am hour to 10 when you get insured and need to do some lighter work?

</comment><comment><USER36> Tesla already has a quality issues. Pushing your employees to these limits leads to fatigue and loss of quality is guaranteed.

<comment><USER37> Cold. Discompassionate.

</comment></comment><comment><USER38> Just wait until one of us disrupts factories with the gig economy.

</comment><comment><USER39> All those Silicon Valley startup bros would be loving capitalism. It gives you the highest standard of living in history!

<comment><USER17> That's factually correct but, paraphrasing Orwell's Animal Farm, some "yous" are more equal than others.

</comment></comment><comment><AUTHOR> sad

</comment><comment><USER40> Breaking News: some jobs are in fact hard.

</comment><comment><USER41> And this is the guy who ppl compare to the modern age Jesus and applaud him for making the world better place and ecological. Such bs. He's personally responsible for more co2 emissions than millions of other ppl put together. The real heros are the ppl who don't have a car in the first place but use other transportation.

Seriously the only ecological car is the one that isn't built.

</comment><comment> crush-n-spread Well, I am huge fan of Elon and the companies, but I guess that Michael Sanchez's situation of working with his hands above his head all day, resulting in two herniated disks, is really sad. But how else can the work get done?

I guess most people here are going to say that he's pushing his workers too hard, and that they're losing faith. I think it's just much more difficult than people appreciate to build a successful car company, and some people will have their lives spent building it. I think that even if 1 in 100 employees flat out died because of Tesla, the company and Elon should carry on without slowing down anything. It's just too important that we transition out of a carbon economy.

Besides, I don't think conditions are really that bad. This is obviously a smear piece indicated by mentioning the Model X delays in TFA - What does that have to do with workplace injuries? Nothing, but they're trying to bring down Elon and his companies.

Workplace injuries are bad, but Elon is a poppy that's 100 times taller than the rest. I think they're trying to cut him down more than anything. May the old-school unions be perpetually denied any access to his factories.

<comment><USER42> Tesla could design their factory so that people don't have to work with their hands above their head all day. There's a video further up in this thread showing how a production line in a Ford factory where they clearly took care to make the workers handle things right in front of them as much as possible. It just requires you to have the worker's comfort (or, actually, health) in mind when designing the production line. Or if that's not possible, assign shifts so people don't have to work in an unhealthy position for too long. Apparently that didn't happen at Tesla, which I personally think is a fair thing to blame them for.</comment></comment>


Outsource Your Invoice and Get Paid Immediately - <AUTHOR> https://outvoicer.com/designers/

<comment><USER2> This is nothing more than a modern debt-collection agency.

That may not be an entirely bad thing, though. I can just see it getting out of hand if this is not done correctly.

<comment><USER3> Don't be so quick to write it off as just debt collection that could get ugly for your clients.

It's also equivalent to a payday loan with an APR of ~38.7%!

Still, though, for chronically late clients that you want to fire anyway, it might be a great alternative to waiting.

</comment></comment><comment><USER4> I've found it really effective to invent an in-house, debt collection agent. Usually named Boris, Thor or Moose. He contacts late clients directly from our billing dept, and is a little more insistent than I'd been up to that point. Whether the delinquent client takes him more seriously, or just finds the whole process humorous, I don't know, but it works.

</comment><comment><USER5> They're not as bad as the loan sharks at pay day money shops, but 4% commission is still a substantial chunk.</comment>


How to Change a Mind - <AUTHOR> https://forge.medium.com/how-to-change-a-mind-1774681b9369 <comment><USER2> So, it's possible, as long as they come near death? That's good to know, though I'm not sure how applicable it is.

I'm not even really sure if it's entirely correct. We've all seen believers follow cults right into death, and otherwise costing them enormous prices. Once you've bought into the necessity of the belief, even your own life can seem unimportant, especially if they can then tell you that they're offering something more valuable than life.

The way I read this, it sounds as if he'd just gotten bored. Five years without any of the apocalypses coming true don't require any logical leaps or even persuasion. They just get boring: you're not getting what you want out of the cult.

</comment><comment><USER3> Humans are given the ability to lie to themselves as a gift.

If you don't agree with me. I'm sorry to say but you're likely lying to yourself.</comment>


Case study of using follow/like automation & Instagram sponsored ads - <AUTHOR> https://medium.com/@PaulMishin/a-case-study-of-using-instagram-sponsored-ads-to-gain-followers-for-my-public-account-7170a4f77bef <comment><AUTHOR> I found this pretty interesting.</comment>


Expanding MongoDB Atlas Availability on GCP - <AUTHOR> https://cloudplatform.googleblog.com/2018/03/expanding-MongoDB-Atlas-availability-on-GCP.html?linkId=49612463 <comment><USER2> So how do people use that? (I don't work with large databases like this)

Say, a user comes to a website from New York. Does this require me to have a webserver (probably google cloud-something) in New York that connects to this region MongoDB Atlas? Is the data of this user then also available in, say, Hong Kong? Do I need to connect certain region MongoDB's to certain region servers?

<comment><USER3> I can only speak for MongoDB (and I use Atlas extensively), but in your example I would have two connections open to the MongoDB cluster on each web node (no matter where it's deployed). One connection would connect to the primary and handle all writes. The other connection would use the option "readPreference=nearest" which will connect to the geographically closest replica node.

[https://docs.mongodb.com/manual/reference/read- preference/#n...](https://docs.mongodb.com/manual/reference/read- preference/#nearest)

Edit:

Looks like you can also tag the region your nodes are in and specify those tags directly, pretty neat.

[https://docs.mongodb.com/manual/reference/read- preference/#q...](https://docs.mongodb.com/manual/reference/read- preference/#query-from-geographically-distributed-members)

</comment></comment><comment><USER4> Is there a single Amazon or Google server in East Europe?

<comment><USER5> GCP is planning a Finland Region[1], which has direct link to PoPs in Moscow, Warsaw, Kiev and St Petersburg and indirect links to PoPs in Prague, Budapest and Sofia[2].

AWS is planning a Sweden Region[3] with edge locations in Finland, Prague and Warsaw.

[1] [https://cloud.google.com/about/locations/#regions- tab](https://cloud.google.com/about/locations/#regions-tab) [2] [https://cloud.google.com/about/locations/#network- tab](https://cloud.google.com/about/locations/#network-tab) [3] [https://aws.amazon.com/about-aws/global- infrastructure/](https://aws.amazon.com/about-aws/global-infrastructure/)</comment></comment>


FirefoxOS phone developer preview finally on sale - <AUTHOR> http://shop.geeksphone.com

<comment><USER2> In case Google Translate gives a weird translation [edit: and it's not clear the site is down]:

 _> Con el fin de realizar tareas de mantenimiento, nuestra tienda online ha cerrado temporalmente._

For maintenance purposes, our online shop has temporarily been closed.

 _> Pedimos disculpas por las molestias y te pedimos que por favor, lo intentes de nuevo más tarde._

We apologize for the inconvenience and we ask you to please try again later.

\---

Here is the email announcement: [http://www.geeksphone.com/?wysija- page=1&controller=emai...](http://www.geeksphone.com/?wysija- page=1&controller=email&action=view&email_id=3)

What we've all been waiting to know:

      Keon -- All for just €91 plus taxes.
      Peak -- And all for just €149 plus taxes.

\---

Edit: Just realized there is an english version: <http://shop.geeksphone.com/en/></comment>


Show HN: Mental Modelist – App Store for Mental Models - <AUTHOR> http://www.mentalmodelist.com/ <comment><USER2> Would be great if the summaries were actually summaries. I'm guessing this is just a proof of concept though? I like the idea.

<comment><USER3> Agree with this. I like the idea, hope you continue with it.

<comment><AUTHOR> I'll keep at it. Thanks for the feedback!</comment></comment></comment>


Lua pairs() iterator in JavaScript - <AUTHOR> https://p.sicp.me/ij26N.js <comment><AUTHOR> Allow to write k,v lua for loop style in JS with destructuring:

      for(let [k,v] of pairs({a:"1",b:"2"}))
      {
       console.log(k,v);
      }

      for(let [k,v] of pairs(["a","b"]))
      {
       console.log(k,v);
      }</comment>


Is Marriage Outdated? - <AUTHOR> http://www.realtruth.org/articles/110222-002-marriage.html

<comment><USER2> _To enjoy a wonderful, productive and stable marriage, its true beginning must first be considered. Only one reliable account provides the answers—the world's best-selling book of all time, the Bible—which gives a record of when marriage was first instituted.

The first marriage is recorded in the book of Genesis, at the creation of the first two human beings, Adam and Eve._

It's a shame, it had been rather sensible up until that point, and from a different enough perspective that it was worth reading.

<comment><USER3> The about us page (<http://www.realtruth.org/about.html> ):

 _"The Real Truth magazine and The World to Come program are produced by The Restored Church of God. We teach all the true doctrines of God, as taught to Christ's Church by the original apostles, tracing our roots directly to the first-century Church."_

</comment></comment><comment><USER3> I disagree with the fundamental premise of this post.

90% of restaurants fail w/in the first year. Does that mean starting a restaurant is a bad idea? What about creating a startup?

People should think about the consequences of the commitments they make. But even then, things happen in the lives of two people that can drive a wedge between them. The fact that, in such an event, they are _allowed_ to get divorced, rather than forcing them to remain in a loveless, or abusive, or otherwise dysfunctional marriage is not a bad thing.

The whole "THINK OF THE CHILDREN" of broken homes issue is a more complicated matter. How about we start teaching teenagers that having kids is a huge responsibility and that it's really important to use birth control and condoms to keep from getting pregnant?

Or, i suppose, we could just force all the people involved in teen pregnancies to get married. yeah. i'm sure that'd work better.

</comment><comment><USER4> That '50%' figure widely stated was only a brief spike that occurred when laws & society changed, making it easier to obtain them. For marriages consummated this year, the number is under 1/3. If you're both above the age of 25 for your first marriage, the number drops to 1/5.</comment>


Meebo Talks Monetization: Introduces Ads from VideoEgg - <AUTHOR> http://www.readwriteweb.com/archives/meebo_talks_monetization.php

<comment><USER2> I guess this is better than:

-Acquire gobs of users

-???

-Profit!</comment>


Measuring - <AUTHOR> http://dilbert.com/blog/entry/measuring/ <comment><USER2> If anyone doesn't know, wattvision is a YC startup.

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

</comment><comment><USER3> _I think that government in particular needs to provide a web-based dashboard of stats to its citizens so we can see how the country is doing._

This is a great idea and should be easy to implement. A lot of data is already collected by the gov. Perhaps the gov 2.0 project might make this one step closer to reality.

<comment><USER4> The stats the government already provides are baked to hell, and manipulated to suit the political cycle. It's a stupid idea.

The government shouldn't even be in the measurement and statistics business. We need a census and that's about it. Why should the government calculate GDP and so on? Competing private estimations provide greater depth already.</comment></comment>


The Perils of Sample Code - <AUTHOR> http://donniefitz2.wordpress.com/2011/05/09/the-perils-of-sample-code/

<comment><USER2> I think Sample code has its value. It helps you learn stuff rather quickly. Just because some people push sample code to production does not justify not providing/ using sample code in the first place. But to agree with you, thanks for spotting the perils of sample code. I guess it can be used as a gentle reminder to every one using sample code...

</comment><comment><AUTHOR> Yeah, I understand that tutorials are usually written with the focus on one thing but pointing people to even a link for security or unit testing techniques would be helpful.</comment>