Wednesday, 16 November 2022

World Cup 2022 Simulation - footballsimulationengine v4.0.0

 World Cup 2022 - Football Simulation Engine


I have revamped the World Cup 2018 from a few years ago https://aidensgallyvanting.blogspot.com/2018/06/russia-world-cup-2018-simulator.html and updated it with the latest teams and players. 

1. Pick your two teams and click select teams.
Hint: If you don't pick any teams or only pick one, just click "select teams" and it'll randomly pick two teams. 

This dynamically generates 11 selection boxes with each countries squad displayed in each box, ready to pick your team. You will also need to select your formation or it won't work!

2. Pick your players. Not sure who to pick? Just click random select and it will pick a formation. This will fill in each position with either a Goalkeeper, a Defender, a Midfielder or a Forward depending on the formation and the players preferred position.
Hint: Not all player of a certain type will be put in their best position i.e. an RB in a CB position!

3. Hit simulate match. After you hit "Simulate Match" you'll see a screen with all the players selected and the positions they were put in. At which point you can either do a "Quick Match" which simulates the match with updates to the statistics or you can "Watch Match" which will give a graphical view.

--------------------------------------------------------------------------------------------

First Match - Qatar vs Ecuador


Results

You can store your results in the 'public/WC22.html' file in the html table. Which looks something like so..

I'll post an update on how close the first round of results were next week after the real matches have occurred. 

Monday, 16 May 2022

Is there value in buying commercial integration products?

 Original post is on medium

Authors: Sachin Tanna and Aiden Gallagher

Introduction

The Evolution of Integration

How is the integration landscape changing?

Figure 1 — Changing IT Landscape Factors (2021)

Greenfield Software Solutions

When to keep on developing

Using commercial integration products

Choosing an integration model

Conclusion

References


Monday, 25 April 2022

Peer reviews - why we have them and how to cope with the comments

Whether writing an article, blog, code, creating a video or any other document, it's important to get other people to review what you have created. This ensures the quality is good, the content reads well and that the message being portrayed is correctly expressed.

Looking for a Reviewer

First, you need a reviewer. Reviewers come in all types and forms, but generally you want someone who can read and comment on the technical content of the document, someone to assess the readability alone and either could judge the relatability. Does it read well for all the intended audience(s), does it make sense and does it resonate with other people's needs? Basically, is it worth reading?

Once you have found a reviewer, have a brief chat to discuss the document:

  • Explain who is the intended audience and the context of the writing
  • Check if the language is suitable for non native speakers
  • Ensure they know they can be open and honest, it's pointless asking someone who will just say "looks great".

Post Review

Once the reviewer has completed their review and sent it back to you, if they have done their job well there is likely to be a number of comments. Questions, suggested changes and direct edits, but a sea of changes can be difficult to process and accept.

A lot of times after a review, I tend to go through the 5 stages of grief:
  1. Denial - There's no way they understood the point of the article, there's nothing that needs changing. It's perfect! come on!
  2. Anger - Well, I'm not making THAT change. This comment doesn't even make sense...
  3. Bargaining - Okay, well, actually maybe I didn't write that bit very well. Okay, it's possible that I have rambled a bit too much.
  4. Depression - Why do I write anything at all? I should hang up the pen or let someone else write this instead. Time for a sprinkle of imposter syndrome!
  5. Acceptance - That change I made thanks to that comment is pretty good. Actually, this reads quite well now. This is so much better.
I dramatise for effect but it certainly is a whirlwind of emotions when you get comments, especially at first or with a new reviewer. Over time it gets easier and when you have a couple of reviewers you trust its easier to jump straight to bargaining.

Make sure to thank your reviewer for their time (they didn't have to read it, and they didn't have to put a lot of time / energy into it either, they could have skim read). 

Coping with review comments

There are a number of ways to cope and handle the review comments, in order to bypass at least 'denial' and 'anger' stages and possibly after a while the 'depression' stage too.

Here are my 6 top tips for coping with review comments:
  1. Time to process - take some time, have a cup of tea/coffee, sleep on it and come back when you are happy / not too stressed
  2. Assume the reviewer is acting in good faith - even when they are not
  3. Try it out - Make a copy, try it out, does it look or feel better. You won't know if its better with the changes until you make them. The worst that happens is you back out your changes and revert to the original but generally there are always improvements to make
  4. Has the reviewer misunderstood the audience, purpose or context? If so, is it obvious in the text? find out where the misunderstanding could have happened and either ask the reviewer to reread or add the context into the document
  5. Have a call and talk it through - go through the comments, discuss what changes could be made, clarify the context, explain your thought process. This can accelerate future iterations and help get published quicker.
  6. Don't take it personally!

Conclusion

Document reviews are very important, they make our work better by ensuring the words we write have an impact. Whether improving readability, making it more accessible, helping get direct to the point and increasing how many people actually consume the content.

Monday, 10 January 2022

Using Apple Shortcuts to track my New Year’s Resolutions

You can listen to our latest podcast on New Year's Resolutions here

Introduction

Each year I make a couple of New Year’s Resolutions, including a reading and running goal. To stay on track, I know I can quickly calculate how many kilometres I should have run so far this year or how many pages I should have read.

Rather than work this out manually every day, I thought I would create an Apple shortcut to give me an update. I hadn’t made one before, so thought I would combine learning something new with helping keep to my goals, so here’s how I did it.

Figure 1 - My Goal Shortcuts

The following results are from my first day playing with Apple Shortcuts. Thank you for your patience with the poorly named variables and probable sloppy steps to achieve the end results. Feel free to comment where I can save time or add efficiency.

Reading Goal

My goal is to read 8000 pages in a year, so I need to read 8000/365 pages per day (~22 pages a day). Times this by the number of days passed this year and you have the daily target. Easy enough in January, bit harder as you move through the months.

The following is what I set up in the Shortcut:

  1. “Set a variable” as the Current Date called ‘Today’
  2.  “Get the time between” the last day of last year (31/12/2021) and the variable ‘Today’
  3. “Set a variable” called ‘NumOfDay’ to the result of “Get the time between”
  4. Do a “Calculation” of 8000 / 365
  5. “Set a variable” called ‘PagesPerDay’ to the result of the “Calculation” function
  6. Do a “Calculation” of ‘PagesPerDay’ times ‘NumOfDay’ i.e. on 8th January – 8 * 22 = 176
  7. “Set a variable” called ‘PagesSoFar’ to the result of the ‘PagesPerDay’ times ‘NumOfDay’ calculation
  8. Round the ‘PagesSoFar’ to One Place
  9. Speak the Rounded Number

Below are the images to make it a bit clearer. 


Figure 2 - How many pages should I have read shortcut

The title of the Shortcut was “How Much Should I Have Read” which is what you say to Siri to get the output. Like today 9th January responds with 198.

Running Goal

I can repeat the same steps for my running goal of 600km. Changing the variable names and the 8000 to 600. 


Figure 3 – How many kilometres should I have run shortcut

So, I know how many kilometres I should have run, but how can I track how many I have actually run using Apple Shortcuts? Well, there doesn’t seem to be an out of the box Strava, Nike+ or Fitbit shortcut to get run totals or add runs.

Tracking Runs

There is an extensive set of Apple Notes shortcuts, so I set up a Note called “Running” where I can add keep a tally of runs. From that note, I was able to create two additional shortcuts, “Add Run to Total” and “What Distance have I Run”.


Figure 4 - Running Note

Add Run to Total

To add new runs to the Note, the Notes “Append” shortcut was used with the dictated text to allow a number to be said. Start off by saying “Hey Siri, Add run to Total”, Siri asks for input, you say how many kilometres you did on your run and it will add it to the end of the note.

The following is what I set up in the Shortcut:

  1. Add “Dictate Text” function
  2. Use the “Get numbers from” function from the dictated text
  3. “Set a variable” called ‘RunNum’ to the Calculator Numbers
  4. Use the “FindNote” function looking for a note with “Running” in the name
  5. Use the “Append” function to add ‘Numbers’ to the returned note. 

Figure 5 - Add Run to Total Shortcut

What distance have I done?

As I’m adding the runs, there needs to be an easy way of totalling them and then asking Siri to tell me the total without me having to add it all up. This is fairly simple if we iterate over the runs in the Note and add them to a variable before getting Siri to speak the variable back to us. 

The following is what I set up in the Shortcut:

  1. Use the “FindNote” function looking for a note with “Running” in the name
  2. Split the returned Note by New Lines (one for each run)
  3. Use the “Calculate” function to instantiate a variable soon with 0 + 0
  4. “Set a variable” called ‘TotalRuns’ which is a result of the previous calculation
  5. Start a loop of each line of the note by using the “Repeat” function with each item in the split text
  6. Discount the title line “Running” using the “If” function with a check that the repeated item isn’t “Running”
  7. Inside the if add the current lines run amount ‘Repeat Item’ to the running total variable ‘TotalRuns’
  8. Use “Set a variable” to set the already created ‘TotalRuns’ to the calculated value
  9. End the IF
  10. End the Repeat
  11. Set some text using the “Text” variable to be “km this year”
  12. Use the “Speak” function to output the ‘TotalRuns’ variable
  13. Use the “Speak” function to output the ‘Text’

This will output the total run distance this year from the Running Note with “km this year” after i.e., 12 km this year 


Figure 6 - What Distance Have I Done shortcut

So, What Next?

I can add runs to the Note, I can get the total distance I have ran and the target number of kilometres for the number of days passed. Next might be to get how many kilometres over or under the target I am.  

Other shortcuts that might come in useful:

  • Automatically add items to my “AnyList” shopping list
  • Open the garage in case my hands are full
  • Add information to a spreadsheet

Let’s see how I get on!