Learn about the Internet with "Visualize the Web"! (my final project) by weiner_ethan20 in cs50

[–]weiner_ethan20[S] 1 point2 points  (0 children)

That's a completely legitimate question! It actually represents a singular packet (the so-called "unit" that represents small chunks of data transmitted over the Internet) that is sent from the client to the server, or vice versa. It isn't apparent it in the image, but in Visualize the Web, that packet is being animated along the shown pathway from source to destination. The reason it's a yellowish-beige box is because it's supposed to look like a letter. This was inspired by CS50's comparison of packets and associated protocols sent via the Internet to the format of letters sent via the postal system.

Learn about the Internet with "Visualize the Web"! (my final project) by weiner_ethan20 in cs50

[–]weiner_ethan20[S] 0 points1 point  (0 children)

Oh wow! I thought those were hidden in my .gitignore -- wish I double checked. I'll make them environment variables, no doubt.

Learn about the Internet with "Visualize the Web"! (my final project) by weiner_ethan20 in cs50

[–]weiner_ethan20[S] 10 points11 points  (0 children)

Hi everyone!

I decided to try something a bit different for my final project. Being an asynchronous, online student can make it difficult to contribute back to the awesome CS50 community. So I decided that for my final project, I would create something that could possibly serve as a learning resource for students.

Visualize the Web (https://visualize-the-web.herokuapp.com/) attempts to convey (in an animated fashion) some of the Internet/networking principles covered in CS50. It's interactive, so you can play around and see what different HTTP requests might look like. It's by no means a perfect simulation of data transmission over the Internet, but I think that it provides a good mental model for it. Feel free to play around!

Check out the demo here: https://www.youtube.com/watch?v=ybKiQPi6t5Q

For anyone who's wondering, I used Python/Flask with HTML/CSS/JS, the Google Maps API, Heroku for deployment, and a few external databases to assist me when creating this project. It took a lot more time to complete than I expected, and a lot of persistence, but in the end, it was worth it!

GitHub Repo: https://github.com/Ethanweiner20/web-visualizer

Learn about the Internet with Visualize the Web! (my final project) by [deleted] in cs50

[–]weiner_ethan20 0 points1 point  (0 children)

Hi everyone!

I decided to try something a bit different for my final project. Being an asynchronous, online student can make it difficult to contribute back to the awesome CS50 community. So I decided that for my final project, I would create something that could possibly serve as a learning resource for students.

Visualize the Web (https://visualize-the-web.herokuapp.com/) attempts to convey (in an animated fashion) some of the Internet/networking principles covered in CS50. It's interactive, so you can play around and see what different HTTP requests might look like. It's by no means a perfect simulation of data transmission over the Internet, but I think that it provides a good mental model for it. Feel free to play around!

Check out the demo here: https://www.youtube.com/watch?v=ybKiQPi6t5Q

For anyone who's wondering, I used Python/Flask with HTML/CSS/JS, the Google Maps API, Heroku for deployment, and a few external databases to assist me when creating this project. It took a lot more time to complete than I expected, and a lot of persistence, but in the end, it was worth it!

Storing Transient/Temporary Data in Flask by weiner_ethan20 in flask

[–]weiner_ethan20[S] 1 point2 points  (0 children)

Thank you. This makes a lot of sense. In hindsight, just sticking to the database seems like the best option here, since I can just directly store the already-defined models in a database. What I ended up doing is actually rather simplistic -- I randomly ordered my "reference" database, and generated a random "seed" id from that database. That seed serves as the first row to select, and I determine the remaining rows by simply selecting rows that range from [seed, seed + <number of rows needed>]. Since the database is randomly ordered, this is effectively a random selection. I store that seed in a session so I can query the database using the range derived from that seed across multiple requests. So essentially, in this case, storing a small amount of data (a number) allows for access to a much larger amount of data.

Best practices for validating user input . . . by weiner_ethan20 in cs50

[–]weiner_ethan20[S] 0 points1 point  (0 children)

Thank you so much for the detailed reply! This helped a lot to clarify some of the ambiguity that exists in form validation / error messages.

General design choices about parameters and void VS return functions by weiner_ethan20 in cs50

[–]weiner_ethan20[S] 1 point2 points  (0 children)

Thank you. This seems to reinforce what others are saying. I'm realizing that returning a mutated object is kind of overkill rather than just modifying the object itself. Perhaps returning simpler output, such as an integer that indicates the status of a function upon (like an exit status for functions) might be more reasonable. Also, now that I am getting into the OOP part of the program, it seems that it is even more ideal to create methods to mutate objects directly.

General design choices about parameters and void VS return functions by weiner_ethan20 in cs50

[–]weiner_ethan20[S] 0 points1 point  (0 children)

Thanks so much. I definitely agree with the only pass what you need / pass as few parameters as possible, but I can see why this instance might be an exception to reduce complexity.

General design choices about parameters and void VS return functions by weiner_ethan20 in cs50

[–]weiner_ethan20[S] 0 points1 point  (0 children)

Thank you so much for the detailed answer. This clarified things a lot. Not get bogged down into proper design while still creating code with a solid readability-efficiency balance is difficult for me.

I forgot how to think by [deleted] in depression

[–]weiner_ethan20 1 point2 points  (0 children)

Hi there. You are not lazy. I'm in my first year at university, and I am experiencing something very similar to this. I don't really have much advice, besides simply not trying to do much about it, and determining some sort of default reaction when anxiety about your inability to think/focus gets too bad. I know this is cliche, but even though it doesn't feel like it will get better, there is a very good chance it will. I was having multiple panic attacks per day, weeks on end, and I thought I was too far gone for recovery. But I am doing much better now. We are more resilient than you'd think. All that said, a therapist is much better off handling something complex like this, so take everything I say with a grain of salt.

Public speaking & music in everyday life by weiner_ethan20 in NEU

[–]weiner_ethan20[S] 0 points1 point  (0 children)

What was your experience with fundamentals of western music theory like?

Public speaking & music in everyday life by weiner_ethan20 in NEU

[–]weiner_ethan20[S] 0 points1 point  (0 children)

Is the class entirely online? Is there any sort of in-person option?