Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^6: Nobody Expects the Agile Imposition (Part VI): Architecture

by eyepopslikeamosquito (Chancellor)
on Jan 23, 2011 at 19:25 UTC ( #883792=note: print w/replies, xml ) Need Help??

in reply to Re^5: Nobody Expects the Agile Imposition (Part VI): Architecture
in thread Nobody Expects the Agile Imposition (Part VI): Architecture

Yes, the definition of what "rewrite" means is open to interpretation. FWIW, I was following the spirit of the definition used by Joel Spolsky in this article where he argued that Netscape made a strategic mistake by rewriting their whole code base from scratch for Netscape 6 rather than using their Netscape 4 code base as a starting point and adding new features to it. Like Spolsky, I was trying to compare the alternative strategies of adding new features on top of an old and tangled code base versus throwing it all away and starting afresh.

There are certainly shades of grey here. I remember an old work mate of mine who loved to joke that if he said he was going to "rewrite" some horrible old component, he would never get management approval, while if he said he was going to "refactor" it, he would get approval ... and then proceed to ruthlessly "refactor" it until it was essentially a rewrite.

Out of curiosity, would you agree with tilly that Perl 5 was a "rewrite" of Perl 4? And is Perl 6 a "rewrite" of Perl 5?

  • Comment on Re^6: Nobody Expects the Agile Imposition (Part VI): Architecture

Replies are listed 'Best First'.
Re^7: Nobody Expects the Agile Imposition (Part VI): Architecture
by BrowserUk (Pope) on Jan 23, 2011 at 23:09 UTC
    Yes, the definition of what "rewrite" means is open to interpretation. FWIW, I was following the spirit of the definition used by Joel Spolsky

    I agree that the term is subject to interpretation, but I think using NT as an example of a "rewrite" (of 3.1 or 95), misses the spirit of Joel's definition.

    There are 3 parts to any piece of software development

    1. The design: This is the external view of the software.

      It includes the GUI or the CUI.

      It also includes any external interface APIS; input, output, and interchange file formats; communications protocols; and DB schemas.

      The interface can remain the same, whilst both of the following change.

    2. The architecture: This is the internal structure and organisation of the software.

      This is harder to define, but for example, for interpreters and compilers, it covers such things as whether it is a single or multi-pass.

      It covers whether the program is written as a single monolithic flow, or is broken up into procedures and subroutines.

      For OO code, it determines how it is broken up into classes. For example, and MIS system might have Job Role as an attribute of an Employee class. Alternatively, an Employee might be an attribute of a Job Role class.

      For a server, it might be pre-forking; or event-driven; or on demand threaded; or thread-pooled; or some combination of two or more of those.

      The architecture is independent of the implementation. It may be implemented in many languages; or implemented many times in the same language.

    3. The implementation: A specific set of source codes.

      You can re-write the implementation without changing the architecture.

      You can also re-architecture the program whilst retaining much of the existing implementation.

    I think Joel Spolsky's example of the Netscape browser is a good example of a re-write because both version 4 and version 6 were effectively written to meet the same design: HTML rendered to a SDI GUI. My reading of his point is that whilst Netscape 4 had evolved into a spaghetti architecture, much of code underlying the rendering could have been retained.

    I cannot comment on the Perl 4/5 transition as I never used 4 and have never looked at the implementation.

    For Perl 5/6. Whilst the language retains the flavour of Perl, it is sufficiently different to consider that the design has changed. The complete segregation of the parsing & AST generation from the interpreter run-loop, means that the architecture is radically different. And the fact that almost nothing of the Perl 5 implementation could be reused--even if it was desired--means that the implementation has to be completely new. As such, I would say that it is not a re-write, but rather a substantial re-design; and radical re-architecture; and a completely new implementation.

    And getting back to NT/95/3.1. 3.1 was a single user, single address-space, cooperative multi-tasking OS with no security, and no protection or differentiation between different tasks, nor even between application and kernel level code.

    NT was designed from the ground up with sophisticated--many would say overcomplicated--security and right management; pre-emptive multi-tasking; strict segregation of kernel (ring 0) and user (ring 3) code; protected virtual address spaces; blah blah.

    I think that as an example for your purposes, its inclusion actually weakens your argument.

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^7: Nobody Expects the Agile Imposition (Part VI): Architecture
by tilly (Archbishop) on Jan 24, 2011 at 06:02 UTC
    Perl 5 was clearly a rewrite of Perl 4. Sure, a lot of scripts "just worked" with both. But the interpreter was almost completely rewritten and the official list of known things that could go wrong was rather long.

    Perl 6 is more complicated. If there was any hint of compatibility with Perl 5, then I'd call it a rewrite. But they are different languages. And going forward I expect Perl 5 and Rakudo to co-exist indefinitely. (Though eventually I hope that Rakudo reduces confusion by stopping calling itself Perl 6.)

Re^7: Nobody Expects the Agile Imposition (Part VI): Architecture
by Jenda (Abbot) on Jan 25, 2011 at 17:58 UTC

    Considering how insanely bloated Netscape 4 was, adding features was definitely not an option. It was not the two years between NC4 and N6, it was the NC4 itself what caused the drop of its use.

    But we've gotten rather OT by now :-)

    Enoch was right!
    Enjoy the last years of Rome.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://883792]
[GotToBTru]: you could, yes

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2017-02-22 18:54 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (335 votes). Check out past polls.