Skip to main content

2 posts tagged with "Health"

View All Tags

Β· 13 min read
Bruno PC
Woman cycling with mask

Summer 2023, wildfires are terrible in Canada. Air quality deteriorates: Montreal becomes temporarily the worst city in the world for air quality. This is the most direct effect of climate change so far. It is in our face.

With the effects of global warming increasing every year, I suspected it marked a turning point. In the future, we won't enjoy the constant freedom of breathing in fresh air whenever we step outside. We'll have to pick the moments, like during Canadian winters when snowstorms hit: we'll need to stay indoors, close windows, and wait for conditions to improve. Or do we?

This is when I began searching for a specific and detailed model of what to do for different outdoor air pollution levels. Unfortunately, all the advice I found was binary "Exercise is ok in the orange zone (100-150) but not ok in the red zone (150-200)" or was extremely vague "You can wear a N95 mask, but don't stay outdoors too much". I wanted to know: could I still train outdoors? Could I exercise if I wear a N95 mask? Should I minimize my exposure time? For how much, exactly?

Here I try to answer that question, as I believe I can contribute with my analysis.

caution

There's a lot of assumptions in that model - explained the best I could - but it's still far from being perfect.

I am by no means a medical professional. Don't ask me for medical advice: I won't answer you. I just like to aggregate data the best I can for myself, and share it with others.

This model was built to be as generic as possible, but I used my context as the baseline - your context may differ.

Model context​

For building the present model, I considered only the PM2.5 pollution level in the air. This is the type of pollution mostly affected by wildfire & the metric that almost always dictates the air quality where I live here in Montreal. Know that there's a lot more (PM10, O3, no2, etc.).

This model is targeted for athletes. That means two things:

  • Athletes are already doing 10+ hours of intense physical activity per week. Skipping a day (or even a week) of training won't decrease the global, long-term health benefits they get from exercising. When the air is polluted, day-to-day outside exercising then becomes an all risk, no benefit scenario, as the health gains are already mostly maximized.
  • The increased PM2.5 exposition from increased breathing need to be taken in consideration. When you're just walking of traveling by bike, your breathing rate doesn't increase much. However, when you're doing proper training, it will increase much more.

Health benefits from exercising​

If you're not doing enough physical exercising to maximize the health benefits, this model will probably be too cautious for you, as it doesn't account for the health gains you'd benefit from more exercise. For example, a health gain for active transportation via cycling is present up to 5h a day at PM2.5 of 50 (AQI of 137).

Health effects training at PM2.5 of 50

Even in the most polluted cities in the world, it's healthier to exercise outside than it is to not exercise at all:

Even with a reasonably high PM2.5 concentration level (e.g., ∼180 ¡g/m3), it would still be safe for the majority of people, except for those aged 60 years and older or with existing chronic conditions, to engage in MPA outside for at least 2.5h per week.

180Β΅m/m3 (AQI level: 230) is considered a super high level here in Montreal. It is basically the peak level when Montreal reached the most polluted city last summer (239). And even at that point, it's healthier to exercise 2.5h per week outside then to not exercise.

I fear that the advice "don't exercise outside today" will be misleading the majority of the population. Non-athletes need to understand that they still benefit from a dog walk or a bicycle commute outside.

You don't believe me? Know that having an athlete level "elite" VO2max - the maximum level of oxygen consumption - is associated with a 5-fold reduction in all cause mortality, which is more than smoking. And smoking is much more harmful to you than any level of pollution.


So if you never exercise right now, tackle that habit first. You'll be able to optimize your pollution level later.

Breathing rate​

Breathing rate has been studied to be proportional with oxygen consumption. Exposition to pollution is also proportional with exposition time outside.

Personally, my average power for a proper cycling workout is around 210 watts.

Using the Zwift hack MAP and FTP Calculator, I figured a power of 210 watts is approximately 45 ml/kg/min VO2 - 60% of my estimated VO2max. Breathing rate can increase by a factor of 5 during exercise, so I estimated a proportional breathing rate: 60% * 5 = 3.

That means that 1 hour of a proper cycling workout outside is the equivalent of being outside for 3 hours.

For running, I used a breathing increased rate of 4 as VO2 (oxygen demand) is measured to be β‰ˆ30% higher for running then cycling for the same energy expenditure.

Finding acceptable baseline​

What does acceptable risk means?

We need a risk baseline, or an acceptable outside air pollution level. The general consensus if that healthy individual should start taking precautions over an Air Quality Index of 100, or a PM2.5 concentration of 35Β΅m/m3.

Air quality level advice table

I also found the AQI to Cigarettes Calculator from Jasmine Webb. There, I learned that a 24h exposition of a 22Β΅m/m3 PM2.5 concentration roughly translates to the health effects of smoking a cigarette. I'll use this metric because I think it's much more understandable for me and most people.

If we divide the "safe" pollution level of 35Β΅m/m3 by 22Β΅m/m3, we get a maximum daily cigarette dose of 1.6. That's gonna be the acceptable baseline. At 1.6 cigarettes or more, I'll be looking to reduce pollution exposition.

As it's a maximum daily exposition, we need to subtract the pollution dose that will occur outside of training.

Advice here, to lower that amount, that day:

  • Avoid cooking - it is the most common PM2.5 source at home. Even if you use a fan to exhaust cooking fumes outside, the risk is still to create a low-pressure zone in your house, which will make your home suck the bad air from outside.
  • Use a good, powerful enough air filter. The air filter level should be increased with ambient pollution - if AQI level is high, put it at high.

If you follow this advice, I hypothesize that the level of PM2.5 exposure will be pretty low.

To calculate how much to subtract, I used the average outside PM2.5 concentration for the past year in Montreal - 8.3Β΅m/m3. That number divided by 22 get us an "ambiant" dose to subtract. I could have subtracted the time from training - let’s say multiply this dose by 19/24 for a 5-hour training. However, I don't know if it's possible to get a PM2.5 level that low during a pollution wave, even with the use of an air filter. I guess I will have to buy myself a PM2.5 monitor to confirm.

Let's carry on. The acceptable pollution dose from training should be no more than 1.6 - (8.3/22) = 1.2 cigarettes.

The efficiency of masks for air pollution​

Masks (even N95) aren't perfect. N95 are certified to 95% for particulates as small as 0.3 micron. Yes, they will protect you significantly, but they may still make you breathe even smaller particulates. I'm sure these particulates exist, it would be naΓ―ve to think the opposite. That's why my intuition tells me we should look deeper for the effectiveness of masks for such scenarios.

I found out that N95 masks lower the pollution exposure to a factor of 14, and lower the hospitalization risk by a factor of β‰ˆ3.2. The latter result seems to be more relevant to us. As I suspected, they are not perfect, as the risk is still increasing with pollution rates. The curve is just less pronounced.

Relative risk with or without mask

For the current model, I will use a 3.2x dose reduction ratio to estimate the effect of wearing a N95 mask.

Sport specific AQI limits​

Because every sport has its own context, we need to estimate limits for each.

πŸš΄β€β™‚οΈ Road cycling​

For road cycling, pollution from cars has to be taken into consideration. Training on a high-traffic road doubles the amount of PM2.5 exposition from ambient levels.

This is the scenario most likely occurring if you exercise on the road, with a lot of traffic. This is a worst-case estimation as it's rare that 100% of training time will be in a very traffic dense area (if you do, I feel sorry for you).

AQI limits for road cycling

For road cycling on a high-traffic road, the AQI Index limits would be

  • 144 for a 2-hour ride / 220 with N95
  • 99 for a 3-hour ride / 181 with N95
  • 81 for a 4-hour ride / 166 with N95
  • 70 for a 5-hour ride / 157 with N95

🚡 Nature cycling (Gravel/MTB/CX)​

Here we assume we are away from any close source of pollution (cars, factory, etc.)

AQI limits for nature cycling

AQI Index limits:

  • 177 for a 2-hour ride / 387 with N95
  • 160 for a 3-hour ride / 275 with N95
  • 144 for a 4-hour ride / 219 with N95
  • 118 for a 5-hour ride / 192 with N95

πŸƒβ€β™‚οΈ Running​

We consider that running is done away from pollution, in a low-traffic area.

Running limits can be considered for other sports like soccer, but also for less intense activity like hiking or walking. AQI limits would be higher for these, so if you're safe to run, you'll be safe to walk or hike.

AQI limits for running

AQI Index limits:

  • 316 for 30 minutes running / No restriction with N95
  • 208 for 1h running / 500 with N95
  • 163 for 2h running / 304 with N95
  • 143 for 3h running / 219 with N95
  • 111 for 4h running / 188 with N95
  • 92 for 5h running / 174 with N95

Dashboard​

Let's say we have an AQI of 166. Here's what an advice dashboard may look like:

TimeπŸ›£οΈπŸš΄β€β™‚οΈπŸš΅πŸƒβ€β™‚οΈ
0.5h🟒🟒🟒
1h🟒🟒🟒
2h😷🟒😷
3h😷😷😷
4h😷😷😷
5h🚫😷😷
6h🚫😷😷

I'm planning to implement this dashboard on my weather report app, so stay tuned!

What about intensity?​

The fact is that intensity will increase your breathing rate, but it's not the most important factor. Take running: at worst, it will worsen your dose by 25% (the current model is already considering you will be at 80% breathing rate). Time is much more important here: in fact, the more it's polluted outside, the more you should considerate shorten your workout and make it count by going more intense. Let's say you choose to do a quick, 20 minutes all-out effort: your pollution dose will be equivalent to someone doing a 25 minutes moderate run.

Moreover, higher exercise intensity may even be less harmful than low intensity:

Surprisingly, β€œthere is some evidence that shorter high-intensity exercise bouts are less harmful than longer low-intensity ones,” Hull said.

For a 2014 study, Koehle and his colleagues tested the lung function of cyclists while they alternately rode slowly or intensely in polluted air. Unexpectedly, the riders experienced more difficulties breathing while riding gently than when they pedaled all-out.

The reasons are not altogether clear, but the practical implications are, Koehle said. If smoke hangs in the air, keep your workouts short and sharp, rather than long and slow. The fitness benefits will be about the same, but your β€œair-pollution exposure” will be much less, he said.

Outro​

Whatever the air quality is (within the AQI model), there's some physical activity you can do outside without catching a massive pollution dose. Even with a 500 AQI, there's the possibility for a 60 minutes run with a N95 mask. From what I see, while air quality is a serious concern for the following decades, it's pretty manageable with simple adaptations, even for serious athletes.

That being said, there's another factor in air-related health problems: inside air. This is the thing with air pollution as I understand it: it's like radiation, in the sense that it depends on the total dose received. Wherever you go, the localized pollution will add up to your total exposition. The World Health Organization (WHO) updated its air quality guidelines in September 2021: the annual average shouldn't be over 5Β΅m/m3 to prevent most pollution-related problems.

Deaths from pm2.5 concentrations

As I wrote this article, the trailing year average for Montreal (2023-09-26 to 2023-09-25) is 8.3. Not much over the limit, you'd say. However, as it's an annual average, a tiny change can affect a lot on the total dose received. Reducing from 8.3Β΅m/m3 to 5Β΅m/m3 would be like a reduction of 55 cigarettes a year. That's also the equivalent of 46 training doses occurring in a polluted area from the current model. I'm not an expert, but it seems to be a significant amount to me.

Moreover, and counterintuitively, the smaller the concentration, the higher the impact of a pollution reduction is. In other words, a reduction from 10 to 5Β΅m/m3 will have more positive effects than a reduction from 100 to 95Β΅m/m3.

It looks like reducing the average indoor PM2.5 concentration from 8.3Β΅m/m3 to 5Β΅m/m3 will have even a bigger impact than 46 training doses within the current advice model. I already have a powerful air filter, but this analysis has convinced me to buy an air quality monitor for my home.

Take care of your air, year-long.

If any of my assumption, source, or deduction is wrong, I'd be pleased if you share that to me, as I'm eager to develop my knowledge on the topic.

Spreadsheet for AQI limits

Thumbnail image from Nasirun Khan

Β· 11 min read
Bruno PC

I'm currently reading a fantastic book from Peter Attia: Outlive - The Science & Art of Longevity. The book emphasizes the fact that traditional medicine - Medicine 2.0 as he calls it - is shaped around the notion of healing at the very end of a disease lifespan, like the crew of the Titanic tried to save the ship at the last minute, even after being warned hours before the incident.

Titanic crew realizing the shit

Unfortunately, attempting to eliminate a rampant, evolving disease in its advanced stages significantly reduces the chances of recovery. Moreover, even in cases of complete healing, patients often find themselves in a state of suffering for the remainder of their lives. This is because the body, having deteriorated over decades, lacks the resilience to fully recover.

Peter Attia questions the relevance of healing someone in the late stages of life if it only prolongs a state of pain for several years. What's the purpose of being alive if you can't pursue what you love? Is the achievement of extending life by another five years considered a medical success if it means enduring prolonged suffering confined to a bed during that time?

Outlive - The-Science & Art of Longevity

Traditional medicine has embraced a proactive approach in some of its practices. For instance, it advises people not to smoke at all rather than suggesting they quit smoking only after reaching 50 years of age, which would be rather absurd. However, there is still ample room for improvement by extending this philosophy to other diseases such as diabetes. Dr. Attia, who refers to this as Medicine 3.0, advocates for a significantly more proactive approach. In essence, it strives to prevent encountering icebergs altogether before there's a need for a catastrophic course correction.

A lot can be done to help you live longer and, more importantly, live better for as long as possible. Exercise, nutrition, medications, and supplements are all covered in this cutting-edge book, which presents the latest medical evidence on how to stay as youthful and capable as you can. In other words, it explores how we can be the best version of ourselves for as long as possible.

How does this apply to software engineering?

Successful software projects are still a minority. More than half of the projects hit at least one iceberg.

There's a lot of "icebergs" in the software engineering world. Today, I will talk about two of them:

Strategy absence​

Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.

-- Sun Tzu, author of The Art of War

Software engineering is an optimization problem. You need to balance multiple software variables. Here's a list of the most important software qualities, that need to be considered:

  • Maintainability - Defined by the easiness of code editing over time
  • Performance or execution efficiency - Defined as resource usage or execution time
  • Reliability - Defined as the availability (uptime) of the application
  • Accuracy - Defined as returning the best result/answer to a request
  • Usability - Defined as how simple it is for a new user to use the software without any guidance
  • Security - Defined as its difficulty to hack
  • Compatibility - Defined as how easy it is to connect it to another software/system

Every use case is different, and it's impossible to have all the best qualities in a product at once. A Ford GT is not built to be convenient, a Dodge Caravan is not built to be fast. You could have a sports car more comfortable than the others, or have a minivan model faster than other minivans - but you'll never have a car faster than a sports car and more convenient than a minivan at the same time.

You have to choose. Choosing not to decide will result in reality imposing a mediocre standard all across the board. Therefore, the focus from the development team must align with the business requirements of the product built.

Are we building a payment app? Availability will be the #1 factor, as being out-of-service would have tremendous consequences.

Are we building a video game? Execution performance is critical.

You get the point, these are easy answers. However, for a lot of products, the strategy is a lot more nuanced than this. It will depend on the marketing strategy of the company and the marketing strategy of the product. Do you sell cutting edge technology? I would prioritize performance. Social status? Look at Apple products: prioritize usability. Peace of mind? Make reliability and security #1 on the list. Durability? Emphasize on maintainability and compatibility.

The development team needs to understand all that, because how you define your product will have impacts on how the software should be built. In a lot of businesses, there's absolutely no communication between the marketing team and the software development team. Without guidance, everyone has a different idea of what qualities should be prioritized. The team will lack cohesion: at best, work done by some developers will be unuseful. At worst, developers will be counterproductive with each other.

It's like health. What does "healthy" means? It depends so much on the context. Even a Coca-Cola can be healthy - for example, if you're giving it to someone having a hypoglycemia crisis.

A good health strategy should be personalized. Like Dr. Attia wrote in his book:

This is where most people make a wrong turn. They want to take a shortcut, right to the tactics: this is what to eat (and not eat), that is how you should exercise, these are the supplements or medications you need, and so on. [...] Instead, I believe this is exactly where we need to hit pause and take a step back, lest we skip the most important step in the process: the strategy.

Yes, there are good coding practices and conventions, but everything has downsides. "Good practices" are not absolute, they make sense only for a particular context. For example:

  • Adding security for a threat that doesn't exist is throwing money out of the window. This could in itself prevent you from adding security for a threat that is very likely to occur.
  • Emphasis on "perfect code" for a temporary MVP will delay time to market, for a codebase that will most likely exist for a couple of weeks at worst. If you put too much time into the best practices at this stage, you may delay the time to market and sink the ship.

Does your team has a clear strategy?

Technical Debt​

In most engineering fields, there's execution wear involved. Let's take a car motor: carbon deposits, rust, friction, metal wear will make the mechanical parts less and less efficient, until the motor dies. Because of this, motor maintenance will prolong the lifespan of the car.

Let's say you change spark plugs or replace oil on your car. You are improving its execution (better ignition, better fuel economy, etc.). Moreover, because you put new parts, the lifespan of the motor is extended by your actions. There's less risk involved in replacing the spark plugs or changing the oil then there is to not do it. If you do it regularly, motor can last 200,000+ miles. If you don't do maintenance, it could blow up after 40,000 miles, or worst.

Software engineering is unique in the sense that code doesn't wear out. Computers are digital: therefore, results are either exact or wrong. Code never lies: it will execute exactly how you wrote it. If the code stays the same, the result and the execution cost will be the same from the 1st to the 1,000,000th execution. No need to clean or to replace parts. Contrary to other fields, time will not change the quality of the result.

Every time you edit the code, you have to change the already existent codebase that is, by definition, describing an exact behavior. So every time you're touching it, you pose the risk of completely ruin the end result of the algorithm. That's why developers are often afraid to edit the code. If they have to implement a new feature, they will often do it outside of the existing codebase. The problem with that? Duplicated logic, exponential code growth: the code will complexify more and more as time pass. This is our second iceberg: technical dept.

Shipping first time code is like going into debt. A little debt speed development so long as it is paid back promptly with a rewrite... The danger occurs when the debt is not repaid. Every minute spent on not-quite-right code counts as interest on that debt. Entire engineering organizations can be brought to a standstill under the debt load of an unconsolidated implementation.

-- Ward Cunningham, co-author of the Manifesto for Agile Software Development

The complexity can become so high that it can eventually freeze the entire project, where no one can understand what's going on anymore.

In summary, we can conclude that:

  • In most engineering fields wear naturally increase with time
  • In software engineering, wear (or technical debt) comes from human

Multiple solutions can resolve this problem:

  • The software team need to understand the importance of "cleaning the house" every time a feature has been done, even if it's not sexy. Shipping the feature in production, more often than not, doesn't mean the work is done. The code also requires a cleanup after that.
  • Automated tests act like an insurance. If something breaks, it will be caught and it will be shown where it's breaking. That way, the team will be far more comfortable cleaning the house. Automated tests prevent problems on their own, but have another upside to them: developers will also be more comfortable working with legacy systems, so deeper their expertise will be. That is another reason why automated tests mean faster development time and fewer errors.
  • The business department needs to be conscious that putting pressure on the software team multiple times in a row to deliver faster will increase the technical debt. It can be done, but it will be at the expense of future productivity.

Be aware of people that want a promotion as quick as possible. Like a government that borrow money to reduce taxes, they may favor the short-term productivity of the project by sacrificing the future vitality of the project.

Have a double T-shape developper​

These icebergs (strategy absence and technical debt) can easily ruin your project solvency, even to the point it can threaten your organization profitability. They have one thing in common: a lack or understanding between the software team and the business team. I've seen so many organizations with business and software departments not understanding and putting the blame on each other, and frankly, both were right in their recriminations.

This is where a project manager that knows the inside-and-out of software development AND that has a business expertise is so precious. That person will alloy the business team to communicate in business terms (marketing strategy, upcoming finance delays, etc.) without worrying about managing a software team. After that, this interpret will be able to translate these needs into a complete software strategy, while teaching the business teams on the inevitable software hurdles that will occur along the way (like technical debt).

I emphasize that it has to be one individual. Otherwise, what's the point? Having two people for this role doesn't solve the problem: it would be like hiring a duo of a French teacher that doesn't speak English and English professor that doesn't speak French to translate an English book into French. Good luck with that.

A product owner, a scrum-master or a software project manager should know both worlds inside and out. Unfortunately, this job is sometimes occupied with someone who didn't ever write software at all, or sometimes, that doesn't have any background in marketing.

Sounds familiar?