Live data from Hacker News

Solving `Passport Application` with Haskell

jameshaydon.github.io

61–70 of 131 posts

Re: Solving `Passport Application` with Haskell

#61

I've worked on a variety of large UK government systems for the past ten years. This blog encapsulates the problem of writing government services/software, which often results in strange outcomes. Writing software for government is essentially the codification of centuries worth of Acts of Parliament. Now imagine building the HMPO passport system, and then some underlying Law/Act is changed or repealed etc. Now someo…

Do you have any insight as to why, seemingly, there is no contractual obligation on contractors to make a working system. They seem to make something approximating a working system, vastly overcharge -- like x1000 -- for output that appears to be 3 months of work by one junior programmer, but then get paid as if the system actually worked.

Re: Solving `Passport Application` with Haskell

#62

I love this. It starts as a parody, then slowly morphs into a serious and elegant solution to the "game". By the end, I almost wish I could play it myself. Bravo.

I think you can play, just much harder to get through the end game stage.

Anyone can play but only ~70 million people can win :)

Re: Solving `Passport Application` with Haskell

#63
post #15
post #4

For the benefit of anyone else doing this in Japan, these are the documents I had to submit. It will be different depending on circumstance, in particular I think the author may also be born outside the UK which may require other/more documents. Anyway I had to submit: Certified copy of my birth certificate, order from the UK general register office. Original (not photocopy) of Japanese family register and translatio…

> Colour photocopy of every page of my childs Japanese passport. But why?

Another reason is that the UK forbids the child to have different names on their japanese passport and their UK passport, which is often (almost always?) the case

Re: Solving `Passport Application` with Haskell

#64
post #9

Haskell has an interesting syntax: it is intuitive after someone explains it to me, but not intuitive much before the explanation. I don't think it's because I'm used to Algol-based languages (C, Python, etc.). Every Haskell code I've seen is plagued with a plethora of operators which aim to make the code concise but it's not obvious what they do just by looking at them: https://academy.fpblock.com/haskell/tutorial/o…

> it is intuitive after someone explains it to me, but not intuitive much before the explanation Isn't that pretty close to what something being intuitive means? Ie. something being intuitive means that it's easily understood or learned without requiring prior knowledge or instruction.

With Haskell code it is often so that the code which actually does something is expressed in terms of combinators. These combinators are often very general, so one must do a bit of mental work to understand what they do in this particular context.

Once you understand what the combinators do in a particular context the code often reads very easily, and what it does is very intuitive and natural.

Best example I can think of is applicative parsers, where there are scattered and operators around, but if you just ignore them the parser just looks like a very intuitive description of what the expressions you want to parse look like.

Re: Solving `Passport Application` with Haskell

#65

I too have enjoyed a game of *Passport Application* by proxy. One of the interesting rules the OP doesn't appear to mention is the 'mutable history' rule. Herein, the facts contained in a single document can alter over even short periods of time requiring that a document, already scanned into the Examiners system of fact recording, can be required to be returned for subsequent scans. Verifying documents have not alte…

Yes and in the British system names can be fluid, changed at will with no declarations being made. That’s how my mother was able to register my birth with the surname of her mother’s third (!) marriage. Birth certificates are also immutable in certain ways but not entirely everything on it is immutable.

Not to mention the passport office has forgotten previous decisions for my own passport where this sort of surname discrepancy has been explained away. (Including one passport where I am listed on a page of her passport!)

The NPCs are infuriating. I called, emailed and received a different answer every time. It was like a poor LLM.

After applying I had to explain to my mother that within the same batch of applications, one daughter required additional UK documents but the other one didn’t (the passport came), purely because one was born in the UK and the other one wasn’t. She rightly flipped out, raised it with an MP and it was resolved within a day.

Re: Solving `Passport Application` with Haskell

#66

I've worked on a variety of large UK government systems for the past ten years. This blog encapsulates the problem of writing government services/software, which often results in strange outcomes. Writing software for government is essentially the codification of centuries worth of Acts of Parliament. Now imagine building the HMPO passport system, and then some underlying Law/Act is changed or repealed etc. Now someo…

I recently renewed my passport in France. There is a new-ish platform here for every document one might want to obtain. I had one form to complete online, that was rather easy to follow. I then had to go to the office once to finish the process. That took only 10 minutes and then the passport was delivered. As painless as can be, I believe.

Whatever the situation is in the UK, it is not hopeless. The government needs to stop being afraid of hiring actual employees and bring all development in-house.

Re: Solving `Passport Application` with Haskell

#67
post #66

I've worked on a variety of large UK government systems for the past ten years. This blog encapsulates the problem of writing government services/software, which often results in strange outcomes. Writing software for government is essentially the codification of centuries worth of Acts of Parliament. Now imagine building the HMPO passport system, and then some underlying Law/Act is changed or repealed etc. Now someo…

I recently renewed my passport in France. There is a new-ish platform here for every document one might want to obtain. I had one form to complete online, that was rather easy to follow. I then had to go to the office once to finish the process. That took only 10 minutes and then the passport was delivered. As painless as can be, I believe. Whatever the situation is in the UK, it is not hopeless. The government needs…

There was a group of people under the gov.uk banner who were actually really good. But a challenge is that if you employ someone, you need to fit them into your grade structure. And decent programmers earn “Senior Civil Servant” figures.

Re: Solving `Passport Application` with Haskell

#68

I have noticed in Japan the crazy bureaucratization of document applications in the 7-8 years I've been living here. I've had 2 Japanese documents expire, "MyNumber" and "Driving License" in these years, and when trying to re-obtain them the process has become MUCH more complex. I'm bad at remembering all these processes in detail, but these are from memory: - For the mynumber, first time, it was a simple application…

Ha! I go to Japan every now and then, as I have friends there, and I've though a couple times about doing the Japanese driving license thing, that looked super easy back at the time (translate your current driving license, book a meeting in the exam center, do a short exam, and you're almost good to go). I was thinking about doing it in my next trip in two weeks, but seems like they've raised the difficulty several l…

> I go to Japan every now and then

AFAIK this is only available for residents? People traveling can/should use the international driving permit. Both JAL (translation) and the center itself asked me for my resident card.

> do a short exam

Oh there's no exam needed at least! Unless you mean the eye test?

Re: Solving `Passport Application` with Haskell

#70
post #66

I've worked on a variety of large UK government systems for the past ten years. This blog encapsulates the problem of writing government services/software, which often results in strange outcomes. Writing software for government is essentially the codification of centuries worth of Acts of Parliament. Now imagine building the HMPO passport system, and then some underlying Law/Act is changed or repealed etc. Now someo…

I recently renewed my passport in France. There is a new-ish platform here for every document one might want to obtain. I had one form to complete online, that was rather easy to follow. I then had to go to the office once to finish the process. That took only 10 minutes and then the passport was delivered. As painless as can be, I believe. Whatever the situation is in the UK, it is not hopeless. The government needs…

as a French citizen, I find that surprising.

While renewing a passport is one of the easiest things you can do, I distinctively remember it taking a good half-day (most of which is waiting in line jumping from one desk to another until you find someone that can check all the documents you provided are satisfactory and sign off for you).

Now however, if it's not a renewal but a new application, the difficulty sharply increases.

Post reply on HN