Live data from Hacker News

Software Disenchantment (2018)

tonsky.me

291–300 of 504 posts

Re: Software Disenchantment (2018)

#291
post #35

One thing nobody seems to mention is the environmental cost of inefficient software. All those wasted CPU cycles consume electricity. A single laptop or phone on it's own is insignificant, but there are billions of them. Combine that with the energy wasted shovelling unnecessary crap around the internet, and it adds up to a big CO2 problem that nobody talks about.

I've heard this argument often, but I don't buy it.

1. The environmental cost of ineffective software is negligible, when compared to Bitcoin mining or other forms of hardware planned obsolescence.

2. By using more efficient software, surely, you can save a lot of CPU cycles, and it can improve the energy efficiency of some specific workloads under some particular scenarios. However, on a general-purpose PC, the desire for performance is unlimited, the CPU cycles saved in one way will only be consumed in other ways, and in the end, the total CPU cycles used remain a constant.

Running programs on a PC is like buying things, when you have a fixed budget but everything is cheaper, often people will just buy more. For example, I only start closing webpages when my browser becomes unacceptably slow, but if you make every webpage use 50% less system resource, I'll simply open 2x more webpages simultaneously. LED lightning is another example, while I think the overall effect is a reduction of energy uses, but in some cases, I think it actually makes people to install more lightnings, such as those outdoor billboards.

This is called the Jevons paradox [0].

For PCs, certainly, as I previously stated, in specific workloads under some particular scenarios, I totally agree that there are cases that energy use can be reduced (e.g. faster system update), but I don't think it helps much in the grand scheme of things.

[0] https://en.wikipedia.org/wiki/Jevons_paradox

Re: Software Disenchantment (2018)

#292
post #178

Earlier quoted context omitted.

I wish more companies thought like this in general. I often think about the nature of the work I'm doing as a developer and wonder if it's making society better off as a whole. The answer is usually a resounding no.

Same here, but why exactly? In my country, SW engineer is one of the best careers in terms of income, and I bet it is similar in most of the other countries. Why do we deserve that much buzz/fame/respect/income if the work we are doing is NOT making the society better? These thoughts just haunt me from time to time.

That's obvious. It's a work that by definition reach many others automatically and acts faster than humans, with less human intervention so it saves work. Anything that saves time/money and has this multiplication effect will generate tons of cash. No wonder we catch a part of it.

Edit: in other simpler words, it's useful and scales fine.

Re: Software Disenchantment (2018)

#293
The AI/ML hype drives away talented students from engineering and systems research, as well. Because of the hype engineering somehow is less prestigious than “data science”. Wonder how long until this trend will blow up.

Re: Software Disenchantment (2018)

#294
post #88
post #68

He has a nice follow up which gets to the reasons why https://tonsky.me/blog/good-times-weak-men/ Another take: rewrites and rehashes tend to be bad because they are not exciting for programmers. Everything you re about to write is predictable, nothing looks Clearly better and it just feels forced. First versions of anything are exciting, the possibilities are endless, and even if the choices along the path are subop…

He hints at Electron in the end, but I think the real blame lies on React which has become standard in the past five years. Nobody has any fucking idea what’s going on in their react projects . I work with incredibly bright people and not a single one can explain accurately what happens when you press a button. On the way to solving UI consistency it actually made it impossible for anyone to reason about what’s happe…

This a thousand times. It's amazing how each new layer of abstraction becomes the smallest unit of understanding you can work with. Browser APIs were the foundation for a while, then DOM manipulation libs like jquery, and now full blown view libraries and frameworks like react and angular.

I wrote a little bit more about my thoughts on the problem here: https://blog.usejournal.com/you-probably-shouldt-be-using-re...

Re: Software Disenchantment (2018)

#295
From the OP:

> I hope I’m not alone at this. I hope there are people out there who want to do the same. I’d appreciate if we at least start talking about how absurdly bad our current situation in the software industry is. And then we maybe figure out how to get out.

Okay, I'll respond, especially on the last part "how to get out".

For the problems and struggles in the OP, I've seen not all of them but too many and sympathize. Mostly though, I don't have those problems, and the main reason is in the simple, old advice in the KISS Principle where KISS abbreviates Keep it Simple Silly although the last S does not always abbreviate silly.

In particular my startup is a Web site and seems to avoid all of the problems in the OP. Some details:

(1) Bloated Unreliable Infrastructure?

My Web site is based on Microsoft's .NET with ASP.NET for Web pages and ADO.NET for access to SQL Server (relational database). The version of .NET I'm using is some 4.x. So far I've seen essentially no significant revisions or bugs.

For the software for my Web pages I just used one of the languages that comes with .NET. I wanted to select between two, the .NET version of C# and the .NET version of Visual Basic. As far as I can tell, both languages are plenty good ways to get to the .NET classes and make use of Microsoft's managed code, e.g., garbage collection, and their CLR (common language run time) code. And IIRC there is a source code translator that will convert either language to the other one, a point which suggests that really the two language are deeply equivalent.

I've written some C code off and on for 20+ years; mostly I remember the remark in the Kernighan and Ritchie book on C that the language has an "idiosyncratic syntax" or some such -- I agree. I never could understand the full generality of a declaration of a function -- IIRC there is some code in the book that helps parsing such a statement. I do remember that

i = ++j+++++k++

is legal; I don't want any such code in my startup; also my old tests showed that two compilers gave different results.

I find Visual Basic to have a less "idiosyncratic syntax" and a more traditional syntax closer to the original Basic and then Fortran, Algol, PL/I, Pascal, etc. So, my 100,000 lines of typing are in the .NET version of Visual Basic (VB).

For my Web site, part of the code is for a server process for some of the applied math computing. The file of the VB source code is 478,396 bytes long (the source code is awash in comments), and the EXE version is 94,720 bytes long. As far as I can tell, the code loads and runs right away. Looks nicely small and fast and not bloated or slow to me.

(2) A bloated IDE (integrated development environment).

I have no problems at all with IDEs. The reason is simple: I don't use one.

Instead of an IDE, I typed all my code, all 100,000 lines, into my favorite text editor, KEdit. It has a macro language, KEXX, a version of REXX, and in that language I've typed about 200 little macros. Some of those macros let KEdit be plenty good enough for typing in software.

E.g., I have about 4000 Web pages of .NET documentation from Microsoft's MSDN site. Many of the comments in my VB source code refer to some one of those pages by having the tree name on my computer of the HTML file; then a simple command displays the Web page. When reading code and checking the relevant documentation, that little tool works fine.

After all, VB source code and HTML code are just simple text; so are my Web site log files, the KEXX code, Rexx language scripting code, all the documentation I write either in the code or in external files (just simple text or TeX language input), etc. So, a good general purpose text editor can do well. And, "Look, Ma: I get to use the same spell checker for all such text!" The spell checker? ASPELL with the TeX distribution I use. It's terrific, really smart, blindingly fast, runs in just a console window.

For KEdit, it seems to load and run right away. I just looked and saw that what appears to be the main EXE file KEDITW32.exe is

1,074,456

bytes long -- not so bloated.

(3) Windows 10 Home Edition Reliability.

For a move, I got an HP laptop; it came with Windows 10 Home Edition. I leave it running 24 x 7. It hasn't quit in months. It appears that now the Microsoft updates get applied without stopping the programs I usually have running, e.g., KEdit, the video player VLC, Firefox, etc.

Using carefully selected options for ROBOCOPY, I do full and incremental backups of my files. I keep the ROBOCOPY log output; that output shows the data rate of the backup, and I have not seen that to grow slower over time. The disk in that laptop is rotating, and I've never done a de-fragmentation. So, I can't complain about performance growing slower from bloat, disk fragmentation, etc.

(4) Windows 7 64 bit Professional Server.

For a first Web server, I plugged together a mid-tower case with an AMD FX-8350 processor, 64 bit addressing, 8 cores, 4.0 GHz standard clock speed and installed from a legal CD and authentication code Windows 7 64 bit Professional SP1. As I left that pair running 24 x 7, occasionally it would stop with a memory error of some kind. I installed an update and never again saw any reliability problem in months of 24 x 7 operation.

Since then I looked into Windows 7 64 bit updates and concluded that (i) there was a big roll-up of about 2016 or some such; (ii) since then there have been updates and fixes monthly and cumulative since the big roll-up, and (iii) the updates for Windows 7 64 bits and Windows Server 2008 are the same.

I can believe that Windows Server 2008 long ran and still runs some of the most important computing in the world. So if my Windows 7 64 bit Professional has the same updates as Windows Server 2008, maybe for use as a server my Windows 7 installation will be about the most reliable major operating system in computing so far. Fine with me.

So, I am not screaming bloody murder about operating system or software reliability.

(5) Smart Phone Bloat and Reliability.

I have no problems with smartphones if only because I have no smartphone and don't want one: When smartphones first came out, I saw the display as way too small and the keyboard as just absurd. Heck, in my desktop computing I have a quite good keyboard but would like a better one and, of course, would like a larger screen -- no way do I want to retreat to an absurd keyboard and a tiny screen.

Next I guessed that there would be problems in security, bloat, reliability, system management, documentation, and cost. Maybe history has confirmed some of these guesses!

For a recent move, I got a $15 cell phone and did use it a few times. Then I junked it.

My phone is just what I want -- a land line touch tone desk set with a phone message function from my provider. Works fine. So, I have a phone with lower cost and no problems with keyboard, screen, security, bloat, or documentation. Ah, old Bell Tel built some solid hardware!

(6) Web Site Speed, Reliability, and Bloat.

My Web site apparently has few or no problems with speed, ....

Why? The site is simple, just some very standard HTML code sent from now old and apparently rock solid ASP.NET.

Fast? The largest Web page sends for just 400,000 bits.

The HTML used is so old that it should look fine on any device anywhere in the world with a Web browser up to date as of, say, 10 years ago.

The key to all of this? The KISS Principle.

YMMV!

Re: Software Disenchantment (2018)

#296
post #190

Excerpt: "An Android system with no apps takes up almost 6 GB. Just think for a second about how obscenely HUGE that number is. What’s in there, HD movies? I guess it’s basically code: kernel, drivers. Some string and resources too, sure, but those can’t be big. So, how many drivers do you need for a phone? Windows 95 was 30MB. Today we have web pages heavier than that! Windows 10 is 4GB, which is 133 times as big. B…

My favorite was "Google’s keyboard app routinely eats 150 MB. Is an app that draws 30 keys on a screen really five times more complex than the whole Windows 95? "

I agree in spirit but really most of this is is going to be related to unpacking images of more than 2 colors on a high density display.

Re: Software Disenchantment (2018)

#297

Long ago I watched a documentary about the early Apple days, when management was encouraging their developers to reduce boot times by 10 seconds. The argument was that 10 seconds multiplied by the number of boot sequences would result in saving many human lives worth of time. Edit: found a link with the same story: https://www.folklore.org/StoryView.py?story=Saving_Lives.txt The software world needs more of this kind…

I like the "human lifetimes wasted"-metric. It's interesting to think that a badly optimized piece of code used by a few million people basically kills a few each day. If every manager, client and programmer thought for a second if the 30min they save is worth the human lifespans wasted I think we'd have better software.

Re: Software Disenchantment (2018)

#298

Earlier quoted context omitted.

I respectfully disagree -- something that is 10 times more efficient costs 10 times less energy (theoretically). When the end user suffers a server outage due to load, when they run out of battery ten times quicker, all of these things matter. When you have to pay for ten servers to run your product instead of one, this cost gets passed on to the end user. I was forced to use a monitor at 30 fps for a few days due to…

> Even worse, try using an OS running in a VM for an extended period of time... I do that for most of my hobbyist Linux dev work. It's fine. It can do 4k and everything. It's surely not optimal but it's better than managing dual boot.

Any hints? How are you getting any kind of graphics acceleration? What's your host/guest/hypervisor setup?

Re: Software Disenchantment (2018)

#299
post #276

Performance is one thing, but I'm really just struck by how often I run into things that are completely broken or barely working for extended periods of time. As I write this, I've been trying to get my Amazon seller account reactivated for more than a year, because their reactivation process is just... broken. Clicking any of the buttons, including the ones to contact customer support just take you back to the same…

Khan Academy has some lessons aimed at fairly young kids—counting, spotting gaps in counting, talking that simple. I tried to sit with my son on the Khan Academy iPad app a few weeks ago to do some with him, thinking it'd be great. Unfortunately it is (or seemed to be to such a degree that I'm about 99% sure it is) janky webtech, so glitches and weirdness made it too hard for my son to progress in without my constant…

Send bug reports in to Khan Academy if you get a chance.

Re: Software Disenchantment (2018)

#300
post #99
post #35

One thing nobody seems to mention is the environmental cost of inefficient software. All those wasted CPU cycles consume electricity. A single laptop or phone on it's own is insignificant, but there are billions of them. Combine that with the energy wasted shovelling unnecessary crap around the internet, and it adds up to a big CO2 problem that nobody talks about.

I agree but apparently the number is not very big - computing is max 8% perhaps of electricity usage. But it still feels so wasteful, and also wasteful of people’s time.

I think it's actually the time that matters the most. I think the tens of thousands human lifetimes killed each day on slow software we're forced to use really adds up, how exactly I don't know, it's hard to imagine what humanity would do with the millions of work hours saved.
Post reply on HN