Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • Why is it that when I travel to certain places I need to ensure my passport has at least n months before it expires? So what if it's due to expire next week if I'm only staying until next week. Even if I'm staying 2 weeks and it expires tomorrow, why does that matter? I guess I might not be allowed back into my home country, but that should be my concern, not the worry of the immigration of the country I am going to.

    What kind of illegal immigration / criminal activity does a country prevent, or economic benefit / any other advantage does a country get by enforcing this kind of rule?

  • It's a risk mitigation measure. The three or six month requirement usually comes from how long you could stay, not how long you do stay.

    You are also assuming a point-to-point trip. While a citizen of a country usually cannot be denied entry to their own country, any countries you transit are under no obligation to allow you through on an expired passport.

    tl;dr filters out people who may be problematic to deport.

  • My guess is that it's because of emergencies. If you get injured and can't or shouldn't fly home then you need more time on your passport. It is also much easier to send you home if you over stay your visa if your passport is still valid. Also the system is setup to give you a visa of a specific length (eg 30 days), they can't just give you a 2 day visa.

    Also if your passport lasts for 10 years you've known when it's going to expire for quite a while, they're just expecting you to be responsible.

  • This is an impressive article, & is incidentally why every sane set of rules has administrative discretion in its enforcement
  • There's some similarity between nationality and copyright: arcane, obscure, complex and mean rules that only benefit incumbents and punish everyone else.

    I hope we will eventually get rid of both.

  • There's hundreds of millions of starving people ready to move to the first country that does it.
  • Do you dislike copyright also when it protects your intellectual property, and makes things like software licenses possible?
  • At the rate things are going, even EU and Schengen, areas in which their citizens are blissfully unaware how nice they have it compared to outsiders, are going to come to an end. Far-right nationalists are on the rise over Europe.
  • This made me appriciate the amount of visa-free travel my passport allows me on a whole new level. Figuiring these things out seems possible, but so inefficient and time consuming.
  • It’s not just that. I’m about 1/3 in one country, 1/3 in another one, and 1/3 in others, with income from multiple countries… I pay all my taxes (even more than I should), but hell, I won’t make the paper trail completely clean, because there is pain there. A lot. Tax authorities are utterly incompatible with each other.
  • Ah, the classic programmer's mistake of treating complicated human interaction systems as a computer programs.

    There is no State Almighty judging you to the last dot of absurdly complicated rules (well, in 99.99% cases when you don't actively look for trouble). Like, if you overstayed Schengen visa for one day because you messed up with counting entry and exit days, but used it otherwise for its intended purpose, the border officer likely won't even notice. Or for tax residence, a lot of countries I know just take what you say about your trips at face value - especially when there is no way to check it.

    Just relax. If you don't know how to count your days in Morocco because they changed the time zone in an inconvenient moment, the officer evaluating your documents doesn't know that too. It's truth and best effort that counts.

  • That's all true until there's a dispute. Being relaxed about these things is a very bad idea if the consequences are potentially severe.
  • Enforcement is arbitrary and vibes based, but only if you broke a rule. If you didn't break a rule they find it much harder to punish you, no matter what the vibes are. But also if you have good vibes you might not get punished no matter what rules you broke.
  • >Like, if you overstayed Schengen visa for one day because you messed up with counting entry and exit days, but used it otherwise for its intended purpose, the border officer likely won't even notice.

    When that wasn't automated that might have been the case (not that its a good thing).

    It's certainly not the case now that there is literally an API that tracks that.

  • Overstaying a visa is a big deal. You should not be counting days or nights because you should not let yourself be in the country anywhere near the expiry of a visa.
  • It's absolutely not best effort that counts.

    I've heard many stories of people overstaying their visa in the US by e.g. one day, by way of a mishap or honest mistake, and subsequentially being denied visas or turned away at border control. The effects of this can go on for years and years... it's basically zero tolerance

    by nly
  • I just realized this was the same author who made the apple watch integration for their gym entry system, I loved their writing then, and I loved it here!

    https://news.ycombinator.com/item?id=44910865

  • I'm a PureGym member. I just memorised the 8 digit number that never changes and I input it manually. It takes seconds. I agree that the official app is garbage. I just don't want or need to get my phone out at all.
    by sd9
  • Regarding the writing, I'm the opposite.. but I can't point out why I don't like it.

    Maybe because the author is trying to sound sleek and sexy, "look at me, jetset international traveller", although the topic is so nerdy and dull, and the bragging feels off-putting to me.

    (My opinion. Did I need to share it? probably not. Flag away if you think so)

  • It wasn't super obvious reading the article, but the app the author made is available for anyone to download.

    https://drobinin.com/apps/residency/

    If I wasn't on android and decidedly sedentary at the moment, I'd love to see how it works.

  • Huge respect to the author for the details that have gone into this. I'd spent a week hammering at a Claude max 20x plan to try and build schengen 90/180 rolling window + tax residency in a couple of countries tracker... and that was hard work. I can only imagine how much effort has gone into this, to get all the details right.

    It's unclear whether the author wrote all of this themselves, or if they outsourced a bunch of it to Claude. My experience with Claude was that it was terrible at writing code to do the math, even when I explained what the calculation needed to be, what the input was, and what the expected result was. It ultimately took starting a whole new project just to do the rolling window calculation, and then have that fed back in.

    My biggest question for the author, if they happen to see this, is: how much manual testing validation did you do of the outputs the app produces? IE: Did you do the inputs + transformations = output calculations yourself as well, counting days on calendars, etc, to validate that the app is actually accurate? (That was the only way I developed any faith in solution I made for myself, which is way less impressive than your app). Regardless of whether you wrote the code yourself or not, a thorough test harness feels vitally important for an app like this.

  • > that was hard work

    I'm sorry. I don't want to fight here, but you have literally just said you paid Claude to do the thinking for you (except for some math), yet you're talking about this like you're some kind of scientist; or that you've done this extensive, in-depth work.

    You made an AI vibe-code an app in a week and now you're impressed someone else was able to do it better?

    Am I missing something? Is it maybe just your writing style that makes it come across so "from your high horse"?

  • I'm not sure I’m reading this right but are you saying that an AI made you dumber and then you complain that the AI is too dumb? That sounds like a lose-lose deal tbh.
  • When I’ve worked on complex scheduling problems like that I use copious unit tests, they’re perfect for this kind of input->algo->output problem where algo has tons of edge cases.

    Indeed, not using unit tests and instead trying to manually test all the cases sounds crazy to me!

  • I tend to find that for things like this that are really math heavy, it's usually better to create a DSL (or create easily readable function calls, etc) that you can easily write yourself instead of relying on AI to understand math heavy rules. Bonus points, if the rules are in an easily editable format, you can change them easily when they need to. It seems that was the path the author took...

    And yes this kind of use-case is exactly where unit tests shine...

  • Few of my relatives just went to Europe as tourists, threw away their back home tickets and went illegal. After few years they legalised and now citizens. And I'm still here, because I don't want to break the law and I don't have valid legal grounds to get the working visa. It sucks to obey the law.
  • How does this happen? Is there a law which just gives you a citizenship if you stayed for N years?
  • Now I'm curious what countries we're talking about and what's the process of "legalisation"
  • What do you mean by valid legal grounds? For many countries all you need is to get a local job paying above a threshold, that’s enough to get a work permit.
  • This is such a common thing and tolerated you have to wonder whether it's actually immoral. I've met many people on my travels who went to Europe on tourist visas, got work and then got to stay legally later. No one was deported.

    All of these were people in low-paying services industries, jobs Europeans don't usually want (waiters, cleaners, etc).

    The only ones that had issues with immigration were my qualified worker friends who got a work visa and then the company had layoffs while they were there, losing their sponsorship. People with masters degrees who had to scramble to find new work in 30 days or face deportation.

    It's hard not to think that's intentional.

    I have a nuanced opinion because it's a rather complex subject but it's just a weird thing to have seen happen. As a tourist I had to prove up and down I wasn't going to stay there only to see no one else cares outside the airports. There's obvious wage suppression going on with these policies but these waiters and cleaners also had college degrees from good institutions, probably more qualified than some citizens.