Live data from Hacker News

Solving `Passport Application` with Haskell

jameshaydon.github.io

81–90 of 131 posts

Re: Solving `Passport Application` with Haskell

#81
post #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…

Similarly for us, siblings each required different treatment. Even when part of the same application. All born in the same UK hospital to the same parents and having the same home address. Fun.

It was interesting to speculate what exactly the one child whose passport came months later had done that warranted the Examiner's extra scrutiny. Something to do with reincarnation I expect.

Re: Solving `Passport Application` with Haskell

#82
post #78

Earlier quoted context omitted.

> 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?

It’s not, you can get a Japanese driving license without living here ; but the government is making some noises to cut back on that (some recent semi-notable accidents caused by foreigners). It’s apparently been a loophole for Chinese and Vietnamese tourists to get a license that is more recognized abroad then their own. I think restricting this to residents makes sense; I’m more wary of making it more complex or dif…

> As to exam - that depends entirely as to where your “original” driving license is from.

Yes, that's why I was replying that since we both are Spaniards "(Spaniard here too...)"

Re: Solving `Passport Application` with Haskell

#83
> What are the base cases? A base case is an ancestor whose Britishness does not depend on a parent, e.g. someone who was naturalised, or born in the UK before 1983 (which makes one unconditionally british regardless of parents). That's right, further into the future we get from 1983, the taller these call-stacks can get.

This is insane to me, coming from a country that simply has a central database of all citizens and foreign residents, and a citizenship check is probably something like a single SELECT on an SQL table.

Re: Solving `Passport Application` with Haskell

#84

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.

It benefits no one to acknowledge that months were spent and the only outcome is millions of dollars wated. Sure, they could try to hold the contractor accountable, but that would put them at risk of being held accountable themselves by their own superiors for hiring that contractor in the first place. So they pretend everything works great, and pay accordingly

Re: Solving `Passport Application` with Haskell

#85

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.

> Do you have any insight as to why, seemingly, there is no contractual obligation on contractors to make a working system.

Often, you'll find that procurement is handled by someone working off of an incomplete set of written specifications. The procurement officer probably has no expertise with or informal knowledge of the problem to identify problems in advance, and even if they do legal requirements (ironically designed to ensure fair and transparent procurement) might force them to disregard informal knowledge over the formal specifications.

After the contract is signed, sunk cost fallacies and optimism biases take over. If the project goes over budget it might be easier to cut back on features than admit failure or demand more money, and the project will go over budget once real users start seeing the in-progress work and change requests pile up. Project managers want to be seen managing a successful project; nobody's rewarded for being the first to predict failure.

This is a kind of principal/agent problem that the private sector partially manages with equity or deferred compensation, but the profit motive has a very limited role in government and you'd probably not want to give stock options anyway. Beyond that, even the political overlords have short time horizons of 'the next election', and announcing a grand new project is almost as good as delivering one.

A high-profile example of this problem is the Canadian federal payroll system (https://www.oag-bvg.gc.ca/internet/English/att__e_43045.html), which has led to billions of dollars in fix-ups over a decade or so.

Re: Solving `Passport Application` with Haskell

#86

Haskell itself is an amazing language once it "clicks". But all the tooling around Haskell is just really bad.

> all the tooling around Haskell is just really bad.

No it isn’t. This is a stupid meme that people just dogmatically perpetuate.

Re: Solving `Passport Application` with Haskell

#88
post #31
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…

At some point, I did a rough count, and the number of operators you encounter in "normal" Haskell code—avoiding lens or domain-specific libraries—was pretty close to the number of operators you'd encounter in, say, JavaScript. This was a while ago and I don't want to redo the exercise now, but, even if we're being generous to JavaScript, practical Haskell needs on the order of 2x as many operators as practical JavaSc…

> practical Haskell needs on the order of 2x as many operators as practical JavaScript, not 10x.

Yeah but the JavaScript operators are almost all universally understood. There are some exceptions and mistakes, like `===` which shouldn't exist, and `.?` which is new but fairly standard. But most of the operators are just standard maths stuff, normal array/field accesses, etc.

Haskell has normal operators plus a bunch of weird operators that you need to learn. Even if the raw number of operators is only 2x, the number of operators that you have to learn is probably 10x.

Especially when you consider that Javascript operators are fixed so you have to learn them once, whereas Haskell operators are user-defined and Haskell programmers love defining them.

Re: Solving `Passport Application` with Haskell

#89

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…

Has outsourcing ever worked for anyone? I really haven’t heard a success story involving a government outsourcing _something_ like ever.

Re: Solving `Passport Application` with Haskell

#90

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.

Oh dear - you should European Funds for CS research programs. It’s a money making scheme for everyone involved without producing anything of substance and runs for years on end. There even companies “specialized” in every step of the process.
Post reply on HN