Author Topic: food for thought: code bloat  (Read 15742 times)

0 Members and 1 Guest are viewing this topic.

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23024
  • Country: gb
Re: food for thought: code bloat
« Reply #25 on: June 28, 2022, 07:23:18 am »
Nope I was running on top notch hardware at the time (2004 approx). If was awful. I wrote a POD signature capture engine in c#. It rendered with GDI and compressed a bunch of sampled vectors into binary and HTTP POSTed it to the server before REST was even a thing. The processing was notably horribly slow even after profiling the crap out of it.
 

Offline Vtile

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: food for thought: code bloat
« Reply #26 on: July 06, 2022, 09:11:49 pm »
Kkrieger!
https://youtu.be/JLb839wPeIs

... This game demo is 96 kilobytes.
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23024
  • Country: gb
Re: food for thought: code bloat
« Reply #27 on: July 06, 2022, 09:56:50 pm »
Plus the hundreds of megabytes of kernel, directX and C++ dynamic linked libraries…

The impressive thing is the packer and the procedural generation.

I wrote a raycasting engine on SDL in macOS 10.4 back in the day and it was 14k compiled and stripped with textures. SDL was about 1Mb.
 
The following users thanked this post: Siwastaja

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19509
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: food for thought: code bloat
« Reply #28 on: July 06, 2022, 10:08:32 pm »
Code bloat or the equivalent data puke, means we have far too many computer resources to know what to do with.

Sort of. At the moment, the constraining cost is energy. That's starting to burn the end users now.

Watch the race to the bottom on energy usage. Which is why ARM is popular suddenly.

Eventually the software will be the constraining factor.

The High Performance Computing mob have traditionally pushed the limits, found the pain points, and invented workarounds.

They realised energy was becoming the dominant consideration a couple of decades ago, and their specifications for new systems started to recognise that.

Isn't software already the constraining factor?
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19509
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: food for thought: code bloat
« Reply #29 on: July 06, 2022, 10:16:17 pm »
Bloat exists because it's currently cheaper to leave piles of shit everywhere than clean it up.

There's other reasons. One particularly pernicious one is where marketeers have to specify whats in product N+1. If those marketeers are inexperienced in the product domain, they will say "just like product N because we need to continue to sell it, but add X and Y". Obviously that leads to a wart being added to the hairball.

But if you ask knowledgeable customers, they will sometimes say " don't duplicate N, do something better".
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14476
  • Country: fr
Re: food for thought: code bloat
« Reply #30 on: July 06, 2022, 10:17:03 pm »
Software will push hardware harder and harder to do the "dirty work" of drawing less energy.
By the time it's really *considered* the constraining factor, software development will likely have been handed over to AI, so we'll have only machines to blame.
 :-DD
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23024
  • Country: gb
Re: food for thought: code bloat
« Reply #31 on: July 06, 2022, 10:18:38 pm »
Bloat exists because it's currently cheaper to leave piles of shit everywhere than clean it up.

There's other reasons. One particularly pernicious one is where marketeers have to specify whats in product N+1. If those marketeers are inexperienced in the product domain, they will say "just like product N because we need to continue to sell it, but add X and Y". Obviously that leads to a wart being added to the hairball.

But if you ask knowledgeable customers, they will sometimes say " don't duplicate N, do something better".

Eventually it turns into what looks like an Indian train crash.

 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19509
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: food for thought: code bloat
« Reply #32 on: July 06, 2022, 11:11:06 pm »
Software will push hardware harder and harder to do the "dirty work" of drawing less energy.
By the time it's really *considered* the constraining factor, software development will likely have been handed over to AI, so we'll have only machines to blame.
 :-DD

Age old question: in the battle of artificial intelligence vs natural stupidity, which emerges victorious. References to Idiocracy and HHGttG gain bonus points.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: food for thought: code bloat
« Reply #33 on: July 07, 2022, 04:05:43 am »
 
The following users thanked this post: bd139

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: food for thought: code bloat
« Reply #34 on: July 07, 2022, 05:53:13 am »
sure crayion can try hard provided the correct input  >:D
 
The following users thanked this post: bd139

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23024
  • Country: gb
Re: food for thought: code bloat
« Reply #35 on: July 07, 2022, 06:29:17 am »
Crikey. So now we know that this AI is a mentally ill serial killer.
 

Online tellurium

  • Regular Contributor
  • *
  • Posts: 229
  • Country: ua
Re: food for thought: code bloat
« Reply #36 on: July 15, 2022, 06:40:37 pm »
Keep in mind nobody knows if there's such a thing as software "engineering".
This has been an ongoing debate for decades.

Ok, if software is not "engineering", but a joke.
Who are then people like Dennis Ritchie, K. Thompson, Rob Pike , etc etc? Some random clowns? Or perhaps they are engineers?
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline bd139

  • Super Contributor
  • ***
  • Posts: 23024
  • Country: gb
Re: food for thought: code bloat
« Reply #37 on: July 15, 2022, 06:44:05 pm »
Ironically perhaps Rob Pike is well known for being outspoken about how crap everything is  :-DD

Oh and Unix was a hack.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: food for thought: code bloat
« Reply #38 on: July 15, 2022, 06:59:23 pm »
Keep in mind nobody knows if there's such a thing as software "engineering".
This has been an ongoing debate for decades.
Ok, if software is not "engineering", but a joke.
No, SiliconWizard didn't claim that.  He wrote that nobody knows ... ongoing debate.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14476
  • Country: fr
Re: food for thought: code bloat
« Reply #39 on: July 15, 2022, 07:05:51 pm »
Keep in mind nobody knows if there's such a thing as software "engineering".
This has been an ongoing debate for decades.
Ok, if software is not "engineering", but a joke.
No, SiliconWizard didn't claim that.  He wrote that nobody knows ... ongoing debate.

Yes.
Also, what kind of reasoning was that? Just because it could not be classified as engineering, doesn't mean that it would be a joke.
Engineering has a specific meaning and not all technical activities can be classified as engineering. That doesn't belittle them. Might help a bit to know what points are behind this debate to understand why there is one.
 

Online voltsandjolts

  • Supporter
  • ****
  • Posts: 2300
  • Country: gb
Re: food for thought: code bloat
« Reply #40 on: July 15, 2022, 08:22:15 pm »
Well, I'm gonna call it - yes, software engineering 'is a thing'.

Maybe this was debatable a few decades ago, but now, every man and his daft dog can be an 'engineer'. It's such a diluted term these days it's not even worth arguing over over. Like it's some kind of 'status' or badge of honour. Not any more, suckers. Search your local job adverts for 'engineer'. Literally, my first result was 'Trainee Drainage Engineer' for 'all aspects of drain and pipe cleaning'. So, there you have it, engineers chasing turds away.
 

Offline nfmax

  • Super Contributor
  • ***
  • Posts: 1560
  • Country: gb
Re: food for thought: code bloat
« Reply #41 on: July 15, 2022, 09:39:27 pm »
Some of this may be generational, or following previous designs even when not appropriate.

Case in point, we had some folks visiting from a commercial company with a prototype of a radar they wanted to test alongside some of our equipment. Their RF guy was there to operate the system. He didn't have any software background, but was running code written by their software guy. My jaw dropped a couple of feet when I saw him spin up a docker instance (!!!) to acquire the data from an Ettus Research USRP SDR. Then there was another docker instance to process the data and Matlab to view it. WHY??? I could understand using Matlab for a quick prototype, but docker? Geez!

Sounds like their software dev was someone who had used docker for developing web stuff, and was asked to work on a data acq. system with the above results. They probably consider it either old fashioned or black magic to just write a program to connect to a TCP socket and store the data to disk.

Perhaps the software guy was wise enough to try his level best to ensure that the prototype software he was tasked to develop would never be shipped to end users...
 

Offline radar_macgyver

  • Frequent Contributor
  • **
  • Posts: 698
  • Country: us
Re: food for thought: code bloat
« Reply #42 on: July 15, 2022, 09:48:06 pm »
Perhaps the software guy was wise enough to try his level best to ensure that the prototype software he was tasked to develop would never be shipped to end users...
Maybe so, but if you have a 'batch mode' process like this, you have to wait for your half-hour of data is recorded before you know if it works, or if the ADC cable was disconnected (yes, this happened). It's just not fit for purpose.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: food for thought: code bloat
« Reply #43 on: July 15, 2022, 10:08:16 pm »
They probably consider it either old fashioned or black magic to just write a program to connect to a TCP socket and store the data to disk.
If you have netcat, it'd be just one command: netcat -d hostname-or-address port > file.

You can even do it in Bash: bash -c 'cat < /dev/tcp/hostname-or-address/port > file'.  It internally detects paths like /dev/tcp/ and uses a socket instead, and thus works in Windows also (in WSL, and Cygwin bash).

And if they were a proper web dev, it would have been only a dozen lines of Bash or so to create a minimal WebSocket proxy to handle the HTTP handshake and then just pump the raw data from the specified TCP port directly to the user JavaScript and do the entire UI and processing in a browser.  To optimize it a bit, instead of cat one could use e.g. dd with bs=1500 (a typical TCP packet payload size).

I think it was just the typical highschooler they had hired to do the prototype beta version they intended to initially ship to customers.
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: gb
  • Doing electronics since the 1960s...
Re: food for thought: code bloat
« Reply #44 on: July 17, 2022, 11:49:18 am »
No surprise to me.

I've just this morning decided to scrap a project on which I have paid out about 4k and which doesn't really work. It was based on an open source web server which is so bloated (for the simple tasks needed) that I have no hope of fixing it, and nobody will want to get into it for less than another similar amount, and I can't afford to pay that. Not sure what to do but will try to write it all myself.

A big part of the issue is crap project management. The manager needs to know enough, or almost enough, to do it himself.

Frameworks are all the rage and most will be dead in 5-10 years' time.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 
The following users thanked this post: YurkshireLad

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19509
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: food for thought: code bloat
« Reply #45 on: July 17, 2022, 01:17:45 pm »
Frameworks are all the rage and most will be dead in 5-10 years' time.

Most current frameworks will be dead in a decade, some won't.
New frameworks and languages will arise, will make mistakes that were known and soved 10 years ago, but HR departments will insist on hiring newbies that don't know enough to ask the right questions.
There will be another layer pasted on top on the stack of sync-async-sync-async-sync-async-sync-async-... comms protocols.
Salesdroids and shills and fanbois will falsely claim that the new framework makes distributed computation as easy and semantically equivalent to single thread computation. Managers will believe them.

And that's what history teaches.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: madires, YurkshireLad

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14476
  • Country: fr
Re: food for thought: code bloat
« Reply #46 on: July 17, 2022, 07:40:32 pm »
Frameworks are all the rage and most will be dead in 5-10 years' time.

Most current frameworks will be dead in a decade, some won't.
New frameworks and languages will arise, will make mistakes that were known and soved 10 years ago, but HR departments will insist on hiring newbies that don't know enough to ask the right questions.

Sure, they cost less and are much easier to handle. :-DD
 

Offline Fred_47

  • Contributor
  • Posts: 41
  • Country: us
  • Old retired Electric Power engineer
Re: food for thought: code bloat
« Reply #47 on: July 17, 2022, 08:33:13 pm »
Groves giveth, and Gates taketh away. -- unknown probably from IEEE Spectrum about 1992

Andy Groves was the CEO of Intel

Bloat is not a new thing:

Unfamiliar quotation (from Cleveland Engineering Society Newsletter about 1972):

Whenever in doubt, let brevity take precedence over over redundant and superfluous expression of your ideas.

The Lord's prayer has 56 words. Lincoln's Gettysburg address has 266. The ten commandments have 297. The Declaration of Independence has 300. A recent government order setting the price of cabbage had 26,911 words!


I wonder who counted all those words in 1972?
Caretaker at Fred's home for retired test gear.
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 690
  • Country: gb
    • Electronic controls
Re: food for thought: code bloat
« Reply #48 on: July 17, 2022, 09:08:02 pm »
Legacy supoort, web frameworks and so on. Not reinventing the wheel and not wanting to remove any existing wheels.
Worst company for bloatware is Microsoft.
They build so many layers to software and that its almost impossible to copy or replace.
Windows, .net framework, .net core, WPF, Winforms etc etc
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14476
  • Country: fr
Re: food for thought: code bloat
« Reply #49 on: July 17, 2022, 09:15:39 pm »
Literally, my first result was 'Trainee Drainage Engineer' for 'all aspects of drain and pipe cleaning'. So, there you have it, engineers chasing turds away.

Yeah. ;D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf