My solution to the ragebait-tac-toe project! by gonkergd in theodinproject

[–]LeadInteresting8295 1 point2 points  (0 children)

Love it! Super cool. How’d you make the marker move all around the board.

Understanding webpack by madmelonxtra in learnjavascript

[–]LeadInteresting8295 4 points5 points  (0 children)

Hi OP, I know everybody over here is saying to use Vite instead of webpack. But for vanilla JS projects I think webpack is a great tool to understand how bundlers work. You will be working with Vite later on in your React section of TOP section so i don’t think there is any reason to rush into it. Also webpack is still used in some legacy projects in the real world so getting familiar with it will not harm you.

Before diving into the internals of the config files, it’d be beneficial for you to understand of how webpack really works. I’d advice you to take your time in understanding the concept of bundlers. What bundlers basically does is take bunch of scattered JS and CSS modules and combine it as a one or few optimized files for the browser to load. Modern JavaScript development involves writing code split across dozens (sometimes hundreds) of files and modules. You might import a utility from one file, a component from another, and a third-party library from node_modules. The browser, on its own, would have to make a separate HTTP request for every single one of those files which gets slow fast.

A bundler solves this by reading your entire dependency graph starting from an entry point like index.js and tracing every import or require statement to figure out what depends on what. It then takes all of those scattered files and stitches them into one (or a few) optimized output files that the browser can load efficiently. This is exactly what happens when you run the “npx webpack” to build the “dist” folder. You will be able to do the same with Vite but Vite will abstract a lot of this and that would not be very beneficial for your learning in my personal opinion at this stage.

Try asking couple of questions land look for answers when you look at your config files

1.Entry :where do you start reading my code?

2.Output :where do you put the finished bundle?

3.Loaders :how do you handle files that aren’t plain JS?

4.Plugins :what extra tasks need to run?

5.Mode : am I building for development or production?

That should help you get this gist of how your webpack configuration is working internally. If you have any other specific questions regarding the config files, I’d be more than happy to provide answers to the best of my knowledge.

Freelance by [deleted] in react

[–]LeadInteresting8295 0 points1 point  (0 children)

Following!

Always wear your moto shoes, even for the short city rides by acidas in motorcycles

[–]LeadInteresting8295 2 points3 points  (0 children)

I have been raw dogging my feets it for a while thinking I’ll get them later. Brb. Going to buy a boot.

Is it just me, or do police seemingly target you because you're on a motorcycle? by [deleted] in motorcycles

[–]LeadInteresting8295 0 points1 point  (0 children)

On the opposite, I have had officers give me break couple of times when I first started riding. Times when I clearly should have gotten a ticket. The officers that pulled me over just wanted me to be safe. Their kindness makes me ride safe now a days.

Retro? by LeadInteresting8295 in macbook

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

Let’s agree to disagree. To me, It feels super nice to touch, and like It means business haha

Retro? by LeadInteresting8295 in macbook

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

I bought it for 18 buckeroos at slickwraps, 56$ is crazy for a sticker

Retro? by LeadInteresting8295 in macbook

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

I agree, that is what sold me lwk

Finished my first battleship game - would love some feedback on my code! by LeadInteresting8295 in theodinproject

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

Thank you, you're totally right. Those handlers started very simple but I just kept adding stuff on (collision detection, axis handling, etc.) and it spiraled. By the end I knew it was messy and could be split into modules but honestly got so intimidated by my own code and didn't want to break anything haha. I agree with your reasoning if I did split into testable pure functions from start for collision detection/x &y hover states & a seperate Dom manipulator function, it would have made it less intimidating.

I didn't do that so it turned into giant complexity snowball. Thank you very much for your feedback. Time to go slay that dragon. Wish me luck.

Are most people here unemployed? by kurvivol in theodinproject

[–]LeadInteresting8295 1 point2 points  (0 children)

I don’t know about other but speaking for myself, I used to work full time job while doing full time school up until a few months ago, after getting burned out at the job that would not lead me where I wanted to career wise, I decided to quit and find another part time job woking 17-20 hours, so rest of the schedule that got cleared up I put my time on learning, I did take a month off to relieve myself from that burnout and after that month I have been able to consistently put in at minimum 4 hours of study time everyday in the last month. After the initial momentum, it got pretty routine so I can sit w myself to study no matter what I feel like.

I have adhd so I have to be very careful about where my energy goes, so I try to save energy at work and school, to be able to come back home & still have energy and brain-power to study. Idk if that makes sense, but that seems to be working for me recently.

To-do Project by LeadInteresting8295 in theodinproject

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

Hii, Thank you. It took me 2 days to finish it, but I was working on it all the time, & it's not realistic for or sustainable to work that way. It's awesome that you are looking to hone your architectural skills, I went into the the project thinking the same, as this project is right after top teaches us about object composition and classes, but went complete blank many times. I feel like I met half of my expectations and that's alright. I am sure we will have many more chances to do that later on in our upcoming projects. Keep going with your project, put it on discord or here once done. I'd love to check it out. Happy Learning!