LINUX BLOG SAFARI

On ‘Hello World’ Hacks, ‘Blog Whoring’ and Software Bloat

For many blogs, getting picked up on Slashdot is a dream come true. For startup Ksplice, it seems to be a matter of course.

Yes, the company’s blog had a total of *three* posts as of Wednesday, and two of them had already hit the big time on Slashdot in short order.

First was the post many took as a refutation of the Mythical Man-Month, as regular Linux Blog Safari readers will recall. Less than a week later, Ksplice blogger Jessica McKellar wrote a post explaining her adventure in writing a Hello World program in C simple enough that she could disassemble it and be able to explain all of the assembly.

Her discovery? Basically, that gcc was including libc even when she didn’t ask for it. Her solution: compiling a much simpler Hello World using no libraries at all.

Nearly 700 comments later — between Slashdot and the Ksplice blog itself — Hello World programs and the question of software bloat are suddenly hot topics again.

‘Kinda Sad’

“This is better than 99.9 percent of the ‘learn c’ textbooks out there,” wrote blah in the Ksplice comments, for example. “Thanks for enlightenment…”

Similarly: “It’s kinda sad that gcc produces such a bloatware-ish output by default when you’re just trying to display a string…” added taraCkaans. “How much smaller apps would generally get if gcc wouldn’t link against unnecessary libs when possible?”

On the other hand: “Interesting, but she does sort of sidestep the whole ‘Hello World!’ part of a hello world program,” noted textstring on Slashdot.

‘Very Old News’

Then again: “After reading the linked article, I thought underwhelmed,” wrote dzfoo. “Then I read the second article referenced in the summary: [muppetlabs.com]. Now, that was interesting!”

Indeed, “this is very old news, it’s been done many times before,” agreed shird.

Given the widespread discussion the topic has created — not to mention the enormous publicity for Ksplice — Linux Girl couldn’t resist asking around for more insight.

‘Meh’

“Meh,” was Slashdot blogger David Masover’s response.

“People have packed an entire program _inside_ the ELF header, and even cheated and made an invalidly small ELF header that would run on Linux,” Masover told LinuxInsider. “I mean, it’s cool, interesting to hear about — not sure how newsworthy it is.”

As for the question of software bloat, “some of this is lazy programming, it’s true,” Masover conceded.

‘Clearly Insignificant’

On the other hand, “I honestly don’t care how many CPU cycles it’s taking for each keystroke to result in a letter appearing on my screen — it’s clearly insignificant, as it seems to be happening instantly,” he asserted.

Not only that, but “we are doing more than we were before,” he added. “Even simple Web forms now spellcheck as you type. Saving a file may take slightly longer on a modern OS — that’s because the OS is breaking it into words to add to an index, so you can search your documents the way Google searches the Internet.

“A computer with Apple’s Spotlight or Google Desktop Search will be (very slightly) slower, but the added functionality is worth it,” Masover added.

“I’m not saying that all cases of bloat are justified, but this particular example seems a bit extreme,” he concluded. “I don’t care if my ‘Hello World’ is a few _megabytes_ — I care that I can write it in one or two lines of high-level source code, instead of twenty or thirty of assembly.”

‘A Time Warp’

Along similar lines, “Did we slip into a time warp?” was Slashdot blogger hairyfeet’s reaction. “Is it ’83 again and I’m having to PEEK and POKE my VIC-20?”

Even most kids’ hand-me-down PCs are now 2.4Ghz and up, hairyfeet told LinuxInsider. “Why exactly would they or I care if a program uses a couple of extra Kb?”

In this day and age, “wasting time making a program fetch off the disc just to look skinny is stupid,” hairyfeet asserted. “Yeah, some programs have feature creep, but that is why we have a wealth of choices nowadays.

“If it is something I’m gonna be using, load it into RAM; don’t make me wait on disc access to try to make your program look skinny,” he added. “RAM is cheap — most of us have more CPU cycles than we know what to do with.”

In short, “being more efficient shouldn’t be about how many Mb of RAM you use, but how you can make ME more efficient!” he concluded.

‘Most People Don’t Care’

Indeed, “computers have become powerful enough that most people don’t care if the program uses an extra few hundred KBs of space on disk or in memory, nor do they care too much about saving cycles,” agreed Chris Travers, a Slashdot blogger who works on the LedgerSMB project. “For most applications, this is a reasonable choice: Value developer time more than system resources, and optimize the program to get the most from programmers.”

Besides, “when using standard libraries, individual programs will always be more bloated than when hand-coded from scratch,” Travers pointed out. “There is an inherent tradeoff of control vs. re-use of other individuals’ components. On the whole, our systems use less resources due to all this standardization, since the system only has to keep one copy of the library in memory at any given time.”

Time to Use Plug-Ins?

Similarly, “libc is only bloat when you don’t do anything useful,” Montreal consultant and Slashdot blogger Gerhard Mack pointed out. “As soon as your software needs to interact with the system beyond writing a few lines to the screen, the time saved by using libc is very much worth it.”

On the other hand, “it seems to me OpenOffice.org has doubled in size in 10 years with very little benefit to the average user,” blogger Robert Pogson told LinuxInsider. “I think it is time all software used PLUGINS for stuff that adds features many will not want. Then we do not waste time and space moving it around.”

‘They Want Their Article Back’

For Slashdot blogger Barbara Hudson, who goes by “Tom” on the site, the Ksplice blog post was an example of “what can go wrong when you try to do some ‘blog whoring’ — the common name for the practice of ‘pimping’ your blog to attract attention to your company’s product.”

Ksplice’s first blog entry announced the blog, Hudson pointed out. “The second one was the ‘We got around the mythical man-month’ post — which turned out to be mythical — and now this last one, which was presciently obsoleted by the 1999 muppet labs series on tiny programs.”

In short, “Can anyone say, ‘the 90s called, they want their article back’?” Hudson quipped. “Maybe their next article will be about breaking the 640k barrier …”

Leave a Comment

Please sign in to post or reply to a comment. New users create a free account.

Technewsworld Channels