Deprecated: Creation of dynamic property ACF::$fields is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/fields.php on line 138 Deprecated: Creation of dynamic property acf_loop::$loops is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 28 Deprecated: Creation of dynamic property ACF::$loop is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/loop.php on line 269 Deprecated: Creation of dynamic property ACF::$revisions is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/revisions.php on line 397 Deprecated: Creation of dynamic property acf_validation::$errors is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 28 Deprecated: Creation of dynamic property ACF::$validation is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/validation.php on line 214 Deprecated: Creation of dynamic property acf_form_customizer::$preview_values is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 28 Deprecated: Creation of dynamic property acf_form_customizer::$preview_fields is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 29 Deprecated: Creation of dynamic property acf_form_customizer::$preview_errors is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-customizer.php on line 30 Deprecated: Creation of dynamic property ACF::$form_front is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-front.php on line 598 Deprecated: Creation of dynamic property acf_form_widget::$preview_values is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 34 Deprecated: Creation of dynamic property acf_form_widget::$preview_reference is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 35 Deprecated: Creation of dynamic property acf_form_widget::$preview_errors is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/forms/form-widget.php on line 36 Deprecated: Creation of dynamic property acf_field_oembed::$width is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 31 Deprecated: Creation of dynamic property acf_field_oembed::$height is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-oembed.php on line 32 Deprecated: Creation of dynamic property acf_field_google_map::$default_values is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-google-map.php on line 33 Deprecated: Creation of dynamic property acf_field__group::$have_rows is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-group.php on line 31 Deprecated: Creation of dynamic property acf_field_clone::$cloning is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 34 Deprecated: Creation of dynamic property acf_field_clone::$have_rows is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-clone.php on line 35 Deprecated: Creation of dynamic property acf_field_font_awesome::$settings is deprecated in /var/www/html/wp-content/plugins/advanced-custom-fields-font-awesome/fields/acf-font-awesome-v5.php on line 21 Deprecated: Creation of dynamic property acf_field_ryancv_ui_google_font::$font is deprecated in /var/www/html/wp-content/plugins/ryancv-plugin/acf-ext/acf-ui-google-font/acf-ui-google-font-v5.php on line 57 Deprecated: Creation of dynamic property acf_field_ryancv_ionicons::$font is deprecated in /var/www/html/wp-content/plugins/ryancv-plugin/acf-ext/acf-ionicons/acf-ionicons-v5.php on line 1502 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/fields.php:138) in /var/www/html/wp-includes/feed-rss2.php on line 8 jonathan – Jonathan Botha https://jonathanbotha.info Just another developer Sat, 09 Dec 2023 07:52:36 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.11 Memorising π https://jonathanbotha.info/2020/03/17/memorising-pi/ Tue, 17 Mar 2020 19:56:35 +0000 https://jonathanbotha.info/?p=472 Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/wp-includes/class-wp-block-type-registry.php on line 168

3.14159265358979323846264338327950288419716…

This year was the first year I celebrated Pi Day; and boy was it interesting! Oddly enough though, for me the celebrations began on the 13 March when a friend caught my attention. I was on my way to invigilate a test when I was called over to the Mathematics building where some people were creating hype for the upcoming Pi Day. They had a range of activities available to demonstrate the usefulness of pi, and also a few competitions. From these competitions there was one that peaked my interest: “How many digits of pi can you memorise?”.

I, for one, have never attempted to memorise any digits of pi for fun, but in the moment I thought, “How hard could it be?” I went into the competition expecting to need ~20 digits of pi and when I looked at those who signed up so far they had gone well over 30!

The mnuenomic rhyme

There were multiple rounds which you could enter and I quickly tried to start learning pi. The trick I wanted to use was to use some form of algorithm to calculate a limited number of digits of pi, but it appears this isn’t a popular approach. What is popular is songs and sentences that can help you remember the digits. I set off immediately trying to remember a poem that contained 31 digits of pi:

Now I will a rhyme construct,
By chosen words the young instruct.
Cunningly devised endeavour,
Con it and remember ever.
Widths in circle here you see,
Sketched out in strange obscurity.

The trick here is to remember the rhyme and count the letters in each word. If you do this you will have 31 digits of pi memorised! However, me being a number person before a word person, I struggled to remember most of the passage before the current round ended and often slipped up the counting of letters. This method was great for remembering the digits of pi, but took too long for regurgitation. Within the short time span of 15 minutes, I memorised most of the poem, but slipped up so much in converting text to numbers that I only got a score of 4 before the time ran out.

Using my strengths

I then left to go to the test venue, but by this time I was already determined to do better. I got a pen and paper and started out on my own way to remember the mathematical constant. However, this time instead of remembering words I focused on my love for patterns.

Patterns appear all around us and sometimes even appear in simple places such as license plates. I love looking at license plates and seeing “Oh, ‘8421327’ is halving 8 until 1, then adding the last 2 numbers and putting the result to the power of itself.” This may seem obscure, but I have found many people who use such techniques to remember numbers – even if they are not exactly as above.

Long story short, I was able to memorise a whopping 37 digits of pi within 30 minutes. For me this was an incredible feat as I had never tried this before and from zero went well above my initial expectations. I submitted my score, but shortly after someone wrote down 100 digits from memory! I will say there are some crazy people in this world, but (even though I didn’t win the mug I yearned for) I had fun.

Conclusion

Looking back over all that happened I realised that you will find that every person has their own way of remembering useless information. No two people are the same and in the end its about finding out what works for you. If you don’t know what works for you then try to memorising the digits of pi, you might just surprise yourself.

My method

I am sure some of you might wonder what my method was, but as a disclaimer I will warn you that it is very obscure.

3.141Everyone should know this part
5sum of the last 2 digits and will surround the next 2 groups.
926A transformation of 9 by flipping
5The grouping number
39-6-3 is the pattern before
5The grouping number
8Sum of the last 2
979 323A group transformation. The 9’s get rooted, and the 7 transforms into a 2. (Everything gets smaller)
462648 and a nice big palindrome. Binary numbers from 8 to 2 then up.
8 is the only even not in the palindrome.
3383From the previous 4 I remembered double 3 and doubled 4 then had an extra 3. It just worked for me somehow.
279Cube the last digit and then get the middle power.
50Is a nice number and the section end.
28841Saying it fast helped remember it (288 for 1)
9716I remembered the date 1697. (This is where is made my mistake and ended with 37 digits)
]]>
The ModPro experience https://jonathanbotha.info/2020/01/24/the-modpro-experience/ Fri, 24 Jan 2020 12:29:43 +0000 https://jonathanbotha.info/?p=462 In January I started at the ModPro Summer School, which consisted of many speakers of whom are experts in the field of modelling. Below I sum up the experience, excluding the great food provided.

Feature Variability

Ina Schaefer was the first speaker and one of my favourites by far. She introduced the concept of feature variability in software product lines. This comes into play for anyone who provides multiple of the same product to clients with minor changes which may be influenced by cost or needs. My immediate go-to was web design as you will often find that you use a lot of the same frameworks and components throughout all projects. Using feature-oriented programming you are able to create what is a called a 150% product containing all the possible moving parts. You are then able to switch them off and on depending on your needs. This is a simple example as using a FODA feature model you are able to create constraints and choices to ensure correctness and minimize issues.

This was by far my favourite topic as it has real application and can simplify a company’s development system greatly. There is also a lot of interesting mathematics in the background that allows us to check the correctness of the selected variant.

Models to code

Tiziana Margaria led a talk about using a model to create a software system that required no access to code. It was an amazing demonstration of the power we are able harness through using models. Using blocks called SIBs she showed us how one can generate an entire webpage and backend system by simply dragging and dropping. And one of the greatest highlights was seeing how clean and manageable the code can become when using code generators.

Meta-modelling and flexible meta-modelling

Meta-modelling was a very interesting aspect for me. It was discussed by a variety of the speakers, but the real kicker was presented by Richard Paige‘s PhD student Thanos who presented flexible meta-modelling. Standard meta-modelling allows you to design a domain-specific modelling language that domain experts are able to use that can be further processed, for instance into code. The typical process here is to create a meta-model, allow the experts to create example models and then refine the meta-model a bunch to fit the needs of the experts. However, in flexible meta-modelling we are able to, without an existing meta-model, to let domain experts create example models and then derive a meta-models from the examples. The methods used behind the scenes are mind blowing. This system allows such flexibility and allows a smooth development starting with the user’s needs.

Conclusion

Clearly modelling has many forms, but in all aspects it provides great approaches to solving many modern problems. The summer school was an amazing experience and I am so grateful for the collaboration of Willem Visser, Judith Bishop, the Royal Society and others for making it happen.

Visit the ModPro website for more information.

]]>