Readit News logoReadit News
richeyryan commented on US Senate passes TikTok divestment-or-ban bill   reuters.com/world/us/sena... · Posted by u/helloplanets
throwaway4good · 2 years ago
Who in the US could realistically buy it? And how could ByteDance sell TikTok without selling its Chinese counterpart Douyin (that it shares its codebase with)?
richeyryan · 2 years ago
It seems like the move is to force ByteDance to set up a company incorporated wholly in the United States, which would then be subject to the oversight of the US government. Then, Byte Dance would lease the IP surrounding TikTok to this separate company. All the US customer data would be siloed on US servers and perused by US agencies and Byte Dance would still get their revenue from the US market. I don't know if the close association with ByteDance and China would still make that sort of arrangement a target of the US government.
richeyryan commented on React has grown beyond its original promise and it's causing more harm than good   md.jtmn.dev/blog/💻+Progr... · Posted by u/OccamsMirror
forgotusername6 · 2 years ago
What's it missing?
richeyryan · 2 years ago
I suspect they want better condition handling. Because JavaScript lacks a useful conditional expression beyond ternary expressions, condition handling in JSX generally uses boolean operators or ternary expressions. Suppose the conditional logic is in any way complex. In that case, your choice is to use nested ternary expressions, which can be hard to read or to somehow break the condition out of the JSX using a helper function or separate component so you can use if statements in a regular function context. SolidJS added conditional helpers to its JSX flavour to address this issue[1]. The React team seems ideologically opposed to the idea as it presumably moves JSX away from using only JavaScript for handling logic.

[1]https://www.solidjs.com/docs/latest/api#show

richeyryan commented on Rivers Cuomo is an active developer on GitHub   github.com/riverscuomo... · Posted by u/volleygman180
wiseowise · 2 years ago
How is that different from writing command-line apps?
richeyryan · 2 years ago
Most computer users don't use command-line apps day in and day out. Most computer users nowadays use chat apps (Discord, Slack, Whatsapp) and have probably encountered bots on those platforms before. There is an inherent familiarity that makes it feel more accessible.
richeyryan commented on How a software glitch at the UK Post Office ruined lives   cnn.com/2024/01/13/busine... · Posted by u/IronWolve
_heimdall · 2 years ago
Can we really say it wasn't the software that ultimately caused this when the software absolutely had bugs?

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.

richeyryan · 2 years ago
Substitute software for standard accountancy practices or a filing system that led to lost files, giving the incorrect impression that postmasters were stealing, and the result would have been the same. The core issue is an organisiation that values avoiding blame at all costs over transparency and accountability.
richeyryan commented on It's the future – you can stop using JPEGs   daniel.do/article/its-the... · Posted by u/FraaJad
richeyryan · 2 years ago
It would be nice if the author would add mozjpeg[1] to the comparison. At certain image resolutions, it can produce smaller file sizes than WebP, and because it is still a jpeg, it has a much better compatibility story, which the author alluded to.

[1]https://github.com/mozilla/mozjpeg

richeyryan commented on Show HN: A JavaScript function that looks and behaves like a pipe operator   github.com/laurentpayot/v... · Posted by u/FroLeMageBlanc
progx · 2 years ago
Its all a problem of formatting, for me this is simple to read.

  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.

richeyryan · 2 years ago
I think the use of template strings simplifies it, even inline:

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.

richeyryan commented on Svelte is surprisingly easy to learn   kaviisuri.com/you-dont-ne... · Posted by u/thunderbong
gushogg-blake · 2 years ago
Having used Svelte on a large project, I found that it did scale reasonably well but that the usual problems did require effort and trade-offs. The two big ones for me were:

- 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).

richeyryan · 2 years ago
Perhaps this falls into the repetitive boilerplate category you referred to, but if you want framework-agnostic domain objects that still work well with Svelte, create your own using the observer pattern.

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.

[1] https://github.com/domfarolino/observable

richeyryan commented on The Importance of Being a Code Reviewer   medium.com/expedia-group-... · Posted by u/kiyanwang
personjerry · 2 years ago
The point of the article seems to virtue-signal on behalf of code reviewing, and yes there are benefits, but they are primarily for the organization and the author of the code.

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.

richeyryan · 2 years ago
In my experience, the quality and depth of my code reviews were a main contributing element in my last promotion conversation for a senior+ role. It wasn't even a metric I had to scrounge up but something my manager proactively raised to justify approving the promotion along with other criteria. Other team members reported to him that my feedback helped their growth.

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.

richeyryan commented on National Geographic lays off its last remaining staff writers   washingtonpost.com/media/... · Posted by u/supportengineer
Reason077 · 2 years ago
Maybe the US page is different from international versions? I'm viewing it from the UK.
richeyryan · 2 years ago
I'm viewing it from Ireland, and half way down the page, I see a full-screen banner for Disney+ with a notable personality from each of their franchises Moana (Disney), Mr Incredible (Pixar), Thor (Marvel), Jyn Erso (Rogue One/Star Wars) and Jeff Goldblum (National Geographic). I suppose that's what you're seeing?
richeyryan commented on Bloomsday: The library’s one-of-a-kind copy of “Ulysses”   blogs.loc.gov/loc/2023/06... · Posted by u/pepys
ramesh31 · 2 years ago
>Joyce never intended for the book to only be read by university professors - he was a man of the people and intended for the book to be read by ordinary people.

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

richeyryan · 2 years ago
I saw a production of Ulysses twice in the Abbey Theatre in Dublin on two separate runs. I had already read the book, but seeing it performed was a completely different experience, like seeing a Shakespeare text performed in film or on stage. Similarly, I saw an adaptation of the Cyclops episode in the New Theatre, which was incredible. I know Ulysses is unfilmable, but I'd like to see someone like Paul Thomas Anderson try.

u/richeyryan

KarmaCake day339January 26, 2017View Original