Post

Web dev friends: What was your "aha!" moment in web dev? What revelation or scenario made you a senior? What made you find out "how the sausage is made" that fundamentally changed your view on web development? (Please boost for reach 🙏)

13 reposts27 likes

In JavaScript everything is a an object. Functions? Objects. Strings? Objects. Numbers? Objects. All objects with prototypes. Also classes are just syntactic sugar for prototype chaining. I think digging into the output of typescript before ES6 classes was the biggest aha moment for me.

Oh! And prototypes? ALSO OBJECTS! Just another property that is an object itself. And they have their own prototypes! It’s prototypes all the way down baby! It’s why hasOwnProperty exists and behaves in its weird way. Not really weird when you think about prototype chains.

All of the top browsers come with powerful developer tools built in. Tools that will show you raw requests and responses, analyze and tinker with CSS in real time, set breakpoints so you can inspect JS variables. Learning how to use these tools is a real power move.

I'm not really sure if I'm a senior webdev or just a senior annoyance these days, but... Recently it's been the allure and problems around raw DOM APIs: I love me direct access to the DOM, but I can't deny that it's also easy to end up with layout thrashing. A framework's most important aspect is

controlling reads and writes on the DOM, or phasing them. To me at least. Yet, I'd prefer smaller frameworks, because at the end of the day most things in a UI are quite small. eg. Backbone's directness is nice but its lack of phasing and absolutely lackluster control over property access is bad.

Or maybe rather "lackluster attitude to property storage". Just smash everything into the model and access it using generic get/set methods is a horrible way to create efficient code.

I don't know where I'm going with this, but I guess my "seniority" is just having some clue over the sausage and how ugly it is. And still being able to see beauty in it as well... Maybe? :D

Mid 1990’s. Blind colleague asking me why his screen reader said “image, image, image, image…” Turns out the main menu was sliced photoshop images for fancy font, without alt text. Fundamentally changed my world view of the web. Set me on the path to specializing in accessibility.

Something a dear co-worker said to me frequently: “We can always refactor later.” Sounds trivial, but it really unlocked a mindset that plays into agile/scrum as well as TDD, if you think about it. We can always find a solution, then iterate it, make it better.

In the early 2000s, I read a tip to push a submit button 2px down when it was clicked to add some visual feedback (something simple like .send-button:active { position: relative; top: 2px; }). Features like this taught me two things:

a) It can be a good idea to add more stuff than the client/design asked for – not only small animations but also semantics, accessibility, performance etc. And b) I have more fun with web dev when I can add small details – even when I am the only one who knows about or appreciates them.

I was a designer, a colleague lent me a book for the weekend - chapter 1 was conditionals, chapter 2 was for loops. That was 2001 and I haven't really needed anything else.

There are dozens of small aha moments. How HTML maps to the DOM, how simple HTTP (1.0) is, that browsers read CSS selectors from right to left, how setTimeout, events, promises, generics etc. work, but also the importance of good UX.

That some duplication isn't nearly as bad as we've all been taught as juniors and consequently only create an abstraction once it becomes painful not to. Until then, keep it simple and copy stuff.

And another one: break down what you're really doing into basic terms. Often technical terms make things sound more complicated than they actually are. Example: an Auth guard is really just an if statement.

I've had multiple, but one of the first was simply "everything is boxes". Felt like seeing the matrix at the time 😅

Another aha moment was really understanding the request/response cycle, and how most apps are basically just form submits and data processing

I think one of mine when I was first learning JS was understanding async, the idea that not all the code you write runs straight away

Another might be while learning OOP, asking myself *why* they were generically called "classes" and "objects". The former much like CSS classes, because the instances share qualities. The latter because an object is tangible, able to be used and handled, unlike the class which only describes

The browser is a wonderful platform to build for xkcd.com/1367 To answer your question: Realizing the end boss in web development is not how to center a div, but the fact that the pipe between us and our users will always be limited. This is why we need to be smart about what we send over and how.

xkcd.comInstalling

It was the click of imposter syndrome dying that made me a senior. Just recognizing that I know the details of the tools and can find solutions more effectively than when I started.

tbh i can't remember having an aha moment but what i considered useful on my journey to becoming a web developer is having a good understanding of the basics first (mdn is your friend) before jumping into frameworks, design systems, bundlers, alternative runtimes. a strong foundation is key.