Ask HN: How to deal with refusal to change code during reviews? - <AUTHOR> This particular programmer has 7-10 years of industry experience in various areas but lacks knowledge about this particular language/framework and doesn't have a lot of experience in day-to-day infrastructure operations.
He will usually dismiss 60-80% of the feedback as not being important, not having an impact, or will flat out say "I will keep the code as-is" without giving a reason.
We want to be an welcoming place and let people learn on the job but we worry that our codebase is becoming a minefield (someone started keeping a document with "future issues" we'll face).
This isn't simply a junior programmer not knowing better. It's seems to be a mix of ignorance and arrogance. We worry he won't be around in an year or so, when things start to break. <comment><USER2> It's not just about "you should code like that because that's how we code here" type of problems. That makes you, the arrogant person in the story. You should create a list of bugs generated by his code. If the list is significant AND if you believe these bugs could be avoided by incorporating %100 of your code review feedback, then setup a 1-1 quality meeting with him and go over the list. Tell him how this could be avoided in the future and that the goal is to stay away from bugs and to focus on fun things. Don't use "you should", use "we should", act like it's a team effort.

If he doesn't accept your invite, or doesn't want to cooperate during this meeting, resend an invite and include your manager and QA and all the other engineers. Update your list of bugs and add bugs from the whole team not only his bugs. Then make it a real team exercise. The problem will raise during this meeting and everyone will clearly see that this dude is a bug-generator.

It is a long process, but that's how you do it professionally. What do you earn from this big effort? People will thank you for taking initiatives and to raise the bar in terms of quality. In other words, you'll get a bonus ;) He will regret not listening to you when he had a chance to fix his mess "secretly".

<comment><USER3> Also, "you should code like that because that's how we code here" isn't a good reason. If you don't have a good rationale for the changes, I would consider not making them.

<comment><USER4> On the contrary, that is a very good reason, and sometimes the only one that matters.

In any group of "n" developers there are likely to be "n+m" different ways to do the same thing. This increases the "cognitive load" to understand others' code (a fancy way of saying it makes the code hard to understand).

Personal preference is not a valid reason to eschew standards, even (especially) de-facto ones.

If there is a "better" way to accomplish a particular task, then the entire team should adopt it (and go back and change existing code to conform to the "better" approach). If that's not worth doing, then leave well-enough alone. (Another way of saying "If it ain't broke, don't fix it").

<comment><USER5> Right, but simply saying, "that's the way we do it here" doesn't communicate all that. Hence, "that's the way we do it here" is not a good reason. "That's the way we do it here, and here is why we do it like that..." is how it should be phrased.

<comment><USER4> Agreed -- if you can't explain why "that's the way we do it here", then that's a problem.

</comment></comment></comment></comment></comment><comment><USER6> Write a clear guideline, and ask team to follow it. During the code review, you only ask to stick to guidelines (that everyone agreed on). This way programmers won't feel like your subjective opinion is affecting their work.

<comment><USER7> This is solving a people problem with a process. That doesn't work very well, in the long run.

<comment><USER8> This can be done without it being a burdensome process or weaponized against an individual. Developing a team agreement with the team can be a powerful tool. It's important the team itself is the author, that everyone either agrees with a proposal or will go along with the rest of the team (if they won't, then its on them to form a counter-proposal), and that when the environment changes the team can revise it.

</comment></comment></comment><comment><USER9> Reject it.

I've done it a few times, there was a fuss, there was a discussion, it got sorted out.

At the same time I've had a couple rejected (due to not adopting the reviewer's preferred code style). Same thing happened.

<comment><USER10> I agree. I would flat out say "I won't accept this change".

<comment><USER11> Agreed too; that's how it is at Google. Code reviews aren't "hey reviewer, take a look at this code so you understand it and rubber-stamp it".

As a reviewer you're the gatekeeper, and no code is submitted unless the author and all reviewers are happy. Happy as in, if you approved the change and the author leaves tomorrow, you're the maintainer of that code. No one should be rude in the review, but the understanding needs to be that the power lies on the reviewer to hold their approval indefinitely until they're happy with the code. That's a cost for the author and costs almost nothing to the reviewer, so as an author you learn very fast to not waste time discussing whether something "is not important enough": You apply all suggestions you don't disagree with, and explain your disagreement about those that really matter.

</comment></comment></comment><comment><USER12> It depends on how much skin in the game you have as a reviewer. If you have to or will have to maintain the same codebase (sounds like in your case you do), then you have every moral right to reject the code and refuse to ship it. If you're literally not allowed to reject the code, escalate to your common manager. If it goes wrong later, at least you're on record objecting, and this could also be a signal to get a new job if your manager can't even handle this.

And if you don't have skin in the game (ie, process just requires "someone" to review it even if not on the same team), then whatever, give them the advice and let them burn themselves if they wish.

</comment><comment><USER13> I have definitely worked with this type of programmer before.

One thing to can do is quantify a code quality metric, for example, test coverage percentage. Then, get the team to agree that all feature branches must maintain or improve that metric to be merged. Maybe treat hot fixes differently depending on the situation.

However, this doesn't necessarily solve the issue if, for example, the implementation is just overly complex, not well designed, or not well decomposed for the problem being solved. There are code quality services that address some of these, but perhaps we need a little more detail on the specifics of your situation.

Unfortunately sometimes I've just had to merge code that's lower than ideal quality, and then hold the engineer who wrote it responsible for fixing it when it breaks.

Most engineers are smart enough to admit when they made a bad assumption or a better solution becomes more obvious in retrospect. Sometimes people just learn at different paces or can be afraid of trying new paradigms inconsistent with how they've been thinking for a while.

As long as they learn eventually, your team is improving, but if they're not interested in learning better solutions, then maybe there are two different cultures in mind. Some devs value shipping faster over writing better code, and having your team on the same page is helpful.

</comment><comment><USER14> When you say "ignorance and arrogance", my gut suggestion is to pull the plug now.

But one important note regarding ignorance: Is the incentive structure at your workplace such that programmers have the freedom to learn on company time? Or will they be dinged in a performance review because they haven't shipped features. If you value "getting it done right", you need to communicate that it's not going to come at your employees personal expense.

</comment><comment><USER15> 'We' is a bit vague here. Are you this guy's boss?

If not, you shouldn't start a feud with a peer. It doesn't do anyone any favors. Get on with your job and let everyone else get on with theirs.

If so, decide whether the issues in question are really that important. If they aren't, cross them off the list of rules to follow. If they are, order him to do things the company way. If he refuses, fire him for insubordination.

</comment><comment><USER8> It's hard to understand what someone is really thinking and feeling. In the past I've found a lot of issues like can be traced back to safety, consider making safety a prerequisite [1]. Have you tried pair programming? Prioritizing the resolution of bugs over new feature work?

Try proposing some small experiments for the team to try over the course of a couple weeks that can pull your coworker into the team.

[1] [https://www.industriallogic.com/blog/modern- agile/](https://www.industriallogic.com/blog/modern-agile/)

</comment><comment><USER16> Fire him now, _before_ he creates the minefield in your codebase.

I mean, try to fix him first. But if he refuses to be fixed, fire him. He'll be toxic to the codebase, and he'll be toxic to the culture.

<comment><USER17> True dat. He could easily become toxic. Give him a chance, but if he's the type that rejects reason (they are around), just let him go for damage limitation.

</comment></comment><comment><USER18> I've seen situations where someone with experience acted a certain way that sounded wrong - only to find out he was right all along.

It's impossible to judge this situation without clear examples of code.

<comment><USER11> "This isn't important", "this doesn't have an impact" and "I won't change it" without giving a reason are always wrong.

But the code review policy in OP's company looks weak: It's the onus of the author to convince the reviewer, not the other way around.

A good version of the first two responses could look like: "That would have a small impact because of X and Y, and it doesn't seem to me that the extra complexity in the code would be worth it". If the reviewer isn't convinced and you still don't agree, propose to open an issue to measure the actual impact, so the current change isn't blocked.

</comment></comment><comment><USER19> I like to work in refactoring during code reviews. How much longer does it take you to show the person how the code should actually look (i.e., rewrite it for them on the fly during the review?) than it does to point out every little thing that they need to change? Probably not much. Then the changes that need to be made are already done and nobody can ignore them. This will also allow you to reason about the changes while you type them up.

</comment><comment><USER20> Does this person work alone, while also being responsible for the changes that are bureaucratically and technically important to the 'system'? That shouldn't have happened, never leave us to ourselves for extended periods. Next time place a pair in that position of power because when you only answer to yourself there are no opposing views.

</comment><comment><USER21> ~This is why teams fails, i have posted something similar few weeks ago, unless he has extensive domain knowledge or your boss wants this guy to be there for some weird reason, i'd say get rid now, everyone is replaceable.

</comment><comment><USER22> Are you sure it's not a case of junior programmers writing up useless feedback and dismissing an experienced programmer's judgement?

</comment><comment><USER23> > We worry he won't be around in an year or so, when things start to break.

I don't understand what this has to do with anything. It's more like you want someone to blame when (and if) shit hits the fan. I get that office politics are equally important and we have to learn to successfully navigate through them, but seriously it is NOT cool to think and act like this... If you don't like the PR/MR don't merge it, stand your ground for the greater good.

</comment><comment><USER24> Accept his PR. Now fix the code yourself with all your review comments in a new PR. Test. Commit. Checkmate.

</comment><comment><USER17> Some people you just can't coach. Let them go if they aren't team players.</comment>


What happens when you change a single byte in an image? - <AUTHOR> https://codepen.io/hacksparrow/pen/YNxERy <comment><USER2> Reminds me of: [https://snorpey.github.io/jpg- glitch/](https://snorpey.github.io/jpg-glitch/)

Fascinating how resilient JPEG's can be. I imagine you could do the same with a BMP with minor side-effect. Formats like PNG's would be far more susceptible to outright failure if single bits are altered.</comment>


Ask HN: Is it time to drop the online username? - <AUTHOR> Hi all. I have been known online by my standard username for over 25 years, but as trust on the Internet is now such a huge thing, and people are wary of scams, malware, trolls, and general nastiness is it now time to ditch the username, and start using my real name everywhere as my logon id. I've never hidden my real name from my username (I'm really easy to Google), so it's feeling that in this day and age the alternate username has reached the end of it's useful life.
I notice a lot of HNers do this, and have their names as their IDs - what were the reasons behind this? Transparency for a peer based community, or just that you never had a an alternate username in the first place?
100% interested in all and any views on this... <comment><USER2> That seems unwise. Using your real name everywhere and/or the same username makes you easily trackable.

I use different usernames on each site, not linked to my real identity, etc.</comment>


Maze Design (2005) - <AUTHOR> http://www.cgl.uwaterloo.ca/csk/projects/mazes/ <comment><USER2> People who like this should also check out Robert Bosch's "TSP Art" (TSP stands for Travelling Salesman Problem). While this submission focuses on mazes, Bosch focuses on non-intersecting paths. The two problems are clearly dual, since a maze's solution is a non-intersecting path, and conversely every non-intersecting path is the solution to a corresponding maze.

[http://www2.oberlin.edu/math/faculty/bosch/tspart- page.html](http://www2.oberlin.edu/math/faculty/bosch/tspart-page.html)

<comment><USER3> OP's site is from 2005 and Bosch's site mentions the author of, and links back to, the submitted link ;)

<comment><USER2> Oh, thanks, I explicitly tried to check but somehow missed that!

</comment></comment></comment><comment><USER4> A great book about maze generation is "Mazes for programmers" [http://www.mazesforprogrammers.com/](http://www.mazesforprogrammers.com/)

<comment><USER5> wow, US$32 for the kindle edition. It looks nice, but a bit too much for a toy book.

<comment><USER6> You can buy the ebook directly from the publisher for $25 [https://pragprog.com/book/jbmaze/mazes-for- programmers](https://pragprog.com/book/jbmaze/mazes-for-programmers) . You get pdf and epub formats and no DRM.

</comment></comment></comment><comment><USER7> > The designer traces regions of interest in an image and annotates the > regions with style parameters. They can optionally specify a solution path, > which provides a rough guide for laying out the maze's actual solution. The > system uses novel extensions to well-known maze construction algorithms to > build mazes that approximate the tone of the source image, express the > desired style in each region, and conform to the user's solution path.

Sounds cool. Is there a public implementation?

<comment><AUTHOR> One repo I found is [https://github.com/G3Kappa/pictomaze](https://github.com/G3Kappa/pictomaze). It requires installing processing and the python plugin.

You can see the write up / output: [https://medium.com/@G3Kappa/generating- mazes-from-pictures-o...](https://medium.com/@G3Kappa/generating-mazes-from- pictures-or-masking-entropy-4d050d148539)

</comment></comment><comment><USER8> Does anyone know of work on nth dimension mazes?

Back in the 90s I had a great maze generator/game that generated mazes with over/underpasses between points. I've also played around in some physical 3d mazes made of lumber. Not just walls, but several layers of paths above and below each other like a big rubix cube (great drunken fun). So what would a 4/5/6d maze look like?

</comment><comment><USER9> Not a big maze fan (sorry) but reading the comments and following some of the links, I cannot help but give a shout out to the incredible "Maze" by Christopher Manson. Reminded me of the classic "Masquerade" by Kit Williams.

(I hope everyone is familiar with both books.)

[https://www.goodreads.com/book/show/99048.Maze](https://www.goodreads.com/book/show/99048.Maze)

<comment><USER10> Thank you for this link! Definitely gonna add this to my coffee table!

</comment></comment><comment><USER11> I would love to plot some of these out with a pen plotter!

</comment><comment><USER12> Seems like the connected-vortices mazes are easy to solve if you start by just figuring out the maze of vortex-connections first (which is very small), and then just checking each individual vortex. (Sometimes a vortex will have several paths which aren't actually connected internally, but that should come out in the second step.)

<comment><USER13> I think one would have to attack it the other way: focus on each vortex first, classify its connectivity. Since I think any path from East to West would break a path from North to South and vice versa, you'd have to classify each vortex by what it connects, down to one of:

        {., NE, NW, ES, SW, NS, EW, NE/SW, NW/SE, NES, NEW, NSW, ESW, NESW}

In a more visual language you'd have 5x5 tiles which the bigger picture is made out of:

        \   /    \            /    \   /    \   /    \  /
         \ /      \          /      \ /      | |      ‾‾
          X        X        X        X       | |
         / \      / \      / \      /        | |      __
        /   \    /   \    /   \    /        /   \    /  \

        \            /             \            /    \   /
         \          /               \          /      \ /
          \        /        X        X        X        X        .
           \      /        / \      /          \
            \    /        /   \    /            \

Once you've figured out each individual vortex I think solving the bigger problem is probably doable?

</comment></comment><comment><USER14> I have to say I've never really found a maze that was challenging enough to take more than a minute or so to solve. Some of these mazes look much more difficult than anything I've seen before. Very cool and creative!

<comment><USER15> > I have to say I've never really found a maze that was challenging enough to > take more than a minute or so to solve.

[http://www.astrolog.org/labyrnth/maze/larger.gif](http://www.astrolog.org/labyrnth/maze/larger.gif)

Enjoy!

Note: This is from the "Think Labyrinth!" site mentioned on the Maze Design site:

[http://www.astrolog.org/labyrnth/maze.htm](http://www.astrolog.org/labyrnth/maze.htm)

It is also not the "largest maze" on that page by far; there are a couple of larger ones (as zip'd files), and likely those aren't the largest today.

I'm pretty certain they are just meant as "art" \- and not to actually challenge someone to solve them; but if you are so inclined, go for it!

EDIT: I just wanted to add a bit more about the "dense maze" \- the start/end is at the upper-left/lower-right of the maze; the white line is the "path" of the maze (black being the walls). Note how the image "changes" depending on the level of "zoom" \- if you fit it to a smaller size, the "white" of the image will take a "cross shape", while other areas are "darker" \- zoom in on those various areas, and notice how the path changes; it's a very complex construct!

<comment><USER16> In related news I just found a way to lock up mspaint using flood fill. 7 minutes and counting so far.

<comment><USER16> Update: nearly 3 hours now and still going. Feels like there might be a CPU benchmark here.

Update final: After just over 4 hours it appears to have given up without actually filling anything.

<comment><USER17> I just did this too after reading your comment.

Cue "I don't know what I expected" meme.

</comment></comment></comment></comment></comment><comment><AUTHOR> a-maze-ing!

<comment><USER18> It had to be said.</comment></comment>


Ask HN: Are those "bug bounty" emails legit? - <AUTHOR> The startup I work for just officially launched a few days ago and we are already got two emails from "security researchers" telling us they found a security vulnerability in our website and asking us if we offer a bug bounty reward (we can't afford one right now).
Here's one of the emails:

  Hi,

  I just found a Vulnerability in Website can I report it here?
  Do you have Bug bounty/reward program for reporting Bugs?

  Thanks and Regards
 Are those emails legit? Are those researchers just sending emails new startups to build a list of those which do offer bounties? I find it improbable that a researcher would have had time to find a serious security vulnerability in our website in such a short amount of time but I obviously can't completely exclude that possibility.
Should I reply to the email? Just ignore it? <comment><USER2> Yes, you should reply. What's the risk? The protocol is that they disclose their discovery to you first and then you reward them.

If you honestly tell them that you plan to offer them no reward, then you and they can feel comfortable continuing the transaction knowing the terms have been made clear to all parties.

</comment><comment><USER3> Hey, I run a private bug bounty program on HackerOne and we get those emails regularly, most of the times they did not find anything serious and they are just checking if you have one to see if they should invest time in it.

With a new startup and nobody looking at it they are more likely to find something :) You should just be honest and tell send to the details to email@example.com you can also create a private program on one of the bug bounty plateform and invite them, they will get reputation/kudos if they find something.</comment>


Pay with Loop - <AUTHOR> http://www.kickstarter.com/projects/loop/pay-with-loop#

<comment><USER2> Loop is a great hack, but my only concern with this system is that merchants in Europe are many times obliged to ask for the buyers' ID when paying with mag stripe CC. This means that users need to have their physical CC at hand at all times. I know this ID thing is not the case in the US but this can be a legal issue in Europe.

On another note, does anyone know why the US has not transitioned to chip and pin cards?

<comment><USER3> I just got back from Europe where I used my mag stripe card quite a bit. In the UK I was asked for an ID almost 100% of the time and merchants seemed do a good job of actually matching data, and then matching my photo id to me.

In France it was hit or miss, I'd say maybe 25% of the time I was even asked for an id for a transaction.

</comment></comment><comment><USER4> Here in the UK (and I think much of Europe) we stopped using the mag strip and switched wholesale to Chip and PIN in around 2004. What's more I live in London and I'd say I now complete >75% of my purchases using the paywave contactless payment system. I guess most point of sale devices still have the mag strip readers on them, but I can't see people going for this in a big way here ... its a cool hack but it seems like its sort of hacking a payment technique that's a decade out of date.

</comment><comment><USER5> Wow. A _lot_ of payment card related posts today.

<comment><USER6> I submitted a link to this one a month ago that went nowhere; they're getting traction today because the Coin story in the morning spurred interest. Some of today's links are products announced in 2012.

</comment></comment><comment><USER7> Considering merchants' reaction to NFC is already somewhat uneasy, I'm not really sure how this would work out.

After using (and attempted using) NFC in many places, I started feeling like NFC as a replacement of credit card is not a right direction considering it doesn't really solve the problem of credit card (other than not carrying so many cards with you) especially when you can use a credit card for just about any purchase big or small.

Perhaps the only way these can take off is if you can approach as "NFC as extension to cash" which may be why it was embraced widely in Japan for instance, where micro transactions (and some extent, _any_ transactions) with credit card is somewhat discouraged.

</comment><comment><USER8> Guys, chill out, I am perfectly able to carry more than one credit card in my wallet.

</comment><comment><USER9> Of course, it's great that it's compatible with existing systems.

It'd be nice if the part that's making payment is disconnected from my phone so I wouldn't have to hand over my phone to someone else. A potential short term solution would be to allow me to lock my phone with a pin and still have this work.

A lot of merchants want to see the physical card when making payment. I'd imagine many would be skeptical of something like this.

It's really nice to see all these ideas trying to crack the payment code. Keep at it!!

</comment><comment><USER10> I'm actually worried about security here...

I don't know much about magnetic strip card technology, so I'm curious to know whether a malicious user could capture the signal and replay it.

<comment><USER11> Yes, it can

It's still not clear to me how the card data goes to the POS equipment, is it NFC or something else?

<comment><USER12> In the video they mention that they 'broadcast' it, I suspect that means they are actually pushing out a straight magnetic signal which seems to the reader that a card has been swiped.

I don't think it could be NFC, as most merchant readers wouldn't have NFC built in.

It also explains why they need the special case or dongle, it doesn't appear that it can work with just your phone alone.

It's a pretty innovative hack, but on the security issue, if you card is broadcasting it's data, then I assume anybody can pick it up, but they would need to be REALLY close.

<comment><USER13> They mention in their video or kickstarter site that you have to be within 4" of the mag reader.

</comment></comment></comment></comment><comment><USER14> I worked for a mobile/online payments company in 2011, and the industry has huge potential for disruption. The transaction volume is so high that even a slice of a slice means huge returns. Cross one border and the regulatory/compliance landscape changes dramatically too.

The winners in this space are typically those who can get the most device manufacturers, banks, visa/mc/amex, and merchants to play nice.

</comment><comment><USER15> All the merchants have excited reactions but there is a camera in the room and I'm sure they've been told what's going on. I think if I were to pay like this somewhere, the reaction would be more like "wait, did you just hack my payment system? Please stay here while I call my manager."

</comment><comment><USER16> I prefer the security and convenience of having only two cards, a debit and a credit card. Unfortunately for many, making it even easier to use their cards will simply load them up with debt.

<comment><USER17> I don't think that's legitimate. It seems incredibly unlikely that having to use multiple different physical cards would ever be a barrier to someone who was going to get into debt.

</comment></comment><comment><USER18> Just when you thought you've seen the last card payment idea, lo and behold there's another one. I'm fascinated with how many startups are in this space.

</comment><comment><USER19> Awesome tech, but I don't see myself handing over my phone in a busy restaurant/bar -- you don't usually get to swipe your card yourself there.

</comment><comment><USER20> The case is huge.. and actually I don't understand the problem they are solving. Maybe I'm just too old.

<comment><USER6> The case is the size of a phone, because it's a phone case. If you prefer something smaller, their first product is a 1.5" keychain fob.

The end-goal of Loop and other tech like it is to make your phone (or smart watch) the only device you have to take with you when you leave home. You'll be able to pay for anything, use your store reward/loyalty cards and open the doors to your house with it. I'm almost there myself -- I don't carry keys, my supermarket has an app for the loyalty card that scans my screen instead of a card, I can pay at lots of stores with Google Wallet by tapping my phone on the credit card terminal, and my drivers license slips between the phone and its case.

The only thing nobody's done yet (AFAIK) is replace the "intelligent key" fob for my car. I can't start it without that.

<comment><USER20> I didn't mean width or height, I meant thickness, it seems to double your phones thickness.

See the video at the kickstarter at about 2:30

</comment></comment></comment><comment><USER21> So does this not work at all for PIN cards? Because I have seen very few swipe machines at least in France.

</comment><comment><USER22> The PCI people are going to have a conniption when they see this.

</comment><comment><USER23> People tend to lose their phones than a wallet.

</comment><comment><USER24> What happens at the restaurant?</comment>


Show HN: Chirpss – Hear when someone visits your website - <AUTHOR> http://chirpss.com/?rst <comment><USER2> This would be cool if it could filter for certain events like people subscribing, etc... there used to be something like this that played a "cha- ching" sound but I forgot what it was called.</comment>


Why there isn't a Print to PDF button on YC application? - <AUTHOR>

<comment><USER2> Why would there be one in the first place? Nobody has infinite time.

<comment><AUTHOR> I can only speak for myself, this would be a feature i would like to have.

<comment><USER3> I would have loved one: it's easier to share the application with co-founders and have them annotate it, before editing.

<comment><AUTHOR> One solution is to write the YC application using your favorite word processor (vi,Notepad,Word), and when finished copy paste the content to the application form.

</comment></comment></comment></comment><comment><AUTHOR> I am curious what kind of layout the YC reviewers backend as, maybe some reviewer can tell us.

</comment><comment><USER4> Some browsers (like Chrome) can "Print" any page to a PDF file. It's a great feature.

<comment><AUTHOR> yes, you can do this but you don't get a refined print and not human or printer friendly, and if you are doing it on paper you waste a lot of sheets (13 to be exact).

</comment></comment><comment><USER5> People complain about everything.

<comment><USER6> It's true. And then someone will claim it's horribly broken and fix the problem. Most of the time things aren't actually broken though. It's usually the story of a complex evolution that had to take into account a lot of different scenarios.</comment></comment>


Top 21 Java Inheritance Interview Questions and Answers - <AUTHOR> http://java67.blogspot.com/2016/03/top-21-java-inheritance-interview-Questions-Answer-Programming.html <comment><USER2> Question 1) Should inheritance be used?

Answer: no</comment>


The Daily Spin – Feedback from cyclists would be appreciated :) - <AUTHOR> https://dailyspin.co/ <comment><AUTHOR> I'm a keen cyclists doing over 300 km per week and I find it really hard to stay on top of cycling news... So I built this little web application last week that aggregates cycling articles, news and reviews from around 18 of the top publications around the world.

[https://dailyspin.co/](https://dailyspin.co/)

This is just a passion project but feedback from cyclists would be appreciated.

Tech stack: \- Django 2 \- Postgres \- Elasticsearch \- Redis

Thanks!</comment>


How much usage can a Lego piece take before it loses its 'clutch power'? - <AUTHOR> http://phillipecantin.blogspot.com/2013/02/legos-magic-number-is-37112.html <comment><USER2> My first tech job was testing software at Hewlett Packard, circa '96-97. One of the projects I worked on was HP's first (I think) digital camera. The hardware testing was apparently running behind due to challenges the hardware team was having with abrasive qualities of some of the paints they'd chosen, and one day a bunch of us were asked to go help expedite some hardware tests.

Every button, latch, and moveable part on that camera was rated to a certain number of presses and uses. A team of folks (which for one day that winter included myself) sat in a room pressing buttons and drawing notches on a sheet of paper until the product failed or qualified. It was kind of eye opening, actually. For weeks afterward I was nervous about whether the next button press on my tv remote was the last :)

I'm curious, 16 years later.. How much of this testing is remains so manual? At HP I think the number of products and rate of change in early development made building fixtures to do this sort of thing pretty costly compared to low wage human testers.

<comment><USER3> Regular testing that you'd expect to do many times, and that's part of your product development process, is almost certainly automated.

But one-off tests are still squarely in the territory of Ye Poor Intern. I remember interning at an auto parts plant years ago where I spent two whole days stuck in a windowless lab where I laser-measured the precise diameter of a batch of motor shafts because there was suspicion of a defect from the supplier.

It's the sort of mind-numbing repetition and boredom that threatens to liquefy your brain, and to this day gives me a greater appreciation for how good I have it writing code for a living :)

(the fact that I was using _frickin' lasers_ to do my job was novel for only the first half hour)

Certain _parts_ of automated testing are still manual too. In the aforementioned plant I was responsible for going into the oven and making measurements every few hours and measuring hundreds of things as part of the heat-cold cycle testing, even though the actual temperature shifting and vibrational stress was fully computer-controlled.

Good times. Glad I'm in software now.

<comment><USER4> I have similar experience in an an auto-parts manufacturing setting, where they had tried (and failed) to develop an automated system for their defect testing. However, since the area was "visual defects" and not functional defects (this certain component was in a very eyeball-attracting part of the vehicle cockpit), it was discovered that humans are far more capable than this kind of affair than computer vision at this time.

</comment></comment></comment><comment> martin-adams After 4 days 6 hours it did 36,720 iterations. After 10 days it failed on 37,112 iterations.

It takes 10 seconds per iteration. My calculations say it would have failed after 4 days and 7 hours. I wonder what happened to the other 5 and a half days.

Very cool experiment. It's this type of testing that makes me feel reassured in mechanical engineering. It's about reassuring that a car air bag will work after years of inactivity, or a car seat belt buckle will not break under pressure in a collision. The only way to know is to test, test, test.

<comment><USER5> I'm the guy that built it: During the tests, I had to guess the current count based on the estimate that one full iteration was about 10 seconds. This was not a good estimate and it made me overshot the actual number. When the test was finally over I was able to see on the SD-card the final 'real' total of 37,112. I'm making a new video explaining some of this.

<comment><USER6> Honest question: do you think it matters that the bricks are attached with a radial motion rather than linear? From my personal usage, I tend to press all areas down at the same time rather than one side fully contacting before the other. I would imagine the wear is different between these two cases.

<comment><USER5> You're right and this is why I intend to build a better rig. More answers in this new vid I just uploaded: <http://www.youtube.com/watch?v=VLt8HkIOAuY>

<comment><USER7> I like your plan of testing LEGO bricks[1] from different eras, but I would recommend you use the same rotary mechanism for all the tests. If you change the mechanism to a linear one, you won't be able to compare with confidence the first (rotary) test with any follow-on linear actuator tests.

OTOH, if you repeat the (rotary) 70's era test with the linear actuator, that would be interesting estimate of whether a rotary actuation is better or worse for the brick longevity. Of course, you will still have a sample size of one, so your confidence interval will be meaningless. I can see this turning into a lifelong obsession... ;-)

[1] <http://aboutus.lego.com/en-us/legal-notice/fair-play/>

<comment><USER5> Once I have a new test machine that his much faster I will indeed retest all the eras (with multiple tests per era). Of course this time I plan to build a real sound proofing system around it. This last machine was really annoying.

</comment></comment></comment></comment></comment></comment><comment><USER8> I am so impressed by the mechanism used to hold and release the bottom piece -- it's an elegant, simple solution that fully demonstrates why I lack the talent to be a practical engineer.

<comment><USER9> It's not about talent, it's about practice. This isn't genius level engineering, it's competence and experience.

<comment><USER5> (I'm the guy that built it): Totally true, I build a lot of stuff and the goal of this build was to make it work fast. In doing so I realized that I underestimated the strength needed to assemble and disassemble LEGO bricks. I actually planed to build a much better one using linear motion instead of rotation motion.

<comment><USER9> And, just so it's completely clear, I'm also by no means claiming you aren't talented (although I think the greater compliment is to observe that you are a hard worker). I'm just trying to make sure this guy knows that what you've done is easily within his reach, if he wants it and works at it.

<comment><USER5> No sweat. your comment was right. I'm no engineer but I build stuff all the time for the fun of it.

</comment></comment></comment></comment></comment><comment><USER10> Alternatively, don't use the bricks for 20-30 years and they will fail within a dozen assemblies. Plastic loses its elasticity so the older bricks just crack when are forced to connect.

\--

(edit) "Plastic" = "plastic used in Lego bricks that were included in Lego Space sets sold in the early 80s in Japan."

<comment><USER11> "Plastic" is not one material, but many. Some degrade spontaneously over a timescale of a few decades; others don't. Is your statement a result of testing Legos, or a guess based on experience with other things, perhaps made from a different plastic? Chuck McManis above said his experience was that his 40+-year-old Legos work fine.

<comment><USER12> Given that LEGO bricks are made of ABS plastic it very well could have had any number of formulations where some years it was weaker than others. Should be possible to test that.

<comment><USER13> Early bricks were cellulose acetate based.

<comment><USER12> Interesting, The Wiki says up until 1963, didn't know they changed the formula at all. Be interesting to see how well ones from before and after the change held up comparably.

<comment><USER13> I have a bunch of the very early ones, the differences with early ABS are:

\- changed shape slightly, some warping

\- the colours faded

\- they became quite transparent

\- they don't bind at all or very very loose

The early ABS ones are about as good as new other than being dirty and a couple of scratches. No discolouration, they bind just fine, no warping as far as I can measure.

<comment><USER12> Cool, they must have had some great QC with the ABS to do that well for so very very long. I'd love to see the acetate ones in a picture if they went transparent, that's a really neat "failure" mode.

</comment></comment></comment></comment></comment></comment></comment><comment><USER14> Related discussion about the durability of Lego posted a few months ago on HN: <https://news.ycombinator.com/item?id=5040545>

PS: One of those strange and seemingly random usage differences between British and American English is the latter's use of a plural, "Legos" (or perhaps more accurate to say, use of the word "Lego" to denote "a Lego piece" with resultant plural), which is never used in the UK and always sounds odd to my ear (British Lego being like sheep ...)

<comment><USER15> It's LEGO-fan usage more than British/American difference. A fan always says "I play with LEGO, this is a LEGO brick, hand me some of that LEGO" whereas a casual user might say "Scoop up some of those LEGOs; I play with LEGOs."

<comment><USER16> It may be a fan usage thing in American English, but I've never heard any British person talk about LEGOs.

<comment><USER17> Yeah, I've never heard anybody in Australia say "LEGOs". It's always been an American thing to me.

Also, depending on the particular American accent involved, I often find the pronunciation quite unusual. Sounds more like "lay-goes" than "leh-goes", similar to the way some Americans pronounce the word "leg".

</comment></comment></comment></comment><comment><USER18> "It's long, noisy and cruel to LEGO bricks."

Now I'm curious: how well do the lego knockoffs hold up?

<comment><USER19> From my experience, some of them don't even hold correctly on the first snap. To be fair, they were not MegaBlocks, but some other cheap brand.

<comment><USER20> In the last year I've probably put together 20-30 sets of various size (50 pieces to 1000 pieces) and some lego don't hold at all out of the box either. Lego is super easy to deal with for broken or missing pieces from sets which is the only reason it doesn't bother me too much.

</comment></comment></comment><comment><USER21> Seeing this want me to play with Arduino, not lego. I call this a success. Going to look into Arduino now. Thanks!

<comment><USER22> I felt the opposite. Are you ever too old to play with Lego? :-)

<comment><USER23> When you get old enough, you get to play with Lego _and_ Arduino (way more fun than Mindstorm).

</comment></comment></comment><comment><USER24> That was such a fun read. I have wondered about this but never tried it.

Strangely perhaps some Legos from my childhood still snap well (and they are like 40+ yrs old). Kinda makes you want to figure out how the formula changed over time.

<comment><USER25> I highly doubt you used any of your pieces 37000+ times. You are not comparing the right things.

<comment><USER24> I am sure I have not come close to 37,000 times. I have observed that Legos we got for our kids vs ones that we had from when we were kids, are different. I'm tempted to test both 'vintages'. I've also got some from the Lego Dacta catalog when we were building robots out of Legos using the MIT 6.270 build guides. They are slightly different too.

<comment><USER26> Plastic has got a lot better, remarkably in the past 20 years. The new ones are probably much more resilient.

fond memories of disintegrating rubber and plastic from the 90s

</comment></comment></comment></comment><comment><USER27> One of my favourite sales gimmicks is the wooden butt at Ikea - the testing machine, displayed alongside the Poang chairs, endlessly "sitting" and "standing".

<http://www.youtube.com/watch?v=4s_gyzshNPQ>

</comment><comment><USER5> I made the front page of Make magazine blog... Yeah baby! <http://blog.makezine.com/2013/04/17/stress-testing-lego/>

</comment><comment><USER28> How many licks does it take to get to the middle of a tootsie pop?

<comment><USER26> 3481

[http://www.wolframalpha.com/input/?i=How+many+licks+does+it+...](http://www.wolframalpha.com/input/?i=How+many+licks+does+it+take+to+get+to+the+middle+of+a+tootsie+pop%3F)

</comment></comment><comment><USER29> It would be interesting to see the cycles-to-failure distribution for these parts. I wonder if the textbook "bathtub" curve would appear even for such a simple piece.

</comment><comment><USER30> Why does everything have to be its own youtube video?

</comment><comment><USER31> This... is... QA!</comment>


Do no harm - <AUTHOR> https://www.vox.com/2015/7/9/8905959/medical-harm-infection-prevention <comment><AUTHOR> Quoting:

 _There is a crucial difference between the automobile and aviation industry. Car companies acknowledge the idea of a "one-off event": that some accidents are unavoidable, no matter how much work goes into prevention. In the aviation industry, however, one-off events just don't exist. Airplane manufacturers treat each crash as potentially preventable and work backward to figure out how it could have been prevented._

 _A similar divide exists in modern medicine, when it comes to patient harm — especially for patient harm from central line infections. There are hospitals in the United States that view some level of central line infections as a sad but inevitable effect of putting thousands of these tubes into patients' bodies each year. And then there are other hospitals that see each central line infection as a failure that requires investigation and better preventive techniques in the future._

 _In other words, there are car crash hospitals and there are plane crash hospitals._

What kind of developer are you: a car crash developer? Or a plane crash developer?</comment>


Show HN: Sparser – A Multilanguage Parser - <AUTHOR> * https://sparser.io
* https://github.com/Unibeautify/sparser
This is my attempt at creating a universal language parser.  It attempts to solve a couple of problems:
* Support multiple languages
* Recursively extend support to languages embedded within other languages
* Output a uniform format for all supported languages
This is a personal project so any feedback would be helpful.  Something interesting I found after I built it is that this parser is not as fast to write output as many other JavaScript parsers, but its output is much faster to read from due to the simplicity and predictability of the format. <comment><USER2> I think the emphasis on embedded languages is interesting. A lot of modern code is stuff like js-in-jsx-in-html-in-yaml etc., a fact which isn't really addressed by most tooling.

It seems like you're aiming to make a more flexible lexer, with support for nested contexts. My immediate question is how this differs from a grammar- driven parser. Does it handle types of embedding that can not easily be encoded as CFGs? Or is it faster or simpler than e.g. an Earley or LR parser? I couldn't find an answer to these questions on a casual read of the docs.

<comment><AUTHOR> The biggest short-coming I have found with my approach is that I have not systematically mapped out the language nesting identity. At the moment I am utterly reliant upon rules in a given language to identify the thing that is nested. For example I know that stuff in an HTML style tag will be CSS, because the rules of HTML say so.

This approach has limitations where the relationship between an embedded grammar is not clear. Is a markup grammar that contains something like Liquid template tags HTML or XML? How do you specify the code by language name, because the embedded grammar is the Liquid tags but you want to identify the grammar of the template tags apart from other template languages. What if a markup language instance contains template tags from unrelated grammars?

I could auto detect the language each time the grammar changes, but that would be slow and introduce unexpected results. The precise solution would be to allow users a means to define nesting based upon syntax or structure and I have not thought through this yet.

</comment></comment><comment><USER3> I like the uniform output, nice work!

I personally think its easier to use something like the `sublime-syntax` grammar format to define a lexer (with a project like syntect[1]), rather than implementing each language's lexer as code, but that would need some extra annotation to get such a nice structured output. The bonus, however, if someone where to work on such an addition, would be that syntax highlighting will use the same engine and deal with incomplete/incorrect code consistently

[1]: [https://github.com/trishume/syntect](https://github.com/trishume/syntect)

</comment><comment><USER4> It would be helpful if you say that your focus is markup, scripting and styling languages and not programming languages in general or even natural languages.

This is far from a "universal language parser".

<comment><AUTHOR> I have intention to extend support to other languages, such as PHP or Python. I just haven't written that code yet. It mostly seems to work with Java and C# right now, but I lack the tests necessary to guarantee such support.

</comment></comment><comment><USER5> > [https://sparser.io](https://sparser.io)

Your home page eats my CPU and makes my notebook hot enough to boil water.

Whatever you're doing on that page, please stop it.

<comment><AUTHOR> The cpu burn is actually gpu burn. It is caused by a subtle animated effect in the background and impacts Chrome more than all other modern browsers combined. I will be turning this off in the next release.

<comment><USER5> Thank-you

</comment></comment></comment><comment><USER6> why is it that when the input is (excluding all quotation marks)

"obj = {};" the last token is ";"

but when the input is "obj = {}" the last token is "x;"

does "x;" mean an implicit ";"?

<comment><AUTHOR> I introduce pseudo tokens in place of missing syntax. Using the option _correct_ converts the pseudo tokens into actual tokens. The pseudo tokens always start with _x_ and can be easily ignored or discarded by any consuming application.

I include the pseudo tokens for two reasons. The first reason is that they allow the parser to reason about the code more closely to the language specification. For example the specification says statements MUST be terminated by a semicolon and if a semicolon is not provided one will be inserted automatically (ASI). The second reason is that the pseudo tokens are necessary to eliminate certain ambiguity necessary for some advanced features.

</comment></comment><comment><USER7> > The Universal Parser

> Doesn't actually parse, it's a lexer.

Good lord!

<comment><AUTHOR> A lexer is a scanner that creates a token list. A parser may contain lexers and outputs a data structure.

* [https://en.wikipedia.org/wiki/Lexical_analysis](https://en.wikipedia.org/wiki/Lexical_analysis)

* [https://en.wikipedia.org/wiki/Parsing#Parser](https://en.wikipedia.org/wiki/Parsing#Parser)</comment></comment>


How to Use Both Your Wits in a Startup - <AUTHOR> http://blog.ycombinator.com/how-to-use-both-your-wits-in-a-startup/ <comment><USER2> I started to read TFaS awhile back and quickly got bored of it, because the conclusion was very obvious and needed no more explanation beyond the $1.10 example provided early on.

It became quite obvious that it's hopelessly impossible to eliminate the myriad of nearly infinite biases we all have - something that has been separately established by my own beliefs anyway (Jeremiah 17:9). Not to mention there's a far easier way to limit bias in decision making: Ask a few others for feedback (Proverbs 15:22).

What I find funny is that there is supposedly a "comprehensive" list of "20 Cognitive Biases", as if that somehow covers 90% of one's regular biases in decision making. Everyone is biased in tens of thousands of particular ways simply based on the seemingly infinite different combinations of limited life experiences we have -- and many of those biases are unconscious, unintended, and so subtle that they simply evade detection unless there was another to point them out.

That's why I think it's better to live with bias, which is to say that I ask myself if I'm making a decision that is biased toward love, grace, and kindness. Use your precious "system 2" energy to bias yourself toward those things. It's the same as recognizing counterfeit currency - a man doesn't study the infinite possible counterfeits, he studies every detail of the authentic bill. And through that training to bias himself toward what is genuine, he gains the ability to immediately recognize the counterfeits.

</comment><comment><USER3> Hey HN, this is Ben, the author.

Happy to answer or clarify any questions.

<comment><USER4> Besides "Thinking Fast and Slow", what are some good books you would recommend?

<comment><USER5> "Sources of Power: How People Make Decisions" by Gary Klein.

It talks about how experienced people can make higher quality decisions by taking into account their intuition vs just trying to decide using logic.

[https://www.amazon.com/Sources-Power-People-Make- Decisions/d...](https://www.amazon.com/Sources-Power-People-Make- Decisions/dp/0262611465)

</comment></comment></comment><comment><USER6> > Instead of eliminating our intuition, we should be learning to train our > massive parallel System 2 to help aid the slower logical System 1 process.

This looks like a typo; "System 1" and "System 2" should be swapped.

<comment><USER3> Whoops! Thanks.

<comment><USER7> Is that fixed now? I remember getting this the wrong way round myself too. It's not obvious either way which way it 'should' be, so it is a terrible naming decision.

<comment><USER6> I think of "System 1" as the one that evolved first.

</comment></comment></comment></comment><comment><USER8> I found the writeup valuable in terms of provoking deeper thought and discussion.

However, I think perhaps the author is mixing up 'both wits' (logical vs emotional thinking) with the two systems thinking from the TFaS book(intuitive vs logical thinking), at least in the writeup.

I am more inclined to believe that intuition and logic based thought processes are superior to one that has an emotional dimension, at least for running a business.

As an example, I think if in the Cheezburger case the author was less emotional, he would have responded rather than reacted to the perceived threat- which is arguably a better way to deal with the situation.

Lack of affect(especially fear) is a defining quality of psychopathy, which happens to be very common amongst CEOs [1].

[1] [https://en.wikipedia.org/wiki/Psychopathy_in_the_workplace#C...](https://en.wikipedia.org/wiki/Psychopathy_in_the_workplace#Careers_with_highest_proportion_of_psychopaths)

</comment><comment><USER9> I find not following intuition leads to more regret than following it and being wrong.

</comment><comment><USER10> The intro calls emotional reasoning "logical reasoning". Fear is an emotion.

The problem with logic is it proceeds from facts. It doesn't account well for unknowns, nor the "unknown unknowns".

</comment><comment><USER11> Crockford talks about this using the same reference material [https://www.youtube.com/watch?v=_EANG8ZZbRs](https://www.youtube.com/watch?v=_EANG8ZZbRs)

<comment><USER3> Cool. I'll take a look. They are excellent reference materials. :)</comment></comment>


Dark Market Regression: Calculating the Price Distribution of Cocaine - <AUTHOR> https://medium.com/thought-skipper/dark-market-regression-calculating-the-price-distribution-of-cocaine-from-market-listings-10aeff1e89e0 <comment><AUTHOR> This won 3rd place in the November Kaggle Dataset Publishing Awards.</comment>


U.S. suspending visa services worldwide due to coronavirus - <AUTHOR> https://www.reuters.com/article/us-health-coronavirus-usa-visas-idUSKBN2153NP <comment><USER2> Headline is misleading as USCIS is suspending _in-person_ visa operations. Renewals and transfers of US visas are often conducted via courier and post.

From [https://uscis.gov](https://uscis.gov)

> As of March 18, U.S. Citizenship and Immigration Services has suspended > routine in-person services until at least April 1 to help slow the spread of > Coronavirus Disease 2019 (COVID-19). USCIS staff will continue to perform > duties that do not involve contact with the public. However, USCIS will > provide emergency services for limited situations. To schedule an emergency > appointment contact the USCIS Contact Center.

<comment><USER3> Agreed. That's a pretty big omission by the OP

<comment><USER4> It is the exact title used by the Reuters article. It's a pretty big omission but not by OP.

<comment><USER3> Fair. Thanks

</comment></comment></comment></comment><comment><USER5> After nearly two years of waiting for paperwork to be reviewed by CIS and Department of State and for an appointment at the consulate, my partner received the entry visa and passport in the mail only three days ago. I am truly sorry for anyone who is about to start this process because it will take even longer on top of what is already an inhumanely lengthy amount of time to bring someone into the U.S.

<comment><USER6> Yes it took me a year to sort out my visa. When I read this news I thought "how will anyone tell the difference?"

<comment><USER7> I applied for Global Entry _months_ after the 2018/2019 government shutdown, and it was still significantly backlogged because of it.

<comment><USER8> I did too. My in person interview consisted of me showing them my drivers license and verbally confirming my email.

Honestly I was pretty pissed that I needed to spend so much time waiting and scheduling around a trip to the office for that.

</comment></comment></comment></comment><comment><USER9> As a Canadian that was supposed to do an internship at FAANG this summer the situation is looking worse everyday.

I know some managers at Microsoft are considering remote interns but it will be far from the same experience.

<comment><USER10> >but it will be far from the same experience

why do you think so? except for free food and the city life of whichever city you were supposed to be in, what's the difference?

<comment><USER11> You'll largely miss out on the social aspect of all the other interns, for one.

<comment><USER10> does not being able to socialize qualify as "far from"?

<comment><USER12> For a lot of internships, socialization is very significant. It really depends on the intern and the team, of course.

</comment></comment></comment></comment></comment><comment><USER13> I was just finalising some documents before booking an interview at the Melbourne consulate for an E3 work visa.

I have no idea what to do now.

<comment><USER14> Email them, probably, ASAP. These things take some time to propagate some times.

<comment><USER13> Hopefully I'll be able to get an expedited apt before they close it completely. This was a dream job at the tail end of a 6mo+ process.

<comment><USER15> Australia might be a better place to be in another 6 months.

</comment></comment></comment></comment><comment><USER16> How will this effect existing H1Bs?

<comment><USER17> Why would current H1Bs be impacted? They already have their non-immigrant visa no?

<comment><USER18> They'd be impacted if their visa is due for renewal.

<comment><USER19> Britain has been extended some visas, recognizing that it's sometimes unreasonable (person from a country with more cases) or impractical (lack of flights) for people to leave when they expected to.

The current extensions are only to 31 March, but maybe they will increase again after that.

[https://www.gov.uk/guidance/coronavirus-immigration- guidance...](https://www.gov.uk/guidance/coronavirus-immigration-guidance-if- youre-unable-to-return-to-china-from-the-uk)

</comment></comment></comment></comment><comment><USER20> This is probably a really huge blow to the Pleasant Green Youtube channel. Ben was trying to get a visa for a Cameroonian woman needing surgery in Miami, and now this. Hopefully they can get beyond it.

</comment><comment><USER21> Guess I'm not renewing my expiring passport any time soon… I'm a US citizen

<comment><USER22> Same. Passport expiring soon. I'm living in the UK and can't go home to the US right now (well I could, but it would require a 2 week quarantine). It's mildly disconcerting, I hope this doesn't really go on for 18 months.

<comment><USER23> > well I could, but it would require a 2 week quarantine

That's actually quite reasonable as most folks are effectively shelter-in- place. Not a big deal, but would you really want to fly in these conditions? Expired but valid US passport = you can still re-enter the USA.

<comment><USER22> I definitely wouldn't want to fly now, no (I'm also sheltering in place). For me it's more of an existential panic that if there were some emergency it would not be feasible for me to return home quickly.

</comment></comment></comment></comment><comment><USER24> I panicked for a moment because I thought it's about Visa not US visa and it made no sense.

<comment><USER25> We don't want the virus to jump to cross the digital divide, so we're taking every precaution. Stay tuned for updates about MasterCard and Discover.

</comment></comment><comment><USER26> I'm gonna back pedal here and delete my earlier comment.

<comment><USER27> Agreed with your previous comment.

<comment><USER28> What did it say?

<comment><USER27> Basically what I've been "soap boxing" about. ;)

</comment></comment></comment></comment><comment><USER27> I struggle to see how bringing the economy (& everything around it) to a grinding halt will help.

What happens when we "press unpause"? Do people really believe the virus won't be there afterwards?

<comment><USER29> It stops the spread of the virus. If you did nothing 5% would die and worse those that have recovered have problems breathing (can't walk up stairs).

Life would come to a halt regardless.

<comment><USER27> No offense, I know people who have recovered and none of them have any hint of anything afterwards.

<comment><USER29> No offense taken. I kind of worry about this mindset generally. It isn't real unless I know someone who is in hospital. It gets real quickly when you get sick.

<comment><USER27> I didn't mean to be so "anecdotal" here. I do know people who are fine, I've read stories of people who are fine, the data shows most people will be fine - except that elderly age group & folks with seemingly compromised immune systems. There are exceptions of course. And it is very real, but I think people need to be cognisant of data when citing mortality rates & incidents.

</comment></comment></comment></comment></comment><comment><USER30> We need to just accept 2-4 million sick and elderly Americans dying. That outcome cannot be any worse than complete economic and social destruction that we seem to be pursuing in the name of virus suppression.

Edit: I am specifically referring to the Imperial College report which outlines this scenario. Here is the original report: [https://www.imperial.ac.uk/media/imperial- college/medicine/s...](https://www.imperial.ac.uk/media/imperial- college/medicine/sph/ide/gida-fellowships/Imperial-College-COVID19-NPI- modelling-16-03-2020.pdf)

And here is a summary: [https://twitter.com/jeremycyoung/status/1239975682643357696](https://twitter.com/jeremycyoung/status/1239975682643357696)

<comment><USER31> That's not the only problem. Say you aren't high risk, great! But do you really want to live in a world without a functioning health care system. Because that is what you are promoting. When hospitals get overwhelmed, even minor issues can become catastrophic.

In a car crash? Need some surgical repair? Too bad, we're not open for business because we're trying to keep critically ill patients alive and need the gowns and equipment for healthcare workers.

<comment><USER30> That would only be the case for 3 months, after which those who were most vulnerable to the virus would have perished.

2.8m Americans die annually, basically we are just seeing 1-2 years of deaths brought forward into a 3 month window. It will be harrowing to triage those patients but it can be managed.

I would prefer that situation to living through a great depression. Healthcare is irrelevant without a job or any income whatsoever, with huge sections of the economy closed and extensive restrictions on what individuals can and can't do.

I have parents in their late 60s who are looking at their entire retirement portfolio evaporating.

I have a terminally ill sister and aunt who are faced with spending their final weeks/months in lockdown, with people unable to visit them or attend their funerals. They are struggling to access regular supplies due to hoarding.

<comment><USER32> The thing is these millions of elderly people dying are someone else's relatives.

It could even be yours.

Will you be ok with that?

<comment><USER33> What about the millions of elderly people who will die this year of natural causes and whose final moments on Earth will now be of loneliness, boredom, and despair?

Depending on the duration, of course, the lockdowns seem to have the potential to be much crueler and sadder than an earlier death.</comment></comment></comment></comment></comment>


When the Government Seizes Your Embryos - <AUTHOR> https://www.newyorker.com/tech/annals-of-technology/when-the-government-seizes-your-embryos <comment><USER2> If the laws are good, if I agree with the means and the ends, then I do not mind the wrong people defending it, or for the wrong reasons.

So let's all sustain for a second our disbelief and ignore all the value judgments, governments and churches involved. The crux of the issue is that the law changed to require that artificial insemination be available only to couples.

In my own country it seems adoption is also only available to couples (either legally or de facto), and it is near impossible for a father to win a custody case when divorcing.

I think the wider trend here is prioritizing some ideal of what would be the best outcome for the (future) child and most of society believing a single parent would not do as good a job as a couple, on a significant averages comparison, and that men are inferior child rears as well.

I don't know if it is true, but living in a democracy means common wisdom, anecdotes and tradition bend scientific and informed decisions.

<comment><USER3> Let's not summarize too much.

The crux of the issue is that the law changed to require that artificial insemination be available only to _straight_ couples.

</comment></comment><comment><USER4> I find it chilling that a government can force the donation of your genetic material "for the greater good". Unless we explicitly consent to our genetic material being used in a certain way (i.e. donating eggs or sperm) it's terrifying to think that we can essentially be forced to.

Also, see the case where parents got permission to use their dead son's sperm to create a grandchild. Presumably the parents picked the partner to conceive the grandchild.

[https://www.nytimes.com/2019/05/22/nyregion/west-point- cadet...](https://www.nytimes.com/2019/05/22/nyregion/west-point-cadet-sperm- grandchild.html)

<comment><USER5> My daughter should not be treated under the law as 'my genetic material'. Firstly, she is not just my genetic material, she is her mothers too. Secondly, she has her own genetic makeup being the product of two people. Thirdly, as a result of her conception and the fact that she is different genetically from both her mother and father and the fact that her interests as a living thing are not identical to her mother and fathers, she is actually a separate person, and thus my property rights over my DNA (if they exist) certainly ought not to affect how the law treats her best interests as a minor. Due to virtue of having separate interests, the law should primarily focus on her interests, and in certain cases, it would be appropriate to subsume my interests as her father (or her mother's interests) in order to best serve hers. This is not a novel application of law. The law exists in part to protect those who cannot speak for themselves, people such as minor children and the disabled. In these cases, the law infers their interests.

The same can be said of the children in question, who are not simply the property of the female lawyer. Although they share her DNA, simply sharing DNA does not give her the right to do with them as she pleases, just as my mother does not have rights over me (and neither does my father of course). Under this framework, no one is telling the lawyer what to do with her genes. They are telling her how she is to interact with other people, who in this case, happen to be her children and the children of whichever men fathered them.

<comment><USER4> In the case of the female lawyer, the government is deciding that it is better for the embryo to be implanted in a genetically unrelated woman because she has a partner, rather than the mother of the embryo herself. If you believe that an embryo should be treated as an individual, how is this different than forcing a single mother to give up custody of her child to be raised by strangers? What has the mother done to lose the right to raise her own child? Should single mothers lose custody of their children, since being raised by two parents is preferable? If not, why is okay for her to lose custody of her embryo?

In the case of the West Point cadet, they took his sperm and created an embryo after he died. He didn't explicitly consent to an embryo being created at all.

<comment><USER5> So I actually disagree with the Polish government here, but not on the grounds that a government should not be able to set policy in this area, but rather I think the policy they set is wrong.

<comment><USER4> I also think a government should be able to create policy in this area. What's horrifying is that the government has deemed it morally preferable to assign custody to strangers over the mother. Losing custody is usually due to things like neglect, child endangerment, drug use... now simply "being single" can be added to the list.

When two people who may disagree on the personhood status of an embryo can agree that this policy is bad. It must be a pretty terrible policy.

<comment><USER5> I don't object to the single mother part. I object to the adoption part of already created embryos. I don't think it's a bad idea to prevent the systematic creation of children alienates from one of their parents

</comment></comment></comment></comment></comment></comment><comment><USER6> Why is the Vatican opposed to IVF? Is it general, or situational?

<comment><USER7> FTA: "Many Catholics object to the fact that embryos are routinely discarded during the IVF process"

<comment><USER5> The Church also objects to the creation of the embryos even if none are discarded, and all are implanted and brought to term by the mother. You are citing an objection to abortion, but the Church is also against the creation of the embryos to begin with.</comment></comment></comment>


VENOM flaw, millions of virtual machines are vulnerable to attack - <AUTHOR> http://securityaffairs.co/wordpress/36787/hacking/venom-vulnerability.html

<comment><USER2> The discussion is over here:

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

Other sources:

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

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

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

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


10 Scientifically Proven Ways to Be Incredibly Happy - <AUTHOR> http://www.inc.com/jeff-haden/10-scientifically-proven-ways-to-be-incredibly-happy-wed.html?cid=readmore

<comment><USER2> Nothing new here: spend time with friends, exercise, meditate, give back. It is a bit of pop psychology.</comment>


The Uber effect: Seattle taxi industry revenue dipped 28% in past 2 years - <AUTHOR> http://www.geekwire.com/2015/the-uber-effect-seattle-taxi-industry-revenue-dipped-28-in-past-two-years/ <comment><USER2> I used to live in Seattle. The taxis were horrible: everything from attempting to hail a cab to calling the dispatch to the condition of the cabs to waiting for them. The Uber critics seem to forget how bad the industry Uber is disrupting actually is (or was).

Last time I visited I also noticed something interesting: fewer of my (remaining) friends there had cars. Many took buses to work but retained cars for the usual, occasional reasons. Now it's much easier to have reliable transport at times when Seattle's buses are inconvenient (which is really anytime after 7 p.m.).

</comment><comment><USER3> Lets see a competitor that has no restrictions against the taxicab companies.

And is it any wonder that the unrestricted competitor wins?</comment>


Software Is a Superpower - <AUTHOR> https://flaviocopes.com/software-superpower/ <comment><USER2> Boring advertisement blog full of choppy dreamy sentences.

</comment><comment><USER3> The tiny paragraphs are really jarring to read.

<comment><USER4> These are not paragraphs.

They are lonely disjointed sentences.

Floating freely.

In a sea of whitespace.

<comment><USER5> It's a draft for the blog post the author never wrote.

</comment></comment></comment><comment><USER6> I agree with the underlying sentiment and even find the subject matter inspirational, but the post falls pretty flat.

</comment><comment><USER7> I disagree with the article, for thousands of years _slavery_ was how you automated tasks at scale, and you could build massive impossible things this way.

Software is the tech equivalent, except the slaves are machines and tiny shell scripts.

<comment><USER4> By definition, machines (at least any built so far) cannot be slaves, so this is not a great equivalency.

At the very least it's a sign of amazing social and technological progress.

<comment><USER8> It really is pretty great. Getting automated out of a job sucks, but it beats being a slave forced to do that same job by a country mile.

It's interesting that as machines have become more powerful, slavery has become less and less profitable---but so has employment!

<comment><USER4> The logically conclusion is either mass starvation or abolishing wages.

Basic income is just a stopgap. In a hundred, or two hundred, or five hundred years, if technology continues apace, basically all work that is not science/caregiving will be done by machines. How can an economy based around wages exist in a world where humans don't work?

<comment><USER8> There's something of a Scylla and Charybdis thing going on, where if humans become too valuable, it becomes worth it to exploit them, but if they're not valuable enough, it's not worth it to pay them.

Tech can move things either way---automating things can make people worthless, but providing new tools (Engelbart's "bicycle for the mind") can make them _more_ valuable.

Formula 1 drivers are valuable athletes, but in 1850 they'd just have been guys with slightly better reflexes.</comment></comment></comment></comment></comment>


All 50 States Are Preparing to Tackle Robocalls in Telecom Deal - <AUTHOR> https://www.bloomberg.com/news/articles/2019-08-22/all-50-states-are-preparing-to-tackle-robocalls-in-telecom-deal <comment><USER2> About time. Anyone who blocks this needs a giant bright spotlight of negative publicity on them.</comment>


Introducing the PiCloud Notebook - <AUTHOR> http://blog.picloud.com/2012/12/23/introducing-the-picloud-notebook/

<comment><USER2> The iPython Notebook is really amazing which is seriously under utilised and under marketed.

Every "I will teach beginner to program" site these days creates a new platform which starts with "Enter you name in quotes" ends up re-inventing the whole server-client console thing. Not every one of these platforms does a great job at it.

All you need really is an iPython notebook (which btw can also be used for alternative languages, there is a fork that runs ruby) which has alternative "markdown cells" and the "console cell".

The tech behind the whole thing is rather impressive. It uses zMQ, Tornado and can connect multiple client terminals to the given server.

This can be integrated for development with web frameworks like django/flask and can be very useful for debugging.

</comment><comment><USER3> Was expecting a Raspberry Pi Laptop connected to iCloud or something.

<comment><USER4> Yeah I don't see any reason for this to be PiCloud over PyCloud. I don't know how long it's been named PiCloud but it seems like they're trying to cash in on Raspberry Pis success.

<comment><AUTHOR> PiCloud dev here. PiCloud has been in existence since early 2009. That we share a "Pi" with Raspberry Pi is just a coincidence; it didn't even exist when we were founded.

We aren't named PyCloud as that would imply we are solely for python, which we are not. While we have very close ties to python (namely the powerful language bindings), we support every programming language.

</comment></comment></comment><comment><USER5> Things the service needs to explain before I'd consider buying it:

Similar technology already exists in the form of Sage [1]. How is this different or better?

From a business standpoint, it's great to host the running code server-side: You can measure usage and charge heavy users, and you have a decent excuse to do so (market expectation that servers resources cost money). But what advantages does this offer that client-side Python in the browser, Skulpt [2], does not?

Also, "a notebook...allows you to explore the system that a job sees...You can...Peek around the filesystem...Run non-Python programs..." I _really_ hope each user runs in their own VM for security's sake.

[1] <http://sagemath.org>

[2] <http://www.skulpt.org>

<comment><AUTHOR> PiCloud dev here.

The IPython notebook feature itself is comparable to other offerings. The advantage of PiCloud's offering is that it is not just a web-based python; it also is the interface to a supercomputer that you can leverage with the cloud library (<http://www.picloud.com/platform/>). As long as you wish to make use of that supercomputer, the notebook allows you to run an interactive interpreter on your already configured PiCloud environment.

As far as security goes, every user is run in separate LXC containers. (<http://lxc.sourceforge.net/>)

</comment></comment><comment><USER6> Any of you had success setting up ipython notebook with IPC transport? Been trying to setup an out of the box project for running it on the free Openshift paas, in which you can only bind to an internal ip and some internal/external ports, but only managed to use ipc by forcing the config value somewhere on the call stack, as it always uses tcp.

from the feature merge on ipython repo, it seems it may be a bug or unfinished work.

will look deeper.

</comment><comment><USER7> Seems to me like hosted ipython notebooks could be a product all its own.

I can imagine an instant evaluation aspect to this - on keyup (_.debounce'd).fireEvent('play') - an awesomely tight feedback loop, light- table-esque.

makes me excited for some better tools on their way.

</comment><comment><USER8> I always liked this way of working since first touching Mathematica; does it exist for other languages? (I think there already was one for Python before, not browser based?)

<comment><USER9> ipython has notebooks, but they _are_ browser-based.

<comment><USER8> Yeah which is fine; I just remembered another Python notebook environment but that might have been just this one :) Unfortunately I don't get to work with Python much.

<comment><USER10> It somewhat reminds me of <http://www.sagemath.org/>.

<comment><USER11> The IPython notebook came after the SAGE notebook, but it seems to be gaining popularity faster in the broader scientific Python community. (The SAGE community tends to be more oriented towards pure math.) SAGE is a very powerful system and introduced many cool things very early on, but it definitely is a bit of its own island in the scientific python landscape. I don't know if that's because of the licensing (it's GPL) or the software distribution logistics or what.</comment></comment></comment></comment></comment>


Ask HN: Suggest a deep-learning personal project? - <AUTHOR> After completion of deeplearning.ai courses I am looking for personal project to further improve my understanding of AI and have some fun.
I find applications of convolutional networks and sequence models especially interesting.
One of the ideas I have is to build a command-line tool to classify my photos (mark photos with people, nature, cities, similar photos, photos with bad light / focus, ...).
Could you suggest progression through such project with high-level tasks ordered by difficulty?
Other project suggestions are also welcome! <comment><USER2> Most straightforward progression:

1\. establish desired categories

2\. group existing photos into these categories

3\. finetune a pretrained model on these categories

You can also partially automate step 2 using a pretrained model, but in this case some of your desired classes should be similar to (some of) the classes that model was trained on.</comment>