Week 7: Lines, Lines, and More Lines
Maleea m -

Again, my fight with my virtual machine persists, this time with an update lasting around 2 hours. đ
Despite my struggles with an invisible robot that lives inside a more physical one, I am building my DNS in Python with the help of CodeCrafters!
Step 1: Reading the Incoming Messages (UDP Packets)
First, I had to figure out how to read the messages that computers send when they ask, âHey, whereâs this website?â These messages use something called the UDP protocol, and they come in as raw dataâa bunch of ones and zeros.
Imagine someone handing you a super long string of numbers and expecting you to know it means âmaleeaisawesome.com.â Thatâs what my server had to do: take in that mess of data, break it apart, and figure out what website the person was asking for.
Itâs like learning a secret code that websites use to talk to each other.
Step 2: Playing Pretend
Once my server could understand those messages, the next step was answering back.
At this stage, it only knew how to give one answer, no matter what you asked. Like if someone asked, âWhereâs maleeaisawesome.com?â my server would always say, âThatâs at 1.2.3.4,â even though thatâs not the real address.
This helped me learn how to send a response that other computers could understand. The hardest part? Making sure the answer was built exactly the way other systems expect it. If itâs even a little off, it doesnât work.
Step 3: Forwarding to Another Server
Of course, my server needed to do more than just fake it. So the next step was teaching it to ask a real DNS server (like Googleâs 8.8.8.8) for help when it didnât know the answer.
So now, when someone asks my DNS server, âWhereâs maleeaisawesome.com?â it goes, âIâll go find out,â asks a real DNS server, grabs the real answer, and then hands it back.
This week consisted of 200+ lines of code and A LOT of help. The largest obstacle I faced through this building process was truly understanding what I was writing. After countless YouTube videos, Reddit feeds, and ChatGPT answers, I am unable to deeply understand every piece that makes up my DNS server. I am excited for college and the chance to dive into how all these pieces fit together and how they truly work.
Next week, I will figure out how to deploy my code and use it for more than just giving me errors and hours of headaches.

dfoginwr9tigh
âFunâ Frightening Fact of the Week:
Prolonged time spent debugging programs can lead to harmful thoughts and lots of tears. (A friend told me this one)
(Iâm that friend)
Comments:
All viewpoints are welcome but profane, threatening, disrespectful, or harassing comments will not be tolerated and are subject to moderation up to, and including, full deletion.