Slashdot Mirror


Optimizing Development For Fun

chromatic writes "Geoff Broadwell has written an analysis of optimizing an open source project for fun, specifically the Pugs project. Broadwell argues that making development fun and easy leads to higher quality code and a faster velocity of development, even when implementing a frivolous project (a toy Perl 6 interpreter) in an uncommon language (Haskell). The Pugs leader, Autrijus Tang, will speak about both Pugs and Haskell at EuroOSCON."

144 comments

  1. This is all well and good... by g_dunn · · Score: 4, Insightful

    But, as a programmer, if the project I'm working on isn't something I want to do, and enjoy doing, why am I doing it? Even in the workplace, all of my projects are fun to me - That's why I decided to work there! And as open source projects are generally done as an aside, why volunteer to work their if the project doesn't interest you anyway? If you're not enjoying what you're doing, why are you doing it?

    1. Re:This is all well and good... by downbad · · Score: 1

      Because it needs to be done?

    2. Re:This is all well and good... by g_dunn · · Score: 0

      Everything I've ever done that 'needed' to be done, I enjoyed doing. If you're not enjoying what you do, why are you doing it? Chances are, someone else is capable of doing it, and would enjoy their time doing so.

    3. Re:This is all well and good... by NanoGator · · Score: 5, Insightful

      "If you're not enjoying what you're doing, why are you doing it?"

      Food on the table, mainly.

      In any event, I think questions like this are more helpful for management than they are for programmers or anybody else with a similar profession. The article uses the word 'fun', but in practice, I think 'importance' is a more interesting term. (Maybe they're not all that dissimilar?) Constantly changing directions in order to meet arbitrary deadlines or "chasing money" is a real morale killer. Working with well laid plan knowing that you're boring work is going to pay off into an interesting product, that's a lot more interesting. It's important.

      Eh I think I'm mainly just stating the obvious here. When I hear stories of companies like EA demanding tons of unpaid overtime to meet an arbitrary deadline, it seems to me that even the 'fun' parts of asset building turn into a curse real fast. It's not fun to try to shortcut your way to the finish line with the concern that one of those shortcuts will come back and nip your hinder.

      --
      "Derp de derp."
    4. Re:This is all well and good... by Anonymous Coward · · Score: 1, Funny
      Everything I've ever done that 'needed' to be done, I enjoyed doing. If you're not enjoying what you do, why are you doing it? Chances are, someone else is capable of doing it, and would enjoy their time doing so.

      Everything isn't about you.

    5. Re:This is all well and good... by g_dunn · · Score: 0

      Why be an architect if you don't enjoy designing buildings?

      Why be a web master if you don't enjoy building webpages?

      Why be a insert job here if you don't enjoy whatever the job is?

      So why be a programmer if you don't enjoy programming?

    6. Re:This is all well and good... by g_dunn · · Score: 0

      Certainly! Of course, those are the sort of things that are important in the business world. Of course, there is development in OSS projects that are part of business, but the majority are done because the people developing want to be developing it. The article inquestion is talking about OSS, which is why I asked the question in the first place. I know I would never volunteer to help out a project I wasn't interested in. Why would anyone else? For money? Well, there are some out there, but you could get a job at a commercial software company and probably be recieving a better paycheck, and have the same satisfaction as you would working at one of the few commercial OSS businesses. For something to add to your resume? There are plenty of projects out there, I'm sure you can find one that you would enjoy being part of.

    7. Re:This is all well and good... by Anonymous Coward · · Score: 0

      Yeah! Why be a burger flipper if you don't like burgers! Why be a school janitor if you don't like cleaning up kid vomit! Why be a monkey if you don't like flinging poo! Etc, etc, etc.

    8. Re:This is all well and good... by dubl-u · · Score: 2, Insightful

      In any event, I think questions like this are more helpful for management than they are for programmers or anybody else with a similar profession.

      I don't know about that. I'd use the term "enjoyable" instead of "fun", but I strive to structure the projects I work on so that everybody is enjoying it. Like most people, I'm much more productive when I'm enjoying things, so there's a big financial benefit to arranging things so that people are eager to come to work every day. And I think it's every employee's responsibility to push for an environment that's maximally productive.

    9. Re:This is all well and good... by Anonymous Coward · · Score: 0
      Why be an architect if you don't enjoy designing buildings? $$$$

      Why be a web master if you don't enjoy building webpages? $$$$

      Why be a insert job here if you don't enjoy whatever the job is? $$$$

      So why be a programmer if you don't enjoy programming? $$$$

      Unfortunately for the great majority of people, judging by job satisfaction surveys, a steady paycheck outweighs doing what you enjoy.

    10. Re:This is all well and good... by zod2008 · · Score: 1

      If you're not enjoying what you're doing, why are you doing it?

      A great point that I should include in my FAQ. Fun is such an arbitrary thing and will be all but annihilated as you submit yourselves to me. Programmers of EA will have no difficulties under my new regime. Vote for me: http://zod2008.com/

    11. Re:This is all well and good... by morgajel · · Score: 1

      as a programmer working for a company, do you think *every* program you're put on is going to be fun? do you think you're going to be in charge of every facet?

      I gotta tell you, I worked for a Gov't contractor for a while, and one of the developers before me considered himself a master JSP developer.

      Shame he didn't actually know Java.

      I know Perl, PHP, ruby, Java, even a bit of asp and C, along with a handful of other languages I learned in college. This project shouldn't have been difficult. it was a fucking nightmare.

      cleaning up other people's shit is not always fun. Did I enjoy the *job*? yes. did I enjoy most projects? yes. Did I enjoy that one? No.

      The world is not black and white, my friend.

      --
      Looking for Book Reviews? Check out Literary Escapism.
    12. Re:This is all well and good... by Chiwo · · Score: 1

      You're doing it for someone else. I "grew up" as a programmer when I stopped simply creating beautiful and elegant things and started caring about the real value of my work to other people.

      Or, longer term, you're doing it because it will achieve your goals. If you only do what pushes your buttons right now you won't get very much done in the long run. It's like saying that you'll climb to the highest point on earth by only ever walking uphill, starting from wherever you are.

  2. Here's a MIRROR of the article before site crashed by Hot+Grits · · Score: 0, Informative

    Every project has a set of goals that guide it through the meandering path of development. For some projects, these goals are unspoken, seen only in the primary style of the code, or in the size and shape of its APIs. When Autrijus Tang started the Pugs project to create a Perl 6 compiler, he had an explicit goal: optimize for fun. Fondly referred to as -Ofun -- a typical compiler writer's joke, referring to the standard -O flag used to tell a compiler what its primary optimization goal should be -- optimizing for fun is probably the most important decision Autrijus made. Optimizing for fun has had tremendous benefits. In just 8 months, the Pugs project has gained well over 100 committers, averaging about 30 commits a day for the life of the project. Unlike many projects, these commits do not all come from a handful of people. In fact, the 3 busiest developers can only claim about half the commits; the rest are well spread, with 50% of the developers able to claim 9 or more, 25% having 24 or more, and 10% having over 150 commits each! The team is not just productive, it's also creative. Starting with just a single interpreted backend written in Haskell, Pugs has added compiled backends for JavaScript, Parrot, and Perl 5. Dozens of modules have been written or ported, ranging from encryption algorithms to IRC bots. Various developers have experimented with concepts ranging from continuations and coroutines to self-referential preludes and efficient type inferrence, with working code often leading the official specs. Of course, this should come as no surprise. As any cognitive science expert will tell you, fun is a great way to focus the mind. Developers that aren't enjoying themselves will slow down, write buggy code, make poor decisions, and eventually leave the project (even one that pays). Conversely, rampant fun will bring coders in droves, and give them a passion for their work that shows in quality, quantity, and goodwill. It's a pretty good bet that optimizing for fun will produce a better product than almost any other method. So what's Autrijus's secret for -Ofun? As he puts it, "the essence of fun boils down to instant gratification and a sense of wonder and discovery." Or as chromatic calls it, imagineering. It turns out there's quite a bit that goes into that: * Make -Ofun your primary goal (there can be only one). Next time you're forced to come up with a vision or mission statement, try that one on for size. (If management agrees, you've chosen a good place to work.) Every other goal chosen for the project should either flow from that one, or be secondary to it. * Use modern, decentralized version control. If you're not already using a version control system, shame on you. If you are still using an old system such as CVS, RCS, or SourceSafe, you're really missing out. Modern systems offer atomic changesets (so all edits relating to a single conceptual change can be captured together), full versioning of directories and symbolic links (so that files can be moved, copied, or renamed and still maintain full history), fast tags and branches, and more. Most important, modern version control systems offer decentralized, offline operation. Every developer can keep a local copy of the repository on their laptop, editing and committing locally to their heart's content, even when network access is unavailable. When ready for a merge, the developer can push changes to other developers or to a central "master" repository. Some systems, such as darcs and the git family are decentralized at their core; the excellent SVK client layers decentralization on top of a modern centralized system, Subversion. * Embrace anarchy. One of the key realizations of modern Internet projects (the oft-quoted Web 2.0) is that on the whole, your users can be trusted. The key is that the users also need to have the tools needed to repair any damage the tiny minority may cause. For a development project, modern version control systems can give you "anarchy with an audit trail". If something does go wrong (intentionally or more l

  3. Want to make dev fun? by Anonymous Coward · · Score: 5, Interesting

    Use Python!

    Seriously - we use it except in a few places where C/C++ is a better fit for interfacing with DirectX. The results? People are having real fun and getting a ton done. We couldn't be happier.

    1. Re:Want to make dev fun? by Anonymous Coward · · Score: 5, Interesting

      Except that this article is about people developing in Haskell - a language that's every bit as fun to use as Python (it even has optional syntactic whitespace), but compiles to native code (so it's faster) and infers types at compile-time (so it's robuster).

      Think Pugs is cool? Look at this. These guys have implemented a complete transactional file system - looks like a Unix FS, but provides snapshots, unlimited undo, true copy-on-write handling of links (including link cycles), and perfect concurrency without requiring any OS-level threading. In just 540 lines of Haskell.

      Give it a try. The learning curve's steep at first - it's got some concepts you simply won't have encountered anywhere else. But if you're smart enough to have dropped C++ in favour of Python, you're smart enough to handle Haskell.

    2. Re:Want to make dev fun? by Anonymous Coward · · Score: 0

      I would kill myself if I had to use Python. Any language where whitespace is syntactically important is suited best to the sort of people that think Java performs as well or better than C.

    3. Re:Want to make dev fun? by Anonymous Coward · · Score: 0

      I agree with your premise. Some people seem to have the attitude that what language you use doesn't matter, or (possibly worse) that the peak of language design is some steaming pile of dung like Java.

      However, I can't really endorse Python... Guido is so anti-functional programming, and Python seems like such a poorly designed language. (For instance: in Lisp, making the empty list the false value was viewed in retrospect as a mistake - falseness and the empty list are two different concepts, and they should be different values. But then, along comes Python, and it has the empty list, the empty dictionary, 0, 0.0, None, and false, all as false. Talk about not learning from history!) That said, I'm sure it's better than C++ or Java for most purposes.

    4. Re:Want to make dev fun? by D3m3rz3l · · Score: 1

      I've heard that Python is a lot of fun to code in. Is that really true? I mean Java and C# have similar features to Python right? In terms of high level libraries, code succinty, etc etc. I've been meaning to learn Python because I've heard so many good things about it. Do you have any specifics you'd like to share?

    5. Re:Want to make dev fun? by WillWare · · Score: 1
      I've been meaning to learn Python because I've heard so many good things about it.

      Go ahead, take the plunge. It will be one of the more rewarding half-hours of your computing career.

      --
      WWJD for a Klondike Bar?
    6. Re:Want to make dev fun? by eosp · · Score: 1

      Then you go ahead and use those same conventions. I don't see very many people writing their C code all on one line. I see the conventions that Python simply makes required. I don't see you complaining about using Make...

    7. Re:Want to make dev fun? by jonastullus · · Score: 2, Interesting

      i agree that python has a tendency (at least for me) to cause relaxation and make even otherwise boring tasks fun due to its extremely readable nature and good balance of write-once vs. read-often.

      and also, c++ is not such a hard competition when "having fun" is on your agenda. every single time that i sit down to program c++ i end up heavily frustrated at some point due to wrong "#include" order, some whacko unreadable compiler error or simply a hard to find segfault (most often due to forgotten pointer initialization, *will i ever learn*)...

      yet, python tends to have its own set of problems, mainly stemming from the fact that NO type checking is done at startup time and so you have to start your program again and again, everytime only finding/fixing one small typo! certainly most of this problem can be eliminated by good unit testing practices, but a little more help from the interpreter/compiler would still be nice at times.

      my current craze is for languages with type inference (standard ml, ocaml, haskell), which for me combine the cozy compiler assistance of typed languages with many/most of the liberties of dynamically types languages like ruby, python, perl, lisp, scheme...

      well, except for restrictive languages like c++ and java (i don't know cobol personally ;-), programming can be fun in any of the above languages (well, maybe not perl, but that's a question of personal taste).

    8. Re:Want to make dev fun? by An+Onerous+Coward · · Score: 1

      I'm a bit of a Python noob, but a few things have really impressed me. The syntax is about as clean and straightforward as things can get, and the "batteries included" philosophy means that you've got a lot of functionality at your fingertips. Regular expressions, XML parsers, etc. Very useful stuff.

      Also, the interpretedness is useful. In EMACS python mode, all I have to do to run the program is C-c C-c. Syntactic whitespace makes for cleaner code.

      There are pitfalls. No const's, weak typing, the ability to add functions and data to individual objects during execution... you can trip yourself up if you're too careless.

      Still, it's a worthwhile language to learn, and yes, it's the most fun I've ever had programming.

      --

      You want the truthiness? You can't handle the truthiness!

    9. Re:Want to make dev fun? by Eil · · Score: 4, Informative


      Mainly, Python is powerful but has a deliberately shallow learning-curve. The most often-cited reasons are the following Python mantras:

      - Everything is an object
      - Syntax is simple and predictable (but feels a little odd if you're coming from C, C++, Perl, Java, etc)
      - There's one obvious way to do it. (Contrast with Perl's, "There's more than one way to do it.")
      - Batteries included (comes with a large library of modules)

      Pretty sure there are more, but these are the biggies that I can recall. These are the same reasons that many quote for using Ruby as well, but I got around to trying it yet.

      I used to be a big fan of Tcl for it's insanely shallow learning curve. (Even more so than Python.) I wrote a usuable Tk (GUI) app within the first hour of even hearing about it. Too bad it didn't really catch on and mature as well as Python and Perl did over the same time-frame because it really is a nifty language.

    10. Re:Want to make dev fun? by belmolis · · Score: 1

      I agree about Tcl - it is really under-rated. I tried it a couple years ago because I wanted to try out Tk. There was a time when I thought that it wasn't well suited to larger-scale projects, but after a while I realized that that wasn't true. It's really a lot like Lisp, but with about the right amount of syntactic sugar.

    11. Re:Want to make dev fun? by macshit · · Score: 2, Insightful

      i agree that python has a tendency (at least for me) to cause relaxation and make even otherwise boring tasks fun due to its extremely readable nature and good balance of write-once vs. read-often.

      I think you underestimate the ability of people to write bad code -- I've seen a great deal of really crappy impossible-to-understand python code.

      I get the impression that many people think "hey it's an easy-going casual high-level language, I don't need to use any care whatsoever!"

      [This problem can be even worse with languages that have an "easy" reputation and are less naturally clean than python, e.g., perl, or (shudder!) tcl.]

      --
      We live, as we dream -- alone....
    12. Re:Want to make dev fun? by jonastullus · · Score: 4, Interesting
      ## I think you underestimate the ability of people to write bad code

      but i don't.

      good python code is extremely readable, and medium python code is a pleasure to WRITE, because many things just seem to solve themselves.

      BUT, writing big software or maintaining medium-to-crappy python code is far worse than many of the alternatives (except perl, of course)... this is exactly why i have become such a big fan of type inference, not to speak of garbage collection which i had my doubts about in the past, but fully embrace nowadays.

      python's shady object-orientation makes many things harder than they need be (compare ruby).
      • lacking private/public flags for methods
      • ugly "__something__" pseudo-access-control
      • implicit creation of attributes on write-access (*hello typos*)
      • not so beautiful handling of "method not implemented" functionality
      • incessant and visually displeasing explicit "self." everywhere
      • lacking abstract/virtual classes, interfaces
      • too frequent "necessity" of metaclass-hacks (although the possibility is very nice)
      • verbose attribute initialization in constructors
      • the evil "param = []" default value pitfall

      and other defects with python's object system have led me to believe that it is not an ideal language for big-scale OO development.

      yet, for rapid prototyping i know few languages that allow the programmer such unhindered experimentation and the *possibility* of resulting readable code. also for applications of a few thousand lines, written by a few people it can actually create a certain fun factor!
    13. Re:Want to make dev fun? by Pseudonym · · Score: 1

      One of the reasons why Pugs is written in Haskell is that, IM(biassed)O, it can be even more fun than Python. Certainly, the more fun features of Python were either directly borrowed from Haskell (e.g. list comprehensions) or from languages very like it (e.g. higher-order programming from Scheme).

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    14. Re:Want to make dev fun? by smittyoneeach · · Score: 1

      If Guido is "anti-functional programming", how do you explain decorators?
      I submit that the statement "Guido is pro-obvious" is probably not correct, but closer to the truth.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    15. Re:Want to make dev fun? by jma05 · · Score: 2, Informative

      All good. But don't get confused between static and strong typing. Python is dynamically and strongly typed, not weakly typed.

    16. Re:Want to make dev fun? by cloudmaster · · Score: 1

      What? You must not be a Python fanboy, or you'd realize that it's *impossible* to write bad Python - and that bad code is guaranteed with Perl. It's possible to write crappy code in any language, even one that forces you to indent (yay, forced indentation magically makes everyone a great programmer! Never mind those line continuation characters that are required as a result of having no end-of-line char, and ignore that the language isn't strictly typed, but you still can't always use numbers as strings or vice-versa). This may come as shocking to some, but it's possible to write *good* code in most any language, too - even perl!

    17. Re:Want to make dev fun? by drew · · Score: 1

      This is ridiculous. Any comments to the effect of "programming in language X is more fun" are going to be highly dependent on personal preference. While you may find C++ to be quite frustrating, I'm sure there are many people that agree with you. And I know for a fact that there are a lot of people out there who will tell you that Java is the greatest thing in the world (except for a nice MLT). Personally, I've never used C++ outside of college, and I avoid Java whenever possible, but I van tell you that the programming that I've enjoyed the most over the last three years has been in C. I personally love programming in C, and I find most higher level languages to be quite frustrating.

      Of course that's just me, and I'm probably a little strange when it comes to programming tastes, but I'm sure I'm not the only one.

      --
      If I don't put anything here, will anyone recognize me anymore?
    18. Re:Want to make dev fun? by Dom2 · · Score: 1
      yet, python tends to have its own set of problems, mainly stemming from the fact that NO type checking is done at startup time and so you have to start your program again and again, everytime only finding/fixing one small typo!

      As opposed to starting your compiler again and again, everytime only finding/fixing one small typo!

      -Dom

    19. Re:Want to make dev fun? by mikkom · · Score: 1
      Except that this article is about people developing in Haskell - a language that's every bit as fun to use as Python (it even has optional syntactic whitespace), but compiles to native code (so it's faster) and infers types at compile-time (so it's robuster).
      And if you really want speed and the functional properties of haskell, try Ocaml. It's hella lot faster, even faster than c++ and that's something!

      (Haskell has nicer syntax though)
    20. Re:Want to make dev fun? by Anonymous Coward · · Score: 0

      Guido really is against functional programming; he admits this himself. He considers adding map and filter and lambda to the language to have been a mistake (and of course lambda was screwy to begin with...)

    21. Re:Want to make dev fun? by mikkom · · Score: 1

      Hmm there seems to be a bug at slashdot code. The urls are wrong, I'm previewing them for a second time and they are still wrong even when they are correct in this box. I can't even copy and paste them as text because the buggy algorithm makes them incorrect links again.

      Go and compare for yourselves at The Computer Language Shootout Benchmarks
      http://shootout.alioth.debian.org/

    22. Re:Want to make dev fun? by Anonymous Coward · · Score: 0

      Please don't feed the trools. (Yes, "trools", as in "trolling fools".)

    23. Re:Want to make dev fun? by njyoder · · Score: 2, Insightful

      Sure, if you want an uglier, single paradigm language that's harder to maintain, it's great. But us non-zealots prefer to use languages that are easier to read and don't think that a single programming paradigm is the end-all and be-all.

      The "lines of code" argument is tired, old and bullshit, frankly. Anyone can write a minimal line version of practically anything, but that says nothing for maintainability, readinability or anything else. Someone's written a 3 line RSA utility in perl, but have you taken a look at it?

    24. Re:Want to make dev fun? by arjennienhuis · · Score: 1

      what is the 'the evil "param = []" default value pitfall'?

    25. Re:Want to make dev fun? by Fahrenheit+450 · · Score: 2, Interesting

      Sure, if you want an uglier, single paradigm language that's harder to maintain, it's great.

      Uglier is in the eye of the beholder. Hell all I hear about Python is how clear and clean it is, but every time I look at it I can't help but think how ugly it is, with all of it's __some_crap_or_another__ and whatnot. Sure, it's nicer than, say, C++, but that's a bit like saying someone is cuter than Karl Malden... Bottom line, saying something is uglier should mean little to anyone who isn't you -- we all like and dislike different things for different reasons.

      As for harder to maintain, I suppose you have some evidence to back up this assertion? If you do, I'd love to see it...

      The "lines of code" argument is tired, old and bullshit, frankly. Anyone can write a minimal line version of practically anything, but that says nothing for maintainability, readinability or anything else.

      I pretty much agree with you on the first point. I won't say it's BS, but I do believe that it's overhyped. The part you may or may not be missing is that it's not the ability to squeeze tokens out of an algorithm that's important. It's the ability to say a lot, and clearly, with just a few words that's important (a subtle but real distinction). This was touched on a bit by Simon Booth and Simon Jones in their paper Are Ours Really Smaller Than Theirs? It's the succinctness that they talk about that is important, as it should lead to fewer errors, and actually aid maintainability and readability as it allows a person to keep more of the program in their head. Of course I don't know if it actually does this -- I'd love to see some follow on research...

      Someone's written a 3 line RSA utility in perl, but have you taken a look

      Taken a look at it? Hell, I own the t-shirt!

      --
      -30-
    26. Re:Want to make dev fun? by gregorlowski · · Score: 1

      Not everything in python is an object. Some builtin types like int are not objects. In ruby everything is an object and you can inherit from builtin types and override methods in the base class.

    27. Re:Want to make dev fun? by gregorlowski · · Score: 1

      Python is indeed a fun language. Ruby and Perl, IMO, are also fun in their own ways (ruby because it's the highest-level everything-is-an-object, everything-is-extensible language commonly used and Perl because it's madness yet incredibly efficient and effective for all its madness).

      I don't know why some people are so down on Java though. I think Java is fun if you use open source implementations. For me, knowing that I'm using a community-made tool makes programming more fun. Writing Java to run on sun's jvm for some big company or writing in Windows.Forms C# for .NET to me seems like self-alienating corporate drudgery. However, I enjoy hacking with gcj/gij or writing java to run on ikvm or compiling to machine code w/gcj and playing with gtk# + mono to make little gnome apps.

      I think the environment surrounding the development process and the presence or absence of a community around it affect the "funness level" of the development process more than the tools you actually used. (But still I don't like coding in some languages -- namely php... yuck, what an ugly, dull, boring mess).

    28. Re:Want to make dev fun? by dup_account · · Score: 1

      I hate using make. Ant is so much easier to use.

      Oh yeh, don't feed the Pyton zealots either.

    29. Re:Want to make dev fun? by jonastullus · · Score: 2, Informative

      EXAMPLE:

      def test(arr = []):
          return arr

      t = test()
      t.extend(["hello", "world"])

      u = test()
      print u

      RESULT:

      $ ./test.py
      hello
      hello hello

      REASON:

      the default value expression is evaluated once, when the function
      object is created, and the resulting object is bound to the argument.

      FIX / WORKAROUND:

      if you want to create a new object on every call, you have to do
      that yourself:

      def __init__( self, myList=None):
          if myList is None:
              myList = [] # create a new list
          self.myList = myList

    30. Re:Want to make dev fun? by jonastullus · · Score: 2, Informative

      *darn*, i totally bogged up the result:

      RESULT:

      $ ./test.py
      > ["hello", "world"]

    31. Re:Want to make dev fun? by smittyoneeach · · Score: 1

      Yes, this is why python thugged generators and list comprehensions from Haskell.

      --
      Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    32. Re:Want to make dev fun? by waamaral · · Score: 1

      "But us non-zealots..."

      yeah, right

      --
      What, do I need a sig now?
    33. Re:Want to make dev fun? by njyoder · · Score: 1

      Actually, if you notice, that study specifically says their own methodology is flawed for comparing imperative and functional languages. They also say their sample is too small. They state the only objective method of comparison they have that makes sense is one comparing number of tokens, which really is only a slight improvement over 'number of lines.'

      Honestly, it's a waste of time to try to quantify something as complex as this. There are too many factors that you can't control for in a psychological study of this kind, even if you could get a massive sample size of many large, equivalent projects with programmers who are of equal skill (as measured through some not-yet-existing objective "skill metric"). It's simply not realistic. I wouldn't even bother with studies like that, they only serve to feed zealotry.

    34. Re:Want to make dev fun? by neves · · Score: 1

      Do this in a python shell to read the Zen of Python:

      Python 2.3.4 (#1, Feb 22 2005, 04:09:37)
      [GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import this
      The Zen of Python, by Tim Peters

      Beautiful is better than ugly.
      Explicit is better than implicit.
      Simple is better than complex.
      Complex is better than complicated.
      Flat is better than nested.
      Sparse is better than dense.
      Readability counts.
      Special cases aren't special enough to break the rules.
      Although practicality beats purity.
      Errors should never pass silently.
      Unless explicitly silenced.
      In the face of ambiguity, refuse the temptation to guess.
      There should be one-- and preferably only one --obvious way to do it.
      Although that way may not be obvious at first unless you're Dutch.
      Now is better than never.
      Although never is often better than *right* now.
      If the implementation is hard to explain, it's a bad idea.
      If the implementation is easy to explain, it may be a good idea.
      Namespaces are one honking great idea -- let's do more of those!

  4. Why shouldn't it be fun? by punkdigerati · · Score: 4, Insightful

    I'm sure many more people would have a cleaner house if cleaning their house was fun.

    1. Re:Why shouldn't it be fun? by Anonymous Coward · · Score: 0

      With drugs, anything is fun...

    2. Re:Why shouldn't it be fun? by dubl-u · · Score: 1

      I'm sure many more people would have a cleaner house if cleaning their house was fun.

      This works for me. We do an hour of cleaning together every Sunday while listening to Car Talk. Both of those make it fun in a way that doing solo chores wasn't, and our house is much cleaner.

    3. Re:Why shouldn't it be fun? by BasilBrush · · Score: 1

      That's why druggies houses are always so clean!

    4. Re:Why shouldn't it be fun? by jonadab · · Score: 2, Funny

      > I'm sure many more people would have a cleaner house if cleaning their house was fun.

      There actually are people who think cleaning stuff up is a real blast. Most of us are convinced they're certifiably loony, but they're so useful to have around that very seldom does anyone have one of them committed to a mental institution. The usual response is more like, "Hey, that's great, glad you're having such a good time. Maybe I'll buy you a new mop out of my next paycheck. No, don't thank me, I just love it when you have a good time, really."

      There are not very *many* of these people around, though. Perhaps one or two per thousand, not nearly enough to keep all the world's households clean. Which is probably for the best -- I think it would be kinda scary if there were too many of them.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    5. Re:Why shouldn't it be fun? by Frogbert · · Score: 1

      If pippi longstockings has taught me anything its that cleaning your house can be fun!

  5. This is the kind of collaboration I like by HvitRavn · · Score: 1

    I am very enthusiastic about this kind of collaboration, the wild "everything goes" approach is very appealing as it invites anyone to do anything since "breaking something doesn't matter because it can be fixed in a few keystrokes".

    However, my personal experience is that there will at some point arise conflicts, arguments and general disagreements, often leading to one or more developers to just pack up and leave. Or worse, fork!

    Anyone else had any experience with this very loose development collaboration model?

  6. while by akhomerun · · Score: 1

    while optimizing projects for maximum fun is great, it doesn't actually increase productivity unless the project itself is a productive project. i'd rather have a slow project than a fast one that's end result is useless.

    1. Re:while by autrijus · · Score: 4, Insightful
      Verily. However, I think a key parts of of the fun is a solid expectation of making a difference in the world, while the current result being immediately useful (for learning and/or production).

      A project generally regarded as pointless will likely have a difficult time finding contributors that sees this kind of fun in it.

  7. Haskell by fyndor · · Score: 1

    I've used Haskell before in a college class. Nothing too "fun" about it, though its recursiveness could be usefull in some applicaitons.

    1. Re:Haskell by Anonymous Coward · · Score: 0

      Spoken like a true closed-minded Java head.

      You are what is wrong with the software industry.

      I'm serious.

    2. Re:Haskell by fyndor · · Score: 1

      Not a "closed-minded Java head". I don't program in Java because it lacks a good IDE. I am looking for rapid developement. Don't get me wrong, Haskell has its place, but not in mainstream software. There is nothing fun, as far as I can tell, about programming in Haskell.

    3. Re:Haskell by dhasenan · · Score: 1

      Have you ever heard of Eclipse? Or do you still use cat for most of your programming needs?

    4. Re:Haskell by fyndor · · Score: 1

      I have checked out Eclipse. Its pretty cool, better than NetBeans, but still much harder to use to develop software than compared to Visual Studio or Borlands Builder (Delphi or C++).

    5. Re:Haskell by Anonymous Coward · · Score: 0



      (I tried to reply last night, but Slashdot was kind enough not to let me with the message "You have to wait longer between posts. Your last post was 25 minutes ago." or something along those lines. Gee, thanks, Slashdot.)

      Haskell IS fun. For people who actually like computer science, anyway. Unless you're familiar with a different lazy, statically typed, type inferred, pure functional language (as far as I know there aren't any others...), Haskell teaches you completely new ways to think about procedure. And this, for people who have a passion for computer science, is exciting.

      I see people's resumes online and they list the languages they know: "C, C++, Java." Three imperative, statically typed, curly brace syntax languages. Great. It's clear these people really like to learn new things and expand their minds. Something is very very broken with the software industry when this is such a fast-moving arena, but most programmers are still using coding technology from the 1970's. Yes, I know Java is new, but it brought nothing new to the table. In fact, it completely ignored almost every advance in programming language theory in the last 30 years. Java now has parametric polymorphism, but the question is, how astoundingly braindead did its creators have to be to design it without parametric polymorphism to begin with when ML had been around for years? C++ has parametric polymorphism, but the mechanism by which it works (including the source code of the function/type in question, and recompiling it for each new instantiation) is bizarre and retarded.

  8. Faster velocity? by Anonymous Coward · · Score: 2, Insightful

    Why "faster velocity of development"? Wouldn't "faster development" have worked?

    1. Re:Faster velocity? by hunterx11 · · Score: 4, Funny

      Perhaps they wish to specify a vector, lest they should develop backwards. Unfortunately, even for a play on words this is nonetheless a possibility.

      --
      English is easier said than done.
    2. Re:Faster velocity? by Anonymous Coward · · Score: 0

      A "faster velocity" is a positive acceleration, isnt it?

    3. Re:Faster velocity? by bgramkow · · Score: 1

      "Faster development" just points out that they're getting done quicker. "Faster velocity of development" paints a picture of a high paced development environment where you don't get bored because there are no slow or tedious jobs to be done. Sounds great, but how many of us believe that there will be no tedious jobs for the entire development project? (And that the project will be useful.)

      --
      ... IMHO, of course.
    4. Re:Faster velocity? by ScrewMaster · · Score: 1

      He's applying the second derivative, of course. The rate of change (velocity) of a rate of change (faster). It means that the pace of development is accelerating.

      --
      The higher the technology, the sharper that two-edged sword.
    5. Re:Faster velocity? by smackjer · · Score: 1

      Velocity is a term used in the Agile software development method.

      --

      This is my sig. There are many like it, but this one is mine.
  9. Avoid Recursion by Dante+Shamest · · Score: 5, Interesting
    1. Re:Avoid Recursion by robotoverflow · · Score: 1

      Thanks for the warning, i'll try to avoid clicking on that link (as it appears to point directly to the Wiki in question!)

      --
      % mkdir :
      % ls -dF :
      :/
    2. Re:Avoid Recursion by master_p · · Score: 1

      Too many things to avoid...it does say a lot about Haskell, doesn't it?

    3. Re:Avoid Recursion by WilliamSChips · · Score: 1

      Yeah, Perl only has one thing to avoid--the language itself ;)

      --
      Please, for the good of Humanity, vote Obama.
  10. As a former Perl user, I wonder... by Anonymous Coward · · Score: 0, Insightful

    why the Perl 6 term doesn't write a production-quality Perl 6 interpreter before they branch out into frivolous projects.

    Or maybe the whole Perl 6 project is a Manchurian Candidate to ensure that Python and Ruby finish draining the Perl community like starving vampires.

    At any rate, it's ironic that Perl, a language once known for appealing to hardcore pragmatists, is in its 6th iteration becoming an increasingly irrelevant theoretical playground.

  11. Motivation by nicobn · · Score: 0, Troll

    What motivates a programmer to spend time on open source projects ? Certainly the spirit.

  12. Sounds kinda like... by woah · · Score: 1

    Extreme Programming - OSS style.

  13. refactoring dirty prototypes by jonastullus · · Score: 2, Insightful

    Embrace anarchy

    It's important also to make committer sign-up fast and easy

    new committers could be invited en masse and sign up on their own

    committing quick and dirty protypes that can be refactored as they grow



    *AAAHHHH*
    and i thought (quick and dirty) prototypes were supposed to be immediately scrapped and their essence implemented in clean, revised code... *silly me*

    all in all an interesting read, commending "anarchy" and as-turbulent-as-possible commits over more stringent methodologies. i can imagine that PUGS is going along quite "smoothly" and am in awe how these two radically different communities (haskell and perl) managed to find each other ;-)

    but whether this community and flair can be reproduced simply by adhering to somewhat questionable guidelines is another question alltogether.

    1. Re:refactoring dirty prototypes by autrijus · · Score: 1

      Fully agreed, although note that rewriting everything excepts the tests is an usual form of "refactoring" in the Pugs project. :-)

    2. Re:refactoring dirty prototypes by jonastullus · · Score: 1

      ## rewriting everything excepts the tests is an usual form of "refactoring" in Pugs :-)

      probably not least due to the nice isolation/interchangability of functions in haskell... i haven't looked at the code yet, but heard that you were using monadic parser combinators, and if those things are good for one thing then it surely is extending, rewriting and "recombinating" sub-parsers *gg*

      on a sidenote, here's a funny thing i found in an otherwise quite convincing C# tutorial (http://www.softsteel.co.uk/tutorials/cSharp/lesso n22.html) concerning closures and the perplexity they create in able imperative programmers:


      Anonymous methods can also make use of the local variables and parameters in whose scope the anonymous method lies. This is a somewhat complicated, and we don't yet have a clear idea of when one should exploit it. So to illustrate it we'll borrow the example from the documentation.

    3. Re:refactoring dirty prototypes by homb · · Score: 1
      Anonymous methods can also make use of the local variables and parameters in whose scope the anonymous method lies. This is a somewhat complicated, and we don't yet have a clear idea of when one should exploit it. So to illustrate it we'll borrow the example from the documentation.


      That's funny. They should have read the standard Perl article on closures: http://www.perl.com/pub/a/2002/05/29/closure.html

      Here's a quote from it:

      Here's the canonical example of closures, that you'll find in practically every Perl book:

              sub make_counter {
                      my $start = shift;
                      return sub { $start++ }
              }

              my $from_ten = make_counter(10);
              my $from_three = make_counter(3);

              print $from_ten->(); # 10
              print $from_ten->(); # 11
              print $from_three->(); # 3
              print $from_ten->(); # 12
              print $from_three->(); # 4

      Related Reading
      Perl in a Nutshell, 2nd Edition

      Perl in a Nutshell, 2nd Edition
      By Stephen Spainhour, Ellen Siever, Nate Patwardhan

      We've created two "counter" subroutines, which have completely independent values.

    4. Re:refactoring dirty prototypes by Pseudonym · · Score: 2, Interesting
      [I] am in awe how these two radically different communities (haskell and perl) managed to find each other ;-)

      It's not such a shock, IMO. Ever since it's been a "real" language (about Perl 5 or so), Perl has always been inspired by Lisp-like languages with its support for programming with lists, map/filter-like programming, higher-order programming and so on. And Perl is still a prerequisite for building the most common Haskell compiler, GHC.

      Haskell and Perl represent flip-sides of the programming coin. I find it no surprise that they've found a home together.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  14. All we need now is ... by Douglas+Simmons · · Score: 4, Funny

    this to be implemented into apt-get so we the debian community are still superior to those pompous fun-compiling gentoo users.

  15. Mod story +5 Insightful by Spy+Hunter · · Score: 4, Interesting
    Most insightful article about software development I've ever read. Every open source project could learn a thing or two here, and closed-source commercial products could learn a bit too.

    IMHO this philosophy could go a *lot* farther too. We should be building these types of concepts into our software development tools (not just source control but IDEs and compilers and even languages). It should be as easy as possible for users to get the source, build it, modify it, and submit their changes. Ideally as easy as editing a Wiki. Though the inherent complexity of software means that Wiki simplicity will probably never be reached, we could certainly do a *lot* better than we do now.

    In an open source project the ease of the process of getting, compiling, modifying, and submitting changes to the source is directly related to the number of new contributors joining the project, which is directly related to the rate of improvement. Traditional software development tools have far too many pitfalls and require far too much know-how for casual users. The process of contributing to open-source projects could and should be a lot more automatic and foolproof, because attracting contributors is the single most important thing an open source project can do to improve itself.

    --
    main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    1. Re:Mod story +5 Insightful by daveb · · Score: 2, Insightful

      sounds like an interesting methodology - but what does FUN stand for? How does it compare with SCRUM and is it Agile?

      How can we teach this as a thriving Software Engineering methodology if it doesn't have a silly acronym

    2. Re:Mod story +5 Insightful by dubl-u · · Score: 1

      sounds like an interesting methodology - but what does FUN stand for? How does it compare with SCRUM and is it Agile?

      I know you were mainly kidding, but I think one of the secrets to the success of the assorted Agile methods is that everybody has more fun. If I were talking to a business exec, I'd cover it up by using a more suit-friendly term like "engaged", "motivated" or "morale-building", but from my perspective, fun is what it is.

    3. Re:Mod story +5 Insightful by bcrowell · · Score: 1
      I agree with a lot of what you're saying, but...

      It should be as easy as possible for users to get the source, build it, modify it, and submit their changes. Ideally as easy as editing a Wiki.
      If a Wikipedia article gets munged temporarily by someone who's stupid, uninformed, or malicious, it's no big deal, and it will probably get fixed soon. But when it's a piece of software, the consequences are potentially a lot more serious, and there's no guarantee that the damage will be detected or fixed any time soon.

      In an open source project the ease of the process of getting, compiling, modifying, and submitting changes to the source is directly related to the number of new contributors joining the project, which is directly related to the rate of improvement.
      Not really -- see The Mythical Man Month.

      The process of contributing to open-source projects could and should be a lot more automatic and foolproof, because attracting contributors is the single most important thing an open source project can do to improve itself.
      Most open-source projects have exactly one author. Most successful open-source projects also have exactly one author. Massive parallelization works best for something like Wikipedia that's both big and inherently parallelizable. Most software isn't like that.

      Keep in mind that the people involved in pugs are highly self-selected: they've been following the Perl 6 e-mail lists, and they know Haskell.

    4. Re:Mod story +5 Insightful by Captain+Tripps · · Score: 1
      Keep in mind that the people involved in pugs are highly self-selected: they've been following the Perl 6 e-mail lists, and they know Haskell.
      That's true of some contributors, but not all. Autrijus inspired many Perl hackers (camelfolk) to learn Haskell, and even got some in the Haskell community (lambdafolk) interested in Perl 6. But yeah, I think Pugs has been successful partly because there were so many people following along and wanting to join in on the Perl 6 implementation. Your average open source project doesn't have that.
    5. Re:Mod story +5 Insightful by Spy+Hunter · · Score: 4, Insightful
      If a Wikipedia article gets munged temporarily by someone who's stupid, uninformed, or malicious, it's no big deal, and it will probably get fixed soon. But when it's a piece of software, the consequences are potentially a lot more serious, and there's no guarantee that the damage will be detected or fixed any time soon.

      Why will the damage to wikipedia get fixed soon? Because anybody can fix it. Why will the damage to the software not be fixed soon? Because only a couple of people have the ability to fix it. The idea is to give far more people the ability to fix that problem (a number which is proportional to the number of people who are likely to cause the problem, so the problems shouldn't get out of hand).

      Why is the software problem more serious? Because softare is fragile. Is that inherent to software, or is it just the condition of the software development tools and processes we use today? I believe it is the latter. I believe software development tools and processes could be a lot more robust and forgiving of simple mistakes. And if projects started really opening up contributions, made it as easy as editing a Wiki, then they would be forced to become more robust. This is a good thing, not something to be avoided.

      I'm not sure the conclusions from The Mythical Man Month apply directly here. The main conclusion is that adding developers to a project makes it take longer. Open source software isn't on a strict schedule, and it doesn't have central management with clearly defined lists of requirements. New contributors aren't assigned to speed up existing work, they add their own features and improve the software in their own way.

      Most successful open-source projects also have exactly one author. Massive parallelization works best for something like Wikipedia that's both big and inherently parallelizable. Most software isn't like that.

      I'm thinking about the big projects here. KDE, GNOME, Mozilla, Debian, etc. But why is it that developing software isn't inherently parallelizable? To the extent that is actually true, once again I blame the tools. We need better software development tools to make software development more parallelizable. I don't think there's any inherent reason why "Joe's Yet Another MP3 Database" on SourceForge shouldn't be able to use this type of develoment methodology, given the right tools.

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    6. Re:Mod story +5 Insightful by bcrowell · · Score: 4, Insightful
      Why is the software problem more serious? Because softare is fragile.
      No, it's more serious because, e.g.:
      • People depend on software to get their work done.
      • Broken software can mess up your data.
      • Malicious software can do bad things, like give your credit card number to Russian gangsters.
      Vandalizing a Wikipedia article has none of these serious consequences.

      Why will the damage to wikipedia get fixed soon? Because anybody can fix it. Why will the damage to the software not be fixed soon? Because only a couple of people have the ability to fix it.
      If you take the total number of people in the world who are interested in and capable of doing OSS programming, and divide by the number of OSS projects, the result is a number close to 1. This is why most OSS projects have a single author. Imagining that "only a couple of people" have the privileges to fix a bug is actually optimistic -- the most likely case is that only one person is interested.

    7. Re:Mod story +5 Insightful by boneshintai · · Score: 1

      I don't think anyone's proposing that we distribute from the publicly-editable version, but for a project with sufficient momentum the community behind it may well be able to reach consensus on what snapshots to release for testing. Test snapshots may well have more stringent requirements (eg. all submissions must be vetted, all submissions must pass automated testing, etc) for submissions before being marked "stable" and released.

      The basic idea is surprisingly sound, I think, and is worth testing out on a large enough project that it could attract developers. It's certainly not appropriate for every project; the obvious case (small projects) simply won't attract developers and some larger projects have specific concerns that make public access problematic (imagine giving the world write access to, say, OpenSSH).

    8. Re:Mod story +5 Insightful by Spy+Hunter · · Score: 2, Interesting
      People depend on software to get their work done. Broken software can mess up your data. Malicious software can do bad things, like give your credit card number to Russian gangsters.

      People shouldn't depend on software under active development; only released software. Obviously before releasing a piece of software some quality assurance work will have to be done. This needs a different process than normal development work; it can be done on a branch of the code. This problem is largely solved by existing large OSS projects. By adding more contributors more errors will be introduced but more errors will be fixed, and overall more useful code will be produced.

      If you take the total number of people in the world who are interested in and capable of doing OSS programming, and divide by the number of OSS projects, the result is a number close to 1.

      And why is that? Because OSS programming is hard to do. It's very hard to jump in and immediately contribute to a project that you use. If we make it easier, more people will do it. You could have made a similar argument against Wikipedia before it started. Who wants to write an encyclopedia article? It turns out that everybody does, if it's easy enough. Making it easy is the key.

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    9. Re:Mod story +5 Insightful by l00k · · Score: 2, Interesting
      If you take the total number of people in the world who are interested in and capable of doing OSS programming, and divide by the number of OSS projects, the result is a number close to 1. This is why most OSS projects have a single author. Imagining that "only a couple of people" have the privileges to fix a bug is actually optimistic -- the most likely case is that only one person is interested.

      If you took the total number of people who contribute to the Wikipedia, and divide by the total number of Wikipedia articles, you get a result much less than 1--0.6. So, how does 0.6 of a person write an article? They don't. Groups of people work on articles not as individuals, but as a community. And when they have added their bit to that article, they move to another one.

    10. Re:Mod story +5 Insightful by cloudmaster · · Score: 1

      And why is that? Because OSS programming is hard to do. It's very hard to jump in and immediately contribute to a project that you use.

      Why do you say that? Have you ever been turned down from a project that you wanted to work on? I've found that, if I have useful code to contribute, any project I've approached has happily accepted my input. If you're getting rejected (general you - not just the poster), then there are just a few likely reasons. 1), you're not as good of a coder as you think, and your idea's just bad or badly implemented. 2), your suggesting doesn't fit the scope of the project, in which case making your own fork is a reasoanble idea (hopefully you have CVS read access so you can keep your fork up to date with the original - if you want that). 3), the project maintainers are assholes who are threatened by outside suggestions. In that case again you can probably just create a fork - if your idea's so friggin' great, people will probably use your fork.

      The barriers to contributing to OSS projects are not unrealistically high, IMHO. I don't see anything to be gained from making develiopment a disorganised mishmash of people whose only qualification is that they think they need to mess around with the official source instead of a local copy.

  16. Good points by Anonymous Coward · · Score: 2, Interesting
    Form the article:

    * Embrace anarchy. One of the key realizations of modern Internet projects (the oft-quoted Web 2.0) is that on the whole, your users can be trusted.
    * Avoid deadlocks. There should be nothing blocking a programmer from committing his code.
    * Cast committer rights far and wide. A central core committer group is necessarily slower than allowing every developer to commit as desired.

    This all boils down to one thing: Open the CVS access for everybody. And that is exactly what I have come to hate about the GNOME project: Development is essentially closed because every piece of code needs to be reviewed and there are not enough reviewers. I often wondered whether these guys really believe in Open Source. Is KDE development equally restrictive and boring?
  17. It's not frivolous by Anonymous Coward · · Score: 3, Insightful

    What a weird article description. Getting people to hack on frivolous projects generally isn't a problem. Getting them to hack on tough projects can be. Okay, maybe this is a test implementation in a funky language, but this isn't a frivolous project according to the Perl folks; Damian Conway described the work as "both amazing and amazingly useful: as a way of
    exploring the deeper design and implementation issues" here:
    http://www.nntp.perl.org/group/perl.perl6.language /19263

    Worst of all, the word frivolous distracts from the point of the article, which is all about techniques you can use to help making hacking on any project fun. It's not about only hacking on projects that are instrinsically fun, as 'frivolous toys' tend to be.

    1. Re:It's not frivolous by chromatic · · Score: 2, Informative

      I meant that Pugs started as a frivolous project in the same sense that the Linux kernel started as a frivolous project and as much as any learning experience refactorable into useful, non-frivolous code is frivolous.

      I'm not sure when Autrijus realized what he had, but I'm sure he didn't intend to write a full-fledged Perl 6 implementation with pluggable backends targeting Perl 5, Parrot, the JVM, and JavaScript, at least not at first.

  18. You obviously have never seen the boring....... by hummassa · · Score: 2, Insightful

    projects some of us have to work on. I *do* enjoy programming very much, but I also get stuck in boring stuff waay too often. And yes, I need to put food on the table for me, wife and 2 kids.

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  19. Cough by Puggs · · Score: 0, Redundant

    Ahem, I think they missed a letter out of my name...

    "specifically the Puggs project."

    Just had to clear that one up

  20. Let's run with this idea a little by wyoung76 · · Score: 3, Interesting
    If we use wikis as a front-end to the cvs, and by default mark all modules with a simple security level (no disk access, etc), and wrap each thing with unit tests for basic error capturing, and had incremental compilation, then we might have an easier and more collaborative way of coding.

    To further the idea a little more, the wiki also helps in documenting the structure of the project, and like other tools would be able to show any/all references to given code.

    Certainly, if you're a hardcore coder, you'll have a preference for direct access to the cvs. For more casual coders, or those who just want to wander around looking for interesting things to help on, the wiki frontend could help.

    That being said, I have no idea how well this idea could work, but for smaller prototyping projects it might just work.

    1. Re:Let's run with this idea a little by Otter · · Score: 1
      I'm not familiar with the "modern, decentralized version control" described here, so I'm probably simply missing something, but as a casual coder my concern would be this:

      Casual coder A has just made a few tweaks and committed them, breaking compilation. Intarweb idiot B came by a few minutes later and deliberately broke some other things. I, casual coder C, show up a few minutes after that with an idea I'd like to try out in the source code -- and it doesn't compile because the damage from A and B hasn't been rolled back yet.

      I get that the barrier to entry for contribution to a new product is a lot lower when you don't have to send a patch to a blessed contributor for him to submit (or not). But I wonder whether the frustration caused by random problems doesn't outweigh that gain. Maybe on a "toy Perl 6 interpreter in Haskell" the random idiot contingent is too small to worry about, but on, say, anything desktop-related....

    2. Re:Let's run with this idea a little by qbwiz · · Score: 2, Informative

      I think that that's where the unit tests come in. If something doesn't compile, or it doesn't pass the unit tests, then it cannot be checked in. There could also be known-good checkpoints, which enable users and possibly even developers to work on something that should work.

      --
      Ewige Blumenkraft.
    3. Re:Let's run with this idea a little by Ramses0 · · Score: 2, Interesting

      I did something similar to this at work... some greasemonkey scripts wired to a wiki as a backend datastore with some extra popup helper dialogs.

      You would then run it via Python's great runtime eval stuff.  Since I'm pretty tired, maybe some code would help demonstrate:

      def Import( wikiword ):
          print ">>> Importing: " + wikiword
          text = getTextFromWikiWord( wikiword )
          code = getCodeFromText( text )
          if len( code ) == 0:
              raise "No Code Found For: " + wikiword
          exec code in globals()
          return

      def getTextFromWikiWord():
          # you can do some sort of HTTP fetch or file.open here

      def getCodeFromText():
          # this basically grep's for [code]...[/code] blocks
          # and smushes them together

      def Execute( wikiword, **params ):
          print ">>> Executing: " + wikiword
          Import( wikiword )
          str = wikiword +"( **params )"
          eval( str )
          return

      if __name__ == '__main__':
          Execute( sys.argv[1] )

      ...the basic premise being that each function gets stuck onto it's own wiki page (def foo()...), wiki provides the equivalent of CVS, and with Python I basically wrote a new "import" function that imports code on the fly in about 20 lines of code.

      Before going farther with this, read up on Knuth's "Literate Programming" ideas.  Also, take off your "programmer's goggles" and  put on your "not an expert programmer's" goggles.  With a sufficient level of abstraction, and good whip-cracking on the architecture to keep most complicated stuff "out of sight", non-programmers can pretty effectively build software out of componentized pieces.  They can even build some component pieces themselves if they're motivated and can understand what's going on.  And once it's in a wiki hidden between [code] blocks, lean on the wiki to provide gooood documentation (think wikipedia, but with little blocks of code).

      --Robert

    4. Re:Let's run with this idea a little by Spy+Hunter · · Score: 1
      And once it's in a wiki hidden between [code] blocks, lean on the wiki to provide gooood documentation (think wikipedia, but with little blocks of code).

      I think documentation is one area where this approach could really shine without requiring major changes to existing tools. Large projects such as KDE could create wiki documentation sites tied to the code documentation in their CVS. Developers don't like writing documentation, and they're too close to their own code to know how to write good docs. Users are in the perfect position to know what users would like in documentation, but usually they are stuck with whatever the developers decided to write. A documentation wiki is the perfect solution to this age-old software problem.

      Your python wiki project sounds very interesting; what was it used for?

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    5. Re:Let's run with this idea a little by Matje · · Score: 1

      Does that mean the unit tests would be readonly for the general public? I'm assuming they should, since otherwise you'd just delete the unit tests if you wanted to check in some faulty code.

      But what if someone changes an interface and the unit tests need to be updated?

    6. Re:Let's run with this idea a little by Ramses0 · · Score: 1

      The goal was to record browser-interactions against a web-page with GreaseMonkey (as snippets of executable python), then "save" the actions to an internal wiki under a name chosen by the user.

        def UserDefinedFunctionNameForSearching():
          browser.useForm( "search" )
          browser.set( "q", "test something" )
          browser.submit()

      ...then let users string together these functions into executeable scripts via a simple wizard:

        Execute( "UserDefinedFunctionSearching" )
        Execute( "UserDefinedFunctionSelect", foo='123', bar='test' )
        Execute( "UserDefinedFunctionValidate" )

      If the functions had args 'def func( arg1="foo", arg2="bar" )' then  prompt for a value (providing defaults) whenever that action was added to the end-script via a wizard.

      Each function is then documented via wiki ("The FooSearch function is used when blah blah blah"), you get search, version control, etc for free (and users are mostly ok using wiki here anyway) and documentation and functionality is user-created in an environment that the users are mostly comfortable with anyway.

      So the use-model was:

        install greasemonkey / record plugin
        click record in firefox
        do actions in browser
        click save to "function-name / wiki-name"
        go to "wiki-wizard"
        generate script with prompts / popups
        click "execute" button
        profit!

      ...for a variety of reasons (mostly that GUI automation tools are expensive / difficult to integrate into other things) I didn't get too much farther with it, but it definitely worked as a proof of concept.  This gets back to another thought of mine... "Open Source" can only be successful if the "Source" part is at the right level of abstraction.

      Writing an open-source mail client in assembly isn't really open source (users can't really edit it).

      Writing an open-source mail client in c/c++ is better, but only for techy people (smart users can edit it).

      Writing an open-source mail client in python is the best, since ideally your users can jump down "just one level" and do some useful stuff with some simple python.

      Witness FireFox.  The C/C++ render-goodies aren't as "Open Source" as XPI / XUL / GreaseMonkey.  By making the barrier to entry lower and lower, you're opening the source to more and more people (at least at the simple level) which is a good thing.

      --Robert

  21. Just a spoonful of sugar... by gardyloo · · Score: 1

    ...makes the -- aw, fuckit.

  22. Undercover "fun" police by Anonymous Coward · · Score: 0

    I do unpleasant programming as a cover, while I and others like me hunt down people like you and beat the crap out of you. Keep your bliss to youself you hippy!

  23. work, not fun by Anonymous Coward · · Score: 0

    no one should be having fun at work. that's why it's called work. that's why we hire you to do it for us.

  24. Pugs 6.2.10 has just been released. :-) by autrijus · · Score: 4, Informative
    I am delighted to announce Pugs 6.2.10, released during a slashdotting on geoffb's "Optimizing for Fun" column:

    http://developers.slashdot.org/article.pl?sid=05/1 0/09/1831219

    The release tarball will be available from CPAN shortly:

    http://pugscode.org/dist/Perl6-Pugs-6.2.10.tar.gz
    SIZE = 2394516
    SHA1 = 3d8669fdccc3616c99cdde68659759b8b5782859

    With two months of development, this release features more tightly integrated JavaScript and Perl5 code generator backends, a library interface to the Pugs system via support for the Haskell Cabal frameworks, as well as many new tests.

    After the release, the push toward 6.28.0 will begin in earnest, with the newly specified container model and object model integrated back to the main runtime, fleshing out support for the remaining OO features.

    Again, thanks to all the lambdacamels for building this new ship with me. :)

    Enjoy!
    /Autrijus/

    Changes for 6.2.10 (r7520) - Oct 10, 2005

    Feature Changes

    Shared components

    • Support for the Haskell Cabal framework, exposing Pugs as a library to other Haskell users, paving the way for use in IDEs, as well as future Inline::Pugs and Inline::GHC modules
    • Adopted the code convention of expanding literal tab chars to spaces
    • JavaScript backend can be invoked with pugs -B JS
    • Perl 5 backend can be invoked with pugs -B Perl5
    • Pugs will now compile version ranges in use/require statements
    • Significant backend enhancements; see below
    • $?PUGS_BACKEND can be used to tell which runtime is in use
    • exec emulated partially on Win32

    JavaScript backend

    • Passes 91% of the main test suite including TODO failures
    • Integrated with MetaModel 1.0
    • Faster code generation, taking advantage of -CPerl5 output.
    • Switched to continuation passing style CPS to properly support return, ?CALLER_CONTINUATION, coroutines, and sleep
    • Improved support for binding and autodereferentiation
    • Initial support for multi subs
    • Initial support for symbolic dereferentiation
    • List construction no longer creates new containers
    • Miscellaneous performance improvements
    • Named-only arguments +$x and ++$x cant be passed positionally anymore
    • Parts of the Prelude can be written in Perl 5 now to improve performance
    • Perl 5-like regular expressions mostly working
    • Proper UTF-8 handling
    • Support for monkey-but $foo but {...}
    • Support for $CALLER:: and $OUTER::
    • Support for lazy {...} blocks for delayed evaluation
    • Support for temp and let declarations
    • Support for array and hash autovivification
    • Support for array and hash slices
    • Support for evaluating expressions in the PIL2JS shell :e <exp>
    • Support for junctions
    • Support for loading JSAN modules by using use jsan:Module.Name
    • Support for lvalue subroutines foo = ...
    • Support for slurpy hashes in subroutine signatures
    • Support for the Proxy class not yet user-visible
    • Support for the eqv operator
    • Using for with only one element to loop over works now
    • int works correctly on special values like Inf or NaN now
    • substr returns a r/w proxy: substr$str, $pos, $len = $replacement

    Perl 5 backend

    • Passes 33% of the main test suite including TODO failure
  25. totally off topic by jbaltz · · Score: 0, Offtopic

    My brother-in-law needs to tell O'Reilly to update his bio, since the birth of my nephew (his son) some few months ago...

    --
    I am the Lorvax, I speak for the machines.
  26. That's mistitled by Estanislao+Mart�nez · · Score: 3, Informative

    That shouldn't be called "Avoid Recusion," because you're not really avoiding recursion. What you're doing (as the wiki itself explains) is abstracting it into a higher-order function. Still a pretty damn important technique that one should master in functional languages--recognizing the "shape" of a loop (is it a map? a left or right fold? an unfold?), and implementing the looping logic as a higher-order function separately from its specific uses.

    1. Re:That's mistitled by Fahrenheit+450 · · Score: 1

      Still a pretty damn important technique that one should master in functional languages--recognizing the "shape" of a loop (is it a map? a left or right fold? an unfold?), and implementing the looping logic as a higher-order function separately from its specific uses.

      Learn the squiggol, it shall set you free (or rub your eyes and curse the development of category theory...)

      --
      -30-
    2. Re:That's mistitled by Estanislao+Mart�nez · · Score: 1

      Yeah, I was reading that a couple weeks ago.  Lesson I got out of it (might be wrong, but if it is, it's wrong in a good way): all linear recursion, deep down, boils down to "copying" some recursive "data structure"; scare quotes because you get to pick your own "fake" constructors, destructors and type predicates.  Thus, linear recursion boils down to "copying" a "list," and iteration (i.e. tail recusion) boils down to "reversing" a "list."

      Some Scheme-ish code might make this clearer.  Here's the list copy function in Scheme:

      (define (list-copy list)
        (if (null? list)
            '()
            (cons (car list)
                  (list-copy (cdr list)))))

      Pretty straightforward.  The null? predicate tests whether its argument is an empty list; car and cdr return the first element of the list and the rest of the list, respectively; cons takes an element and a list, and gives you a new list with that element in front of the old list.

      Now take that function, and change it so that instead of using the "real" null?, cons, empty list, car and cdr, we use "fake" ones, that we just pass in as arguments:

      (define (fake-list-copy fake-cons fake-empty-list
                              fake-null? fake-car fake-cdr
                              fake-list)
        (if (fake-null? fake-list)
            fake-empty-list
            (fake-cons (fake-car fake-list)
                       (fake-list-copy (fake-cdr fake-list)))))

      Now you can write *any* linear recursive function as an application of fake-list-copy.  For example, computing the factorial of n.  Suppose you had a singly linked list that started with n, and had each subsequent element one less than the previous one, down to 1; for example, for the factorial of 5, that you had the list (5 4 3 2 1).  Now, if you use the real null?, car and cdr, but use multiplication and 1 as your fake-cons and fake-empty-list, then (fake-list-copy * 1 null? car cdr '(5 4 3 2 1)) gets you the factorial of 5.

      Of course, building those lists is inefficient.  But we don't have to build them.  We can represent each list as a number:

      5 => (5 4 3 2 1)
      4 => (4 3 2 1)
      ...
      1 => (1)
      0 => ()  ; the empty list

      With that representation, we can choose appropriate functions to use as fake-null?, fake-car and fake-cdr.  We use zero? as fake-null?, identity as fake-car (identity just returns its argument without altering it), and decrement as fake-cdr.  Thus, the following will compute factorial recursively:

          (define (zero? x) (= 0 x))
          (define (identity x) x)
          (define (-- x) (- x 1))
          (define (factorial n) (fake-list-copy * 1 zero? identity -- n))

      Of course, doing this recursively takes up stack space.  But you can do it without stack space by basing the whole thing on abstracting the definition of a function to reverse lists, instead of one for copying them.  That's left as an exercise for the reader...

      And of course, after we master all that, just to sound smart, we will thereafter call the fake-list-copy function a "list hylomorphism"...

    3. Re:That's mistitled by Fahrenheit+450 · · Score: 1

      Yeah, I was reading that a couple weeks ago. Lesson I got out of it (might be wrong, but if it is, it's wrong in a good way): all linear recursion, deep down, boils down to "copying" some recursive "data structure"; scare quotes because you get to pick your own "fake" constructors, destructors and type predicates. Thus, linear recursion boils down to "copying" a "list," and iteration (i.e. tail recusion) boils down to "reversing" a "list."

      Well, there's a bit more to it than that. I suppose that might be the message of the first five pages which describe the different morphisms available for lists (and for another view of what you're describing, I recommend Mitch Wand's Continuation-Based Program Transformation Strategies), but the real meat of the paper is the laws that they derive regarding those morphisms that work for any algebraic data type (I still need to read Bananas In Space, which I believe extends their work to exponential data types). It's one of those papers that's both really interesting and really uninteresting at the same time.

      --
      -30-
    4. Re:That's mistitled by Anonymous Coward · · Score: 0
      Please don't make your entire post using a fixed-width font (the "code" selection in the drop-down list on the posting page). Instead, use "Plain Old Text", and surround the code portions with the tag. For example, from your post:
      Some Scheme-ish code might make this clearer. Here's the list copy function in Scheme:
      (define (list-copy list)
        (if (null? list)
            '()
            (cons (car list)
                  (list-copy (cdr list)))))
      Pretty straightforward.
      Notice how that is much more readable than it was in your post.
  27. KDE is wunderbar by Anonymous Coward · · Score: 0

    nicht GNOME - stupidprogrammerfunken

  28. Autrijus for President by Anonymous Coward · · Score: 0

    Thanks Autrijus for leading by example and making the Perl6 process thoroughly enjoyable. These qualities have never existed in the Perl6 or Parrot projects prior to your arrival. The experience and enthusiasm you have is a very welcome change.

  29. It would be not as bad for me... by hackwrench · · Score: 1

    if it wasn't for my Mom's attitude towards us doing it.

    If you take the attitude that it's okay to stop without holding everything to a nebulous standard of clean, it becomes easier.

  30. Re:Optimus Prime by Reverend528 · · Score: 1

    The article was about optimizing development, not optimizing code.

  31. Having fun optimizing development? by Anonymous Coward · · Score: 0

    Anybody else read the headline and assumed the article was about someone having fun doing development optimization? No? Just me, then? OK, never mind...

  32. This makes sense by doc+modulo · · Score: 3, Interesting

    Because there are 2 kinds of fun/joy systems in the brain.

    The kind triggered by dopamine, the short high that doesn't last, the Mtv, nicotine, "I want to buy this" kind of fun.

    And the relaxed kind of contented joy that works with the serotonin system in the brain. Which does last and is an indicator of good relationships with friends, experiencing nature and knowing that "all is right in my domain, I'm ok for exploration into new things" kind of fun.

    That last kind of joy is an indicator of efficiency and "everything is as it should be" and if you feel that while coding, you must be on the right track.

    --
    - -- Truth addict for life.
  33. Tcl development by DavidNWelton · · Score: 1

    Tcl (and Tk) is still hanging in there, chugging along. Some recent developments:

    Tile: modern look and feel + themes for Tk: http://tktable.sourceforge.net/tile/

    An object system for the core: http://www.tcl.tk/cgi-bin/tct/tip/257.html

    I think the other big thing that's still missing is to make the standard distribution 'batteries included' - we'll see if we can make that happen soon.

    I love the language, in any case, it's super easy to get people started with, and if you look under the hood, it's coded very well, and has an *extensive* C API. That was what really sold me on the language - the ability to really integrate it well and easily with C code. Python's C API is good too, but I thik Tcl's is still broader.

  34. 'even'? by jhdevos · · Score: 1
    The phrase 'even when implementing a frivolous project (a toy Perl 6 interpreter) in an uncommon language (Haskell).' shows some very big misunderstandings about this project, and software-development and developers in general.

    Calling Pugs 'frivolous' and a 'toy' project is like calling linux frivolous, and a toy OS. The fact that Pugs seems to be fun to write, and seemed like something that they writers would like building, has little to do with it being usefull, but does illustrate one of the reasons that a lot of free software is good -- it was fun to write.

    Using Haskell is also something that only improves the fun, instead of what the 'even when' implies. Partly, perhaps, because it is a bit uncommon -- because it is fun to learn something new -- but mostly simply because it's Haskell. I did some numerical maths-practical assignments in Haskell, while others used C or Pascal (the choice of language was free). My programs where invariably about 10 to 25% of the length of most others, while being a lot more readable and easier to write. Haskell is actually a lot of fun to use.

    Jan

    1. Re:'even'? by chromatic · · Score: 1

      I meant that Pugs was a frivolous project when it started and when Autrijus decided to experiment with his development process, not that it's a toy now. I don't believe it's a toy; I have a fair bit of Perl 5, Perl 6, and Haskell code in Pugs.

  35. -1 Annoying by BKX · · Score: 0, Offtopic

    Dude, learn to use enter. Make some paragraphs. Maybe add in some structure. Is that the entire article? WTF? Why did you waste our time with that post? Why did I waste my time writing this? Anyway, if you mod the parent down, my post won't be read, so don't bother modding me. I like my karma. And marijuana. And alcohol. Obviously. Heh heh.

  36. Optimise This! by ysegalov · · Score: 0

    Windows XP for example. Both fun and useful. What did you say? No source code? Come on , not a problem for a real programmer.

  37. Language for Casual Incremental Development by Philip+Dorrell · · Score: 1

    In my blog entry Disorganized Incremental Software Development, I describe an idea for a programming language where all implementations and specifications are named using cryptographic hash codes of their contents. This avoids all name collisions, and means that you can let anyone be a "committer", and indeed dispense with version control altogether (except for comments, which still have to be written by someone who knows what they are writing).

    --
    Music: a super-stimulus for the perception of musicality. Musicality: a perceived aspect of speech.
  38. It boils down to lifecycles.. by ACORN_USER · · Score: 1
    Like the human life cycle, you've got to take dump now and then. The same goes for software, in and out of the workplace, where in addition to writing exciting applications, there is often a lot of boring-to-death-work, unless you're especially lucky.

    What I've found though, is that if you go into the work place with some 'higher-order order' in mind, and try to unify everything you do into one clean infrastructure, the fun does linger. You should have a greater vision to which all other projects must conform. Yes, you do still have to write boring bits of code but there is a nicer feeling all around, together with a drop of professional pride on every line written. This over-all vision has taken many guises - clean code trees, re-use, falling into a meaningful code hierarchy, writing code which is more service driven. As you advance, your higher level vision also grows. With it, you'll find greater professional pride, better code, more arguments with management and a bigger head. Primitive and closed minded environments can be a hinderance, but you have to persist. I do agree though - if you can keep the 'fun' alive, it does result in better code. What we shouldn't forget is that it's not 'all fun, all of the time.'

  39. Vice Versa? by Maljin+Jolt · · Score: 4, Insightful

    While writing perl in haskell *is* fun, writing haskell in perl would be a horrific nightmare torture. Perhaps all code language disputations/wars should be solved by duel of this kind.

    --
    There you are, staring at me again.
    1. Re:Vice Versa? by Surt · · Score: 1

      One man's nightmare torture is another man's fun weekend challenge, and vice versa.

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    2. Re:Vice Versa? by Anonymous Coward · · Score: 0

      The problem with solving language wars that way is that the Lisp guys would probably win them all. :)

    3. Re:Vice Versa? by CyricZ · · Score: 1

      Yeah, but that's just because the Lisp Gods have massive cocks. I mean, when you look at RMS, can you not imagine him with a solid 14" boner? Even his softy is probably far more massive than my largest erection.

      Frankly, I think your choice of programming language indicates your penis size (if you're a man, or a tranny). Men with the largest cocks use Lisp, while those with slightly smaller cocks resort to Scheme. Men with very deformed, bent and twisty cocks tend to use Perl or assembly as their languages of choice. Men with multiple cocks use Smalltalk, while men with small, perky cocks use Python. C seems to be used by men with average cock length, considering its widespread use. And men who like to hang heavy weights off of their knob use a language like Java.

      --
      Cyric Zndovzny at your service.
  40. Jesus Christ by Anonymous Coward · · Score: 0

    1. Use the "Plain Old Text" setting.
    2. Preview your post.

    This stuff should be second-nature to anyone with a UID of less than 300000 or so. Shame on you!

  41. Re:Optimus Prime by Ranger · · Score: 0, Troll

    The article was about optimizing development, not optimizing code.

    You've obviously mistaken me for someone who actually read the article. Anyway, I don't see any difference between the two.

    --
    "You'll get nothing, and you'll like it!"
  42. I am far more puzzled ... by hummassa · · Score: 1

    on why chromatic considers a perl6 interpreter "a frivolous project".

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
    1. Re:I am far more puzzled ... by Anonymous Coward · · Score: 0

      It's a toy Perl 6 interpreter implemented in Haskell. I'm sure that the entire developer community is going to pay close attention to it, for its success is critical.

  43. define:frivolous by hummassa · · Score: 1

    Definitions of frivolous on the Web:
    * not serious in content or attitude or behavior; "a frivolous novel"; "a frivolous remark"; "a frivolous young woman"
    wordnet.princeton.edu/perl/webwn
    Related phrases: list of frivolous parties frivolous complaint frivolous lawsuits frivolous lawsuit frivolous suit

    That's the question: I even resent calling pugs "a toy Perl6 interpreter". I think it's a serious project, optimized for the fun of its committers. And watchers, like me. But it works a lot and it's teaching me a lot of stuff I didn't know. Being fun is not the opposite of being serious, that is to say, being fun is not the same of being frivolous.

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  44. Re:Optimus Prime by Ranger · · Score: 1

    Cool. My original post gets modded off-topic and my reply to a reply gets modded troll. Woohoo!

    --
    "You'll get nothing, and you'll like it!"