Slashdot Mirror


User: SL+Baur

SL+Baur's activity in the archive.

Stories
0
Comments
2,242
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2,242

  1. Re:When in doubt rewrite it on Reuse Code Or Code It Yourself? · · Score: 1

    I've seen many projects that other programmers have said just absolutely need a rewrite and it's never ended well. Usually, they end up with more problems than they started with.

    I tend to agree, but ... it depends upon how you go about doing it. I'm "rewriting" core code right now in my project, but it's more or less algorithmic changes I'm doing and being careful and keeping the original code working as I'm transforming it means I can do regression testing every step of the way.

    If you really need to sanitize the code base, wrap the old stuff. I've had much success with this

    If the base algorithm is wrong and/or too limited to permit optimization (and if we get things wrong, the code will take hours if not days to complete) "wrapping" things will not make a bit of difference.

    (Serious question) What do you do with long-lived code that has several layers of wrappers in it? (Serious question #2) What do wrappers have to do with fixing core code that may be unreadable 600+ lines of nested if/elses (see the emacs core for plenty of examples of this).

    "Don't patch bad code, rewrite it" is a guideline out of _The Elements of Programming Style_ and one I absolutely believe in.

  2. Re:code from scratch on Reuse Code Or Code It Yourself? · · Score: 1

    Amen, brother. And be sure to document your work.

    No amount of documentation saves crap code.

    Think of the starving programmers who will be maintaining that code who must feed their children!

  3. Re:code from scratch on Reuse Code Or Code It Yourself? · · Score: 1

    I know that you wrote that as a joke and congratulations on your +5 funny, but I did that for real. Back in the early 80's, C (on the IBM PC under PC DOS) was often criticized because a one line printf("Hello World!\n"); often made a 50-100k executable because of all the run-time stuff it pulled in and I did a reimplementation of libc that turned that into something less than a 5k executable - portable to C Innovations C compiler and Lattice C, which later was purchased by Microsoft.

    Oh and I kept my rescue media (bootable 1.44M floppies) using libc5 instead of libc6 because I could make a tiny libc5 .so and thus be able to cram zsh as /bin/sh on the root file system. Could not quite fit nvi in, though I tried.

    Times, have changed ...

  4. Re:code from scratch on Reuse Code Or Code It Yourself? · · Score: 1

    Yep. Don't re-implement basic stuff but write wrappers around it. That way you can change the underlying technology and the intermediate layer will save you from most of the pain.

    Sigh. And hopeless confuse anyone who comes after you who has to maintain the bloody mess.

    When the OO fad finally dies, I'll be happy.

    Steve's Law - If a layer of abstraction is the right answer, you have probably asked the wrong question.

    (See my other posts under this article).

  5. Re:code from scratch on Reuse Code Or Code It Yourself? · · Score: 1

    Comment your code.

    Ah yes, comments are ALWAYS useful.

            # Loop over the words in the query
            #
            ARG: while (@args) {

    Better to write clear code in the first place and that particular bit of code does not need a comment.

    See _The Elements of Programming Style_ for how to write code and _The Mythical Man Month_ by Fred Brooks for how to manage a big project, but certainly NOT how to write code.

  6. Re:code from scratch on Reuse Code Or Code It Yourself? · · Score: 1

    reuse your own code

    I've done that on a couple of occasions, but the problem tends to be that you run out of code if you apply it to a proprietary code base (thus making your original code unreusable by you ever again).

    In recent years, I've tended to have been switched between different programming languages as well as different jobs/assignments so it hasn't been an option.

  7. Re:prototype quickly, optimize later on Reuse Code Or Code It Yourself? · · Score: 1

    Except every time I've ever done a prototype it is invariably shipped as product minutes later.

    You're going about it wrong.

    Develop the prototype as a proof of concept (use those words if "prototype" sends your people into a frenzy) and show them the UI with nothing attached underneath first.

    Otherwise, I most agree with the Subject line.

  8. Re:Reuse good code as much as possible on Reuse Code Or Code It Yourself? · · Score: 1

    Quality code depends more on the dedication of the developers on the project than it does on programming IQ (again, whatever that means).

    Programming IQ is defined quite clearly in _The Elements of Programming Style_, Kernighan and Plauger - http://www.amazon.com/Elements-Programming-Style-Brian-Kernighan/dp/0070342075

    It's required reading and the advice is timeless.

  9. Re:Reuse good code as much as possible on Reuse Code Or Code It Yourself? · · Score: 3, Insightful

    Stuff like Perl + CPAN is good because of all that code you don't have to write. The less code you write, the fewer bugs you make.

    Stuff like Perl + CPAN is also a very mixed bag and has likely caused my employer very much expense towards working around limitations in code therein compared to what has been gained. I know they've spent upwards of 6 figures on my time and others in direct and indirect costs working around the limitations and bugs in Storable, to name one example.

  10. Re:It's knowing when on Reuse Code Or Code It Yourself? · · Score: 2, Insightful

    Often you spend a lot of time creating sophisticated abstractions to ease future extensions only to find that the future is so different than you expect that your elegant architecture is just code bloat.

    I don't. There's a different term for that - "Over Engineering". The OO fad has certainly contributed mightly towards encouraging over engineering.

    Avoid putting artificial limitations into code where they should not and need not exist. That will do you well in most cases.

  11. Re:It's knowing when on Reuse Code Or Code It Yourself? · · Score: 1

    That's a little too simplistic, isn't it? What good is code that works well and is maintainable if the system it runs on has become obsolete?

    If it is maintainable (which also implies well-written), then it is a straightforward task to port this to another system. I'd rather deal with rewriting a program written in maintainable HP1000 assembly language than something in a modern language that has become unmaintainable over time as hit & run programmers have made unsupervised and ill-advised modifications over the years. (Oh wait, I'm doing that right now, it's a nightmare, even though it's not particularly obfuscated Perl).

    Development time must be taken into account

    Rarely is that really an issue. If you're talking about rewriting something the size of XEmacs, then yes. There are many factors to take into account. In the case of XEmacs it's backwards compatibility to 30 years of emacs lisp. In the case of other apps, it may be compatibility with gigabytes or terabytes of database data.

  12. Re:It's knowing when on Reuse Code Or Code It Yourself? · · Score: 1

    That would work for me. It's a little simplistic (good programmers can also document code, trouble shoot problems, etc.), but certainly that covers the basics.

    The key word is maintainable. Maintainability of newly written code is just about everything.

  13. Re:It's knowing when on Reuse Code Or Code It Yourself? · · Score: 1

    It's not rewriting code or reusing code that makes you a great programmer. It's knowing when to rewrite code and when to reuse code that makes you a great programmer.

    Exactly. Experience will help you with this.

    Well ... yes and no. It's not exactly "rewriting" code if you have to duplicate the functionality of a library for a superset of the capability if the library doesn't fit the requirements.

    Certainly, experience will tell you when it make sense to make use of "reusable" libraries. Experience will also teach you that "reusable" libraries tend not to be.

    On the system[1] I'm typing this message on:

    $ ls /usr/lib/*.so | wc
    570
    $

    With a handful of exceptions like lib[cm], libX11, libqt, etc., it's more a general problem.

    And I re-used a lot of libraries that made things simple and quick for me. The new requests coming in involve capabilities beyond those of the frameworks.

    That's really where you made your mistake. Experience will also teach you that development cost is irrelevant in any software project that will get used. Maintenance cost (and the cost of adding additional features over time) will dominate.

    "Quick and dirty solutions are always the latter, rarely the former".

    [1] Development-wise, I'm only coding Perl at the moment and beyond XEmacs and Perl I haven't really needed to install much development stuff and so I haven't.

  14. Re:bullshit, no one wants vista. on Windows Azure Offers Developers Iron-Clad Lock-in · · Score: 1

    Your job is difficult because your internal IT people are idiots.

    Some are, some are not. It's the same in every company. The ones that I have dealt with have been very sharp.

    I have cataloged Vista's problems for them

    That's very nice, but nobody is really listening to you.

    I don't care. Microsoft Windows will never be my platform of choice. My bosses do not care and would not listen to anyone who abbreviates Microsoft as M$ anyway. They want their calendar crap to work, which doesn't really work well at all. Microsoft Exchange is utter crap.

    If they want Vista at this point it is because they want Windows at any price.

    Non sequitor. They've already paid for it. They have an enterprise site license.

    Microsoft Windows XP (Enterprise edition) is crap. I recently distributed an internal email that said that Microsoft Windows XP is the best OS Microsoft has ever released, it only crashes a couple times a week (which is flamebait because it crashed more like once every two weeks in the testing I did), but among the responses I got back were "I wish it only crashed that seldom".

    Promoting free software at a big dumb M$ partner company for any reason is fatal.

    You are jumping to conclusions and writing off potential friends. We have products that are driven by Linux.

    ESR, Bruce Perens, Allen Cox, Richard Stallman or anyone else who stood up for your rights

    Of those four, I've only met Bruce Perens. Nice guy, drank beer with him in Tokyo at the same table as Commander Taco. I've only talked to Richard Stallman on the phone where he announced that he would have to maintain war against me (meaning the XEmacs community) unless I had everyone sign over copyright to him.

    No matter how much I like Bruce, I do not need any one of you to "defend my rights".

    Without people like me writing the code, there would be nothing for self-righteous people like yourself and Richard Stallman to "defend".

    I've contributed software anywhere and everywhere, from the Linux kernel to libc, to many mail programs, etc.

    You are running code that I have written if you are running either Linux or any BSD, so I _demand_ that you rename your system Linux/GNU/Steve or OpenBSD/Steve, or whatever. Is that reasonable? I do not think so, but Richard Stallman does.

    I'm sorry that you are in such a place, especially if you are who you say you are.

    I'm not and I am. I love working at Cisco. Love it. I find it odd that you think I hate emacsen when I always use XEmacs for editing and have been using emacs-based/derived editors for a couple of decades now and you're too stupid to see that I used to be a frequent poster to alt.religion.emacs (oh god!, I miss that newsgroup).

    -sb (Maintainer of XEmacs 1996-2000)

  15. Re:Incentive? on Are MMOs Time-Release Vaporware? · · Score: 1

    And while I don't care for Stormreach either, it certainly hasn't failed yet.

    I did not mean to imply that. I should have qualified my statement ("it was too late, for me.").

    The graphics are nicer than WoW's. Is that Art Bell doing the voice overs? Sure sounds like him.

    The barriers of initial leveling (you can't get into some place interesting like the Market Place without grouping for the boring Waterworks quests) were just too painful for me to do twice, so I gave up.

  16. Re:Twitter, go away on Windows Azure Offers Developers Iron-Clad Lock-in · · Score: 1

    I keep hearing this more and more. The biggest reasons being cost savings, of course. Good luck with that. I'd like to see more companies doing this.

    Thanks. It's a double whammy, actually.

    Things are also beginning to sink in as to how much using Microsoft Exchange for email really sucks up $$$.

    I would expect the tightening stock market to have some impact here.

    My own company had record profits last quarter and our stock is still going down based on the overall market.

    Disclaimer: I work for Cisco, I do not speak for Cisco. All opinions expressed are my own.

  17. Re:bullshit, no one wants vista. on Windows Azure Offers Developers Iron-Clad Lock-in · · Score: 1

    I work for quite a large company and I have been assured (sadly) that internal IT is driving towards a migration towards Microsoft Vista.

    I also have no reason to believe that my company is the only one doing so.

    Microsoft Vista adoption is submarined and lunatics like you only make my job (driving Linux desktop adoption) that much harder.

    Begone.

  18. Re:An Impossible Expectation on Are MMOs Time-Release Vaporware? · · Score: 1

    When World of Warcraft bites the dust, you'll have a whole hell of a lot of people with 10gigs of data on their drives that does seemingly nothing.

    If it ever becomes time to `rm -rf World\ Of\ Warcraft', I will not be shedding a tear over the money I've spent on it. It is worth every penny/centavo. And most things become boring after awhile.

    Why am I not playing qtnethack right now? Sigh.

  19. Re:Incentive? on Are MMOs Time-Release Vaporware? · · Score: 1

    But I don't understand why anyone would buy software that requires a service to function. This seems like a case of had it coming.

    I see the point. I also see the barrier of entry of incoming MMOs.

    I bought DDO Online Stormreach[1] first. Got a one week trial first, then decided to "buy" it. Big mistake. I had ended up on a European server for the trial and the US copy of the game I had would not permit me to play on the original server. Geographical regioning sucks! Big time.

    I got WoW at the same time I bought Stormreach and ended up never looking back. By the time I got their "WE WANT YOU BACK, SOLO NOOBIE STARTING QUESTS ARE MORE NUMEROUS NOW" it was too late.

    Serious competition to WoW is tough and that's bad because competition is good for everyone.

    [1] Yeah, yeah, yeah. I was "in" a brief Microsoft Windows XP appreciation "class". And it was all Slashdot's fault anyway - most of the MS Windows fans here say they must use it because of games, so I decided to put that to the test.

  20. Twitter, go away on Windows Azure Offers Developers Iron-Clad Lock-in · · Score: 1

    you can rest assured that human stupidity is limited.

    Oh, really? I presume you do not include yourself in that statement.

    Microsoft Vista adoption numbers are submarined. They are going to be driven by enterprise adoption, most of whom are still in the process of validating it.

    Oh wait, let me translate that into something someone can read to you that you'll understand.

    Many lots of mans use Vista next year or next year plus 1.

    If you would just shut up, maybe the rest of us could move the adoption of Linux on the desktop in Enterprise forward (as I'm being paid to work on) a bit faster.

  21. Re:Like iPhone on Windows Azure Offers Developers Iron-Clad Lock-in · · Score: 0, Flamebait

    They have no interest in what a Registry is, and shouldn't need to know. On Microsoft's part, the Registry is an unbelievably bad idea that only recently has gotten protection from root object manipulation.

    I'm not sure you're arguing what you think you are arguing.

    They don't know the difference between root and a live hand grenade, and shouldn't have to.

    Nope, sorry. We require automobile drivers to be licensed. In enlightened states, we require concealed carry permits to be licensed. Now that we have millions of clueless Microsoft Windows "drivers" on the "Information Superhighway" we have botnet problems and SPAM beyond what few had imagined possible.

    It's never worked that way, will never work that way[1] and thanks to Microsoft, we all have big problems now. See my journal entry "Why we *must* blame Microsoft for malware".

    [1] I suppose it could after my generation of computer guys is dead, but the restrictions required will make Herr Obama look like a moderate.

  22. Re:Like iPhone on Windows Azure Offers Developers Iron-Clad Lock-in · · Score: 1

    What's so hard to understand about EA? They make games, their games crash, you cannot submit bug reports, you must report them on their forum and when you do that, they ban you.[1]

    Cloud computing could be a very good idea for intranet enterprise use, but over the open internet, it's just asking for trouble.

    [1] The two most recent games I got from EA, Tiger Woods 2008 and the Sims2 Castaway for PSP both crash consistently at points that you must pass to win the game. So, what's the point in playing?

  23. does it guard against wardrobe malfunctions? on MTV Bleeps Filesharing Software Names In Weird Al Video · · Score: 1

    ISTR that the Stones sang that song at the Super Bowl halftime and that line was bleeped or muted.

    There was also the example of The Doors on Ed Sullivan (which was a live show) doing "Light My Fire". They were asked to blur the line "we couldn't much higher" (but did not - http://answers.yahoo.com/question/index?qid=20080605152935AAplqas ).

    Presumably The Doors "incident" is part of what they are trying to protect against.

    What I want to know is, does this Microsoft patent guard against "wardrobe malfunctions" in video? If so, there may be prior art against that. Much of the Philippine videos I've seen routinely pixelates the bosom area of women.

  24. There's absolutely nothing wrong with this on MTV Bleeps Filesharing Software Names In Weird Al Video · · Score: 2, Funny

    I viewed this video on *BLEEP* core 9 with *BLEEP* 9.61,running *BLEEP* 2.6.25 and did not hear anything bleeped.

    It just plain does not work or somebody is lying.

  25. Just about anyone except Fandral Staghelm on Who Do Warcraft Players Want As President? · · Score: 1

    I could never vote for a hordie, and I suppose a one-on-one election between Staghelm and an Orc would make for an interesting choice. The last time the hordies raided Darnassus and I was in the area, I went up to the top of the tower and danced on Staghelm's corpse. I'm not overly fond of the boy king of SW City, but I do not think Kings usually like to stand for elections.

    Unless there is a Draenei running, I will probably sit this one out.