DEV Community

Cover image for Day 2 - 100daysofcode Webserver basics
Prasham Ashesh
Prasham Ashesh

Posted on • Edited on

Day 2 - 100daysofcode Webserver basics

I have covid and Day 2 was the day when my body begged me to get some rest and I had to give into it. Reminded me of a quote.

A healthy man wants a thousand things, a sick man only wants one.

Since it's been ~12 days since my first symptom and I am on a road to recovery, I think besides the coronavirus it might have to do something with the new syrup I had yesterday πŸ˜…

But, any way I am glad that I did at least a part of what I promised, I read a few articles from MDN frontend guide and did 4-5 questions from FCC JS DS Algo course
I couldn't however post an article, unlike reading tech and coding for years now, writing is something that I am relatively new with. I still occasionally have to run a compiler inside my brain converting Hindi (my first language) to English. πŸ˜„ And who knows what all I'd have ended up publishing in my sleepy state.
I'd say it was a good decision because now as I am writing this article I have the opportunity to recall all that I had read in my sleepy state plus some extra time to reflect on what happened and how it could be avoided in future.

Also, I thought maybe I could start my articles in a 3-2-1 format that James Clear's newsletters come in. His are 3 ideas, 2 quotes, and 1 question. I was thinking of 3 discoveries that day, 2 realizations/quotes, and 1 question.

Articles Covered

What is a web server?

I really like how they explicitly mentioned and differentiated between the hardware web server and the software web server. And the roles each play while serving a request.
A good point - The web server must answer every HTTP request, at least with an error message. (This very line sets up the foundation for HTTP response codes and why)
Web Server

What is the difference between webpage, website, web server, and search engine?

This article certainly clears out the confusion I once had in my early days of the internet, I thought the browser and search engines were one and the same, and that when we type something into the browser it would be the browser that would scout the net and provide me with the results, I was so wrong πŸ˜… With these articles, I certainly am getting nostalgic. πŸ˜„
This also addresses some of the terminologies that is often use by clients or non-technical people. e.g. I have often heard some of my clients addressing the pdf they received via mail as web docs, Web Documents or Web pages. But the above article clarifies it well.

Browsers can also display other documents such as PDF files or images, but the term web page specifically refers to HTML documents. Otherwise, we only use the term document.

Another such confusion that's addressed is between a website and web server.

Don't confuse websites and web servers. For example, if you hear someone say, "My website is not responding", it actually means that the web server is not responding and therefore the website is not available. More importantly, since a web server can host multiple websites, the term web server is never used to designate a website, as it could cause great confusion. In our previous example, if we said, "My web server is not responding", it means that multiple websites on that web server are not available.

Stumbled upon a gold mine of internet terms. See them here
MDN Web Docs Glossary: Definitions of Web-related terms

CSS Basics

This article covered the very basics of CSS and I was glad they were able to showcase CSS with such simplicity.

  • CSS is a stylesheet language
  • Anatomy of CSS Ruleset Anatomy of CSS Ruleset
  • Box model Box model

All in all, it was not much but fits very well in the Two-Minute Rule which states

β€œWhen you start a new habit, it should take less than two minutes to do.”

From the FCC JS DS Algo course I attempted just 5 questions there wasn't much new to learn except one.

  • Most modern programming languages, like JavaScript, don't start counting at 1 like humans do. They start at 0. This is referred to as Zero-based indexing. Day-2 FCC progress 32%

Comments and Conclusion

Well, day-2 was pretty close to being a failure, but the least we can do right now is to make sure it is not repeated again. And that the 2-minute rule is just a worst case scenario and should not become an everyday reality.

On Day-1 I wrote "I will continue with the 100daysofcode challenge, at 2:00pm in the morning right after my lunch every day without fail"
I think I didn't give enough thought to the 2pm I thought I'd be simply able to stack it to after my lunch, while totally forgetting about the After Lunch Fatigue which was only enhanced by my medicines.

Hence I think a better time would be 7pm, I am done with all my fatigues and would be able to close the deal before dinner.

Hence the new statement is
"I will continue ith the 100daysofcode challenge, at 7 pm every day in the evening after gym, every day"

I'll leave you with a song I find motivational and energizing at times, and pretty sure would be an all-time favourite for many Imagine Dragons - Radioactive πŸ₯‚πŸ˜„

Alt Text

Top comments (0)