Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Bubble99

macrumors 6502a
Original poster
Mar 15, 2015
933
232
Windows have over 50 million line of code well Mac OS Tiger 10.4 was like well over 80 million line of code


This is programming code bloat to max!!! Yet some how windows is way more bloated the OS in feel and takes up more RAM and CPU usage than any OS despite less programming code.

Yea very strange.

Note I hear that iOS or iPadOS has some thing like 15 to 20 million line of code now.
 
  • Haha
Reactions: chikorita157

DaveFromCampbelltown

macrumors 68000
Jun 24, 2020
1,549
2,522
Lines of code is not a good way of defining 'bloatedness'.

Different languages require more or fewer lines of code to achieve the same outcome.

A good example is Cobol, which tends to require two to three times as many lines of code to perform the same calculation as Fortran.

Also good programming practice would tend to split an operation up into several lines for clarity's sake.

For example
C:
for (i = 1; i < 11; ++i)
  {
    printf("%d ", i);
  }
could also be written as
C:
for (i = 1; i < 11; ++i) { printf("%d ", i); }

Is the second example less bloated because it has 25% of the lines of the first?
 

MajorFubar

macrumors 68020
Oct 27, 2021
2,091
3,697
Lancashire UK
You can't judge how bloated an OS is compared to another just by counting lines of code.
My Amiga 1200 boots its Windows/MacOS equivalent GUI (Amiga Workbench 3.0) from an 800KB floppy disk.
 
Last edited:

casperes1996

macrumors 604
Jan 26, 2014
7,434
5,578
Horsens, Denmark
Setting aside the judging based on lines of code, what do we count as "the operating system"? Cause if it's just the kernel, then iOS/iPadOS would be the same as macOS. And if it counts any layers above Darwin, how would they get that data for closed source? They likely mean the entire system as it ships to customers, which on the Mac includes iLife as well, and a bunch of drivers for AMD GPUs and whatnot.Windows also has drivers built-in, just saying it's not a flat comparison of equal parts. A lot of code that may exist is also not relevant to all systems. Tiger's codebase would include both x86 and PowerPC specific code. Same for modern macOS with AArch64 and x64. And given it lists Debian on there not Linux, God knows how that's counted.
Then there's the matter of something like WebKit. Apple ships their own web browser and engine with macOS, but how do we count (if we do) something like Edge? Do we count the entire Chromium base or is that an uncounted git submodule where only the changes and UI and such are counted?
 

Juicy Box

macrumors 604
Sep 23, 2014
7,527
8,862
Not sure if this matters, but MacOS 10.4 was for both Intel and PPC.

Could this be reason for “bloat”?
 

Bubble99

macrumors 6502a
Original poster
Mar 15, 2015
933
232
You can't judge how bloated an OS is compared to another just by counting lines of code.
My Amiga 1200 boots its Windows/MacOS equivalent GUI (Amiga Workbench 3.0) from an 800KB floppy disk.
It depends on how you want to define bloat. The more line of code is bloat or system resources bloat or user interface or all three.

MacOS seems to have more line of code but the system resources is way less bloat than windows and windows GUI is more bloated and complex and thus less elegant and also mix match of windows 98 UI and windows 7 UI and windows 8 UI in windows 10 UI. Well hack there still control panel in windows and other advance settings going all way back to the 90s and bit of mentro and fluid UI.

Also windows have more options and features than MacOS, it supports hardware and software that is very old and you can customize and hack windows way more than MacOS. I have seen youtube videos of people making windows 10 look like windos 7 with theme skin packs and tools you can download of the internet.

You cannot do that with MacOS it much more locked down but the system resources is much less and OS seems more simple and looks like it was build from ground up not patch work like windows. But there is trade of of lack old hardware and software support and and lack of customizing and hacks you can do like on windows.

Other way is bloat is minimalism vs feature set? Office suite now has way more features than Office suite of late 90s.

What is upper limit on features we dream up and add to app a thousand or million or billion?

Also more line or code is harder to troubleshoot because you have to spend more time reading code.

No one can read 50 million line code or 80 million line code not even army of people.

Than there members saying we have lost are way and have to make OS more simple like the 90s than OS today are way too bloated. And would you be happy using simple windows 98 like OS today.
 
Last edited:

Lihp8270

macrumors 65816
Dec 31, 2016
1,115
1,586
Also more line or code is harder to troubleshoot because you have to spend more time reading code.

No one can read 50 million line code or 80 million line code not even army of people.
Not necessarily true.

More lines of code may be easier to test and trouble shoot.

Code broken out into smaller chunks is easier to test. While breaking up a large method in our codebase just a few weeks ago it caused a lot of new lines of code to be added without changing functionality but allowed for more effective and robust unit testing.

Also, with large code bases you don’t have people working and reading the whole lot. You have specialist teams of developers who work on different parts of the code base.
 
  • Like
Reactions: MajorFubar

icanhazmac

Contributor
Apr 11, 2018
2,528
9,478
This is programming code bloat to max!!!

Can I ask what you do for a living? I'm just wondering what kind of weight I should assign your opinion of how many lines of code constitutes "programming bloat".

Have you ever written any code? Seriously, anything college level or professional?

My guess is you are just overwhelmed by numbers.

No one can read 50 million line code or 80 million line code not even army of people.

Just a dumb statement. Obviously it was written, so one can assume it was read at that time. All you need is numbers of people.


There were 481,254 active duty members in the US Army in 2020, divided by 80,000,000 lines of code they all would be responsible for reading 166.232 lines of code. I think that is a reasonable assignment, would take way longer to watch a TV show.

10,000 programmers would be responsible for 8,000 lines of code, professionals could "read" that in a day, probably less, maybe by lunch.

And would you be happy using simple windows 98 like OS today.

No.
 
Last edited:
  • Like
Reactions: Idgit

Bubble99

macrumors 6502a
Original poster
Mar 15, 2015
933
232
Can I ask what you do for a living? I'm just wondering what kind of weight I should assign your opinion of how many lines of code constitutes "programming bloat".
May I ask how old you are because there are way too many young people today that cannot live life with out crutches I see all the time.

And the more software goes to the extreme the more crutches. There are young people today that don’t know how to use a city map or how to use file manger. Many young people don’t know how use remote for TV with out voice commands.

There are young people that need master degree on how to use VCR or DVD and still cannot use it and scream and yell if there not some AI voice command. We have obesity pandemic along with heart problems and other health problems and people want cloud this and cloud that being easer than the way people got up and took minute or two minutes and walk to get the CD,DVD or USB stick or what ever.

And there are people that cannot get up to turn the lights on or off in house or turn the AC on or off or the heat in the house with out some new smart phone app pushing the internet of things.

I never thought my life was hard in the 90s or software or the OS needed to be better. The only problem was computer where really buggy, slow and had major security problems. Not sure if that was Kernel problem, lack of code or bad code or what the cause was. There are many programmers here that would probably have answer to that.

Could I use some thing like a windows 98 or windows XP OS today well sure.

Could I use Office suite of late 90s well sure hack even people published books and magazines in the 90s and set up website with software way less than what people use today.

Now could I you use some thing like Photoshop of 90s today well no, because if you are pushing for it well has to look real and do amazing things even sci fi things it will need to keep getting better and better. The same with games and computer graphics that the goal is to get advance. I dream of one day of GTA type game similar to Microsoft flight simulator map to every city in world but that is way into the future such thing may happen.

When I install browser on a computer I don’t use things like pocket or push to email or syncing across devices that so many young people today want. Many times I go on the internet reading mode on the website because of all the fluff and bloat on the page. Could I use basic text editor or PDF software of 90s well sure but than there young people that want more and more features.

But than there are many young people today that need OS ecosystem and cannot live life when the smartphone and computer are acting very separate.

And I don't want to come across as some one glorifying the 90s or the some one that that takes minimalism to the extreme and say we need to live in a termal and use termal email, termal file manger, termal text program so on.

And I'm not saying we should be using windows 98 or windows XP but OS today is just getting silly. Look at the new iPadOS that has sharing in the browser and photo app sharing and other apps. I had no problem copying the URL into email or text message and say hay check this link out or upload it manually to the app.

Young people today really just don't want to use a computer and want some star trek computer and walking AI assist program.

There is no middle ground you got the suckless folks that want the 80s or 90s way of life and young folks that want a star trek like future talking syncing computer and AI assistant with walking robot like in start trek being even better doing most of the work.

There are young people today that would not be able use some thing like Snow Leopard, Tiger or Windows 7 they would say it like going way way way back in time and incomplete and computing task harder.

I see the comments here of people that complain having mix of Android, Windows and Apple products being separated systems than having iPhone, iPadOS and MacOS that acts like one big system that just works across devices being easier doing it the Apple way than the 90s way .

I can only see what the next 10 years will be like.

I know this post is more like a philosophy like post than programming but even if everyone like the suckless folks wanted some future like sci fi computer it will be way more complex and bloated.

The more software get more complex and does more things the more programming code is needed.


All of Google services combined has over 2 billion lime of code.

Is upper limit on programming code 1,000, 5,000, 50,000, 100,000 or million or 20 million or 40 million to when it becomes bloat?
 

Bubble99

macrumors 6502a
Original poster
Mar 15, 2015
933
232
Just a dumb statement. Obviously it was written, so one can assume it was read at that time. All you need is numbers of people.


There were 481,254 active duty members in the US Army in 2020, divided by 80,000,000 lines of code they all would be responsible for reading 166.232 lines of code. I think that is a reasonable assignment, would take way longer to watch a TV show.

10,000 programmers would be responsible for 8,000 lines of code, professionals could "read" that in a day, probably less, maybe by lunch.



No.
Than why is Windows so broken there is a security update every month? Some times two or three updates to fix security holes in one month?

Why so many times now windows needs update to fix a problem but bug fix break some thing else and need update to fix an update?
 

icanhazmac

Contributor
Apr 11, 2018
2,528
9,478
Than Then why is Windows so broken there is a security update every month?

1) Because humans wrote the code and mistakes will be made regardless of how many or how few lines of code. See how I fixed your mistake in a very short post? You should have issued a patch for that! You made quite a few spelling and grammatical errors in your wall 'o text as well, that is how easy it is to make mistakes.
2) Bad actors will always try to find new exploits, not just in code but in every aspect of life.

Sounds to me like you don't have any clue as to what you are talking about when it comes to coding and what constitutes bloat, you just feel X million lines of code is too many.

PS - As you seem to lament the use of the digital versus the analog I assume you navigate the seas with sextant or are you one of those dreaded "young people"?
 

icanhazmac

Contributor
Apr 11, 2018
2,528
9,478
All of Google services combined has over 2 billion lime of code.

Better issue an emergency patch for that one, 2 billion limes will certainly cause a problem. 🤣

Yes, complexity will increase the chances for errors but it is not the only cause.
 
Last edited:

casperes1996

macrumors 604
Jan 26, 2014
7,434
5,578
Horsens, Denmark
Sorry, but I actually went and cloned the repo for Darwin-XNU. The core operating system, including markdown, html, makefiles and license text, only comes to just under 1.9 million lines of code. What Finder, Photos, Music, Messages and other closed source components total to I don't know, but the actual core operating system is not anywhere near as big as this thread indicates - so while I disagree with some of Bubble99's conclusions, I don't even consider the premise valid in the first place
 

Nygaard

macrumors member
Dec 7, 2022
47
20
Houston
Lines of code is not a good way of defining 'bloatedness'.
Lines of code isn't a perfect indicator, but it is usually strongly correlated. If the goal of a particular system was to flash an LED, I think you would agree that one million lines of code, however you want to count it, is probably too much and could be considered "bloated."

More lines of code may be easier to test and trouble shoot.

Code broken out into smaller chunks is easier to test. While breaking up a large method in our codebase just a few weeks ago it caused a lot of new lines of code to be added without changing functionality but allowed for more effective and robust unit testing.
However, a feature that doesn't exist is even easier to write, test, maintain, and debug. It also uses less code.
 

Lihp8270

macrumors 65816
Dec 31, 2016
1,115
1,586
Lines of code isn't a perfect indicator, but it is usually strongly correlated. If the goal of a particular system was to flash an LED, I think you would agree that one million lines of code, however you want to count it, is probably too much and could be considered "bloated."


However, a feature that doesn't exist is even easier to write, test, maintain, and debug. It also uses less code.
Of course taking things to the extreme. A flashing LED with 1 million lines of code, is only superficial in demonstrating your point.

It doesn’t translate into software as complex as an operating system.

When discussing bloatedness of Tiger vs Windows Vista. Tiger supported both x86 and PPC, it also included Rosetta (though it’s not clear if that’s included in the line count).

Bloated for me excessive use of system resources which I don’t believe lines of code in real world applications to be an indication of.

To take your flashing LED to a less extreme example.

If you write it in Python and then in assembly.

One will have more “lines” the other will be more performant.

Which is bloated?
 

Nygaard

macrumors member
Dec 7, 2022
47
20
Houston
Right, I'm not arguing that lines of code as the primary metric for measuring bloat/complexity, but as an order of magnitude, finger-in-the-wind measurement, it can be useful. I prefer your definition of bloat as measurement of excessive resource usage, but would extend it to also include excessive features.

My reasoning is more lines of code tends to produce more instructions, which tends to indicate more complexity and/or unnecessary features, which tends to consume more resources unnecessarily.

If you define an operating system to be the capabilities of Windows 98, then the lines of code needed to implement it is your rough baseline. If another OS is orders of magnitude above that, then it probably consumes more resources, provides more features, or otherwise has more bloat.

As for your Python versus assembly question, whichever version accomplishes the job with less resources is less bloated. In absence of other information, you could pessimistically include the lines of code for the Python environment itself in your calculations.

However, I understand your point – it's easy to write inefficient programs with few lines of code.
 

DaveFromCampbelltown

macrumors 68000
Jun 24, 2020
1,549
2,522
BTW, when we are talking about 'Lines of Code', are we including comments?

When I was a professional programmer (this was in the day before the word 'coder' was invented, so when dinosaurs ruled the earth and everything was written in Fortran) about half the volume of anything I programmed was comments.

Also, are just talking about the Kernel (or whatever its equivalent is in Windows) or the whole system as installed?
Don't forget that Windows outsources all its security to Defender, while a great deal of MacOS's security is built into the Kernel.
 

casperes1996

macrumors 604
Jan 26, 2014
7,434
5,578
Horsens, Denmark
When I was a professional programmer (this was in the day before the word 'coder' was invented, so when dinosaurs ruled the earth and everything was written in Fortran) about half the volume of anything I programmed was comments.
I hate the word coder when describing someone programming with competency. Calling a programmer a coder is like calling an architect a "house-drawer". They might draw houses but it's reducing the task they perform to the mechanical and simple subtask of actually putting ideas on paper. A programmer makes programs. Considers architectural decisions, formulates structure and constructs something. Being called a coder sounds like you just write code. Thinking up code is way more important than writing it out. Thinking up ideas, structures and systems. As you can tell, I dislike the term :p
Also, are just talking about the Kernel (or whatever its equivalent is in Windows) or the whole system as installed?
Don't forget that Windows outsources all its security to Defender, while a great deal of MacOS's security is built into the Kernel.
See my previous post. It must be the full system - whatever full system means. But certainly not just kernel
 

f54da

macrumors 6502
Dec 22, 2021
346
128
Waiting for someone to run sloc on xnu source and leaked NT kernel so we have actual measurements instead of speculation...
 

Ethosik

Contributor
Oct 21, 2009
7,813
6,715
Lines of code is a bad metric for "bloat". Case in point is dependency injection is a VERY good thing to be doing in your code. Do you have any idea how many lines of code that introduces? JUST to do the same thing you did prior to dependency injection?
 

MBAir2010

macrumors 603
May 30, 2018
6,433
5,920
there
No way, Windows a cesspool for bloatware, candy crush anyone,, umm everyone!
edge promotes fake shopping sites that are scams-

why do I even type....
 

casperes1996

macrumors 604
Jan 26, 2014
7,434
5,578
Horsens, Denmark
Sorry, but I actually went and cloned the repo for Darwin-XNU. The core operating system, including markdown, html, makefiles and license text, only comes to just under 1.9 million lines of code. What Finder, Photos, Music, Messages and other closed source components total to I don't know, but the actual core operating system is not anywhere near as big as this thread indicates - so while I disagree with some of Bubble99's conclusions, I don't even consider the premise valid in the first place
Literally already did this - see above
Waiting for someone to run sloc on xnu source and leaked NT kernel so we have actual measurements instead of speculation...
 

casperes1996

macrumors 604
Jan 26, 2014
7,434
5,578
Horsens, Denmark
Waiting for someone to run sloc on xnu source and leaked NT kernel so we have actual measurements instead of speculation...

If you want the screenshot as well to go along with my prior post
1671584463423.png
 

macknack

macrumors newbie
Dec 3, 2022
6
0
Uk
The really interesting question is why both MacOS and Win have grown so large, compared to their origins. The first versions could even boot off floppies! The best version of Windows IMHO was Windows2000 (Win2k). It has multi-threading and proper multitasking, can run in 32Mb, and can be set up to only take up a few hundred meg of HDD. A bug-fix/driver updated 64bit version of that would be nice today! (ReactOS intended to be that..)
I wonder what would be the "peak" MacOS version for mac-users - best trade-off of features vs bloat?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.