If nothing else this puts into focus plenty of bureaucratic problems, but we wouldn't be here without the underlying buggy software that opened the door for bureaucracy to fail so badly.
const { status } = await
send(
capitalize(greeting)
+ "!"
)
But i would not concat things in a method call, bad style. const message = capitalize(greeting) + "!"
const { status } = await send(message)
The example from the page is a little bit too simple.With complex operations a pipe-method would make more sense.
But i will wait for the native pipeline-operator <https://github.com/tc39/proposal-pipeline-operator> instead using now a function.
const { status } = await send(`${capitalize(greeting)}!`)
console.log(status)
It does reduce the number of discrete operations to make the pipe example look more impressive, though.
- Managing file size and complexity in the component-per-file paradigm. Having all logic for a complex component in one file makes it big, e.g. 1,000 lines, but splitting into multiple files introduces a component boundary and consequent state passing/event handling boilerplate.
- With tight coupling between a complex UI and complex domain objects/data structures, it becomes difficult to reason about data flow. There are multiple ways of binding the data to the UI -- props, stores, standard JS variables, and reactive statements -- but all come with trade-offs and none let you develop domain objects that are completely framework-agnostic without introducing repetitive boilerplate.
For certain types of app I actually really like the DX of writing a UI-agnostic app and then layering Svelte on top of it with event handlers. It's repetitive -- you have to manually listen to events from the domain objects and update local variables with assignments -- but it's easy to reason about and seems to scale well. A good middle-ground might be making the app aware of the Svelte store contract, which is also very simple, but I haven't tried this and the store syntax comes with its own idiosyncrasies (you can't do $obj.store, for example, because only the $obj bit is interpreted as a reference to a store).
Create an object with a subscribe method and whatever other methods make sense for updating its state. Svelte will treat it like one of its stores, and it will work with the $ syntax. It can be used with React via its `useSyncExternalStore` hook. It can be used with SolidJS via its `from` utility.
If you don't want to handle the set-up boilerplate, you could use another library like Effector or RxJS, but of course, that means another dependency. There is a gradual move to make something like this a part of the platform[1], but who knows when or if it will land.
The issue is that as you become more senior and wise to the politics of a tech organization, the more you realize that being the one doing code review offers you very little benefit.
The strongest claims the author writes seem to be that:
> Doing code reviews can be enforced by your company’s CI/CD processes
Yeah ok but that's a problem for the author, not me, because they can't get their code in, and
> The reviewer can learn new tricks and idioms of the language used.
Which I doubt if I'm a senior engineer with the org.
More importantly, doing a code review has a tremendous opportunity cost - all the time and brain power you need to comprehend and consider problems for on someone else's code are resources taken away from your own contributions. In modern tech companies, this translates to directly affecting your performance review by lowering your potential impact.
The main solutions I've seen implemented to counter this have been
1) Some quota for code review, which means everyone just looks for the smallest pull requests possible (although also has the positive effect of encouraging authors to write smaller more comprehensible PRs)
2) Some measurement in your performance review for your "mentorship", an approximate score that factors in your code review and is deeply unsatisfying when trying to justify your promotion with
I was thinking perhaps the right answer would be to consider code reviewers "co-authors" during performance review, but that's not exactly fair either. I don't know, I'm not an engineering manager.
Anyway, for me the article reads as an engineering director or higher trying to virtue-signal their way into convincing mid-high level engineers into doing the dirty, unrewarding work.
The benefits such as learning and knowledge-sharing are trivial and don't need to be listed; If the code review process were rewarded properly, everyone would love doing it and this article wouldn't need to have been written.
However, there is an aspect of being in the right team and company at the right time. If I worked in a team as experienced and knowledgeable as me, my feedback would have less value. I could also easily imagine some managers making the number of reviews an empty metric that had to be tediously gamed, much like green squares on GitHub.
Is it more common than not that senior engineers aren't appropriately rewarded for investing time in code review? Probably, most companies are imperfect in one way or another.
Honestly, he intended the work to be read aloud publicly, in the same vein of epic storytelling as The Odyssey. There's even a recording of him reading a few pages, it's absolutely mesmerizing: https://youtu.be/ZhW0TrzWGmI