Code Cleanup Culls LibreOffice Cruft 317
mikejuk writes with an interesting look at what coders can get around to after a few years of creating a free office suite: dealing with many thousands of lines of deprecated code: "Thanks to the efforts of its volunteer taskforce, over half the unused code in LibreOffice has been removed over the past six months. It's good to see this clean-up operation but it does raise questions about the amount of dead code lurking out there in the wild. The scale of the dead code in LibreOffice is shocking, and it probably isn't because the code base is especially bad. Can you imagine this in any other engineering discipline? Oh yes, we built the bridge but there are a few hundred unnecessary iron girders that we forgot to remove... Oh yes, we implemented the new chip but that area over there is just a few thousand transistors we no longer use... and so on." Well, that last one doesn't sound too surprising at all. Exciting to think that LibreOffice (which has worked well for me over the past several years, including under the OpenOffice.org name) has quite so much room for improvement.
Not at all. I've had a house built. (Score:5, Interesting)
There are probably dozens of extra nails that were just hammered in rather than be removed. There are extraneous pieces of lumber.
And a house that was remodeled? I've seen newspaper used as filler. I've seen layers of roofing, with things buried in between layers.
Frankly I don't know what's inside my walls, and I'm not sure I want to know.
Re:Not at all. I've had a house built. (Score:5, Insightful)
I've seen chemical plants built with millions of dollars worth of unnecessary piping and valves, because the project timeframe meant that it was cheaper to install extra connections that might never be used and save engineering time than waste time re-engineering it.
If removing unnecessary items can save thirty thousand dollars (say) at the cost of three days, removing the cruft is only worth it if the delay costs less than ten thousand a day.
Re: (Score:3, Interesting)
Good analogy.
But Libreoffice still uses Java. I don't see that fitting into your analogy, because the Java dependency really has to be removed. It was put there only because OpenOffice was in the hands of Sun. Now Java is in the hands of Oracle. The Java dependency has to go.
Re: (Score:3)
Re: (Score:3)
Except building a house is a one time endeavor. A better analogy would be to build a house on the foundation of another house and then remodel it a dozen times and then add on a few additions. Soon there after divorce your spouse and find another to guide the new additions and find another site upon which you can move that house to and hopefully not have to deal with that awful foundation.
Re:Not at all. I've had a house built. (Score:5, Insightful)
No, a better analogy is to build a house (full of extra materials as the parent said), and then use a giant replicator machine to mass-produce the house, almost instantly, and create thousands and thousands of new homes using that house as the basis. The wasted material in the one house is bad, but not that bad because it's one house, and it takes extra time and labor to do it more efficiently. But multiplied across thousands of identical copies, that wasted material adds up a lot. Plus, it's inefficient and you could have a better-performing house by doing a better job with the small details (better at energy efficiency for example). The slight increase in energy efficiency with that one house, realized by spending a bunch of extra time and effort removing wasted materials and doing a better job with various small details (like making sure the house wrap is applied extremely well rather being hurried and missing some staples in important places), won't amount to much with just the one house. However, multiplied across many thousands of houses, those energy savings add up to a lot.
The fact that software is easily and quickly replicated with perfect precision and little or no effort or time really makes it hard to make good analogies for it without resorting to Star Trek-style replicators; it's the only technology we have that's like that. And because it can be and is copied so easily, very different dynamics apply to it than to many other fields of endeavor.
Re:Not at all. I've had a house built. (Score:4, Informative)
Actually, building materials (at least here in the USA) are dirt cheap. Labor by far is the biggest factor in a house's cost. There are some exceptions, like appliances, cabinets, granite countertops, plumbing fixtures, etc., but things like framing, drywall, nails and other fasteners, even electrical outlets (except the GFCI ones) are all dirt cheap. That's why there's waste; the contractor doesn't care if his workers waste $2 worth of materials as long as they're fast. However, when the plumbers are putting in expensive polished faucets, they're probably more careful since replacing one of those is worth several hours of labor.
Re:Not at all. I've had a house built. (Score:4, Insightful)
This is true in Europe too. I'm in Scotland. I live in a small but comfortable house I built for myself on my own land last year. It cost in total more than I earn in one month, but less than I earn in two. I'm a senior geek, I get a good wage - but I'm not a banker or a pop-star.
What makes housing expensive is partly labour, but it is mainly that planning policy creates a form of artificial scarcity, and partly also that government support for home ownership creates a speculative bubble, further inflating the cost. Housing is not intrinsically expensive.
Re: (Score:3)
Bandwidth and memory are both pretty cheap
I don't know what kind of computer without a memory hierarchy do you have, but my instruction caches haven't been exactly cheap.
Re: (Score:3)
That would be relevant if the unused code was very tightly mixed with the used code.
In this case, if you look at the way they detect unused code [skynet.ie], you'll see that all the code that was removed consists of whole methods and sometimes whole classes. This means that the vast majority of the code that was removed would probably never be loaded in the instruction cache anyway -- very small methods tend to be inlined by the compiler and so don't cause surrounding (and potentially unused) code to be loaded to the c
Re: (Score:3, Interesting)
Building a house isn't a one-time endeavor. Much like code, houses are never 100% finished. They're frequently repaired and less frequently remodeled, renovated, or expanded. If you look at photographs of the same house over the span of a century or more, it's sometimes hard to believe that the final version is the same building as the original. And when people work on their houses, they usually go for the most cost effective approach, even if that means leaving no longer used stuff in place because it
Re:Not at all. I've had a house built. (Score:5, Funny)
Re:Not at all. I've had a house built. (Score:4, Interesting)
That's nothing. Whoever built the wall that exists between my office and the dining room left inside a leather dog collar and a half-dozen pork (I think) rib bones.
We've also found a cast iron floor lamp inside of a wall, as well as several hundred copies of the Saturday Evening Post that are positively impossible to drill through.
Pez dispensers seem so...basic.
Re:Not at all. I've had a house built. (Score:4, Informative)
If you have newspaper or other similar material in your walls, which wasn't processed and designed as insulting filler, I have one word for you: mold.
You'd better know.
Re:Not at all. I've had a house built. (Score:5, Funny)
If you have newspaper or other similar material in your walls, which wasn't processed and designed as insulting filler
What material in your walls could be more insulting than newspaper?
Re:Not at all. I've had a house built. (Score:5, Funny)
Well, there are a variety of fiber, composite and other materials with higher R-factors per volume, but that's beside the point.
Newspaper as in processed recycled newspaper bought as insulation from Home Depot or the equivalent is one thing. Stuffing newspapers into your wall after receiving them in the post and reading them (a common practice) is quite another. The latter retains moisture and can lead to mold, rotting and structural damage, just to start with the most obvious problems.
Re: (Score:3, Insightful)
"Wooooosh"
Re: (Score:3)
I find your reply insulting.
Re:Not at all. I've had a house built. (Score:4, Funny)
What material in your walls could be more insulting than newspaper?
An immured scientologist proselytizer that once came to your house to annoy you, only to never leave your house alive again?
Re: (Score:3)
There are layers and layers of building foundations and walls under the modern (and especially not so modern) buildings. It's not uncommon constructions to be stopped for excavations to take place.
Re: (Score:3)
You've probably got a dead cat. Sometimes they get stuck between the layers. In old houses they were sometimes put there intentionally as protection against witches.
Code Cleanup Culls LibreOffice Cruft (Score:3)
Nice alliteration.
Re: (Score:3)
Re: (Score:3)
Consecutive carbon copy commencing consonants create cringing cowards? Cool!
I'd bet there is. (Score:5, Informative)
It would not be very surprising to see a lot of dead code.
I maintain the code for MoreTerra, a Terraria map editor program and I'm pretty sure I've got dead code in there and that's a pretty small project.
With a large number of people working on the code it likely ends up slowly clogging up as no one quite knows what the others are doing.
Dare I ask what type of dead code exists in something extra huge, but closed source, like the Windows code base or for MS Office? But I'd
bet for all MS's faults that the code for Norton Antivirus is 10x worse.
Re:I'd bet there is. (Score:5, Interesting)
I'm mostly surprised that they're still getting performance improvements. It seems like they've done more over the last year than Sun did during the entire time it owned the project to unbloat it.
Re:I'd bet there is. (Score:5, Funny)
Now if only they'd take over the Java project.
Re:I'd bet there is. (Score:4, Informative)
Dead code is a result of OOP development (C++/Java)
Because a lot of OOP code has extra methods used to circumvent or enforce memory protection (private/public) with variables inside classes. Sometimes the methods are created with anticipation that they will be used, but all the code is is a getVARname or setVARname dozens or hundreds of times when something like get(varname) set(varname) would be more efficient. in C you don't have this problem because memory protection basically doesn't exist unless you roll your own.
Re: (Score:3, Interesting)
I don't think they are talking about unused mutators. If anything Object Oriented programming makes it much easier to find and get rid of unused code BECAUSE of the data protection it implies. Having the code segmented and modular in different classes would make it worlds easier to find and remove dead code at all stages of development.
But really, C, with their fancy "structs" and "flow control" just leads to unnecessary cruft, we should just stick with ASM and Goto, b/c that's way more maintainable ;)
Re:I'd bet there is. (Score:4, Interesting)
Just to be Snarky, I'll point out that the Glasgow Haskell Compiler politely informs me whenever it finds a dead function. Functional languages are light years ahead of anything else when it comes to the Compiler actually being able to reason about the code it's compiling.
Re:I'd bet there is. (Score:5, Informative)
Sure that doesn't cover public functions but I don't think there is harm in unused getters and setters and it's easy to find if a function is called through tools found in Eclipse. Just because Java developers don't use these tools doesn't mean they don't exist.
Automate it (Score:4, Insightful)
Sounds like they already put a lot of work into this, but someone should tell them that you can automate things like removing unused code.
Re:Automate it (Score:4, Insightful)
I'm pretty sure that they don't want to automate it. One of the first things Libre Office did after they forked from OO.o was to come up with a list of "easy hacks" for people who wanted to get involved but didn't know where to start. That includes stuff like dead code removal and translating comments from German to English. By leaving that stuff marked out but undone, they hope to ease new people into the project. That may not be the most efficient way of doing this kind of thing, but if it helps to recruit new developers it will do a lot more for the project in the long run than just getting rid of the cruft. It's a big difference between a project run by paid coders on a tight budget and one that depends on a variable number of volunteers.
Re:Automate it (Score:4, Interesting)
Yeah but they don't help much. The compiler will kill off any code that really isn't used so to make noticable performance imporvements you have to do stuff at the achitectural level. Maybe someone wrote a function but then later there were performance issues and it was replaced in some code but not elsewhere. Now you have two functions doing the same thing but the compiler and automated tools can't really tell that. The other classic one is where you have features that are no longer used or no longer make sense but are still possible to invoke, and again you need to work at the architectural level for that stuff.
Re: (Score:3, Interesting)
Do it constantly, even in the details like method names, and your code will have better quality and will be easier to understand.
Modern IDEs will resolve the tedious parts, you just have to think of the change, and the tool will do it.
The book Refactoring: Improving the Design of Existing Code is an essential resource.
Re: (Score:3)
Refactoring is changing code from one form to another where the two behave identically (modulo bugs). These should be done in small individual patches/chunks so that it is easy to see what is going on (e.g. for the reviewer or bisecting a bug).
These include things like moving variable declarations to where they are first used, inlining a function by hand/removing a level of indirection introduced by the Visitor pattern and changing repeated code into a loop.
It helps if the code you are refactoring has decen
oooh yes (Score:4, Interesting)
I've been working on a project where there were 3 separate wrappers around a database, each returning different objects containing the same data... So you had to convert those each time two modules using different wrappers needed to communicate. I tried to clean it up a bit, but eventually I stopped because my manager was frowning upon that because "I broke working code". Also there were parts that I didn't know if they were still in use. I also ran a profiler and found 80% of the functions never got called. That doesn't mean it's dead code of course, but looking at the function names I got an eerie feeling with a bunch of them. Anyway, I learned a lot about how not to manage software, I quit the company since then and I can only hope things have changed over there.
Re:oooh yes (Score:5, Informative)
Mr2Cents,
Your actions are indicative of a person who is not yet truly a craftsman of the software engineering trade.
Speaking from personal experience dealing with huge, complex, unmaintainable PHP legacy systems for the last ten years, let me tell you a far better path:
1. Search the code base for what may be directly calling the code.
2. Set debug breakpoints at the start of each piece of cruft code and rigorously test the app.
3. Create a custom exception (e.g. CrapCodeHitException) and throw it at the beginning of each code segment you want to remove. If you don't hit any of the exceptions after, say, a week of normal browsing doing other things, plus testing, then proceed to step 4.
4. Catch the CrapCodeHitExceptions at the highest level you dare, log this into a separate log file you will have permission to read. Commit the code into a releaseable branch so that it ends up on your QA and staging servers.
5. Get approval to have the logging code be pushed to staging. Add comments above each cruft piece of code stating a) the level of risk you think if it is removed, b) when one should feel free to remove it (pick increments like 3 mo, 6 mo, 1 yr, based on risk), c) your name. If shit hits the fan cuz of removal, you want to man up and accept responsibility so your peers don't waste precious cycles needlessly troubleshooting why this "perfectly fine" code was seemingly arbitrarily removed.
6. After each time of your comments has elapsed, if the code was never triggered (parse the logs!), feel free to remove it. Please leave a note behind that you removed such and such, tho, and stick your name on it. Remove these notes after a year.
I've personally cleaned up 100,000s lines of code using this mechanism on several large and complex sites, without a single failure.
Wait! You used QA and staging systems? (Score:3)
QA? ...
Holy fuck. There's light.
Re: (Score:3)
Bah just rewrite it. Having reference code and a stable target makes development really fast.
This sentiment is at the start of many disasters. Why would you ever rewrite code that works? You'll just end up spending time debugging it.
Re: (Score:3)
hehe yeah, it really is. Even after having been burned by it a few times it is still so damn tempting.
Re: (Score:3)
Well, no, I got paid so if they don't want me to do that, I don't do it. Simple as that. But I did write a mail saying what parts of the code were going to continue to be bug-prone if if didn't get cleaned out. When I was packing, I found it back and I was completely spot on. One of the parts I mentioned needed a small change at that time, and it was already taking an engineer two weeks to implement it, constantly introducing new bugs. In hindsight my manager said I was correct. Nobody wanted to see me go,
Re: (Score:2)
there were 3 separate wrappers around a database, each returning different objects containing the same data
It was on an embedded platform
I just threw up a little...
Re: (Score:2)
cower in my shadows you feeb.
Hehe I've only seen one person use that phrase on this site before... I know who you are ;)
The senior coder at the company I work for left this past August. Since then I've had to play with code that I know nothing about. I've broken things a fair few times, but there's really no way to get around that. Sometimes things that we'd rather not do are unavoidable.
Re: (Score:2)
Hehe I've only seen one person use that phrase on this site before... I know who you are ;)
Clearly, that AC is not the real Michael Kristopherson!
Re: (Score:3)
OK, to clarify: I wasn't doing that on live code, it was a special experimental branch. My manager didn't want me to spend more time on it. But I was allowed to experiment, and then turn to the manager, present it and ask his input. Just stopping on my assignments and doing a weeks long rewrite needs approval of course, but fooling around a bit while you're stuck with another problem, was no problem. Is it really so abnormal to work that way?
Re: (Score:2)
Mr2Cents, it is abnormal only because the majority of "coders" are not true craftsmen.
It's a great sign of a craftsman, the want to improve just for the beauty and elegance of the end-solution.
I wish you luck in your endeavors.
Re: (Score:2)
Probably the manager was concerned that the messing around was taking time that needed to be spent elsewhere.
Re:oooh yes (Score:5, Interesting)
Well, it was an embedded company. This was the first project of such a large scale, and they lacked experience. The manager had worked there for 30 years, and had an electrical engineering background. So it wasn't an ideal situation: he was certainly competent and he could definitely write code, but lacked the experience in software engineering, like how to keep a large software base maintainable. So for example, he had this obsession with not changing code once it was tested. Since all these modules were tested, he was very nervous about changing it. What he failed to see, though, was that more modules were going to be added, and without a clean definition of how this data was to be represented, constant conversions were going to be needed (plus some other things I'm not going into now). Also, automated testing was not a practice there. This is one of the things I worked on introducing at the company, although frankly it was much to late to add it to the existing project. So he was never going to allow to merge the changes back in, because it "broke" tested code.
And I'm not saying I'm all for changing tested code - not at all , but in some circumstances, spending some effort up front can save you a lot of time later on. And I'm sure it would have.
Also, I'm quite confident of my skills. Sure I can still improve, but I surely developed a reputation of writing code that "just works". After 4 years, only a small fraction of the bugs were assigned to me, mostly they were located in parts I didn't write. Mastering the programming language is important, but there are lots of other very important things that matter. You just need a lot of discipline, checking all input, immediately failing when something goes wrong (not letting bad data trickle down the code), clean separations, higher order programming, trying to minimise the interface between modules etc... The list is so large, it becomes more of an intuition.
I hope this clarifies it a bit, I surely wasn't expecting the Spanish Inquisition.
A Natural Consequence of Change (Score:4, Insightful)
...lots of stuff is left lying about which might not be used any longer on the off chance that it might be adapted to some future purpose. Sounds like genetics.
Re: (Score:3)
Re: (Score:3)
I've deleted heaps of code too, but I seldom remove a still-functional API, even if nothing is currently using it. Generally add a comment to that effect, though. I've been grateful in the past when someone prior to me decided to keep something that was no longer in use but still potentially useful: http://slashdot.org/comments.pl?sid=1445528&cid=30120820 [slashdot.org] . If the code has unit test stubs I try to keep unused API functional and testable as well. It generally takes little effort to do so.
Agree as wel
Still no update system... (Score:4, Insightful)
Re: (Score:3)
Physical to virtual comparison (Score:5, Insightful)
Can you imagine this in any other engineering discipline? Oh yes, we built the bridge but there are a few hundred unnecessary iron girders that we forgot to remove...
Those would be perfectly valid if upon discovering your girder was 3 inches too short you could instantly create a copy of it, set the original aside, then alter and test that copy of the girder. Then you might leave a few extras lying around.
Re: (Score:2)
Only in a lab environment. If the bridge was taken out of the lab, and placed on a busy river, then even if you wanted to alter the girders, the traffic wouldn't allow it. You'd have to wait until midnight on Christmas Eve to fix not just the girder but make al
Bad examples (Score:5, Insightful)
Bridges often have unused structural elements: walk-ways made unsafe by modern traffic levels, maintenance accesses unused for safety reasons, supports made redundant beyond the factor of safety by bridge improvements, etc. Chips and boards too: FPGAs with 10% utilization, chip designs re-purposed with functional components disabled, subsystems replaced in boards by new designers not confident enough to remove the old design, etc.
Cruft in software is more often removed because (1) software has a potentially longer lifetime than hardware and (2) it's a lot easier to remove an uncalled function from a program than a girder from a bridge! Software cleanup should be an expected and planned part of a project's life cycle.
Re:Bad examples (Score:4, Interesting)
...subsystems replaced in boards by new designers not confident enough to remove the old design, etc.
It sounds crazy, but I work with a real-life example, a beamforming [wikipedia.org] circuit board that utilizes a certain technique, but has all the legacy components utilizing another technique that was never even implemented!
In that case, it wasn't a matter of confidence, but probably corporate sloth - engineers are expensive, and so they figure that paying the board-house more for the extra components per board would be cheaper than getting an engineer to redesign the board.
Re:Bad examples (Score:4, Insightful)
It's not crazy. A major board redesign will set a schedule back three months or more, so if you have two options and aren't sure which one will work, it's not uncommon to design for both if you have the room. Maybe you're evaluating two vendors. There are also usually components that are only used during development. Sometimes there's an experimental or premium feature that requires an extra chip, but you don't want to make two boards. Of course, most of the time unused components get left off in mass production, but developer's boards or ones from prototype runs might still have them.
Re:Bad examples (Score:4, Interesting)
I think it's pretty common, and not just with test logic like scan chains. I've worked on numerous ICs where some later project wants to reuse a part of the design, without necessarily using everything. If time and budget allow the unused bits get removed and a smaller design results, but more often the unused logic is tied off (at the board level or via metal mask - board level being cheapest and metal mask being cheaper than cutting a new set of diffusion masks for a potentially small runner) and the same die and package are reused (this may allow test fixture reuse also).
I've seen some pretty egregious cases of this however. I recall opening up a 4-port USB hub once (the cheap $10 ones) only to find a gigantic controller chip on it (something like 80 pins) of which about 10 pins were connected. It was obvious the chip didn't start life as a USB controller, but apparently it was cheap enough to throw down as-is. I always wondered what else was on the chip, perhaps part of something that normally has an embedded USB hub (monitor or keyboard maybe).
Cruft in engineering... (Score:5, Interesting)
Oh yes, we built the bridge but there are a few hundred unnecessary iron girders that we forgot to remove...
Well, look at bridges built in the 1800's compared to the ones today. Would we build a modern bridge today using wrought iron links http://en.wikipedia.org/wiki/Clifton_Suspension_Bridge [wikipedia.org]? Each building made in a certain period in a way represents a degree of refinement compared to its predecessors. Better materials, better methods. Buildings in general cannot be "cleaned up" the way code can, where "cruft" today was yesterday's conservative design.
Read a book about the differences in the construction of the World Trade Centers versus the Empire State Building, for example (the WTC has sibling buildings still around using the same techniques, such as the Aon [nee Amoco] Building in Chicago)...
Re: (Score:3)
or, today's conservative design is yesterday's+cruft added by redundant bloat in managed runtimes that're already available from the host OS. this happens when programmers graduate and take their professors' ivory tower vacuum 'everything should be portable/who cares about performance/efficiency computers are so fast anyway' mentality with them to their employers.
This happens in other disciplines. (Score:5, Interesting)
The quoted section in the summary asks if we could imagine this in other engineering disciplines. As the rest of the summary points out, it happens all the time in microchips. It also happens a lot in civil engineering, including bridge building. Removing things takes work. Unless there's work to be saved by doing it, or some way to profit from selling what's removed as scrap or it's a safety issue to leave it most engineers won't remove old parts of a structure. Consider underground pipes. How often are they removed when they're replaced? If the new ones are being laid down where the old ones went, they'll be replaced. Otherwise, 90% of the time they'll just leave the old ones there. Same goes for just about everything. Old installations of any kind are full of stuff that no longer serves any purpose. Brackets and supports for heavy equipment that isn't used anymore, old wiring and panels, concrete slabs that something mystery object used to sit on, etc. When was the last time you saw anyone take away some 30 ton piece of equipment then pay more money to have the floor where it used to sit un-reinforced? Now, sometimes they do. Usually it's when the place is being sold and the new owners are re-modelling. Other times the owners do decide to do a major cleanup. That's exactly what's being done here with libreoffice. Makes it no different than any other engineering discipline then.
Incidentally, if it's truly "dead" code, then it shouldn't actually be compiled, so it's not like the bridge engineer left in a bunch of extra girders, it's more like he's keeping addendum 6-c to revision 12b of the plans for section 3 in the same file cabinet as revision 13 rather than shifting it to a storage box and warehousing it.
Re: (Score:2)
So I left it in.
Why, because 10 years ago, I was fired because I removed some venting slots on another generator. I removed them because they only provided minimal ventalation, but really interfered with the magn
Re:This happens in other disciplines. (Score:5, Interesting)
A nice engineering example is the stone pylons at each end of the Sydney Harbour Bridge. They were built to support the cranes that were used in constructing the steel arch of the bridge. Since the bridge's completion they've served no structural purpose whatsover.
As the parent poster suggests, it would have cost time and money to remove them. However, in bridge building they plan around that - a bit of extra effort was put in at the start and the pylons were designed and built in such a way that they looked good after the bridge was finished. They were left in place as a feature of the completed structure and, as they were built in sandstone, they do a reasonably good job of making the bridge work visually with the feel of the historic precint beneath the southern end of it.
Dead code rarely adds anything to the aesthetics of software.
Re: (Score:2)
This happens in all facets of engineering, not just civil structures. Go into any oil refinery that's more than 10 years old and you may find whole units left in place filled with nitrogen as it's too costly to remove.
The only time unused stuff is cleaned up in the engineering world is if the realestate becomes valuable, or if it is mandated to by some safety / environmental code.
Re: (Score:3, Informative)
I've worked on enterprise asset management systems in a number of different industries including electrical utilities, natural gas pipelines, and military. In almost every company they've had some variant of an "abandoned in place" asset status. In cases like power plants, trying to remove a single cable from a series of cable trays or raceways is rarely, if ever, worth the effort and risk. Some cable trays have dozens of cables (and I'm not talking cat5) in them, sometimes half of which are "dead" but r
Re: (Score:3)
I know what you mean. The plant I work at currently has had a method of cut and cap for old decommission / damaged and irreparable cables. They were historically buried in the ground for some 500 motors on site.
Now we have more failing cables and the ground is full. Actually not only is the ground full but so are the switchroom entries. The engineering behind the infrastructure going in to run cables (some of them as big as 240mm^2) is amazing. Cable trays are no longer installed by electrical contractors b
Re:This happens in other disciplines. (Score:5, Informative)
Ever been in the telco closets of a 50 year old office building? Old 9600 baud modems still powered up and connected to 66 blocks, old DS0 smartjacks with red lights, all next to Cat5 and fiber cross connects.
Look above the drop ceiling of an old department store store sometime and gander at all the serial cable wire that is covered by the Token Ring wire covered by the 10base5 wire that is covered by the ThinNet wire that is covered by the Cat5 wire that is covered by the fiber ducts. All that tangled in with the old 25 pair telco wire.
If it's not on your work order, you don't touch it.
Re:This happens in other disciplines. (Score:4, Interesting)
We are currently preparing to move to another office building in another town.
Our old premises are just like you describe. Build in 1964.
Not counting anything else: There is 600 kilometer of Cat5e cabling in the building-complex. (I was involved in the Coax -> Cat5e upgrade back in '97. Still remember some details.)
Actually it is a good thing.
The recycle value of the wiring is more than the value of the building and the grounds.
With todays fucked up real-estate market for office buildings we couldn't sell the old location to anybody.
But because of the recycle value we had no trouble selling the entire site to a demolition company.
Win-win for everybody:
We get money for what is basically an unsellable building-complex.
They will break it down and recycle it. Gives them about a year of guaranteed work and a reasonable profit when due to the recession their business is at an all time low.
Afterwards they will sell the cleared grounds to the City Councel who are desperate to get a reasonably priced area of land at the edge of the city-center by 2014 so they can build a new City hospital. (The current hospital is on land not owned by the City, The contracts end in 2016 and can not be renewed because that would require a re-check of the environmental status of the grounds and everybody knows there is pollution there. That's wasn't an issue in 1986 when the old hospital was build, but new legislation passed in 2008 making it an issue now.)
Not to mention the human genome itself. (Score:5, Interesting)
Human DNA (and just about every other species as well) is full of things like inactive duplicate genes (some with slight alterations), pieces of old retroviruses, and other mutations and replication errors that have been "commented out". Plus a whole lot of sequences which we don't know what they're good for yet.
Room for improvement? (Score:2)
Exciting to think that LibreOffice has quite so much room for improvement
Sorry but removing the dead code is not really "room for improvement". It's rather "fix a code that lack(ed) a proper project management".
80286 microcode (Score:2, Interesting)
Intel's microcode to support 16-bit protected mode became obsolete as soon as the 80386 was released, but they had to support it for backward compatibility, in case someone tried to install Windows 3.0 on an IBM AT clone, for instance. Probably that microcode has been carried forward ever since. Also, there are a lot of CISC instructions such as SCAS* with the "REP" prefix which were heavily used in assembly language in the eighties, but which are now deprecated and typically slower than the RISC-style re
String instructions ARE faster (Score:3)
The only people bashing CISC are sheltered academics who have never been out in the real world or have heard of benchmarks. On my Core i7, for example, the benchmarks [sourceforge.net] show that string instructions usually are the fastest way to do things.
A basic rep stos yields 25 GBps. So does the fastest recommended SSE method using movntps and prefetch. A RISC-style fill loop only manages 12 GBps. You can improve its performance by unrolling the loop four times, getting the same 25 GBps as a string instruction with a lot
Your programmers suck? (Score:3)
"...and it probably isn't because the code base is especially bad."
Yes, it does mean that. Thousands of lines of deprecated code implies it was written in a sloppy and disorganized way and this is not only an indicator but, I would argue, a definition, of a terrible code base.
Re:Worked Well? (Score:5, Informative)
I never get crashes with LibreOffice. Whenever I try Word on some documents (docx) I get a crash. I was completely unable to edit some documents in Word (sent to me by colleagues) until I opened them in LibreOffice, saved them in doc format, then reopened them in Word. It happens with distressing regularity. I find LibreOffice much more stable than Word personally. The worst part is when once I edited a doc in Word, saved it, and when later tried to open it again had a similar problem. I am not sure what document elements cause this but it's a sad state of affairs when LibreOffice is not only more stable (for me), but handles better MS own file format (even though there are still big deficiencies in the docx file handling in LibreOffice). So, stability issues? I guess it depends on your computer.
Re: (Score:3)
Docx is a whole different story. I recently opened a moderately complicated docx in OO Writer. This document had one of those auto-generated table of contents that corresponded to section headings, several embedded pictures, a few tables, and lots of lists. Whil
Re:Worked Well? (Score:5, Funny)
Of course, that behavior is quite similar to what happens when you open the moderately complex docx document in Word.
Don't know about LibreOffice (Score:5, Informative)
Comment removed (Score:4, Interesting)
Re: (Score:3)
Re:Worked Well? (Score:4, Insightful)
"WORKSFORME"
The most unhelpful response to a bug report ever.
But very helpful response on trolling.
Re: (Score:3)
"WORKSFORME" is a perfectly helpful response to "ITDONTWORK".
Re: (Score:3, Informative)
LIbreOffice hasn't been OO in well over a year. But nice try with the trolling.
Re:It doesn't matter (Score:5, Informative)
I do think it matters. Yes, a compiler can throw out dead code, but not in all cases. E.g. if you have an enum where some values aren't used, and you then call a function if a variable has that unused value, how is the compiler going to find out? It's not only functions, there could be unused tests in code etc. All this clogs up the code and can make reading the code a living hell. It can turn an elegant part into a mess. Not mentioning the time wasted of developers trying to find out what a function does, only to discover it's not used. The article doesn't deal with the results in terms of code size or performance, but I'm very interested to find out.
Anyway: you can either have clean code or maintainable code, but not both at once in my experience.
Re: (Score:3)
Re: (Score:2, Informative)
And this, boys and girls, is how we end up with Windows 7/64 guzzling two gigs of memory after start-up.
Not by this one isolated idea, but the very concept of "meh it doesn't cause a problem" snowballing until it IS a problem.
I drafted up a mini-essay assuming it was C-style code, but the article is talking about methods. Clearing out half of the methods means that those virtual method tables are now half the size, which will result in much snappier execution. Less cache misses, less trash in the cache li
Re:It doesn't matter (Score:5, Informative)
I am not a Microsoft fan, but Windows 7 is actually a very well-written OS, in my experience. If you have lots of RAM then it uses it, there's no sense in having 8GB of RAM if it's only using 250MB and paging the rest of what it needs.
As a point of reference, have a look at this article [zdnet.com]. If you only have 512MB of RAM then Win7/64 will only use about 200MB of RAM.
Re: (Score:3, Interesting)
Re:It doesn't matter (Score:5, Insightful)
Many its GUI controls are using very bad confusing abstractions. For example, audio, networking, etc.
They are necessary abstractions because these subsystem themselves are abstractions.
If you want confusing audio subsystems, look at the mess in Linux right now.. most Linux installs literally have multiple audio subsystems that can output to each other in very confusing master/slave relationships.
Comment removed (Score:5, Insightful)
Re: (Score:3)
Re:It doesn't matter (Score:4, Informative)
And this, boys and girls, is how we end up with Windows 7/64 guzzling two gigs of memory after start-up.
RAM is there to be used, not hoarded.
In short, Windows 7 (unlike XP and earlier Windows versions) goes by the philosophy that empty RAM is wasted RAM and tries to keep it as full as possible, without impacting performance.
Windows 7 memory usage: What's the best way to measure? [zdnet.com] [Feb 25, 2010]
Re:It doesn't matter (Score:5, Funny)
Slashdot, home of the Linux Cocksucker Boy Toys.
Can you, please, post us a link to the Linux Cocksucker Boy Toys source code.
Re:It doesn't matter (Score:5, Informative)
No, it's not. Windows 7 will use as little as 200MB of RAM if you only have 512 physically available. You're misunderstanding what's actually going on as you fret over megabytes in Task Manager.
Re:It doesn't matter (Score:4, Insightful)
Re:It doesn't matter (Score:4, Informative)
The problem with this is that I use task manager to see how close to the limit my system is, and to gauge how much memory to get on a system. It's all well and fine to use free memory for caching disk or whatever, but I'd like my "gas gauge" back please! Give me a memory monitor that actually tells me how much memory I could use for my apps, and how close to the edge I am.
As things are, you need Process Explorer [microsoft.com] for that, and a decent understanding of virtual memory management in NT to understand what it actually tells you.
Re: (Score:2)
Re: (Score:3)
The design aesthetics are probably different because they intentionally make it different.
For most car brands, you can take the earliest cars and still see some of the design language reflected in the current models. In particular the front grills are usually easiest to recognize. This is done intentionally by the designers, even though nowadays car designers have no real connection to the brands; modern Lambourghini's are designed by a Dutch guy and Pininfarina (design studio for most of the Ferrari's) des
Re: (Score:3)
Has happened before. Bill Atkinson wrote -2000 lines of code [folklore.org] whilst working on a graphics toolbox at Apple.