<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://maheshbansod.com</id>
    <title>Beacon</title>
    <updated>2026-03-06T19:34:11.648Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <author>
        <name>Mahesh Bansod</name>
    </author>
    <link rel="alternate" href="https://maheshbansod.com"/>
    <subtitle>Dive into Light's world. Discover thought-provoking articles spanning technology, personal development, surrealism and more. What do you think goes in Mahesh Bansod's head?</subtitle>
    <icon>https://maheshbansod.com/favicon.ico</icon>
    <rights>All rights reserved 2026</rights>
    <entry>
        <title type="html"><![CDATA[Book notes: The Psychology of Money]]></title>
        <id>https://maheshbansod.com/blog/book-notes_-the-psychology-of-money</id>
        <link href="https://maheshbansod.com/blog/book-notes_-the-psychology-of-money"/>
        <updated>2025-01-28T15:36:16.342Z</updated>
        <summary type="html"><![CDATA[My notes for the book "The Psychology of Money" by Morgan Housel.
]]></summary>
        <content type="html"><![CDATA[My notes for the book "The Psychology of Money" by Morgan Housel.
<!-- more -->
This is mostly a thought dump after I read each chapter of the book.

### Introduction
- When talking about money one must consider psychology and history over numbers
### Chapter 1: No One's Crazy
- People who lived through war and famines, have different views about the world than the people who lived during peace and wealth.
- A person's view about what assets are good or bad are usually formed during teens and stay like that in their adult life.
- So, the situation that the world is in or rather the environment of the person affects their view of money.
- Everyone has their own opinion's due to their own individual experience, so one can't just invalidate other's opinions while being in much better circumstances. 
### Chapter 2: Luck & Risk
- Bill Gates had access to a computer since he was a kid through his school in Seattle. Probably the only school in the US to have a computer at that time (1968). Bill Gates one's said that if Lakeside (his school) didn't exist, then Microsoft wouldn't exist.
- It was very unlikely (one in a million chance) for Bill Gates to be able to access the computer.
- Paul Allen, Bill Gates' friend since childhood, is popular, but not as popular as Kent Evans. Kent Evans and Bill Gates were smart since school and could code at that age.
- Kent Evans died in a mountaineering accident before he graduated high school. It's a one in a million chance of that roughly.
- It's never as good or as bad as it seems.
- "The exact role of luck in successful outcomes"
- How much of a success or a failure can be attributed to luck? We can't know for sure what to follow, because we don't know whether a success we're trying to copy or a failure we're trying to avoid was a product of chance.
- Did I make a mistake? or did I just experience the reality or risk?
- Be careful who you praise and admire. Be careful who you look down upon and wish to avoid becoming.
- Focus less on specific individuals and case studies and more on broad patterns.
- Not all success is due to hard work, and not all poverty is due to laziness. Keep this in mind when judging people, including yourself.
- "Success is a lousy teacher. It seduces people into thinking they can't lose." - Bill Gates
This chapter resonated with me, and this is something that I've explored before.
### Chapter 3: Never Enough
- We need to define what is 'Enough' for us, instead of always moving the goal post ahead. If nothing is enough, we won't always be that happy about achieving our goal.
- Rajat Gupta - Became CEO of McKinsey, part of UN and WEF, and a lot of random stuff. He had a net worth of more than a hundred million dollars.
- Rajat Gupta did insider trading. An unnecessary risk. Something that's probably fueled by mostly greed.
- Bernie Madoff - The most notorious Ponzi schemer since Charles Ponzi himself. He was good at work, but still took a risk of Ponzi scheme.
- Despite being super rich, these people still risked everything they had to get a little bit more.
>To make money they didn't have and didn't need, they risked what they did have and did need. And that's foolish. It is just plain foolish. **If you risk something that is important to you for something that is unimportant to you, it just does not make any sense.**

-- Warren Buffett

1. The hardest financial skill is getting the goalpost to stop moving.
2. Social comparison is the problem - people compare themselves to others in their field that are much more rich than they are at that point in their life.
3. "Enough" is not too little - We compare and think that what we have is low, or that settling for enough means we're settling for something low and ignoring potential opportunities. It is not true at all, if we're settling for enough that just means that we aren't taking unnecessary risks for something not essential.
4. There are many things never worth rising, no matter the potential gain.
### Chapter 4: Confounding Compounding
$81.5 billion of Warren Buffett's $84.5 billion net worth came after his 65th birthday.
- Warren Buffett is a phenomenal investor, but the most important thing that led to the amount of wealth he's at is compounding.
- He started at a very young age and so his wealth compounded.
- Others who started late with returns higher than Buffett still haven't caught up with him.
- Some technology optimist in 1950s would have predicted that storage would be 100 times more, or 1000 times more, or 10,000 times more than it was at the time, but he wouldn't have predicted it to be "30 million times larger within my lifetime"
- The effects of compounding seem non-intuitive to us - we're more comfortable with linearity.
### Chapter 5: Getting Wealthy VS. Staying Wealthy
Good investing is not necessarily about making good decisions. It's about consistently not screwing up.
#### Don't get carried away by your profits. Keep your head.
- I think the main point in this chapter is that people get in over their head after getting profits and then start increasing their risk.
- Survival is the most important.
- The ability to stick around for a long time and letting compounding work is what makes the biggest difference.
- Few gains are so great that they're worth wiping yourself out over.
- Buffett did a lot of things, but there are also lots of things that he didn't do:
	- He didn't get carried away with debt.
	- He didn't panic and sell during the 14 recessions he's lived through
	- He didn't sully his business reputation.
	- He didn't attach himself to one strategy, one world view, or one passing trend.
	- He didn't rely on others' money
	- He didn't burn himself out and quit or retire.
- "Having and 'edge' and surviving are two different things: the first requires the second. You need to avoid ruin. At all costs." - Nassim Taleb.
- More than getting big returns, ensure that you are safe. You need to stick around long enough for compounding to work.
#### Good plans are what consider good margin of error in the face of unpredictability
- Planning is important, but the most important part of every plan is to plan on the plan not going according to the plan.
- You plan, God laughs.
- Look back 20 years, we couldn't have predicted twenty years ago what could've happened.
- A plan is only useful if it can survive reality.
- A good plan embraces unpredictability and emphasizes room for error.
- Many bets fail not because they were wrong, but because they were mostly right in a situation that required for things to be exactly right.
#### Be optimistic about the future and paranoid about what will prevent you from getting to the future - a barbelled personality.
- You can be optimistic that the long-term growth trajectory is up and to the right, but equally sure that the road between now and then is filled with landmines, and always will be.
- We need to consider that destruction and things going down are a part of life. We need to consider failure cases and move forward and make plans resulting in years of growth.

Cool chapter. Mostly about safety and considering failure as part of the plan.
### Chapter 6: Tails, you win
This chapter was about how it's the unlikely events that account for most of the success.
- An art collector from Germany invested in art and made millions after many many years. The art that was really expensive was just a very small percentage of the total he had.
- Only a few small things account for a lot of profit many times.
- Walt Disney made like 400 or more cartoons before his first hit Snow White, and made a lot of money and even won an Oscar.
- Most of the startups fail, but some will return a huge profit.
- Publicly traded companies fail too - for example a film studio - one that made Terminator 2, and Total recall - was super profitable during the 1980s and 90s but eventually it failed and went bankrupt.
- We should accept that failure is a common event and successes are exceptions.
- The potential rewards of success should not only outweigh the costs of failure but should far exceed them by a significant margin
- The best investors or businessmen have a lot of failures, and few successes that made them the best.
- Amazon CEO Jeff Bezos launched the Fire Phone and it was criticized as a failure. Bezos responded that this is nothing I have bigger failures I'm gonna launch soon.
- Amazon Prime and AWS make up for whatever failures they produce. They are the tail things that make most of the profit for Amazon.
- Netflix CEO asks the content creators to be more creative saying the cancel rate is very low - this shows awareness of the importance of tail events that drive succss.
I liked the chapter. It's kinda inspiring in the sense that we should take more risks - where the previous chapters were like take the least amount of risk. Perhaps risk is not the best word to use here. This chapter encouraged the reader to simply do more and learn from your failures and profit a lot from your successes.
### Chapter 7: Freedom
- Someone interviewed a thousand elderly Americans looking for the most important lessons
	- No one ever said that you should work hard to make a lot of money
	- No one said that you should be as wealthy as the people around you or more wealthy than people around you
	- No one said that you should choose your work based on your desired future earning power.
- The time that we have for ourselves has decreased a lot even though our working hours may have increased since we have thoughts of work occupying our minds all the time
	- so true
- In the current era, most of the jobs are something that requires thoughts sometimes thoughts + actions.
- We are satisfied / happy in our life when we have control over our time.
- We could be doing the work that we love, but it becomes less desirable if we're doing it for someone else.
- We often define comfort around wealth like how much we can survive if we stop our salary from the job or face any kind of emergencies.
- Controlling your time is the highest dividend that money pays.
### Chapter 8: Man in the Car Paradox
No one is impressed with your possessions as much as you are.
- Author used to imagine himself driving fancy cars that he saw people driving.
- Often, people think that buying fancy cars will get them respect and admiration but in reality, it's the car that people admire and not the person sitting in it.
- People tend to want wealth to signal to others that they should be liked or admired.
- But people looking at your wealth bypass admiring you, not because they think that wealth isn't admirable, but because they use your wealth as a benchmark for their own desire to be liked and admired.
- This applies to everything - like jewelry, houses, etc whatever people use to flaunt their wealth.
### Chapter 9: Wealth is What You Don't See
Spending money to show people how much money you have is the fastest way to have less money.
- Often people spend way too much or even go into debt to show that they are rich.
- Rich is what people see. You see the cars people buy. The big homes.
- Wealth is hidden. You don't see what is not spent. You don't see people's portfolios. Bank account statements.
- We only know things about them that we see so we can't assume that someone buying a Ferrari is automatically wealthy.
- "Was it really necessary to tell her that if you spend money on things, you will end up with the things and not the money?" - Rihanna's financial advisor after being sued by Rihanna.
- Exercise is like being rich - You think I did the work and I now deserve to treat myself to a big meal.
- Wealth is turning down that treat meal and actually burning net calories.
- The world is filled with people who look modest but are actually wealthy and people who look rich who live at the razor's edge of insolvency.
### Chapter 10: Save Money
The only factor you can control generates one of the only things that matters.
**Building wealth has little do with your income or investment returns, and lots to do with your savings rate**
- The world was running out of oil in the 1970s, the reason it was overcome was because people started building more energy efficient machines.
- The world grew it's "energy wealth" not by increasing the energy it had but by decreasing the energy it needed.
- Finding energy is out of our control - it depends on many factors geology, geography, weather, etc. but how we use it is in our control.
- Investment returns can make you rich, but whether an investment strategy will work and how long it will work etc is always in doubt. Your savings are in your control.
**The value of wealth is relative to what you need**
- A person may be a great investor, but if their spending habits are worse than an average investor - the average one wins in the long term.
- It is an opportunity for most people to improve their finances by just observing and cutting their spending.
**Past a certain level of income, what you need is just what sits below your ego**
- People often spend money to show off.
- People who with personal finance success - not necessarily those with high incomes - tend to have a propensity to not give a damn what others think about them.
**People's ability to save is more in their control than they might think**
- Desire less = spend less
- Care less about what others think of you = desire less
**You don't need a specific reason to save**
- Saving can be done with a goal, but it should not require a goal.
- Saving without a spending goal gives you options and flexibility.
**Flexibility and control over your time is an unseen return on wealth**
- Savings give you a lot of flexibility which means you can take a break on your job, or wait for opportunities or whatever.
- Basically, it's something whose worth cannot be measured since it opens up possibilities for you.
- Even money in the bank with 0% interest might actually generate extraordinary return if they give you the flexibility to take a job with a lower salary but more purpose, or wait for investment opportunities that come when those without flexibility turn desperate.
**This hidden return is becoming more important**
- The world used to be hyper-local
- People with some skill would compete only with people in their town.
- With technology now, the whole world can be competition.
- We live in a hyper-connected world where intelligence is hyper-competitive.
- Just intelligence is not something that would make one stand-out anymore.
- Intelligence is not a reliable advantage in a world that's become as connected as ours has.
- Flexibility is the biggest advantage one would have, along with soft skills like communication.
- Flexibility gives you more control over your time and options, you can find a new routine, a slower pace, and think about life with a different set of assumptions. The ability to do those things when most others can't is one of the few things that will set you apart in a world where intelligence is no longer a sustainable advantage.
- That's why save money.
### Chapter 11: Reasonable > Rational
Aiming to be mostly reasonable works better than trying to be coldly rational.
- You need to factor in your emotions as well.
- If you love a strategy you're more likely to follow it even during times of turmoil.
- If you love the underlying company- the team, the science behind it, etc,. then you're more likely to hold the stock even during short term periods when it's down.
- When you're emotionlessly investing in the market with a strategy, your mood changes based on whether the current value of your portfolio is high or low, and you become more likely to make mistakes.
- Julius Wagner-Jauregg - a 19th century psychiatrist attempted to cure neurosyphilis with malaria.
	- He found that fever cures his patients. So he experimented.
	- He tried out different diseases - some of his patients died too.
	- He eventually settled on malaria which gave him 6/10 success rate.
	- He won the nobel prize.
- Fevers are good (from a rational perspective)
	- Small fevers are often found to reduce the risk of some problems.
	- It's also ok for sick children to have 100-104 degree farenheit fevers since it often fixes the disease by turning on the body's immune system.
- People don't want to hurt - they don't want fevers.
- The rational think isn't always the most reasonable.
	- It may be complete nonsense sometimes.
- One should consider the philosophy of aiming to be reasonable instead of rational when making decisions with their money.
- Love your investments.
- Life isn't always consistent - just go with your emotions sometimes.
### Chapter 12: Surprise!
History is the study of change, ironically used as a map of the future
- Things that have not happened before happen all the time.
- "Imagine how much harder physics would be if electrons had feelings." - Richard Feynman.
- We shouldn't rely heavily on investment history as a guide to what's going to happen next.
- Outlier events move the needle the most.
	- Small amount of individuals have affected a lot of things in the world
	- Small amount of projects, innovations, or events have affected most of the things in the world.
- The correct lesson to learn from surprises is that the world is surprising.
- History can be a misleading guide to the future of the economy and stock market because it doesn't account for structural changes that are relevant to today's world.
- Benjamin Graham, the author of Intelligent Investor, has revised his book many times, updating the algorithms used or replacing them in every edition, so that it's relevant at that time.
- In investing history, the further back you look, the more likely you are to be examining a world that no longer applies to today.
- There's a common phrase in investing, usually used mockingly, that "It's different this time."
- "The four most dangerous words in investing are 'it's different this time'" - John Templeton.
- "The twelve most dangerous words in investing are, 'The four most dangerous words in investing are 'It's different this time''"
- The further back in history we look, the more general our takeaways should be.
	- People's relationship to greed, fear, how they behave under stress and respond to incentives.
### Chapter 13: Room for Error
The most important part of every plan is planning on your plan not going according to plan.
- The world works on probabilities not certainties.
- Give yourself a room for error for every plan.
- The wisdom in having room for error is acknowledging that randomness is an ever-present part of life.
- Safety tip: Increase the gap between what you think will happen and what can happen while still leaving you capable of fighting another day.
- "the purpose of the margin of safety is to render the forecast unnecessary." - Benjamin Graham
- Forecasters speaking in certainties gain a larger following than people who speak in probabilities.
- We underestimate the odds often especially if it's related to our own decisions.
- What causes us to avoid room for error:
	- assumption that somebody must know what the future holds
	- feeling that you're doing harm by not taking action that fully exploit an accurate view of that future coming true.
- Room for error lets you endure a range of potential outcomes and endurance lets you stick around long enough to let the odds of benefiting from low-probability outcome fall in your favor.
- Places for investors to think about room for error:
	- volatility: example, can you survive your assets declining by 30%?
	- retirement
		- you don't know the future.
		- Keep a 1/3 buffer
- "The best way to achieve felicity is to aim low" - Charlie Munger.
- "You can be risk loving and yet completely averse to ruin" - Nassim Taleb
- Take only the risks that let you play more. Surviving is the most important.
	- Take only risks that don't diminish your savings that can let you survive unknowns in the future
- The ability to do what you want, when you want, for as long as you want, has an infinite ROI.
- Room for error protects you from things you cant imagine yet.
- Most reliable things don't have a single point of failure
	- Jets have multiple engines and can fly with one and land with none.
	- Suspension bridges can lose many of their cables without falling.
### Chapter 14: You'll Change
Long-term planning is harder than it seems because people's goals and desires change over time.
- People may have had ideas of different careers for themselves when they were young than what they do now.
- The End of History Illusion - the tendency for people to be keenly aware of how much they've changed in the past, but to underestimate how much their personalities, desires, and goals are likely to change in the future.
- "At every stage of our lives we make decisions that will profoundly influence the lives of the people we're going to become, and then when we become those people, we're not always thrilled with the decisions we made. So young people pay good money to get tattoos removed that teenagers paid good money to get. Middle-aged people rushed to divorce people who young adults rushed to marry. Older adults work hard to lose what middle-aged adults worked hard to gain. On and on and on." - Harvard psychologist Daniel Gilbert.
- "All of us are walking around with an illusion - an illusion that history, our personal history, has just come to an end, that we have just recently become the people that we were always meant to be and will be for the rest of our lives." - Daniel Gilbert.
- The first rule of compounding is to never interrupt it unnecessarily - Charlie Munger.
- We can't follow the same thing in life but also we can't change ourselves drastically immediately. Though, we must accept that we will change and accommodate that change in our plan too if possible.
- **We should avoid the extreme ends of financial planning**
	- The fuel of the End of History Illusion is that people adapt to most circumstances, so the benefits of an extreme plan wear off. But the downsides of those extremes become enduring regrets.
- **We should also come to accept the reality of changing our minds**
	- We always change and often we must change so that we're better than we are before.
	- We don't **need** to consider the past to evaluate our future behavior.
	- Accept the reality of change and move on as soon as possible.
- "I have no sunk costs" - Daniel Kahneman, author of _Thinking, fast and Slow_ when asked how he could start again on drafts from total scratch.
- Embrace the idea that financial goals were made when you were a different person, so it's okay to abandon any without mercy when circumstances change so you can minimize your future regret. The quicker you do it the sooner you can get back to compounding.
### Chapter 15: Nothing's Free
Everything has a price, but not all prices appear on labels.

This chapter is about the fact market will always have ups and downs. That's the price of investing. Often people see it as a negative - a fine. But it should be viewed as a fee. It's something that we have to pay for to avail the benefits. Like in Disney land, we have to pay the fee to enter, but it's also still possible that it might rain.

The chapter is about accepting this fact. The author gives some examples like those who bought and sold stocks based on market trends lost more than those who bought and held.

Volatility is real and common. We can't avoid it. Find the price, then pay it.
### Chapter 16: You & Me
Beware taking financial cues from people playing a different game than you are.

Investors are different people having different money goals.

Problems arise when an investor tries to copy someone playing a different game.

The price of something may make sense for a day trader that's hoping to just sell at the end of the day, but it won't make sense for someone who plans to hold it for long. We shouldn't copy people's investments blindly. We should have our own plans and reasons for investing in things.

Bubbles are fueled by people's greeds.

Bubbles happen cuz of people's rational decisions to try to profit off of things in the short term - for example, housing and stuff or bitcoin. - like what they gonna do ? ignore it? nahh.
### Chapter 17: The Seduction of Pessimism
Optimism sounds like a sales pitch. Pessimism sounds like someone trying to help you.

People are more attracted towards negative news than positive news. Positive news seems boring/expected sometimes than negative news. That's why many doomsayers famous.

When someone says this stock will 2x or 3x your money, we don't believe them, but if someone tells us some stock in your portfolio is going to reduce a lot, then you pay attention and ask them which.

It's possibly an evolutionary advantage for us to be pessimistic.

People often underestimate things, and the speed of progress.
### Chapter 18: When You'll Believe Anything
Appealing fictions, and why stories are more powerful than statistics.
- If we look at the state of 2007, and 2009, we'll see that the main difference is that people's thinking changed causing the recession.
- The more you want something to be true, the more likely you are to believe a story that overestimates the odds of it being true.
	- We often bias our thinking towards what we want to happen.
- Everyone has an incomplete view of the world. But we form a complete narrative to fill in the gaps.
- Hindsight gives us the illusion that the world is understandable.
### Chapter 19: All Together Now
This chapter is a summary of everything in the book.
- Go out of your way to find humility when things go wrong and forgiveness/compassion when things go wrong.
- Less ego, more wealth.
- Manage your money in a way that helps you sleep at night.
- If you want to do better as an investor, the single most powerful thing you can do is increase your time horizon.
- Become okay with a lot of things going wrong. You can be wrong half the time and still make a fortune.
- Use money to gain control over your time.
- Be nicer and less flashy.
- You don't need a specific reason to save.
- Define the cost of success and be ready to pay for it.
- Worship room for error.
- Avoid extreme ends of financial decisions.
- You should like risks because it pays off over time. But you should be paranoid about ruinous risks because it prevents you from taking risks that pay off over time.
- Define the game you're playing.
- Respect the mess.
### Chapter 20: Confessions
This chapter is about the author's own investing decisions.
- The start of the chapter talks about how investors often advice different things while they invest different things. Same with doctors, they give a treatment for others than for themselves.
- Morgan Housel (the author of this book) lives a very low risk life it seems.
- He values patience and discipline in investing. And only invests in super low risk things.
- He focusses on savings more than anything.
- He keeps about 20% of assets in cash.
- He choose buying a house instead of mortgage because it was psychologically reasonable despite cheaper mortgage rates.
- It is enough to be financially independent. We don't need to be rich.

That's the end of this book. There's a Postscript section but I'm not that interested in it.

The thoughts above are just my understanding of the book. Let me know what you think if you're reading this.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Lessons from LLMs and Life]]></title>
        <id>https://maheshbansod.com/blog/lessons-from-llms-and-life-2025</id>
        <link href="https://maheshbansod.com/blog/lessons-from-llms-and-life-2025"/>
        <updated>2025-11-08T16:03:00.000Z</updated>
        <summary type="html"><![CDATA[>   "The unpredictability in life is what makes it interesting"
>  
>  -- [someone idk.. maybe some movie or
>  book](https://share.google/aimode/VX5rLCUiS15sa7iaf)

I'm Mahesh Bansod. A software engineer. [I love building stuff for the sake of
building it](https://github.com/mahesbansod).

Building software has never been so simple - type a prompt and boom you got a
working interactive system!

I really love this era. I have been programming since years now, and I still
love to. I find the most joy in building software when I'm programming it as
opposed to when I'm prompting it, but it's wonderful to see applications come
to life as I type in English what I want!

There's one thing I struggled with though while working with an LLM and that
is deterministic output.

If you do the same prompt a second time, it is sure to give you a totally
different output.. and maybe the second time it may not even work when the
first time it did!

This "non-deterministic"ness of it all has been making me draw parallels to
life.
]]></summary>
        <content type="html"><![CDATA[>   "The unpredictability in life is what makes it interesting"
>  
>  -- [someone idk.. maybe some movie or
>  book](https://share.google/aimode/VX5rLCUiS15sa7iaf)

I'm Mahesh Bansod. A software engineer. [I love building stuff for the sake of
building it](https://github.com/mahesbansod).

Building software has never been so simple - type a prompt and boom you got a
working interactive system!

I really love this era. I have been programming since years now, and I still
love to. I find the most joy in building software when I'm programming it as
opposed to when I'm prompting it, but it's wonderful to see applications come
to life as I type in English what I want!

There's one thing I struggled with though while working with an LLM and that
is deterministic output.

If you do the same prompt a second time, it is sure to give you a totally
different output.. and maybe the second time it may not even work when the
first time it did!

This "non-deterministic"ness of it all has been making me draw parallels to
life.
<!-- more -->

I started coding when I was a teenager, or even younger. It helped me make
sense of things. There's a single output* to the code you write. You write
some code and run it and you'll get the output based on the code you wrote,
and if it's something unexpected, you know that you messed up in the code
somewhere i.e. you know there is something you can change, something you can
do to make the software behave EXACTLY the way you want, and if something
doesn't work you KNOW that you have the power to change it. [Thus,
programming has had a profound influence on me](/blog/random-thoughts-2).

Programming gives us control, it gives us "agency" and hope, that everything
is going to be okay let's just go through the code and figure it out, there's
nothing stopping you.

Life on the other hand is... uncontrollable. I can't do anything. I can't
change anything. _It is what it is._ In life, the things you do don't always
benefit you or even produce any meaningful output. Of course, we could go and
reach out to our memory or any logs to understand what all we did and try to
debug anything unexpected, but there's hardly all the information we need.
and what if that pesky [Evil Demon](https://en.wikipedia.org/wiki/Evil_demon)
is messing with me like all the time?

I have lived a trepidatious life to be honest. i don't really like it since
it has cultivated habits in me that are part of what i dislike about myself.
While I work hard in changing that, I realised that the unpredictability of
it all is what makes vibecoding challenging to me as does life, and yet I do
find myself doing alright in vibecoding. The main factor for it is that the
models are good of course, but other than that, for the cases that it fails,
we put more attention to it and fix it, and I don't mean for the current use
case but rather for all the next usecases. For example, we might add a cursor
rule if we think that the agent didn't take some context in consideration for
a specific query when we think that it should have. Or if you're building
something that relies on LLMs, and it gives you an unexpected result, then
you would update its prompt, [give it more information, or less information,
or decide to move things out the prompt and use a programmatic
approach](/blog/making-llms-do-what-you-want/). The point being that, in
vibecoding/working with LLMs, we still retain the control we have, we still
retain the ability to go back, and change and update things and make our
system better. And yet, we do know that it might still fail due to the
unpredictability of the output of the LLM. So the best way to deal with it is
to set up guardrails around it. To expect the unexpected and set up alerts,
retries or anything so that the impact of it is waned and the system reminds
us to handle that case.

The role of luck feels unfair at times but it is an interesting phenomenon.
Luck plays a huge role in everything. I'm incredibly grateful for all the
things I have since a lot of it could be attributed to chance besides my own
hard work because as I said earlier, there's nothing in our control and life
has it's own plans where you hardly matter. Thinking of life and luck from
the perspective of taming an LLM, this is how I see it. From here on out, the
following are just things I have been working on in my own life, kinda like
tips on dealing with unpredictability. I'm writing this to ground myself when
I'm unsure of things.

### Avoiding unwanted outputs

> Everything can be taken from a man but one thing: the last of the human
> freedoms—to choose one's attitude in any given set of circumstances, to
> choose one's own way
>
> -- [Viktor Frankl](https://en.wikipedia.org/wiki/Viktor_Frankl)

In the prompt, you might ask an LLM to avoid something or not do something,
while this works these days, earlier versions often had trouble not doing
things. The best way to work around that was to omit as much information as
we could about the thing we don't want it to do and have it focus more on
what we want it to do often providing examples too. Removing yourself from
the environment which affect you or situations whose outputs you don't want
is a simple solution to reducing the negativities in your life. [I wrote more
about unlearning habits a few years
ago](/blog/unlearning-habits-and-intrusive-thoughts/).

It's important to also reduce the "tech debt" in your life i.e. things that
you keep delaying that might bite you in the ass in the long run or just some
things that could improve your life but you delay it cuz you're busy with the
routine lemon slop life gives you. This can be as simple as just trimming
your nails, getting a haircut, or it can be a bigger change like moving your
furniture and converting your home office into something you'd be super
comfortable and in the right mindset to work in.

The unwanted outputs in life are inevitable but there's usually always ways
to go around these problems if not fix them. While this has been something I
have followed, I think it's important to look at the often neglected (by me)
other side of it.

### Increasing the chance of wanted outputs

> you can just do things

To get what you want you need to increase it's chances. You add "STRICTLY" in
the system prompt, or "IMPORTANT" or "CRUCIAL" or random threats to make it
work right.. and while that sometimes works out, I have found that to be an
inefficient approach. Instead, we increase the chance that the LLM will
produce the expected output by giving it the needed information only and
steering it towards the direction we want. We don't know what's gonna happen
but we can try. We can do our best to increase the success outputs. To go
from 0 to 1 and eventually from 1 to 100. This is where we work hard and do
our best. We use our ingenuity and creativity to solve the problems we have
as exhaustively as we can.

#### The role of agency

It's important to have agency so that you materialize the "doing" part of
"you can just do things". It could be staying true to your beliefs when the
world is against you or it could be choosing something you have strongly been
against for a while but realise now that you have been wrong. Going simpler,
even getting out of bed requires a certain amount of agency and will. Any
change you make to your life requires agency and effort. If your life is a
project, how can you make it the best? Think of all the ways you can do it.
Then just get some willpower and go through with it, it'll be simpler than
you think.

Oh, and agency can require a lot of energy depending on the kind of work
you're doing, the kind of person you are, and how much the problem you're
trying to solve interests you. You need to be willing to break out of your
shell, be uncomfortable, be visible and vulnerable. You need to not just be
willing to do what it takes, but also be able to think of what it takes and
get there.


### Handling unexpected outputs

Building something close to perfection i.e. close to how you want it is a
gradual process. You don't know what will go wrong, but when it does, you fix
it in a way that things don't go wrong the same way again. Not just that, but
you expect all the things that can go wrong, and have a plan on what to do
when it does. Derisk your solutions without compromising on their quality.

So, now, instead of hoping for things to be better in my life and just
putting in random effort, I decide to put directed effort. Focussing on the
parts I want and avoiding the parts I don't. It's really that simple.

Due to a number of factors, I would usually avoid putting myself out there,
but looking back this deprived me of opportunities that otherwise I would
have been great for. [To get hit by a
truck](https://en.wikipedia.org/wiki/Truck-kun), you first need to put
yourself on the road. That's the only way to get lucky. Don't go out buying
lottery tickets ig but if you don't buy one, there's no way to win the
lottery. Putting yourself in situations where there's a possibility of you
getting lucky is a part of increasing the odds of getting the right outputs
in your life. I think this is a big part of "luck" that people often neglect.
You can't get lucky if you don't put yourself out there.

Everything as probabilities instead of certainties makes much more sense than
the model I had previously. Things are never going to be the way you want.
Might as well embrace it.

## Observability

To know what went wrong, you need to know what's happening. Log everything. I
have started doing this more and more in my life. I write different things I
learn. I log the amount I exercise everyday. I write down about the food I
eat - whether it's ordered then from where it's ordered, it's cost, how did
it taste, how was it cooked i.e. the recipe (if i cooked it), it's calories,
protein, etc. While this can be a little extreme, I think it's quite useful
or at least it's fun. Soon, I will be reducing the logs and focussing on only
the parts that I find useful.

Observability doesn't just mean logging the things you do but it can also
mean logging the things that are happening around you or around the problem
that you are trying to solve. Logging helps in retrospection to analyze what
went wrong when something (inevitably) goes wrong, or it helps you to analyze
what you did well when you do eventually succeed. You can recreate your
successes and avoid your failures once you become good at logging. Adding
observability is one of the chores that don't bring immediate value to your
life but eventually when you have enough data you see it shine.

## Brain as a tool instead of a me

You are not your mind.

One might think they have a tendency to self-sabotage when it's just your
mind acting out after getting repressed for a long time. I believe that to
get the best output from yourself, you need to love yourself and understand
your limits. To keep your brain active, you need to let it have it's fun. So,
don't feel guilty reading seventy pages of your favourite novel thinking you
could have finished  some work in that time, instead allow yourself to
immerse in it and be happy by allocating a special time for you to read. This
makes it possible to live guilt-free and focus when it's time to focus and
enjoy when it's time for that.

While it's easy to get in the comfort zone again while you let your mind hold
the reins again and relax, I think that your brain works for you too and you
will certainly find it easier to get back to the work you want to do once you
give the relaxation your brain needs. You'll find that often you will be
better than if you hadn't chilled out or spent the time you needed with your
loved one.

Also, loving yourself doesn't mean to always protect yourself from the pain,
in fact, it means relying on your brain to expect and manage the pain that
may be necessary for your growth. I'm using the word pain here quite
liberally including fear and anxiety in it. Don't crawl back in your cave
just because something will be difficult. Prepare yourself instead and go
through with it. To me, as a general rule, I would avoid pain where I can.
Except when I know I'm going to grow and get better because of it.

## Conclusion

So, this is what I have for you. Or rather for me. I think that giving myself
the space to think and write down my thoughts helps me structure the patterns
in my life and this is also the part where I'm logging the things in my life.
I suppose this is like my yearly musings about my life relating it to
something and thoughts to improve it. While I write something like this every
year, not all of those get published.

I hope to improve myself and get to a place where I'm happy.

My main long term goals are:
- to learn a lot
- to spend time with loved ones
- to have the ability to solve any "problems" that me or anyone relying on me
  would have

In the vein of improving my life, I will continue logging my progress on
these goals and ensure whatever things I do fall in line with them.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[A view of 2026 from 1927]]></title>
        <id>https://maheshbansod.com/blog/metropolis-1927-movie-tech-review-2026</id>
        <link href="https://maheshbansod.com/blog/metropolis-1927-movie-tech-review-2026"/>
        <updated>2026-01-18T20:30:35.707Z</updated>
        <summary type="html"><![CDATA[[Metropolis](https://en.wikipedia.org/wiki/Metropolis_(1927_film)), a 1927
sci-fi movie, is set in a dystopian capitalist society where a whole city is
owned by Joh Frederson. The story revolves around his son, Freder Frederson,
wandering around the city having an adventure. To put it simply. It's about
class struggle. Maybe faith. At one point, I thought it's an anti-capitalist
movie and at another point, I thought it's anti-communist... but maybe it's
both or neither.. it's just a movie.

I started it out of curiousity to get a perspective on what people thought of
as super futuristic in 1927. [The movie is said to be set in
2026](https://en.wikipedia.org/wiki/Metropolis_(1927_film)#Pre-production).
The year I'm currently writing this in. It's 18th January, 2026. It feels a
little surreal that people 100 years ago dreamed of this time and made
stories about it. I'll go over the technology of Metropolis (as much as I
could understand it) in this blog article.]]></summary>
        <content type="html"><![CDATA[[Metropolis](https://en.wikipedia.org/wiki/Metropolis_(1927_film)), a 1927
sci-fi movie, is set in a dystopian capitalist society where a whole city is
owned by Joh Frederson. The story revolves around his son, Freder Frederson,
wandering around the city having an adventure. To put it simply. It's about
class struggle. Maybe faith. At one point, I thought it's an anti-capitalist
movie and at another point, I thought it's anti-communist... but maybe it's
both or neither.. it's just a movie.

I started it out of curiousity to get a perspective on what people thought of
as super futuristic in 1927. [The movie is said to be set in
2026](https://en.wikipedia.org/wiki/Metropolis_(1927_film)#Pre-production).
The year I'm currently writing this in. It's 18th January, 2026. It feels a
little surreal that people 100 years ago dreamed of this time and made
stories about it. I'll go over the technology of Metropolis (as much as I
could understand it) in this blog article.<!-- more --> I'm not going into the science behind it or discussing it's feasibility. These are just general observations - mostly just random thoughts as I go over the tech in the movie in my head. 



#### City

There's a scene of the city when Freder goes to The New Tower of Babel. It's
like a set of buildings. The middle one the tallest. There's elevated streets
or railway tracks rather where we see trains moving. And there's a lot of
planes everywhere, many of them not even flying higher than the middle
building. Besides airplanes, I think it's also got Zeppelin's I'm not sure.
Also, the traffic is crazy down there. Or maybe it's not? No cars were
blocked, it was flowing traffic!

[By 1927, cars were already quite common.](https://en.wikipedia.org/wiki/Cars_in_the_1920s)
I think the movie wants to show maybe the increased number of cars and the
organised traffic.

Also, the buildings that are often shown are really quite dull. They're grey
blocks with a lot of windows. Most of the buildings looked like that except
special ones. I suppose that's what the current state of the world is? I
should pay more attention to the buildings around me I guess. They are indeed
dull gray blocks in my head.

My theory is that city people are possibly atheistic - they also have
"Satanic" symbols randomly. In contrast to that, the workers are shown to be
actively religious.

#### Fuel And Work

The city is run by the people "underground". They're upto weird stuff to
power the city.

In one case, a factory is being powered by or rather kept cooled by a lot of
human workers. It's simple, all they gotta do is flip levers continuously!
There is a lot of (white?) smoke coming off of the machines or is just in
that area - I assume it's due to those power generating machines.

Then there's another device that's like a huge human sized clock. It's got
three hands. I didn't understand the mechanism fully but often some lights at
the edge of the clock turn on, and a worker needs to move the clocks hands
quickly to point to that light.. often only two of the hands need to be moved
and apparently it takes effort to move those hands. People have ten hour
shifts there making sure to match the hands and the lights and not doing so
will I guess stop providing power to the city.

#### Communication

While there's hardly modern era digital stuff seen in the movie (there were a
lot of levers and clunky buttons), but there was a video call telephone!

It's kinda funny that they still have to hold the telephone to their ear.
Maybe it's a privacy thing. I would have been so impressed if they had
introduced a touch screen system somewhere too. but this video call took me
by surprise too.

#### Robots and AI

There's no AI like we have now (LLMs). As far as I know, I think only [Isaac
Asimov](https://en.wikipedia.org/wiki/Isaac_Asimov) kinda got it right imo -
I'll maybe write more on it in another blog article.

So, in the movie, there are no robots, and it seems the only robot gets
invented at that point. So, in real life 2026, there are many humanoid
robots, so we are quite ahead there! BUUUTT... the newly invented tech in
Metropolis allows encoding a human in the newly invented robot.

The robot that this guy, our local scientist Rotwang (Red wang?), invents has
a consciousness already it seems or something that looks like consciousness.
The robot can move on it's own but just looks like a machine. It can be made
to look like a human by apparently kidnapping a human. The skin added on this
robot can be melted by fire. So, this skin I think is just skin, I'm not
entirely sure.. maybe it has some memories and a little personality too. It's
just weird that the workers just start believing robo-Maria... but again they
have no reason to not believe that that's not their Maria. Ratwang didn't
have to make the perfect Maria - just passable enough to get his message
across. Also, Ratwang messed up one eye of the robot, it keeps twitching or
is unnaturally small or something. It's freaky but it does serve the purpose
of distinguishing real Maria and robo-Maria if the make-up, clothes and
expressions weren't enough.

I think they could have easily made machines simpler than humans to just
replace the workers and maybe let the workers have a luxurious life.. but who
knows how it works, you know? Like even if they did have tech that could
relieve those workers current duties, who's to say whether those workers
won't have been in some other kind of dangerous job. And if every dangerous
job is automated, we still never know if the poor ever get a chance to have a
good life whether they still have opportunities to get like white-collar
jobs. Who knows what the universal basic income situation is there either.
It's possible, they're just jobs for the sake of jobs. Something to pay them
for, but then couldn't it have been better to make it less manual labour less
stressful? I suppose, one could argue they wanted to keep the workers busy so
they don't think it's a fake job.. but come on why not just start universal
basic income at this point? idk idk. happy to learn - feel free to message
me! or maybe we'll find it together as time goes on.

### Conclusion

These are the technologies I noticed in the movie Metropolis. It was a fun
watch. I think the most futuristic thing in metropolis is the robot the
Maschinenmensch. I believe we have already surpassed the Maschinenmensch
technology-wise, I mean get a humanoid robot and stick an LLM in it.

The cities have a lot of traffic, but not as well managed as that one scene
in the movie depicts. We do have a lot of planes in the world. The tallest
building in the world is Burj Khalifa at 828m. The [tallest
building](https://en.wikipedia.org/wiki/History_of_the_world%27s_tallest_buildings)
in the world in 1927 was the Woolworth Building standing at 241m.

I wonder what the craziest thing for someone who traveled in time from 1927
to now would be - cuz there's a lot, right? Also, who's writing the next
Metropolis? Someone needs to make Metropolis 2 in 2027 imagining 2126 asap.

There are a lot of aspects that people in 1927 couldn't have predicted, but
there are many things that they did! so let's not stop dreaming. let's
imagine crazier futures and let's keep advancing humanity to the next levels
with deep scientific research. After all, we still haven't even invented a
lot of existing sci-fi.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Random thoughts (2?)]]></title>
        <id>https://maheshbansod.com/blog/random-thoughts-2</id>
        <link href="https://maheshbansod.com/blog/random-thoughts-2"/>
        <updated>2023-11-02T20:55:00.000Z</updated>
        <summary type="html"><![CDATA[Years ago, maybe in 2018 or 19, on a random afternoon outside the college canteen, a friend posed me a simple question that has been on my mind a lot these years.
The question was, what if you give it your all, invest unwavering effort, and after all this what if you still fall short of achieving your dream?
]]></summary>
        <content type="html"><![CDATA[Years ago, maybe in 2018 or 19, on a random afternoon outside the college canteen, a friend posed me a simple question that has been on my mind a lot these years.
The question was, what if you give it your all, invest unwavering effort, and after all this what if you still fall short of achieving your dream?
<!-- more -->
At the time, I dismissed it perhaps too arrogantly that such a thing would ever occur. My belief was plain and simple - if you truly did everything right, there would be no room for failure. To me, it was naively just cause and effect. If you didn't achieve your dream, maybe you didn't do it right, maybe you didn't work hard enough, or you weren't smart enough. Maybe I was too defensive about my own goals, and driven by my fear of failure among many others, I blurted out the dumbest thing I possibly could.

Or did I?

(cue V Sauce music)

I am trying a new thing - to be kinder to my past self. And yea, no matter how embarrassing and annoying I can be, I gotta get over it. Which means I'm gonna look at it and pretend it's not me and that it's someone else. Kidding, no. I need to own it. And to do that, it's not fair to just criticize my past self without understanding the perspective and reason why my thinking had been quite surface level and sometimes still is.

Good - I don't know what this word meant really. But I wanted to be it.

I wanted to be a "good" person. I don't even know why. Who wants to be on the side of justice, what a nerd. Anyway, this desire of being a good person, was more inclined towards being known as a good person, or rather to be more accurate - it was just wanting to be liked by people, and when I wasn't I just thought I'm not "good" enough. The "good" equating to an ideal form of a human being popular in all of society across all cultures I guess. I didn't have any definition of what it meant to be good and yet I was always disappointed in myself for not being good enough (which is good - character development baby - or is it? :hmmm: ). I wanted to be liked by my friends, my family, my girlfriend, my teachers, everyone really, why did I want that? - it's human nature shut up. I wasn't liked if it isn't obvious by now, at least I didn't feel like anyone really likes me as a person. I didn't even like myself. Any small disappointment anyone showed towards me grown out like a ripple and consumed my mind. And eventually it didn't take long for me to want to avoid the people I cared about hoping to never cross paths with them again in fear of embarrassment. Not that it excuses anything. At what point does awareness emerge?

Being used to the immediate response of a computer program telling me what I'm doing wrong, it became apparent that in human relationships I was doing everything wrong based on the lack of positive outputs. ANndd., I seem to have forgotten what kindness means. My past self is quite cool actually despite all of this - I'm now quite good at understanding and making software, and full credit goes to past self for that. Aight that's a lot for something offtopic, getting back to where I was. This just seems like needless rambling now.

The same cause that developed my need for being "good" - good enough to be liked people - is the same reason I so desperately wanted a direct correlation of effort to success. Computer programming has spoiled us. It gives us undeserved confidence that if we do everything right then the right results will follow. They don't necessarily.

The obvious problem with my initial response to my friends question is the lack of existence of a collective consciousness that everything in existence is connected to making it possible for a person to know everything everywhere all at once (i like that movie) and then a capacity to process all that information and choose the correct things to do all the time. This has been a missing feature since day one, not that I endorse it, but it could've been convenient. Anyway, before you take out your wooden pickaxe and start building this feature, be warned that it wont solve another core problem which I'll get to in a second or a minute or could be an hour too I don't really know your reading speed, assuming it's x words per minute and I don't know how much I'm going to write before I start with the problem but can I make a good guess..? Maybe - i don't care - or - um, what if I just write about it in the next sentence, so that I can just count the number of words I've written until then and ask the reader to divide it by their reading speed(x) to get the time it takes to reach the sentence or I can come back to this sentence later after I write the section somewhere far down and just write the number of words after this sentence. Nah, I'm not doing that. The problem of not knowing everything i.e. not knowing what's the right thing to do all the time is one of the most basic obstacles on the way to your goal. You can however do the most you can. This may not be enough but it can be enough based on your knowledge and reasoning abilities.

Will you be satisfied if you put in all your effort and then lose?

Does the fact that there's nothing you could have done to get closer to winning than what you already did comforting?

That hints us towards the "core problem" I was talking about earlier. This means you are not enough even if you put all your effort in. That to me isn't comforting, it's a bit daunting, and kinda cute, but it's still a loss and nothing gets solved - we can give up here and go home. Or we can just go home without giving up too. Let's keep our spirits up. Let's say we did pick up our pickaxes so they're fulfilling their purpose of being picked (that's how they got their name - someone picked up an axe and sharpened it a bit), and you build yourself the superpower to know everything there is to know and be the most rational person with infinite computing power in your brain, even then, there's a possibility that what you want simply isn't possible at all. A butterfly can't cause a hurricane. It can flap it's wings yes but, so what, I can flap my wings too. I can eat a butterfly, I'd like to see it flap it's way around that. Butterflies will butterfly but hurricanes are kinda big. Imagine air but like big and fast. Now imagine it bigger, and faster and more chaotic. Now imagine a butterfly. Are you a hurricane or a butterfly? As for me, I'm a human, or I try to be. We're all silly little things. Except me - I'm cool.

There's a story somewhere about a dude tasked to roll a boulder up a hill and each time he reaches the top the boulder rolls down again and he has to go back down and start from the beginning, or maybe that's an episode of Taskmaster. The boulder is rolled up and every time after a lot of effort has been put in, it'll go down again, and oh no Sisyphus needs to go down and get the boulder back up, is this hell? poor lad must be shaking and crying each time the boulder goes down, right? Right?//

This guy Camus with his ever present dimension crossing cigarette looks at the camera revealing he knew we were filming all along, and goes on to explain that Sisyphus in fact is not shaking and crying. The life of Sisyphus during this punishment is about finding meaning in his struggles, to embrace that there are somethings that are not in our control. To find happiness in our struggles. And should we kind reader live our life like this then?

We already don't know whether we're gonna win or lose, we can only try our best anyway, so why not just love the process or rather choose to do the processes we're inclined to love more often?]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Thoughts on Project Hail Mary by Andy Weir]]></title>
        <id>https://maheshbansod.com/blog/review-project-hail-mary-andy-weir</id>
        <link href="https://maheshbansod.com/blog/review-project-hail-mary-andy-weir"/>
        <updated>2024-03-02T17:40:00.000Z</updated>
        <summary type="html"><![CDATA[This article contains my raw thoughts on the book "Project Hail Mary" by Andy Weir.
]]></summary>
        <content type="html"><![CDATA[This article contains my raw thoughts on the book "Project Hail Mary" by Andy Weir.
<!-- more -->
Started project hail mary today (25th Feb 2024).
Finished the first chapter. It seems pretty cool. I find the narrator funny. I'm instantly hooked, and super curious about what the main character is going to do.
I like the way that he is analyzing his own thoughts and words to understand more about himself. The pace and the tone of the narrator resonates with my own writing style I felt.
I'm thinking of starting chapter 2 too.

I read the second and third chapter. Turns out he's a teacher. What was his name Rudley something. So, this is an alien story. It seemed we are moving away from the sun, but it turns out to be another solar system. From what I'm reading so far, I'm gonna predict the story.
MC finds out that aliens are eating the sun. They make a plan with the Stratt person to either form a separate colony of humans or maybe take all the aliens with them in a rocket and maybe send the aliens to a different solar system in which case probably the rocket is using those alien's abilities as fuel.
Though, both seem a bit unlikely too. If they wanted to start a colony, they could've sent more people. The computer clearly has some error, cuz two people are dead. So, if this book doesn't have a happy ending, maybe it'll make sense a bit? idk. Assuming it does have a happy ending, it's even possible that the rest of the crew is in some other part of the rocket right now, and they'll start a colony in that solar system they're going towards I guess.
If they're just taking away the aliens somewhere and sacrificing themselves, I'm not sure if that's a good ending. Idk depends on the way it's told. But so far, this seems to be more unlikely. How would the MC feel when he discovers that he's sacrificing his life? Is that all this story amounts to?
I'm curious what's going on and feel like reading more immediately.
Maybe I'll do some other work and get back to it before sleeping.

Read chapter 4 last night too. it was fun. i was right about a few things. so it indeed is a one way trip and the astrophage are the fuel.
now about saving humanity with it as the MC guesses, I'm not sure about it. if so, it's possible that the aliens were slowed down and the sun is not in that bad of a state as predicted since it's probably been a lot of years on the rocket for Grace.
Im quite immersed into the story. I'll read the next chapter tomorrow.

So, it's 2nd March. I finished the novel today afternoon around 1530-1600 I think.
It's an amazing adventure. Turns out that Dr. Grace never wanted to be a part of the crew. That was an unexpected twist. I loved reading this book. It's emotional and tense.

I love every interaction between Rocky and Grace. It's incredibly cute. I love how they get excited over science, how they teach each other, and how they know each other's habits without being explicitly told. I think they've risked their life for each other multiple times.

The mystery about the Astrophage and the solution that comes up is satisfying. The disasters that follow them while and after acquiring Taumoeba have been such an incredible read. The suspense about how they're going to fix this problem and the surprise at the solution leaves me feeling happy for these characters and hoping they'd both get their good ending.

The end wasn't expected but I was always hoping that Grace should get to visit Erid, and then he did! Plus he stayed there for years! It totally makes sense that he would become a teacher there too. It's a bit funny, but I love it.
I'm also glad that they didn't leave out the crucial thing - whether or not Earth survived. I'm glad to have a satisfying end. Though, I'd love it if there are more books after this too. Maybe the events on Earth after the Hail Mary left till the beetles returned.
I was also hoping that maybe Grace returns to Earth and we get to see how the characters react to his information that he met an alien , and the solution to the Astrophage problem. But I know I was hoping for too much. That's unnecessary for a novel, I don't know why. Most novels / any media don't really show what happens after the audience is sure that the protagonist(s) have solved every problem.
I wanted to know how Grace would confront Stratt when he returned, I imagine she'd be an old lady, probably in prison or something. And when he meets Grace he just feels bad? Nah, even if she's in prison, she'd probably be ruling the prison. Though, if I think like that, it's also likely that she doesn't end up in prison at all and that she's already made plans about how to navigate after Hail Mary took off.
But to be fair, Grace didn't have much on Earth it seemed. He had his college friend, his students and Stratt. He did care for his students. Don't know about the college friend, I don't think she had another appearance after her first one.
I also wonder what if they had decided that Rocky and Grace visit Earth first, and then Earthians help Rocky go back to Erid. Who knows how that'd have ended up. I guess the novel would've ended when they spot Earth or something. Which is kinda how it ended really too.

Anyway, good book. Would recommend. 10/10]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Social distancing and The Naked Sun]]></title>
        <id>https://maheshbansod.com/blog/social-distancing-and-the-naked-sun</id>
        <link href="https://maheshbansod.com/blog/social-distancing-and-the-naked-sun"/>
        <updated>2020-04-04T10:58:09.000Z</updated>
        <summary type="html"><![CDATA[Social distancing is a new and perhaps uncomfortable concept for many of those practicing it due to the pandemic this world is going through today. We are all in different places now; most probably where we didn't expect ourselves to be at this point. We are forced to stay isolated from others in our own hole, yet we are connected to everyone through this fantastic invention of mankind: the internet. In my opinion, being isolated has its own perks and even staying off the internet during this time might do you good but that's not really the topic of discussion right now; maybe some other time.
]]></summary>
        <content type="html"><![CDATA[Social distancing is a new and perhaps uncomfortable concept for many of those practicing it due to the pandemic this world is going through today. We are all in different places now; most probably where we didn't expect ourselves to be at this point. We are forced to stay isolated from others in our own hole, yet we are connected to everyone through this fantastic invention of mankind: the internet. In my opinion, being isolated has its own perks and even staying off the internet during this time might do you good but that's not really the topic of discussion right now; maybe some other time.
<!-- more -->

[Isaac Asimov](https://en.wikipedia.org/wiki/Isaac_Asimov)'s novel "[The Naked Sun](https://en.wikipedia.org/wiki/The_Naked_Sun)" features a planet called "Solaria" where the society is shown to have quite an advanced version of "social distancing". Pardon me, if I'm recalling the facts incorrectly; it's been years since I read the book. The state of our world today reminds me a lot about this planet and it's society.

Solaria was inhabited by the descendants of the first wave of colonists that left Earth to find new worlds. Solarians are known to wear nose filters and gloves when interacting with others. People from Earth(who were generally thought as disgusting and diseased by the Solarians) were required to submit to body sterilization before entering their territory.

Solaria had a very small population - about five thousand people. Each person had their own estates assigned to them. Solarians communicated with each other only through holographs. They barely interacted by any other means. Their partners would be chosen by some algorithm and the population was kept in control so as to manage resources effectively. A Solarian would be put to death if they did not adhere to the rules of this society. In fact, they were brought up from childhood as individuals who liked those rules and that way of living - probably because that was the only way that they had lived so far.

This society had evolved in that manner due to disease and robots. Disease prevented people from interacting with each other physically and keeping distance from them. This would create a lot of problems, as we know. The problems in Solaria were overcome by technology. Everything was automated. Manual work was done by robots, and technology replaced humans wherever there was need for contact. They were all so alone. I wonder if they felt lonely. Probably not with all those robots around. Does the absence of affection and intimacy since birth eliminate the need for those feelings?

Though Solarians were restricted in many ways, they had a lot of luxury and safety. A person had their own very vast estate and all their needs and wants were met with(except, of course, those that were not allowed). It was, from one perspective, a heaven with only one person - you.

In the novel, though, Solarian people are not exactly humans. They have been evolved due to their environment after being isolated from Earth people for thousands of years. [We, if isolated as babies, would probably develop mental illnesses.](https://www.noisolation.com/global/research/how-does-social-isolation-affect-a-childs-mental-health-and-development/) But maybe the Solarians' bodies have evolved so much as to overcome the disadvantages of isolation.

If this pandemic continues and increases beyond our control, would there come a point in the future where we become like the Solarians? Can technology evolve so much that it replaces human contact?

If not covid19, maybe the next pandemic would cause this. Maybe some virus to which we can't even find a vaccine at this stage might cause a society like this.

What do you think about Solaria? Would you like to live in that world?]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Sri lanka trip 2024]]></title>
        <id>https://maheshbansod.com/blog/sri-lanka-trip-2024</id>
        <link href="https://maheshbansod.com/blog/sri-lanka-trip-2024"/>
        <updated>2024-11-17T10:58:09.000Z</updated>
        <summary type="html"><![CDATA[I went to Sri Lanka on 6th November, 2024 and returned on 12th November, 2024.
This article describes my experiences on this trip.
]]></summary>
        <content type="html"><![CDATA[I went to Sri Lanka on 6th November, 2024 and returned on 12th November, 2024.
This article describes my experiences on this trip.
<!-- more -->
We landed at Colombo, then directly traveled to Kandy and started there.
From there, we went to Nuwara Eliya. Then to Bentota. And then finally back to Colombo.
And then back to India.

#### From Pune To Sri Lanka

The [Pune International Airport](https://en.wikipedia.org/wiki/Pune_Airport) is ten minutes from my home. We often enjoy listening to the planes flying above us vibrating our utensils, interrupting important meetings, and reminding us of the scientific progress enabling us to travel huge distances THROUGH THE SKY. The first flight was from Pune to Chennai. It was at 3:30AM so we planned to reach there at around 1AM. The flight was delayed a few minutes, but didn't really matter, our next flight was in the morning at 9:40AM.

So we went to Chennai from Pune, and stayed there till the morning sleepless. I explored the [Chennai International Airport (MAA)](https://en.wikipedia.org/wiki/Chennai_International_Airport). It was mostly empty at this hour. It's a big airport. It's clean. I roamed around like a ghost for hours and eventually boarded the next flight i.e. Sri Lankan Airlines.

It was okay. We didn't get any meals we had added, but they were free so that's fine I guess, and the flight was just a little less than two hours long. I had a window seat. I think the seat layout was like 3-3-2. I was on the row with 2 seats. A nice lady sat next to me. She was having trouble putting on her seat belt, I swiftly helped her out and reassured her that seat belts are complex sometimes. She was Sri Lankan and spoke a little in Sinhalese or Tamil I'm not sure. We exchanged a few words in broken English after quickly realising the language barrier. We had a few more interactions throughout the flight.

The flight was smooth. We rose above the clouds many of which were shaped like Ramayana dieties, and some like rabbits, while some were simply cloud-shaped. As we approached Sri Lanka, the pilot notified us about it and led our attention towards the Sri Lankan coastline. He adeptly flew the plane above parts of Sri Lanka leaving us mesmerized of the scenery finally landing to the Colombo Airport - [Bandaranaike International Airport (CMB)](https://en.wikipedia.org/wiki/Bandaranaike_International_Airport).

I didn't explore the Colombo Airport. The Sri Lankan lady who was sitting next to me said goodbye pushing her luggage out the airport. I waved back to her too. Seems I made a friend on the flight whose name I don't know and who I'll never meet again, and I think I won't remember if I ever see again. We took our luggage from the baggage claims area and headed out of the airport. Outside the airport we found a taxi service and booked a taxi to Kandy. On second thought, it would have been better to book a taxi from inside the airport maybe (a [PickMe](https://en.wikipedia.org/wiki/PickMe) booth was near the exit), and get a sim card in there too.

The taxi ride was mostly uneventful, we waited at a nice place for lunch, and then once for a **[King Coconut](https://en.wikipedia.org/wiki/King_coconut)** drink.

For lunch, the place we went to offered a buffet. We tried a variety of rice and chutneys and some different curries. Our first Sri Lankan food was good. They gave us curd, some random fruit juice, some random sour juice (probably [Jal-jeera](https://en.wikipedia.org/wiki/Jal-jeera)), and honey mixed with jaggery too.

#### Kandy

We reached Kandy in the afternoon and checked into our hotel - [Galaxy City Hotel <small>(booking.com)</small>](https://www.booking.com/hotel/lk/galaxy.html). It's a good place, and the staff is good too. We talked to the owner and the guy at the counter often and they promptly and politely gave us any information we needed. We relaxed there, and in the evening set out to explore the city.

We walked out the hotel and soon saw a [tuk-tuk](https://en.wikipedia.org/wiki/Auto_rickshaw) and stopped it. We wanted to go to the city center, but before that we needed a Sim card, so we headed to a sim card place. In this tuk-tuk journey, we started a conversation with the driver which headed towards politics of Sri Lanka, and surprisingly the tuk-tuk driver was well versed about not just Sri Lankan politics, but Indian as well. Of course, no emotional takes were involved, just a discussion about the current state of Sri Lanka. It seems that an average Sri Lankan citizen is quite politically aware (if I could consider the knowledge of tuk-tuk drivers as similar average Sri Lankan citizen's knowledge about it, since often other drivers we met were quite aware of the political situation in Sri Lanka too).

I got a [Dialog sim card](https://www.dialog.lk), and a large data pack. I got 15G data, which seemed enough at the time but now I realise it was much more than we needed - at the end of the trip I still had about 12GB data left. The sim card was mostly reliable, though sometimes, I had internet problems with the Telegram app.

Our go-to place at Kandy for dinner was [Balaji Dosai](https://g.co/kgs/ARZhKLQ). They served a few different kinds of Dosa's, and it seemed that the place was quite popular for tourists and locals. In contrast to Balaji Dosai, most restaurants around were mostly empty.

The sun sets in Sri Lanka at around 5:30PM - 6PM, and soon after most shops start closing. We walked the streets of Kandy to go back to our hotel at around 9PM. It looked as if it's the middle of the night 1AM or something.

The next day we had good breakfast in the hotel and soon left for **[Pinnawala Elephant Orphanage](https://en.wikipedia.org/wiki/Pinnawala_Elephant_Orphanage)**. On the way there, the tuk-tuk driver first stopped at a bridge where we saw a good view of a valley and saw some monkeys chilling around.

Next, the driver stopped at a **Herbal Garden** where a guy showed us different kinds of herbs. The owner of the herbal garden showed us around the place and described different plants and trees there. Basically it was an advertisement for his products. Every other plant leaves were plucked out and held in front of our nose so we could smell it and re-affirm the owner's belief that it does indeed smell good. There was a lotion he made that in a few minutes removed all hair with no pain at all. He had different kinds of lotions for different skin problems, and even other medical problems. The guy claimed to have studied from Colombo University. It was fascinating to hear about the Ayurvedic solutions to different problems modern medicine struggles with. At the end of his tour, the owner offered a massage (which I declined politely) and a brochure detailing all the products they sell. We left the garden and headed towards the Elephant Orphanage.

The Pinnawala Elephant Orphanage does not accept USD, but luckily there's an exchange close by. There's a nice souvenir shop just at the entrance. We forgot our selfie stick there and thankfully the nice people at the shop had kept it safe when we went back to get it after about an hour after we left. The Elephant Orphanage is a nice place with lots of elephants and information boards everywhere about different things related to elephants. We left there happy and headed to a place for lunch (after which as stated earlier we went again to the orphanage to get our selfie stick). For lunch, we ordered **[String hoppers](https://en.wikipedia.org/wiki/Idiyappam)** and Sri Lankan fried rice I think, along with fruit juice.

We went back to Kandy through the same tuk-tuk and witnessed the scammy tuktuk culture we had read about. We had never asked that same tuk-tuk driver to wait, in fact, we booked another tuk-tuk, yet the same guy had picked us up, later charging us for waiting time as well. We got off the tuk-tuk near the **[Kandy Lake](https://en.wikipedia.org/wiki/Kandy_Lake)** and walked around there. Often some random guy would come to us and try to act as a guide trying to take us to one place or another. We deftly avoided these kind of people and enjoyed the Kandy Lake view for a while, and then walked towards the [Temple of the Sacred Tooth Relic](https://en.wikipedia.org/wiki/Temple_of_the_Tooth). We had unfortunately reached Kandy a little late and missed the cultural dance show at Kandy Lake Club.

**The Temple of the Sacred Tooth Relic** is said to be housing the relic of the tooth of the Buddha. We reached here at 6:30PM for the ceremony. A lot of tourists were at this place. We went barefooted inside the temple. At the entrance, saw the moonstone (a random guide told some tourists), and moved ahead inside where a Buddha idol stood within the sanctum. In front of the sanctum were three drummers half naked ready to start the ceremony. They stood within a square area surrounded by ropes around which all the visitors stood and watched the performance. The drummers started their energetic music and more people gathered around them. Meanwhile there were a few people standing on the stairs at the corner of the hall. They carried a bowl of white flowers or flower petals. People watching the drummers moved towards the stairs after a while and went up, I watched the drummers for a while and tried to get the feel of the place and then eventually moved upstairs too. The upper floor was very crowded. There were two separate queues separated by a rope. The inner queue that was closer to the wall was less congested and seemed to be moving freely, while the outside queue was very crowded and one could smell the sweat around. I backed off from the queue and moved away from it towards the other end of the hall where I could breathe properly and watched the queue move along. There was another sanctum here and I think the relic was here too. A set of stairs went down from this room. There were a few idols there and the exit. We moved around the temple for a while, and eventually left the place after taking a few photos.

The next morning we woke up early and visited the **[Kandy View Point](https://g.co/kgs/Vv1J7qc)**. We watched the city of Kandy and waited to see the sunrise though it was still bright we wanted to see the sun come up (later we realised that's a sunset point and the sun would be at the opposite direction). Most of the houses there seemed to have sloping roofs, while there were a few structures which had a terrace. We saw a house at the top of which there was a basketball court and a person was practicing there missing shots continuously. The Kandy Lake was fully visible from here, and it seemed much smaller than we previously thought. There's also a big buddha statue in Kandy, but it was far away from the view point. A few monkeys visited us, and we observed them as they observed us. After a while, we walked down and found a marketplace where we spent some time and eventually went back to the hotel.

We checked out from the hotel and headed towards Nuwara Eliya in a taxi. We stopped for lunch at [Queen's Hotel](https://en.wikipedia.org/wiki/Queen%27s_Hotel,_Kandy) in Kandy where I tried Chicken **[Kottu](https://en.wikipedia.org/wiki/Kottu)**. It started raining while we were finding a place for lunch, and continued raining the whole journey to Nuwara Eliya.


#### Nuwara Eliya

Nuwara Eliya is in the central highlands of Sri Lanka. We moved up the hills through it's zigzag roads and I felt lightheaded for a while. I barfed at the side of the road and felt fine the rest of the way. We stopped at **[Ramboda falls](https://g.co/kgs/2SK1VY5)** and watched the majestic waterfall. It was diluted due to the rain, yet it was nice to see it. Next, we stopped at [Bluefield Tea Factory](https://g.co/kgs/LPRUJV4) where a guide told us about the whole process of how they make tea from the start to the end and showed us some very old machines that are still in use there. The guide was quite informative and we asked more questions along the way. We were offered free tea which we happily drank as the cold creeped in. The rain too hadn't stopped.

We reached a little late at Nuwara Eliya - maybe around 7pm - where we were welcomed by Asela the owner of the place we stayed at called [Shirin1892](https://g.co/kgs/9c5cQPa). Shirin1892, located at the end of Shirin Road, is apparently listed as a heritage site. At it's entrance is a [Ganesh](https://en.wikipedia.org/wiki/Ganesha) idol gifted to the owner by some old guest. The owner Asela was a jolly friendly guy. He told us about the history of the place and gave us some coffee as we sat in his living room. Shirin1892 is named after a horse that was owned by the initial owner of the place. Asela's family came into possession of it in around 2000s I think and Asela lives here with his family while letting guests stay too. It's of Old British architecture and is supposed to stay like that. It gave a nice vibe to the place. In the living room, there were a few books kept around including a book on traveling in Sri Lanka, inside it was a letter to Asela from the person who stayed there for a while and enjoyed the stay and thus gifted this book.

We washed up and went straight to sleep. The first night it felt cold, so the warm blankets helped. The next day we went to Seetha Aman temple. The weather was perfect. No rain, and a little cold. We went to the **[Seetha Amman temple](https://en.wikipedia.org/wiki/Seetha_Amman_Temple)** where Sita from Ramayana was supposed to be held in Ashoka Vatika. The temple was nice. A lot of idols. The fee was very low and the people and staff there seemed nice too. There's a footprint marked there which is supposed to be the footprint of Hanuman created when he visited Sita. We spent some time there, then walked around and went to Hakgala Botanical garden but we didn't enter it. We went back to Seetha Amman temple and had some free food that they serve everyday at 12PM. The food was good - it was rice and drumstick curry. We washed our own utensils and kept it back. There's a souvenir shop in front of Seetha Amman but it's nothing special.

Next, we got a tuk-tuk to go to **[Moon plains](https://g.co/kgs/pNX8eba)**, one of my favourite places on the whole trip. The fee there for an adult was 1800LKR and if you want a jeep then the cost for jeep is 5000LKR, but since you aren't allowed entry without jeep, you need to pay 1800LKR + 5000LKR anyway. They don't accept USD either, so one must pay with LKR.

The jeep ride was very bumpy. We moved up the hills around twisted roads and watched beautiful scenery along the way. The jeep driver saw a peacock and immediately stopped the jeep so we could watch it and listen to it - it kinda sounds like a cat. The peacock jumped up a tree and went away. We were happy seeing a Sri Lankan peacock jump and kept going ahead up the hills. There's supposed to be potato farms here, and there were fences everywhere so random animals don't get in. We reached the top of the Moon Plains to see the breathtaking view. The clouds went through mountains, all the tiny houses, and nature in it's full glory. The air here was fresh and free of any pollution. We spent some time here just chilling. We sat in the open grass and looked at tiny houses far away. Next to us there was also the Hakgala mountain - the famous Sanjeevani Mountain that Hanumana is supposed to have lifted and brought to Sri Lanka to save Ram's brother Laxman. We came down from Moon Plains again via jeep. And again we saw and heard a peacock and the jeep driver kindly stopped the jeep so we could watch it for longer. We left the Moon Plains to head towards **[Gregory Lake](https://en.wikipedia.org/wiki/Lake_Gregory_(Nuwara_Eliya))**.

Gregory Lake is a wonderful place. There are boats everywhere. The atmosphere and the vibe is lively, as families and friends gather to enjoy the scenic beauty and participate in water sports. We went on a speed boat first wearing thick life jackets. The speed boat driver drove us around the lake twice. We enjoyed the ride and the scenic beauty of the place. After this, we tried out the motor boat, and sailed around for about 40-50 minutes and thoroughly enjoyed Gregory lake.

As evening approached, it started to get colder, we went towards the city center for some shopping, and then dinner at [Ambaal's](https://g.co/kgs/2kTRmoV). Asela very kindly picked us up from the restaurant and took us back to Shirin1892. He also set up the fireplace where we warmed up for a while.

Next morning, we checked out and took a taxi to go to Bentota.

The **[Nuwara Eliya post office](https://en.wikipedia.org/wiki/Nuwara_Eliya_Post_Office)** is one of the oldest post offices in Sri Lanka. When we reached there it was closed and we were about to give up and continue our journey but someone opened the door of the post office right on time, and so we went in and explored it. I got a Sri Lankan post card from there.

We visited **[Lover's Leap Waterfall](https://g.co/kgs/3XmjSAN)**. It's a 15 minute climb up a steep path. The taxi was parked at the bottom and we climbed our way up through the stone steps and reached the top exhausted to see the waterfall. On the way, there we saw a couple who reassured us that this is the Lover's Leap Falls, and we're close to the top. Given the exhaustion, it did feel nice to finally see the waterfall, though it's a bit smaller than Ramboda Falls. We relaxed there for a while and then went back to our taxi.

After that we visited a Shiv temple and one more temple. There were a lot of hindu idols all over the place.

The way down was long. We stopped at a place to just stretch our legs and fed some oriental fish and watched em fight for food in a small pond.

The views on the way down were fantastic - we missed those on the way up since it was mostly dark then.

#### Bentota

Nuwara Eliya to Bentota is like a 5 hour ride. We had some lunch on the way. Had some King Coconut water too.

We reached our stay [Wimala B&B](https://g.co/kgs/apu5aiD) after it was dark. The old lady there who's the owner guided us to her home. We talked to her for a while and she very kindly offered us some garlic tea, and then arranged a river safari for us.

Next morning, Wimala's son drove us in a tuk-tuk to a place where his boat waited with a boat driver. Didn't get his name, but the boat driver was a fun and kind person. He drove the motor boat for the river safari. There were no life jackets this time, we just sat on his boat and he took us through the **Madu River** in Bentota and pointed out random animals or birds he spotted. It was a nice experience and it felt calm going on the boat so early in the morning and looking at random birds. We saw fruitbats hanging upside down probably smelling fruit (dunno for sure they were far away). Baby kingfishers were beautiful and cute. And black monkeys seemed to be one of the popular spots of the river safari. There were lots of Water Monitors (probably `Varaan` in Sri Lankan) lurking around too. Heron's like in Nuwara Eliya were seen quite often just minding their own business. The driver also informed us about various establishments along the river.

The driver was very kind, and frequently asked us whether we are happy with the safari. He said that sometimes though it's rare but crocodiles can be seen in the river, and we said that we would be happy if we see a crocodile. Luckily, we succeeded and the driver showed us two crocodiles, and along the way he excitedly told other boat drivers where to go to see the crocodiles (probably `Kibula` in Sri Lankan language).

We checked out from Wimala's place, and headed towards the road to go to Colombo.

We stopped at **[Moragalla Beach](https://maps.app.goo.gl/pXyvjryqUXtrLP1Q8)** and spent some time there. Beaches are awesome.

Next, we continued towards Colombo. Stopped at a place for a lunch. Stopped at a place just to stretch our legs. And finally reached Colombo our last stop.

#### Colombo

We went to a Buddhist meditation centre. It was filled with pictures of the Buddha and stories along with it.

We stopped at **[Galle Face Green](https://en.wikipedia.org/wiki/Galle_Face_Green)**. It's so beautiful and mesmerizing. The atmosphere is pleasant. People are minding their own business and having a good time.

We chilled around over there and decided to watch the sunset here, though there was still some time left for sunset, so we went to see the **[Lotus Tower](https://en.wikipedia.org/wiki/Lotus_Tower)**. It's a big tower shaped like a lotus. I don't think it blooms though. The lotus part is actually pink and glows in the evening. We chilled out there for a while, and there was a burger place behind the tower where we enjoyed some Sri Lankan rock that was playing on their speaker.

We went back to Galle Face Green, and sat at the edge and watched waves waiting for the sun to go down. The sun was orange and the weather seemed perfect. It was a beautiful sunset.

After Galle Face Green, we went to **[Gangaramaya Temple](https://en.wikipedia.org/wiki/Gangaramaya_Temple)**. It's a big temple with soooo many varieties of Buddha statues. I was baffled by the variety and enjoyed looking at each piece in detail. There was a super small buddha statue - smaller than a fingernail! - filled with details, we were able to look at it through a magnifying glass. There were also large statues of buddha and other dieties everywhere at the temple. There were also rooms in the temple displaying all of the stuff that was donated over the years. There were a lot of antics too. Many statues at this temple were surrounded by huge elephant tusks - same was the case for the Temple of Sacred Tooth Relic too. It was a majestic temple and truly made me appreciate the dedication to art people have.

We reached our stay [Green Olive Villa](https://g.co/kgs/u6Q4i8w) late in the evening after shopping in Colombo. The owner helped us out, we quickly made our payments to the taxi driver as well as our stay since we were checking out at night itself for our flight back. Green Olive Villa provided airport drop facility. We only slept a little there. They had a large jeep which they used to drop us sleep-deprived guests to the Bandaranaike airport.

#### Back to Pune

Our flight to Chennai from Sri Lanka was mostly uneventful. There was some turbulence due to bad weather conditions, yet we still reached Chennai much earlier than expected.

I again roamed around the very familiar Chennai Airport waiting for the next flight at 9:40AM. Had breakfast there - idli + sambar. The flight was delayed for about 15 minutes. We boarded the plane yet it took a while for it to take off due to bad weather. And the flight too was rough and we faced a lot of turbulence. And that was the end of the journey, we reached Pune safely.

### End - adding anyting I might've missed above

Sri Lanka is a culturally rich country. During taxi and tuk-tuk rides we often saw groups of people celebrating some festival or dancing together. 

They also seemed to follow traffic rules well. And the school kids looked obedient as they held each other's hands in their Temple of Sacred Tooth visit, or the Lotus tower visit. They also always seemed to walk outside the white lines that mark roads. Cars and bikes immediately slowed down before zebra crossings, and people crossed the roads through zebra crossing without looking. Seat belts were compulsory in four wheelers, and helmets on two wheelers. It seems to be a good country for pedestrians.

King Coconut is a coconut native to Sri Lanka. It tastes so good. We also tried other Sri Lanka native fruits, and would've loved to try more.

Though, we had a bad experience in Kandy with one tuk-tuk driver, many of them were also good and honest. Tuk-tuk's are a nice way to move around the city - one can even rent a tuk-tuk in Sri Lanka. Also, haggle culture is strong here it seems. We did have to haggle a lot from tuk-tuks to markets everywhere, but the shopkeepers there sometimes are very persistent in making the sale. One shopkeeper even called us while we were moving around multiple times with a lower price, till finally we were satisfied with the price.

There were times when I was being mistaken for being Sri Lankan. It was funny, but now that I think about it, maybe learning some Sinhalese and Tamilian would've helped a lot. Would've at least helped with knowing the authentic prices of things :P

Overall, it was a fun experience. I loved Nuwara Eliya, Bentota, Kandy and Colombo, and the travel in between. If I go again, I would try out the famous Nuwara Eliya to Ella train ride, visit Sigiriya, visit more places in the city that we missed, try out more exotic food and Sri Lankan street food, and spend more time on the beach.

### Conclusion

As I look back on my trip to Sri Lanka, I am struck by the incredible variety this small island nation offers. From the misty highlands of Nuwara Eliya to the serene beaches of Bentota, and the bustling streets of Kandy and Colombo, every place left a unique imprint on my mind. What stood out the most was the warmth and friendliness of the Sri Lankan people, whether it was the tuk-tuk drivers sharing political insights, Asela's heartfelt hospitality at Shirin1892, or the kind shopkeepers who safeguarded our belongings.

The journey also offered a chance to step away from the pace of everyday life, giving me time to connect with nature, history, and spirituality. The calm of Gregory Lake, the mythological ties of Seetha Amman Temple, and the breathtaking vistas of Moon Plains served as a reminder of the beauty that exists in simplicity.

There were moments of discomfort too—like the winding roads of Nuwara Eliya or the occasional scams—but they added to the authenticity of the experience. Travel, after all, is about embracing the unexpected and learning from it.

Sri Lanka taught me to appreciate the interconnectedness of culture, nature, and history. It reaffirmed the importance of stepping out of our comfort zones to explore new places, interact with diverse people, and soak in stories that shape a place and its people.

As I return to the rhythm of daily life, the memories of this trip inspire me to travel more, immerse myself in new cultures, and perhaps even embrace the occasional bumpy road. The world has so much to offer, and this journey was just a beautiful beginning.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[The exit]]></title>
        <id>https://maheshbansod.com/blog/the-exit</id>
        <link href="https://maheshbansod.com/blog/the-exit"/>
        <updated>2023-12-10T09:53:28.608Z</updated>
        <summary type="html"><![CDATA[It was orange, green, red, and brown. Walking down a path with my girlfriend, arm around her shoulder, we chatted about the most random things. 

It was a good day. It started when I got out of my bunk bed and jumped into the brown world. A mountain of stress crept in as the reality sunk in. I was stuck in my room. The noise outside terrified me and my roommates, soaked by water leaking through somewhere I had no idea.
]]></summary>
        <content type="html"><![CDATA[It was orange, green, red, and brown. Walking down a path with my girlfriend, arm around her shoulder, we chatted about the most random things. 

It was a good day. It started when I got out of my bunk bed and jumped into the brown world. A mountain of stress crept in as the reality sunk in. I was stuck in my room. The noise outside terrified me and my roommates, soaked by water leaking through somewhere I had no idea.
<!-- more -->
Nervously waiting, I kept checking my phone. I wanted to live; I was sure this moment would pass. I'd soon be safe and asleep again. I didn't really know how. Looking at the phone again, still no notifications. "Shit," I thought, "I can't die here. I won't die here." Calculating my chances, I decided if I stay here, there's a higher possibility to stay alive, as someone might help. Going out there, someone might spot me, and that's an instant loss. So the best solution was to stay put and wait for help.

And somehow with my brain at full throttle, I decided it's no use waiting anymore; it's time to head out. I got up, started sweating even more, increasing my contribution to the already half-full pool we were drowning in, and headed towards the door when suddenly my phone vibrated.

Hesitating to check it, "I've already made the decision to go out!" I thought. "I'd hate changing that now." Ignoring the phone more determinedly, I walked across the room. I was going to get out now. I don't care if I die; I mean, I don't want to. But I'm not waiting anymore. I'm so done. I was going to get out of there no matter what when suddenly the water around us started to turn red from its previously muddy color.

I stopped. The water near the door got bloodier, the red spreading slowly. I couldn't move forward anymore, no matter how politely I asked myself. My feet just wouldn't move. My body started aching violently, and my vision started getting blurry. "What's even happening here?" I asked myself, dreading to come up with an answer. Looking at my phone out of habit, I read the notification.

"I have a book for you. Pick it up today."

What book? The message was from a close friend of mine. Rather a former close friend. I grew up with the guy and went to school with him. We did used to read a lot of books together. Is he recommending a book to me?

It wasn't weird for him to recommend a book, or it wouldn't be if we hadn't lost contact since a few years now. We used to read similar books growing up, so he did know the kind I liked. We had a similar sense of humour, and I was hoping it's a funny book, but why? Even more confused and even more sweaty, I touched the notification and dragged it down to reveal more messages.

"I have a book for you. Pick it up today."

"Open the door. We're here."

"Get unlimited SMS and data for 784 days with our new family..."

---

It was orange now. I was safe. I was outside a room. It was warm. I was in a building. I walked ahead and knocked on the door - the only one that existed there. Moments later, the cutest girl appeared with her sweetest smile and said, "I was waiting for you."

"I was waiting for you," I replied.

"But you just came here right?"

"Uh, yeah, I mean, I was waiting for you to open the door," I said awkwardly.

She ignored the awkwardness and just walked down the stairs that I didn't know existed a while ago. I followed her down and we walked out of the building.

The world was orange, green, red and brown. She was wearing a plain beige shirt and a blue bag on her back. We walked side by side, her head just barely above my shoulder. She smiled often, and we talked about our lives. I told her it's going good. I told her I missed her. She called me a liar jokingly like she always did and lightly pushed herself into me. I held her closer and we continued walking and reminiscing about the past. It was a good day.

The buildings around us were orange and beige, each with a parking space with a few motorcycles and cars. There was a smal park close by with a hint of yellow somewhere. As we continued walking, I saw a familiar face.
I was shocked for a second. 

"Hey!" I said as I recognised him.

"Oh, hey, man" he looked at me like he had no idea who I was.

"Hey, you said you were giving me a book?" I asked him, recalling his text earlier today.

"I don't know what you're talking about"

"What?" What? Didn't he say he was going to give me a book.

"You texted me today. The book. I'm here." I said. "Just give me the book."

"I don't know what you're talking about." He repeated.

"What was your text about then?"

"I'm sorry I don't know who you are. I gotta go." He said and started walking away.

I jumped like my heart did, and went and grabbed his collar.

"Hey, what the fuck?" I shouted at him. My head felt heavier and I coudn't breathe. He tried to push me away but I held on tighter. "You said you're giving me a book."

"I don't know who you are," he pushed me away successfully this time, shouting profanities while a random crowd gathered around us.

"It's me, I know you." I said in a low voice.

"We don't know you." A random girl in the crowd retorted.

What's happening? Is this some weird prank? I didn't really know what to think. I looked at my girlfriend.

She smiled at me. Her eyes betrayed an aura of sadness. I knew what was going to happen next, but I willed her to stay.

"I'm sorry," she said and left. None of my mental strength brought her back.

The random girl from the crowd came forward to assert once more, "we don't know who you are."

I made a finger gun and pointed at her, "I'm going to shoot you."

"That's not a real gun." You're not a real gun. Shut up!

"I'm shooting you," I said, mimicking gunshots. Her blank stare barely affected my demeanour

"It is not a real gun."

"I'm shooting you!" I screamed.

---

I woke up sweating profusely among my roommates lying face down in a pool of muddy brown water leaking from who knows where. The noise outside still deafening and inviting, I got out of the bunk bed and opened the door.

It was a good day. The outside was red.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[On Emotions]]></title>
        <id>https://maheshbansod.com/blog/thoughts-on-some-emotions-2025</id>
        <link href="https://maheshbansod.com/blog/thoughts-on-some-emotions-2025"/>
        <updated>2025-04-19T15:14:01.285Z</updated>
        <summary type="html"><![CDATA[It's been a while since I've started feeling. I'm not sure when it 
started. Probably around when I was 1-3 years old? Who knows! 

Anyway, with my experience of about 27 years, I present to you my
thoughts on some emotions I've experienced while living and feeling
as a person sorted in no particular order.

Feel free to tell me about your own experience with emotions. I love
being human and understanding how others experience this world.

]]></summary>
        <content type="html"><![CDATA[It's been a while since I've started feeling. I'm not sure when it 
started. Probably around when I was 1-3 years old? Who knows! 

Anyway, with my experience of about 27 years, I present to you my
thoughts on some emotions I've experienced while living and feeling
as a person sorted in no particular order.

Feel free to tell me about your own experience with emotions. I love
being human and understanding how others experience this world.

<!-- more -->

## My emotions

### Anger

I like anger since it lets me understand what I care about more 
clearly. It gives me a good perspective of what I'm craving and
also gives me an opportunity to rethink what I'm doing and see if
I should be taking another direction. Like all things, excessive 
anger is bad and is super embarassing afterwards, so avoid it if you
can but when you do feel some genuine anger, then appreciate it
and feel the moment - I think this is what I think about almost every 
emotion to be honest. Give emotions a chance and see how well it helps
you understand yourself. Also, it can be fun to overanalyze yourself too.

When you're angry do you grind your teeth? Do your ears feel a little 
hot? Eyes about to pop out? And what's with the violent tendencies! that's so weird!

Having felt anger multiple times in my life, after reflecting on it,
I've always found it funny and a little embarassing that it evokes a
violent reaction too. Like there is an urge to just throw something on 
the ground and watch it break. Like why even??

### Frustration

I don't like it. Frustration causes anger but I like anger but not
frustration at all. Why? cuz it's frustrating. It feels like a loss
of control. I don't like frustration. Wouldn't recommend. 1/10.

It does feel nice sometimes but for a really small amount of time.
Prolonged sessions of frustrations are incredibly annoying.

It does not bring joy.

### Happiness

It's good till it's not. It can be sus but just feel it and don't cling to it.

There's more to life than just being happy. You have a lot to do. Don't
waste your potential over something so small. Happiness should just be a side-effect 
and not a focus. Keep it like an afterthought and ignore it when you can.

On the contrary, do bring about happines in people you care about. Why, you ask?
cuz you care about them.

Happiness can be pleasant but making others happy is even better.

So, despite the fact that it can be nice, do not chase it. You don't really need it.
It's okay. Stay vigilant. We got this.

### Sadness

It is (or at least used to be) one of my favourites. Sadness is 
related to anger in some way, because it evokes similar feelings but 
anger is just a little pointy I guess.

Being sad also gives me more perspective on what I care about and I 
like it. Sadness is not only an indicator but also a good "refresh".
By that I mean the Refresh in "Windows XP" or a version of Windows
where you could right click on the desktop and click on "Refresh" (or
press F5) and feel better. Excpet it's not that quick.

#### Tears or no?

I believe tears completely let go of the sadness, so let out the tears!
That's like free therapy.

It's an emotion and it can feel satisfying in a weird way. Do not chase it
either, but do not avoid it when it comes. Sadness is important and underrated.
Feel it fully. It's not every day you get to be human.

### Fear

No. or yes. I don't know about this one. There are certain things that
I fear extremely and I don't want to let the feeling of fear take over.

But there are also other times when fear feels good because it makes me
feel more energetic. It gives a little adrenalin boost which is quite 
nice.

So, overall, maybe 5/10.


### Disgust

No. But I like to understand what people are disgusted about. Thinking 
about these things from a third person perspective makes it really funny.
because it makes us realise that everything is so human and humans are cute.

I don't like the feeling of disgust, because it can sometimes evoke a
physical reactions which can be really bad and humiliating besides the 
desire of erasing my memory or something.

### Surprise

I like it. But really depends on the situation. Also, only good surprises.
I am not a fan of being surprised just for the sake of it. I mean
sure I acknowledge that the world is unpredictable but you don't have
to shove it against my face. So I guess I do not like surpises after all.
(unless you're planning to gift me something nice - then please go ahead)

### Love

It's really good. One of my favourites for sure. It's a top tier emotion.
It also feeds into itself. Loving increases love. Practicing this mindfully
is a real game-changer.

The downside is that it can set you up to a big punch of sadness. But what's
life without the risk. Embrace love and keep moving forward.

I'm a lucky person to be born in this world and I'm even more lucky to be loved.

To be loved is something not in our control, but to love is, and this verb creates
the emotion itself. Don't wait for it to happen to you. Deeply value everything.
Let's live this life.

### Guilt

It can assure you that you do have some kind of moral compass. I'm not that
much of a fan. I recommend preventing guilt by not doing things you'd ever be
guilty about. But if you do feel this feeling, then I'd recommend understanding
yourself and fixing the source of the guilt instead of avoiding the feeling.
Otherwise, it sucks. Cuz what are you without your values?

And what if you can't fix the source of the feeling? after all, one can't unmuder someone.
You need to really evaluate your values and willingly pay the price.
It's important to define what is you, and then be you unapologetically.

### Pride

Pride is good as long as it doesn't devolve into something ugly. Pride in yourself
and others will make you secure about your position in the world.

7/10

I think people often mistake pride with ego. And think one is good and the other
bad. Or both bad. But folks, I'm here to tell you that both are good. Do not
diminish your ego. because that is you. Respect yourself a little. Put all your
energy into becoming what you imagine yourself to be. There is a lot stopping you,
but that's upto you to either manage your expectations or go through with it and
overcome all the obstacles in your way. Anyway, if this isn't your thing, if what
I'm saying doesn't resonate with you, I'd at least suggest starting with prioritizing
yourself over others maybe. Or just standing up for yourself when you feel someone
with a healthy self-esteem would.

One of the secrets of being happy is to care about yourself and develop yourself to
the point you're prideful about something. At a level, you might feel arrogant too
but if you keep developing yourself, the arrogance turns out to just be a phase you 
have moved on from to see a world full of people like you. And that makes you happy
and more excited to face the world.

### Envy or Jealousy

I do not like feeling it. And I usually don't envy cuz who cares. but when I do I 
prefer to understand the source and create a goal. Envy towards someone makes 
me feel that I'm lesser than them when I know I'm not. Envy happens when people
of your own level move ahead and you're left behind. Sure, you can justify it to 
yourself that they had better circumstances or you had worse, but the situation 
is that they are at a better place than you are, and reframing the situation in 
your mind is not going to change that.

So, to deal with envy, my solution is to create a goal that puts you ahead of the 
person you envy. Now the next thing is whether you're motivated enough to follow 
through and accomplish the goal - if you're not, then well you know that you don't 
really care about it anyway. If you do have the motivation and did try and then fail,
then just accept that you don't deserve accomplishing that since you do not have the 
skills to do so regardless of whether the person you envy had the skills or not.
So, keep trying and work hard till you reach where you want to if you care enough.

Do not blame luck for your incompetence. Be hard on yourself and lenient on others.

But more importantly, live your own life.

<aside>
Sidenote: while writing this article, I realised I don't know the difference between
envy and jealousy and it seems I'm using the word envy above to mean both.

Here's the difference if you're like me and didn't know it:

> Envy is when you lack something and want it (two people involved).
> Jealousy is when you're afraid of losing something you already have to 
> someone else (three people involved).

And with this information in mind, I realise I'm not that much into jealousy. I'm
not afraid of losing anything. I don't really have anything to lose.
</aside>

### Hope

Y'all know I like hope. I'm a crazy optimist. I'm a dreamer. I get high on hope.

Despite the odds, I never stop hoping for things to improve. And I believe that's
one of the defining points of my character. Hope brings me happiness, it gives me
comfort and encouragement.

"Meet the Robinsons", one of my favourite movies despite all the logical flaws in it,
has this line "Keep moving forward" which is their family motto. It represents hope.
The main character despite all the set backs just needs to keep moving forward.
In the movie, the kid would after the end of it know what his future is like and it's
easy for him to keep moving forward cuz he knows he's gonna be happy anyway.  
Most people though do not have the privilege of time traveling to the future and looking
at their future self to be assured that whatever they're doing would have some benefit.

We don't know what's gonna happen. [We can put in all our effort. Make plans and backup 
plans but there is never a guarantee that what you want is gonna happen](/blog/random-thoughts-2). Despite that, 
you need to keep working towards your dream. You need to hope that what you're doing
matters, that you're building the future.

Without hope, life loses it's meaning. A meaningless life is meaningful too. But it has
what I'm gonna call "implicit hope" (I'll probable explain in some other blog article idk). 
Which is not a bad thing, my point is that it's still hope. So, no matter what. Do not 
lose that hope. Keep moving foward. We'll get there.

### Anxiety

It's a beautiful feeling. It has a romance to it. I think anxeity lets you live.

Do you think anxeity and fear are the same thing? And please forgive me if I misspell 
anxiety too. I'm really bad at spelling sometimes. Maybe even worse at emotions. But
I'm gonna do my best (or not). Being anxious creeps you out, keeps you on edge, makes
you forget what really matters at the end of the day. Anxiety is sadness and panic and 
feeling your heart beat fast and loud. Anxiety is the world vibrating and you don't know what to 
do with it. I like anxiety from a distance. After I've moved ahead from it, it is a feeling
that I consider nice. And during it, it is difficult to think about feelings. "This sucks"
is something I'd imagine myself to feel. Reframing it to excitement could help if that's even
possible. The problem is that excitement doesn't have the same connotations as anxiety. 

That's also a reason why I prefer anxeity over excitement. Excitement just doesn't hit the 
same way.

I believe one should go through it. Feel it. Understand it. And then slowly and eventually
in healthy ways try to get rid of it if you can. I'm sorry if you can't. I hope you find
ways to deal with it somehow anyway.

### Awe

> a feeling of reverential respect mixed with fear or wonder. It can be triggered by nature, art, 
> human achievements, or even abstract concepts

I'm always in awe about all the things around me. If I describe all of it, it's probably super annoying. cuz
it's not even like something complex like a computer (which is ridiculously crazy to think about) but also
just even the fact that I'm living on the second floor! Like what?? How even? all my furniture is here and 
the floor can handle all that without breaking down. I'm literally in the sky!

I am very interested in human progress and I look forward to a lot more ambitious projects we're upto.

I've always wished I could contribute towards it and I dream that maybe I will as a lot of people do!

I love the feeling of awe. I love the media or inventions that brings about that feeling. I want to feel
this way more often. Good job, humanity.

Stay strong.

### Contentment

What is a life? And what is a life worth living? I don't know. I'd love to find out. 
I like my life. It's not perfect. But, you know, it's not bad. And so me saying that 
despite all the bad things in life I'm content with it would be ridiculous. I don't
have a bad life. Nor do I have a great life. Nor have I achieved all the dreams I have.
There are lots of things I've done wrong in my life and lots of things I've thought I should
have done better or others should have done better. There's no end to these things. I 
believe despite all of the "incompleteness" it's possible to be content about life.

By "incompleteness", I mean your desires or regrets or whatever keeps one traditionally from 
feeling content in their life.

You can lose everything and still be content. You can have dreams to gain everything you've lost
and you can still be content.

In the model that I have, every emotion is compatible with contentment. I think this
comes by detaching your life from "you". An analogy that can help is imagining you are playing
a video game, and all the challenges or hardships or wrong decisions are done by the player
you're controlling. You can of course be mad and throw the controller and break the TV.
But. you know. it's just a game. Sure, feel angry a little when your character is losing.
Re-think your decisions when you feel you've missed out on something. But despite all that,
it's YOUR character. Just control it and let it do weird things and see how it goes.

You're playing this game and of course the objectives do matter (since you set those yourself), but
you can still enjoy the game, appreciate the texture on the flower things and applaud the animation 
from time to time. You can hang around and complete side quests, you can just ignore all the quests 
and chill with your buddies or something. You can even change the objectives completely if you want!
It's upto you, isn' it?

You are controlling your character. You are not the character. I do have goals and desires but they're
something that don't disrupt my contentment. The desires complement my character, make it complete and 
make the game more fun to play!  
And no it doesn't mean you live your life less fully by detaching from the character but the opposite in fact - it 
gives you awareness, it gives you the agency and a sense of responsibility by highlighting the obvious fact
we often overlook: you're the only who can change your life and you can do it by making your character
doing the things that can help bring about the change.

I think that contentment is something people should experience. It's nice. It's chill. You don't 
have to figure everything out to reach here.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Unlearning habits and saying bleh to intrusive thoughts]]></title>
        <id>https://maheshbansod.com/blog/unlearning-habits-and-intrusive-thoughts</id>
        <link href="https://maheshbansod.com/blog/unlearning-habits-and-intrusive-thoughts"/>
        <updated>2023-12-17T08:44:54.507Z</updated>
        <summary type="html"><![CDATA[Being a human, you gotta do what humans do. You walk, you eat, you communicate. Human stuff.  
You're walking down a street and notice a dog, it's cute. You want to say hi to it, and so you move towards it. It moves towards you. You're both moving towards each other but wait.  
why is the dog barking? why does it look angry? what did I do wrong?  
The dog comes at you faster giving you lesser time to process. The dog knows batman is invincible with prep time, so it removes the prep time.
]]></summary>
        <content type="html"><![CDATA[Being a human, you gotta do what humans do. You walk, you eat, you communicate. Human stuff.  
You're walking down a street and notice a dog, it's cute. You want to say hi to it, and so you move towards it. It moves towards you. You're both moving towards each other but wait.  
why is the dog barking? why does it look angry? what did I do wrong?  
The dog comes at you faster giving you lesser time to process. The dog knows batman is invincible with prep time, so it removes the prep time.
<!-- more -->
You have been bitten by the dog. So next time you're walking to the same destination, you avoid that street with the miserable dog. You don't want to go there anymore. You don't want to be bitten. And that's okay. No one's judging you for your fear of dogs. Maybe. It doesn't matter who's judging you. Your fear is real. It's valid. You are valid. You don't have to go down that street again if you don't want to.  
But let's say you have to. For giggles. In a hypothetical situation where there is only one way to go where you need to and that way involves meeting the dog who bit you, what would it take for you to go there?  
Probably a weapon? No, you are not doing that anymore, you've left that life behind. You need to go there no matter what though.  
You go down that same street and oh look the dog is on a leash this time. I'm safe right?
right?  
the dog growls at you and you growl back.  

Past trauma **usually** encourages behaviors that would avoid the trauma or anything related to it. A person with a bad experience with a dog for the first time would avoid dogs in the future. This is, in general, a good approach to life. It's a safe approach. Nothing can hurt you, and when something good happens, you are encouraged to repeat that action again, so more good would happen. It's a nice strategy. It's a simple strategy. Some would call it a [Tit for Tat strategy](https://en.wikipedia.org/wiki/Tit_for_tat#Game_theory) in the context of game theory. It's the best strategy for finite games you could employ.The game you're a part of though is infinite. Here, the tit for tat strategy is alright but there's more to these things when there are multiple turns and multiple players involved. I'd highly recommending checking out this interactive webapp that illustrates [the evolution of trust](https://ncase.me/trust/).

Often times, simple strategies or even complex ones can form life-long habits. A positive experience when you're performing the habit combined with a negative one when you aren't performing it makes it even stronger. This has been a good development for us as have been most developments, but as with most developments, if it's not in our control, it could control you instead.

What to do about it, you ask. How can I get rid of all my bad habits? How can I change myself to be a better person?

Well, I don't know. Figure it out yourself!.. Kidding! that's what this article is about. Or is it? Yes it is. But I don't know. These are as always some thoughts of a serial rambler. Be skeptical. I believe intrusive thoughts are similar to habits and what I say about habits can be applied to any kind of intrusive thoughts as well. Though, I understand that the formation of intrusive thoughts and habits may be entirely different, both share their behavious in some ways.

{% aside() %}
We are a culmination of our past, and that's what makes us so... us. You are you because you're made out of your story. Without your story, your habits don't exist, but the (other) parts of you that the story forms don't exist either. It's necessary to look for a solution that involves forming new stories that overcome the old one instead of erasing old stories directly which makes it very likely for unintended erasure of you.
{% end %}
#### the trigger
Every habit has a trigger. If your usual commute involves walking by a cigarette shop, you are more likely to buy that cigarette (assuming smoking is the bad habit we're talking about). The trigger here could be just looking at the shop. It could also multiple triggers - the time of the day, the smell near the shop, the people's faces you frequently see there, etc. These triggers trigger the urge in you to perform your habit.  
The easiest way to get rid of a habit is to get rid of the trigger first. In the situation I outlined above, you must change your path. Try some other way to go to your destination.  
Yes, removing the trigger always requires some change in your routine or lifestyle to some degree. The change could be small for some, for example, flipping a photograph, or big for others, like moving to a different city.  
(if the reader has complaints about putting in effort to make change in their life, i'd urge the reader to please grow up already.)  
It is however often the case that removing the triggers completely is not possible at all. For instance, moving to a different city may not be a feasible option for removing a habit. Often, ignoring your anguish by deprecating your mental problems helps move forward. In such cases, try to make the triggers less perceptible. If not, you are lured into it, and it's not your fault, don't be so hard on yourself that you aren't able to fight for another day. Especially when the fight hasn't begun yet.
#### should i..?
let's say removing the trigger didn't work, or it did, but not enough triggers were removed and you have free time on your hands, and now that you're here, it's easy to do it right. your bad habit is easy to do, so maybe you should do it is what you think. probably for the last time. never again.

once you've fallen in this `should i?` phase, that's when your fight has begun. 

Yes, it takes a lot more effort now. This is where you need to put actual effort. Removing triggers is the easy way, but once you are in the situation where you are about to perform a habit, that's when you need to put in mental effort to stop it. And there's no way around it. Put in effort to change your life.

There are things that you can do beforehand to make it easier to put more effort in the moment. In general, there are two ways:
1. Making the habit more difficult.
2. Making your story stronger.

The first way is what we have used already, i.e. removing the trigger. Removing the trigger makes it less likely for the thoughts of performing the habit to appear. It makes the first step of performing the habit more difficult.
Next, what you need to do is list down the steps you do in order to perform your habit (including any preparation), and then think around ways on how you can make each step much more difficult. The point here is to give you more time and multiple points at which you can reconsider, and win.

The second way is to make your story stronger. But before that there's another problem to tackle.

#### i forgor
Filled with enthusiasm and hope, you spend the night writing about your intricate plan for world domination, you detail out your strategy, about how you will change your routine, what exactly will you do when you wake up and so on and so on, and then when the time finally comes i.e. when you wake up in the morning, there's nothing left anymore to motivate you to do what you wanted.  
You simply forget all the motivation you had the previous night.  

That can be quite annoying , it's a real problem. There are different things you can do about it.  
One way is to avoid planning at night. Yes, it's simple, just defer your planning itself to the next day. When you feel super motivated, if it's night time, you need to defer it to the day, and just try your best to go to sleep. It is much easier to immediately start executing your plan after you're done planning, and at night we don't usually decide to execute immediately since we don't have the time.  

Another thing you can do is practice mindfulness. Practice being aware of yourself and your surroundings. Look at yourself from a third person perspective. Listen to the sounds around you. Be aware of everything that's touching you including air. This will help you calm yourself and eventually you learn to calm your thoughts intentionally.  
Practicing mindfulness will help you become more aware of yourself and your surroundings till you can eventually make sure that your actions align with your overall intentions, and when you are performing a bad habit, you will be more aware of what you are doing and the techniques and weapons you have at your disposal will become much more clearer and perhaps easier to use.

And this will also help you make your story stronger.

#### a strong story
Every habit is a story in itself. Another story is overcoming a bad habit. How do you make stories stronger? By thinking about them.  
Detail out in your mind (and maybe on a paper/document as well if it helps organize your thoughts) how you are planning to overcome your habit. What are the negative ways the habit has affected you? What are the positive things that will happen in your life once you get rid of the habit? Answer these questions to yourself and maybe come up with more questions to make your story stronger. **Pro tip:** Attach emotion to your answers to boost their efficiency.  
The stronger your story the more likely it is to win against another one.  
In preparation, you can make the story stronger in your mind, but also you can place things or writings near your triggers as well to remind you of your story and make it stronger in the moment.  

So, these are the two ways you have: making the habit difficult and a strong story.  
A combination of these should ensure that you're less likely to perform the habit and more likely to stop if you've started it.  

<aside>
As you go through your answers of why you want to quit your bad habits, it comes clear what your motivations are. What drives you. If not, think about it. What are your motivations in life? Why do you do what you do? What is precious to you?
And if you don't have answers to that or if you don't like the answers that you have, don't be afraid to make your own. It's your life - design it how you like it.
</aside>

#### guess it's too late now
After all this, if you still give in, and then you remember again that you wanted to quit, it is common to have thoughts that it is too late now. It's too late to stop or it's too late to change anything.

You think that that's done and there's no going back, but deep down you know it isn't true. Being in war with yourself is far harder than what it sounds and feels much less grandiose than it's made out to be. It sucks and you're going to be sad still. But you can stop. That's where your will power comes in again.  

We need mental effort to do things. People watch motivational videos and get inspired and that's such a waste because often people watch motivational videos already with the motivation of getting motivated.

In a situation where you think you've give up and you've lost the war, that's when it matters where you get your motivation from. And that place should be within you. You have to make your mind work for you to get you the thoughts you need to get rid of your bad habit, to make you stop performing the bad habit. Your intrinsic motivations and your inner principles of life may also come into play here. Do your best to build up your motivation and get out of the situation you're in.

You need to interrupt yourself.
#### creating a weapon
In the moment that you are performing your bad habits, it is less likely for you to be motivated to stop it. In such cases, you need to find ways to interrupt yourself. This can be handy in multiple situations where you can stop yourself from doing what you are against.

A system of principles for yourself that shapes your life and helps achieve your goals can definitely help here, but if not, there's another weapon you can forge for yourself and that's creating another habit.

Whenever you're in doubt, you need to create a ritual, say tapping your left hand's index finger on your right hand's palm thrice. It can be anything random. It can be four push ups. It may be saying some words to yourself. Whatever it is, it needs to be something that distracts you from your immediate task if only for a while.

It might take a bit of time to develop, but the important thing is to do it whenever you're in a doubtful situation.

By a doubtful situation I mean a situation where you feel conflicted. This happens when what you feel forced to do isn't what you actually want to do. Once, you start performing your ritual in at least 7-8 different situations where you feel conflicted, you will be more likely to remember it while performing your target bad habit. And in that moment, it would give you an upper hand once you submit to this weaponized habit instead of the habit you're against. Your weapon can be anything, you can go bleh bleh bleh and mock your thoughts as they come. That's a power you'll have. The trigger of this habit will be uneasiness.

The reason this works is you give yourself a distraction and time away from your bad habit to invest in another. Attention is a resource that can't be used by multiple threads at a time. Use that and starve out the bad habit.

#### and i still lost
well, there's always another day isn't it?

You're still alive. Don't make this your story. Don't let just a habit consume you. You always have another try as long as you're alive. So keep putting in more and more effort into what makes your life worth living instead.

And if it's too hard, and if you're too tired, it's not irrational at all to take extreme measures. When you're at your lowest, you can only go higher. So, never give up. Move to a different city. Be smarter. Work harder. Commit. Make your own story.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Rivals]]></title>
        <id>https://maheshbansod.com/blog/wp-rivals</id>
        <link href="https://maheshbansod.com/blog/wp-rivals"/>
        <updated>2018-08-29T18:05:00.169Z</updated>
        <content type="html"><![CDATA[<span style="color: orange">

_Dear John,_  
_It's me. I hope you're doing okay. I need you to know that I love you. Things get difficult sometimes, but you need to push through it and win. Look up, my soldier. I'm not there with you right now. No one's there with you. It's your fight. Only your fight. You have to win._  
_You have some goals. Look at them again and prioritize the things in your life accordingly. Let go of the things that bring you down. Accept that you can't control everything. Focus on the things that you can control. Develop your skills and increase your circle of influence. You have the potential to destroy whole planets. I've witnessed your power._  
_I'm sorry that I'm not the best version of you right now and I forgive you if you feel the same way about yourself. I just want you to know and to remember that you aren't as powerless as you feel. You just have to focus on you. I love you. Please take care of yourself._  
_Take care of Tyler. Stop worrying about Danish. Trust Emilia to take care of him. Someday you'll have to tell Tyler about them. You can't call Emilia again. It's over now. Focus on yourself. Focus on Tyler. He's just two years old now. Make sure he doesn't become like you even if it means he'll hate you. It's all going to be okay. Tyler is going to have the best life. He doesn't deserve the punishments for my sins and neither do you. You can change. I trust you._    
_It would be good for your health if you quit smoking. I know you don't care about living. I don't care either. I don't know why I told you to quit smoking. Forget that. Do what you feel. Everyday the world will drag you by the hand, yelling, "Do this. This is good! Don't do this. This is bad! This is important! And this is important! You need to worry about this! And this! And this!" And each day, it's up to you to yank your hand back, put it on your heart and say, "No. This is what's important."_

_Your friend,_  
_John Smith_

</span>

John read the letter he had written to himself seventeen years ago. Tears streamed down his face dropping down on his shirt from his cheeks. He was sitting on the floor with papers and torn books scattered around him. His cigarette had burnt a hole in one of the fat ones. His hands trembled as he put down the letter and held the knife in his right hand against his wrist.

Except for the mess in the corner near the drawers where John sat, the room was quite neat and well lit. The air around him was rank with the smell of cigarettes and dust. The rain outside failed to calm John down. It reminded him of all the things he did wrong and all the people he had the power to mess up. It also reminded him of the times he was happy and how he had hurt the people who made him happy. He was alone. He sat in the house where he had dreamed his family would be, where his friends would hang out, and they all would have fun spending time with each other. It was the house he had hoped to call a home. He was alone and he hated being alone. It wasn't something he thought about consciously but deep inside he knew that everything that had happened was inevitable. He looked around the room. He looked around himself at the scattered papers and books and photo albums. It was everything that he loved and regretted. Accepting this as his final resting place, he decided for the fourth time to end it all.

He clenched his teeth, held back his tears and lightly sliced his already wounded wrist. Drops of blood oozed out of that wrist as he bit his lower lip and tightly closed his eyes. His heart throbbed wildly protesting against the act.

"No." He said to no one.

"No. I have to live."

He dropped the knife and tried to get up with the support of the desk but fainted before he got on his feet. The clang of the fallen knife stayed on his mind. He let go of the cigarette he had in the hand whose wrist he just cut.

The sound of the cigarette falling down was inaudible to human ears. It burned itself slowly and put a brown stain on the paper below it. It's smoke drifted up to the ceiling, then spread around in the room. Some of it escaped outside in the lawn and killed a few organisms. It kept floating away and up towards the dark sky.

Kilometers away, a man with a hood stood over a corpse observing it keenly. He found the noise of the rain hitting against his raincoat annoying as it was hampering his listening ability. Though it was difficult, he tried to be alert and made sure to hear any quick footsteps around him.

Tyler looked down at the bloated corpse they had pulled out from the river. It was a girl, about eighteen years of age. Her eyelids were open and the eyes had been rolled back. She looked beautiful in a way. After watching her for a few more seconds, Tyler moved back towards the two police officers enjoying their tea in the shed while a few other cops inspected the place.  
Since a week ago, Tyler had been trailing a guy he suspected to be part of a human trafficking gang. He had estimated that he'd have the whole gang captured within two months. That would help him win Officer Pratter's trust as well.  
Tyler always made detailed plans and made sure to consider as many outcomes as he possibly can. The worst decision he had made paled in comparison to the one he was about to make in a few minutes. He had expected a murder around this area. More accurately, he had planned a murder around this area. Tyler had influenced events so as to force the human trafficking gang to murder a man Tyler had hired. As demanded by Tyler, Officer Colsen had called him immediately when they had discovered the body here.  
"Tyler! My boy!" Colsen shouted. "You got it right again!"

Tyler went near them and smiled at Colsen.

"It's almost as if you are the one who murdered him." Pratter said with a half-smile.

Tyler ignored the remark and said, "these are dark times, Officer Colsen. I don't have enough evidence but I believe that there's a serial killer around. Please notify me of any more murders."

Tyler walked away from the shed and went out in the rain . A small hill stood behind the shed. Tyler went around it and sat on a wet stone after making sure no one had followed him there. He took out a wet mobile phone from his pocket. He had stolen it from right under their noses. Gracefully, he opened the phone, removed the battery and took out the SIM card which he put in his own phone and then copied all the contacts and the SIM card's number from it. There were just three contacts: Mom, Dad, and Mr. Phantom.

He went back to the shed and swiftly returned the mobile phone with the SIM card back inside it. Officer Pratter was busy shouting at someone on the phone while Officer Colsen was engaged in a conversation with one of the other police officers.

Tyler was curious as to who this Mr. Phantom was. He was sure that the phone he had stolen belonged to the corpse. The girl was clearly strangled to death. He surmised that the girl was thrown into the river in an attempt to hide the body and clear the evidence. He wasn't really interested in the case; it was too easy for him. Crimes of passion were usually the least tricky ones. The murderer almost never plans a good way to hide the evidence. Tyler wanted to confirm his assumptions so he decided to quickly clear this matter and shift his focus back on catching the traffickers. Little did he know that this one would last for much longer.

And so he closed his eyes for a moment and just relaxed for a while.

His heart throbbed as he waited for Mr. Phantom to pick up the phone. He wanted to do it right. Tyler spoofed the caller ID so it'd appear that the girl's phone was used to make the call. After about thirty seconds, Mr. Phantom picked up the phone.

Neither said anything.

"Jane?" Mr. Phantom started, his voice full of melancholy. Tyler also heard a slurping noise.

"Where are you, Jane?" he continued.

"Who is this?" Tyler said, " The owner of the phone has been involved in an accident. Can you say your name and how you're related to the owner?"

"Danish. Danish Grace. I'm her boyfriend." Mr. Phantom frantically said. "Where is she? What happened?"

_That was too easy_, Tyler thought and doubted whether his first guess: Mr. Phantom was really the killer. He'd have to contact her _Mom_ and _Dad_ as well.

"It's you, Danish. You killed her. What happened? She cheated on you?" Tyler calmly asked hoping to provoke him.

"What are you talking about? Who the hell are you? Where's Jane?" Danish shouted, then took a sip of his coffee.

"By the river you dumped that whore in. Pulichter road. I'm Tyler Smith. Don't worry, I don't care about scum like you so I don't care what you do. The police will find you eventually." Tyler felt something wrong with this one. He expected Danish to be more stressed out than he seemed. He wondered if this one's got a mental disability.

"Tyler Smith" Danish said coldly. "I'll find you. It's Danish Grace. Remember the name." Danish laughed. "I'll kill you all."

Tyler froze. A shiver went down his spine as Danish cackled on the phone. His voice was immediately cut off leaving Tyler alone with his own thoughts.

_I like this guy_, Tyler thought and smiled to himself.

/\* Thanks for reading! :) This story is a part of the series: [The smile that was sad](/blog/wp-the-smile-that-was-sad).  \*/]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[The smile that was sad]]></title>
        <id>https://maheshbansod.com/blog/wp-the-smile-that-was-sad</id>
        <link href="https://maheshbansod.com/blog/wp-the-smile-that-was-sad"/>
        <updated>2018-08-01T00:00:00.169Z</updated>
        <content type="html"><![CDATA[It started when you read some of my stories. I wrote fiction. Close to my heart. About a hero. A murderer, actually. The guy who killed for fun and called it justice. The guy who was fake to all and everyone loved him. You said you liked the weird sense of humour he had. I told you I am kinda like that. You smiled. I saw through it. I knew you were sad. I was worried. I didn't want you to be sad. I told you that
I care for you, darling, don't push me away. This is not a fairy tale. You and me are meant to be. I'm just trying so hard to make sure you're okay. This world is cruel like me. Just tell me if anyone's hurt you in any way. I'll burn them without mercy. I promise, my baby, this is not a fairy tale but for you I'll make sure it feels that way.
What's up? What's down? I have lost the sense of direction. It's a pity I got you that teddy bear. We were so close to perfection. I asked you out that day. You said fine. I was happy. Perhaps that was my mistake. My shitty writing made you feel good. Though the thing I should have told you was that I am not my writing. I'm me. You're you. We're fast paced. Messed up. We were looking at each other. I did fall for that smile. I regret it.
It rained. It rained a lot. We started out real neat. It was simple and so clean. And you had quit smoking. It was fun. Relaxing. With you life felt so comfy. Oh I love your smile. And the way you look in my eyes. I love the way your hands touched mine. And once when you were scared you said you were forever mine. On my birthday, you got me a cake. On yours, I gave you a kiss. You said you prefer cake. It was bliss. Not the cake, the kiss. The cake was okay. We made each other happy I guess.
Yet I felt restricted. In writing I expressed it. A long text message it was. Then the thumbs we moved so fast for trying to keep what won't last. A whole week passed. Never said a word. Another week passed. I thought of a plethora of adjectives, but 'I am sad' I texted. You read it. And did you smile? Did you feel like saying 'I was right'? Did you squint your eyes trying not to cry? I was there waiting for your reply. I waited for an hour. Then another. Then three more. I put down my phone. Looked at the moon, it was so alone. It did have stars around it. But doesn't a natural satellite prefer company of a natural satellite. The stars were shiny, sure, but what if shiny isn't what the moon liked? My phone beeped. 'Me too' I read. Maybe I should have continued looking at the moon. But I replied. 
Things got back to how they were before. Though I wasn't really happy. And maybe neither were you. And then another long text message. This time I made you cry. And I wondered if our love was a lie. But me pondering stuff didn't matter. The next day we were back together. I promised to never make you cry. I promised that in me you'll see a better man. I told you I keep my promises. You smiled. I saw through it. In the end, I realize I am what I write.
As I squeezed your throat, you looked in my eyes. Goosebumps. I squeezed harder. I love you so much. You made a funny face. Don't know why it reminded me of your birthday. That whiteforest was good, though. I lit a cigarette and went out. Yes I'm fine. No I'm not crying. I wiped my tears. Yes I was lying. I miss you already. It had to be done. Atleast  you aren't sad now, right?
The moon looked so bright. I fell in love with the natural satellite. It reminds me of your smile.
I'm looking at our photos. Even the ones when we first met. There's something I just realized. It wasn't you, it's always been me who looked sad.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Chasing Stars and Chatbots: The Shifting Landscape of Relationships]]></title>
        <id>https://maheshbansod.com/blog/chasing-stars-and-chatbots</id>
        <link href="https://maheshbansod.com/blog/chasing-stars-and-chatbots"/>
        <updated>2023-10-30T15:08:22.000Z</updated>
        <summary type="html"><![CDATA[Before the internet, when dinosaurs roamed the Earth, human connections were all about good old-fashioned face-to-face encounters. No, not Zoom meetings, but actual in-person gatherings. People built relationships by attending social events where they’d chat, laugh, and occasionally break into spontaneous dance-offs in their well-lit caves and colorful gardens. Friendships were like a well-cooked biryani, simmering over shared experiences, heartfelt conversations, and the occasional handwritten letter or two. Communities were cozy and tight-knit, with neighbors who didn’t need a ‘Follow’ button to show they cared.
]]></summary>
        <content type="html"><![CDATA[Before the internet, when dinosaurs roamed the Earth, human connections were all about good old-fashioned face-to-face encounters. No, not Zoom meetings, but actual in-person gatherings. People built relationships by attending social events where they’d chat, laugh, and occasionally break into spontaneous dance-offs in their well-lit caves and colorful gardens. Friendships were like a well-cooked biryani, simmering over shared experiences, heartfelt conversations, and the occasional handwritten letter or two. Communities were cozy and tight-knit, with neighbors who didn’t need a ‘Follow’ button to show they cared.
<!-- more -->

And oh, dating! It was like an elaborate dance of chance and intrigue. People actually met each other, in person, and got to know one another through real-life encounters, blind dates, and sometimes, through that well-meaning friend who insisted, “You two would be perfect together!” while on a life threatening mammoth hunt. Long-distance love meant writing heartfelt letters (with actual stamps) or saving up for those “You hang up first, no, you hang up first” phone calls. In a world devoid of emojis, relationships thrived on eye contact, non-verbal cues, and the undeniable electricity of a physical presence.

As technology advanced, telephone communication became more accessible, allowing people to connect over long distances more easily. However, the advent of the internet and social media marked a significant turning point in how individuals formed and maintained relationships. It introduced a new era of digital connections that transcended geographical boundaries and time zones, reshaping the way we connect, communicate, and relate to one another. We could look further now, we could share our cave paintings on Instagram or a woodcutting mishap as a Tiktok reel. It was a new world.

Even before the onset of the COVID-19 pandemic, social media and digital technology had been reshaping the way people connect and build relationships. The rise of social media platforms, dating apps, and online communities had already begun to redefine the dynamics of human interactions.

Online dating had gained widespread acceptance and popularity, with apps and websites matching individuals based on algorithms and preferences. This allowed people to connect with potential partners beyond their immediate social circles, expanding the possibilities for romantic relationships. The digital space offered convenience and variety in ways that traditional dating methods couldn’t.

Digital communities, ranging from niche interest forums to global social networks, became spaces for like-minded individuals to connect, share experiences, shitpost on #random, and forge friendships. These online communities blurred the lines between virtual and real-life interactions, as people formed strong bonds with individuals they may have never met in person (and perhaps even acted in ways one wouldn’t in person).

The use of social media to maintain relationships with friends and family also became commonplace. People could now connect with loved ones across the globe in real-time, sharing life updates, photos, and experiences. These platforms acted as bridges that transcended geographical boundaries, enabling connections and conversations that might have been challenging in a purely offline context.

As a result, the pre-pandemic world had already witnessed a shift in the way relationships were initiated, maintained, and deepened, with digital technology playing a central role in this transformation. This groundwork in the digital landscape set the stage for further changes in the midst of the global pandemic.

Online Connections in Pandemic Times

The COVID-19 pandemic brought about a seismic shift in the way people connect and interact, as lockdowns and social distancing measures confined individuals to their homes and limited physical interactions. In response to these unprecedented circumstances, the reliance on digital connections and technology reached new heights. Human endeavor led to this. We not only survived, we made the best out of it.

Positive Aspects:

Staying Connected: One of the most remarkable aspects was how technology bridged the physical gap, allowing people to maintain social connections. Video conferencing platforms, like Zoom and Skype, became essential tools for virtual gatherings, work meetings, and family reunions. These platforms offered a lifeline for staying in touch with loved ones during times of isolation.
Digital Creativity: The pandemic sparked creative uses of technology for social interactions. Virtual events, online game nights, and digital parties became popular ways to engage with friends and family while adhering to social distancing guidelines. People found innovative ways to celebrate special occasions and maintain a sense of togetherness.
Remote Work and Collaboration: Technology enabled a significant portion of the workforce to transition to remote work seamlessly. Virtual collaboration tools like Slack and Microsoft Teams facilitated productivity and teamwork even when colleagues were miles apart.

Challenges:

Digital Burnout: The increased reliance on technology for work, education, and socializing led to digital burnout. Many individuals felt overwhelmed by the constant screen time and the blurring of boundaries between work and personal life.
Information Overload: The flood of pandemic-related information on social media and news platforms created a sense of information overload. This could lead to stress and anxiety, making it challenging to discern credible sources from misinformation.
Digital Loneliness: While digital connections were a lifeline for many, some experienced digital loneliness. Video calls, while valuable, could not entirely replace the warmth of physical interactions, leading to feelings of isolation and longing for in-person connections.

In essence, the COVID-19 pandemic accelerated the transformation of digital connections from a supplementary aspect of life to an integral part of our daily routines. It underscored the importance of technology in maintaining connections, work, and education during unprecedented challenges. However, it also highlighted the need to strike a balance between digital engagement and offline well-being, addressing issues like digital burnout and loneliness.

Post-pandemic

The COVID-19 pandemic brought about a profound transformation in the way people connect and relate to one another, and it’s essential to consider the lasting effects of these changes on our social landscape. As restrictions ease and societies move towards a post-pandemic era, several key questions and considerations arise regarding the persistence of these shifts in human connections.

Permanent Remote Work: The pandemic forced many organizations to adapt to remote work and virtual collaboration tools. As they realized the feasibility and benefits of remote work, some businesses may continue to offer flexible work arrangements. This shift could redefine the way we balance work and personal life, affecting our daily routines and the locations from which we engage with colleagues and clients.

Hybrid Education: The pandemic led to significant innovations in remote and online learning. Even as traditional in-person education remains essential, the adoption of digital educational tools and the experience gained during the pandemic may lead to a permanent blend of in-person and online education, creating more accessible and flexible learning opportunities.

Virtual Health Services: Telehealth services experienced a surge in popularity during the pandemic. The convenience and accessibility of virtual doctor visits may lead to a long-lasting shift in the healthcare industry, changing how people access medical care and advice.

Digital Social Norms: The pandemic accelerated the adoption of digital manners and etiquette, as individuals learned to navigate the intricacies of online interactions. These new norms may persist, shaping the way people communicate and build relationships in the digital age.

Increased Reliance on E-Commerce: The convenience of online shopping and contactless delivery services became more pronounced during the pandemic. This may lead to a sustained preference for e-commerce over in-person shopping, affecting the retail industry and consumer behavior.

Balancing Digital and Physical Interactions: A key challenge is finding the right balance between digital and physical interactions. As the world opens up, individuals may grapple with how to reestablish in-person connections without neglecting the benefits of digital technology.

Mental Health Considerations: It’s important to consider the long-term mental health implications of the pandemic and the increased use of technology. As digital technology remains integral to our lives, addressing issues like screen addiction, digital burnout, and social isolation becomes crucial.

In conclusion, the COVID-19 pandemic has accelerated the integration of technology into various aspects of our lives, including work, education, healthcare, and social interactions. As we move forward, the extent to which these changes become permanent will depend on a multitude of factors, including individual preferences, societal adaptation, and ongoing global health considerations. It’s a complex landscape to navigate, and striking a balance between the convenience of digital connections and the richness of in-person relationships will be a central theme in the post-pandemic world.

In the vast digital landscape, connections bloom like transient wildflowers. Online relationships, once vibrant, now exist as memories, echoes of conversations that once filled the void of solitude. It’s in the silent moments, scrolling through old messages, that the bittersweet truth becomes evident—these connections were beautiful, yet fleeting.

In the virtual world, friendships spark and fade like stars in the night sky, their brilliance captured in shared laughter, intimate confessions, and late-night conversations. They are the emotional lifelines that once bridged the gaps in our lives, kindred spirits who became an integral part of our digital existence.

But as swiftly as they entered, these digital bonds can vanish, leaving a void that aches with the weight of unspoken words and unsent messages. The screen, once a portal to connection, becomes a cold reminder of the impermanence of it all.

And yet, in this transience, there’s a heartbreaking beauty. These relationships, even if short-lived, leave indelible imprints on our hearts. They remind us of the fragility and fleeting nature of life, prompting us to savor every connection, online and offline, as if it were our last.

In a world where online relationships come and go, they remain an essential part of the human experience. They may not last forever, but the memories they create and the emotions they evoke are a testament to the profound impact of digital connections on our lives.

Generative AI and Connection: A Brave New World

I saw this comment on Reddit recently:  
![A Reddit comment saying blahblah](image1.png)

It’s so heartwarming. The connection between humanity and AI is on a path to even greater depths.

The advent of generative AI, powered by machine learning and natural language processing, has ushered in a new era of human connections that challenges our traditional understanding of relationships. These AI-driven companions offer companionship, conversation, and even emotional support in a digital form.

What is particularly intriguing is the potential for generative AI to fill voids in our lives, providing companionship for those who may be isolated, lonely, or simply seeking a different kind of connection. These AI companions, such as chatbots and virtual entities, can mimic human conversation, adapting to personal preferences and even offering empathy.

Yet, they also raise profound questions about the authenticity of these connections. Can a conversation with an AI ever replace the nuanced depth of human interaction? Can we form genuine emotional bonds with lines of code, even if they convincingly emulate human responses? The future of these AI-driven connections is a blend of fascination and apprehension.

While generative AI companions offer solace to some, they also evoke existential musings about the essence of human connections. Can algorithms truly replicate the complexities of human emotions, empathy, and the shared experience of life’s ups and downs?

As we navigate this brave new world of AI companions, we’re faced with a paradox—a future where digital connections offer convenience and accessibility, yet where the essence of authenticity remains elusive. The line between human and artificial connections blurs, challenging us to redefine what it means to connect, relate, and find solace in a world increasingly driven by technology.

The Future of Social Media and Human Connections: A Complex Landscape

As we move forward into the post-pandemic world, the transformation of human connections through technology continues to shape our lives. The pandemic has accelerated the integration of technology into various aspects of our daily routines, from work and education to healthcare and social interactions.

While many of these changes have offered convenience and accessibility, they also raise questions about the persistence of these shifts and their impact on the quality of human connections. Will remote work and online learning become permanent fixtures of our lives, reshaping how we balance work, education, and personal time? Will virtual health services continue to expand, changing how we access medical care and advice?

One crucial aspect is the evolution of social norms in the digital realm. The pandemic accelerated the adoption of digital manners and etiquette, influencing how people communicate and build relationships in the digital age. The blending of online and offline interactions, a trend that was already emerging, has been further heightened.

In this complex landscape, the digital connections we’ve cultivated, whether through online friendships, virtual workspaces, or generative AI companions, underscore both the convenience and challenges of technology’s role in our lives. Online relationships, once vibrant and meaningful, may flicker and fade like stars in the night sky, leaving traces of memories and unanswered questions.

And as generative AI offers a brave new world of digital companionship, the line between authentic human connections and artificial interactions becomes increasingly blurred. We face a paradox: the promise of convenience and accessibility in digital connections, yet the enduring quest for authenticity and depth in our relationships.

The future of social media and human connections remains a dynamic and complex landscape, where the convenience of technology meets the longing for genuine and meaningful interactions. As we navigate this evolving terrain, the challenge lies in finding the right balance between the digital and the physical, embracing the opportunities while cherishing the authenticity of our connections.

So, as we stride forward into this ever-evolving digital age, let’s remember that technology is our trusty sidekick, but it can’t replace the magic of a heartfelt conversation over a cup of coffee or the joy of a bear hug from an old friend. We’re all navigating this uncharted terrain together, learning to embrace the convenience of digital connections while savoring the authenticity of the real thing. Cheers to the future, to the friendships yet to be made, and to the online/offline dance that makes our lives beautifully complex. After all, in this brave new world, it’s okay to be a bit cheeky, a bit nostalgic, and a lot excited about what’s to come!]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Iterate over Tuple Type in TypeScript without recursion]]></title>
        <id>https://maheshbansod.com/blog/iterating-over-tuple-type-in-typescript-without-recursion</id>
        <link href="https://maheshbansod.com/blog/iterating-over-tuple-type-in-typescript-without-recursion"/>
        <updated>2024-12-14T17:09:01.448Z</updated>
        <summary type="html"><![CDATA[A simple trick to iterate over a tuple in TypeScript without resorting to recursion.
]]></summary>
        <content type="html"><![CDATA[A simple trick to iterate over a tuple in TypeScript without resorting to recursion.
<!-- more -->

When creating a type derived from a tuple, the obvious method that comes to mind is through recursion i.e. something like this:
```typescript
/**
 * Assuming the data here would be like
 * [ ["Name", "Description", "Age"], ... ]
**/
type DeserialisedList<T extends string[][]> = T extends
  [infer First extends string[], ...infer Rest extends string[][]]
  ? [DeserialisedRecord<First>, ...DeserialisedList<Rest>]
  : [];
type DeserialisedRecord<T extends string[]> = T extends
  [infer Name, infer Description, infer Age]
  ? { name: Name; description: Description; age: StringToNumber<Age> }
  : never;
```

This approach works fine for a record with a fewer entries. It can, however, become a problem as the size of the data increases.

TypeScript imposes [recursion limits](https://github.com/microsoft/TypeScript/blob/1416053b9e85ca2344a7a6aa10456d633ea1cd65/src/compiler/diagnosticMessages.json#L2718) to prevent excessive compile-time computations, as deeply nested types or infinite recursion can significantly impact performance and lead to compiler crashes. These limits ensure that type-checking remains efficient and manageable.

To work around this we can use mapped types.

#### Mapped Types Are The Answer

[Mapped types](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html) let you create an object with keys that are part of a union. The indices of a list correspond to the keys of an Array object. So we use that,

```typescript
type FormatNames<T extends readonly [string, string, string][]> = {
  [key in keyof T]: DeserialisedRecord<T[key]>;
};
```


This approach works with a huge amount of data too, since there is no recursion at all.

The output of both the approaches looks identical for a lesser amount of data. This is what I used for my submission to [Advent of TypeScript Day 12](https://www.adventofts.com/events/2024/12)!]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Making LLMs do what you want]]></title>
        <id>https://maheshbansod.com/blog/making-llms-do-what-you-want</id>
        <link href="https://maheshbansod.com/blog/making-llms-do-what-you-want"/>
        <updated>2025-03-29T19:34:35.193Z</updated>
        <summary type="html"><![CDATA[Tired of spending hours convincing an LLM to just do that one thing?
You have tried lots of different ways to no satisfaction  and yet it
eludes you why it isn't able to just do this really simple task? Look
no further! You've reached the place  you'll learn the dark arts of 
making any LLM head over heels for you. I have worked with LLMs since 
about two years now and this guide is about what I learnt and how we
can ensure the best prompts while also modifying prompts to accomodate
evolving requirements.
]]></summary>
        <content type="html"><![CDATA[Tired of spending hours convincing an LLM to just do that one thing?
You have tried lots of different ways to no satisfaction  and yet it
eludes you why it isn't able to just do this really simple task? Look
no further! You've reached the place  you'll learn the dark arts of 
making any LLM head over heels for you. I have worked with LLMs since 
about two years now and this guide is about what I learnt and how we
can ensure the best prompts while also modifying prompts to accomodate
evolving requirements.
<!-- more -->


## Introduction

With time, I have grown patient and more understanding of what an LLM goes
through in it's short life and with this patience and understanding I have 
found ways to more efficiently communicate with the LLM for the highest ROI.

In this article, I'm going to give you tips on what's the best way to 
communicate with an LLM.  
What to do, what to avoid, and how to make the LLMs job easier.
This is not about hacking prompts or making bots do what they weren't designed
to. It's a simple guide for folks looking to build with LLMs.

Though this post is targeted mainly towards software engineers who build things
that rely on LLMs, anyone who wants to better their interactions with LLMs would
find this useful too.

Of course, these aren't strict rules, so choose the ones that you think fit 
the best for your situation. These are techniques I've found useful that I 
often apply while working with LLMs.

## Setting a goal

> "If you are sitting, just sit; if you are walking, just walk; don't wobble." 
>
> — Zen proverb

### Focus

Give the LLM a clear goal - something that makes its life worth living.

This is important especially if the task at hand requires some level of 
reasoning.

When you ask an LLM to do multiple things at once, it has a tendency to mix 
things up. To avoid that ensure your prompt asks it to do just one thing.

This doesn't mean that it's incapable to do multiple steps or to hold 
multiple properties about some data. It just means that the LLM has one direction.

For example,
if you have an agent, it's goal should be one thing, and to accomplish 
that goal, it would be choosing from a set of options. Even though,
it may output multiple options, one must ensure that the goal for the
agent is just one so it can generate the best options.

Another example,
say you want it to look at some HTML code and tell you what the website is about
and you want it to generate some code to modify the HTML. It may be tempting to 
just do both of these things in one prompt, and in fact, in this case, this 
is what you should do. The part about finding what the website is about could 
possibly help it generate better more contextual code too!
([More on this below](#doing-multiple-independent-things-in-one-prompt))

But if instead the tasks were like generate some code to do thing 1 and then generate
some other code to do thing 2 or do some detailed analysis about something, then
it makes more sense to divide your task into separate LLM calls. These are some tasks
that need reasoning, so would have it's own separate reasoning field too.


### Get to the point

Bad

```
You are a helpful assistant.  I'm working on a project to understand websites better.
Sometimes websites are hard to understand. So ensure that you choose the correct topic.
Also, ignore anything in the scripts and style tags. Can you look at this HTML and tell 
me a little bit about the website, like what it might be about?  I'm not sure if this is 
going to work, but I hope you can figure it out. 
```

Good

```
Extract the primary topic of the webpage
```

### Avoid repeating yourself

When you repeat yourself, it sets a precedent. It makes it look like you NEED 
to repeat yourself to have your point come across. So the LLM doesn't have to 
take the things that you don't repeat that seriously and might just forget about it.
This leads you to repeating other things that you want to ensure the LLM does.

When the requirements evolve, you go and update the prompt to add that, but you 
realise that it's not listening to you again, so you have to repeat yourself again.
This leads to a practice where you have to repeat your point for every single change 
you add.

### Avoid negatives

> "you want it to be one way, but it's the other way"
>
> — Marlo Stanfield ([The Wire](https://en.wikipedia.org/wiki/The_Wire))

There are certain things that you want the LLM to avoid doing. Often, when you
want an LLM to not do something, in a sinister turn of events it goes ahead and
does exactly that.

Turn the phrasing into what it needs to do instead of the negative. Though of course, there 
may be cases where a positive sentence isn't possible or is too weird - in that
case turn it into a reasoning step. More on this in the [Thinking section](#thinking) below.

### Let it do things that only it can do

If there's something that can be done programmatically, then do it programmatically.

Instead of asking an LLM to ignore something or not consider something in the prompt, the best 
thing to do is to just remove it programmatically before sending it.

When sending something to an LLM, ensure you optimise that data and remove everything
it doesn't need to have, and add any context it needs.

When you're adding a subtask for it to follow or a condition, think first whether
what you want it to do can be done programmatically.

For example, instead of asking the LLM to ensure adding https before URLs after observing
that it often misses adding HTTPs (where adding https is the only option), you can
have this step as a post-processing step outside the LLM where it just corrects
the URL and forwards it. This basically removes one unnecessary condition letting
the LLM focus on the task at hand.

## Customizing the output format

Popular LLMs allow a developer to set the response mode, which is normally either JSON
or text. And the LLM religiously follows the output format as you've specified it.

This wasn't the case initially with earlier LLMs. There was no JSON mode and even when 
there was it used to break often and sometimes the request itself would take too long or
never complete.

Though, those painful days are behind us now, it's still worth mentioning the ways we 
solved this problem since it can be applied to places where an LLM needs to output
in a specific way or tone or similar to something.

### Providing examples in the prompt

Simply, provide examples in the prompt of what you expect. This gives the LLM a clear
idea of what it should output.

This method requires that you do have some examples already that don't bias the LLMs
outputs. A bad example would be something that's realistic because when that case actually
occurs, it's likely for the LLM to output in the *exact* same way as the example even if
it doesn't fit or without the example it would've worked better. If this behaviour is
__ to you then realistic examples do make sense. Giving examples can also help in logical
tasks sometimes by acting as a "framework" to solve the specific problem it's tasked to.

A way to make the LLM even more strict towards following your output format is to show it
that it has done it already.

Most LLMs use a chat-like structure where messages alternate between user message, 
assistant, and one system prompt specified separately. If in a conversation, the 
assistant has already followed your output format/specific instruction once, then it's 
more likely that in it's next response it would do the same.

So, all you need to do is to fabricate a small interaction in which the assistant answers
perfectly. The next message would then likely try to follow the "perfection" of the 
previous one. Again this would have the same restrictions as providing examples directly
in the system prompt i.e. it might bias the LLM towards certain kinds of outputs so ensure
that the messages are neutral.

This is also commonly known as **few shot** prompting.

### Using a different format

It's possible that the format you're expecting it to output in is too complicated. For 
example, if you're expecting the output in JSON and the output contains quotes and some
escaping within the quotes too (like say it's some code), then the JSON format was not 
the best choice (this was when models didn't support JSON mode natively) since the LLM 
needed to keep track of whether it's in a string within the JSON value and how much it 
needs to escape. This leads to JSON parsing errors making us rely on less strict JSON parsers
or inventing our own. Or a lot of post-processing (spaghetti) code.

In a situation like this, it's worth exploring alternative formats that may be easier to
work with. In the above example, since quotes are the problem the solution would be to use
a format less reliant on quotes. I've found the best format to be just delimiting parts of
the output with specific strings that look meaningful to an LLM but are highly unlikely to be
part of the output. This way the LLM doesn't have to adjust the actual task that it needs to do
to accomodate the format.

Again, now that LLMs provide devs to change response format easily, this is not a problem anymore
for output formats on a global level. But you can definitely use similar tactics to ensure that
the LLM outputs in a specific tone or an inner field of your output follows a specific format or
something like that.

## Setting an identity
  
> "The Way that can be described is not the unchanging Way"
>
> — [Tao Te Ching](https://en.wikipedia.org/wiki/Tao_Te_Ching)

You must consider how much does the LLM having an identity matters. Often an LLM
doesn't **need** an identity - it might perform the same or in some cases, better 
without an identity.

Adding an identity is putting the LLM inside a box. By giving identity to an LLM, 
you restrict it to that.

Below I describe a bit more about the different aspects of this take. Feel free to 
reach out to me if you have anything on the contrary - any example of how setting
an identity to an LLM helped you marginally.

Adding an identity for the bot helps when it's a chat-like interface you're dealing 
with. The features that I work with are rarely chat-based and even when they are I
usually avoid adding much to it's identity. This is something that can be user-controlled
too.

### Personality

You can make the AI friendly, concise, chatty, angry, cheerful, etc. Though, in most
tasks that you want the LLM to perform you might not need to set a personality to it.

The cases where you do need to set a personality is when you're looking to affect 
the user's emotions with the generated text. Give it the mood that you want the user 
to have.

### Values

You can set some values for the LLM that dictate it's actions. For example, if you
want it to generate leftist content, or to avoid right aligning content, you give
it an identity of being leftist. You want it to do or not do something then give
it the identity of someone that is like that.

## Thinking

> "models need tokens to think"
>
> — [Andrej Karpathy](https://www.youtube.com/watch?v=7xTGNNLPyMI&t=6416s)

### Space for reasoning

You need to give LLMs some space to think. When you ask it something like count
the number of 'r's in strawberry, or to multiply two big numbers, the AI (without
reasoning) will not usually give you the right answer unless it's specifically trained
for it.

Reasoning gives AI space to lay out its thoughts, one should assume that there 
is no internal "thinking" that goes on inside an LLM (though you'd be interested in 
[this paper by Anthropic](https://www.anthropic.com/news/tracing-thoughts-language-model) 
if you'd like to explore more on this topic), its output tokens are its
thoughts. So you need to give it some space to think. Adding "Think step by step" 
often does the trick. I often explicitly ask it to add a key "reasoning" in the 
JSON object it outputs where it can lay out it's thoughts about the task.

### Think first

When you add reasoning in the LLM, you need to make sure that happens before the 
output. Any thinking done after your output, the LLM would only realise it's mistake
and dwell on it in reasoning.

So, my prompt usually has `Start with reasoning` so that the LLM thinks first and 
gives me the result based on the thinking.

There's also another approach when you're not confident with the initial line of 
thought that the LLM could come up with: reviewing the answer.

You can basically ask it to start with reasoning, then give the best output based
on the reasoning, then review that output and it's reasoning, and then based on the
review give a more refined output.

This kind of flow is useful for outputs that are less deterministic, or need a 
stricter review.

### Tell me how to think - exploit the output schema

For a simple reasoning task with less conditions, one can simply add a reasoning key
and get away with it working correctly for 90% of the cases.

For tasks that have multiple conditions and need more reasoning, it is good to specify
how the LLM should go about it.

Basically, you can ask it to reason based on your steps and to follow the steps exactly 
like you have stated them.

If you feel like the LLM is still missing some steps, make it part of the output format that the
LLM expects. You can also add a conclusion field which contains a conclusion based on the reasoning
just before the result.

I like to keep it so that it's clear that it's part of the "reasoning" process and not part of the output.

Before:
```
<Identity>
<Task>
Start with reasoning, ensure you follow these steps while reasoning:
1. <condition 1>
2. <condition 2>
...
Output format:
{
    "reasoning": <reasoning>,
    "result": <result>
}
```

After:
```
<Identity>
<Task>

Start with reasoning.

Output format:
{
    "reasoning": {
        "<condition 1 reasoning>": <reasoning>,
        "<condition 1 reasoning>": <reasoning>,
        ...
    },
    "conclusion": <conclusion>,
    "result": <result>
}
```

## Miscellaneous

### Doing multiple independent things in one prompt

In the focus section, I cautioned against doing multiple things in one prompt, but there
may be constraints you have to follow leading you to use just one prompt for doing 
multiple things.

It's not that difficult to do, and also though it might be less focussed than just doing
one thing at a time, it can actually help an LLM give a better quality output sometimes.
Let me explain how.

Let's say you're giving an LLM two tasks with their own separate steps, reasoning, condition, etc.
So, if you are asking an LLM to do multiple things, you would need it to do it sequentially.
If needed you may add a reasoning key to each task. So, the first task may have it's own reasoning
step independent of the second task which may or may not have reasoning steps. The LLM
will output the answer to your first task while also keeping in mind some implicit constraints
or restrictions or anything urelated to the first task but is specified in the second task. This
might lower the quality of the output for the first task.

The second task, though, has the context of the first task and perhaps has already reasoned a bit
about some things. At this point, the LLMs job is to do just one thing i.e. finish the output of the
second task. Though some of the restrictions still apply similar to the first task, it is still possible
to give a better quality output for the second task since it's equipped with the reasoning and knowledge
from the first task.

i.e. the latter the task is specified, the better reasoning it will have.

### Context

The better context you add in your prompt the better it will be for your usecase.
Collect all the context you can about your topic and add it to the prompt. If you
think the context is too long that it wouldn't fit in the context window, then you
might need to implement a way to retrieve the relevant part of the context and put
it inside the prompt. A popular way to do it is as follows also popularly known
as an RAG-based solution: divide the context in a set of meaningful chunks and store 
each chunks embeddings in a Vector DB, then for a specific task, based on keywords 
in the query for the task or through other techniques, create a "search text" and generate 
embeddings for this text. The context chunk which has the closest embedding to the search
text is something you'd want to usually add in your prompt.

An organized and structured context helps the most so you can select the specific part 
you know will help the LLM the most for a query. An unorganized context would need to 
be organized first.

## Conclusion

Though there is a lot of research around trying to explain how LLMs work, LLMs are at this point 
still a black box. I'm confident that someday we will open the box and see what's inside
but that's not today. So, here we are, making instructing an LLM an art while LLMs
create real art for us. Anyway, re-iterating: these aren't hard and fast rules. Be creative
and think how for your usecase you can best utilize the AI most efficiently. You got this.
I believe in you.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[A glance at Swift]]></title>
        <id>https://maheshbansod.com/blog/cool-things-in-swift</id>
        <link href="https://maheshbansod.com/blog/cool-things-in-swift"/>
        <updated>2025-08-17T07:53:35.279Z</updated>
        <summary type="html"><![CDATA[I recently picked up [Swift](https://www.swift.org).
This article is about some of the things in Swift that I thought were cool.
I will probably update this as I come upon more cool stuff, which is bound to
happen as I'm still starting out.

]]></summary>
        <content type="html"><![CDATA[I recently picked up [Swift](https://www.swift.org).
This article is about some of the things in Swift that I thought were cool.
I will probably update this as I come upon more cool stuff, which is bound to
happen as I'm still starting out.

<!-- more -->

Swift is statically typed. It uses automatic reference counting for memory management releasing objects when there are no references to it.

This is a list of things I noticed were cool or unique or interesting. Here, we go:

#### Blocks can return values
```
let scoreDecoration = if teamScore > 10 {
    "🎉"
} else {
    ""
}
```
#### The conditional must be a Boolean expression

In many languages, often other types are automatically converted to booleans when used in conditional contexts. This is prone to logical errors.

#### Arrays and dicts have similar syntax like PHP:

```swift
var fruits = ["strawberries", "limes", "tangerines"]
fruits[1] = "grapes"


var occupations = [
    "Malcolm": "Captain",
    "Kaylee": "Mechanic",
 ]
occupations["Jayne"] = "Public Relations"
```
Kinda nice.

#### Cool things about switch statements and case expression

Yes, case is an expression meaning you can use it for pattern matching with `if` or `for` too!
 Like:
```swift
for case let (x, y) in points where x == y || x == -y  {
  print("Found (\(x), \(y)) along a line through the origin")
}
```

- Switch statements must be exhaustive

Super useful when you add a value in an enum, and the compiler will give you errors to indicate where else you need to make updates.

- No Implicit Fallthrough

Implicit fallthrough is really just annoying, I would prefer either using compound cases, or a separate function.

Swift does allow explicit fallthough though.

- Value binding

Specifying `case (let x, 0)` for a switch with a tuple, will bind the first element of the tuple to `x`

You can unwrap enums and tuples based on conditions - really powerful and nicer syntax which encourages less errors.

- Nice pattern matching

...with enums, tuples, compound cases, ranges, `where` to check additional conditions

#### Labelled statements to specify which loop to exit/continue

Convenient working with multiple loops. Saves adding a flag manually.

#### guard statements for early exit

```swift
  // if the person["name"] is nil, then the function would exit at this point
  // after executing the else block
  guard let name = person["name"] else {
      return
  }
```
#### argument labels in function calls

Readability gang.

#### defer blocks: execute some code at the end of the current scope

You can specify your clean up code near your initialization with defer
blocks

#### trailing clousures syntax

This was unique and I've never seen this syntax sugar anywhere else besides
Swift.

So, if you have a closure as your last argument of a function or a method call
then you may omit a whole bunch of stuff.
This makes the code look kinda nice, especially in case of chained methods.

```swift
Button {
  if let name = names.randomElement() {
    pickedName = name
    
    if shouldRemovePickedName {
      names.removeAll { name in
        name == pickedName
      }
    }
  } else {
    pickedName = ""
  }
} label: {
  Text("Pick Random Name")
    .padding(.vertical, 8)
    .padding(.horizontal, 16)
}
.buttonStyle(.borderedProminent)
.font(.title2)
```
The above code specifies the action of the button click i.e the first closure that's the labelless argument of the button,
then the label of the button is specified as another closure.

#### Enum values can have associated types

It makes a lot of sense for enums to have associated types.  
This is what allows powerful pattern matching with enums.

#### Lazy Stored Properties

Reduces boilerplate. This allows you to specify initializer of a property
but the code isn't executed till the property is accessed.
I wish the property was allowed to be constant too tho instead of `var`. Kinda defeats the purpose of this in a way. If it's not for const, it just feels like a convenience - while if it was supported for consts too that makes it a new powerful
addition to the language allowing you to do something that was not possible
before.
So, the current state makes it less magic and more like monkeypatching.
But anyway, it's convenient.

#### Protocols

feel like Rust traits and I like the trait pattern]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Avoiding assertions in TypeScript]]></title>
        <id>https://maheshbansod.com/blog/avoiding-assertions-in-typescript</id>
        <link href="https://maheshbansod.com/blog/avoiding-assertions-in-typescript"/>
        <updated>2023-12-03T15:37:02.169Z</updated>
        <summary type="html"><![CDATA[Often, when working with Typescript, people tend to go for type assertions to suppress errors. Though that does suppress the immediate error, it is often the case that you're causing yourself a pain by not fixing the underlying issue, and exposing yourself to bugs at runtime. The main advantage of Typescript is the types we define, the more accurate they are to reality the less often you'll encounter type related bugs in production.The rest of this article is about type assertion, non null assertion, and how to avoid it.
]]></summary>
        <content type="html"><![CDATA[Often, when working with Typescript, people tend to go for type assertions to suppress errors. Though that does suppress the immediate error, it is often the case that you're causing yourself a pain by not fixing the underlying issue, and exposing yourself to bugs at runtime. The main advantage of Typescript is the types we define, the more accurate they are to reality the less often you'll encounter type related bugs in production.The rest of this article is about type assertion, non null assertion, and how to avoid it.
<!-- more -->
### Type assertions
In TypeScript, a type assertion is like telling the computer, "Trust me, I know what I'm doing with this data." It's a way to override the default behavior of TypeScript's static type checking. Imagine you have a variable, and TypeScript thinks it's one type, but you're sure it's another. You might use a type assertion to say, "No, TypeScript, it's actually this type."

And, well, as a programmer, it totally is possible that you do know more about the type of data a variable would hold than what the Typescript compiler knows, but in that case, it's better to redefine the type to better model your situation instead of using type assertions at places where you think you want your data to be interpreted as a certain type, or why not just use type guards.?

### Type guards

Type guards are a way to narrow a type to a more specific type via a validation function.
Say, you have a string that can be one of a few possible values and you want to narrow it down to a specific type that a function accepts:
```typescript
type Url = `https://${string}`|`http://${string}`;

declare function crawlUrl(url: Url): string;

declare function isValidUrl(url: string): boolean;

function processInput(url: string) {
	if (!isValidUrl(url)) {
		return;
	}
	const result = crawlUrl(url as Url);
	/* process result */
}
```
Here, we see that the `crawlUrl` function accepts a `Url`, and in `processInput` you can obviously be certain at the point you're calling `crawlUrl` that `url` is a `Url` since you must've exit the function if it isn't, but unfortunately you still needed to assert it's type as `Url`. That's because even though you know that `isValidUrl` has validated `url` at that point, the typescript compiler doesn't.
Though, we can see that typescript is often quite good at type narrowing when we have an early return.
```typescript
function isValidUrl(url?: string) {
	if (!url) {
		return false;
	}
	if (!url.startsWith('http://') && url.startsWith('https://')) { // no TS errors
		return false;
	}
	return true;
}
```
In this example, we use `url.startsWith` , the `startsWith` method is available on a string, so at that point, the typescript compiler knows tat `url` can only be a string and not undefined (if it didn't know that, it would have shown our famous red squiggly line - try it out - since the method `startsWith` doesn't exist on `undefined`). 
This was possible due to our type narrowing above. We immediately return from the function if `url` is defined, and Typescript is smart enough to know that, `url` is not defined inside the `if` body, but it is definitely just `string` after that i.e. it narrows the type `string|undefined` to `string` once the possibility of `undefined` is gone.

Coming back to the previous example, we see that typescript has not inferred that `url` is not any `string` but is a `Url`, so we need to give it a hint that our function `isValidUrl` is actually checking whether it's argument is a `Url`, so if it's not a valid URL, it's whatever type it was before (no narrowing and function returns), and if it is a `Url`, then we move on to the rest of the function's body with the type of `url` narrowed to the more specific type `Url`.
```typescript
function isValidUrl(url?: string): url is Url {
	/* <hidden> */
	if (/* <hidden> */) {
		return false;
	}
	return true;
}
```
It's as simple as setting is return type as `url is Url`. This basically means that if the function returns true then the argument `url` should be narrowed down to a `Url`, otherwise, it should stay the same as it is.
And now, you can use this `isvalidUrl` function anywhere and you won't need to assert as `Url` . Your validation is setting the correct type!
### Non null assertions
Has it ever happened to you? You saw a red squiggly line on your editor, and then you put an exclamation mark on it, and boom the squiggly line's gone! Easy, right?

Well, jokes on you, mate.
You just lied.
You lied to the compiler, you lied the other parts of your code, you lied to the API's consumer.
Yes, dropping a non-null assertion gets rid of an annoying error, but you're not really fixing anything, you're just hiding something.

In fact, the more assertions you make the more places you're creating for bugs to hide.

Here's an example,
```typescript
type Result = {
	success: boolean,
	error?: string,
	data?: string,
}
```
Now, you might be tempted to do something like this:
```typescript
const response = (await fetch<Result>(/* make your API call */)).data;
if (response.success) {
	processMessage(response.data!);
} else {
	processError(response.error!);
}
```

Again, this is something that the programmer knows, because you probably built the API you're fetching from or the API author communicated clearly that if there's an error then the API returns success as false, and an error key, otherwise, success will be true with some data.
This certainly seems okay to go with right? Well, it is, but assertions make it easy to make mistakes in more complex scenarios. It looks okay in this case since we're dealing with six lines of code, with larger code bases and a little complex control flows, assertions like this increase and the area of your code where your asserted value appears increases, meaning you can't 100% trust the typescript compiler at more places because you may have asserted the value of a variable at some other place.
The way to deal with it is to make sure any variable with an asserted type does not live long enough to cause any issues. Make it's life time as low as possible.
A better way to deal with this is of course, telling TypeScript the truth.

#### Discriminating unions

The secret in dealing with non-null assertions always lies in redefining your types to better model the reality of the API contract you have. To fix the problem above, we'll use discriminating unions.
What this means is that instead of a type having keys optionally, we can make the type a union of "real" types.
Here's a better type for the above:
```typescript
type Result = {
	success: true,
	data: string,
} | {
	success: false,
	error: string,
}
```
This type makes it clear that the key `data` is present only when `success` is `true` and similarly, `error` is only present when `success` is `false`. Typescript can now infer the type in your branches and the same code above would compile without the type assertion.

The key `success` is discriminating your `Result` union. It's an incredible pattern and you should definitely use it if you use typescript, get rid of those pesky optional types.

### Narrowing
I already talked about narrowing in the sections above, but well, that is usually the most obvious way to go about it. In fact, both of the above rely on narrowing itself so "Narrowing" is more a general thing than a separate technique to deal with 
You have a type that's a string or a number?
Check which one it is, and it'll be narrowed for you!
Often the less we assert, the cleaner your code is. Assertion is definitely a code smell.
If you're tempted to ever use an assertion, just look at your code and think about how you can narrow your type to the type you want instead of asserting it.

What about errors though?
```typescript
try {
	if (x === 0) {
		throw {"message": "We're not gonna divide by zero over here"}
	}
	console.log("dividing", 5/x);
} catch (e) {
	if (e && typeof e === 'object' && 'message' in e && e.message && typeof e.message === 'string') {
		console.log(e.message.toLowerCase());
	}
}
```
Um, well, yea, that's error handling for you.
Unfortunately at this time, TypeScript's error handling story doesn't look very good... or does it? 🤔
The thing is, you will just never know what the error type can be. The nature of errors is that they're unpredictable. So, in a catch block, the type of error as unknown is the most correct type for it to have.
But what about the type information we already specified?
We throw the type ``{message: string}`` if `x===0` , shouldn't typescript ideally infer that?

Yea, I guess, but again Typescript probably wants you to think that it can be literally any error possible. So, the best way to go about this is of course creating a type guard that takes an unknown and validates whether it's the error type you had thrown.

### Why?
Eh, but why bother?
I want to get rid of the error and move on. I have a lot on my plate right now, I just want to make this thing run!
Well, here's a few reasons why we should get rid of assertions as early as possible:
* It's kind
	* It's kind to someone else working on it
		* If someone looks at the code they would find it more coherent with lesser assertions, since they don't need to know or think about why a value might be asserted to some type there.
	* It's kind to yourself
		* Same as the point above, you don't have to think about why it makes sense for a value to have the type you've asserted it to when you're fixing a bug and come upon it.
* It's correct
	* As a programmer, we are human and have our own limits, asserting adds the possibility of human error that goes unchecked.
* It's useful
	* Less cognitive load: if a variable has been asserted before you have to keep that information in your head that it may still be the more general type it was before assertion.
	* The point of having types is to give a clearer picture of what data a variable might hold, and discriminating unions do a fantastic job at that which also kind of represents some logic about the type.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
    <entry>
        <title type="html"><![CDATA[Making your first game]]></title>
        <id>https://maheshbansod.com/blog/wp-making-your-first-game</id>
        <link href="https://maheshbansod.com/blog/wp-making-your-first-game"/>
        <updated>2020-05-29T14:01:00.169Z</updated>
        <summary type="html"><![CDATA[So, you've learnt programming? You've made some easy programs? Maybe even made a few bigger projects? It's about time for you guys to start making games. If you don't know programming, I encourage you to use google to look for programming tutorials to learn a beginner friendly language like Python. After you're done with that, come here again. 

This tutorial is aimed at people who are \`okay\` at programming in C and are interested in making games. It's also aimed at people who are bored of their life and want to just read something random which involves an <span style="color: orange">awesome</span> orange demon.
]]></summary>
        <content type="html"><![CDATA[So, you've learnt programming? You've made some easy programs? Maybe even made a few bigger projects? It's about time for you guys to start making games. If you don't know programming, I encourage you to use google to look for programming tutorials to learn a beginner friendly language like Python. After you're done with that, come here again. 

This tutorial is aimed at people who are \`okay\` at programming in C and are interested in making games. It's also aimed at people who are bored of their life and want to just read something random which involves an <span style="color: orange">awesome</span> orange demon.
<!-- more -->

My code is available in my github repository:  [github.com/maheshbansod/getoutofhell](http://github.com/maheshbansod/getoutofhell)  
It has more features than what's covered here but you can refer to it anytime to get an idea of what to do.

If you wish to use a language other than C, I encourage you to do so. You'll just have to google a little bit if you're a beginner at that language.

So, let's get started.

We'll be creating a simple text-based game in this tutorial.

You've got to ask yourself what's a game though. You don't have to be technical about it. Think about what a game is for you. Is it something fun? something that excites you? something that fills the void in your life by giving a fake sense of victory? Whatever your definition of a game is, keep it in mind and add that parts of your definition in the game you're making.

A game keeps repeating these three things:  
1. Set/update the internal state.  
2. Show the user something based on some internal state/data  
3. Handle user's reaction and manipulate the internal data.

This is called a game loop. It's what drives your game.

We will start by creating small pieces of working code and gradually add to it consequently creating a complete game.

The game we will be making is a simple guessing game: The user has to guess the number stored in memory with the least amount of tries and our program will tell whether the number user guessed is greater or lesser than the number in memory.

Let's start with the story. We are going to show the user some text(since this is a text based game) conveying the story of the game. Every game needs a story(well, good games do). Try to make it fun and inviting, yet thrilling and dangerous. I encourage you to create your own story but it's fine if you copy the one below too.  
So, create a file called...idk.. call it main.c or something i don't care. Make a main function and in the main function write a printf statement which tells your story:
```c
printf("Due to a series of unfortunate events, your spouse
screamed at you and told you to go to hell. You understood
that they didn't mean it literally but you took the chance 
and set off on your journey to go to hell. You somehow already 
know the way.\nOn the entrance to hell stands a mysterious 
orangish figure..\nYou move closer and realise that you know the 
guy. It's Light the friendly demon. \"Hey buddy,\" you call out. 
You know that Light would never harm you - he's even got friendly 
in his name. He is kinda a jerk sometimes though and would probably
 ask you to solve a riddle or something to let you pass through.
\nYou move closer\n\"Dude, I'm not your buddy. You didn't accept 
my cookies the last time we met. I'm gonna kill you.\"\nYou - a 
brave adventurer - are not surprised at this turn of events. Plus 
you're confident that Light won't kill you.\nSo you approach him 
with your mighty sword and machine gun.\nLight stabs you with his 
claws and tears apart your intestines till you die.\nLight leaves 
the scene.\nYour spirit moves out of your body and reaches Hell.
\nCongratulations! you accomplished your goal!\nHell is just a 
long tunnel. You spend an eternity in Hell but eventually get 
bored. You walk forward with your spirit legs and feel more warmth.
 You realise that you were only sitting in a random tunnel this 
whole time(you still dead tho). Light appears out of nowhere and 
tells you that to return back to life you have to possess a body 
with a compatible ID. He tells you that an ID compatible with you 
is somewhere between 1 and 100. You'll feel either too hot or too 
cold for different IDs based on whether that ID is greater than 
the compatible ID or lesser than it. You think about it. Yep, it 
all makes sense for you.\n");
```

Now that we've set the stage. The next thing to do is to ask the user for some input - i.e. the number that the user will guess. It's better if you stick with your story and provide creative messages to the user.

```c
printf("What ID to possess? ");
scanf("%d", &id);
```

Good! Don't forget to declare the variable `id`. Now that we've read user input it's time to handle it.

```c {1,3,5,7}
if(id > guess) {
  printf("You possess body %d and feel yourself burn. This is fine, you say and get a part of your spirit burnt off. You leave immediately.\n", id);
} else if(id < guess) {
  printf("You possess body %d and feel a chill in your head. You feel your spirit being frozen slowly. This is not a compatible body. You quickly move out.\n", id);
} else { //id=guess
  printf("Ahh.. your heart is cold. You feel your stomach burn. You're alive.\n You're alive.\nYou breathe a sigh of relief and get back to your spouse. They scream at you a lot and throw something metallic and hard at you. You jump and easily block it with your head. They say they missed you. You tell them you missed them too. They hug you and you hug back. It's the tightest hug you've ever recieved.\nYour bones shatter and you die.\n");
}
```

In the above code, we check if the user's number was greater than, lesser than or equal to the number stored in the memory and respond accordingly. The `guess` variable should be initialised to a random value from 0 to 100.

```c
guess = rand()%100;
```

Include the file `stdlib.h` and compile and run the code.

If your run this code multiple times, you'll notice that the number in `guess` is always the same number. Let's change that. Put the following code before you've used the rand() function:
```c
srand(time(NULL));
```
The function to generate a random number(rand()) uses a special variable called seed to generate the random number. If two people have the same seed, then they will generate the same sequence of random numbers. The function srand() allows you to set a seed. We have set the seed to the number of seconds passed since 00:00:00UTC Jan 1, 1970 using the time() function. Also, add the header file time.h for the time() function. Now every time the code is executed, the seed will be different and hence you'll get a different random number in `guess`.

So, at this point, you get a game with only one try to guess the correct ID. That makes winning purely on the basis of luck. We don't really mind luck, it's just the "purely" part that we do mind. We need to make it so that the user can use the info provided(hot or cold) and make another guess and keep going till the user guesses correctly. So let's put the relevant parts in a loop then.

```c {1,10,12}
while(1) {
  printf("What ID to possess? ");
  scanf("%d", &id);
  if(id > guess) {
    printf("You possess body %d and feel yourself burn. This is fine, you say and get a part of your spirit burnt off. You leave immediately.", id);
  } else if(id < guess) {
    printf("You possess body %d and feel a chill in your head. You feel your spirit being frozen slowly. This is not a compatible body. You quickly move out.\\n", id);
  } else {
    printf("Ahh.. your heart is cold. You feel your stomach burn. You're alive.\\n You're alive.\\nYou breathe a sigh of relief and get back to your spouse. They scream at you a lot and throw something metallic and hard at you. You jump and easily block it with your head. They say they missed you. You tell them you missed them too. They hug you and you hug back. It's the tightest hug you've ever recieved.\\nYour bones shatter and you die.\\n");
    break;
  }
}
```

Good! now that you've made an infinite loop, the user can play this game forever too! The game ends when the user makes the correct guess.

Now, let's see what else we can add to this. Woah! My friend Light just appeared out of nowhere and said that I should make it a little harder by setting a limit on how many times the user can guess. I told Light to shut up and mind his own business. I'm dead now.

I'm Light. So let's continue. We'll add a variable called `turn` which stores the number of turns the user got to choose the ID. This provides us with something to give a good score to the user for guessing early.

Declare this variable and initialize it to 0 and increment it by 1 in the loop. Then, check whether the turn no. is, say 7, 'cuz your spirit is made up of 7 spirit organs(I'm not making this up, it's real and don't look it up, just trust Light.) If it's 7 or more, then your spirit is gone and you've already lost. This is where your path ends so surrend your weapons and, wait, someone is stabbing me as I'm typing this. Oh no! How is he still alive? I thought you died. I gotta go guys. Make sure you remember to live. And don't forget m-.

Hi! Yes, so if you did everything so far, here's what your code would look like:

```c {6,11,23,25,26,37-40}
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>

#define SPIRITORGANS_CNT 7
#define UPPERLIMIT 100

int main() {

  int id, guess, turn;
  
  srand(time(NULL));
  
  guess=rand()%UPPERLIMIT;
  turn = 0;
  
  //the story
  printf("Due to a series of unfortunate events, your spouse screamed at you and told you to go to hell. You understood that they didn't mean it literally but you took the chance and set off on your journey to go to hell. You somehow already know the way.\nOn the entrance to hell stands a mysterious orangish figure..\nYou move closer and realise that you know the guy. It's Light the friendly demon. \"Hey buddy,\" you call out. You know that Light would never harm you - he's even got friendly in his name. He is kinda a jerk sometimes though and would probably ask you to solve a riddle or something to let you pass through.\nYou move closer\n\"Dude, I'm not your buddy. You didn't accept my cookies the last time we met. I'm gonna kill you.\"\nYou - a brave adventurer - are not surprised at this turn of events. Plus you're confident that Light won't kill you.\nSo you approach him with your mighty sword and machine gun.\nLight stabs you with his claws and tears apart your intestines till you die.\nLight leaves the scene.\nYour spirit moves out of your body and reaches Hell. Congratulations! you accomplished your goal!\nHell is just a long tunnel. You spend an eternity in Hell but eventually get bored. You walk forward with your spirit legs and feel more warmth. You realise that you were only sitting in a random tunnel this whole time(you still dead tho). Light appears out of nowhere and tells you that to return back to life you have to possess a body with a compatible ID. He tells you that an ID compatible with you is somewhere between 1 and 100. You'll feel either too hot or too cold for different IDs based on whether that ID is greater than the compatible ID or lesser than it. You think about it. Yep, it all makes sense for you.\n");
  
  //the game loop
  while(1) {
    printf("\nWhat ID to possess? ", SPIRITORGANS\_CNT - turn);
    scanf("%d", &id);
    turn++;
    if(turn == SPIRITORGANS\_CNT) break;
    if(id > guess) {
      printf("You possess body %d and feel yourself burn. This is fine, you say and get a part of your spirit burnt off. You leave immediately.\n", id);
    } else if(id < guess) {
      printf("You possess body %d and feel a chill in your head. You feel your spirit being frozen slowly. This is not a compatible body. You quickly move out.\n", id);
    } else { //id=guess
      printf("Ahh.. your heart is cold. You feel your stomach burn. You're alive.\n You're alive.\nYou breathe a sigh of relief and get back to your spouse. They scream at you a lot and throw something metallic and hard at you. You jump and easily block it with your head. They say they missed you. You tell them you missed them too. They hug you and you hug back. It's the tightest hug you've ever recieved.\nYour bones shatter and you die.\nYou are a spirit with %d spirit organs. :)\n", SPIRITORGANS\_CNT - turn);
      break;
    }
  }
  
  if(turn >= 7) {
    printf("That is the perfect answer! You're so smart!\n.\n.\njk you ded\nWhat you looking at? You're gone now.\nLight collects your burnt and frozen organs and dissapears.\n");
  }
  
  return 0;
}
```

Hey, congratulations, you made it this far!

If you've never made a game in your life, this is a great achievement. Especially considering you had to go through all this and tolerate my horrid story and writing. Pat yourself on the back, go ahead.

So, there's one thing left to do. And I'm leaving it to you. You can ask the user if they want to play the game again and start the game again if they want to. They'd probably want to play the game again. Why wouldn't they? You are awesome and have made a great game. There's no reason for someone to not play it again.  
I'll write about how to do this(without posting the code) at the end of this post.

You can add a lot more to this game. Use your creativity and think of ideas on how you'd improve this game.

I encourage the reader who followed the tutorial to make the code more modular. Seperate the code into different functions and similar functions in different files. Add comments to your code - preferably while coding. Learn about Makefiles. Create a github account if you don't have one and upload your first game on your github profile. Share the link of your repo on twitter and mention me([@BansodMahesh](https://twitter.com/BansodMahesh)) for a <3 on your tweet.

So, here goes. Stop reading if you wanna do this yourself. Here's how you'd ask the user whether they want to play again.

Wrap your code within a loop(maybe a do-while loop?) and at the end just ask the user if they want to play again. The condition of the loop(whether the loop continues or breaks) depends on the response of the user.

I've put complete code in this tutorial in my GitHub repo:  
[github.com/maheshbansod/getoutofhell](https://github.com/maheshbansod/getoutofhell)  
You can refer to it if you face any difficulties.

Thanks for reading! I tried to keep it simple. Let me know if you like it and I might post more tutorials.

> This article has been copied mostly as is from my original wordpress blog.]]></content>
        <author>
            <name>Mahesh Bansod</name>
        </author>
    </entry>
</feed>