Hacker News new | past | comments | ask | show | jobs | submit | more FT_intern's comments login

> This is people being assholes because they know they can get away with it.

The sentiment among many men working in the tech industry is that you can get crucified for making even a small compliment to a female. This idea of invulnerability would only be common among top executives and others who wield high amounts of power.


The most logical and clear answer for me (assuming I didn't already screw up by making assumptions about the data format, problem definition, etc.) is:

1. Figure out which appointment starts first

2. Check if first_appointment.end > second_appointment.start

So:

    boolean AreAppointmentsConflicting(int start1, int start2, int end1, int end2) {
      // first and second refer to the start time of the appointments.
      // The first appointment is the one with the earlier start time.
      int first_appointment_end, second_appointment_start;
      if (start1 > start2) {
          first_appointment_end = end2;
          second_appointment_start = start1;
      } else if (start1 < start2) {
          first_appointment_end = end1;
          second_appointment_start = start2;
      } else { // same start time
        return true;
      }
      return first_appointment_end > second_appointment_start;
    }
That can be shortened to:

   return (start1 > start2 && end2 > start1) || (start1 < start2 && end1 > start2) || start1 == start2;
Or shortened even further in https://news.ycombinator.com/item?id=14641485

The third answer would get massive upvotes for brevity on LeetCode. The first answer would be preferable for readability in an actual code base.


Personally I find the first version a bit hard to follow, and the second one makes my head spin.

But I can understand the objection to the third version too. I don't think the problem is that the expression is too simple - simplicity is generally a good thing! - but that it's easier to reason about non-conflicting times instead of conflicting times:

If my other meeting ends by the time this one starts, we're good.

Or if this meeting ends by the time the other one starts, we're good.

Otherwise we have a conflict.

So now if you like the step-by-step approach, we can write a function that seems pretty straightforward and easy to understand:

  boolean AreTimesCompatible( TimeRange thisRange, TimeRange thatRange ) {
      if( thatRange.end <= thisRange.start ) {
          return true;  // that one ends by the time this one starts
      }
      if( thisRange.end <= thatRange.start ) {
          return true;  // this one ends by the time that one starts
      }
      return false;  // they overlap
  }
I think it reads fine as a single expression too, given an appropriate comment explaining the idea (which you'd want anyway):

  // Time ranges are compatible if that one ends by the time this one
  // starts, or if this one ends by the time that one starts.
  // Otherwise they overlap.
  boolean AreTimesCompatible( TimeRange thisRange, TimeRange thatRange ) {
      return
          thatRange.end <= thisRange.start  ||
          thisRange.end <= thatRange.start;
  }
And here is the matching function to go with either of those:

  boolean AreTimesConflicting( TimeRange thisRange, TimeRange thatRange ) {
      return ! AreTimesCompatible( thisRange, thatRange );
  }


Has anyone thought of a good redundancy scheme for yubikey?

Physical object authentication is great except physical objects are less durable than brain memory (or at least, if my brain memory is gone then I probably would have no use for the password anyway).


Keep 1 key on your keychain, one in a fire vault in the house, and one in the safety-deposit box at the local branch bank office. Most U2F-enabled sites let you register multiple keys. Add new sites with keychain during the day, in the evening add the fire-vault key at home. Once a quarter add the third key from the safety-deposit box.


Why specifically during day/evening/quarter? Why not all three at same time? Just asking. Thanks..


Because you need the key with you to register it with a site, and if they are being stored in separate locations, you need to do it when you have access.


I am playing with YubiKey storing certificates, then using the certificates like any other GPG setup, so I can have redundancy and revocation. But I have yet to make it dead simple enough to use for real-world application.

Or maybe I am just procrastinating.


Engaging in identity politics opens up pandora's box :).

Men have a more difficult time obtaining social, emotional and physical intimacy with other people (in both romantic and platonic contexts). For the purely romantic context, there is a huge disparity in the required effort to obtain intimacy in a romantic relationship.

Women can obtain intimacy and have a very successful romantic life without making any advances at all. A man will have a very unsuccessful romantic life if he never makes any advances.

Society fails men on the social/physical/emotional intimacy front.

These are natural, primal needs have huge consequences on happiness. This lack of intimacy naturally causes men to seek intimacy in sometimes inappropriate contexts and situations.

Since a large cause of the behavior is the failing of society, it may be prudent to give higher leniency to men for these situations. The intimacy gap should at least be acknowledged whenever identity politics are brought up in these situations.


> A man will have a very unsuccessful romantic life if he never makes any advances.

#NotAllMen But seriously. I'd like to talk more about this in a different setting. This sentiment rang true for me before I got out of high school. After that, it mattered much less.

> Society fails men on the social/physical/emotional intimacy front.

We failed ourselves. This article rang all too true. https://goodmenproject.com/featured-content/megasahd-the-lac...


Don't work in tech? Business development/marketing/real estate fields are full of young people who boink all the time. It actually happens much less frequently in tech because of the language/cultural barrier from the high immigrant population and the introvertedness of engineers.

It's just highlighted and seen as controversial when it happens in tech.


That's a gross misrepresentation of the issue here.

The issue is not young people having sex with each other. The issue is powerful people dating people they have significant power over. Business development/marketing/real estate fields generally don't let bosses seduce employees, either.


That's not really relevant since both situations most likely have similar ratios of occurrence when comparing tech to those fields.

I can imagine that bosses in the business development/marketing/real estate fields make advances on female subordinates at much higher rates also. Again, people only care when it happens in tech.


Perhaps they do. I don't know. In the abstract, I agree, it happening in those fields would be just as bad. However, I work in tech and anticipate continuing to work in tech for many years. Many of my friends work in tech. I am, somewhat but not entirely regrettably, selfish and I do care more about things that affect me more directly. If people in real estate make advances on their subordinates, that is bad, but I don't have to worry about any of my friends being the ones having advances made on. I don't have to worry about avoiding the person in question for fear of being the subordinate being harassed. I don't have to worry that they'll end up being the client contact on a pentest.

People here are largely in the tech industry. Is it any wonder that they care more about things happening in the tech industry than elsewhere? Is it a problem that should be fixed that they do?


Anything that isn't scientific or technical in nature gets downvoted, including posts from the other end of the spectrum like false rape accusations and gamergate.

The exception is news from the large tech companies and unicorns.

I appreciate this community driven filter after being bombarded by inflammatory headlines, ideologies and news all day. It filters out "political" and "controversial" topics very well.


The sales tax in canada is brutal


Not really. The highest sales tax is 15% (NB, NL, NS, PEI).

I'll grant that's higher than in some US states, but come over to Europe where VAT is usually 19-25%. Although at least in Europe prices are advertised including VAT, so no mental math is required to calculate how much it will end up costing.


That's higher than in all US states. The highest US state sales tax is 7.25%. The highest municipal+state sales tax is 12.8%.

That's a huge outlier, though. The average is 5%, and many states exempt huge swaths of goods (such as groceries) and some have no sales tax at all.


> and many states exempt huge swaths of goods (such as groceries) and some have no sales tax at all.

Groceries are exempt from GST/PST or HST in Canada as well.


That certainly changes the cost-of-living, but it's not really relevant to the point about exchange rates and price differences, since most people compare prices pre-sales tax. Sticker prices, in the US and Canada (and Europe?), don't typically include sales tax.


Or any company with a low % of Americans. Many big tech companies and unicorns have a high immigrant %.

There is very high cultural and background diversity in these companies despite low racial and gender diversity, (gender and race aren't useful metrics/proxies for cultural diversity in companies with high immigrant populations).

Everyone on these culturally diverse teams all grew up in different countries and have different primary languages. As a result, they have very little in common and are less likely to have casual conversations with each other. People come into work and leave.


Attacking someone for ignorance is very unproductive


So why do white men do it to women and PoC, or is your claim that ignorance only exists on one side of this?

You imply that while men can do nothing for themselves unless given positive experiences by women an PoC.

This is obviously false, since there are plenty of white men who have a good understanding of these issues.

Stop blaming women and PoC for your own ignorance and go and learn something from people who have figured this stuff out.


I can think of virtually no better example to prove my point than the contents of this exchange.

So thank you for helping me to demonstrate to everyone else in this thread that speaking from anger, constructing and attacking the flimsiest of straw men, and repeatedly misconstruing a sympathetic counterparty's points only serves to push away the people you might hope to see your point of view.

I genuinely hope it was satisfying for you, because that's about the only positive outcome that's likely to arise for you out of this.


Try reading what I am saying without projecting anger into it. Just because it's not to your liking doesn't mean it's angry.

Also - there is nothing you have said that indicates you are a sympathetic counterparty. How do you expect us to know that? Therein lies the problem.


In most tech contexts, diversity means racial and gender appearance-only diversity. There is very little to no thought put into background or cultural diversity.

The different groups (immigrants and 2nd generation children of immigrants) that offer the most cultural and background diversity are flagged as a monolithic group based on appearance, completely ignoring the cultural diversity that they bring.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: