*removed externally hosted image*
*removed externally hosted image*
Is it just an extreme difficulty spike at this point that I have to trial-and-error through, or am I doing anything wrong?
I would say this is the biggest 'aha' moment for pretty much any developer - the first time you go from "I built this myself" to "A team built this and has supported it for 10+ years". Not only can a team of three or four write a lot of code in ten years - they'll optimize the Hell out of it. It's ten years worth of edge case bugs, attempts to go faster, new features, etc. And it's 'bumpy' because some of it was done by Dev A in their own style, some of it by Dev B, and so on. So you'll find the most beautiful implementation for problems that you haven't even considered before next to "Hello World" level implementation on something else.
The biggest thing you can do to help yourself out is make sure you're clear on their branching strategy. When you're the only one working on your code, it's cool to push to main and occasionally break things and no harm no foul. But for a mature code base, a butterfly flapping its wings on that obscure constructor can have a blast radius of 'okay, we have to rebase to the last stable commit'. When in doubt, 'feature/(what you're working on)'; but there might be more requirements than that, and it's okay to ask. Some teams have feature requests tracked by number, on a kanban board, some put it in their username, etc.
Get the code pulled down, get it running on your machine (no small task), git checkout -b from wherever you're pulling a branch off of (hopefully main or master, but again, it's okay to ask) and then, figure out what the team's requirements are for PRs. Do they have any testing environments, besides building it locally? Do they use linting or some other process to enforce style on PR reviews?
And then....don't move a button. (Unless that button actually needs moved!) But try to mimic something that already exists. Create a second button in the new location. Steal from the codebase - implement something small in a way that has been done before. After the new button works - then remove the old button and see what happens.
The longer you deal with a codebase (and the attendant issues and feedback) the more you'll feel yourself drawn to certain parts of the code that you're familiar with.
Anyway, hope that advice helps! But most of all, don't be scared. You will break things unintentionally. Your code will break things. If there's not a process in place to catch it before it happens, that's not your fault; that's the senior dev/owners fault. But do try to limit the damage by using good branching strategies, only PRing after linting/testing, and otherwise following the rules.
The most compelling argument I heard is that WASM can’t manipulate the DOM and a lot of people don’t want to deal with gluing JS code to it, but aside from that
But other than that, Mrs. Lincoln, how was the play?
You've gotten several other answers that are true and correct - the pain of implementation at this point is greater than the pain points that WASM solves. But this is also a non trivial one - most of what Javascript should be doing on a webpage is DOM manipulation.
At some point, WASM will either come out with a killer feature/killer app/use case that Javascript (and all the libraries/frameworks out there) hasn't figured out how to handle, and it will establish a niche (besides "Javascript is sort of a dumb language let's get rid of it"), and depending on the use case, you might see some of the 17.4 million (estimated) Javascript developers chuck it for....what? Rust? Kotlin? C? C#? But the switching costs are non-trivial - and frankly, especially if you still have to write Javascript in order to manipulate the DOM....well, what are we solving for?
If you're writing a web app where one of the WASM languages gives you a real competitive advantage, I'd say that's your use case right there. But since most web applications are basically strings of api calls looped together to dump data from the backend into a browser, it's hard to picture wider adoption. I've been wrong before, though.
For a second I thought my github was going viral. ;)
This is a hilarious (and interesting!) read.
As a young(er) and slightly shittier web developer, before I really understood or could implement promises effectively (or when my code would 'race' and fail to recognize that the DOM hadn't been loaded yet, so I couldn't attach event listeners yet), I was known to implement a 2 second timeout.
It wasn't pretty, but it worked!
Good advice already in this thread, but I'd add: ask smart questions, and when you're engaging with a senior/mentor, build the picture for them. Everyone (including your mentor) expects you to have questions - they want you to ask questions, rather than just spinning your wheels for days and days. But they also want to know what you've tried and what you've looked at for resources. And despite appearances, they don't always have the entire code base committed to memory. :)
For instance - suppose you'd been asked to, using the UI, return a piece of information from an external API and display it within the UI.
Bad question: "Hey, so I tried to integrate that third party API, but I'm not getting a return."
"Okay - what kind of code are you getting? And what do the docs say?"
🤷♂️
Good question: "Hey, so I tried to integrate that third party API, but the return I'm getting from it is a 401 error. That should be an authentication error - but just in case, I pinged their server from our server, and they can reach each other. The documentation says that I have to use our key to get a JWT, but hitting the endpoint it says gives me a 401 error. I double checked our token; I've got the right one. And I'm sending it in the header as 'auth' like the documentation says. Where else should I look?"
"Oh yeah, that's a tricky one - you have to encode the token before you send it; let me see if I've got an example where you can see what that looks like....."
One of the things that will happen over time, based on the questions that more senior SDEs ask, you'll be able to 'rubber ducky' problem solve by asking yourself the questions that they would usually ask you, and it's shockingly effective to help you sort your own problems out and clear your own blockers.
.xml
*removed externally hosted image*