Optimizing Development For Fun 144
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."
This is all well and good... (Score:4, Insightful)
Re:This is all well and good... (Score:2)
Re:This is all well and good... (Score:1, Funny)
Everything isn't about you.
You obviously have never seen the boring....... (Score:3, Insightful)
Re:This is all well and good... (Score:5, Insightful)
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.
Re:This is all well and good... (Score:2, Insightful)
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 r
Re:This is all well and good... (Score:1)
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/ [zod2008.com]
It boils down to lifecycles.. (Score:1)
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 co
I am far more puzzled ... (Score:2)
define:frivolous (Score:2)
* not serious in content or attitude or behavior; "a frivolous novel"; "a frivolous remark"; "a frivolous young woman"
wordnet.princeton.edu/perl/webwn [princeton.edu]
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 teachin
Want to make dev fun? (Score:5, Interesting)
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.
Re:Want to make dev fun? (Score:5, Interesting)
Think Pugs is cool? Look at this [okmij.org]. 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.
Re:Want to make dev fun? (Score:2)
And if you really want speed and the functional properties of haskell, try Ocaml. It's hella lot faster [debian.org], even faster than c++ [debian.org] and that's something!
(Haskell has nicer syntax though)
Re:Want to make dev fun? (Score:2)
Go and compare for yourselves at The Computer Language Shootout Benchmarks
http://shootout.alioth.debian.org/ [debian.org]
Re:Want to make dev fun? (Score:2, Insightful)
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
Re:Want to make dev fun? (Score:3, Interesting)
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 a
Re:Want to make dev fun? (Score:1)
Re:Want to make dev fun? (Score:2)
Go ahead, take the plunge. It will be one of the more rewarding half-hours of your computing career.
Re:Want to make dev fun? (Score:2)
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 abili
Re:Want to make dev fun? (Score:2, Informative)
Re:Want to make dev fun? (Score:5, 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.
Re:Want to make dev fun? (Score:2)
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.
Tcl development (Score:2)
Tile: modern look and feel + themes for Tk: http://tktable.sourceforge.net/tile/ [sourceforge.net]
An object system for the core: http://www.tcl.tk/cgi-bin/tct/tip/257.html [www.tcl.tk]
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
Re:Want to make dev fun? (Score:2)
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 b
Re:Want to make dev fun? (Score:3, Interesting)
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 in
Re:Want to make dev fun? (Score:3, Insightful)
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
Re:Want to make dev fun? (Score:5, Interesting)
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).
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!
Re:Want to make dev fun? (Score:1)
Re:Want to make dev fun? (Score:3, Informative)
def test(arr = []):
return arr
t = test()
t.extend(["hello", "world"])
u = test()
print u
RESULT:
$
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
Re:Want to make dev fun? (Score:3, Informative)
RESULT:
$
> ["hello", "world"]
Re:Want to make dev fun? (Score:2)
Re:Want to make dev fun? (Score:2)
Re:Want to make dev fun? (Score:2)
As opposed to starting your compiler again and again, everytime only finding/fixing one small typo!
-Dom
Re:Want to make dev fun? (Score:2)
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).
Re:Want to make dev fun? (Score:1)
Re:Want to make dev fun? (Score:2)
Oh yeh, don't feed the Pyton zealots either.
Re:Want to make dev fun? (Score:2)
I submit that the statement "Guido is pro-obvious" is probably not correct, but closer to the truth.
Re:Want to make dev fun? (Score:2)
Why shouldn't it be fun? (Score:4, Insightful)
Re:Why shouldn't it be fun? (Score:1)
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.
Just a spoonful of sugar... (Score:2)
Re:Why shouldn't it be fun? (Score:2, Funny)
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 would be not as bad for me... (Score:1)
If you take the attitude that it's okay to stop without holding everything to a nebulous standard of clean, it becomes easier.
Re:Why shouldn't it be fun? (Score:2)
Re:Why shouldn't it be fun? (Score:2)
This is the kind of collaboration I like (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 collaborat
while (Score:1)
Re:while (Score:5, Insightful)
A project generally regarded as pointless will likely have a difficult time finding contributors that sees this kind of fun in it.
Haskell (Score:1)
Avoid Recursion (Score:5, Interesting)
Re:Avoid Recursion (Score:1)
That's mistitled (Score:3, Informative)
Re:That's mistitled (Score:2)
Learn the squiggol [psu.edu], it shall set you free (or rub your eyes and curse the development of category theory...)
Re:That's mistitled (Score:1)
Some Scheme-ish code might make this clearer. Here'
Re:That's mistitled (Score:2)
Well, there's a bit more to it than that. I suppose that might be th
Re:Avoid Recursion (Score:2)
Re:Haskell (Score:1)
Re:Haskell (Score:2)
Faster velocity? (Score:2, Insightful)
Re:Faster velocity? (Score:5, Funny)
Re:Faster velocity? (Score:1)
Re:Faster velocity? (Score:2)
Re:Faster velocity? (Score:2)
Sounds kinda like... (Score:1)
refactoring dirty prototypes (Score:3, 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.
Re:refactoring dirty prototypes (Score:2)
Re:refactoring dirty prototypes (Score:2)
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/tutorial [softsteel.co.uk]
Re:refactoring dirty prototypes (Score:2)
That's funny. They should have read the standard Perl article on closures: http://www.perl.com/pub/a/2002/05/29/closure.html [perl.com]
Here's a quote from it:
Re:refactoring dirty prototypes (Score:3, Interesting)
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
All we need now is ... (Score:5, Funny)
Mod story +5 Insightful (Score:5, Interesting)
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.
Re:Mod story +5 Insightful (Score:2, Insightful)
How can we teach this as a thriving Software Engineering methodology if it doesn't have a silly acronym
Re:Mod story +5 Insightful (Score:1)
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.
Let's run with this idea a little (Score:3, Interesting)
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
Re:Let's run with this idea a little (Score:2)
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 b
Re:Let's run with this idea a little (Score:3, Informative)
Re:Let's run with this idea a little (Score:1)
But what if someone changes an interface and the unit tests need to be updated?
Re:Let's run with this idea a little (Score:3, Interesting)
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:
Re:Let's run with this idea a little (Score:2)
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. Use
Re:Let's run with this idea a little (Score:2)
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" )
Re:Mod story +5 Insightful (Score:2)
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 s
Re:Mod story +5 Insightful (Score:1)
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
Re:Mod story +5 Insightful (Score:5, Insightful)
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.
Re:Mod story +5 Insightful (Score:5, Insightful)
No, it's more serious because, e.g.:
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.
Re:Mod story +5 Insightful (Score:2)
The basic idea is surprisingly sound, I think, and is worth testing out on a
Re:Mod story +5 Insightful (Score:3, Interesting)
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 exist
Re:Mod story +5 Insightful (Score:2)
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 id
Re:Mod story +5 Insightful (Score:2, Interesting)
If you took the total number of people who contribute to the Wikipedia, and divide by the total number of Wiki
Language for Casual Incremental Development (Score:1)
Good points (Score:2, Interesting)
This all boils down to one thing: Open the CVS access for everybody. And that is exactly what I have come to hate a
It's not frivolous (Score:3, Insightful)
exploring the deeper design and implementation issues" here:
http://www.nntp.perl.org/group/perl.perl6.languag
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.
Re:It's not frivolous (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.
Pugs 6.2.10 has just been released. :-) (Score:5, Informative)
The release tarball will be available from CPAN shortly:
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
JavaScript backend
Perl 5 backend
This makes sense (Score:4, Interesting)
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.
'even'? (Score:1)
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 th
Vice Versa? (Score:5, Insightful)
Re:Vice Versa? (Score:2)
Re:Vice Versa? (Score:2)
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 o
Re:Optimus Prime (Score:2)
Re:Optimus Prime (Score:2)