Live data from Hacker News

When a rewrite isn’t: rebuilding Slack on the desktop

medium.com

211–220 of 408 posts

Re: When a rewrite isn’t: rebuilding Slack on the desktop

#212

" Conventional wisdom holds that you should never rewrite your code from scratch, and that’s good advice. " Speaking as someone who has done a fair number of rewrites as well as watching rewrites fail, conventional wisdom is somewhat wrong. 1. Do a rewrite. Don't try to add features, just replace the existing functionality. Avoid a moving target. 2. Rewrite the same project. Don't redesign the database schema at the…

Incremental rewrites (aka refactoring) is best, but sometimes that's just not viable, which is where I feel conventional wisdom breaks down. If your code is trying to get updated, you can usually refactor. If your code is having a paradigm shift, it's likely any incremental rewrite will take more time and have more duplication without benefit for far too long to be successful.

> Incremental rewrites (aka refactoring)

Refactoring is recoding a component while maintaining it's external interface so that external interactions with the component are unaffected.

Rewrites, incremental or otherwise, do not necessary preserve external interfaces (an incremental rewrite doesn't start clean slate, but instead progresses by gradual replacement of existing code.

The two ideas are not closely connected.

Re: When a rewrite isn’t: rebuilding Slack on the desktop

#213

Switching to ripcord on my laptop was a breath of fresh air. I always wonder why don't these companies develop proper desktop clients that dont wreck mid range laptops...

I never heard of ripcord. I just downloaded it and gave it a try. It suffers the same problems as every single native (non-electron) chat client I've ever used. Primarily it's hideous and you can't change the UI size uniformly. As an older dev who's eye sight isn't as good as it was 30 years ago when I started, it's getting harder and harder to use native apps because the default fonts are so goddamn small. Oh sure,…

You can set `QT_SCALE_FACTOR=2` (or whatever) as an environment variable and the entire UI will scale. But by default, it should be trying to use your desktop scaling and DPI settings -- you might want to try changing those, first.

Re: When a rewrite isn’t: rebuilding Slack on the desktop

#214

Switching to ripcord on my laptop was a breath of fresh air. I always wonder why don't these companies develop proper desktop clients that dont wreck mid range laptops...

I never heard of ripcord. I just downloaded it and gave it a try. It suffers the same problems as every single native (non-electron) chat client I've ever used. Primarily it's hideous and you can't change the UI size uniformly. As an older dev who's eye sight isn't as good as it was 30 years ago when I started, it's getting harder and harder to use native apps because the default fonts are so goddamn small. Oh sure,…

Or you could change your screen resolution?

Re: When a rewrite isn’t: rebuilding Slack on the desktop

#215
post #175
post #169

Earlier quoted context omitted.

Those memory-bloat apps are never, never only memory hogs. They always come with an outsize hit to general system responsiveness, always have UI lag, and so on. These days almost all of them are webtech junk. I still have a few Java programs with that problem —I've been reading "it's in your head, here's a proof that it can't be as bad as you say" for like 20 years now and those folks continue to be wrong in practice…

I've been using Slack on the desktop daily since the alpha version. I've never found it to have UI lag. I honestly think that most people us use phrases like "webtech junk" are offended on principle and not because of any measurable difference that matters to regular users.

Low-latency UIs that respect user input are amazing. They're just quite rare these days. I guarantee the difference is noticeable and makes a difference—look at how everyone liked (and still likes) the UI smoothness and low UI latency of iOS, for example, and iOS, though probably the current front runner on this front for popular operating systems, is just so-so at it.

I guess if my principle is that I like my computer to respond quickly and accurately to my input then yeah, I dislike webtech junk on principle.

[EDIT] as far as it not mattering, everyone I know, including plenty of non-techies, who has used Google Docs hates it, due to the UI lag. Typing with that large a delay between keypress and the letter appearing sucks. They may use it anyway because they have to, but they all complain about how laggy the UI is, responding to clicks and keypresses.

Re: When a rewrite isn’t: rebuilding Slack on the desktop

#216
post #81

Earlier quoted context omitted.

an electron app (teams) beating them will lead them to the conclusion that they shouldnt use electron? I mean, I agree, losing mass marketshare SHOULD lead to a major shakeup on trajectory, and competing on desktop user experience would be a logical next step. But... back to the first sentence of this comment.

Teams is winning because it's being bundled with Office 365. The business model and distribution lets them compete effectively with an inferior product. Slack doesn't have that luxury.

Teams is so inferior I'm not sure they compete for the same market, when team chat become really important Teams is just not an acceptable option in my experience (we had to switch away from Teams last year because there was too many bugs/frustrating issues and basic features missing, like a actually usable search feature).

Re: When a rewrite isn’t: rebuilding Slack on the desktop

#217
post #214

Earlier quoted context omitted.

I never heard of ripcord. I just downloaded it and gave it a try. It suffers the same problems as every single native (non-electron) chat client I've ever used. Primarily it's hideous and you can't change the UI size uniformly. As an older dev who's eye sight isn't as good as it was 30 years ago when I started, it's getting harder and harder to use native apps because the default fonts are so goddamn small. Oh sure,…

Or you could change your screen resolution?

That's a terrible solution. I chose my monitor specifically because it's HIDPI, not high resolution. It's easier on my eyes to read smoothly rendered text in HIDPI than jaggedly rendered text all day long. Changing the resolution subverts that.

Re: When a rewrite isn’t: rebuilding Slack on the desktop

#218
I guess they need to invest some time to experiment with QuickJS[1] so they can produce a binary executable and check how well it performs and how much memory it consumes on any system. I'm really curious about it!

[1] https://bellard.org/quickjs/

P.S.: Yes, Fabrice Bellard did his thing again!

Re: When a rewrite isn’t: rebuilding Slack on the desktop

#219

" Conventional wisdom holds that you should never rewrite your code from scratch, and that’s good advice. " Speaking as someone who has done a fair number of rewrites as well as watching rewrites fail, conventional wisdom is somewhat wrong. 1. Do a rewrite. Don't try to add features, just replace the existing functionality. Avoid a moving target. 2. Rewrite the same project. Don't redesign the database schema at the…

> Don't redesign the database schema at the same time you are rewriting.

Chances are, that's the problem though. You have to re-write because your design is bad enough that it's necessary. The only time you'd re-write without changing the design is when changing languages or platforms.

Post reply on HN