Live data from Hacker News

Software bloat makes me sad

remarkablyrestrained.com

101–110 of 165 posts

Re: Software bloat makes me sad

#101
post #8

Earlier quoted context omitted.

Not gonna burn your karma, however: a) You are failing to account for the bloat caused by the presence of the dynamic linker, the dynamic loader, all the code that must operate under the assumptions of a dynamically linked environment, and the various auxiliaries used to treat shared library hell issues like WinSxS and libtool. b) Most modern static linking implementations do things like sharing of text segments acro…

So maybe my comment stems from ignorance. Are you saying that two Golang projects sharing the same (large, for the sake of the argument) dependency would not take (size of the dependency * 2) on i.e. the Ubuntu live CD (as was the example in the fine article)?

Correct.

I would not be surprised if those two Golang projects take less than the size of the dependency. 2x is a degenerate worst-case.

With static linking, you only need to pull in things you actually need (and you can optimize from there!), whereas with dynamic linking you need to pull in the entire dependency regardless. (You only need to pull in one copy regardless of how many things are using the library, true. But you need to pull in one full copy always.)

There are very few cases where you actually use the entire library in a project - and if you are indeed using an entire library in a project your project is necessarily large enough compared to the library that it's not much overhead percentage-wise.

Re: Software bloat makes me sad

#102
post #49
post #15

point 2 about atom: Well, writing a text editor is far more complicated than it seems at first place.In order to support big files (50mb logs for instance), you need to make all your code rely on complex memory management, streaming and caching. Maybe js is not the right tool for the job in order to implement these features. I always thought that atom should be build in Qt with an api that can interact with JS,a bit…

Atom is a super weird example, wouldn't it bloat the software to add support for files larger than 2MB? Wouldn't that be feature bloat? I mean, a code editor shouldn't have to deal with gigantic files since code shouldn't be written that way [citation needed] .

What if the code isn't written but generated? How would I inspect it with me editor?

Re: Software bloat makes me sad

#103
post #91

One thing that strikes me is the explosion in dependencies in most software. I'm guilty of this, too. I've seen plenty of examples where an entire library or framework is added to a project just for a couple of features. Add a few libraries like that and suddenly you have a few megabytes of additional libraries, where maybe 90% or 95% of the features will never be used. A good article a while back looked at common un…

This is one of the biggest sources of bloat. In the node and ruby ecosystems especially, dependencies proliferate exponentially, where an application pulls in 12 libraries, each of which pull in 12 of their own, which each pull... Downloading the depedencies for Ghost, the node blogging platform with the explicit goal of simplicity and minimalism, takes me minutes. Compare this with the status quo when writing progra…

And you're giving what would be described as the exact opposite example to the parent post: why do node projects have hundreds of dependencies? Because those dependencies do exactly 1 thing most of the time (and usually pull in some other exactly 1 thing dependencies to do it).

Re: Software bloat makes me sad

#104
post #95

Earlier quoted context omitted.

That doesn't excuse resource inefficiency, which is really the main point. The issue of size can be further addressed by separation of mechanism and policy, and building for extensibility.

Are you sure there's inefficiency? Do you have specific points in the code or behavior which are obviously inefficient, or does it just feel "too big"?

The most obvious way it manifests is through progressive performance degradation, delayed response or output delivery times, locking up and an eventual necessity to kill/exec again for usable operation.

It isn't about "feeling big" at all. You can have large, feature-packed programs that still respond quickly and don't fragment.

Re: Software bloat makes me sad

#105
post #72
post #17

Atom and Vim (and imo even Ubuntu) aren't good example of software bloat. While they might be slow and use a lot of memory, they're usually shipped with basic functionality and more functions can be added and removed at any time. Good examples are iTunes, Office, iOS and Android (the latter two are usually shipped with non removable bloatware).

> While they might be slow and use a lot of memory, they're usually shipped with basic functionality and more functions can be added and removed at any time. Isn't that what bloat is? By definition, something that's shipped with "basic functionality" should not consume so much.

The question I ask is: could it be built more lightweight? While there is certainly room for improvement, I really don't think you can have an editor that can be extended by most web developers with much less resources. You could write your own backend engines for js/html but now your using/wasting manpower instead of machine power. The same goes for Vim or Ubuntu: what could you cut to easily make it slimmer without hurting their purpose? Not much imo.On the other hand, the examples I stated have certainly many parts you could outsource to extensions or cut alltogether. To me, bloat means stuff that doesn't serve the software's purpose, and I still don't think the examples in the article have much of that.

Re: Software bloat makes me sad

#106
post #67
post #6

Earlier quoted context omitted.

I dont really understand the link between software bloat and static linking...

When you statically link and executable, all the code from the libraries that it links to (at least the code that is directly or indirectly called by the application) is bundled into the binary. If you have 13 applications running that each statically link in 60% of a 2MB library, then you're using 15.6MB of memory where with dynamic linking you only need 2MB.

On the flip side, if you have a small tool that pulls in 1% of that 2MB library you only need 20KB of memory, whereas with dynamic linking you still need the full 2MB.

Ditto, static linking leads to a lot more optimization opportunities, both in terms of performance and in terms of size. I would be very surprised if that 13 x 60% of a 2MB library was actually anywhere near 15.6MB.

Re: Software bloat makes me sad

#107

>The usual counter to this is that the actual (as opposed to imagined) bottlenecks will only become apparent after intense usage. The usual counter is that "optimising" takes time. And all of the time that you're spending trying to optimise before release is time that no one is able to use your software at all. And the reality is that a lot of the bottlenecks can't be predicted in advance - who knows how may files th…

I could edit a doc with a word processor that could fit onto a floppy, and it worked well. Now, why does the same task require a multi GB pos bloatfest to do the same job? And oftentimes, more slowly! Imagine for a second, the power of today's hardware running optimised lean code. It could be so good, but we accept bloated crappy bug ridden shitfests of OS and application software. We seem to care more about glossy a…

Because it is _not_ the same program. For one the spell checker is much better, for another it has added a grammar checker, for a third it now has change tracking and comments and lots of other goodies.

Don't complain that you don't need those features: it is on you to choose the right tool for the right job. If all you need is a light spell check and text editing, notepad++, vim or Emacs will do nicely. Plenty of people need the more advanced features.

Re: Software bloat makes me sad

#108

Feature bloat is inevitable if you write an application in which thousands of users want different features. Most users want just a subset of the features, and think of the rest as "bloat" even though it might be a core feature for another user. The alternative is multiple lighter applications which would just reduce bloat at the cost of integration, a trade off almost no one seems to want.

Or, you write the application as a plugin-centric architecture with very minimal core features, and go from there.

Not perfect (especially as writing things as plugins tend to introduce a certain amount of bloat regardless), but it can be better regardless.

Re: Software bloat makes me sad

#109

Earlier quoted context omitted.

I came to believe there are two types of programmers - those who get emotionally upset about ineficciencies, and those who couldn't care less. I'm in the first camp, so I understand the feelings of the author perfectly. You say your computer can do "more things much faster" than before - just imagine how many more things, how much faster you could do if the software didn't bloat itself up almost at the same pace as t…

As demand for software grows, a lot more code made by immature (as in beginner, junior, green) developers finds its way to production. Part of it is not code reviewed by senior developers. Another part is but too late in the cycle and goes in anyway because features. The bloat is technical debt accrued in favor of shipping. It probably happens to both types you described, but shipping is a business decision.

It's not always a business decision. GNOME, KDE, X, systemd, dbus... The list goes on and on. None of this software is business derived.

Honestly, an engineer that cares about the performance of their code has several options available: - design the project first, then code later. - design the code for the architecture (arrays of objects vs. objects of arrays). - use tools that can optimize out inefficiencies. - hand optimize after writing a functional slice. - document the APIs and interfaces to explain the performance expected as part of their contract.

Unfortunately, it seems as though we've gotten into a bit of a rut when it comes to this -- we rely on the awful tooling we have to optimize the code we write (yes, LLVM and friends are light years better at this than GCC et. al., but it's still not enough), we never document performance characteristics of the libraries and APIs we create, and we (at least in the OSS world) almost never design our projects to the level of detail necessary to fully understand it.

Honestly, I'm not sure how we can solve these problems if the engineers have a lack of discipline. It's a hobby, after all, right? We do this in our spare time, and nobody wants to write designs or document because that's the least interesting part of coding. See also GTK's autodocs, which for /years/ lay around as nothing more than a simple enumeration of which functions were in the libraries. Even in self documenting languages we fail at this (I'm looking at you, Common Lisp).

Optimizing afterward is a simple, if lazy, way out but post-facto optimization can only take you so far if the design is simply broken.

Since we never document or design, the problem ends up falling to our tooling. Things like oprofile and so on work, but are usually so coarse grained that digging through the code to instrument it effectively becomes a grind nobody wants to do. Maybe we need companies to develop free and open tooling for understanding the performance characteristics of the code we write. After all, the "modern" tooling we use for languages like C and C++ hasn't changed since the 80s, and it's often actually hostile to the end user, which just makes the job harder. Even our linkers often fail to do their jobs of optimizing out useless dependencies or symbols unless we explicitly tell them to do so.

Ultimately, the blame lies with us, the engineers who work on this code. New engineers joining our projects need to understand the code itself through and through. Our projects have become so large that without documentation no-one can make a clear, clean decision on what should or shouldn't be written anymore.

What I want to see is tooling that can semantically understand the code I write, and give me characterizations of the function calls I make as I write them. When I need to examine source to better understand it, I want tooling that tells me how often the functions are called, where they are called, and how. Raw text is great for writing prose, but we're not writing prose -- we're writing code. Our tools should reflect this, and give us as much help as possible.

Re: Software bloat makes me sad

#110
post #87

Earlier quoted context omitted.

> AFAIK, the only Linux desktop environments that come close are GNOME and Unity. I'm the project lead of LXQt. All those things you listed can be supported without introducing much bloat at all. In DEs, most bloat comes from pure technical debt. Unnecessary libraries, duplicated code/libs, etc. Feature bloat is another matter and is more subjective. A lot of it is down to UX. Fun fact: KDE 4.x depends on ruby in mos…

> Fun fact: KDE 4.x depends on ruby in most distros. Do you know why? Dolphin ships with a ruby script to update some folders (don't remember what it does). Nobody runs it. That's it. Why did they allow an additional dependency on Ruby in? It seems like perl or python would be the more logical choice, given they'd already be on the system (heck.. maybe bash?)

Probably because a Ruby activist wrote a cool script and no-one cared about the implications of a new dependency at all.
Post reply on HN