Slashdot Mirror


Linux Getting Extensive x86 Assembly Code Refresh

jones_supa writes: A massive x86 assembly code spring cleaning has been done in a pull request that is to end up in Linux 4.1. The developers have tried testing the code on many different x86 boxes, but there's risk of regression when exposing the code to many more systems in the days and weeks ahead. That being said, the list of improvements is excellent. There are over 100 separate cleanups, restructuring changes, speedups and fixes in the x86 system call, IRQ, trap and other entry code, part of a heroic effort to deobfuscate a decade old spaghetti assembly code and its C code dependencies.

50 of 209 comments (clear)

  1. Debt by Ducho_CWB · · Score: 5, Insightful

    Technical Debt haunts you.

    1. Re:Debt by Darinbob · · Score: 4, Insightful

      Yes, if it weren't for the idea that I could change jobs if I needed to, I'd have been full of hopless dread at just about most places I've worked. The sad thing is, in some places the majority of technical debt is creating in the first year of the company's existence, during the hurry-up-already startup phase.

    2. Re:Debt by Ryanrule · · Score: 2

      Thats not really the debt though. The debt is when you get a giant wad of funding and dont take the time to greenfield your cludge app.

    3. Re:Debt by swillden · · Score: 2

      Thats not really the debt though. The debt is when you get a giant wad of funding and dont take the time to greenfield your cludge app.

      No, that is debt, and in many cases it is the biggest single source of debt, as Darinbob said. Failing to rewrite your kludge app is just failing to pay down your debt. Whether or not the moment you get a giant wad of funding is the right time to do that depends on the context.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  2. Can we be sure there are no exploits? by Anonymous Coward · · Score: 2, Insightful

    We live in interesting times these days. With a changeset so big, and involving assembly code that isn't as easy to understand as C code, how can we really be sure that no exploits have been introduced? How extensively have these changes been reviewed to ensure there are no exploits or potential exploits being sneaked in?

    1. Re:Can we be sure there are no exploits? by Lunix+Nutcase · · Score: 5, Insightful

      The only way to truly understand C code is to read the disassembly. Otherwise you are only assuming what the compiler is emitting.

    2. Re:Can we be sure there are no exploits? by Bing+Tsher+E · · Score: 2, Funny

      That does not fit in with the concepts of 'abstraction' that are fashionable. No 'coder' should really need to understand the actual code the hardware runs. It's all rife with gotos and other icky things. Pointers (physical memory addresses) and stuff get revealed.

      No! Mommy! Make the bad hardware go away!

    3. Re:Can we be sure there are no exploits? by m.dillon · · Score: 2

      Well... basic procedures using only MOV/CMP/JMP is not something that even linux really needs to code in assembly. What is being talked about here is primarily the trap, exception, syscall, signal trampoline, and interrupt entry and exit mechanisms. Also thread switch code can get pretty complex because there is a lot more hardware state involved than just the basic register set. When you start having to deal with SWAPGS and MSR registers, you've really gone down the rabbit hole.

      -Matt

    4. Re:Can we be sure there are no exploits? by Rigel47 · · Score: 3, Insightful

      I do enjoy how we tech people less-than-quietly display our scorn of all the varying fields in IT that aren't our own. Because, hah, stupid Javascript developer, couldn't explain northbridge from south! Or what DMA is! He probably doesn't know a single assembly instruction! Clearly an inferior being.

      Javascript guy meanwhile regards the C guy as a primitive, bearded man from the hills who labors all day on some stupid library that is ten layers of stack between that mortar and pestle and the awesome browser-art he's creating.

      Systems administrators wish everyone would run off and die because they are all irritating, stupid whiners.

      DBAs are just smug because nobody else understands their schemas and, hey, this is where it all happens.

      Networking would rather be back below the hold, No, the network isn't broken, your app is buggy or the stupid website you're trying to load is just slow..

      Help desk guys meanwhile consider themselves the cocks of the walk because, generally, their camaraderie and opportunity to interact with more regular people means their souls haven't been totally crushed.

    5. Re:Can we be sure there are no exploits? by TechyImmigrant · · Score: 2

      Signal levels are another abstraction. Come back when you care about electron band gaps.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    6. Re:Can we be sure there are no exploits? by Anonymous Coward · · Score: 3, Funny

      Jokes on you. I'm building a VM language in ASM.js and VM bytecode. I get to deal with memory management and multiprocessing issues that are unique to ASM.js. Since the code compiles to opcode which can then be output as "native" ASM.js (which is then mostly compiled to machine code by browsers) or it can run blazing fast on the C VM implementation with its (native) JiT optimizations. Since the platform is meant to be an extremely portable high level and systems level language I'm currently implementing the VM and compiler in its own bytecode, whith the goal of also outputting as x86, ARM, ASM.js, JavaVM bytecode, and Perl6 bytecode.

      That means I have to deal with OS level things like spin locks, memory paging, etc. However, it also gives me the chance to radically change the security model such that all code is sandboxed, ran in a VM as bytecode and only compiled and cahed as "native" to the machine / platform / browser if trusted.

      Networking abstraction happens to be entire point of the project. Instead of everything being a file, as in UNIX, on my system everything is a network connection. Even Local "native" connections can be seamlessly wrapped as TCP or UDP connections at the OS level, so that IPC is transparent and computing can become distributed without modifying the code. Yes, that means your business can harness the CPU of its visitors to scale availability along with traffic.

      Silly single platform devs, still not harnessing every tier of development like plebians. The future is distributed, and you'll get on my level eventually.

    7. Re:Can we be sure there are no exploits? by Anonymous Coward · · Score: 3, Funny

      That was the most single most hipster post I've read on /. all year.

    8. Re:Can we be sure there are no exploits? by TheRaven64 · · Score: 3, Interesting

      The first instruction in the Intel Architecture Reference (Part 2: Instruction Set Reference) is AAA, which is named after the noise made by people forced to read x86 assembly. It is short for 'ASCII Adjust After Addition' (yes, that should be AAAA, but that would be too consistent for Intel). This instruction exists to convert the result of binary addition into the result of the corresponding BCD addition.

      Or, to put it in simpler terms: Anyone who thinks x86 assembly is not that difficult to understand is certifiably batshit insane.

      --
      I am TheRaven on Soylent News
    9. Re:Can we be sure there are no exploits? by flowsnake · · Score: 2

      The only way to truly understand C is to read the CPU circuit design on which the application will run. Otherwise you are only assuming what the CPU will actually do with the opcodes generated during assembly. See 6502 opcode 8B (XAA)

    10. Re:Can we be sure there are no exploits? by Etcetera · · Score: 2

      Because a physics model isn't an abstraction?

      Obligatory https://xkcd.com/435/

    11. Re:Can we be sure there are no exploits? by RabidReindeer · · Score: 2

      Because, among other things, compilers (such as C) can automatically generate pipeline-friendly machine language. All that extra bookkeeping is trivial for an automated process.

      And a compiler can re-optimize the entire module every time they compile.

      Hand-optimized assembly lost it when IBM introduced Pascal/VS. I COULD optimize code as good or better than it did, but considering that it was doing large-scale register reassignments, the equivalent amount of hand optimization for just one minor source change/recompile would have taken me a full day or more.

      And my boss wouldn't have tolerated that.

  3. Re:Should be micro kernel by EmeraldBot · · Score: 2

    Linux has been obsolete since introducing assembly code. Minux touches the hardware in just 100 lines of code and macosx is a micro kernel as well.

    It is 2015 and not 1985

    Better not use Minix then, because it also has assembly.

    --
    "Set a man a fire, he'll be warm for the rest of the night. Set a man afire, he'll be warm for the rest of his life."
  4. Re:Should be micro kernel by stox · · Score: 2

    All C code ends up as assembler, anyway. It just gets deleted, most of the time, before you see it.

    --
    "To those who are overly cautious, everything is impossible. "
  5. Re:Should be micro kernel by unixisc · · Score: 2

    OS-X is not a microkernel - has never been. Even when NEXTSTEP was based on Mach 3.0, that too was not microkernel. Apple doesn't use any of the rules of microkernels - user space drivers, et al - in OS-X or iOS

  6. Re:obfuscation mk2 by ThePhilips · · Score: 3, Funny

    Not replaced, you dummy.

    Elevated to a new level.

    --
    All hope abandon ye who enter here.
  7. Re:Should be micro kernel by OzPeter · · Score: 4, Funny

    Sometimes theory doesn't live up to reality.

    Yes, I've hurd that before.

    --
    I am Slashdot. Are you Slashdot as well?
  8. Re:Should be micro kernel by caseih · · Score: 3, Interesting

    Just because Minux has only 100 lines of assembly doesn't mean anything about Darwin, even if Darwin has microkernel components, so your association there is a bit fallacious. Unless it's changed recently, Darwin does have microkernel (mach in fact) underpinnings, but a complete FreeBSD subsystem is grafted onto that. So if anything Darwin is a hybrid kernel. Like most real systems out there, it's not a complete microkernel system.

  9. micro vs. mono by turkeydance · · Score: 2

    r u redi to rumble?

  10. Re:Should be micro kernel by OzPeter · · Score: 3, Interesting

    I've never seen a true microkernel that has the performance of a monolithic kernel. Nobody wants to buy a new computer and drag it down to a craw

    Did you ever use OS-9 from Microware? (not to be confused with OS 9 from Apple)

    Back in the day I ran OS-9 on a Tandy Co-Co and had a fully multi-user, pre-emptive multitasking system* running on a 6809E, 8 bit, sub 2MHz CPU. Later on I worked with a variety of industrial computers running OS-9 on 68K based systems and they worked just fine.

    * I will give you that I only ever fired up the graphical desktop all of once just to see if it worked. After that I stayed in the command line.

    --
    I am Slashdot. Are you Slashdot as well?
  11. Risk of regression by labradore · · Score: 2

    > There's a risk of regression when exposing the code to many more systems

    The risk of regression is due to refactoring, not due to testing. Ironic, given that the post cites de-obfuscation as a reason for doing this. Or perhaps our submitter just got an MBA and is learning to think and speak in management-ese.

  12. Re:Should be micro kernel by Guy+Harris · · Score: 2

    To add your claim that XNU does not follow any microkernel rules is simply false. XNU uses microkernel-style message passing.

    XNU has system calls to allow messages to be sent between processes, including sending large amounts of data by page flipping.

    It just doesn't happen to use that to implement very much of the UNIX API; it's not used to implement file I/O (that goes through ordinary BSD system calls to in-kernel file systems that are called through a BSD-style VFS) or network I/O (that goes through ordinary BSD system calls to in-kernel networking stacks that are called through a BSD-style kernel socket layer) or much of the process/thread management or VM code (that goes through ordinary system calls that end up calling Mach task, thread, and VM management calls).

    It is used for communication between user processes, and for some kernel user communication, but that's the same sort of use that happens in systems with Boring Old Monolithic Kernels.

  13. Re:Cruft by Anonymous Coward · · Score: 3, Interesting

    Proof? I can't find such posts in Mark's blog.

  14. Re:If It Ain't Broke, Don't Fix It! by Anonymous Coward · · Score: 3, Insightful

    if they want to audit those stale old things for correctness and performance, and make them more readable for future generations, and
    do the testing and review to make sure they haven't fucked them up

    then good for them. i mean really good for them.

    any code - especially the kernel - isn't a concrete artifact, its a process. an organism.

    heathy organisms eliminate their wastes

    and a 2% performance bump in system call overhead isn't anything to sneeze at

  15. Re:Should be micro kernel by Guy+Harris · · Score: 2

    As I understand it, NeXT / OSX started with a micro-kernel philosophy and then introduced some monolithic kernel concepts to address the performance bottleneck of messaging between true micro modules.

    Meanwhile Linux starts as a monolithic kernel, but introduced (un)loadable modules to address maintainability and extendability.

    So if we described it as a continuum with 'pure microkernel' being a '1' and pure monolithic kernel being a '10', then OSX would be something like a '3' and Linux would be a '7'.

    Loadable kernel modules have nothing to do with microkernels. A truly micro microkernel wouldn't need loadable kernel modules because all the loadable functionality would run in userland; plenty of monolithic kernels have loadable kernel modules.

    And OS X is a lot further from "pure microkernel" than 3. The "monolithic kernel concepts" include "running the networking stack in the kernel, standard BSD-style", "running the file systems in the kernel, standard BSD-style", and "implementing most process and VM management operations with standard system calls in the kernel".

  16. Re:Speedups? by Guy+Harris · · Score: 3, Informative

    > There are over 100 separate ... speedups

    The last time I looked, which was quite a few years ago TBH, the BSDs have, IIRC, less than 100 lines of x86 assembly, in the bootstrap.

    From relatively-recent FreeBSD:

    $ find sys/i386 -name '*.[sS]' -print | xargs wc -l
    208 sys/i386/acpica/acpi_wakecode.S
    40 sys/i386/bios/smapi_bios.S
    396 sys/i386/i386/apic_vector.s
    78 sys/i386/i386/atpic_vector.s
    160 sys/i386/i386/bioscall.s
    470 sys/i386/i386/exception.s
    900 sys/i386/i386/locore.s
    279 sys/i386/i386/mpboot.s
    831 sys/i386/i386/support.s
    538 sys/i386/i386/swtch.s
    179 sys/i386/i386/vm86bios.s
    37 sys/i386/linux/linux_locore.s
    127 sys/i386/linux/linux_support.s
    32 sys/i386/svr4/svr4_locore.s
    202 sys/i386/xbox/pic16l.s
    494 sys/i386/xen/exception.s
    361 sys/i386/xen/locore.s
    5332 total
    $ find sys/amd64 -name '*.[sS]' -print | xargs wc -l
    282 sys/amd64/acpica/acpi_wakecode.S
    326 sys/amd64/amd64/apic_vector.S
    73 sys/amd64/amd64/atpic_vector.S
    541 sys/amd64/amd64/cpu_switch.S
    906 sys/amd64/amd64/exception.S
    88 sys/amd64/amd64/locore.S
    236 sys/amd64/amd64/mpboot.S
    56 sys/amd64/amd64/sigtramp.S
    732 sys/amd64/amd64/support.S
    75 sys/amd64/ia32/ia32_exception.S
    161 sys/amd64/ia32/ia32_sigtramp.S
    38 sys/amd64/linux32/linux32_locore.s
    124 sys/amd64/linux32/linux32_support.s
    246 sys/amd64/vmm/intel/vmx_support.S
    42 sys/amd64/vmm/vmm_support.S
    3926 total

    It's about 45,000 lines in Linux 3.19's arch/x86. A fair bit of that is crypto code, presumably either generally hand-optimized or using various new instructions to do various crypto calculations.

  17. Re:opportunity for backdoors? by EzInKy · · Score: 3, Insightful

    Who can sight read assembly anymore?

    Everybody who is interested in "How Things Work" can read assemblly code. Those who depend on hopes and prayers do not.

    --
    Time is what keeps everything from happening all at once.
  18. It's only a modest refresh by m.dillon · · Score: 4, Insightful

    It's not a major refresh, only a modest one, and it doesn't really fix the readability issues (which would require a complete rewrite). Linux assembly is a mostly unreadable, badly formatted, macro-happy mess. The assembly in the BSDs is much more elegant and minimalistic.

    -Matt

    1. Re:It's only a modest refresh by Anonymous Coward · · Score: 5, Interesting

      It is a modern thing, primarily for two reasons:

      (1) As you mentioned, optimization trumped cleanliness. It's not just that a given coder couldn't be bothered wasting his time writing it cleaner: it's that often the choice was between a guy who can write clean code and a guy who can write very messy but highly-optimal code, and the latter would win in the marketplaces (the software, hardware, and programming-job ones). Writing optimal assembly code and organizing a modern large clean codebase in a HLL don't have a ton of skill overlap, all things considered.

      (2) As you rewind the clock on programming history, keep in mind that further back there were simply far fewer total programmers in existence, and far fewer working on any given codebase, by orders of magnitude. When you look back far enough, you see major companies launching major projects with a total programming staff of like 1-3 guys. Most of the code ever written in the older decades was the result of heroic one-man efforts. Why bother optimizing for others being able to read your code where there's unlikely to be many of them, and they're all likely to be crazy like you anyways?

    2. Re:It's only a modest refresh by Steve+Hamlin · · Score: 3, Informative

      +5 Informative / Insightful for parent

      For background, the parent comment is Matthew Dillon, compiler and kernel hacker on Amiga/BSD/Linux and founder of DragonFly BSD (fork of FreeBSD).

      http://en.wikipedia.org/wiki/D...

  19. Re:Should be micro kernel by m.dillon · · Score: 5, Interesting

    Nobody does message passing for basic operations. I actually tried to asynchronize DragonFly's system calls once but it was a disaster. Too much overhead.

    On a modern Intel cpu a system call runs around 60nS. If you add a message-passing layer with an optimized path to avoid thread switching that will increase to around 200-300ns. If you actually have to switch threads it increases to around 1.2uS. If you actually have to switch threads AND save/restore the FPU state now you are talking about ~2-3uS. If you have to message pass across cpus then the IPI overhead can be significant... several microseconds just for that, plus cache mastership changes.

    And all of those times assume shared memory for the message contents. They're strictly the switch and management overhead.

    So, basically, no operating system that is intended to run efficiently can use message-passing for basic operations. Message-passing can only be used in two situations:

    (1) When you have to switch threads anyway. That is, if two processes or two threads are messaging each other. Another good example is when you schedule an interrupt thread but cannot immediately switch to it (preempt current thread). If the current thread cannot be preempted then the interrupt thread can be scheduled normally without imposing too much overhead vs the alternative.

    (2) When the operation can be batched. In DragonFly we successfully use message-passing for network packets and attain very significant cpu localization benefits from it. It works because packets are batched on fast interfaces anyway. By retaining the batching all the way through the protocol stack we can effectively use message passing and spread the overhead across many packets. The improvement we get from cpu localization, particularly not having to acquire or release locks in the protocol paths, then trumps the messaging overhead.

    #2 also works well for data processing pipelines.

    -Matt

  20. Re:Should be micro kernel by 0123456 · · Score: 3, Interesting

    You'd presumably need to add new CPU functionality to allow fast context switches. If I remember correctly, a 20MHz Transputer took about one microsecond to switch threads, because that was one of the primary design goals. Of course, that lead to them building a stack-based CPU where almost nothing had to be saved on a context switch...

  21. Re:Should be micro kernel by thogard · · Score: 2

    It was a monolithic kernel. One of the interesting features were devices drivers were modules and there was a small device node module which would say stuff like "used module 'serial driver', call it tty4 at IRQ 2 and address 0x454040". The kernel would deal with all IRQs in the hardware and then run the IRQ callback funtion in the proper module. That allowed user level device drivers back in the early 1980s.

    Another cool feature was each software module had a CRC so it could detect bad binaries. There were ways to whitelist and blacklist based on CRC values.

  22. Re:Should be micro kernel by Guy+Harris · · Score: 4, Insightful

    I'm sure you're right, though they have something to do with micokernels. There was Linus interview from a few years back explaining his preference for the monolithic approach, and he explained that modules were introduced to give most of the benefits of the microkernel, without the drawbacks.

    I'd have to see that interview to believe that's exactly what he said. In this essay by him, he says

    With the 2.0 kernel Linux really grew up a lot. This was the point that we added loadable kernel modules. This obviously improved modularity by making an explicit structure for writing modules. Programmers could work on different modules without risk of interference. I could keep control over what was written into the kernel proper. So once again managing people and managing code led to the same design decision. To keep the number of people working on Linux coordinated, we needed something like kernel modules. But from a design point of view, it was also the right thing to do.

    but doesn't at all tie that to microkernels.

    Loadable kernel modules in UN*Xes date back at least to SunOS 4.1.3 and AIX 3.0 in the early 1990's. I'm not sure they were introduced to compete with microkernels.

  23. So that is how it happens by PenguinJeff · · Score: 4, Funny

    The improved assembly code is what allows the Terminator to be so efficient a killing machine.

  24. Re:Cruft by benjymouse · · Score: 4, Informative

    For some time now, Mark Russinovich at Microsoft has been talking about just how bad the Windows kernel was/is in his blog.

    I think you are confused. It was not Mark Russinovich, but rather Linus Torvalds, and he was talking about the Linux kernel, not the Windows kernel.

    "I mean, sometimes it's a bit sad that we are definitely not the streamlined, small, hyper-efficient kernel that I envisioned 15 years ago...The kernel is huge and bloated, and our icache footprint is scary. I mean, there is no question about that. And whenever we add a new feature, it only gets worse."

    Glad I could help.

    --
    Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
  25. Re:Speedups? by jones_supa · · Score: 5, Interesting

    There's also a cool tool called CLOC which gives a nice report about a source tree including the lines of code and in which languages they are written.

  26. Re:Should be micro kernel by itzly · · Score: 2

    Micro kernel is not necessarily better.

    No, micro kernels are plain worse. The biggest problem with micro kernels is the synchronisation problem you get with distributed state. Imagine a file system that is split up in different tasks, instead of one monolithic blob. Now, one task makes a change, like removing a file. Before the other tasks can make changes to the filesystem, they first need to synchronize to get the latest state. This becomes either terribly inefficient, or a huge mess, and most likely both at the same time.

    Minix, for example, solved this particular problem by letting the entire filesystem be supported by a single task, but results in terrible scaling performance when adding more users/processes.

  27. Re:Wouldn't a re-write be more fruitful? by Hognoxious · · Score: 4, Insightful

    I don't really know why.

    Users will say "But it works, we don't want to change waaagh scary" while simultaneously reporting 237 bugs all of which are OMG critical. Management will assume that it's cheaper, because existing stuff is already there so it's wasteful not to use it.

    Now it's true that once a load of crufty business rules have built up with 17 levels of nested conditionals it can be risky to try and replicate it for fear of missing some obscure case that's bound to occur at an inconvenient time for a key customer. There's no documentation, of course. Or if there is it's the source code, six revisions behind, pasted into a word document with three screenshots taken as BMPs so the whole thing is 1.5G. This alone can make you say "sod it".

    I can't find the correct phrase but maybe it's just a false analogy with physical things. Like reusing wood from an old shed to build a deck possibly is cheaper.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  28. Re:If It Ain't Broke, Don't Fix It! by Gavagai80 · · Score: 3, Insightful

    You're operating on the mistaken assumption that code that works now will always work and never need to be modified. You can't leave anything but the simplest things alone forever, because changes to the context/world will eventually require changes to it. If it's spaghetti code, that's going to be causing future bugs that are going to be non-obvious and difficult to discover.

    --
    This space intentionally left blank
  29. Re:Wouldn't a re-write be more fruitful? by DrXym · · Score: 2
    The problem with total rewrites is they almost always involve a huge amount of effort, introduce new bugs and when they "work", users barely notice the difference. So the company soldiers on, applying patch upon patch to some bullshit codebase and suffering from it but in a incremental way.

    Worst of all is when they embark on a rewrite and give up half way through. I was involved in a project to port a C++/ActiveX based system to .NET forms. They ported most of the major views but left a lot of the minor stuff from the old codebase lying around and wrote bridges to host it in the new framework. So they doubled the code, half of it became bitrotten and hidden by the new code and bloated out the runtime. Great project.

  30. Re:If It Ain't Broke, Don't Fix It! by Troed · · Score: 3, Insightful

    I am "in Software" since ~25 years. I also hold a degree as a Software Engineer.

    People who obsess about rewriting old code just because it's old tend to forget that in that old code are many bug fixes for edge cases found over the years. It was well documented and part of my education to know and understand that rewriting often caused those same bugs to surface again.

    Best practice is to run both the old and new software in tandem for a while and verify the results. In reality no organization besides NASA will do that.

  31. Re:If It Ain't Broke, Don't Fix It! by Parker+Lewis · · Score: 2

    I have a degree in Computer Science, and I'm in software since 1998. If you do a proper refactoring, at the end of the day, you'll get a much better code, probably better performance, and now that you have more background in the subject, a smaller code. If you're using a code repository, so you'll never lose anything. And if you have a bug regression always coming back, you need a proper test/spec to cover that. So, refactor is really good when: you have a way improved background in the subject, code repository (i.e., history), and tests to cover the recurrent bugs and the main features.

  32. Re:If It Ain't Broke, Don't Fix It! by Troed · · Score: 2

    ... thus "very few organizations besides NASA".

    A lot of people seem to miss the point on how the ideal lab condition doesn't carry over into real world organizations.

  33. Re:obfuscation mk2 by X0563511 · · Score: 2

    I find your signature incredibly relevant to your post.

    --
    For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
  34. Re:Wouldn't a re-write be more fruitful? by phantomfive · · Score: 2

    I don't really know why. Users will say "But it works, we don't want to change waaagh scary" while simultaneously reporting 237 bugs all of which are OMG critical.

    Because if you did it wrong the first time, there's no chance that you're going to do it better the second time. You'll end up leaving out crucial functionality or something.

    If you don't know how to clean up a codebase in-place by rewriting a little at a time, then you aren't skilled enough to do a rewrite from scratch.

    --
    "First they came for the slanderers and i said nothing."