[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ProgSoc] Programming! Code!



Nathan de Vries wrote:
On 16/10/2006, at 3:26 PM, Myles Byrne wrote:
Ok, lets end this. My style of programming: "Always make as short and aesthetically pleasing as possible unless it absolutely needs to be fast". Yours/Raz's style: "Be as clear as possible about what you are doing, even if it involves extra statements and hints for the compiler"

Both styles are valid.

As Wil Shipley recently said, "if you spread rotten shit on a hot dog, it doesn't taste as good." No one denies that both styles are valid. That's just obvious.


Back on track, I tend to agree with both Raz and John. Your style is suited to a lone-wolf programmer such as yourself, who interacts very little with other developers. Not only that, but it's also suited to small projects given that as a project gets larger you're forced to have more people working on it, and everything swings back around to the first point. You'll also find it difficult to switch between projects of which you're not the lead / controlling developer, because you'll have so many languages to deal with (even when you're only using Ruby).

I think you've been given an inch and taken a mile. Ruby is great for creating DSL's, but you're going too far.

With what? When I did I suggest you write the DSL in something other than Ruby. I said you write the DSL, in a DSL for DSLs, I never said the turtle wasn't ruby.


A DSL can be created without screwing with the standard syntax of the language. Doing so makes it less useful, in my eyes.

Capistrano is great:

    task :push_latest do
        transaction do
            update_code
            symlink
        end
    end

A great DSL (john would call it a configuration file, he's half right). Strange though, it's a large project, written almost entirely by a lone wolf[1], but many people understand how it works, including yourself. How odd.


As is ActiveRecord:

    class ProgsocSociety < ActiveRecord::Base
        has_many :zealots
    end

There's a reason why both have been successful. Rubyist or not, people understand what's happening and it reads like a book.

This example requires extensive domain knowledge about databases and ORM. The reason AR has been successful is that once you get your head around that specific pattern, this specific ruby library provides a killer implementation of it.


Anyway, that's my two cents. Feel free to disagree (I know you will :) )

I hope I've managed to disagree with you agreeing with me ;) Although from your examples it doesn't actually look like you were agreeing with John and Raz. I'm confused.


-- Myles

[1] http://dev.rubyonrails.org/log/tools/capistrano (nearly all commits by Jamis)

-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@xxxxxxxxxxxxxxxxxxx
If you are having trouble, ask owner-progsoc@xxxxxxxxxxxxxxxxxx for help.