French Startups to Look Out For - <AUTHOR> http://rerral.com/six-french-startups/ <comment><USER3> Capitaine Train is super useful. The official SNCF (French State owned railways company) site is unusable and tries to upsell you everything but the actual tickets. Capitaine Train has a minimalistic design, fast search and has niceties like .ics to remind you of what you bought.

(I'm in no way affiliated to Capitaine Train)

<comment><USER4> Yeah, I always wondered how this could be. Capitaine Train is making money just selling train tickets, without any kind of ad at any point of the process, and that's their only revenue.

On the other hand, we have the official SNCF website, which doesn't even have to be financially successful itself (since SNCF already makes money on the ticket itself), but is littered with ads, slow, ugly and unhelpful. And even PDF train tickets come with half an A4-page worth of ads.

How can this be possible?

EDIT: just looked at the train ticket I printed today, well ok, I was wrong, there is no ad on it anymore, but I'm sure there was at some point.

<comment><USER5> You're assuming voyages-sncf == SNCF which is not the case. It's a travel agency whose shareholders are SNCF and Expedia. So they are a private company that have a preferential treatment for which they been condemned once IIRC (not that it changed anything ...).

<comment><USER6> You're wrong. Expedia has no longer Voyages-SNCF.com parts since this "alliance" was condamned by French Autorité de la Concurrence (anti-trust autority).

Nowadays, the only Voyages-SNCF.com shareholder is Groupe SNCF.

<comment><USER5> I can find references to a fines but nothing about Expedia leaving Voyages- sncf.com capital. Really curious about it, could you point me to some reference ?

</comment></comment></comment></comment></comment><comment><USER7> I "only" knew Capitaine Train, Lima and Bunkr.

I would recommend you to check [https://sketchfab.com](https://sketchfab.com) and [https://en.mention.net](https://en.mention.net)

<comment><USER8> i would also recommend [http://pixfirst.com](http://pixfirst.com) awesome SaaS for photographers it helps photographers sell photos online, they store photos for and you set the price, sends email to client once photos uploaded, you can tag photos and create albums out of those tags so people only see their photos, it is a really interesting startup.

</comment></comment><comment><USER9> I feel like youmood.me (lets you comment on any webpage) has been tried and failed 100 times already. Am I just not remembering things?

<comment><USER10> Maybe they'll get it right.

Tablets were a chronic flop until the iPad came around.

</comment></comment><comment><USER11> I think that despite the clichés in France (as anywhere else too) there always will be peoples that will try to do new things, different things, by themselves without relying on the old structures, even if they may be a minority. When I'm the most proud it's when I complete a project I set to do by myself even if it's small or if it fails. I literally live for these moments.

</comment><comment><USER12> Another worthy mention would be Affilae (a 100% pure bootstrapped startup - <USER2> incubators, no accelerators, no funds raised and yet already profitable). It's B2B and not B2C though so perhaps not usually featured on these types of lists. ;)

[https://affilae.com](https://affilae.com)

It's a white-label SaaS affiliate and performance marketing platform providing tracking, attribution and analytics for running performance marketing networks and campaigns in-house.

</comment><comment><USER13> I love seeing posts like these! Allez les français!!

</comment><comment><USER14> Should probably include zengularity.com, the creators of the Play! framework.

Not sure if they qualify as a startup; at a minimum they're a highly successful French development team, perhaps the most successful in France (LinkedIn just contracted with them on a major project, for example).

Lot of bright cats on their team based on what I saw at scala.io conference in Paris.

<comment><USER15> > perhaps the most successful in France

Mh, I really don't want to undermine their work, but what about Dailymotion, or Deezer for instance? That's just two _web_ -companies. If I broaden to development teams, France have several companies with teams who develop the lead product in their field worldwide.

<comment><USER14> Yeah, I have no idea, thus the _perhaps_ bit -- these guys are rolling in big time projects regardless, definitely on the rise.

</comment></comment></comment><comment><USER16> It would be nice to have a per-country map of recent startups/initiatives like these.

</comment><comment><USER17> Not in that list, but I think Smartmeup is quite interesting too: [http://www.smartmeup.org/index.php?skip=1](http://www.smartmeup.org/index.php?skip=1)

Machine Learning + Realtime face recognition

</comment><comment><USER18> Both my co-founders are French. We are working to help venues aggregate, curate, and display social media captured at their events. [http://wesawit.com](http://wesawit.com)

</comment><comment><USER19> Dunno if French guys based in New York count, but Placemeter are awesome. So many things they could do with the technology.

</comment><comment><USER20> This is awesome! I'd love to work in France, it just seems there are a dearth of tech companies there.

<comment><USER21> It's easy to find work as a software engineer in France, but it's typically in contracting agencies or large companies. There is a dearth of tech startups for sure.

<comment><USER22> This is most likely due to the high taxes and regulations required for companies there. General employment rules are pretty strict as well.

</comment></comment></comment><comment><USER23> From Belgium: [http://www.famest.com/](http://www.famest.com/)

</comment><comment><USER24> I interpreted the title as "French Startups to avoid."</comment>


Dev-to-dev interviews for senior level positions at high profile organizations  - <AUTHOR>

Background: I'm a proficient programmer with extensive experience in my chosen ecosystem. I'm a hard worker, loyal, have a good work history, and can communicate well with others. I don't even have any problem getting work per se, I've turned down a few offers in the past months because it's not exactly what I want.
So, I'm ok with the idea that finding the right job will take time, but I've been at this for several months and I've done enough interviews that I feel like I'm seeing a quite-distressing pattern forming: specifically in my dev-to-dev interviews for senior level high-profile positions the person interviewing me acts in ways that are consistent with acting/feeling threatened, which in turn manifests itself as them actively/openly undermining and discrediting my qualifications and/or my work experience. My best guesses as to why these other developers are acting/feeling threatened come down to:
1. Because I am older than them (I'm 40)
2. Because they do not have as much experience as myself in an area, and somehow admitting this to themselves, which is not a big deal to me (it's not like I rub it in), would be a very big deal to them
3. Because they have to be the smartest person in the room and cannot abide someone else being equal and/or superior in any fashion
I don't understand the full extent of why this keeps happening, and even less sure what to do about it. I don't feel like I've  been doing anything special to "deserve" this type of treatment, and imagine that it's pretty common stuff to have to deal with for anyone interviewing for these type of positions. I'm just hoping to find some answers on how to overcome this obstacle and get a good job at a good organization. <comment><USER3> >specifically in my dev-to-dev interviews for senior level high-profile positions the person interviewing me acts in ways that are consistent with acting/feeling threatened

If a person is hostile or fearful, that tends to make the person he is talking to hostile of fearful, so one possibility is that one of these "negative" emotions is "leaking out" through your body language or tone of voice. For example, if you are tall, make sure you are not hovering or looming over the person to whom you are talking.

I know this is basic stuff, but heck, I spent a long time neglecting to pay attention to it, so I am putting it out there.

Good luck!

<comment><AUTHOR> That's a good thought. I don't think I felt/acted very hostile or fearful during the interview, but it's probably worth reconsidering..

</comment></comment><comment><USER4> dye your hair?

<comment><AUTHOR> 1\. I'm only 40, not 80! ;) 2. These are actually remote interviews.

<comment><USER4> I'll just say at 40 there are situations where I dye my hair.

I'm at the "salt and pepper" stage, and it doesn't look bad but certainly if you show up in a high pressure situation people will have a better impression of you.

Since I go heads down for months at a time and only get a haircut when I'm going on tour for some reason, it's pretty cost effective.

If this is really an issue of phone interviews if you contact me I can do a 10 minute mock interview and try to diagnose any communications you have that could be offputting to people.

<comment><AUTHOR> I probably have a few years until I have to start dying it for anything, but I guess I could see where that would make sense eventually. Thanks the ideas - <USER2> think with the suggestions here that it might be enough to get me started on trying to redefine these interviews in the future.</comment></comment></comment></comment>


Ken's Street Fighter II with animated sprites - <AUTHOR> http://codepen.io/jkneb/pen/smtHA

<comment><USER2> I've never been an HN naysayer before...

But this is just a trivial collection of CSS sprites and JavaScript. It isn't really CSS3 at all, or any different from what's been done a million times before. It just uses CSS animation instead of JavaScript for cycling through sprites, that's it.

<comment><USER3> Neverthless I still find it pretty impressive!

</comment></comment><comment><USER4> Incredible! Here is more info as to how the author did this: [http://front- back.com/2013/01/animate-png-sprites-with-css3-...](http://front- back.com/2013/01/animate-png-sprites-with-css3-animations)

<comment><USER5> Very nice (simple!) demo of using css keyframe animation of a sprite.

</comment></comment><comment><USER6> My favorite part: If you execute a hadouken followed by a shoryuken or jump, the fireball moves up and down as Ken goes up and down.

That would make for some awesome shenanigans if Ken had an opponent.

edit: Kneel+walk also provide some interesting turtling possibilities too.

<comment><USER7> Yeah, I coded something similar recently. Author should lock input while animating an action, or interrupt an action with a new one if necessary.

</comment></comment><comment><USER8> >This Site Totally Doesn't Work Without JavaScript.

>Like, at all. Sorry. If you enable it and reload this page you'll be good to go. Need to know how? Go here.

Finally, an honest no-js message.

</comment><comment><USER9> I don't know if everyone but me knew about Codepen before but I've found more impressive the fact that I can change any aspect of the work instantly than the animation itself.

</comment><comment><USER10> Doesn't work on Chrome Version 24.0.1312.57 m (Win 7)

EDIT: Works now, found out the pngs were being blocked on my network...

<comment><USER11> Hmm, works for me (Chrome 24.0.1312.57 m Win 7).

</comment></comment><comment><USER12> Now I can finally do all the special moves whenever I want! FINALLY!

</comment><comment><USER13> Not just CSS3, but still very fun.

</comment><comment><USER14> CVC seems broken. It returns true when I entered the wrong number.</comment>


What a programmer does for a living - <AUTHOR> http://jacquesmattheij.com/what+a+programmer+does+for+a+living

<comment><USER2> I've actually used a "PB&J" exercise like this to teach HS kids from my hometown that took a computer engineering lab.

The class would start. I'd have a whole loaf of wonder bread, a pack of plasticware, pb, jelly, and paper plate.

"OK, who wants to tell me how to make PB&J"

The first kid will inevitably say something like "Put the PB on the bread." So I place the jar of PB on the closed loaf of bread. They laugh. Then they start to get it. But even then, it takes time before they break it down into "atomic" steps that I can actually interpret.

<comment><USER3> The thing that hangs me up with exercises like this is how to communicate _how_ atomic the steps ought to be. The analogy misses, there. Why does the 'system' need to be told to open the jar, but not _how_ to open the jar?

<comment><USER2> Actually when they say "Open the jar" i start beating it against the table. But yeah, most the exercise is figuring out the granularity. After they get the idea, it's quick work to give me the steps.

I've been thinking up a similar exercise, for later in the course, for concurrency. EG you can have one student get a piece of bread and apply jam, another to apply the PB, etc etc.

The best part about food-based analogies is that everybody can enjoy them and relate and they all get to snack afterward while i give a brief lecture tying the example into the coursework.

</comment></comment></comment><comment><USER4> This is something I've been thinking about lately; what I actually _do_ , and I think I've sort of figured it out

First up, I'm not really a very good programmer. I'm ok, I enjoy it and I have enough skill to get by. What I _am_ good at though, is being able to understand what people want. My ability, and the bulk of my income, comes from being able to take someone's vague fuzzy idea/business rules (rules? huh! business cotton wool more like it) and flesh them out and bring them to life.

I think my most important role is not the technical stuff, but rather being able to listen and to understand and to really try and grok what the other person's telling you.

<comment><USER5> Yeah, this is a fallacy many people hold. We are not here to "write programs". We are here to solve people's problems, a program is just a means to do that. That's what you're really measured on, how many and how difficult the problems you solve are. If you can solve a problem not with code but wth say updating the documentation, or running a training class, then as a programmer that's the right thing to do.

<comment><USER6> It can actually hurt if you're really good at or really like programming because it can sometimes lead to unnecessary programming. A common example of this is writing a small script to automate something that would have actually taken less time to just perform manually the one or two times you have to do it.

<comment><USER7> Agreed, except you need the wisdom to know when you truly will never ever have to do that task again (nor anyone else) vs when you think you only need to do it once. There's value in having something scripted that you end up needing to come back to months later. I also know I would have preferred setup steps to be scripted on projects I've taken over, vs apparently just hand-entering SQL.

</comment></comment></comment></comment><comment> space-monkey Programming is not tedious, and it _is_ hard. Listing instructions for the computer to follow is only 10% of the job. Most of the job is figuring out how to deal with complexity in a way that is economical, maintainable, and satisfies secondary requirements like security and performance.

In any system design involving software, the software is where the complexity goes. To save money, you might replace an electronic component with an algorithm. To make a better product you might replace a tedious user action with an automated system. This is because (some!) software developers/programmers have tools for dealing with complexity. Things like abstraction and re-use that _don't_ trivially map to the concrete world.

Frankly if software were about enumerating steps, I would have been out of this business long long ago.

<comment><USER8> As I've always said, coding is easy, analyzing is hard.

</comment></comment><comment><USER9> This is "what an applications programmer does for a living". Its a series of steps to accomplish a domain-specific task. Which is fine, that's what almost all programmers do.

Other developers (e.g. systems programmers, common library developers, device driver hacks) do something almost completely unrelated. They look for nuggets of functionality that can be used by applications. Like "make a list of things to do, then execute them in order". Or "accept instructions from a program, but authenticate the source". Or "make a concordance of all the terms in a problem space, for use by other code".

And making these pieces is also not at all like the process described. Its more like "look through endless manuals for ill-described OS features and diddle with them black-box style until you find out how they really work, then stitch them together. Test for time-domain anomalies (internal object lifetime; task termination order etc) and prove you have covered all the bases. Try to make it idiot-proof. Create a document that describes how to use your invention, using analogies and examples because few will have the attention span/willingness to actually delve into it.

<comment><USER10> You forgot:

Secretly plot the torture and murder of the web guy who redesigned the login page and got piles of credit while your widget gets a perfunctory "ok" from management. Despite the login page having no effect and your widget saving the company thousands of dollars.

</comment></comment><comment><USER11> This is a good first approximation of what programmers do all day, although actually programming a coffe-making robot to operate in a kitchen is considerably harder--it involves solving a large number of vision and mechanical problems, not all of which we understand.

That said, much of the expertise of a professional programmer involves _big_ programs, and how to keep them from turning into unmanageable hairballs. This is where, say, engineers who know how to program generally have trouble.

Still, as a first approximation, this analogy is rather decent.

</comment><comment><USER12> "All the components of what a programmer does for a living are represented here."

I think this only captures a part of what programmers do for a living and I think it's the easier and often more boring part: writing out the modules once you know what the modules are. Granted, while you're doing this, you might come across some interesting challenges, but the most exciting part of being a programmer (at least to me) is when you have some broad goal in the distance and no idea how to get there.

A more fitting parallel would be getting a big pile or random things and being asked to use it to produce a liquid that wakes you up inside some kind of receptacle with extra credit for improved taste.

</comment><comment><USER13> This is hardly what we do for a living. I think it's a bad analogy and doesn't apply to "what we do for a living". It could apply as an introduction to "what programing is (roughly) like".

What we do for a living varies depending on .. well, what we do. Some people design and implement products, some people make iterative/small changes in the design and implementation of an already existing product, some people just turn specs into a functioning program. etc.

</comment><comment><USER14> I noticed that in the beginning of the article, he uses the I-want-to-sound- like-computer English, eg "place cup on hallway table" and "pick up coffee pot". Towards the end, he becomes more effusive, and friendly to his articles, eg "hold the kettle with the spout over the coffee filter". This inconsistency is a clue that he didn't take time to try to step back and see it as a whole. Perhaps he should have imagined a nagging mother-in-law telling him how to do this ("and don't spill any coffee grounds on my clean counter, and don't forget to turn off the stove when you're done I don't want my house burned down just because you want to pretend to be a pioneer.").

Also, "define such-and-such" is computerese, not really how one would express this in English. Something like "when I say such-and-such, what I mean is do these things in order..." or "this is how you such-and-such" might be better.

All-in-all, though, an interesting exercise.

</comment><comment><USER15> I've been toying with a new (AFAIK) conceptualization of programming. So far i've got, "programming essentially consists of N things. First of N is 'connecting.' "

I don't know how many N there should be or what the other essentials should be (could be 'iterating', 'transforming' or 'recurring' but i'm still thinking about them). But I'm fairly sure about the 'connecting' one - it refers to that part of writing a program where you need to set up a connection to a database, or an Ajax request, or whatever. Usually involves knowing some amount of protocol, which isn't particularly complex but can be quite 'bitty'. It's not one of the better parts of programming, it's usually a pain, but it helps to recognize it. Also highlights that although one particular problem may have been solved millions of times, for each individual programmer it can still be a hassle. It's not all 'plug&play' ... more like 'splice&pray'.

</comment><comment><USER16> I think that this would be an awesome game-like approach for teaching the basics of programming to a small kid.

</comment><comment><USER17> The problem I have with programming is knowing the actual code formalities and rules (akin to the grammar and spelling rules of the English language). I usually don't have a problem solving the problem or outlining an algorithm, but when it comes down to actually coding it out and making the code compile without grammar bugs, I run into problems. I can read code just fine (akin to reading a language being easier than writing in a language) but writing it with the correct rules and vocabulary is a whole other issue. I guess I should just do it with a "dictionary" in hand..wish there there were programming translators :)

</comment><comment><USER18> The coffee-making analogy is roughly correct when you're talking about green- field work (starting a project from scratch). However, all projects very quickly turn into debugging exercises and yak-shaving adventures to solve problems associated with whatever framework one is using.

I'd say programming is something like:

10% coffee-making (like the OP described-- blank sheet creation) 30% Yak- shaving (crazy yet related sub-tasks) 30% Detective work (debugging) 30% other.

</comment><comment><USER19> This article just now taught me how to make coffee.

</comment><comment><USER20> If you really want to teach them what programmers do these days I think you need to start with the API that is available so they know the resolution they need to reach to make something that works. Maybe introduce that API after they realize how far down the rabbit hole they have to go to explain the operations required.

</comment><comment><USER21> Entirely missing is any notion of system modelling. Yes, at some point we actually have to give the computer detailed instructions, but what instructions? To do what, exactly?

Seeing programming as essentially making really detailed lists of instructions for boring tasks is pretty limited.

</comment><comment><USER22> Aren't programmers more likely to search for relevant libraries for coffee- making and stitch them together?

<comment><USER23> Not necessarily. Some of us are paid to write those libraries :-)

</comment></comment><comment><USER24> A developer communicates, like this blog entry communicated. The actual contents of the blog is somewhat irrelevant.

<comment><USER25> As I said yesterday on another similar comment, you do want to keep the concept of "coding" in there somewhere. After all, executives, marketers, sales of all kind including the kids taking your order at McDonalds, and the secretary taking the phone calls all communicate so therefore they are programmers. That dilutes the term into uselessness.

(And let's skip the hypothetical where maybe they've got some package that allows automation; then, yes, when using it they are acting as programmers. Labels are always fuzzy. Nevertheless, they convey real information despite that fuzziness. Deliberately fuzzing up a definition to try to win a point on the internet is a terrible thing to do to a word.)

</comment></comment><comment><USER26> I wonder if making trivial tasks look monumental really makes people more interested in programming.

<comment><USER21> I can say without a doubt that reading this article (if I let her) would make my wife look at me more strangely, not less.</comment></comment>


Practical Proofs: Proof Approximations for Practical Code - <AUTHOR> http://www.zerobugsandprogramfaster.net/essays/6.html <comment><USER2> Bravo to Ms Thomson for championing this kind of thinking. I also like her choice of languages -- m4!

Still I wish the write-up spelled out her thinking more. I _think_ her two examples are supposed to be positive here-is-how-you do it cases. But then she immeditaely says they could be better, and even points out a serious problem with the second example.

The biggest thing though is culture and process: it's great to have style for leaving comments to your co-workers about restrictions and guarantees. But in the wrong work environment, those comments will be ignored. What I want to know is how to build the right environment.

<comment><USER3> We are all born not knowing how to program.

We were all lousy programmers at one time.

We can all learn to do better. Teach your coworkers.

<comment><USER2> All of my co-workers are good programmers. But some are good programmers who care about invariants and others are good programmers who will trample invariants to get this week's feature done.

I think it is really a matter of process. E.g. code reviews. But I don't yet know how to strike the balance between rigour and efficiency.

<comment><USER3> _others are good programmers who will trample invariants to get this week 's feature done._

That doesn't sound like good programmers tbh

</comment></comment></comment></comment><comment><USER4> This is what objects were supposed to be for. When you have some consistency requirement between some variables, you make them private to an object and only export methods which maintain that consistency requirement.

Somehow this seems to have been lost.

<comment><USER5> Objects coupled with formal proofs, maybe.

Otherwise, nothing has been lost: naïve approach to objects seems to work well for managing memory and garbage collection, otherwise it's just a bothering implementation detail of a language runtime, that does not help a programmer much and is itself a liability.

Objects do dynamic checks at runtime, whereas types are known (and verified) before a program is executed.

</comment></comment><comment><USER6> Has anyone read the actual book mentioned in the blog? Opinions?

</comment><comment><USER7> So... what would an example informal proof look like?

</comment><comment><USER8> [https://i.imgur.com/NKtEfpY.png](https://i.imgur.com/NKtEfpY.png)

<comment><USER3> Which browser?

<comment><USER8> Latest firefox, ubuntu

<comment><USER3> Thanks, really.

<comment><USER8> Fix confirmed :)</comment></comment></comment></comment></comment>


Rebuilding My Brain in 2017 - <AUTHOR> http://jordankoschei.com/2017/02/01/rebuilding-my-brain/ <comment><USER2> It sounds a little extreme. To quote South Park: "All or nothing is easy. But [...] a little bit, responsibly, that's disclipine". That said, reading books (and writing on paper for that matter) definitely seems to have a more positive effect on the brain than what you call "shallow media".

</comment><comment><USER3> Just consume less TV and internet. Go out and meet people. Do some gardening or other creative outdoor activity. Walk in nature.</comment>


Have We Been Interpreting Quantum Mechanics Wrong This Whole Time? - <AUTHOR> http://www.wired.com/2014/06/the-new-quantum-reality/

<comment><USER2> Reminded me of the discussion about "The 'underlying' unity of nature" in the Feynman Lectures on Physics: [http://www.feynmanlectures.caltech.edu/II_12.html#Ch12-S7](http://www.feynmanlectures.caltech.edu/II_12.html#Ch12-S7)</comment>


Alphabet's Verily is working on health-tracking shoes - <AUTHOR> https://www.cnbc.com/2019/02/01/alphabet-verily-built-health-tracking-shoes-prototype.html <comment><USER2> They should team up with Nike, and put these on their self-lacing shoes. A techwear wet dream that I guarantee every software engineer in the Bay Area would buy haha.

<comment><USER3> Nike is working on shoes connecting via an app already

"Shoes in our Nike Adapt platform [...] can update and evolve after purchase, letting consumers opt in to provide you with new services and features through smartphone-like technology.

In other words, we've finally added firmware to footwear, letting us continuously improve the product you've already bought, responding as need be to changing preferences and environments.

What's more, you don't just connect with footwear through Nike Adapt. You connect with Nike."

[https://news.nike.com/news/michael-donaghu-nike-adapt- bb](https://news.nike.com/news/michael-donaghu-nike-adapt-bb)</comment></comment>


Every hour of TV watched after age 25 reduces life expectancy by 22 minutes - <AUTHOR> http://bjsm.bmj.com/content/early/2011/08/01/bjsm.2011.085662.short?rss=1

<comment><USER2> Junk

 _Results The amount of TV viewed in Australia in 2008 reduced life expectancy at birth by 1.8 years (95% uncertainty interval (UI): 8.4 days to 3.7 years) for men and 1.5 years (95% UI: 6.8 days to 3.1 years) for women. Compared with persons who watch no TV, those who spend a lifetime average of 6 h/day watching TV can expect to live 4.8 years (95% UI: 11 days to 10.4 years) less. On average, every single hour of TV viewed after the age of 25 reduces the viewer's life expectancy by 21.8 (95% UI: 0.3–44.7) min. This study is limited by the low precision with which the relationship between TV viewing time and mortality is currently known._

...I'm pretty sure the problem is spending 6 hours a day lying on a couch, not watching TV in particular.</comment>


Taking a stand against unofficial Ubuntu images - <AUTHOR> https://insights.ubuntu.com/2016/12/01/taking-a-stand-against-unstable-risky-unofficial-ubuntu-images/ <comment><AUTHOR> Could it be OVH?

OVH founder on June 19 2016 "@ubuntu asks us to bill you 1e-2e per month for each VPS/PCI/PCC/SD. If not, prohibition to use the mark "Ubuntu" on our website."

We had a story about this [https://news.ycombinator.com/item?id=11934459](https://news.ycombinator.com/item?id=11934459)

</comment><comment><USER2> I am not sure how I feel about this.

On the one hand, this would theoretically guarantee a minimum user experience. Which is nice. And a lot of those changes sound stupid and dangerous.

On the other hand, many of these changes may be with the intent of providing a better user experience as the goal of the provider is a sandbox or a temporary resource where security and updates are less of a concern.

But mostly, this fills me with concern over what this means for Ubuntu. It is clear that this is about ensuring a strong brand, and I am not sure why they would need that now. Is it just concern over other distros (like Mint) accomplishing what they spent decades trying (being a desktop Linux worth using for sane people)? Are they losing out on the server-space too now? Or are we looking at something else?</comment>


The Infinitely Zooming Image - <AUTHOR> https://zoomquilt.org/ <comment><USER2> If you are the author, you should use requestAnimationFrame instead of a setTimeout. It will run a lot better on all devices.

[https://developer.mozilla.org/en- US/docs/Web/API/window/requ...](https://developer.mozilla.org/en- US/docs/Web/API/window/requestAnimationFrame)</comment>


Nastiest Python list comprehension ever - cool-RR http://blog.garlicsim.org/post/3504711416/nastiest-python-list-comprehension-ever <comment><AUTHOR>
        >>> def mystery(n):

It's a buggy implementation of primes_below(n) through a sieve.

"There should be one - and preferably only one - obvious way to do it." And this ain't it.

</comment><comment><USER2> > Does anyone have a suggestion on how to do it?

Yes, provide more details so I don't have to spend twenty minutes figuring out what it does.

(Going by my three-second-look gut feeling: It's the Sieve of Eratosthenes)

<comment><USER3> Yes, but I could not understand why one needs

      list(range(n)) as opposed to range(n)

and why the double indexing of a in

      i in a[:][2:] if a[i] == i].

Am I missing something ? I think it would work without those.

Edit: Yo La Tengo. Deviousness aside the code is quite nice. It would be fun to optimize it but without breaking its spirit.

<comment><USER2> list(range(n)) is probably because the author was using Python 3, in which range() returns an iterator (think xrange in 2.x). The double indexing is probably because a[:] returns a copy of a and the author doesn't want to iterate over the modified array, since he modifies it down the line (although the [2:] would copy it too, so no idea).

An alternative to a[:][2:] would just be range(2, n), but the author clearly doesn't want it to be readable.

</comment></comment></comment><comment><USER4> Can somebody from the Perl community please but this guy in the right place by supplying a one-liner Perl golf quadruple map call?

<comment><USER5> You mean like this implementation of the Sieve of Eratosthenes?

      sub sieve3 {
          grep{@_[map$a*$_,$_..@_/($a=$_)]=0if$_[$_]>1}@_=0..pop
      }

I shamelessly stole that from <http://www.perlmonks.org/index.pl/?node_id=81769>. If you just want a short solution, but don't care about the algorithm, then the following works:

      sub sieve {
          sub p{$_[0],@_>1?p(grep$_%$_[0],@_):1}p 2..pop
      }

See <http://www.perlmonks.org/index.pl/?node_id=81771> for the original.

<comment><USER2> Are you sure that's Perl? Are you sure it's not... nothing?

Seriously, I cannot fathom _why_ this would work, let alone how. The syntax is completely alien to me.

<comment><USER6> Add some spaces:

        sub sieve {
            sub p {
               $_[0] , @_>1 ? p(grep$_%$_[0],@_) : 1;
            }
            p(2..pop)
        }

And if you get rid of some terse syntax:

        sub p {
            my ($first, @rest) = @_;
            if (@rest > 1){
                return $first, p(grep { $_ % $first } @rest);
            }
            return 1;
        }

        sub sieve {
            my $arg = shift;
            return p(2..$arg)
        }

BTW, you can even have Perl do this automatically for you, by running:

        $ perl -MO=Deparse
        <paste in the code>
        sub p {
            $_[0], @_ > 1 ? p(grep(($_ % $_[0]), @_)) : 1;
        }
        sub sieve {
            p 2 .. pop @_;
        }

But honestly, the first program is not incomprehensible if you've ever programmed in Perl. Sure, it ain't literate programming, but it also isn't beyond understanding if you have three minutes to spend on it.

It's an amusement, not your payroll system, after all.

<comment><USER2> Thanks, I have indeed never programmed in perl and was feeling a bit facetious.

</comment></comment></comment></comment></comment><comment><USER7> I think it's a testimony to the readability of Python that I've never even programed in the language, nor am I familiar with the finer points of the list syntax (a[::2]?!), and yet this mucked up piece of shit nonetheless gave me the first impression of a prime number sieve. I actually still don't understand how the sieve works, but it somehow just _looks like one_. Or is it just the case that assuming every obfuscated loop is a prime number sieve is disproportionately likely to be true?

</comment><comment><USER8> Does that even run? :)

Nested comprehensions are one of the things I hate about Python actually. The functions in itertools are so much clearer. I can't really think of a good reason to use nested comprehensions... they become unreadable really fast!

<comment> cool-RR The nesting of list comprehension is just an aperitif in this function.

</comment></comment><comment><USER9> Corrected version:

        def mystery(n):
             a = list(range(n))
             return [[i for a[::i] in [([0]*n)[::i]]][0] for
                 i in a[2:] if a[i]]

</comment><comment><USER10> Isn't the point of a list comprehension - comprehension?

(It's a paraphrase of something Feynman once said to Murray Gell-Mann.)

</comment><comment><USER11> Wow. I hadn't realized that syntax like "for a[::i] in" is valid Python. Attribute assignment (for x.foo in) seem to work too. I'm not sure if there will ever be any reason to use those in real code, but it's nice trivia to know for Python golfing.

</comment><comment><USER12> This is why moving away from higher order functions and towards list comprehensions is a mistake.

Bad BDFL, bad!

<comment><USER13> What, you mean because HOFs can't be tortured into unreadability?

Readability requires that the programmer conspires with both the language and the reader. Unreadable code can be written in any style, any paradigm and any language. Sometimes it doesn't even take effort, talent or skill.

</comment></comment><comment><USER14> My favorite to date is:

bps = [map(int, bps.split('/')) if isinstance(bps, str) else bps for bps in bps if bps]

The clause "else bps for bps in bps if bps" made me incredibly incredibly happy.</comment>


Apply HN: Slate – Tech Stack for Restaurants - <AUTHOR> We are on a mission to technologically equip restaurants that will help them at each stage of interaction with customers, from acquisition to a delightful dining experience and finally customer retention & relationship management.
With the increase of internet based Food & Beverages businesses traditional restaurants are lag behind in technology and therefore lose on customers who are becoming increasingly becoming tech savvy. This is especially true in India, our target market.
We realise that  needs of a club-cum-brewery can be very different from a small time pizza shop. Therefore our product is designed in a way that can easily adapt to varying needs of different businesses.
WHY YC: We have build a prototype of our product that is being used by several restaurants and are confident of our product's market fit. We need funds to build our products faster and scale. <comment><USER2> >>our product is designed in a way that can easily adapt to varying needs of different businesses.

Can you elaborate on how you'd do this with a fast enough go to market strategy? Fragmentation is one of the biggest barriers to entry for anyone doing a restaurant related start up.

</comment><comment><USER3> What sets you apart from your competitors? If you have product market fit, what's your CAC and LTV? Do you have marketing channels figured out?

</comment><comment><USER4> What technologies does the prototype use?</comment>


Cargo Shipper Maersk Vows to Ship with Zero Carbon Emissions by 2050 - <AUTHOR> https://www.npr.org/2019/07/15/736565697/giant-shipper-bets-big-on-ending-its-carbon-emissions-will-it-pay-off <comment><USER2> "I vow to ship with -1 Carbon Emission by 40312." \- me

In case the sarcasm is too hidden: Now they won't. 2050 is way too far in the future. The problem isn't if but how anyways. This article shouldn't be on the front page.

<comment><USER3> > The company already has cut emissions substantially, at the cost of $1 > billion so far. And it has an intermediate goal to cut emissions by 60% > (relative to 2008 levels) by 2030.

> While 2050 might sound a long way away, ships are built to last for 20 to 30 > years. That means container ships that will be in service in 2050 will be > hitting the oceans in just a few years.

These quotes from the article make it seem like there needs to be some fairly drastic action in the short term which would demonstrate how serious they are. The main suggestion for "how" seems to be biofuels.

<comment><USER2> Sorry, was busy with work a few days.

Well, the answer is not as easy as "biofuels". Where do the "biofuels" come from (e.g. cow shit might have enough energy if filtered correctly, but we already have too many cows on this planet with direct impact on the environment)? How are the fuels processed? How much of the final output is from device and material production and how much from actual usage? Think solar power here. For quite some time (I hope not anymore) the emissions produced while making solar panels was bigger than the savings the solar panels generated.

So the problem is quite complex actually. It would really make sense to set shorter intermediate goals and show how they can be accomplished in a competitive market. If they become the goodest good guys and then lose for not making a profit the world isn't better off either.

</comment></comment></comment><comment><USER4> It is cool that they are actually planning for "Zero Emissions" as opposed to just "Carbon Neutral" (which is also on their roadmap, but for 2030).

</comment><comment><USER5> Sails are coming back, I guess. Because nuclear would be The best choice for these massive ships.</comment>


Samsung Kills Off Note 7 After Second Round of Battery Fires - <AUTHOR> https://www.bloomberg.com/news/articles/2016-10-11/samsung-ends-production-of-note-7-after-global-recall-new-fires <comment><USER2> There are a few, notable high profile product fails in recent years:

\- Galaxy 7

\- Takata Air Bags

\- VW Emissions software

\- GM ignition switches

\- Theranos ineffective testing

These are a diverse set of fails, and only a limited set based on what I can recall at the moment. But I see them falling into two categories: Intentional and unintentional. Basically, if the company knew there was something wrong before the public suffered and they attempted to cover it up, it was an intentional fail.

If the fail was not discovered until the product was shipped in volume, I'd call that unintentional.

Intentional fails are a matter of ethics. Unintentional fails are a matter of process.

How do startup founders build company cultures that avoid both classes of fail?

</comment><comment><USER3> Thanks for a non-paywalled link.

Christmas's come early for Apple.</comment>


Designing "Mute" - <AUTHOR> http://www.marco.org/2012/01/14/mute

<comment><USER2> I've previously had exactly the same problem with the iPhone. I was singing in a professional rehearsal and had switched the phone to silent, but somehow in my pocket the iPod app was triggered to start playing some music. It disrupted the whole rehearsal and it wasn't clear where it was coming from at first. I was extremely embarrassed (and livid with my phone) when I realized it was coming from my own pocket. I disrupted a rehearsal that was probably costing $2000/hour.

I think Apple made absolutely the wrong choice here. The "silence" switch is next to useless if you can't actually count on the phone being silent when it's switched on.

You might ask why I didn't just turn the phone off. I put the phone in "silent" mode when I still want to receive notifications via vibrate, so I can look and evaluate whether I need to slip away and attend to something urgently.

<comment><USER3> But that's exactly the point of the article. An alarm clock is near useless as well (for waking up anyway, that's why I use it) if it's silent just because you told the iPhone to be silent. It'd be disastrous if I accidentally muted my phone, failed to wake up, and missed a morning.

Really, you want a "don't annoy me or people around me" button, but that's context sensitive. A design nobody has been able to implement yet. Apple just made an educated guess at it here.

<comment><USER4> > Really, you want a "don't annoy me or people around me" button, but that's > context sensitive. A design nobody has been able to implement yet. Apple > just made an educated guess at it here.

My dumbphone pretty much did that in like, 2005 or so: <https://s3.amazonaws.com/ns_pixels/blag/old-phone-volume.jpg>

<comment> mkr-hn My dumbphone still does this.

</comment></comment></comment></comment><comment><USER5> The problem I have with the iPhone behaviour is twofold:

1) The most common uses for mute are situations where you absolutely don't want any sound (theatres, weddings, etc). The iPhone behaviour makes it much more difficult to guarantee this than the obvious behaviour.

2) It complicates something that has an obvious default behaviour. It's no longer a mute switch, it's a "mute non-explicitly-requested sounds switch".

I could see the iPhone behaviour being useful -- it's more flexible after all. I just don't think it's worth compromising the common case.

<comment><USER6> In practice, it's a "Mute- all sounds, but don't frustrait me when I try to watch a movie, or need to get to work on time -switch".

Theaters, weddings, etc. are absolutely not the only time you want to mute things. A very large number of people work in shared offices and operate their phones in silent mode all-day, every-day. I for one really appreciate that I don't have to think about what state my mute switch is in when I get home hours later and try to watch a YouTube video.

The common case is that your alarm is only ever set to wake you up in the morning and your timer is only ever set when you're sitting around, waiting for your dinner to be ready. It's very rare for you to set an alarm or a timer which will affect a quiet group environment.

I don't think that a hard mute-always rule is worth compromising the common case ;-)

<comment><USER5> _In practice, it's a "Mute- all sounds, but don't frustrait me when I try to watch a movie, or need to get to work on time -switch"._

This definition is fuzzy, and thus harder to understand, which was my second point.

 _Theaters, weddings, etc. are absolutely not the only time you want to mute things._

I didn't say these were the only times, I claimed this was the most common use case. Granted, I don't have data to back this up, so perhaps I'm wrong. I'm sure there are plenty of other reasons to mute, this just seems to be the classi case that I anecdotally see the most.

 _I for one really appreciate that I don't have to think about what state my mute switch is in when I get home hours later and try to watch a YouTube video._

This is hardly a big problem, though, certainly not worthy of confusing behaviour.

 _The common case is that your alarm is only ever set to wake you up in the morning and your timer is only ever set when you're sitting around, waiting for your dinner to be ready. It's very rare for you to set an alarm or a timer which will affect a quiet group environment._

I agree you wouldn't normally have an alarm/timer set for these times. It's probably a rare mistake, but an embarrassing and costly one! These aren't the only ways that an iPhone will ignore the mute setting, though. This "feature" gives you plenty of ways to shoot yourself in the foot.

<comment><USER7> Is it really a "costly" situation? Really?

</comment></comment></comment></comment><comment><USER8> The solution is simple, just turn your damn phone off completely if you're at a concert.

<comment><USER9> but wouldn't it turn on automatically with an alarm? There should be a concert mode or movie theater mode that really shuts off all alerts.

<comment><USER10> No it wont power itself back on if you actually power it off instead of just turning off the display.

</comment></comment></comment><comment><USER11> I've lived with (though not mastered) both an iPhone and an Android device, and I don't think either gets it right. With the iPhone, I was confused how to set the volume of the alarm. The last I remember I would turn "on" sounds, set the volume I wanted the alarm at, and then silence the phone before I went to bed. I never actually learned how to do it and I never trusted it. With android, I had to find how to set the specific "alarm" volume control, which you can access if you try to select a ringtone for the alarm. I've found it once and set it and I don't have to worry about it anymore, but it took too long to figure it out and I didn't realize the alarm had its own volume slider.

I'm of the opinion the official alarm and timers should be the only apps that can violate the silence setting, and it should be painfully obvious how to set the volume when you set the alarm.

</comment><comment><USER12> I disagree with the conclusion.

Mute is a temporary state that overrides previous requests to be loud. If thought absolutely necessary that alarms should pierce the mute, then if there are pending alarms when mute is engaged, it can alert the user at that point and give them the option.

The real design problem seems to be the lack of vibrate mode on the iPhone. Other phones do this to silently alert the user without disrupting a performance, secret agent mission, or other situation requiring silence. Vibrate mode solves this problem on other phones. If a phone designer chooses to eliminate the vibrate mode function, that is his prerogative but it is a design mistake to then make mute be non-silent as a result of a decision to eliminate vibrate mode.

But wait a minute. The iPhone _does_ have a vibrate mode. Ah. Then there is no excuse at all for this is there.

<comment><USER13> For many of us there are always pending alarms. A mute dialog would be a severe pain.

To me, it's not such a problem to go into Clock and turn the alarm off if I change my mind about it. I try not to give my device conflicting commands. I wouldn't feed an S/R latch 1-1 when I expect it to give meaningful results.

</comment></comment><comment><USER14> The fundamental problem here is that libcrystalball doesn't exist yet: sometimes you want mute to mute the alarms (in concerts, though why would you need an alarm there) and sometimes you need mute to not affect alarms (when getting up).

As far as I can see, there's no way to reliably detect the situation at alarm time. Less and less as the time between setting mute and the alarm getting off increases.

Warning the user when turning on mute doesn't help either because for one the mute switch on the iPhone can be operated blindly because the phone wibrates when you mute it, so usually you'd not look at the phone to mute it.

And even if you did check its display and it did show that warning: the warning is totally useless for you most of the time (i.e before going to sleep), so that you will quickly be conditioned to ignore it - just like the security warnings in current OSes.

Or you are like me and have your phone muted for the majority of the time. Showing me that warning two weeks before the concert wouldn't help at all.

No. I believe that the current design which optimizes for the common case (not sleeping through the alarm) is fine. Just be mindful of this feature and check the alarms before the concert starts, or if you can at all afford it, just turn off the phone completely.

The hurdle of turning it off is as big as the hurdle of remembering to correctly set a three-state mute feature, but the current two-state one with haptic feedback has the huge advantage of simplicity.

<comment><USER15> > As far as I can see, there's no way to reliably detect the situation at > alarm time. Less and less as the time between setting mute and the alarm > getting off increases.

Using the GPS, it can tell when I'm at home or work, when I'm driving or commuting, and when I'm at a theater, hospital, or funeral home. So technically, it should be possible to make the mute button work one way in certain locations and another way in other locations. Whether this will improve the user experience or not is another question.

</comment></comment><comment><USER16> I'm an iOS dev (approaching a million downloads), and fully half of our support requests are from people who don't understand how the mute functionality on their device works - particularly the side switch on the iPad. It's not a big deal for us since we've got a templated response at this point and it only takes a minute or two for us to send a response, but there are clearly a number of users out there that don't understand how the mute functionality is intended to work.

<comment><AUTHOR> I agree we've had that problem with our app Denso as well (a video app) - people would complain that videos play but with no sound and almost always it was because people had the device muted.

We eventually shipped an update which ignored the mute setting while video playback.

</comment></comment><comment><USER17> I'm not exactly sure how it did this, but my old Nokia 5800 used to sound alarms, even when the phone was turned off.

The device would power on somehow, alarm would go off, you would silence it, and the device would be off again.

</comment><comment><USER18> > When implementing the Mute switch, Apple had to decide which of a user's > conflicting commands to obey, and they chose the behavior that they believed > would make sense to the most people in the most situations.

> That's good design.

Choosing one of two conflicting commands _without warning the user_ is terrible design.

<comment><USER19> How would you warn the user?

I was surprised by the behavior initially, but now I far prefer it. I spend far less time worrying about vibrate mode with my iPhone because I don't have to worry at night when I go to bed that my alarm will go off in the morning.

There is no perfect design for this, just tradeoffs. I appreciate the tradeoffs Apple made in this case.

</comment></comment><comment><USER7> One guy's iPhone accidentally goes off and people think Apple made a horrible design decision?

Andy and his supporters are wrong. The iPhone (and Android apparently) does it right.

First, it's not called the "mute" switch. Apple refers to it as the "ringer" switch.

It works the way it must for the alarm clock to have any value at all.

Andy's Case A (oversleeping) would be all to common and potentially disastrous. Andy's Case B (an Ebay alert during an "important" meeting) is silly, contrived and inconsequential.

3-way switches, bedstand modes and sound profiles are all idiotic.

</comment><comment><USER20> It's interesting that the controversy is completely centered around the iPhone. The behavior described for mute is exactly how Android's alarm app works as well. So it's not Apple going it alone in some quixotic quest to enforce their own twisted idea of how this should work on users in defiance of the rest of the industry.

I'm delighted with this behavior, because it perfectly meets one use case of mine: I want to set my phone to silent mode when I go to sleep and have it stop making notification sounds, but still beep to wake me up in the morning.

<comment><USER21> The Android alarm actually has an option in settings to choose if you want the alarm to override silent or not.

<comment><USER20> Now you mention it, I vaguely remember seeing that. The overriding is the default though, right?

</comment></comment></comment><comment><USER22> The physical mute switch was one of my favorite features when I switched from a Blackberry to an iPhone. It seems to work exactly how I want it to.

The only time when I want something different to happen is when I lost my phone and I want to call it from another phone. Luckily the "Find My Phone" service is now free and solves this.

It might be nice to expose the alarm while muted feature somewhere in the preferences but it seems like a relatively small problem.

</comment><comment><USER23> A good solution to the iPhone's mute issue would be a _gasp_ Blackberry-like _gasp_ 'nightstand mode'.

Though it would not have saved the day in this instance, it would be a good implementation. So many times I do not want all my apps alerting me with push messages and emails and texts; I just really want phone calls or alarms to come through.

<comment><USER24> That sounds about right. Hell, I should be able to drop a phone on my nightstand and have an inductive charger switch it to "do not disturb, except for alarms and calls or urgent messages from certain people". Is it the future yet?

As for this article, there seem to be conflicting expectations. Demanding attention is the point of an alarm, so I for one do not expect "mute" to imply "and cancel all my meeting reminders or let me oversleep". Another comment proposed a theater mode, and maybe that should mean "no noise whatsoever for the next N hours, warn me if it means deferring an alarm".

<comment><USER25> > Another comment proposed a theater mode, and maybe that should mean "no > noise whatsoever for the next N hours, warn me if it means deferring an > alarm".

It's called off. Hold the top button and the home button and you'll get a screen that lets you power off the iphone completely. To turn the phone back on just press and hold the top button for a few seconds. :)

</comment></comment></comment><comment><USER26> The mute button in iOS has a worse problem: the ability to be repurposed to lock orientation. I say this from my own experience having developed a popular (paid) app and dealt with angry customers complaining that it doesn't have sound.

After a little research it turned out that people often don't even know that their device is set to lock orientation, and sound is muted. And how would they - knowing that, other developers purposefully IGNORE mute and so they don't have to deal with a BROKEN feature. I did the same...

I just got tired of explaining to my clients that my app is actually fine, it's the other apps (that have sound) that are broken.

</comment><comment><USER27> My main problem with the "mute" is that there is no visual indication whatsoever on the front of the device that it is enabled. So you have turn the phone on its side and peer at that teeeeeny little orange dot (even harder if you have any sort of case).

One of the very few ways the wonderfully designed iPhone is arrogantly "broken". An Android-like (gasp!) icon on the toolbar would be nice.

<comment><USER13> Toggle the switch. Vibrates when going into mute, with a large visual for luck. There _is_ a notification area icon that tells you if you have a wake-up alarm set.

</comment></comment><comment><USER13> There are pros and cons of this. I would be late for work every other day if the iPhone did "mute" like my old Nokia. Here, this one guy's musical performance was disturbed.

I would probably make the same call as Apple: if you set an alarm and it doesn't go off, you're in more trouble mor of the time than if you set an alarm, forget it, and mute your phone.

</comment><comment><USER28> Design - Protecting users that expect things do what they say, from themselves, since 1976.

<comment><USER13> That's not the issue here, because when setting an alarm "doing what they say" is to play the alarm.

The user gave the device two conflicting commands, and it has to decide which of them to honor.

<comment><USER29> It would be more intuitive for hardware switches to trump software ones.

For instance, if I push the power off button on my mains, I mean it. Not obeying this directive is the province of HAL.

</comment></comment></comment><comment><USER30> "Mute alarms or don't" is a false choice. The right way to do this is straightforward. When the user presses mute, if an alarm is scheduled and DontShowAgain is false, then pop up a window and ask the user how he wants the alarm to be treated. If the user also checks DontShowAgain, set it to true and never show the window again.

</comment><comment><USER31> One obvious solution is to have, say, an extra flavor of mute. Say a soft mute and a hard mute, where soft works like the current iOS mute and a hard mute which is a true absolute mute. And give the user a physical switch or in- software toggle between them.

Next problem.

<comment><USER13> Simplicity trade-off.

<comment><USER31> very likely their thinking, agreed.

</comment></comment></comment><comment><USER32> I consider myself to be a pretty advanced user, I program for Apple platforms professionally, I've had an iPhone for years, and before I read this article I had _no_ idea that the alarm didn't respect the mute switch. Makes me extremely grateful that I don't use the built-in alarm. When I flip the mute switch, it's because _I don't want the phone to make any noise_. An exception for music/movies makes since, because I'm requesting it right then and there. An exception for alarms makes no sense to me, as it's something you set previously and, as the unfortunate concert-goer experienced, something you may have forgotten.

That switch on the phone has one purpose in life: to keep my phone quiet when I'm in a situation where I don't want it to make noise. Alarms really should not override that.

<comment><USER7> If that were the case, it would render the alarm totally useless for people like me who frequently or always silence the ringer.

And, oh yeah, it's not called a "mute" switch on the iPhone. It's the "ringer" switch.

<comment><USER32> The fact that the current behavior is essential for some and completely unexpected for others shows that the whole thing needs more work, I think.

</comment></comment></comment><comment><USER33> Awful conclusion.

If the user gives conflicting commands, tell them so.

That's responsible design.

Or, avoid it, by making the switch 3 state. 1St mute: user is telling to silence all, except alarms. 2nd, user is disabling all sounds, whatsoever, even if he turn on noise fart app.

That's good design.

<comment><USER7> 3 way switches are terrible design.

It's not conflicting is the switch is referred to as the "ringer" switch, as Apple does.

<comment><USER33> I'm not even sure 3way switch is the best solution. My point is: solve it.

Don't hide behind a explanation. If a few user have the problem, it's bad design. Period.</comment></comment></comment>


Ask HN: Could a distributed solution keep ISPs honest? - <AUTHOR>

I'm a relative technical layman, so forgive me if this is a stupid question.  Maybe something like this exists, maybe it can't for obvious reasons, but I can't find anything through moderate Google-Fu so I figured I'd ask you fine folks.
Hypothesis: ISPs get away with over-promising and under-delivering on their suite of offerings.  I know for instance that my TWC internet speed in NYC is far below the advertised rate.
Hypothesis 2: The average-joe consumer is ill-equipped to effectively monitor their poor service and call major ISPs on their poor service and terrible customer support.
Hypothesis 3: There exists a broad, distributed, solution that could be rolled-out via a plugin or something similar that would allow independent and passive checks of actual internet speed.  This solution would obviously need to be validated against WiFi settings, firewalls, other network traffic, etc., but hopefully those technical challenges could be addressed.  Ideally it would replicate authentic "human traffic" to keep the ISPs guessing, while not adding to any material degradation of normal internet service.
This would allow for a huge number of independent basis-points to audit the actual service being offered by major ISPs.  The project could be open-sourced and vetted by industry experts (CS professors at research institutions, say), to give it some validity.
Telecom industries operate as an oligopoly, and until Google Fiber or someone else comes to disrupt them, the populace at large is going to continue being treated like crap.  Maybe a solution like this could be a small weapon against the powers that be.
Possible for-profit implementations:
- Leverage resource in class-action suits as "expert testimony"
- Rating the top ISPs as a trusted and unbiased source, a la Consumer Reports
- Sell services that "boost" internet speed (do these exist or is that just Spyware-esque claims?)
- Etc.
Anyway, food for thought.  Anyone out there have insight? <comment><USER2> That was developed by SamKnows and is used by the FCC to rate ISPs in the US. <http://www.samknows.com/broadband/index.php> <http://www.fcc.gov/measuring- broadband-america></comment>


Will Google's Electric Car Scheme Kill the Road Trip? - <AUTHOR> http://www.i4u.com/46501/will-googles-electric-car-scheme-kill-road-trip-or-make-it-better-ever

<comment><USER2> _How do you write rock ballads about a robot chauffeur driving you across the continent?_

Same way we used to write 'em about trains, I guess.

</comment><comment><USER3> Gee, I miss those covered wagon trips too.</comment>


How can I learn to scale my project? - <AUTHOR>

I really want to start testing and developing methods for scaling and speeding a project of mine, and also just for general knowledge. I can't think of a way to do this without creating a bunch of amazon ec2 instances, or buying more computers and doing this from house.
Can anyone think of think of way to do this for free or very little money? is their something I am not thinking of.
Background
I am creating a website http://www.tastestalkr.com. Right now I run it on http://www.dreamhost.com. They are great when it comes to serving webpages, but not if you want to run a crawler. I run the crawler from a computer in my house. This works great for now and I understand that I don't need scale for a long time, but I am doing this all by myself. I am using django and pythong. I am thinking that mayby something like hadoop is going to be my best bet. <comment><USER2> 1) Profile. You really shouldn't start blindly optimizing code without profiling. Profile it, find your bottlenecks, optimize, rinse, and repeat. You should also benchmark your hardware; run scripts that make requests to your www server. Check out Apache's ab benchmark. Etc...

2) Cache. Google "Memcached". Django has support for this. This will alleviate huge database bottlenecks (if your app is read heavy). Also possibly consider some sort of FS (file-system) structure specific for your app. It looks like you deal with a bunch of media files, that could get hard to manage without a proper FS plan.

3) Write clean code. There is no sense in profiling, optimizing, caching, etc if your code is horrible. Those things will lead to even worse, unreadable, unmanageable, possibly slower code.

From your description you asked slightly more specified questions, but you really need to understand the basics of above before specializing for your app. At least that's what I believe.

</comment><comment><USER3> You are already thinking in the right direction if you understand how Hadoop works. But don't bother for now. No, really, don't!

Just be ready to profile and refactor your code when you _do_ need to scale.

That said, you can improve the odds with practices that are almost cost-free, but will help a lot later on.

\- Read Cal Henderson's book.

\- The center of your design should be the data store, not a process. You transition the data store from state to state, securely and reliably, in small increments.

\- Avoid globals and session state. The more "pure" your function is, the easier it will be to cache or partition.

\- Don't make your data store too smart. Calculations and renderings should happen in a separate, asynchronous process.

\- The data store should be able to handle lots of concurrent connections. Minimize locking. (Read about optimistic locking).

\- Protect your algorithm from the implementation of the data store, with a helper class or module or whatever. But don't (DO NOT) try to build a framework for any conceivable query. Just the ones your algorithm needs.

Think this is obvious? Just the other day I heard of a project, staffed by so- called experts, that made every one of the mistakes I mentioned above. And in simulations, they cannot even keep up with the load they expect at launch.

<comment><USER4> > \- Avoid globals and session state. The more "pure" your function is, the > easier it will be to cache or partition.

I'd like to emphasize this point in particular. Shared state is a big, inefficient, centralized bureaucrat and is the enemy of horizontal scaling. Statelessness and decentralization are best-friends-forever (they each have a denormalized copy of different aspects of the same friendship bracelet!), and you should figure out as many ways as possible to exploit statelessness and minimize unnecessary shared state in your application.

If you have the time, learn statelessness-in-the-small as well: play with a strict functional programming language (for your own edification, not necessarily for implementing this particular project!), and you will learn how to become keenly aware of the flow of state in any program, and how to maximize statelessness in any language. This will improve anything you ever program again, and will form a powerful mental model of state that will carry over by analogy to statelessness-in-the-large.

<comment><USER5> Ok - I am using the session to speed up performance - by keeping around an object that is central to a user's workflow for just about every request w/o going back to the db for it.

Are you suggesting that going back to the db each time is more scalable, or that I am better off using some kind of method level cache?

Honestly - just wondering - any good articles on what you are discussing? I guess I just don't quite 'get' it - not having worked on an application that scaled to the point that session access was the bottleneck.

<comment><USER3> _Are you suggesting that going back to the db each time is more scalable, or that I am better off using some kind of method level cache?_

Yes and yes.

This is a really long and deep topic. There are all sorts of reasons why sessions are not a good idea. But let's stick to scalability.

If you're using your session as a sort of cache for objects, that's probably okay (although, consider using something designed for this, like memcached). The point is, you ought to be able to reconstruct all the objects you need from just the request parameters.

This is a pretty good article about it all.

"Session State is Evil" -- [http://davidvancouvering.blogspot.com/2007/09/session- state-...](http://davidvancouvering.blogspot.com/2007/09/session-state-is- evil.html)

<comment><USER6> Yep, sessions are nice when your site is in the 1-5k visitors per day range, but don't seem to scale much beyond that. (coming from an RoR background here)

</comment></comment></comment></comment></comment><comment><USER7> Do you have enough traffic that scaling is really a concern? It's typically putting the cart in front of the horse to worry about that too soon. You'd be much better off trying to improve the site and get out the name otherwise.

<comment><AUTHOR> You are absolutley right that the site doesn't need any form of scaling right now. I have never had the chance to write a massivley scalable system of anykind, I am looking for a challange and I don't have a lot of money so I am trying to figure out how to learn how to scale on a budget for fun , not for buisness. If the time comes though I will have some tricks up my sleave.

<comment><USER7> Ah. It's definitely an interesting problem. Hopefully you'll get a chance to test anything you come up with.

</comment></comment></comment><comment><USER8> _"... How can I learn to scale my project? ..."_

Go work for google? [0]

 _".... I really want to start testing and developing methods for scaling and speeding a project of mine, and also just for general knowledge. I can't think of a way to do this without creating a bunch of amazon ec2 instances, or buying more computers and doing this from house. ..."_

Think distributed.

Create a useful installable tool that utilises spare cpu cycles that are being under-utilised. Or get some experience with some of the existing systems. Some examples that I can think of are

\- SETI ~ <http://setiathome.berkeley.edu/>

\- Electric Sheep ~ <http://electricsheep.org/>

\- PlanetQuest ~<http://www.wired.com/science/space/news/2005/03/66757>

Another approach is to take a look at seeing how you can create a Beowulf cluster ~ <http://www.beowulf.org/showcase/index.html> You don't have to build it (though operacy is worth 10x reading) you can look at the software. If you are still at school or know somebody there you can see if anyone is working on parallel software.

[0] Take a read of this blog on the development of a personalised RSS crawler ~ <http://blog.persai.com/> to see the kinds of problems you have to overcome (scaling, data integrety, storage, re-writes)

<comment><AUTHOR> The persai blog was really helpfull, its great to find other people dealing with this idea of natural language parseing , that aren't phd students.

</comment></comment><comment><USER9> Scalable Internet Architectures by Theo Schlossnagle was a good introduction for me.

[http://www.amazon.com/Scalable-Internet-Architectures- Develo...](http://www.amazon.com/Scalable-Internet-Architectures-Developers- Library/dp/067232699X)

</comment><comment><USER10> I would suggest that you consider a couple things:

1) How can you break down the work tasks your site/crawler is doing so that it could be divvied out across N processes? In the case of the crawler, how would you handle breaking up your work queue so that multiple spiders could coordinate their efforts without all crawling the same pages and without skipping any? How do you recombine the results back together when they're finished? What happens if a spider grabs a URL to crawl and dies before it can report in the results - will it still get crawled or has it been lost?

2) Google's view of mass concurrency looks at hardware in the same sort of way. They considered questions like: What happens to the running processes if this disk drive goes offline? How can work being processed on multiple computers be recombined together? What happens when a critical computing node dies while you're waiting on it to report its results?

3) As pertains to database and other resources: how can the data needed to power the site be distributed across my computer resources as evenly as possible? How do I go about identifying and correcting bottlenecks?

It does not seem like you need Hadoop to either think through these problems or work on coding solutions that take this sort of thing into account. Though if you build a system capable of mass concurrency, I can understand the desire to want to test it out in a widely distributed environment.

</comment><comment><USER11> Read Cal Henderson's book "Building Scalable Web Sites".

<comment><USER2> Good book, but it's somewhat bias. Not gonna go into details, but definitely worth a read.

</comment></comment><comment><USER12> You can plug into someone else's crawler. For example <http://spinn3r.com/>.

In general take a look at <http://highscalability.com/>.

</comment><comment><USER13> Fall on your ass many, many times :)

</comment><comment><USER14> Try and get lots of people to use it - then you'll have to scale it. Otherwise it's a bit imaginary. :)</comment>


My Credit Card Company says I'm a Deadbeat - <AUTHOR> http://blog.debteye.com/debt-articles/im-such-a-deadbeat/

<comment><USER3> For those not able to go to the site, here is the Google cache version:

\</comment><comment>--

There are over 600 million credit cards in circulation that accounts for 1.5 Trillion dollars in consumer spending. An estimated 115 million card holders carry a balance on their credit cards every month, also known as "the revolvers". These cardholders are the "sweet spot" for the banking industry that generate over $30 billion dollars a year in interest and fees. - <USER2>

If you're like me and pay off your credit cards every month, we are known as the "deadbeats" to the credit card companies. Deadbeats are consumers who avoid interest and fees by paying off their balances in full every month, rather than paying the minimum payment and carrying a balance. Why it Pays to be a Deadbeat

Credit card companies can automatically increase your interest rate if they have any reason to believe that the risk of being repaid by the customer has increased. This means that if you're accumulating too much debt on your credit card or if you fell behind on any other obligations such as a mortgage or a car, this is enough reason for them to increase your rate. This practice is called the "universal default".

Let's say for example you have a Chase credit card at a 6.9% interest rate and a Citi credit card at 11%. It was the holiday season and you went out to buy gifts for friends and family. You charged all the gifts on your Citi credit card and went near the high credit limit that was available. As a financially responsible cardholder, you promptly paid off the balance in full the next month. A few days later, you receive a letter in the mail from Chase stating that your interest rate is being increased from 6.9% to 19.9%. It doesn't make sense does it? Banks are allowed to increase your interest rate at any hint that you may be a high risk customer.

Usury laws were designed to help protect consumers from lenders who charge high interest rates. However, major credit card issuers are based in states without usury laws. Let's take the example from above. If you have a Citibank credit card, take a look at where they're located. South Dakota. If you have a Chase credit card, you'll notice that they're located in Delaware. So what do these two states have in common? These two states have no caps on the interest rate they can charge consumers! Why Creditors Love "Revolvers"

Besides the obvious that "revolvers" pay only the minimum payment and generate huge profits for credit card companies, creditors understand that it's difficult for someone to change their spending habit. A consumer who recently filed for bankruptcy is a prime target.

"Nearly all debtors stated that they had received offers for credit in the first months following their bankruptcy" -Source

Frequency of Credit Offers Per Month in First Year after Bankruptcy – Source

Average 14.56 Median 10 Standard Deviation 29.35 Respondents 339

So why are families fresh out of bankruptcy such an ideal target? It's hard to imagine someone to dramatically increase their income in the first few years out of bankruptcy. Just because someone filed for bankruptcy doesn't necessarily mean that they're more financially responsible. People in financial distress are more likely to carry balances, exceed their credit limit, and use cash advances (which carry higher interest rates). So what now? New bankruptcy laws prohibit consumers filing for bankruptcy within 8 years; this means 8 years of minimum payments to the creditors! The banks have just hit their "Sweet Spot!"

How to go from a "Revolver" to a "Deadbeat"

By now, who wouldn't want to be a "deadbeat"? I can write an entire article on how to save money and pay off your debts. Off the top of my head, the single biggest advice I can give you is to live within your means and start a budget. I know it sounds lame, but I challenge you to create a monthly budget and stick with it for at least 3 months! Anyone who is overwhelmed with debt and on the verge of default, there are realistically only a few options: credit counseling, debt settlement, and bankruptcy (if you haven't already filed within 8 years). You can go to Debteye to get a free debt analysis if you feel you've dug a hole too deep.

I'll end it on this note: Congratulations to all the deadbeats out there!

<comment><USER4> After pointing out that people who pay off their entire balance each month (or don't use credit at all) avoid interest and fees, I don't see why he then had to go on and on about "Why it Pays to be a Deadbeat". Surely it's pretty obvious, even without all the other nonsense tricks, even if they were lovely people who would never change your interest rate, etc etc.... it would still obviously be better not to be paying any interest at all.

</comment></comment><comment><USER5> There's a big flaw in the article though. Credit card companies get 2-3% of each transaction, whether you're a "deadbeat" or a "revolver". So while they may prefer "revolvers", they're also pretty happy to keep "deadbeat"'s around.

My wife & I together run about $3K a month through our credit card. We get 1% cash back, so that means the bank is keeping 1-3% or $30-$90 every month. If we were paying that on our bank account we'd be screaming about it and looking for a new bank account. Instead, we pay it indirectly through higher prices and don't notice.

<comment><USER6> Lots of people contend people who pay through means other than credit cards actually pay it through higher prices, where you get part of it back.

<comment><USER7> This is why I think "cash-back" cards are basically in an arms-race with alternative forms of payment. The cash you get back ultimately comes from higher transaction fees, which translates to higher prices, and so people who don't use cash-back cards end up getting charged higher. The only rational thing to do is use cash back cards for all your purchases, which in the large scale makes just escalates the process.

</comment></comment></comment><comment><USER8> Could someone explain to a non-US resident why basically everything seems to be running on credit in the US?

You basically have money on a bank account (hopefully), but still lend with interest to consume?

The only credit card I own is from my employer for expenses, everything else is on debit. I only spend money I have. Quite a few people in Sweden, where I live, have some credit on their debit cards, but I think most people only use the credit for emergencies.

<comment><USER9> Half cheek in tongue answer: The difference is that in the US people believe that they will be making more and more every year while in Sweden you don't. So they think they will own tomorrow the money to pay back what they spend today.

Are they right? Well, from 1970 to 2010 US economy has grown at an average of 2,9% per year, while Sweden by 2,1% (1). This is a huge difference, almost 50% more. So yes, they are both right :)

(1) Figures are GDP growth at market prices, source: OECD</comment></comment>


German Politicians Became Victims of Massive Cybersecurity Attack - <AUTHOR> https://amatas.com/news/view/german-politicians-became-victims-of-massive-cybersecurity-attack <comment><USER2> Who did it?

<comment><USER3> From the article "a 20-year-old man living in Hesse"</comment></comment>


The Illusion of Security - <AUTHOR> http://virtualprofessors.com/the-illusion-of-security

<comment><USER2> The problem with security theater is that the pro argument is visceral and personal while the anti-argument is strictly budgetary. Which side do politicians want to be on?</comment>


Cross-Gender Avatars in Games - <AUTHOR> http://blog.amateurtopologist.com/post/2012/05/31/cross-gender-avatars-in-games

<comment><USER2> Gender in online games is a well-charted territory. The linked post echoes this more in-depth article from 1999: <http://tharsis- gate.org/articles/imaginary/GENDER~1.HTM>.

Edit: There's also the following quote on men playing as women from a 1993 paper [1] on MUDs ("multi-user dungeons", see [2]). I find myself amused by how true its final sentence rings twenty years later [3].

>Many people, both male and female, enjoy the attention paid to female characters. Male players will often log on as female characters and behave suggestively, further encouraging sexual advances. Pavel Curtis has noted that the most promiscuous and sexually aggressive women are usually played by men. _If you meet a character named "FabulousHotBabe," she is almost certainly a he in real life._

[1] <http://www.cc.gatech.edu/~asb/papers/gender_swapping.html>

[2] <https://en.wikipedia.org/wiki/MUD>

[3] But don't misread it as reenforcing the tired cliche that "there are no girls on the internet". It's rather about how the "FabulousHotBabes" of the Internet are very often not its girls.

<comment><USER3> That is fascinating in the context of camp/travestites - when men dress as women they often adopt a stylized, over-the-top presentation of femininity. same thing applies online.</comment></comment>


First Private Manned Orbital Flight Announced on Monday September 14, @11:33AM  - <AUTHOR> http://spaceports.blogspot.com/2009/09/interorbital-systems-has-crewed-capsule.html

<comment><USER2> This plan is so unlikely that I wonder if the company is a scam. The company website has more details at <http://www.interorbital.com>.

They will send a crew on the first test flight of their new launcher. They are reckless. You test a new launch system in steps instead of trying to integrate everything on the first try. The launcher only takes 1000 kg to LEO. How will that accomodate an (also untested) crew capsule?

They are selling moon rocks too--from their upcoming lunar sample return mission.

<comment><USER3> wow the site looks like its straight out of 1996</comment></comment>


How I fixed Unix atime with 10 lines of code and feminism [video 2016] - <AUTHOR> https://www.youtube.com/watch?v=fHjsdyN4UK0 <comment><USER2> The talk is interesting but how on earth is this related to feminism? A skilled file system dev decided to finally fix a problem, end of story. Well done.</comment>