289 points · by kgraves · 7y ago · 391 comments
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 same time you are rewriting. Try to keep the friction down to a manageable level.
3. Incremental rewrites are best. Pick part of the project, rewrite and release that, then get feedback while you work on rewriting the next chunk.
- remove one bolt and raise in the air
- slide out rev 30 "parts" from beneath bolt
- slide in rev 40 "upgrade parts" (fuselage, wings, engines, etc) underneath the bolt
- fly "upgraded plane" without a lot of pesky 'new plane" studies
Additionally, in parts of california, how to build a house:
- find existing house
- pick a wall
- remodel everything except for that wall
- reap tax benefits in your 99.9% new house.
Gradually re-written from Java (JBOSS) to Python over about 10 years. Basically the Python side knew what URLs it could handle and proxied the rest over to Javaland. We ended up shutting down the last Java bits early last year.
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.
Then, when that's ready and stable and working with the existing schema, it's way easier to do a refactor and adapt to the new schema too.
Attempting a design re-write without changing the data structures will just result in the same design. And you can't change the data design without then having to change the code to match.
On the other hand, if you need to refactor the database schema, don't rewrite the code. Just do the minimum modifications to keep the app working.
Just don't do both at once.
Edit: Clarified quote of original rule.
It is more along the line of "don't try to do a big-bang release of everything" when you are initially writing an app.
(I think this article should be the new classic.)
> My takeaway from these stories is this: Once you’ve learned enough that there’s a certain distance between the current version of your product and the best version of that product you can imagine, then the right approach is not to replace your software with a new version, but to build something new next to it — without throwing away what you have.
Trello isn’t a rewrite of FogBugz. It’s a brand new product.
I can’t believe FogBugz didn’t share any code with CityDesk.
Rewrites are ALL about the schema.
Look, over time, your initial requirements will change. The initial schema will 100% not be what is ideal.
On a long enough time scale EVERYTHING becomes many to many.
I've found any rewrite of software without restructuring the schema has always been a waste of time.
Usually a quick glance at the schema will shine a bright light on top of all sorts of badness - denormalizations, excessive metadata-driven-ness etc. Rewriting code on top of crud like that would be epensive, and result in a lot of ugly code, which would need to be rewritten again.
They make little sense as soon as a project is completed, even if you rewrite, the software hasn't had time to point you in a direction, a 'nice' rewrite of the same wrong solution is just as useless as a bad implementation of the wrong solution.
They may make sense after a product has matured, since the actual scope of the software will be more defined. The 'correct' schema is starting to reveal itself, but usually it's rare that business wise it's worth rewriting at this stage, adding features is the better choice.
They definitely make sense once a product is fully matured, starting to gather legacy issues - since fighting around all the cruft and incorrect schema restrictions is wasting more time than redesigning it from ground up using the existing implementation as the guide.
100%. rewriting all layers simultaneously is the first step to never finishing.
That's perfectly compatible with the conventional wisdom you claims wrong, which, again, was “you should never rewrite your code from scratch” [emphasis added]
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.
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.
You can rewrite portions of the app and embed the older components in the new app until you rewrite them as well.
Some developers prefer to leave the company during the re-write (which usually happens after 3 years exciting hyper-growth).
In the first case, you have a system that mostly does what you want, but it has architectural issues that make it hard to change. You plan a rewrite. You get buy in from management. But the problem is that the business still needs those changes. If your rewrite takes more than a few months, then you're still going to have to do the changes.
Over time, you end up with 2 groups: legacy and greenfield. The legacy group is usually made up of crufty old salts that don't care what they work on. They just grind it out. The greenfield group contains usually younger people who what to do something new. They want to "get it right" this time. They care deeply about what they work on and so there is usually a fair amount of conflict on the team about how to approach just about anything.
The legacy team grinds along, slowly solving business problems and the greenfield team provides no business value until they are finished (while constantly promising that it will all be amazing as soon as they are done). But the business types see only that the legacy product is doing what they want and that the team is quietly plugging away. The greenfield product does not do what they want and the team seems to be doing a lot of excited talking, but it still isn't finished yet.
So they say, "Wouldn't it be better to move the greenfield team back on the legacy product so that we can get things done faster? After all, they said they couldn't move forward with the old architecture, but it's moving forward just fine. And with more resources it will go along a lot faster. Besides we have these business emergencies that we have to deal with, so let's just put the greenfield project on hold for a while until we can sort out exactly what's best". And the greenfield project is effectively buried.
Now, it doesn't have to turn out this way, but powerful forces point you in that direction and you have to be very careful not to have it happen to you.
The other main problem is that when people think about doing a rewrite the requirements document usually looks like "Do exactly the same thing as the last system". But the problem is nobody actually knows what the last system does precisely while simultaneously they all think they know precisely how the old system works.
You get a lot of push back from the business when you start gathering requirements because the only thing they really want to say is "Just do it like the old system". Only, after months and months of development you end up realising that there were a lot of corner cases that you missed in the rewrite. Oh... and it's not possible in the new architecture to do that without jumping through a lot of hoops.
So, incremental rewrites are best, but only if you can get the business to actually use the greenfield project. Normally they will completely ignore it because their paycheque and their promotion and their happiness depends on being able to do their job at least as well as they could with the old system. And the new system doesn't do everything that it needs to do (because we've released incrementally). What's more the developers keep asking stupid questions like "What do you want it to do" and the business people are responding with "Why can't you listen to me? I've told you one hundred times to do it the same as the old system!"
And so the new system is shunned by the business. It becomes radio active. Unless some upper management type sends a mandate down to force the business to use the new system, nobody will touch it. The upper management, in the meantime are wondering, "Why are we doing a rewrite again? The old system seems to do what we want, while everyone is complaining about the old system".
Yep, it can be done, but it requires considerably amount of help from upper management. You should avoid it at all costs unless you are sure upper management is supporting you all the way.
But even when you are successful, it may just be the beginning of the end. You've managed to stave off cancellation. You've managed to keep user engagement and work through the requirements so that the new system is equivalent. But it turns out that there is some small detail or decision that makes the new product non-viable.
For examples of products I've been personally involved with: Word Perfect 5 was written in assembly code and was not based on Windows. Word Perfect 6 was rewritten in C++ and was based on Windows. The team that did the rewrite were very proud of their work. But they through out all the keybindings in WP 5 (because GUI is way better!). The new rewrite was also very, very slow compared to WP 5. This was the beginning of the end for WP, even though one could definitely say that a rewrite was necessary. They just made the wrong choices.
Similarly, I once worked for Nortel and they had a telephone switch that they sold for $10 million a pop. It had 31 million lines of code (and stinky, stinky, stinky code at that). They realised that they could rewrite it in a fraction of that amount of code. They had 3000 developers working on the rewrite and after a few years they succeeded. Only... it didn't work with all of the business equipment that the old switch worked on. And it turned out that nobody wanted it unless it worked with that equipment. And.. the new architecture was not conducive to making it work with the business equipment. In the end, they gave a few switches to China before they abandoned it.
Rewrites are hard even when you've made the right choice to do it.
That completely fits my experience. If the new code is being used early and can grow iteratively while being relevant and useful, its gonna work out fine.
Having the codebases running side by side somehow is the best choice all around, if it can be managed.
In fact I'm sure this comment will bring out native fanatics in force.
At any rate, good for them. Seems like they reengineered themselves to a happy medium. I can definitely see myself installing it again at some point.
Yes, getting a 5+ workspace client down from ~800+MB to 300MB should be applauded - but the 250MB floor is still too high.
I want to know what’s in the 250MB it’s still using.
(Gmail uses 250MB at runtime in the same Firefox instance, for comparison; I didn't test it in an Electron-like container.)
You pick Gmail as another example. Gmail is a memory hog and fairly slow. For comparison, Fastmail (which company I work for) tends to use 10–15MB in Firefox for slightly different functionality (no chat, and I estimate the Hangouts widget to be about half of Gmail’s bloat, but on the Fastmail side you can load the calendars, contacts and settings modules in the same document comfortably without breaking 20MB), and is a good deal snappier. It comes of careful engineering with performance as a priority, and a small team.
Slack is simply atrocious in these regards. Painfully slow, utterly greedy for memory. I often run it in Firefox rather than standalone to keep its memory footprint down. Whichever way I do it I regularly find it to have crept up over a gigabyte of memory, on my single workspace.
Too high for what? Low end desktops and laptops today come with 8GB of ram. Using ~3% of that for a chat app doesn't seem like a big deal.
Which makes perfect sense. If you're operating on more memory than should be necessary you're gonna be burning a lot more processor/battery than is reasonable, too.
The reasons:
- Cache. RAM may be >8GB but the CPU L1 cache is just 64kB. And L1 cache is about 100 times faster than RAM. From my experience, proper cache management is by far the most important low level optimization, and most of it can be archived by just using less RAM.
- What are you doing with all that RAM? 250MB in absolute terms is huge. The entire Harry Potter series is around 5MB uncompressed. For that size you can also have a 1080p fullscreen RGB image, uncompressed. What it means is that unless you are working with large datasets, these 250MB represent a huge amount of stuff you don't control. Lots of moving parts with potential performance bottlenecks, security issues, etc...
- Every byte your app is using is one less byte for your system caches. Wasting RAM makes your whole system go slower.
- Finally, an ethical argument. Your chat app will run continuously on millions of PCs. On that PC are libraries, kernel code and frameworks where people worked hard squeezing every bit of performance they could. Saving energy and making your apps run to their full potential. For me, a background app made by a company the size of Slack have a duty to be as light as possible, as not to interfere with the actual work people are doing on their machine.
3% on an Electron chat app here, 5% on an Electron text editor there, and pretty soon you’ve managed to replace what could’ve been several apps with small memory footprints plus several gigs of efficient file caching in a users’ RAM with just a few bloated programs crowding out the cache, and made their entire machine considerably less responsive.
Why should it be reasonable for displaying a few megs of text & maybe a dozen megs of images to take 250MB+ of RAM? What is the rest of that memory usage, and why is it loaded? CPUs don't like executing code that's not in cache, so hopefully it's not code. And if it's not code, what is it? Figure a few dozen MB for the graphic buffers, but where's the other 100MB+ gone?
The problem isn’t with Slack itself - as more and more desktop software run on Electron then with 8GB of RAM you can only have a handful of instances open simultaneously before you get performance- crushing disk paging.
While 250MB is a big chunk... I think it's actually okay, even in this extreme case.
Too high for an app that runs continuously.
What gives you that idea? Lots of apps have cruft, but that's nothing to do with Cocoa.
A "Hello, world!" in Cocoa uses around 13 MB, and the application bundle weighs in at 79 kB. The fact that Electron uses a bare minimum of over 100 MB just to get an application running is a source of some understandable consternation.
Personally I would have used those years of development time to go native but it is what it is.
I talked about Redux usage stats and comparison with other alternatives in my "State of Redux" talk at Reactathon earlier this year [0], and my post "Redux - Not Dead Yet!" also addresses some of these aspects [1].
Also, quick plug for our current focus. I'm working on some tutorials for our new Redux Starter Kit package [2], and then will be working on tackling additional functionality to push it towards a 1.0 release [3].
After that, we'll get started on a major revamp of the Redux docs [4] to improve the learning flow, better organize the content, cover more real-world usage topics, and teach using Redux Starter Kit as the "default way to write Redux".
[0] https://blog.isquaredsoftware.com/2019/03/presentation-state...
[1] https://blog.isquaredsoftware.com/2018/03/redux-not-dead-yet...
[2] https://redux-starter-kit.js.org/
[3] https://github.com/reduxjs/redux-starter-kit/issues/82
[4] https://github.com/reduxjs/redux/issues/3313#issuecomment-45...
In reality, there should be a good balance between global and local state. I wrote a Redux FAQ entry that tries to give some rules of thumb for determining what state goes where [2].
When we do the docs revamp, hopefully we can make that kind of thinking more explicit.
I'd be very interested in hearing more details on any issues you may be having with React-Redux, and I'm happy to offer advice for you or anyone else on using it better. HN comments aren't a great place for that, but please file an issue for discussion or contact me in the Reactiflux chat channels on Discord in the #redux channel.
I'd also greatly appreciate any feedback folks would have on weaknesses with the current docs, so we can improve those issues with the docs revamp.
We've had open issues to cover writing a "Performance" docs page for a long time, but no one got around to contributing that, and there's been too many other higher priorities for us to write it. My React/Redux links list does have a section of articles on improving Redux perf [3], if that helps, and there's an FAQ section on that topic [4]. In general, connect more components [5], and use memoized selectors [6] to read data and do transforms.
[0] https://redux.js.org/introduction/three-principles
[1] https://redux.js.org/faq/organizing-state#should-i-put-form-...
[2] https://redux.js.org/faq/organizing-state#do-i-have-to-put-a...
[3] https://github.com/markerikson/react-redux-links/blob/master...
[4] https://redux.js.org/faq/performance
[5] https://redux.js.org/faq/react-redux#should-i-only-connect-m...
[6] https://blog.isquaredsoftware.com/2017/12/idiomatic-redux-us...
After a couple of years working with Redux, I think my interpretation has settled down to:
Redux should be the single source of truth for the pieces of information you decide to put in there.
Rather than putting absolutely everything in the global DB, I now try to restrict that to things that are actually global, such as the user profile data and such.
Also aren't communication apps a perfect use case for Redux due to the need to have events from multiple sources happen in a single store in a linear order?
Lots of folks have used Redux because they were _told_ they "need" to use it. That's always been overkill. And, yes, there are plenty of other viable alternatives that overlap Redux's capabilities in various ways (Apollo, MobX, React context, etc).
So sure, it's not a "must-have", because you should _always_ evaluate tools and determine what's really appropriate for your use case rather than just blindly using something.
But, at the same time, Redux is still very widely used (~50% of React apps), and not going away. So, there's a big difference between "not an automatic must-have" (which is true) and "dead/dying" (which is not).
I am not super knowledgeable about all the exact architectures, but I thought mobile was just starting to adopt the redux architecture vs MVP, MVVM, etc
I use Sagas as well though, and Ive found them ok...really easy to test but feel very heavyweight and clunky; personally, I don't _really_ like the loading/error state to be handled by Redux: the more years I work on React/Redux app the more I prefer for a section of an app to be mounted -> triggering a fetch -> loading, show local loading UI -> {fails, show local UI|succeeds, dispatch success}. So Redux becomes a serializable normalized data cache that acts to store the results of disparate API calls and doesn't care at all much about the UI.
In our main app we also use advanced features like what Slack is describing in their post, like having multiple Redux stores. We also combine stores from multiple sources (e.g. appStore = [...store1, ...store2, ...storeFromALibrary]. It's incredibly flexible.
Something like Redux Saga, Redux Thunks, Redux Observable (my personal preference here), or what have you, are the higher order "toolsets" that Hooks alone aren't likely to replace yet. It may be the case that some of them are going to start targeting Hooks/Context more directly without "needing" an intermediary state engine like Redux, but it's also entirely possible that it will still remain a good reason to make a step change to a state engine like Redux when you find yourself needing higher-order coordination between components that libraries like Sagas, Thunks, or Observables can provide.
Under the hood it uses [cofx](https://github.com/neurosnap/cofx) which is a library I wrote to solve the need to write declarative side-effects without redux.
There's nothing wrong with Redux; we just found that Redux based code tended to have a fair bit of boilerplate, and it wasn't as easy to maintain code using Redux as we would have liked. Every dev team has to find the right place to draw the line on implicit versus explicit, magic versus verbose, convention versus configuration. No real right or wrong answers.
> I thought mobile was just starting to adopt the redux architecture
I don't think so, no. The Redux architecture (ie, reducers, actions, etc.) is fairly specific and not universally loved. I would say that people are starting to really grasp the importance of solving the problems that Redux solves, however.
I think it's the best of both worlds.
And yes, agree on needing more documentation:
https://github.com/reduxjs/redux-starter-kit/issues/59
I've got an example app I put together using RSK, our new React-Redux hooks, and TS, and I'm planning to turn that into a tutorial soon:
Nothing is dead about event sourcing, other then the mob has moved forward in the hype cycle.
- The first iteration was largely powered by jQuery(!)
- Every workspace got its own isolated Electron process because they didn't anticipate multiple workspaces in their initial architecture
Honestly it's amazing they got as far as they did with the above limitations. Sounds like this rewrite was sorely needed after their phase of rapid growth. Glad they pulled it off.
There's no way of knowing, without knowing what they were doing previously. The whole point of React is to leverage the virtual DOM to avoid unnecessary (and very slow) DOM manipulations. Given the sheer number of things Slack has on any given page it isn't unreasonable to expect that React will make things quicker, even if it has a penalty at startup time.
I now do my best to keep my website apps running just in Firefox containers.
Electron feels like the last rush of "write once, deploy everywhere" days of flash and Adobe air. God save us all.
People seem to forget that C++ and opengl is cross-platform. And there are projects far bigger than slack, like ffmpeg and OpenCV that have existed for decades, always had very fast development cycles, with only a subset of the funding and money that Slack has, and stayed native and close to the metal forever.
A better answer would be, that Slack has deemed the benefits that would result from this as not that important. Or that the current team's expertise cannot handle the task. But they always looking into ways of improving the core product and experience.
https://en.wikipedia.org/wiki/Glitch_(video_game)
That core team therefore had a lot of frontend web dev experience. It made sense that they'd stick to their strengths
OpenGL is dying. It's already deprecated on MacOS.
https://appleinsider.com/articles/18/06/04/opengl-opencl-dep...
OpenGL effectively should die... but it's not going to be in favor of raw Metal/Vulkan, except in rare cases. Most people already use engines that abstract most of that away, and Metal/Vulkan are in basically every way better for those engines.
1. Slack is too restrictive, and its API is too poorly supported for anyone to create a port. I find this unlikely, given that the API is extensively documented and that an Emacs port already exists, but maybe there are problems I'm not aware of.
2. Good native ports are actually a lot harder to build and maintain than typical HN posters claim.
3. For all everyone complains about Electron, maybe the current app is good enough for pretty much everyone, including the complainers, and those complaints are largely just hot air.
or 4. A few good, Open Source native ports already exist, and people are just unaware of them.
Regardless, the HN crowd is made up of developers who know how to develop things and use experimental software -- most people on here know how to extract a login tokin, and a lot of people on here are willing to put in a lot of effort to solve problems. If there isn't a native port already, there's very likely a good reason for that.
If there isn't a good reason for it, and it's just that somehow nobody on HN has thought to sit down and build a native app yet, then I'd welcome one, I suppose. But obviously I'm not annoyed enough by Slack to do it myself, and I suspect that most other people posting here fall into that category as well.
Native GUI clients:
- Ripcord: https://cancel.fm/ripcord/
- Wey: https://github.com/yue/wey ("written in Node.js with native UI powered by the Yue library")
- Volt: https://volt-app.com
IRC bridges (allow using Slack from native IRC clients):
- wee-slack: https://github.com/wee-slack/wee-slack
- irc-slack: https://github.com/insomniacslk/irc-slack
- bitlbee: http://bitlbee.org (using libpurple)
libpurple plugin (allows using Slack from Pidgin, Adium, bitlbee):
- https://github.com/dylex/slack-libpurple
- Adium (native macOS app) plugin based on it: https://github.com/victori/slack4adium
CLI clients:
- https://github.com/erroneousboat/slack-term
- https://github.com/haskellcamargo/sclack
- the emacs one you mentioned
Most of these clients don't support 100% of Slack's features, aren't as pretty, and are generally not as 'polished' as the official client. But they're also mostly written by individuals in their spare time, as opposed to a team of full-time employees. So no, I don't think that native clients are 'actually a lot harder to build and maintain'.
The best compromise right now is to aggressively build pretty, heavily themed prebaked designs. Think Material Design, Cupertino etc. so native UI is somewhat good looking too even though it may not be as "rich" as a React one with all the drag and drop animation and flashy trinkets. Feature wise of course there's only marginal improvement to old school Java Swing, but it's certainly easier on the eyes.
Once Riot and Matrix pick up steam, I suspect the Electron debate will be even less of a real issue, since you can pretty safely build a native client for Matrix and know for sure that nobody on the corporate side is going to get annoyed and tell you stop.
Never build your future on someone else's platform.
See Twitter for a good example of where business interests and API stability intersect in negative ways. I would make the point that if you don't trust a business to keep their official API stable, you probably shouldn't be building a community around their tools in the first place, regardless of whether or not they have a native app.
If I'm going to put my resources into building a client for something, it's not going to be based on some closed source backed that could change at any time, it's going to be based on something open and forkable (worst case scenario, I can just maintain my own backend).
Slack bills itself as a complete solution, not a piece to a larger puzzle, so third party clients and plugins will always take the backseat. Who is going to try to build a serious competitor when they can't really rely on the backend staying consistent?
Building a decent frontend isn't particularly difficult. It's not trivial, but it has been done. For example, Pidgin, while a little ugly (I prefer "functional"), works well and has been around for years. I used weechat and irssi for IRC chat before we switched away from IRC, and it worked really well (didn't see pictures, but I think that's more a feature than anything, and links were more than sufficient).
The problem is that business types prefer hosted, "batteries included" solutions, and those types tend to not be very friendly with third party add-ons. If I end up being able to use Matrix/Riot, maybe I'll try my hand at a native, cross platform client. But until then, I'm not going to throw my effort toward something that can change at any moment.
It was posted a few months ago [2] and I’ve been using it since then, it works great.
I'm also a bit concerned of using a closed-source client with Slack.
"Slack connectivity is now available for testing. It's still pretty rough and missing a lot of features."
any further insights here?
could just try it myself, but slack is our key communication so getting more input would be great
If you had come to me 10 years ago and said "Microsoft will drop their browser and use Google's code," I absolutely would not have believed you.
For years slack has been a resource pig on desktop and on the web. So what improvements are you imagining they’ve been working on? Chatting on the internet is hardly such a groundbreaking subject that it can’t be done efficiently.
the ones that are described in the blog post that you're currently commenting on
Name three major feature improvements to Slack in the last three years.
I can think of one, threads, which are a fucking usability disaster and should have been killed immediately. I can't think of a single other major feature.
I use it for incident updates internally too so the discussion is grouped. Much easier than paging through the channel.
It seems Slack has addressed the major issue with their current app with this rewrite — multiple workspaces.
That said, as much as I dislike Electron, Microsoft has done a fine job with VSCode, so there are ways to do Electron “better”, even if the “best” Electron apps are still mediocre compared to native apps
The economics of RAM has changed somewhat but 1990s me is still appalled.
I'm not saying they can't do better, but the app does do quite a lot.
Microsoft has done a fine job with VS Code considering it is built on Electron, but it's a freaking text editor ffs! It has basically zero need for a UI. If this were 1990 and there were no cross-platform filesystem, i/o, network, async, etc. APIs available for native applications, it might make sense. But a text editor is basically the very simplest cross-platform UI you could ever need to design (proper text metrics and rendering is the only gotcha, but if you just shell out to freetype and DirectX rather than doing it all yourself, it's not really a problem).
VS Code is only fast because people compare it to the likes of Atom (which has thankfully dwindled in usage), GMail, and Slack. It doesn't hold a candle to the responsiveness of, say, basic native text editors like Notepad or Text Edit.app, or even horribly written "native" software like Notepad++ back in its heyday (although they might have cleaned up that mess in the decade and a half since I last used it -- I see Scintilla has switched to C++17!). Sublime Text was originally written by just one person and doesn't use a pre-packaged cross-platform editor widget, yet Skinner managed to do it without bundling in the kitchen sink and it shows.
Microsoft has realized this of course, and since the initial release VS Code has shied away from actually using Electron and many features are not implemented as HTML elements/nodes and instead are written bypassing the abstraction entirely because it's literally not possible to get the sort of responsiveness users (sometimes, incredibly meekly and never if they have to actually pay something for it) demand from a code editor if you have to go through Chrome/Chromium's abstractions to do it.
* Syntax highlighting and code folding * Autocomplete * Integrated file browser * Integrated git client * Automatic formatting * File preview * Debugger * ...and a ton more features
Just looking at the screenshots from the release notes (https://code.visualstudio.com/updates/v1_36), I highly doubt this is "the very simplest cross-platform UI you could ever need to design".
Also, as far as I know, the vast majority of the editor is still HTML/CSS/JS, with only a few exceptions (the integrated terminal and project-wide search I think?)
And it also plays little explosion animations around my cursor while I type, which is neat.
But no doubt, Sublime Text exists in a different (native) world of speed altogether (and I do love Sublime Text)
The disappointment is strong.
On a side note, SBlack, a lightweight slack client is very impressive on memory usage [1].
Looks like it just wraps the website in this case.
Yes there are clients that use the API. Slack offers a http rest-like api as well as a websockets realtime api. For example, wee-slack[1] (weechat plugin for slack) and slack-term[2] (curses client in golang).
>Sblack works exactly like a browser with small tweaks. We inject the dark mode style at the end of the Slack’s html, and that’s it.
Another benefit of this is that Safari/WebKit does better with battery life than Chrome. I'll have to give this client a look.
Even though Slack is using react now, they are still using electron under the hood. Which means it can never match the snappiness of a native application like mIRC.
For you ... for me, mIRC is difficult to use, understand, and overall not nearly as aesthetically pleasing as slack.
Not to mention mIRC is missing a ton of features that slack has which specifically makes it better suited for businesses. Push notifications and chat history to name a few.
I've since moved to IRSSI and others, but you are correct about memory/CPU usage and functionality.
Every single '$new-thing' like Slack makes the interaction WORSE, instead of improving it. I wish more SV superstars were greybeard hackers.
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 dork around in the font preferences dialog and change some things, but there is no option to scale all of the UI (UI => Scale => 120%). It ends up being a hodgepodge of unreadable small text mixed with reasonably sized by but poorly styled and colored larger text that's nearly as hard to read because of the lack of space separating elements. Of course everything gets more crowded when you increase the size, instead of doing what it should do and also increasing the space between elements to let everything breath.
In an Electron app, I can Ctrl-+, Ctrl-+ and everything looks great. I have yet to find a single native app that I use regularly where this isn't an issue. The only ones that comes close (no surprise here) is Sublime Text.
These problems just don't happen with Electron apps. Electron technology may be slower than native, but it sure nails UI scaling. I'll take a UI I can actually see over one that runs more efficiently any day.
Honestly, I think it's an accessibility issue. Most devs are simply used to the small GUIs, so that's what they build. They don't give it any real thought or put any actual design effort into it. It's the same with accessibility, it's not my problem so it's not a problem. And while native GUI's help with some aspects of accessibility, they don't provide the tools to make scaling easy and obvious so it doesn't happen.
And that's why people throw fits about software being inaccessible, because it's literally unusable for them. I'm lucky, I just want everything to be 20% bigger by default because it makes my life a little easier. Others don't have that luxury. That 20% can be the difference between being able to use your software or not.
"Features
- Not made from a web browser"
Their first marketing bullet: "It's not made from a web browser" :D
Understanding on why Slack is unable to create a performant desktop-client for their users is beyond me. I also wasn't able to use Slack and Discord at the same time on my MacBook without it swapping on the SSD. So Ripcord seems to be a good lightweight alternative for me.
I just wish it supported Keybase Chat so I can ditch that Electron garbage too.
I suspect that "Why is Linux competitive with Windows" has many of the same answers, in the end.
I was very happy when we switched from HipChat to slack.
Then they switched to QT using WebView (2013) [2].
Then they created Stride using Electron (2017) [3]
Finally they created a partnership with Slack (2018) [4].
[1] https://www.engadget.com/2013/02/14/hipchat-ditches-adobe-ai...
[2] https://techcrunch.com/2013/02/14/with-3500-paying-customers...
[3] https://techcrunch.com/2017/09/07/atlassian-launches-stride-...
I was using from 2017 -> Feb 2019 when we migrated to slack. It definitely had a webview feel similar to slack. I never particularly noted any memory issues. I haven't noticed any with slack either though.
For me my top memory consumers end up being:
1. Docker (web dev servers) 2. Chrome 3. Firefox 4. VSCode 5. 1Password 6. Spark 7. Sublime Text
Even at the bottom of the list they are using 200-300 MBs. Spark, 1Password, & Sublime Text are all "native" apps so I really don't understand what the whole fuss is about.
There is hope though, React Native for Windows team did a presentation showing how bad Electron resource usage was versus their React Native for Windows prototype.
So maybe they could do some advocacy to the VSCode team and start a migration movement.
React Native for Windows is ready for production, it powers their new Skype. It's being rewritten right now from C# to C++ for better performance in their vnext branch.
You have the option to use react-native-web (Twitter's way) to run your React Native app on the web, or use ReactXP (Microsoft's way).
React Native Web forks React Native. ReactXP wraps React and React Native. Two different approaches. Personally I prefer ReactXP because React Native Web will always be too far behind React Native. It's easier for ReactXP to update. Both projects have major backers and power major products.
This seems to be the right update (4.0.0), but on Slack's website the release notes [1] show the release date to be July 15. Is this the same version as I'd get via the Mac update? If so, what's with the press push today (Verge and others), if this has been out for weeks? Also, why is it described as "a little faster" and "a wee bit faster overall" (in the web release notes)? Is it a wee bit faster, or much faster?
1: https://slack.com/intl/en-gb/release-notes/mac?geocode=en-gb
The fact that the web part can be updated separately is why you can hit ⌘R and have new features appear in your workspace.
In my case, I quit and relaunched the (same version of the) desktop app and suddenly my sidebar looked different and I had a popup telling me that Slack was now faster.
The only one that doesn't make sense to me is _2 teams_. Unless they had some specific hack to reuse processes for a 2nd team, how can the incremental memory usage of that 2nd team be almost nothing?
Thinking about it, though- separate teams were lazily loaded and the usage behaviors of people with different numbers of teams probably varies substantially enough to cause these artifacts. e.g. I imagine this is "3-5 teams logged in" not "3-5 teams actively loaded".
(disclaimer: I don't work for Slack, just speculating.)
Before VS Code everyone just accepted Electron's memory bloat, maybe slack even had plans to go fully native b/c no one thought it could be done properly.
Not how I'd describe a text editor that consumes 700MB+ of RAM at any given time.
For reference AIM 4.2 system requirements was 6mb of RAM and 6mb of disk space.
Likely the only reasoble way to have all this and keep it compatible with the browser version is to either build on browser or embed a browser in the native app.
You can argue that all those things are not needed in a group chat, but Slack clearly feels otherwise. They are building a platform, some sort of groupware - not just chat.
Check for example the Doodle bot demo: https://slack.com/apps/AFA5VQJKX-doodle-bot
Considering this took _two years_ it's kinda incredible they couldn't rewrite it natively in that amount of time or less. I'm guessing the only reason this took two years is due to the incremental approach they initially took.
Not sure they changed that but this is always at the back of my mind when I see someone use Grammarly via the browser extension:
https://techbeacon.com/security/grammarly-leaks-everything-y...
Is there a security-conscious Grammarly alternative?
Been trying Language Tool as well: https://languagetool.org/
Not nearly as good as Grammarly, though, but it works with more languages and even has a plugin for vim.
With that being said, can we please have dark mode now?
[1] https://bellard.org/quickjs/
P.S.: Yes, Fabrice Bellard did his thing again!
Would be cool to see a native Reason app from such a big player :)
I realize native apps on the three big platforms is difficult, but they're not using any native components what-so-ever. It's their web interface in a window. They could have used existing toolkits like QT, Gtk or something else, themed them to look like the Slack we're familiar with, and ditched the electron bloat.
I've tried to write a couple of prototypes in electron and have worked on some electron projects and I just don't see why people are flocking to it. Every tutorial is based around huge amounts of boilerplate or scaffolding, and unit testing always seems to require weird freaky hacks with modules.
I mean I guess if it works for them, good on them, but I'm still not going to take this as a sign to recommend or try new projects in Electron.
I fail to see the need for a slack desktop client.
Both are only "native desktop applications" if you squint your eyes.
No, js/html "applications" are not desktop apps, they're web pages. Doesn't matter how you hide it.
And code quality has a huge impact on user experience in the long run. Writing it off as a non-factor is laughably ignorant.
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.
Here are the first sentences of the first two paragraphs:
> Conventional wisdom holds that you should never rewrite your code from scratch, and that’s good advice.
> Still, software codebases have life spans.