Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

I'm A Republic (Honest!)

238 views

Published on

A (not entirely serious) talk that I gave at the London Perl Mongers technical meeting in March 2018.

It talks about how and why I build a web site listing the line of succession to the British throne back through history.

Published in: Internet
  • Be the first to comment

  • Be the first to like this

I'm A Republic (Honest!)

  1. 1. I’m A Republican (Honest!)
  2. 2. Not hard to become a Quora expert
  3. 3. Who will succeed the Queen of England?
  4. 4. Why does Britain always have a queen not a king?
  5. 5. Who would be king if Prince Charles dies before Queen Elizabeth II?
  6. 6. What must Prince Charles actually feel about his mother pulling him from the line of succession and designating his son as heir to the throne?
  7. 7. Did the Queen assassinate Diana, Princess of Wales?
  8. 8. How to become king or queen of the UK*
  9. 9. How to become king or queen of the UK* * Andfifteen other Commonwealth Realms
  10. 10. Step 1. Be a close relation of the monarch
  11. 11. Step 1a. Don’t be a woman with a younger brother
  12. 12. Step 2. Don’t die before the monarch
  13. 13. Step 3. Don’t be illegitimate
  14. 14. Step 4. Don’t be a Catholic
  15. 15. Step 4a. Don’t marry a Catholic
  16. 16. Recent(ish) updates
  17. 17. Succession to the Crown Act (2013)
  18. 18. Step 1a. Don’t be a woman with a younger brother
  19. 19. Step 1a. Don’t be a woman with a younger brother
  20. 20. Step 4a. Don’t marry a Catholic
  21. 21. Step 4a. Don’t marry a Catholic
  22. 22. Updated: * Be royal * Be alive * Be legitimate * Don’t be Catholic
  23. 23. Brilliant Idea!
  24. 24. Let’s calculate the line of succession on every date back to 1701
  25. 25. How hard can it be?
  26. 26. Family Tree
  27. 27. That’s gets 17 people
  28. 28. More Data Needed
  29. 29. Descendants of George VI
  30. 30. Descendants of George V
  31. 31. Descendants of Edward VII
  32. 32. Descendants of Victoria
  33. 33. (Eventually) Descendants of Sophia
  34. 34. Wikipedia is your friend
  35. 35. Some complications ...
  36. 36. Titles and names
  37. 37. * Princess Elizabeth of York * The Princess Elizabeth * The Princess Elizabeth, Duchess of Edinburgh * Queen Elizabeth II
  38. 38. Add a titles table
  39. 39. Exclusions
  40. 40. Excluded because you married a Catholic
  41. 41. Included because you divorced a Catholic
  42. 42. Included because the law on being excluded for marrying a Catholic changed
  43. 43. Excluded because you became a Catholic
  44. 44. (Children aren’t officially Catholic until their confirmation)
  45. 45. Male-preference primogeniture
  46. 46. Abolished in 2013 (Mar 27)
  47. 47. For children born after 28 Oct 2011
  48. 48. Senna Lewis (b 22 Jun 2010) 24th in line
  49. 49. T ne Lewisā (b 25 May 2012) 26th in line (Senna is 27th)
  50. 50. 26 March 2013 26: T ne Lewisā 27: Senna Lewis
  51. 51. 28 March 2013 26: Senna Lewis 27: T ne Lewisā
  52. 52. Dancer2 App
  53. 53. Some data presentation challenges
  54. 54. Find nearest common ancestor
  55. 55. Count intervening generations
  56. 56. Easy to do A lot of data to crunch
  57. 57. Enter memcached
  58. 58. CHI
  59. 59. has cache => ( is => 'ro', isa => 'CHI::Driver::Memcached', lazy_build => 1, ); sub _build_cache { return CHI->new( driver => 'Memcached', namespace => 'succession', servers => [ 'localhost:11211' ], debug => 0, compress_threshold => 10_000, ); }
  60. 60. sub get_relationship_between_people { my $self = shift; my ($person1, $person2) = @_; my $relationship = $self->cache->compute( 'rel|' . $person1->id . '|' . $person2->id, undef, sub { return $person1->relationship_with($person2); } ); return $relationship; }
  61. 61. Didn’t work
  62. 62. Two lessons learned
  63. 63. Always use a model layer
  64. 64. Batch job
  65. 65. Calculate succession on every date
  66. 66. Note the dates when it changes
  67. 67. Dates in URLs
  68. 68. https://lineofsuccession.co.uk/ https://lineofsuccession.co.uk/2018-01-01 https://lineofsuccession.co.uk/2016-01-01
  69. 69. All the same content
  70. 70. Duplicate content is bad
  71. 71. Canonical Tag
  72. 72. <link rel="canonical" href="https://lineofsuccession.co.uk/" /> <link rel="canonical" href="https://lineofsuccession.co.uk/2014- 01-17" /> <link rel="canonical" href="https://lineofsuccession.co.uk/1901- 01-22" />
  73. 73. More SEO
  74. 74. Structured data
  75. 75. <li itemscope itemtype="http://schema.org/Person"> <span itemprop="name">The Prince Charles, Prince of Wales</span> <br><span class="small">Age 69 (born <a title="Line of Succession on 14&nbsp;November&nbsp;1948" href="/1948-11-14"> 14&nbsp;November&nbsp;1948 </a>), <br>Son of the sovereign </span></li>
  76. 76. <li itemscope itemtype="http://schema.org/Person"> <span itemprop="name">The Prince Charles, Prince of Wales</span> <br><span class="small">Age 69 (born <a title="Line of Succession on 14&nbsp;November&nbsp;1948" href="/1948-11-14"> 14&nbsp;November&nbsp;1948 </a>), <br>Son of the sovereign </span></li>
  77. 77. Google likes structured data
  78. 78. Todo
  79. 79. Moar data
  80. 80. Moar views
  81. 81. Moar marketing
  82. 82. https://lineofsuccession.co.uk/ https://github.com/davorg/succession @linesuccession @davorg
  83. 83. Vive la révolution!

×