Finding Peace

Recently a few of my relatives visited Orissa. There they visited the famous Buddha Statue in Dhauli where presumably the Kalinga war took place and Emperor Ashok accepted Buddhism after seeing so much violence and bloodshed and embarked on a path of peace.

They shared the picture they took there within our family's WhatsApp group. One of my uncles asked them if they experienced peace and tranquility at that place and it got me thinking. Does a place really help one experience peace and tranquility? I'll readily admit that in certain spots in nature like near a stream, sea shore, mountains most people find quiet and feel peaceful. But does really experience peace and tranquility just because of the place? It also depends on the human experiences at those sort of places. Some may have traumatic experiences in so-called peaceful places whereas some may find comfort in the noise of the cities and markets.

Humans have done a marvelous job in creating an environment and possibly mental conditioning on where and how people can feel peaceful. Think flute music, gently flowing stream, ocean sounds among others. Maybe it is the cynic in me, but I have never really found peace and tranquility with these external tools or even in a serene place away from the hubbub of daily life. Yes, you may experience serenity, but I think it is different than peace and tranquility.

You can only experience peace and tranquility with a quiet mind. One can try to go away to a quiet place from the cacophony of modern lives, but is it possible to leave the cacophony of the thoughts behind? Only when one is able to achieve that will they be able to experience peace and tranquility.

Tea

Tea

Tea. Such a simple beverage. And I am not talking about the Chamomile Tea or Mint Tea or Lemon Tea or the Boba tea. I am talking about the tea you get in subcontinent especially in India. The tea that is made out of actual tea leaves, milk, ginger, and a bunch of optional spices. Yes, you got it. I am talking about the Masala Chai but also a lot more than that! At its simplest, it has only four ingredients - Milk, Water, Sugar, and Tea Leaves.

Tea is such an integral part of Indian culture and a lot of things make or break over tea. Friendships are forged, relationships discussed, marriages fixed, business deals finalized, gossip, and what not. Having tea in the middle of the day when the temperatures are soaring is not about the tea, but about a chat with a friend or if alone, just unwinding from whatever is bothering you at that time.

But in its simplicity lies the complexity. Even with just four ingredients, it is not easy to get it right. True that it is basically just boiling a cup of water, but still not everyone can get it right. In fact, I am a big fan of tea and can drink tea at any time of the day and any number of times. But till recently, I was not able to get it right. That tells you how much I love tea.

Even with just four ingredients, the quantity of ingredients added and the order they are added is very important. In quantity depends on how much tea is being made, but basically, you add one teaspoon of tea leaves to 1/2 cup of water and 1/2 cup of milk to make one cup of tea. Sugar is up to the individual's taste, but generally 1 teaspoon or less is what is recommended. Just recently I figured out the order as well and since then the tea has been heavenly.

I used to boil the tea leaves with the water thinking that the tea flavor and fragarence will steep in. But I was overcooking it and the tea was losing its taste. What you need to do is to bring the water to a hard boil and then add milk to it. Once milk is added, add the tea leaves at that time and stir the concoction and stir it well. You can add sugar anytime. When the final product is about to come to boil, that's when you add the crushed ginger and other spices. That's when the tea leaves and ginger release their flavor and make the tea, Tea.

Relationships

Relationships
Relationships

Relationships are like a joint checking account in a bank. You can withdraw love, affection, or care from there whenever you need or want which sounds pretty cool, right? But it is even more important to keep making frequent deposits of your own love, affection, and care for the other person in the relationship. The size of the deposit doesn’t always matter but the deposits have to be necessarily frequent.

I don’t have to say it, but I’ll still say it. If you don’t make those deposits frequently enough, then pretty soon you’ll be overdrawn. Everyone goes through emotional turmoil and sometimes you can get a little overdrawn and it is ok. But you must remember to start making deposits as soon as you get better emotionally otherwise pretty soon resentment starts setting in and from there it starts going downhill.

How can you make a deposit and what deposit should you make? All valid questions and the answers depends on each individual, relationship, and the strength of the relationship. A simple gesture of getting a flower sometimes can go a long way. Sometimes it is being there for the other person when they are going through a rough patch and lending an ear and comforting them is needed. Compassion is definitely one of the most important and essential qualities.

How to fix 404 errors in Laravel application authenication

Introduction

I am not a Laravel programmer by any stretch of imagination but I like to think that I am a pretty good engineer who can solve problems regardless of the situation. Recently I faced a situation where I was working with one of my clients on setting up a validated environment for their customers using a standard operating procedure (SOP). They had gotten the application developed from a third party vendor. Long story short, since their target market is highly regulated industry, they must have detailed and exhaustive documentation of all steps of setting up and tearing down of the computer systems.

It's not easy to write SOPs

There is a video where a father is asking his kids for some instructions to make a peanut butter and jelly sandwich. While for most of us making a peanut butter and jelly sandwich is highly intuitive and easy, for a person who doesn't know what is to be done, it can be stupefying. When we write instructions, we know a lot of things as we have already done the task successfully and assume that the reader is already aware of a lot of things that we know about and do not include those steps in our documentation.
Sometimes it is different. We miss some steps in our documentation and when someone else finds out and reports the gaps, we quickly make the change and do not update the documentation, hoping the problem will not recur. That exacerbates the actual problem. In case someone else has to reproduce the environment using those SOPs then they are basically stuck.
Therefore it is very important to have accurate and correct documentation updated. Admittedly, it is tedious and cumbersome, but in the long run it definitely is the right thing to do.

Laravel and Apache server

I had a Laravel application that was front ended by an Apache server and the backend was MySQL database. The developer had setup an instance and my job was to replicate the same using the SOP that they had built to ensure they are accurate and the process is predictable and repeatable. I followed the steps exactly as documented. I was able to get to the login screen. So far so good. But when I tried to log in using the test credentials, I was shown a 404 - Page not found error. Initially, I worked with the developer and they did something and fixed it. Interestingly, they failed to mention it to me what they did and neither was it documented in the SOP. So as it happened, I had to rebuild the server to try and get the SOP working. I again faced that issue and this time, instead of reaching out to the developer, I did my own research and Voila' I was able to solve the problem.
The research led me far and wide and in one of the forums I found the possible answer which suggested setting AllowOverride All on the parent directory of the application. In my case it was /var/www. The post suggested to set it at the main Apache configuration file. But I always try to localize these solutions and not make global changes if I can help it in order to keep the installation secure. So I added a Directory directive in the VHost configuration file which enables AllowOverride All for that VHost only while leaving the original configuration untouched.

Conclusion

They say that Laravel is a programming language for coding artists with elegant frameworks. But these issues are pretty simple and will be prevalent in all applications that require authentication. Why is this not better documented? More importantly why does the authenticate or login action in Laravel return a 404 error?
I wonder...

What’s the Point of a Foreign Language Class?

Hello! Namaste! Bonjour! Hola! Aloha! Guten Tag! Привет! 你好!

Many students view a foreign language class as something that is required solely for college credits. Once the requisite two or three years of taking a foreign language class are completed, all of that hard-earned knowledge is simply thrown out. As long as the credits show up on the final transcript, the essence of knowing how to speak French, Spanish, Mandarin, or any other foreign language is lost. Learning a foreign language may seem like a short-term achievement and can quickly become a burden if not approached with the right attitude and perspective. As it is, the point of a foreign language class is more than just the ten credits allotted to it; it is more than just learning a new language.

From an academic perspective, a foreign language is not about equations, memorizing formulas, or analyzing literature. The difficulty of learning a new language increases with age, but a different part of the brain is implemented in such a way that is not used in other subjects such as math or science. Learning a language is just as important as taking math, science, and English classes as it helps train all parts of your brain to create well-developed, well-rounded cognitive capabilities. In addition to using computational and analytical skills, a foreign language class challenges a student’s creativity. Because in a foreign language class, students must read, write, speak, and even think in a completely new language, students must use their creativity to weave grammar, spelling, logic, and imagination together to apply a new language in instances such as telling a story, completing comprehensive projects, or analyzing foreign literature, to name a few. In this way, studying a foreign language also contributes to the improvement of other skills such as listening comprehension, problem-solving, memory, and the ability to quickly understand concepts, as all of these are required to fully grasp the flow and application of the language. In the broader perspective, learning a foreign language keeps the brain sharp by testing it to work through the same problems in daily life, only this time, in another language. Beyond the textbooks, however, a Foreign language class provides countless opportunities to become involved in the culture associated with the language and is also meant to help students develop leadership qualities. For example, a Foreign Language class may come with a club and an Honor society in which officer positions are available. These clubs and societies allow students to organize cultural activities and bond with others with a common love for learning the language. Participating in these activities and becoming an officer enhances the learning process by teaching students more about the language and culture, and brings them out of their comfort zone by connecting with other students and shouldering the responsibility of facilitating events, developing students into active learners. Through this experience comes the “A-ha!” moment when students finally realize how to use the knowledge gained from the Foreign Language class in their daily lives, giving students confidence and a reason to feel proud of themselves. The satisfaction of learning and understanding a new, difficult concept is a priceless emotion that is especially prevalent in a Foreign Language class.

Furthermore, the point of a Foreign language class goes beyond the classroom and straight to the heart. A Foreign language class not only teaches you a new language, but also includes information about the corresponding culture and people associated with that culture, all down to the minute details such as the way people interact with each other, facilities such as hospitals, grocery stores, parks, etc., and essential locations with a cultural significance. In this way, a Foreign language class is a window to a different world. Such education is key as it brings the students awareness of other cultures. Students learn to appreciate and respect other peoples, traditions, and customs as well as understand the nature of a people’s culture. Familiarity with the culture and language breeds a mutual understanding of similarities and differences between people and allows for close bonds with one another.

While a foreign language class ultimately teaches a new language, the enlightenment and new horizons that come from learning a new language define the real value of the class. As difficult and arduous as learning a new language may seem at first, grasping the countless opportunities and making it a point to apply the language where possible is a promising way to make the best use of the class. In the end, a foreign language class is not about tests, grades, and credits, but about exploring new territory and cherishing the experience.

Going to Be Good

This article will be good. Cupcakes are good. I have good grades in school. My friend is good. All that’s good, but what do I mean by “good”?

When we say that something or someone is “good”, we have positive, esteemed opinions about what we are referring to. For example, suppose after you watch a movie, you think, “That was a good movie.” We can tell that you really liked that movie, and you have respect for that movie to a certain level. Every day, we use “good” copiously to describe many things in our lives, whether it be in our writing, speech, or ideas. But there’s more to the word “good” than just being a compliment, and this ambiguous word can suggest so many different things. It’s not always enough to declare something as “good”, because its denotation may not always capture the complete meaning behind your ideas and it does not always apply in the same way for everyone.

A Good Time to Use “Good”

“Good” is a very vague word and does not specify what exactly is positive about something. “Good” can take on different meanings in different contexts; you can find qualities of an object that are “good” for different reasons. If I said that a cake is good, there are multiple things that I could mean:

  1. The cake looks good, or the decoration on the cake is really pretty
  2. The cake tastes good (chocolate is the best!)
  3. The cake smells good
  4. The texture of the cake is good (who doesn’t love a soft, spongy cake?)

Notice how “good” is used in each of these descriptions, but it points to a different thing. Because there are multiple meanings behind “good”, every time you present your opinion, try using a more precise word that is specific to the quality that it describes. For example, if I wanted to point out the taste of the cake, instead of “good”, I could say: “The cake is delicious”, or “The cake tastes sweet”. This way, you know that I’m talking about how much I loooovvvveee the taste of chocolate cake.

Another example of an unclear usage of “good” appears in The Hobbit when Bilbo wishes Gandalf a good morning and Gandalf replies,

“What do you mean?” he said. “Do you wish me a good morning, or mean that it is a good morning whether I want it or not; or that you feel good this morning; or that it is a morning to be good on?”

What exactly makes the morning good? Why should the morning be good? It’s a simple greeting, but to whom does it apply? Is there a better word you could use to make the meaning clear?

Let’s replace “good” with “Beautiful”, so then you would say “Beautiful morning”. By replacing good with a descriptive word, I would be able to infer that you’re talking about the weather, the scenery, etc.

In formal writing, always try to avoid the use of the word “good” (unless it appears in direct quotes from a source, then you can’t really change it). “Good” sounds elementary, and we do have a larger vocabulary span than such basic words. One of my biggest pet peeves is when people use “good” in their essays or articles because exactly what they are thinking, or what perspective they have is unclear since “good” is quite flimsy (okay, I know what you’re thinking. I’m using the word “good” because I’m trying to explain why you shouldn’t! Stop it. I’m not a hypocrite). If you’re expressing your opinion about something, try not to say what was good and what was bad, because that doesn’t really say much; add some more depth to your statement. Some terms in my vocabulary include: controversial, beneficial, unreasonable, quixotic, effective, predictable, ulterior [intentions], and rebellious. Using thorough words with specific meanings not only makes your writing formal and advanced, but it also shows the reader that you have clarity in your thoughts.

Banish “good” from your vocabulary. It doesn’t exist. “Very good” doesn’t count either (haha, gotcha!)

Other terms to describe quality (to replace “good”):
vivid, vibrant, delicious, pungent, fragrant, satisfactory, musical, soft, peaceful, thunderous, cheerful, ecstatic, beautiful/handsome, sharp, warm, comfortable, cozy, studious, energetic, dedicated, strong, supportive, excellent

Bottom line: Don’t use “good” in your writing or when speaking because though it is a positive word, it makes things unclear.

My Good, Your Bad

We all have our own standards and our own definitions of what is right for us. In a basic definition, something is “good” when it helps us, and that thing or person is different for each person. Our background, our expectations of ourselves, and our dreams set personal standards that we must meet to feel satisfied.

When we use “good” as a measure of quality, such as a “good” test score, a “good” job, or even what you might consider a “good” book, it can often become an umbrella and become the bar for everyone, not just one person. In some cases, this can lead to the growth and development of a community; on the other hand, a general standard makes several people vulnerable to bullying and discrimination.

From the perspective of a student, a common example of this is that an A is a “good” grade to receive on a test, and any grade below that is disgraceful. On one hand, this pushes students to work harder to do their best and earn an A, but…

When they don’t, they may feel like they aren’t good enough, or that they are dumb (which is totally NOT TRUE). So what do we do?

It’s important to keep high standards of oneself and the community because that’s the only way we can motivate ourselves to strive for success. At the same time, understand and accept that each person has personal goals that will help them meet the higher standards. Don’t judge and condemn others just because they don’t meet your standards. If the results of their work make them happy, then that’s what’s important.

Recently, we had our final exams, and the first exam I took was for science. I was elated to have received a 97%. When I asked one of my classmates what he got, he told me he had a score of 63%. If I had gotten this score, I would be horrified and disappointed in myself, probably fearing the wrath of my parents. But my classmate was perfectly happy with this score as long as he still passed the class. If he was happy, then his score didn’t really matter to me; I just gave him a high-five, celebrating the end of the first final.

You don’t always know the background of other people, and people don’t know your background either. It’s not fair to judge each other based on individual standards. Decide what’s good for you and aim to do the best you can (or even beyond) because, in the end, the only thing that matters is what makes you happy.

So...What’s Good?

Does this mean that “good” is a bad word? No. It’s just not the best word to use. How can you use “good”? Use it to encourage, rather than define.

“Good” is a positive word, so use it in that way. Tell your parents they’ve been good (or how about supportive and kind?) parents. Tell your friends they’ve been good (maybe funny, loyal, and caring?) friends.

By using “good” in the right way, whether it be in writing or in words, we can spread some “good”ness in the world! 🙂

Like A Girl

See her, as she walks by
Instantly think, how she must be shy
Timid, even, oh, let’s not make her cry!
For she must be like a girl
Last to be picked on a team
Playing sports? Oh, in your dreams,
That girl over there? Don’t you see a theme?
For she must be like a girl
This is what they say as they look
Through a murky glass they mistook
For being reality
What do you mean, like a girl?
I am not what you see
There is more than meets the eye
Timid, you say?
Well, I must say, your mind is as narrow as the glass
For I would love to make your acquaintance
If you gave me a chance
I must not be good at sports,
But if you just pass me the ball
You’ll see how I make a slam dunk
Surprised? Don’t be.
Wipe those lenses clean, and look again,
Do you see something different?
It hurts the most when you look through that
Scuffed, old glass
When you don’t look past.
You don’t see it, do you?
You only see gender,
While I see character.

Adventure in Outer Space

This is a story I wrote when I was in 3rd grade for the Young Author's contest. It didn't win, but it makes me laugh every time I read it. It reminds me of how much creativity children have and the innocent way the story was written! This was also the first story I wrote, and since then I've been into writing stories, long and short. You can read some of the other stories I've written throughout my life here.

Introduction

There was once a little girl named April. That’s me! I like adventures very much. Sometimes I go hiking or to the planetarium. But one day I went to an amazing place called Outer Space. Here’s how it all started.

Chapter 1

The Announcement

On Monday at school, my teacher made an announcement. She said, “Boys and girls, this Friday we will have a school carnival. The carnival will start at 7:00 P.M. and will end at 9:00 P.M. Family and friends are welcome.”
Everyone was excited so much that everyone in my class was talking about it at recess. “I wonder what kind of games there would be,” I thought to myself.

I kept thinking about the carnival and I had so many questions that I wanted to ask like: “What kind of food will be there?” or “Who will show up?”.

When I got home I told my parents. They were excited, too. That night I was too excited to sleep. The days went by quickly and I was getting more and more excited. . .

Chapter 2

The Big Day

Finally! The big day has arrived! My family went to my school and I saw my school lit up. There were so many lights! I even saw my best friend, Riley. I went up to her and said, “ Hi Riley. Do you want to play some games?”

“ Sure!” she said.

First we went to the Throw-the-pin-in-the-bottle game. We each got three pins. Everytime I dropped the pin it kept missing! But Riley got all three pins in the bottle! “ Wow Riley! How did you do that?” I said. Riley replied, “ I just aim the pin at the bottle and the pin goes in”.

Next we went to a game where you throw a wet sponge at a cup drawn on a big piece of plastic. This time I won . “ Yay!” I said. “Now we’re equal”, Riley said.
“ Yup”

Then we went to the Moon Jump. We climbed the ladder and started jumping. On my tenth jump, I started going up in the sky.

Chapter 3

The Adventure has started!

“ Oh my god!” I said. “What is going on?!”
I was very scared. I closed my eyes so I won’t feel where I was going. After a few minutes I felt bright light around me. I opened my eyes and I was blinded by the light. I adjusted to the light and I saw outer space. “ This place is so cool!” I exclaimed.

I glided through space and I looked at each and everything. First I went to the planets. I looked at the sun and saw how big it was. I also saw flames shooting out of the sun because it was so hot. Did you know that the sun’s gravity keeps the planets from flying off into space? It’s like the sun doesn’t let the planets play. Then I looked at the planets. “ Mercury, Venus, Earth, Mars, Jupiter,Saturn, Uranus, Neptune” , I said.

Also, did you know that there is another way to memorize all the planets name? It is My Very Excellent Mother Just Served Us Nachos. Then I went to the moon and stood on it. I jumped for a little while and then I above me and looked at the stars. I saw red supergiants, black dwarfs, white dwarfs, nebulas, and red giants. I even saw a shooting star! Did you know that our sun is a star? After I saw all of those cool things I started to head home. “ Now I can pass my science test”, I said

Chapter 4

Home Sweet Home

I was very tired but still excited by playing all the games and learning cool new stuff. I decided to head back home before anyone missed me. During my journey back to earth, I thought and wondered about my adventure and how cool it was. As I was approaching the Earth, I saw the carnival was just about to get over. I looked over for my parents and saw that they were starting to head towards the playground to fetch me. I started descending faster and headed behind the moon-jump so that I can land out of sight.

Just as I was landing my parents reached moon jump and hugged me and asked me if I had fun at the carnival and the playground with my friends.

They had no idea!

Epilogue

As we reached home, I wanted to tell my parents about this fun adventure but I’m sure they won’t believe me. It is after all a fantastic adventure and not everyone gets to go on such a cool adventure. Maybe I will tell them one day...

Implementing nested loops with dynamic step in Python3

Introduction

The other day, my son asked me about the result of evaluation of program in Java that he had in his AP Computer Science A (APCSA) course. This course is as a part of his high school senior curriculum. The problem was quite simple of nested for loops in the control flow section. The code is as below.

    a = 0;
        for (i = 0; i < 10; i++) {
            for (k = 0; k <= 5; k++) {
                for (z = 1; z <= 16; z = z * 2) {
                    a++;
                }
            }
       }
    print a

The problem

As you can see, the problem is simple enough. I had done this kind of for loop in shell scripting and in C language when I was learning it a long time ago and somehow I thought that this was the same way you run a for loop in Python as well. Of course I know Python quite well, so I thought I would quickly port this code in Python and run it to verify the answer of the problem (My son had gotten it right by the way and through a very simple mechanism, I must add).

The for statement is used to iterate over the elements of a sequence (such as a string, tuple or list) or other iterable object. However, Python doesn't allow the developer to define both the iteration step and halting condition. Instead Python’s for statement iterates over the items of any sequence (a list or a string), in the order that they appear in the sequence.

The syntax for a for loop in Python is very simple and intuitive like so:

    for i in some_list:
        <do something>

Most common use case is to iterate some operation a certain number of times. And the easiest way to do it is to use the range function. In the range function, the structure contains the start point, end point and the step. The step takes an integer as an input and it does not accept an expression as a step. Similarly as Python doesn't allow the developer to define the iteration step in the for loop, it posed a problem for me as I the program above required to have the step in the powers of 2 for each loop.

The research

I tried various combinations and options to change the step size in range function, but as the step is a positional argument and doesn't accept either keyword argument or an expression, the choices were limited to only integers (Range also accepts floats but it for another day). I searched far and wide for a solution but to no avail. Finally I hit on the a possible solution on (where else) Stack Overflow.

The person who asked the question had a similar goal as me. The answer to the question was kind of cryptic, but I was able to figure it out as the answer pointed me in the right direction.

The solution

The solution in the end was embarrassingly simple. Here's the final code for this: There are certain commented statements here which I have left here that I used to debug and understand what was going on.

    #########################################
    # Implement nested for loops in Python  #
    # Programmer: Mukul Dharwadkar          #
    # Date: 24 September 2021               #
    #########################################

    a = 0
    for i in range(10):
        for j in range(6):
            c=1
            for k in range(1, 17, c):
                while c < 17:
                    # print(f'Index c is {c}')
                    c = c * 2
                    #print(f"Index i is {i}")
                    #print(f"Index j is {j}")
                    a += 1
                #print(f"The value of a when is i, j, k and c is {i}, {j}, {k}, {c} is {a}")
    print(f'The value of a is {a}') 

As you can see, I needed to initialize a new counter c that would then be used as the step size. In the innermost for loop, I needed to create a stop condition as the counter was completely independent of all other variables. The while loop above creates that stop condition. Inside the while loop, I am incrementing the counter by the powers of two.

The actual operation of interest is the value of a which is incremented by one everytime the loop is executed. So essentially, the easy way once you figure out how many times each loop is executing is to multiple all those values (5 times 6 times 10 in this case) and arrive at the final answer of 300.

    The value of a is 300

The Formation of Our Solar System

If I ask you to name and describe the planets in the solar system, what would you say?

You'd probably say that Mercury, Venus, Earth, and Mars are small and rocky inner planets, and Jupiter, Saturn, Uranus, and Neptune are the gas and ice outer giants.

But do you know why these planets are composed and ordered like this?

The order of the planets actually has to do with the formation of our solar system. Our solar system formed around 4.5 billion years ago. But we’re talking about before the sun even existed!

Protostar

It all started with a large cloud of interstellar gas and dust, called a protostar, like a “primitive star”. The reason it’s a protostar is that it doesn’t have enough energy and fusion reactions to generate heat and light to be a star. Some of the gases in the cloud are hydrogen and helium, which is what our Sun is made of!

So, how does a cloud of, well, stuff, become a radiant star?

The protostar collapses on itself under its own gravity, forming a nebula. As it continues to collapse, its gravity pulls in material from the cloud.

And now we start cooking! The pressure and rising heat generated through the collapses allow nuclear fusion to occur. In a nutshell, during stellar nuclear fusion, hydrogen nuclei fuse together and form helium atoms.

Nuclear fusion releases heat and light, and thus, our Sun was born.

Protoplanetary Disk

Thanks for the FYI, but what does this even have to do with the planets?

I’m getting there.

Welcome to the protoplanetary disk. This is the remaining 1% of the material left from the cloud. That’s right. The Sun is made up of 99% of all of the material in the cloud.

And our planets are going to form from that teeny 1%. I’m not kidding. Seriously.

The nuclear fusion in the nebula caused solar winds around the Sun, scattering the remaining material, creating the disk. The material is mainly metal, rock, light gases, and ice.

Near the sun, obviously, the disk was really hot. Only heat-resistant materials like metal and rock could retain their form in this area. And farther into the disk, it was really cold, where everything froze and became ice.

The area between present-day Mars and Jupiter is called the frost line. Past that, there is a lot of rocks, ice, and other frozen material.

The Great Collisions

So, near the sun, rocky and metallic matter started clumping together, forming the small rocky, inner planets with their metallic cores. These planets were too small to trap any gases, but because of collisions at a certain speed, they became large enough for their gravity to shape them into a sphere.That’s why we get those small, rocky, inner planets at the beginning.

Remember those solar winds?

They blew those gases far away, where it was cold enough for those gases to freeze into ice. And because past that frost line there was so much material, the outer planets grew larger and larger with rocky cores and ices. Eventually their cores were so big that they were able to trap gases such as hydrogen and helium using their gravity, thus becoming gas and ice giants. And that’s why we have our giant gas and ice planets way out in the solar system.

Now you might be wondering: If there was so much material in the disk, why were there only 8 planets in the solar system?

Past Neptune, the disk is too thin and does not allow planets to form. The rest of the material floats around as space junk in the Kuiper belt. And Jupiter is so large that its gravity has a lot of influence in the area around it, gathering material for itself, and other planets could not take their shape, thus creating the asteroid belt.

The rest of the material formed comets, asteroids, moons, meteoroids.

And there you have it! Our very own solar system.