Tuesday 9 November 2021

Configuring Evolution-EWS to connect to Exchange Online

Let me quickly get something off my chest:

I hate MS Exchange. 

I loathe it. There are few things I despise more. 

I would prefer almost any other integrated messaging system than it. The reasons why are far too long to go into here. It really deserves its own blog entry - which I may do some day.

Unfortunately, unless you are the decision maker for the organisation for which you work, or at least hold some good sway with your IT Steering Committee. You are probably stuck with it.

If your organisation is like most, you are probably migrating to Office 365 or have already done so. If Linux is your primary or preferred platform and you want to be able to receive your email, calendar etc. on your Linux desktop, this may be something of a problem. So, here's my explanation of how to use Evolution as your messaging client for Exchange Online using Exchange Web Services via evolution-ews.

What is "Exchange Web Services" (and why should I care)?

Exchange Web Services (EWS) is an application program interface (API) that allows programmers to access Microsoft Exchange items such as calendars, contacts and email. 

EWS first became available in Exchange Server 2007. It provides the ability to store, retrieve, move and modify email and related data for a single user, a group of users or an entire Exchange Server organisation on an Exchange server. EWS can be used to migrate Exchange data on-prem or to a third-party host in the cloud, or simply as an interface for a mail app or messaging client. Previously, if you wanted to do this you had to leverage Outlook Web Access (OWA).

As well as being available for On-prem editions of Exchange, EWS is available for Office 365, however that access is slightly different.

Evolution-EWS

Evolution-ews from 3.27.91 on has had the capability of connecting to office 365 with OAuth2 authentication. The administrator of the account must allow access via this method. Fortunately this is the default, so I suggest you don't mention it to your Exchange administrator as they may decide to block access.

Users of free accounts at live.com/hotmail.com/outlook.com addresses can also configure EWS account with the same Host URL, but they cannot use OAuth2, it's required to create an application specific password. Organisation accounts can use application specific passwords too, but administrators can disable this feature.
There are two existing application IDs, but the organisation administrators can create their own application and have everything under their control.

To be able to use OAuth2 with outlook.office365.com server an Application ID, which identifies the application which requests access to user data, and a Tenant ID, which basically identifies the organisation, are required.

First make sure everything is installed:

Ubuntu/Debian Instructions

sudo apt-get remove evolution
sudo apt-get update
sudo apt-get install evolution
sudo apt-get install evolution-ews

Note that the first line is there to remove the old version - which may not be up to date. This may not be necessary for you but YMMV.

CentOS/RedHat/Rocky instructions

sudo yum update
sudo yum install evolution
sudo yum install evolution-ews

If you are using DNF, replace 'yum' with 'dnf'

Finding your Tenant ID

Each organisation has assigned its directory (tenant) ID, which is used to identify the organisation when authenticating the user. How to find out the tenant ID is described here. A short walk-through is:

  1. login to https://portal.azure.com

  2. click the View button below Manage Azure Active Directory near the top of the page

  3. the Overview section (selected by default) shows a Tenant information where is the Tenant ID

It can be seen also when:

  1. login to https://portal.azure.com

  2. click the View button below Manage Azure Active Directory near the top of the page

  3. pick App registrations subsection

  4. click Endpoints at the top of the subsection

It opens a table, where can be seen OAuth 2.0 authorization endpoint (v2) and OAuth 2.0 token endpoint (v2). Evolution-ews uses

https://login.microsoftonline.com/$TENANT/oauth2/token

and

https://login.microsoftonline.com/$TENANT/oauth2/authorize
,

where the $TENANT is replaced with the same value as the Tenant ID from the above.

If you are a normal user and do not have the required permission to check in the portal.azure.com, you might find the tenant ID in your browser history. Search for URLs containing tenantId=........-....-....-....-.............

Copy this Tenant ID, it'll be used together with Application ID when configuring evolution-ews.

Choosing an Application ID

There are two unverified applications (for testing purposes). They are setup in a way that they can be used by the organisations, though, depending on the organisation settings, the administrators may or may not need to approve them first. These applications can be used with the organisation tenant ID or with the common (or left empty) tenant ID. Again, it depends on the actual organisation settings. 

  1. 20460e5d-ce91-49af-a3a5-70b6be7486d1 - has both EWS and Microsoft Graph API usages enabled, but the Graph API is not enabled (in evolution-ews 3.38.x) due to its incompleteness. The application identifies itself as GNOME Evolution. It's preferred in case the Graph API would be used in the future, thus the transition to it will be smooth.

  2. 751cf8be-ca07-484b-9308-fac4b9d85eff - has only the EWS protocol enabled. The application identifies itself as GNOME Evolution EWS.

  3. Users can also try application IDs shown at point 12 of this Microsoft page, like d3590ed6-52b3-4102-aeff-aad2292ab01c or ea5a67f6-b6f3-4338-b240-c655ddc3cc8e, with the Redirect URI set to urn:ietf:wg:oauth:2.0:oob and other values kept empty.

If your organisation has its own Application ID, use that one. If you are the administrator for your organisation, and want to create your own Application ID by following this link.

Evolution Instructions

Launch the Evolution application. If this is a new installation, follow the prompts below to configure your account. Otherwise, select the menu items File -> New -> Mail Account, click Next, then follow the prompts.

  • Enter your name and your primary SMTP address, uncheck Look up mail server details… and click Next
  • For Server Type, select Exchange Web Services
  • For Username, specify your email address
  • Change Host URL to https://outlook.office365.com/EWS/Exchange.asmx
    Click the Fetch URL button, providing your EID password when prompted. (If this doesn't work, don't worry, it can be done later). This will result in the OAB URL field being populated, which is the address from which the client can download a copy of the Offline Address Book.
  • Change Authentication to OAuth2 (Office365).
  • Make sure that Override Office365 OAuth2 settings is checked and populate the Tenant ID and Application ID fields as follows:
    • Tenant ID: your tenant ID
    • Application ID: choose from above
  • Finish the New Mail Account Wizard, and you will then be taken to the University’s login page. Authenticate with your EID credentials and perform Duo multi-factor authentication.

Configuring Evolution-EWS to connect to Exchange Online

Please note that the initial synchronization with your account may take an extended period of time if you have a large mailbox.

If you've used EWS previously, you would have noticed that credential management is handled by the Gnome settings under online accounts. With O365 this does not happen. I'm not sure why it's different - it may have something to do with how the data is presented via the App ID, but I'm only guessing here. If anyone knows, please enlighten me in the comments.

Acknowledgements

The following links were helpful to me and acted as source material:

https://sites.utexas.edu/glenmark/2021/02/01/how-to-setup-your-office-365-email-using-evolution-ews-linux/

https://wiki.gnome.org/Apps/Evolution/EWS/OAuth2

https://bugzilla.redhat.com/show_bug.cgi?id=972562

Saturday 16 October 2021

Other things this pandemic has taught me

Things this pandemic has taught me

This is not a health blog. 

This is a technical blog with a science/engineering perspective. So, when I post something about health, infectious diseases, vaccinations etc. I post it from that perspective. I make the assumption that the best scientific information we have available that is accepted by peak bodies is true and correct. To that end I post links to primary and secondary sources. If you want to argue the science, go argue it with the actual professionals. I'm not that arrogant that I think I know better than professionals in their field.

It's also not a political blog. In fact, in the extra categories, you won't see anything on politics. You'll see critical thinking, the scientific method... and possibly a few recipes as well as some creative writing and a few personal observations.

I've also posted elsewhere some snarky things about what this pandemic has taught me: particularly with regard to how much people value the lives of others over money and willingness to forgo some temporary discomfort in order to  safeguard other people. It's been sobering to say the least.

There are also some other things that this pandemic has taught me, from a futurist perspective. There are lessons to be learnt. Will we remember them or go back to business as usual?

Many of us are more productive when working from home

I still think offices have a place, but not like they used to. Many employers are champing at the bit to get people 'back to work' when they have been working this entire time, often with much higher productivity. For some reasons, there are inept managers still among us that think that someone working from home is somehow having a holiday. My prediction is that many workplaces will suffer a drop in productivity when workers are forced back into the office.

A long time ago at a previous workplace, I negotiated a 40% work from home. After a trial, it was increased to 60% by my boss because he could see the extra productivity he was getting from me. However, he had problems with his boss. They didn't like it one bit. The reasons they gave were:

 - How will you know he's working?
 - If others find out, they'll want to do it too.

Hopefully, I won't need to explain why these reasons are so ridiculous.

You don't need to go to meetings

Before the pandemic there were more than a dozen meeting collaboration tools around. Now there's basically two: Zoom and Teams. The latter really only exists because it integrates into the MSOffice suite and it can also be your phone system. I'll throw Teamviewer in as a third, but its primary use is for support - plus it's dear as poison. Zoom comes out on top in my books because it runs on literally anything and all you need is a subscription. Teams is only useful in medium to large organisations.

At the start of the pandemic, there were huge teething problems: microphones not working, cameras either not working or people didn't have them. We didn't know the 'rules' of zoom meetings (muting etc). But we're all past that now. Plus we learnt an important thing: Most of the time, we didn't need to be at that meeting. We could have sent an email. Meetings got shorter. People learnt to be concise. If we weren't really involved, we could mute, turn the camera off, and continue working on whatever we were working on - or just look at facebook.

Nobody wants to go back to face to face meetings. Nobody wants to spend time driving across town, parking, paying tolls, waiting for everyone to be free, struggling to setup your notebook to work with the projector, then using up the obligatory one hour in the board room trying to pad out a meeting.

We can do pretty much everything on zoom. Usually we can do it better.

You can be anywhere in the world

This will probably turn out to be a downside. As employers work out the first two points, they will probably decide that employing someone to do your job in India or The Philippines will save a lot of money. So to you, that may make you think you can live anywhere and still keep your job, the reality is that you may be introduced to new members of your 'team' that are offshore and need to be trained by you in all aspects of your job.

Of course, this is just an extension of globalisation. The pros and cons of which are outside of this discussion. How it affects you is the overarching issue. I've already seen this happening with one large company I know transitioning to IT support being offered by an Indian based company. I worked with my counterpart in the handover. His skillset was roughly equal to mine and we held similar positions. However, because he lives in India, his salary was about half that of mine. By Indian standards, that was great - he was paid very well. The point is that this disparity will continue to drive knowledge based jobs offshore to a much greater extent than it will permit you to move to Tasmania.

The CBD will become the place where people live more so than where they work    

Nobody wants commercial real estate in the city anymore. Offices have emptied. Those that are left attract vastly lower rentals than before. For an industry driven by debt, no back will lend at anything near the value of the resource. 

Residential properties in cities, however, have boomed. Restrictions in travel meant that if you wanted to go to the city, you had to live there. As more people move to the cities to live, prices rise and suddenly commercial developments are now being restructured as residential. In fact, the highest value seem s to be in the commercial/residential mix. Where there is a residential building, with shops and cafes at ground floor, and gyms, day care, professional suites, schools, universities, small offices etc. at the lower levels. Some include green space and play grounds creating a fully self contained living environment free from unnecessary commuting. 

In the suburbs, an office is an essential room

Two of the rooms in our house have now been converted to offices. My wife and I worked out we couldn't really share an office with me working full time from home. In house auctions, it has been noticed that homes with a dedicated and separate office command much higher prices than those that don't. Even more so if the office has an external entrance or easy courier access.

I spend way more time in my home office than I do in the loungeroom or bedroom. For me, it has become the most important room in the house.

You don't have to "go" shopping

With home delivery of goods, click and collect, home shopping, that trip to the shopping mall isn't necessary any more. But try and buy local and not from Amazon.

Restaurants and cafes aren't a luxury

Fast Food chains will weather the pandemic. Your local family owned Italian restaurant may not. Many that adapted to the pandemic: with simpler menus, delivery friendly foods, contactless trading etc. seem to have done okay. If you enjoy going to your local restaurant as a treat every couple of months, make sure you patronise them regularly during lockdown. Otherwise, they may not be there afterwards.

Self-care isn't self-indulgent

As a poor uni student, I learnt that if I treated myself to an iced-chocolate once a fortnight, I didn't feel so poor. It was something simple I could look forward two that made me feel just a little bit special.

Pampering is vital to well-being. Activities that once felt indulgent became essential to our health and equilibrium, and that self-care mindset is likely to endure. Whether it is permission to take long bubble baths, tinkering in the shed, planting a tree in the backyard, watching a pay-per-view on netflix, anything that helps you to feel better about yourself will not only help you, it will help those around you.

We don't store enough food and provisions

The big lesson we should have learnt is we must have 1-2 months supply of non-perishable food and provisions: toilet paper, rice, pasta, flour, sugar, long life milk, cleaning products, toiletries, tinned food, water - all of things things can become very scarce in hours if there is panic buying. Perishables don't suffer as much. These things are easy to store, cheap to buy and you suffer if you don't have them. So get them and avoid panic buying.

Some jobs are essential

Every military in the world has reserve forces. The basic idea is to take a young person, train them to be a soldier in peacetime through a very small imposition of their time and give them some money to make a sweet deal. In Australia, the general commitment is one night per week, one weekend a month, two weeks a year. For that, you receive some tax free dollars and training as a soldier. The quid pro quo is that anytime up until twenty years after you leave the reserve you can be activated. This allows the military to keep a small military during peacetime, but rapidly expand it in case of war with already trained soldiers. 

We realise the value of this for ware. We should now realise we need this in case of a long term medical emergency such as a pandemic. The recent bushfires show that we need this for other emergency services as well.

So, we should have reserve paramedics, nurses, orderlies etc. People that have a basic level of training in a profession. Enough to assist the permanent staff during a crisis. Consequently, other emergency services such as fire fighters and police deputies should be included as well.

We won't prepared for the next one

This pandemic was and is pretty bad. But it could be a lot worse. Until Delta, the reproductive factor was relatively low (2.4). Delta changed everything, but at least it didn't start out with Delta's reproductive rate (estimated at 9.0).

The mortality rate (at around 2%-3%) whilst bad, was at least within the realms of manageability. If the mortality rate was 10% or higher, we may have well seen major civilisation changes: civil war, anarchy, financial system collapse. The previous two coronavirus outbreaks (SARS and MERS) had mortality rates of 10% and 90% respectively. Fortunately, both had low reproductive rates. The black plague had a mortality rate of around 50%.

Experts universally agree this isn't the last outbreak. There will be more. Statistically, the next one will be much worse. But we aren't prepared for it. We're still struggling to deal with the current one. We've learnt a lot, yes, and we've developed some incredible medical preventions and treatments.But as this pandemic trails off and either disappears or becomes endemic, the money for further research will disappear very quickly.

Wednesday 8 September 2021

Ten Questions for Anti-Vaxers

When I encounter a REAL anti-vaxer, I generally try to ask them the following ten questions.

Now, when I say anti-vaxer, I don't mean the vaccine hesitant or those that are convinced by an anti-vax website or YouTube video. I'm referring to those who run the websites, write the books, make the videos etc.

The one's who should know better.

The one's who actually do know better.

The one's who are anti-vax, not because they don't think vaccines are safe and effective, but because they KNOW they are safe and effective. Well... most of them.

"How can that be?" You say. Well, scratch an anti-vaxer, you'll find a racist eugenicist that Dr Mengele would be proud of. It's that simple.

As I always say, scratch an antivaxer and you'll find a eugenicist
Image credit: Eugenics Society Poster, 1930s (Wikimedia Commons | CC BY 4.0)

The problem is, they can't admit it. Nobody would listen to them. They would have no followers and no influence. Also no $$$ from the book sales and lecture tours.

The thing is, they're proud of their stance. They'd love to admit it. So, they just need a little encouragement to do so.

Now I did say "most of them". There are some that are - well - nutcases. These will usually have a swag of conspiracy theories: The Earth is flat; Lizardmen control the world; Moon landing hoax; Bill Gates is the anti-Christ; 9/11 truthers; Birthers; 5G. It doesn't matter. Conspiracy theories are like Tim Tams: You can't stop at one. You also can't reason with them, but you can get them to admit to the other conspiracy theories. That's usually enough to discredit them a little. But for some reason Chef Pete is like Teflon when it comes to this. Maybe that says more about his followers than anything else.

The ten questions are all about anti-vaxers outing themselves for what they really are. So, often they will ignore them or avoid answering them directly. Don't let them off the hook. If they say it isn't a simple yes or no, ask why. Keep asking. Don't let them shake you. Get others to ask the same simple questions.

The first two questions are simply a way to separate the wolves from the goats. A conspiracy theorist will usually reject one or both of these, so the others become superfluous. If they reject both, then continuing further is impossible. You simply don't have a common grounding in logic and reality. Any argument will quickly devolve into either solipsism or magical thinking. You may be able to get them to admit to other conspiracy theories, which would be a win of sorts.

1. Do you accept the Scientific Method? 

For some reason, we seem to have a plague of scientific-illiteracy on social media. This is compounded by the illiterate reveling in their illiteracy as though it's something to be proud of.

There's nothing magical about science. In fact "science' isn't a thing, it's a discipline. Science is defined by any field of study governed by the scientific method. Broadly speaking, Science is simply a systematic way for carefully and thoroughly observing nature and using consistent logic to evaluate results.

Ask them: Which part of that do they disagree with? Being thorough? Using careful observation? Being systematic? Or using consistent logic?

The scientific method mandates that all aspects of scientific research must be:
- testable
- reproduceable
- falsifiable

https://www.livescience.com/20896-science-scientific-method.html

The scientific method has been around for over 300 years. Adherence to the scientific method has provided us with every single technological advancement we recognise today and has doubled our life expectancy. If you reject the scientific method, you should forsake the computer you're using right now, your car, electricity, flying, your ready access to food and medicine.

There are some people who like to point to changes in scientific opinions over time as an example of science not working when exactly this is the opposite. Following the scientific method requires you to change your opinions when new data shows that opinion to be incorrect. Sure, science has been proven wrong, but it's always by better science and not because of some fanciful dogmatic idea that someone had. It was because the evidence lead in a different direction and scientists - as a body - moved in that direction.

2. Do you accept the Germ Theory of Disease?

Adherence to the Scientific Method lead to one of the greatest scientific discoveries of all time: Louis Pasteur's Germ Theory of disease. It remains one of the greatest scientific lay-down miseres of all time with an overwhelming body of irrefutable proof. Prior to this it was thought that "Miasmas" were responsible for disease. Miasma theory posited that diseases were the product of environmental factors such as contaminated water, foul air, and poor hygienic condition rather than from microorganisms. So, when an antivaxer starts spouting these reasons, then they probably deny Germ Theory as well. This is why they reject vaccines, because if vaccines DID actually work, then they'd have to accept Germ Theory.

If you get a yes to both questions, then you can proceed on. Most likely, you'll have a eugenicist. So the trick is to get a straight answer without sounding dogmatic or manichaean. Don't tell them they have to give a yes or now answer, ask them why they can't. Probe every reason and sub reason. If they get angry or complain, ask them why it's such a big deal. If they still don't, restate the question as "So, you don't know if xxx is true (or false)". They don't like to say they don't know something, so they'll usually say "Yes, I do know" which you follow up with "Well, why didn't you just say so in the first place?"

3. Do you think the Earth is overpopulated?

This one is easy. Most (if not all) will say yes. It means little, but it builds a foundation to follow. One they can't backtrack on or use as an excuse later, because the admitted it. Also, it gets them used to them saying yes and you moving on like it's no big deal - which at this stage it isn't.

4. Do you think the only way to survive as a species is to drastically reduce our population in a short period of time?

This should come easily as well. For most eugenicists, this is THEIR argument. The one THEY own, which they use with their indoctrinated sheep later on.

But they may smell a rat here. So you made need to spend a little time in clarification. Perhaps you may need to reword it to their liking. You may even ask them to reword it. After all, you don't want to create a strawman.

5. Do you agree that the statement "Survival of the fittest?" should apply to humanity as well as the animal kingdom.

This is another eugenicist article of faith. However, at this point they'll probably smell a rat and start looking for the exit. Don't let them. Hang on and reword it to their liking if necessary.

6. Do you think that we are generally weaker and less healthy than we were 200 years ago?

It would be extremely difficult for a anti-vaxer to say no to this question after saying yes to the preceding ones. If they say no, then why are we healthier? because of modern medicine of course!

The answer is actually no. We live twice as long, suffer less and no longer die from simple things. To say we were healthier back then ignores survivor bias.Thing of all the illnesses you've suffered in your life, accidents you had, operations etc. Without modern medicine, would you be alive or dead right now?

7. Do you think that modern medicine has contributed to weakening the gene pool?

Now we are getting to the nitty gritty. At the core of the eugenicist argument is that by culling the weak, those that are left have healthier genes and only they go on to reproduce. This is the crux of their argument. Since eugenicists do have a core of like-minded believers, they can't say no or even prevaricate. Whereas a yes won't mean very much to the sheep, it provides the solid ground for the remaining questions.

8. Do you think that childhood vaccines and other health interventions in children have allowed weaker children that normally would have died to grow up and reproduce?

This question follows from the last as night follows day. But this is the big one that will rock the sheep.

If they say yes, they admit that vaccines actually work. If they didn't, then 'weaker' children wouldn't survive these diseases. This is actually the opposite of what they imply to their followers.

Have fun in this space.

9. Do you think that some racial groups have better, stronger genetics than others?

Scratch an anti-vaxer, find an anti-semite eugenicist
This simply also follows on Q7. If ALL health is genetic, then some races are naturally healthier, smarter, better than others. It's simply a logical extension of racial theory and eugenics.

Hang around in anti-vax echo chambers for long enough and you will see a lot of casual racism, espcially anti-semitism.It's vile and disgusting, but there for the faithful to see and ignore

If you can handle it, and don't call them out on it, they you'll see more and more of it from these cryptofascists.

10 Do you think that allowing children to get childhood diseases (which some may die from) will improve the overall health of the gene pool?

If you've managed to get this far: congratulations! You've done better than me. These oxygen-thieves are smart enough to ignore this question (usually). If you can get them to admit to this question, you have proof they are a eugenicist.

Scratch an anti-vaxer, you'll find a racist eugenicist that wants your children to die.


Saturday 31 July 2021

Wayne's Deadly Toblerone Cheesecake

Toblerone Cheesecake

Firstly, make your favourite biscuit base and place it in a shallow, springform cake dish that is well greased and chill. You can cheat and use a prepared crust if you like. As for me, I use crushed Maria biscuits and butter.

Ingredients: (metric - 1 tablespoon = 40ml, 1 cup = 250 ml)
750g Philadelphia cream cheese (3 blocks) - one can be light Philly if you're a wimp
2 eggs
1 tablespoon of cocoa
1 tablespoon of white rice flour (or plain flour)
1 tablespoon of butter
1 x 100g Toblerone (preferably dark Toblerone)
3/4 metric cup castor sugar
condensed milk
liquid pouring cream (to serve)

Method:
1. Beat cream cheese and sugar together, add some condensed milk to help soften and to add to flavour. Generally no more than 1/4 tin of condensed milk should be added.
2. Melt Toblerone in the microwave with the butter, be careful not to boil it. Use small steps and mix with the butter until smooth and not split. The butter is optional but does aid in the melting and binding and reduces the risk of cracking. The less the better as the more you use the higher the chance of splitting the chocolate.
3. Add the melted Toblerone, flour and cocoa to the cream cheese and mix well. Then add the eggs and mix again.
4. Pour into prepared crust and bake at 160 degrees celsius for 60 minutes.
5. When cooked it should still have a slight wobble in the middle. Leave in oven to cool to avoid cracking. Remove from oven and chill overnight.
6. When serving dust with icing sugar or top with grated Toblerone.

tips:
1 Soften Cream Cheese.
2 Be gentle with the eggs - Overbeating after the eggs are added can result in cracked cheesecakes.
3 No peeking! Opening the oven door during baking can cause cheesecakes to crack.
4 Set the timer. Start with the shortest baking time and add more time only if necessary.
5 You can also cook this in ramekins in a steamer for 10-15 minutes. When cooked, cut a hole in the centre, remove the cheesecake 'hole'. Fill with pouring cream, stir and replace the cheesecake hole prior to serving. Steaming will leave the centre slightly gooey. This will mix with the cream to make a liquid ganache centre. When steaming, do not chill, but serve immediately.
6 I plan to try cooking this in an air fryer sometime to see if it works.

NB: This is VERY rich! I serve it on a plate surrounded by liquid pure cream. The cream is necessary as the cheesecake will soak up the cream so as not to make it too rich. I also make a redcurrant sauce that I boil in the microwave and poor over the top immediately prior to serving.

To date, I have only found one person who can eat a whole slice without turning green.

Nutrional information:
I estimate the fat content to be about 400g of which 300g would be saturated and about 5000 calories. This is about 8 times the daily allowance of fat and enough calories to keep a fit, active adult going for two days.

My favourite part of this dish is watching the face of people when they first take a bite!

Friday 11 June 2021

Men are from Mars etc

The following is a story I've been lugging around in hard copy, always looking for an excuse to throw it out. Well, what better way than to put it into blog entry!

Remember the book "Men are from Mars, Women are from Venus" by Dr John Gray? Well, here's a prime example offered by an English professor at Southern Methodist University, English 44A, SMU, Creative Writing, Prof. Miller.

In-class Assignment for Wednesday

'Today we will experiment with a new form called the tandem story.  The process is simple.  Each person will pair off with the person sitting to his or her immediate right.  One of you will then write the first paragraph of a short story.  The partner will read the first paragraph and then add another paragraph to the story.

The first person will then add a third paragraph, and so on back and forth.  Remember to re-read what has been written each time in order to keep the story coherent.T he story is over when both agree a conclusion has been reached.'

"The following was actually turned in by two of my English students:

Rebecca - last name deleted, and Gary - last name deleted." 

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

Friday 30 April 2021

A response to "James Hansen's many and varied furphies" by John Happs

The following is a critique of the article "James Hansen's many and varied furphies" by John Happs as published in Quadrant on 26 August 2013 from a Critical Thinking perspective. I will state at the outset that I regard Quadrant to be a reich-wing rag that barely deserves the title "magazine". It is produced as propaganda for extreme right wing political viewpoints and openly states its position as "sceptical of 'unthinking Leftism, or political correctness, and its "smelly little orthodoxies"'. The original article may be found here.

Rather than tackle the issues of climate change, Happs has chosen a time-honored practice of avoiding a discussion of facts and engaging in a smear campaign against a respected scientist. 

"Hansen has given numerous public talks about what he sees as an urgent need to reduce greenhouse gas emissions by stopping the mining and burning of coal. He also wants oil exploration stopped, as well as the further exploitation of tar sands." 

Without discussing the merits here, the statement is factually incorrect. The impression is given that Hansen is a radical that wants to completely ban oil and gas exploration. Hansen's opposition has very focused at environmentally sensitive areas such as the Amazonian rainforests and Arctic exploration. His similar concerns about the tar sands in Canada are based on the readily available evidence of the damage to the local environment. 

Happs is attempting to create a straw-man argument: painting a picture that is simply not realistic, unless of course Happs thinks that anyone who doesn't approve of the obliteration of Amazonian rainforests is a loony radical. 

"He unashamedly promotes alarmism about the trivial levels of atmospheric carbon dioxide" 

This is the fallacy of "Conclusion entered as evidence".  

The way you identify propaganda from a well-argued position is the former starts with the conclusion. The latter reports facts, makes inferences based upon syllogistic arguments which lead to a conclusion. From there it is simply a matter of establishing if the facts are true and if the argument is sound. A sound argument is such that if the facts or true then the conclusion must also be true. A strong (or cogent) argument is such that if the facts are true then the conclusion is probably true. 

In this article you see none of these things, as I will demonstrate. 

The adjective "unashamedly" is judgemental. It assumes the person has something to be ashamed of. 

"Promotes" denigrates the fact that Hansen is an expert (and conversely that Hall isn't). 

"Alarmism" is another judgement. Used together we have a fallacy known as a "thought stopping cliche". It means nothing and serves only to create a negative impression. 

Also in the same sentence "trivial levels of carbon dioxide". This is "facts not entered into evidence". This hasn't been demonstrated, and in fact, cannot be as this is one of the most provable evidences demonstrating the reality of climate change. 

"In 2012 Robert Bryce quoted Hansen in the Dallas News: “The trains carrying coal to power plants are death trains. Coal fired power plants are factories of death.” " 

This one is truly brilliant! Notice that he doesn't say that Hansen said this, he says that "Robert Bryce quoted Hansen". Interesting! Why did he do this rather than simply quote Hansen and provide a reference? 

The original words were written in this article from the Guardian. Of course, if Happs had referred to the original article - and someone checked it out - they might actually read him in context: 

"The trains carrying coal to power plants are death trains. Coal-fired power plants are factories of death. When I testified against the proposed Kingsnorth power plant, I estimated that in its lifetime it would be responsible for the extermination of about 400 species - its proportionate contribution to the number that would be committed to extinction if carbon dioxide rose another 100 ppm."  

Puts that a little more in perspective here, doesn't it? Read the full article here to see how it all fits in contextually.

Again, the purpose here is to smear Hansen and make him look like an activist first and a scientist second - leading us up to the fallacious sucker punch of them all: 

"Hansen sees himself as an activist and a scientist, but he can’t be both and remain credible." 

This of course, is a ridiculous statement. History is full of activists that were professionals in their field. In fact, most of them are activists precisely because they know they are talking about. According to Happs, a "good" scientist is not allowed to have an opinion. "Good" scientists stay in their boxes and report their findings to their vastly more intelligent "masters" who are permitted to have opinions.  

"Any scientist with a pet hypothesis who selects only data which support that hypothesis, whilst ignoring conflicting data, must lose the respect of their scientific colleagues." 

Happs is assuming here that any scientist with an opinion cannot be objective and will of course commit scientific fraud. Happs offers no evidence that Hansen has EVER done this, he is simply saying it is ipso facto. In other words, Hansen's scientific results are a direct result of his prejudiced opinions rather than the other way around. Presumably as well, Happs places all climate scientists in this box, as almost to a person, they agree with Hansen's results. 

"Real science actually looks for refutation whereas pseudoscience is intolerant of dissent." 

Well, yes, this true. However the pseudoscience is with the deniers. That's because the "scientists" say that climate change is real. The deniers are not scientists and therefore - by definition - "pseudoscientists", and Happs is one of them.  

The article is quite long and continues to cherry-pick results and apply statements that were never intended to be applied to those statements. Happs is not looking at the holistic science, he is picking and choosing and committing every single sin he subscribes to Hansen: He isn't looking for facts, he is starting from his prejudiced conclusion and working backwards from there. This is called "conclusion shopping". 

This article is an A1 demonstration of yellow journalism in action. Happs' dishonest portrayal of Hansen and the science of Climate Change is staggering in its tenacious mendacity. Godwin's Law precludes me from making the obvious comparisons that scream from the pages of Quadrant. I'd say that the article was a discredit to the journal it was published in, but that would only serve to elevate Quadrant to a level it doesn't deserve.

Sunday 25 April 2021

CentOS 7 post installation script

automatic basic server runup tasks

I like automation. Anything I can do to speed up repetitious tasks is worth the effort. The following shell script is a work-in-progress. Each time I run up a server, I use this script to automate the post installation tasks. I just uncomment the sections I need and run the script. Parts of it take some time and require some human intervention, but usually that just involves pressing 'enter' a few times. The script doesn't do much in the way of hardening the server - that's the stuff of another blog entry.

To use the script, cut and paste it into an editor, make it executable and run it as root. Unfortunately sudo doesn't cut it for some steps. Make sure you uncomment the sections you need first. There are modifications in there for RHEL if you're using that instead of CentOS. I have created a version for CentOS 8, but the it now EOL at the end of this year, I figure it's a little pointless. If anyone wants it, just ask and I'll make it available.

Briefly, the script does the following things:
  1. Runs a yum update using deltas
  2. Adds the epel repository and optionally the remi repository
  3. Installs selinux utilities
  4. Installs PERL, CPAN and useful utilities for PERL.
  5. Installs Apache or NGINX
  6. Installs php for apache
  7. Optional upgrade for php 5.6 
  8. Installs webmin
  9. Installs vsftpd
  10. Installs and secures mysqld
  11. Installs vmtools
  12. Installs miscellaneous utilities
  13. Configure to remove old kernels automatically
  14. Setup email forwarding
  15. Setup and configure WordPress
As I runup more servers with different services, I will update and expand the script. I'm currently writing a GUI front end for the script in Xojo (see below) to customise and generate the script for any environment. If it works, I hope to expand it to include the ability to deploy the script remotely as well as generate it.
 


#!/bin/bash
## The following commands increase the number of packages available
##
yum -y update
yum -y install deltarpm
yum -y install epel-release
## Uncomment for REMI
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# yum --enablerepo=remi,remi-test

yum repolist
yum -y update

## RHEL instructions
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm
# rpm -ivh epel-release-7-10.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# yum --enablerepo=remi,remi-test
# yum repolist
# yum -y update

## Install SELinux utilities
##
yum -y install policycoreutils policycoreutils-python selinux-policy selinux-policy-targeted libselinux-utils setroubleshoot-server setools setools-console mcstrans

## Install PERL and useful modules and utilities via cpan and cpanm
##
yum -y install perl perl-Net-SSLeay perl-IO-Zlib openssl perl-IO-Tty cpan
cpan App::cpanminus
cpanm Net::FTPSSL
cpanm App::cpanoutdated
cpan-outdated -p | cpanm
cpan-outdated -p | cpanm

## Install and start Apache Web server.
##
yum -y install httpd
#<change httpd.conf listen to 0.0.0.0:80>
systemctl enable httpd.service
systemctl start  httpd.service
systemctl status httpd.service
firewall-cmd --zone=public --permanent --add-service={http,https}
systemctl restart firewalld.service
firewall-cmd --list-all
apachectl graceful
apachectl configtest

## Install NGINX
##
# echo -e "[nginx]\nname=nginx repo\nbaseurl=http://nginx.org/packages/centos/$releasever/$basearch/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/nginx.repo
# yum -y install nginx php php-common php-fpm
# firewall-cmd --zone=public --permanent --add-service={http,https}
# systemctl stop httpd
# systemctl disable httpd
# systemctl enable nginx
# systemctl enable php-fpm
# systemctl start nginx
# systemctl start php-fpm
# mkdir -p /srv/www/<website>/public_html
# mkdir /srv/www/<website>/logs
# chown -R nginx:nginx /srv/www/<website>

## Install PHP for Apache, mysql and MSSQL
##
yum -y install php php-pear  php-mysql
## Enable the following as required
# yum -y install php-pgsql php-odbc php-mssql php-ldap php-soap
# yum -y install phpmyadmin httpd-tools
# cp /etc/phpMyAdmin/config.inc.php /etc/phpMyAdmin/config.inc.php.orig
# Harden PHP
# cat /etc/phpMyAdmin/config.inc.php.orig | sed -e 's/AllowRoot\'\]\ \=\ TRUE/AllowRoot\'\]\ \=\ FALSE/g' > /etc/phpMyAdmin/config.inc.php

## Test with http://server/test.php
## Test with http://server/phpMyAdmin

## Upgrade to PHP 5.6 (optional)
##
#rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
#yum repolist
#yum -y remove php-common
#yum -y update
#yum -y install php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl #php56w-mbstring
#systemctl restart httpd.service
#php -v

systemctl restart httpd.service
echo -e "<?php phpinfo(); ?>" > /var/www/html/info.php
systemctl restart httpd.service

## Install and run Webmin administration (requires PERL)
##
echo -e "[Webmin]\nname=Webmin Distribution Neutral\nbaseurl=http://download.webmin.com/download/yum\nenabled=1" > /etc/yum.repos.d/webmin.repo
rpm --import http://www.webmin.com/jcameron-key.asc
yum -y install webmin
systemctl enable webmin.service
systemctl start  webmin.service
systemctl status webmin.service
firewall-cmd --zone=public --permanent --add-port=10000/tcp
firewall-cmd --reload
firewall-cmd --list-all

## Install and start VSFTPD
##
#yum -y install vsftpd ftp
#systemctl enable vsftpd.service
#systemctl start vsftpd.service
#firewall-cmd --zone=public --permanent --add-service=ftp
#systemctl restart firewalld.service
#firewall-cmd --list-all

## Install, secure and run MySQL
##
#yum -y install mariadb-server mariadb
#systemctl start mariadb
#mysql_secure_installation
#systemctl enable mariadb.service
#systemctl status mariadb.service

## Install tools for vmware
##
yum install open-vm-tools
vmware-toolbox-cmd -v

## Install Misc utilities as desired
##
yum -y install wget telnet bind-utils nmap mlocate mc
yum -y install elinks

## Remove old kernels and set yum to preserve only two. Setup auto updates
##
yum -y install yum-utils yum-cron
package-cleanup -y --oldkernels --count=2
echo -e "\ninstallonly_limit=2\n" >> /etc/yum.conf
#yum -y install yum-cron # edit /etc/yum/yum-cron.conf or do this via webmin instead on yum-cron
#systemctl start yum-cron
#systemctl enable yum-cron

## Setup email forwarding
##
yum -y install mailx
ln -s /bin/mailx /bin/email
echo -e "set smtp=smtp://<mail forwarding ip address> " >> /etc/mail.rc


## Install Wordpress
#yum -y install php-gd
#systemctl restart httpd.service
#wget http://wordpress.org/latest.tar.gz
#tar xzvf latest.tar.gz
#rsync -avP ~/wordpress/ /var/www/html/
#mkdir /var/www/html/wp-content/uploads
#chown -R apache:apache /var/www/html/*


## Setup WordPress Database
#mysql -u root -p <password>
#CREATE DATABASE wordpress;
#CREATE USER wordpressuser@localhost IDENTIFIED BY 'password'
#GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';
#FLUSH PRIVILEGES;
#exit

## Configure WordPress
#cd /var/www/html
#cat wp-config-sample.php | sed 's/database_name_here/wordpress/g' | sed 's/username_here/wordpressuser/g' | sed 's/password_here/password/g' > wp-config.php

Thursday 22 April 2021

COVID-19: AstraZeneca Vaccine and Blood Clots

AZ COVID-19 vaccine and blood clots
There's a huge amount of misinformation floating around about COVID-19 and in particular, the AstraZeneca vaccine and the issue of blood clots. Media reporting is partly to blame for simultaneously sensationalising and glossing over important information. So I thought it was about time to present the facts of the issue. I will source all statements made, if I miss anything out - let me know.

I'll add a caveat here: I'm not a medical expert. Don't get medical advice from social media or even blogs like mine. Go to your doctor. What I've done is glean what I can from the information that is publicly available. I may be wrong on many points, so apply a good deal of critical thinking to what I've written here as you should to any information that is presented to you: particularly if it claims to be authoritative.

COVID-19 Vaccines in general

There are currently four vaccines that are authourised for use in preventing the SARS-CoV-2 infections. Technically, they are in phase IV global post-licensure surveillance. They are:

  • Pzifer-BioNTech (mRNA)
  • Moderna (mRNA)
  • J&J/Janssen (viral vector)
  • Oxford/AstraZeneca (viral vector)

Other vaccines are in different stages of development. Most of these will not make it into public release. Now that there are already vaccines in production and distribution, any vaccines further developed will have to demonstrate they are better than those currently available. Not listed is the Chinese based Sinovac vaccine called CoronaVac and the Russian Gamaleya (Sputnik V) vaccine. Both of these vaccines use traditional production techniques making them cheap to produce but they have poor effectiveness profiles. Many third world countries have opted to use them, but not a single western nation has.

COVID-19 vaccine current state of development

The numbers change daily. You can follow the progress of vaccine candidates here. For those who claim the vaccines haven't been tested, download the daily R&D blueprint and check any trial link you link. Thousands of clinical trials for safety & effectiveness have been and are being conducted.

Oxford-AstraZeneca (AZ) Vaccine

The method used to provoke an immune response is called "viral vector'. It uses a modified version of a different virus - called the vector. This vector is injected intramuscularly and enters the cells of the muscle. From there, the vector manufactures a spike protein identical to that found uniquely on the surface of the SARS-CoV-2 virus that causes COVID-19. The cell then displays the protein on its surface. Our immune system recognises it shouldn't be there and triggers an immune response targeted at the spike protein. Since the body is fighting an 'infection', we have the usual symptoms that accompany an immune response. This includes injection site pain, fever, lethargy, feeling 'sick' etc. However these are immune response reactions, not an actual disease. Different people will have different responses. source

At the end of the process, our bodies have learnt how to protect us against this infection. Effectiveness after two vaccines vary according to the variant encountered. Certainly, this vaccine is much less effective than the Pfzer vaccines (>90%). However, best data to date shows at worst it is 61.7% effective (UK B117 variant) and at best it is 81.5%, with the average being 77.3%. source

A recently published paper in The Lancet is a little more critical, estimating the effectiveness at 67%.

Blood Clots

Once the AZ vaccine was being administered globally, reports started emerging of blood clots at an significant uptick over the background rate. In about 1 in 4 of these, death was the result.

It's important to clarify something here as a sidebar. When you administer a medication to millions of people, large numbers will have 'something' medical happen to them over the month following the administration of the medication. People will have heart attacks, strokes, embolisms etc. that have nothing to do with the administration of the medication. However we do have a good idea of the general rate at which these events occur. In fact, your life insurance company can tell you the percentage chance of any medical event happening to you over the next year. It's quite a well studied science. This is why all adverse events that happen following vaccination are reported. This reporting is mandatory and the reports are publicly available and searchable. In Australia, it is the DAEN (Database of Adverse Events Notification). In the United states it is VAERS (Vaccine Adverse Event Reporting System). Researchers compare adverse events with the rate that normally occurs. When there is an 'uptick' in an event, it is investigated. In the case of serious events, they are all investigated thoroughly as a public health measure.

At first, since the number was very low, there was skepticism that the AZ vaccine was the cause as vaccines have never been known to cause blood clots. Vaccines are injected intramuscularly not intravenously and have not direct connection with blood.

From the investigations, however, the AZ vaccine has been identified as the likely cause in over 100 cases. From these numbers, it is likely the incidence of a blood clot from the AZ vaccine is about 1 in 1 million. The phase III clinical trials involved 20,000 people who received the vaccine. Blood clots were not observed in any of the participants.

UPDATE 30 Sep 2021: We have a lot more data on the incidence. With increased surveillance for TTS, including very minor instances (headaches, thigh soreness etc) there have been 125 reported cases in Australia out of 9.6 million vaccinations. This makes the chance of a blood clot 1 in 76,800. Now, that's a lot higher than one in a million, but remember, these include minor cases. Of those 125 people, 8 people died, six of them women. This is a mortality rate of 1 in 1.2 million. Certainly much better than catching COVID, but since there is an alternative, if you are female and under 50, definitely don't get the AZ vaccine, get the Pfizer or Moderna instead. See  ‘Weighing up the potential benefits against risk of harm from COVID-19 Vaccine AstraZeneca’

source

How can the AstraZeneca vaccine cause blood clots?

So far, experts do not know, however there are some conjectures. Foremost amongst these is that in rare cases, the vaccine also induces and immune reaction against a protein found in blood platelets. On the sniff factor, this sounds (at least) like a good explanation. 

Patients with blood clots were found to have antibodies against Platelet Factor 4 (PF4) which is a symptom of heparin-induced thrombocytopenia. So it may be the case that those patients have this disease already, but it is undiagnosed and the vaccine triggers this response. People are only tested for this if they present to hospital with a blood clot. Blanket testing of people would be pointless because of false positives according to Baye's Theorem.

However, everything is still conjecture at the moment. The reality is that we don't know if it is the adenovirus (the vector) or the spike protein is linked to the clots.

What do we know?

In simplistic bullet point form, this is everything we do know:

  • It occurs at a rate of approximately 1 in 76,800 1 million people
  • It mostly affects women under 55
  • Heparin-induced thrombocytopenia is more common in women than men and less likely to be diagnosed at a young age.
  • Blood clots are a symptom of COVID-19. You are far more likely to get a blood clot from COVID-19 than from the AZ vaccine.
  • To put the risk into comparison, the risk of DVT from flying longer than four hours is 0.079% or 1 in 1265. The risk of a blood clot from taking oral contraceptives is around 0.04% or 1 in 2500.

So, is it safe?

Relative to what?

Taking the AZ vaccines is certainly safer than getting COVID-19 by several orders of magnitude. Millions of people have died from COVID-19 compared to the 25 people that have died probably because of the AstraZeneca vaccine. In addition, antivaxers are lying about adverse reactions by posting fake testimonials to social media. People inundated with hundreds of personal stories may find it compelling, but the reality is that this vaccine is still far safer than not only most other medical interventions, but safer than most daily activities such as driving and eating.

It's only natural to be concerned about risks we hear about in the media regularly or on social media, particularly for activities we don't regularly undertake. But in reality, if you are concerned about the risk of taking the AZ vaccine: Don't fly in a plane, don't drive a car and don't take paracetamol. All of these have higher risk profiles by several orders of magnitude.

However, if we are looking at the risk of taking the AZ vaccine compared to the Pfizer vaccine, then yes. Take the Pfizer vaccine anytime. The Pfizer vaccine will knock you around more - many people need a day or two off work after having it. But its effectiveness is MUCH higher and serious adverse event reports do not statistically exceed the background rate (despite what you facebook group might say).

Achieving Herd Immunity

Besides protecting the individual, the purpose of vaccines is to reduce the R(Eff) rate below 1. For COVID-19, R0=2.4. Herd Immunity (s) = 1-1/R0 = 58.33%.

This means that we need to vaccinate 87% of the population with the AZ vaccine, or 62% of the population with the Pfizer vaccine. However, the higher the rate the better. Anything below these numbers will lead to outbreaks. Leaving children out of the equation (no COVID-19 vaccine has been certified for paediatric use) then it is impossible to achieve herd immunity with the AZ vaccine.