I don't see that answer arguing that `safeHead` is bad. Russell O'Connor just seems to be arguing that it'd not be possible for `head :: [a] -> a` to have a sentinel value `uhOh :: forall a . a` which you could pattern match on when `head ` is called... but `safeHead :: [a] -> Maybe a` is just fine since it has a different free theorem.
In the comments on Real World Haskell people (Alex Stangl and Paul Johnson in particular) are talking about added complexity of deferring invariant errors, but since these are type-declared via `Maybe` it really helps to add safety. I personally have written many, many functions with partial types because I had forgotten about some assumed invariants and had them fixed by use of `safeHead`.
NonEmptyList is pretty good for pre-handling all of the failure modes.
I have been contracting for about 8 years now and yes, it is quite easy to get started in the UK. You can find your own contracts or most likely you'll need to send your CV to head-hunters looking for contractors. Once you get a contract, you've got two options: a) setup a limited company to invoice your client/agency. Many accountants in the market that can help you with that. e.g http://www.sjdaccountancy.com/ or b) go with an umbrella company e.g. http://www.tarpon-uk.com
Agree except for recommending SJD. They are a good accountancy firm but when I was with them they would only do my accounts through a really horrid excel spreadsheet. This time round I've gone with http://www.nimblejackaccounting.co.uk/ who bundle an account with freeagent (which is probably the best contractor accounting package out there) AND the set up of your limited company in their monthly fee.
If you're going to go contracting don't bother with an umbrella company! It's absolutely ridiculous how tax efficient you can be as a limited company (especially if you can set up you significant other as a director). You're looking at just under £40k per director completely free of personal tax and NI if you set it up right. You still have to pay corporation tax and some VAT on that amount and there's all the overhead of managing the company, but it's seriously worth it - especially with a good accountant!
Got to agree, umbrellas are a waste of money. Freeagent is really good (one or two small annoyances, but nothing that matters). They have a list of partner accountants who are freeagent friendly; I went for a local accountant who is a one person shop. A contracting friend of mine suggested local over chain. I met with the accountant and I'm really happy with her advice and charging structure; she help me organise starting the business reg for VAT, CORP tax and do some cashflow projections to minimise tax etc. I don't pay anything to her month to month but she is available to deal with any ad-hoc queries and will do the tax return at the end of the year. Freeagent allows my wife to do the bookkeeping, payroll and invoicing without the monthly involvement of an accountannt, then the accountant can get involved at the year end.
(The idea is that if the company bills 100,000 pounds
it pays corp tax of 20,000. Then the director can withdraw the profit of 80k as a dividend. Since a tax has already been paid on the 100k the 80k is free of income tax. However income tax is charged at two levels in the uk (25% and 40%). The govt says that the first level of 25% has already been paid (by corp tax at 20%). The 40% only kicks in at 43,000 a year - so you can as a director withdraw 43,000 as dividend and not pay "extra" tax on personal income.
The parent is suggesting your spouse can be a director and do the same, effectively making a 80k pa net household income on 100k revenue. (And if your are in a stable threesome it's even better :-)
If it is legal send me your accountants number - my mail is in the profile!
Perfectly legal! I get most of my tax info from taxcafe.co.uk. The best book they sell is called "using a company to save money".
By the way we met at one of the find a tech job meet ups recently. I'm interested in your OSS in government idea. How about you drop me a line next time you're in the city? I'm ben at perurbis.com (no website yet)
Poor you... Seriously there's no competition in my mind: freeagent compared to that spreadsheet is like being fed ferrero rocher by Angelina Jolie at the ambassadors ball verses having faeces flung at you by drunk chimps at the zoo!
I used to contract in the UK a few years ago (since emigrated), and getting started for me was really as simple as sticking a CV on a few of the job boards and making sure it emphasised I was only looking for contract work. If your skills/experience are a match for open contracts the headhunters will find you.
I just started looking for contracts on job boards (notably jobsite.co.uk, which may not be the best but has worked for me). When applying for them I ticked the box to allow the website to publish my CV to any/all agents.
I then spent about two weeks telling people that no, I'm not interested in a perm role, and got work at about the end of week 3. (for reference I'm a server-side C/C++ programmer with an interest in crypto and about a decade's experience).
That's when I registered a company, bought domain names, got accountants (nixon williams, they specialise in this, seem to be ok so far) who handled tax registration etc etc.
-- edit --
happy to answer any further questions. I'm only about a year in and on my second contract.
Head hunter. It's really, really easy. Remember, they don't make money unless you're making money. Just be careful that they don't screw you on the rate (you should always try to find out from the company what they're paying for you so you can see what the agency is actually taking because they will lie about it).
They want to be called agent, but "pimp" or "head hunter" is closer to what they do. The parallel with a Hollywood/sports agent doesn't really exist, and to be fair we wouldn't realistically want to pay enough to justify such a model.
They are just CV movers but they often know key individuals within different companies and even provide kick backs. As slimy as they can be at times they have connections that a sterile CV in a pile of sterile CVs just can't have.
Don't be so naive! Scientists are not bound by some force of Nature to tell the truth. The accusation is exactly that they didn't tell all they knew about the earthquake, but they hold back the information in order to "quiet down" the population.
Obviously, I don't know if the accusations are true or false, but, knowing Italy, where "famous" scientists are usually very close to politicians, it would not surprise me at all.
This is bullshit, let me tell you. Corruption is everywhere in Italy: North AND South. Public sector AND Private sector. I am Italian, from the North, I lived in Milan for years and I am married with a woman from Rome: I know what I'm saying...
"Expert" is a relative term. He may not know all the intricate details. But having to live in the system he has first-hand knowledge, and not being part of the system (apparently) he has no personal reason to hide its dirty secrets. Also, his experience is likely to be typical for other people like him. This, I would say, makes him a great source. Then if an "expert" wants to perform a scientific study or in-depth journalistic investigation or some other thing "experts" are supposed to do, the said expert would need to contact him and other like him, for knowledge. Which he, thankfully, has freely shared with us here.
Corruption in Italy is hardwired in the behavior of people and their approach to life. It's enough to live in Italy for a long enough time to understand how people reason and why corruption is so widespread.
Obviously, being Italian doesn't make me an expert in corruption from a legal point of view, but I am pretty positive to know a bit about Italian mentality and facts confirm that corruption is as common in the North as it is in the South (I can cite my sources, if necessary.)
This is way more complex than it might appear. Italian speakers can watch this movie: http://www.youtube.com/watch?v=rROgB5QMgHs&feature=playe...
It shows a telephone conversation between the chief of "Protezione Civile" (responsible to react and intervene in case of catastrophes) Guido Bertolaso and a politician in the region where the earthquake happened, Daniela Stati.
Bertolaso first tells Stati that they did badly by saying the media that they didn't expect more earthquakes (as they did the day before, after a small shake that did no damage). Bertolaso added that he would fix this error with the media and send the most important scientists he knows to "quiet down" the population, upset by the previous message and by the continuous shakes. The accusation is that scientists didn't actually report what they knew, but they went in front of the media to "quiet" down the population.
Unfortunately, the day after the big earthquake happened and 309 people died.