Sunday, August 20, 2023

 

This is a summary of the book “How the other half eats? The untold story of food and inequality in America” written by Priya Fielding Singh PhD who is a sociologist at Stanford University. She studies the societal factors that influence people’s health.

There are prevalent assumptions about eating that grossly misunderstand the dietary choices in America. There is societal pressure to be a “good mom” which dictates family dietary choices. The food industry pushes junk food to ease mothers' guilt.  Gendered expectations create further frustrations for mothers trying to uphold healthy eating habits. Lack of time and resources often leads to unhealthy dietary compromises. Emotional stress and misguided blame affect diets across the income spectrum.

The author makes recommendations for both mothers without resources who must be prudent to buy the right foods and those who can buy healthful food but who think the choices are not good enough. Her research targets diverse families and shows that Americans’ dietary choices have little to do with personal discipline and, instead, mainly involve family budgets and societal pressures. Personal desires – whether to be a perfect mom or to alleviate the weight of poverty – shape how Americans eat.

The American diet is overwhelmingly unhealthy. The US Department of Agriculture agrees with most nutritionists that a healthy diet is made up of fresh fruits, vegetables, low fat dairy, whole grains, and lean proteins. Most Americans don’t eat this way. The Americans who suffer the most from diets lacking in nutritional value are low-income families of color. They often eat too much sugar and too many processed foods and fatty meats, leading to higher rates of diabetes and heart problems, as well as earlier deaths than more affluent people.

As the disparity between rich and the poor widens, some political figures, such as Michelle Obama, have sought to mitigate some of the causes behind this issue. However, those efforts operate on two assumptions about why some Americans eat unhealthily. First, low-income families can’t afford healthier foods and second, low-income families don’t have physical access to grocery stores that sell healthy foods.

The second assumption is false. For example, The Healthy Food Financing Initiative invested more than $650 million dollars in building supermarkets in communities that lacked nearby grocery stores. Yet, making healthful food more available brought about little or no dietary changes within low-income communities. The author asserts that geographical access was not a contributing factor to dietary choices. Most people have cars and don’t mind traveling to get the food they want.

A mother who makes ends meet lacks the resources to take her kids out for fun activities, such as visiting a water park. Her lack of financial security impedes her ability to provide for her children. She constantly denies her daughters’ requests for new clothes, electronics, or toys. This makes her feel guilty and leaves her wondering if she’s a terrible mother. However, she can say yes to junk food because it’s cheap. Buying her daughters powdered donuts or a bag of Doritos puts smiles on their faces and is often the only thing she can do to ease the hardship of poverty.

On the opposite end of the economic spectrum, an affluent mother often says no to her kid’s junk food requests. However, she can say yes to most of their other requests. She can provide her children with private school, concert tickets, summer camp and consistent, healthy dietary choices.

Intensive mothering dooms moms to feelings of inadequacy and the sense that they never do enough — that they never are enough. This behavior creates a racial and economic inequality gap concerning who gets to be a good mother. Gold standard mothering now means giving your kids every opportunity to grow and learn, buying them whatever they need to thrive and providing them with nutritious food. By those unfair criteria, only the financially secure can afford to be good moms.

The food industry pushes junk food to ease mothers’ guilt. Because many low-income Americans are people of color, food choices may also reflect racial inequalities. Americans often associate childhood obesity with being Black or Hispanic – and often blame mothers instead of scrutinizing the food industry’s practices. The author states that the dads she met did not need to devote themselves to feeding their kids to feel like they were good dads.

Single mothers who work labor-intensive jobs have greater difficulty making healthy choices. Lack of time is an issue for most working parents across economic brackets. They often face long hours and long commutes, leaving them with less time to shop for food, cook or clean. Mothers often feel they must choose between spending quality time with their kids or cooking a healthy meal. This is also true for moms who are somewhat better off, though some wealthier moms can afford to hire household help to compensate for their lack of parenting time.

The author says that as moms, we deserve to live in a society built of infinitely more empathy, appreciation, and support.” The narrative of blaming mothers will never fix these issues. The government should hold employers and corporations responsible.

 

Reference:

Previous Book Summaries: BookSummary3.docx

Application to summarize text: https://booksonsoftware.com/text/

 

Saturday, August 19, 2023

 

This completes a set of three book summaries. This one is about the book “Viral Justice: How we grow the world we want?” by Ruha Benjamin. She is a professor of African American studies at Princeton University and is also the author of “Race After Technology” and “People’s Science”.

The author uses the term “Viral justice” in the context of promoting collective healing and unlearning dominant narratives. Systemic oppression such as sexism, classism, racism, ableism, and colonialism, operate like viruses. When the “privilege” of the status quo is maintained, this kills people and robs them of the material and social conditions they need to survive. It’s time to treat these societal “viruses” as signals that the status quo is no longer acceptable. When opportunities to dismantle these oppressive systems are actively sought and a more inclusive caring world is built, “viral justice” comes into play.

Systems might indeed be retractable, and the wronged person might be the only victim whose heart is broken, and the shattering might be both emotional and physiological but “viral justice” can be the rallying cry inviting others who desire change to join the individual. The first step in this direction requires us to unlearn patterns of behavior and thought that reinforce dominant narratives. The act of dreaming must be reclaimed and the promotion of collective good must be imagined.

Support networks must be built to weather the stress and physical damage caused by oppressive systems. The term “weathering” here is a public health concept that embodies the stress of living with oppressive systems. If the struggle to make ends meet is one of the principal causes of weathering, then viral justice is about creating social relations that are resuscitating instead of exhausting. Some examples illustrate weathering. Black teenage boys are more likely to die before the age of 65 than teenage boys in Bangladesh. The health of Latinx immigrants deteriorates each generation after their families arrive in the United States. Experiencing traumatic events, ages a person prematurely. There is protection needed from the negative impacts of weathering and this could include cultivating supportive relationships, committing to practices of healing and accountability, and building networks of solidarity.

One of the classic examples is punitive policing which must be replaced with community centered harm reduction policies. Police surveillance affects health of entire communities. Some feel “hunted”, and witnesses report acts of “licensed terror” such as pepper spraying homeless people’s sleeping bags to shooting unarmed civilians. “Viral justice” can be enacted by growing communities of care which does not mean police reform but rather everyday people relating to one another in life-affirming ways. Technology also plays a role. Some apps like GhettoTracker and NextDoor perpetuate systems of oppression, and this manifests as 240 million calls reported annually to 911 for suspicious activity viewing but this can be undone with a more empathetic approach.

Such examples are clearer with racism. For instance, teachers may fail to recognize Black students as gifted and talented, because their image of successful students is white. Researchers found that schools punish Black girls more often and severely for minor infractions – such as having “too much attitude” – than they punish their white female counterparts. A neutral example can be seen with “zero-tolerance” disciplinary approaches which damage students’ self-esteem and rob them of education and life opportunities. “Viral justice” in the educational system can be embraced by advocating reforms such as:

1.       Replacing punitive actions with “restorative practices” where authorities display calm and loving presence.

2.       Prioritizing recruiting and fostering diversity among teachers which can inspire students.

3.       Updating the curriculum to include ethnic studies and Black history.

4.       Hiring counselors to ensure the well-being of students and inviting police to walk the hallways.

Reimagining the place of work in our lives helps workers to thrive. It demands understanding that rest, like healthy foods, clean water, and fresh air, is essential. In a recession or pandemic, the rich could get richer while the poor could become poorer. Imagining a future where rich no longer devalue labor and redistributing wealth to ensure everyone has access to social and economic conditions necessary for living a flourishing life are ways to embrace “Viral justice”.

Similar prospect goes for healthcare institutions. For example, white babies are paying the price for anti-black racism from the time they are born and black babies more so. Institutions must make reparations to victims and their families.

Reimagining a better world as an individual can be broken down into the following steps:

1.       Reflecting on one’s own biases and constantly envisioning a future that embraces all.

2.       Taking micro actions that have a collective bigger impact.

3.       Demonstrating inclusivity by creating spaces where everybody knows they are welcome and safe and influencing others to do the same in gamut such as housing, education, and transportation.

4.       Live poetically to transform oppressive systems and embrace creative ways of thinking.

 

Reference:

Application to summarize text: https://booksonsoftware.com/text/

Friday, August 18, 2023

 

This is a summary of a book titled “Win from Within: Build organizational culture for Competitive Advantage” written by James Heskett who is a professor emeritus of Business Logistics at the Harvard Business School. The book was published by Columbia Business School Publishing in 2022. It provides an applicable overview with concrete examples.

The book details 16 steps to change your culture on the premise that evidence does not support most of the common wisdom about organizational culture. An effective culture boosts the bottom line and fosters flexibility, innovation, and learning. Responsibility rests with the leaders to engage and retain employees and an organization’s policies must reflect its values. High-engagement workplaces share several crucial characteristics and experimentation improves your likelihood of success. There might be some challenges presented by remote work, but they are not insurmountable. The risk associated with good cultures going bad is that change becomes difficult.

A strong culture does not imply marketplace success and is not necessarily a winning asset. It could even be toxic. But leaders can shift the culture in a matter of months. The steps listed here are useful to everyone involved in managing organizations.

Culture and strategy are complementary. For example, Satya Nadella simultaneously healed Microsoft’s dysfunctional culture and led a major strategic shift from Windows to cloud computing. On the contrary, resisting new ideas assuming what worked in the past will continue to work, is one of the most common pitfalls.

An effective culture boosts the bottom line, and fosters flexibility, innovation, and learning. The competitive advantage of an effective culture can outlive that of any strategy. Organizations that put their employees first gained long-term market share and later rewarded their shareholders handsomely. Analysts can predict a company’s relative profitability by studying just the culture. There can even be a virtuous feedback loop between cultural changes and impact on profit. For example, Ritz Carlton vets the hirings thoroughly and empowers almost anyone to spend up to 2000$ to redress a guest’s problem. It emphasizes attitude and empathy.

Leaders must engage and retain employees and culture can be a tiebreaker in engaging talent. Organizations with effective culture can be tiebreakers but they could also be pressure cookers. Discontent stems from a lack of training and a lack of being acknowledged.

Companies known for highly engaged employees train their recruiters in employee engagement as a competitive advantage. They seek people with complementary viewpoints and empower them with the necessary skills.  The US Marine Corps, the Mayo Clinic and Harvard Business School all have sustained high engagement beyond their founding generation and leverage a team-based structure to maintain the culture. Similarly, Southwest Airlines views the late departure as a team failure, not an individual one. This results in a top on-time record.

Experimentation is key to success.Booking.com authorizes any staffer to run a test without advance approval. Testing is taught and test evidence overrides executive judgment. Failed tests provide lessons. The author asserts that measurement without action is a great way to scuttle the success of a lot of effort that precedes it.

Sometimes, a toxic culture has devastating results. After two Boeing 737 MAX planes crashed, a whistleblower said management had rejected an engineer’s request for a safety measure. Employees feared retaliation for bringing problems to management’s attention. Similarly, the O-Ring failure destroyed the Challenger space shuttle, and the case of Volkswagen’s emissions-testing imbroglio is well-known.

Remote work presents cultural challenges and the best that the leaders of increasingly remote workforces can hope for may be hiring advantages and modest increases in productivity.

James Heskett lists the following steps to accomplish culture change:

1.       Leaders acknowledge the need for culture change – Leaders must take note of the metrics and messages emerging from the “shadow culture.”

2.       Use discontent with the status quo as a spur for change – Drastic steps might be needed to crystallize and alleviate the concerns people see with change.

3.       Share the message of change – Communications must be ongoing, clear, and simple. Listen to the reactions. Repeat.

4.       Designate a change team – A team can be tasked with cultural change codifying values, gathering input, meeting deadlines, and maintaining the impetus for change.

5.       Install the best leaders – Bring the right people to the fore; tell the wrong people good-bye. Your goal is alignment around change.

6.       Generate and maintain urgency – Culture change should take six to 12 months. As John Doerr said, “Time is the enemy of transformation.” Build in a sense of drive.

7.       Draft a culture charter – by articulating what must change and how. For example, Microsoft spurred change to empower people “to achieve more.” Compare the current state to the desired future.

8.       Promulgate a change statement that involves the whole organization – Communication is crucial. Gather comments; include or reject them; document the outcome.

9.       Set up a “monitor team” – This team tracks relevant measurements, checks progress, and ensures that communication continues.

10.   Align everything – Changes must align with corporate values. Reward what matters.

11.   Put changes into motion – Leaders must walk the talk. McKinsey found that change is more than five times likelier when leaders act the way they want their employees to act.

12.   Teach people at every level how to implement change – Training must be imparted.

13.   Measure new behaviors – Align your metrics with your new expectations and handle troubles.

14.   Acknowledge progress – Milestones are just as much reason to celebrate as the goal.

15.   Give big changes time to unfold – Long range habits take time to reach the customer.

16.   Keep reminding yourself what culture change requires – This is an ongoing evolution. Frequent check-ins with everyone on the team and recalibrations help.

 

 

 

 

Thursday, August 17, 2023

 

This is a summary of the book: “Work, Pray, Code” written by Carolyn Chen. The book was published in 2022 so it is current. Some of the main takeaways are that work is replacing religion. Finding religion at work is a refuge for those in need of time to pursue a spiritual life. Young tech workers with diversity are treating their colleagues like family. This helps to overcome one of the big challenges in the tech industry which is burnout. Tech companies perks attract and retain top engineers and Techtopia is emerging is a society where people garner ultimate fulfillment from their work.

Long days, free cafeterias and mindfulness workshops have replaced church and community. Within this overview, she offers a particularly strong case of watered-down religion in the trivialization of sacred Buddhist practices.

She takes the example of Silicon Valley workers who are turning away from organized religion and filling the void with work that gives them a sense of “belonging, identity, purpose and transcendence.” Workers who once sought meaning, morality and behavioral guidelines in religion are now finding those values at work.

People who move to the Silicon Valley for tech careers have abandoned more than just their congregations; their communities are suffering also. Participation in all civic organizations has decreased significantly over time. Many tech workers emphasize religious observance is difficult. Many believe that the Silicon Valley ethos runs contrary to their religious beliefs but often those who leave organized religion don’t depart consciously, they just drift away.

Tech engineers are notably young, single, far from home, impressionable and vulnerable to the call of work. The ‘religious’ bonds that employees develop with their coworkers are like those of another institution that forges intimate ties: the family.

Tech companies are sponsoring meditation and yoga just as much as they are promoting free food and on-site gyms, all with the goal of preventing burnouts. Yet 60-hour work weeks lead to burnouts. Tech engineers work hard and generally neglect self-care.

Yet most people don’t connect to their jobs, and many suffer alienation from work. Alienation and burnout are considered corporate culture problems. Journeys of self-discovery might lead employees to discover that they are in the wrong job. Part of being marketable means handling yourself well under pressure and remaining focused, both areas in which meditation and mindfulness are helpful. “On-the-go” Buddhism removes the inconvenience of religious practice and tries to squeeze the practice into one-minute bites like the apps that aim to teach meditation a few minutes a day.

People can escape the theocracy of work by deciding collectively to worship something else such as family, community, civil society, and religion. Society should not abandon work, but it should pour energy into the rest of people’s lives as well.

 

 

Wednesday, August 16, 2023

Binary classification example:

  


''' 

Binary Classification. 

''' 

import numpy 

import pandas 

from microsoftml import rx_fast_linear, rx_predict 

from revoscalepy.etl.RxDataStep import rx_data_step 

from microsoftml.datasets.datasets import get_dataset 

 

claims = get_dataset("claims") 

 

import sklearn 

if sklearn.__version__ < "0.18": 

    from sklearn.cross_validation import train_test_split 

else: 

    from sklearn.model_selection import train_test_split 

 

claimsdf = claims.as_df() 

claimsdf["isCase"] = claimsdf.case == 1 

data_train, data_test, y_train, y_test = train_test_split(claimsdf, claimsdf.isCase) 

 

forest_model = rx_fast_linear( 

    formula=" isCase ~ age + parity + education + spontaneous + induced ", 

    data=data_train) 

     

# RuntimeError: The type (RxTextData) for file is not supported. 

score_ds = rx_predict(forest_model, data=data_test, 

                     extra_vars_to_write=["isCase", "Score"]) 

                      

# Print the first five rows 

print(rx_data_step(score_ds, number_rows_read=5)) 

Tuesday, August 15, 2023

 

There are different ways to add role-based access control to principals for an Azure subscription. These can be done in the IaC with something such as: 

Resource azurerm_role_assignment azure_rbac { 

 scope                                 = var.scope 

 role_definition_name    = var.role_definition_name 

 principal_id                      = var.principal_id 

The scope can be specific to a resource or a resource group or a subscription and takes the fully qualified identifier for the same. 

The role definition name can one of many built-in roles that confers permissions to the principal. For example, this could be Owner, Contributor, Reader, Storage Blob Data Reader and so on. 

The principal_id is typically the object id for the user, group or AD entity. If a service principal is used, it must be the corresponding object id of the paired enterprise application otherwise there will be an error message that states “Principals of type Application cannot validly be used in role assignments”. 

There are many ways to populate the attributes of the resource definition via different IaC definitions, but the provider recognizes them generically as a role assignment. 

The preferences among AD entities for use with deployments is managed identity which can be both system and user defined. The benefit of managed identity is that it can work as a credential as opposed to requiring key-secrets to be issued for an enterprise application. 

Some caveats apply to IaC in general for role assignments. For example, the code that requires to assign an rbac based on the managed identity of another resource might not have it during compile time and only find it when it is created during execution time. The rbac IaC will require a principal _id for which the managed identity of the resource created is required. This might require two passes of the execution – one to generate the rbac principal id and another to generate the role assignment with that principal id.    

The above works for newly created resources with two passes but it is still broken for existing resources that might not have an associated managed identity and the rbac IaC tries to apply a principal id when it is empty. In such cases, no matter how many times the role-assignment is applied, it will fail due to the incorrect principal id. In this case, the workaround is to check for the existence of the principal id before it is applied. 

One of the frequently encountered situations is when the rbac assignments proliferate by iterating over other resource types for their associated managed identities. In such cases, the IaC might only appear as a few lines of code but the compilation and execution might result in a lot more new definitions. When this assignment needs to be changed, usually the same must be applied across all the new role assignments. Even the task of reconciling the state with the actual can become quite tedious and require scripts. There is no default grouping to refer to all these assignments together and action taken on one must be repeated on others. It is advisable to start clean by removing all the assignments from the state and reapplying the new infrastructure role-assignment changes. This guarantees a clean state and baseline before each change. 

 

 

Monday, August 14, 2023

 

Binary classification example:

'''

Binary Classification.

'''

import numpy

import pandas

from microsoftml import rx_fast_linear, rx_predict

from revoscalepy.etl.RxDataStep import rx_data_step

from microsoftml.datasets.datasets import get_dataset

 

claims = get_dataset("claims")

 

import sklearn

if sklearn.__version__ < "0.18":

    from sklearn.cross_validation import train_test_split

else:

    from sklearn.model_selection import train_test_split

 

claimsdf = claims.as_df()

claimsdf["isCase"] = claimsdf.case == 1

data_train, data_test, y_train, y_test = train_test_split(claimsdf, claimsdf.isCase)

 

forest_model = rx_fast_linear(

    formula=" isCase ~ age + parity + education + spontaneous + induced ",

    data=data_train)

   

# RuntimeError: The type (RxTextData) for file is not supported.

score_ds = rx_predict(forest_model, data=data_test,

                     extra_vars_to_write=["isCase", "Score"])

                    

# Print the first five rows

print(rx_data_step(score_ds, number_rows_read=5))