Slide 1

Slide 1 text

THINGS THAT WE BELIEVE ARE TRUE…

Slide 2

Slide 2 text

THINGS THAT WE BELIEVE ARE TRUE… But they’re not

Slide 3

Slide 3 text

Falsehoods programmers believe about X

Slide 4

Slide 4 text

“Constraints placed upon a complex system by a mixture of ignorance, apathy, business requirements, or other legal constraints”

Slide 5

Slide 5 text

Hello! I’M MICHAEL I’ve made lots of mistakes in the past You can find me at @mheap

Slide 6

Slide 6 text

TIME

Slide 7

Slide 7 text

The number of days in every month starts with a 3, so either 30 or 31? February has 28

Slide 8

Slide 8 text

Each month has the same number of days every year though? February has 29 in Leap Years

Slide 9

Slide 9 text

But we can calculate the leap years - they're every 4 years? Yes... unless its divisible by 100

Slide 10

Slide 10 text

But that rules holds all the time right? Yes… unless you’re Sweden

Slide 11

Slide 11 text

But we’re agreed, February is 28 or 29 days? Yes… unless you’re Sweden

Slide 12

Slide 12 text

But we’re agreed, February is 28 or 29 days? Or the Soviet Union

Slide 13

Slide 13 text

If we ignore Sweden, Leap Years are easy. Every 4 years unless it divides by 100 …unless it doesn’t divide by 400. 1900 wasn’t a leap year, neither is 2100 2000 is.

Slide 14

Slide 14 text

It's a good job that only small companies and independent programmers have issues with leap years though…. right? https://azure.microsoft.com/en-us/blog/ summary-of-windows-azure-service- disruption-on-feb-29th-2012/

Slide 15

Slide 15 text

TIME

Slide 16

Slide 16 text

A month starts and ends in the same year Unless you’re an ancient Roman

Slide 17

Slide 17 text

A month starts and ends in the same year Or modern Ethiopian

Slide 18

Slide 18 text

Time always goes forwards Unless you’re in Shanghai 1927-12-31 23:54:08 happened twice

Slide 19

Slide 19 text

MODERN TIME

Slide 20

Slide 20 text

The day before Saturday is always Friday. Unless you’re in Samoa in 2011

Slide 21

Slide 21 text

The offsets between two time zones will remain constant. 10 changes in 2016 2 so far this year

Slide 22

Slide 22 text

If they do change there’ll be plenty of notice North Korea gave 8 days' notice of a 30 minute change in their time zone in 2015

Slide 23

Slide 23 text

When they do change, they change by an integer number of hours UTC+04:30 Afghanistan UTC+12:45 New Zealand (Chatham Islands)

Slide 24

Slide 24 text

Ok… so 15 minutes then? That’s safe? UTC-00:25:21 - Dublin Mean Time

Slide 25

Slide 25 text

Audience Participation

Slide 26

Slide 26 text

When are there more or less than 24 hours in a day? Daylight savings time! Means 23 or 25 hours in a day

Slide 27

Slide 27 text

Is the time 23:59:60 invalid? When leap seconds are inserted, a minute will be 61 seconds long.

Slide 28

Slide 28 text

NAMES Michael

Slide 29

Slide 29 text

A child will have the same surname as either their mother or father (or both) Not in Iceland

Slide 30

Slide 30 text

People have at least two names Teller (of Penn and Teller fame) Akihito (Emperor of Japan)

Slide 31

Slide 31 text

However many names they have... People’s names do not contain numbers John5… but that’s a stage name

Slide 32

Slide 32 text

However many names they have... People’s names do not contain numbers How about K8lyn? (Kaitlyn) Ok.. it was actually KVIIIlyn

Slide 33

Slide 33 text

For every rule you come up with there are guaranteed to be hundreds of exceptions

Slide 34

Slide 34 text

For every rule you come up with there are guaranteed to be hundreds of exceptions No spaces van Buren

Slide 35

Slide 35 text

For every rule you come up with there are guaranteed to be hundreds of exceptions Only letters O’Reilly

Slide 36

Slide 36 text

For every rule you come up with there are guaranteed to be hundreds of exceptions One capital letter McDonald

Slide 37

Slide 37 text

Audience Participation Michael

Slide 38

Slide 38 text

“A name must contain one or more alphanumeric characters”

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

I can safely assume that this dictionary of bad words contains no names in it.

Slide 41

Slide 41 text

I can safely assume that this dictionary of bad words contains no names in it. Ever been to Middlesex?

Slide 42

Slide 42 text

I can safely assume that this dictionary of bad words contains no names in it. Or eaten Shitake mushrooms?

Slide 43

Slide 43 text

I can safely assume that this dictionary of bad words contains no names in it. Been named Craig Cockburn?

Slide 44

Slide 44 text

I can safely assume that this dictionary of bad words contains no names in it. Or Linda Callahan?

Slide 45

Slide 45 text

What about less obvious ones? Super Bowl XXX?

Slide 46

Slide 46 text

Planning permission emails bouncing They talked about erection of a structure

Slide 47

Slide 47 text

The sad story of Christopher Null if lastname = null then… well, then try again with a lastname that isn’t “null.”

Slide 48

Slide 48 text

Addresses

Slide 49

Slide 49 text

When there is a building number, it will be all- numeric 1A Egmont Road, Middlesbrough, TS4 2HT

Slide 50

Slide 50 text

No buildings are numbered zero 0 Egmont Road, Middlesbrough, TS4 2HT

Slide 51

Slide 51 text

If the addresses on the left of the road are even, the addresses on the right must be odd You can have even numbers on both sides.. but that’s not the interesting part

Slide 52

Slide 52 text

Well, at least you can omit leading zeros 101 Alma St, Palo Alto - where apartments 1 and 001 were on different floors.

Slide 53

Slide 53 text

A street name won't include a number 8 Seven Gardens Burgh, Woodbridge, IP13 6SU

Slide 54

Slide 54 text

OK, but at the very least you wouldn't name a town Street Actually there's a town called Street in Somerset, UK.

Slide 55

Slide 55 text

You can't have two towns or cities with the same name in the same country The UK has three towns called Newport.

Slide 56

Slide 56 text

OK, but those cities won't have duplicate street names 10 High Street, Newport, PO30 1SS 10 High Street, Newport, NP20 1FQ 10 High Street, Newport, TF10 7AN

Slide 57

Slide 57 text

OK, but you don't get multiple postcodes per building DVLA Swansea: V5Cs are processed at SA99 1BA, Driving licences at SA99 1AB

Slide 58

Slide 58 text

But street names will be reasonably short - certainly less than 50 characters Aleja Alije Izetbegovića Prvig Predsjednika Predsjedništva Republika Bosna i Hercegovina

Slide 59

Slide 59 text

Addresses are a fixed point in space BF1 4FB

Slide 60

Slide 60 text

Concrete buildings are a fixed point in space In Zürich, a 6200 ton building was moved by 60 meters to make way for railway tracks

Slide 61

Slide 61 text

Audience Participation

Slide 62

Slide 62 text

Do all countries have a capital city? Switzerland does not. The government is currently in Bern, but the city is not the capital.

Slide 63

Slide 63 text

Commerce

Slide 64

Slide 64 text

A product has a price Products sold on auction site do not yet have a price. The moment the price is known is actually the moment the item will not be on sale anymore.

Slide 65

Slide 65 text

Except for auctioned items, products have one price Price with tax, price without tax, sale price, list price, minimum price

Slide 66

Slide 66 text

Currencies symbols uniquely identify a currency. The peso and dollar sign $ is used my many countries: USA, Cananda, Australia, Brunei, Namibia

Slide 67

Slide 67 text

Currencies have a unicode symbol that represents them The Swiss franc does not, and until 2010, neither did the India rupee

Slide 68

Slide 68 text

Audience Participation

Slide 69

Slide 69 text

Which currency does not have a three letter identifier? The Canadian dollar: CA$

Slide 70

Slide 70 text

Computers

Slide 71

Slide 71 text

“ The network is reliable. Latency is zero. Bandw idth is infinite. The network is secure. T opology doesn't change. There is one administrator. T ransport cost is zero. The network is homogeneous.

Slide 72

Slide 72 text

“ (?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?: \r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)? [ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\ \.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\] (?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?: \r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?: \r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?: \r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?: \r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?: \r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)? [ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?: (?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\] \r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]| \\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?: (?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?: [^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\ [\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\ ["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\ ["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?: [^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\ \".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\ [\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\ [\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))| \[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?: [^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\ [\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\ ["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\ ["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)(?:,\s*(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z| (?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)? [ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?: (?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?: \r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\ ["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)? [ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]) +|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+| \Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(? =[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\ ["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]) +|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?: \r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?: \r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*))*)?;\s*)

Slide 73

Slide 73 text

In Summary Computers are hard Humans make assumptions Things are never as simple as they seem. Ask questions, find out more. It’ll make life easier in the long run

Slide 74

Slide 74 text

Thanks! I’M MICHAEL You can find me at @mheap