Forum: Ruby The "Ruby Best Practices" Collaborative Blog

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-04-14 15:16
(Received via mailing list)
Hi folks,

This is a one-time announcement about yet another blog project of
mine...

== What ==

A couple weeks ago I put out a call for volunteers to run a
collaborative blog with me focused on best practices in Ruby.   It is
now live at:

http://blog.rubybestpractices.com/

== Who ==

For starters, I went with an 8 person core group, which aside from
myself includes:

James Britt, Kirk Haines, Robert Klemme, Jeremy McAnally, Sean
O’Halpin, Magnus Holm and Lakshan Perera

== Why ==

You can read more about the details of the blog and each of these folks
at:

http://blog.rubybestpractices.com/about/

But the general idea is that we want to provide great content that
helps folks get better at Ruby while still keeping the focus on real
world problems.   We also want to have a lot of fun, too!

Please enjoy the new blog, and get involved in the conversations that
crop up as we continue to write new content.  We will also begin
accepting articles from casual contributors, so keep an eye out for an
announcement about how that will work.

-greg
146e52d49d361f85c0945487452fc6a0?d=identicon&s=25 Ben Lovell (benl)
on 2009-04-14 16:45
(Received via mailing list)
On Tue, Apr 14, 2009 at 2:14 PM, Gregory Brown
<gregory.t.brown@gmail.com>wrote:

> http://blog.rubybestpractices.com/
>
>
>

Awesome... subscribed.

Ben
4299e35bacef054df40583da2d51edea?d=identicon&s=25 James Gray (bbazzarrakk)
on 2009-04-14 18:25
(Received via mailing list)
On Apr 14, 2009, at 8:14 AM, Gregory Brown wrote:

> A couple weeks ago I put out a call for volunteers to run a
> collaborative blog with me focused on best practices in Ruby.   It is
> now live at:
>
> http://blog.rubybestpractices.com/

This is already shaping up to be a must-read, with only two real
content posts so far.  I really hope the trend continues.

My only complaint is the lack of a <title> tag on the home page.  I
had to make up a title when I bookmarked it.

James Edward Gray II
Ae16cb4f6d78e485b04ce1e821592ae5?d=identicon&s=25 Martin DeMello (Guest)
on 2009-04-14 18:49
(Received via mailing list)
On Tue, Apr 14, 2009 at 6:44 PM, Gregory Brown
<gregory.t.brown@gmail.com> wrote:
> http://blog.rubybestpractices.com/
Looks excellent!

martin
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-04-14 19:28
(Received via mailing list)
On Tue, Apr 14, 2009 at 12:24 PM, James Gray <james@grayproductions.net>
wrote:

> My only complaint is the lack of a <title> tag on the home page.  I had to
> make up a title when I bookmarked it.

This should be fixed now, thanks.

-greg
A0c079a7c3c9b2cf0bffebd84dc578b0?d=identicon&s=25 Chuck Remes (cremes)
on 2009-04-14 19:44
(Received via mailing list)
On Apr 14, 2009, at 12:26 PM, Gregory Brown wrote:

> On Tue, Apr 14, 2009 at 12:24 PM, James Gray <james@grayproductions.net
> > wrote:
>
>> My only complaint is the lack of a <title> tag on the home page.  I
>> had to
>> make up a title when I bookmarked it.
>
> This should be fixed now, thanks.

For those of us who read via RSS, it would be great if you either
published the entire article to the news stream OR put a "more..."
link into the summary so it is obvious there is more text.

cr
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-04-14 19:54
(Received via mailing list)
On Tue, Apr 14, 2009 at 1:44 PM, Chuck Remes <cremes.devlist@mac.com>
wrote:

> For those of us who read via RSS, it would be great if you either published
> the entire article to the news stream OR put a "more..." link into the
> summary so it is obvious there is more text.

Well, the summaries are completely independent from the text, so it
should be pretty obvious over time.  I thought about full text
streams, but I don't trust the content to display properly that way.

-greg
146e52d49d361f85c0945487452fc6a0?d=identicon&s=25 Ben Lovell (benl)
on 2009-04-14 20:08
(Received via mailing list)
On Tue, Apr 14, 2009 at 6:53 PM, Gregory Brown
<gregory.t.brown@gmail.com>wrote:

> streams, but I don't trust the content to display properly that way.
>

There are literally *stacks* of other technical blogs that display their
contents correctly via feeds. What problem do you foresee?

I would prefer to read the full text via RSS if possible.

Great work otherwise!
8dffcb61d8eb0dde131e329f62186c7e?d=identicon&s=25 Aapo Lehtinen (Guest)
on 2009-04-14 20:34
(Received via mailing list)
Martin DeMello kirjoitti viestissään (lähetysaika tiistai, 14. huhtikuuta
2009
16:49:03):
> > collaborative blog with me focused on best practices in Ruby.   It is
> > now live at:
> >
> > http://blog.rubybestpractices.com/
>
> Looks excellent!
>
> martin

Agreed, not too web2point0
2f55791ab9018b4d01fb741fab21843d?d=identicon&s=25 Tony Arcieri (Guest)
on 2009-04-14 20:35
(Received via mailing list)
On Tue, Apr 14, 2009 at 12:07 PM, Ben Lovell
<benjamin.lovell@gmail.com>wrote:

>
> There are literally *stacks* of other technical blogs that display their
> contents correctly via feeds. What problem do you foresee?
>
> I would prefer to read the full text via RSS if possible.
>

Yes, agreed.  If the full text isn't in the RSS feed I typically won't
bother reading it.

I read many technical blogs with rich formatting and it's preserved just
fine in my RSS reader.
9cce4cca531f835e951309aa39bb421b?d=identicon&s=25 Michael Furmaniuk (mfurmaniuk)
on 2009-04-14 21:16
Nice blog, especially the Blocks for Robustness post which uses one of
my questions and gives me another good method of handling that problem.
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-04-14 21:49
(Received via mailing list)
On Tue, Apr 14, 2009 at 2:32 PM, Tony Arcieri <tony@medioh.com> wrote:
> bother reading it.
Well, we can't have that, now can we?

I just switched korma over to use full text feeds.   We'll see how it
works out.
If there are problems, please send me a direct email.

-greg
146e52d49d361f85c0945487452fc6a0?d=identicon&s=25 Ben Lovell (benl)
on 2009-04-14 22:19
(Received via mailing list)
On Tue, Apr 14, 2009 at 8:48 PM, Gregory Brown
<gregory.t.brown@gmail.com>wrote:

I just switched korma over to use full text feeds.   We'll see how it
works
> out.
> If there are problems, please send me a direct email.
>
> -greg
>
>
Great, thank you!
Acd90f2627e42cf3727fed4dfb347c1e?d=identicon&s=25 john maclean (Guest)
on 2009-04-14 23:00
(Received via mailing list)
2009/4/14 Ben Lovell <benjamin.lovell@gmail.com>:
>
/me looks forward to some articles on testing.

--
John Maclean
07739 171 531
MSc (DIC)

Timezone: GMT
2f55791ab9018b4d01fb741fab21843d?d=identicon&s=25 Tony Arcieri (Guest)
on 2009-04-15 03:07
(Received via mailing list)
On Tue, Apr 14, 2009 at 1:48 PM, Gregory Brown
<gregory.t.brown@gmail.com>wrote:

> > Yes, agreed.  If the full text isn't in the RSS feed I typically won't
> > bother reading it.
>
> Well, we can't have that, now can we?
>
> I just switched korma over to use full text feeds.   We'll see how it works
> out.
> If there are problems, please send me a direct email.
>

Thanks!  And subscribed! :)
E088bb5c80fd3c4fd02c2020cdacbaf0?d=identicon&s=25 Jesús Gabriel y Galán (Guest)
on 2009-04-15 11:02
(Received via mailing list)
On Tue, Apr 14, 2009 at 9:48 PM, Gregory Brown
<gregory.t.brown@gmail.com> wrote:
>> Yes, agreed.  If the full text isn't in the RSS feed I typically won't
>> bother reading it.
>
> Well, we can't have that, now can we?
>
> I just switched korma over to use full text feeds.   We'll see how it works out.
> If there are problems, please send me a direct email.

Thanks for this, I'm on the side of those who prefer reading the full
article in the RSS reader.
I use Google Reader and it's showing up fine.

I'm looking forward for more articles.
Keep up the good job !!

Jesus.
Aae5c9f81fe990a48daf2bb91ac82759?d=identicon&s=25 unknown (Guest)
on 2009-04-15 15:11
(Received via mailing list)
great news: I've been looking forward to this since you mentioned it
on your blog... and to be honest I wasn't expecting it this early.

Diego
86e33dee4a89a8879a26487051c216a8?d=identicon&s=25 Michael Fellinger (Guest)
on 2009-04-15 17:19
(Received via mailing list)
On Wed, 15 Apr 2009 04:48:42 +0900
Gregory Brown <gregory.t.brown@gmail.com> wrote:

> >
> > Yes, agreed.  If the full text isn't in the RSS feed I typically
> > won't bother reading it.
>
> Well, we can't have that, now can we?
>
> I just switched korma over to use full text feeds.   We'll see how it
> works out. If there are problems, please send me a direct email.

Doesn't that prevent gist embedding/highlighting in the feed?
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-04-15 17:47
(Received via mailing list)
On Wed, Apr 15, 2009 at 11:16 AM, Michael Fellinger
<m.fellinger@gmail.com> wrote:

>> Well, we can't have that, now can we?
>>
>> I just switched korma over to use full text feeds.   We'll see how it
>> works out. If there are problems, please send me a direct email.
>
> Doesn't that prevent gist embedding/highlighting in the feed?

I'm actually not sure.   Anyone know the answer here?
We definitely plan to use gist on the RBP blog.

-greg
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2009-04-15 18:36
(Received via mailing list)
On 15.04.2009 17:46, Gregory Brown wrote:
> We definitely plan to use gist on the RBP blog.
I don't know either.  But let's see what happens when we have the first
gist in a posting.

Cheers

  robert
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-04-16 08:32
(Received via mailing list)
On Wed, Apr 15, 2009 at 12:35 PM, Robert Klemme
<shortcutter@googlemail.com> wrote:
> On 15.04.2009 17:46, Gregory Brown wrote:
>>
>> On Wed, Apr 15, 2009 at 11:16 AM, Michael Fellinger

>>> Doesn't that prevent gist embedding/highlighting in the feed?
>>
>> I'm actually not sure.   Anyone know the answer here?
>> We definitely plan to use gist on the RBP blog.
>
> I don't know either.  But let's see what happens when we have the first gist
> in a posting.

Seems like my latest post:
http://blog.rubybestpractices.com/posts/gregory/ra...

Confirms that gists don't play well with embedding in feeds :-/

To our RSS readers, I apologize, but we need to use Gist until an
acceptable syntax highlighting solution appears in Korma.
If you see missing code examples in our feed, go to the original page.
 We'll do what we can to make it worth your while.

-greg

PS: If anyone has other suggestions, just let me know off list, I
don't want to keep spamming RubyTalk. :)
0176d9564601b43d75aff59f2cceed88?d=identicon&s=25 Markus Prinz (Guest)
on 2009-04-16 10:13
(Received via mailing list)
On 16.04.2009, at 08:31, Gregory Brown wrote:

>>
>> I don't know either.  But let's see what happens when we have the
>> first gist
>> in a posting.
>
> Seems like my latest post:
> http://blog.rubybestpractices.com/posts/gregory/
> rails_modularity_1.html
>
> Confirms that gists don't play well with embedding in feeds :-/

Gists require JavaScript. Most feedreaders either don't support that
(including Google Reader AFAIK), or have it deactived by default.

If I turn on JavaScript in NetNewsWire, I can see the gists in the
feed just fine.

Have you tried a <noscript> tag with a link to the gist?

g, Markus
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-04-16 10:15
(Received via mailing list)
On Thu, Apr 16, 2009 at 8:31 AM, Gregory Brown
<gregory.t.brown@gmail.com> wrote:
It is about ok in Google Reader, which has the adavantage to open the
blog in a tab (at least in Firefox), thus I am perfectly happy, but I
cannot speak for others.

Now for something completely different:

R A N T:
Personally I am very unhappy with the language that is applied by
about everybody nowadays, in your example, why "bastard". Why???
MERDE, ok now I did it too ;) Actually that is only mildly offending,
I have seen and heard much worse than that recently, e.g. in the
Mountain West Ruby Conf....

R E A S O N:
It is very difficult to evaluate the natural evolution of  a language
that is not your own (and it might be as difficult with your own
language, but I am out of contact with my own language,   "Na
Servas!!!"). I am therefor obliged to unhappily accept all lectures
that will be given now :(.
BTW Rick are you reading this, will you support me?

Q U E S T I O N:
When we program in Ruby and write
  File.open( "xxx" ) do | f | f.readlines end
do we not feel stupid? Do we not have any pride to replace this with
  File.readlines("xxx")
?
Is the usage of four letter words or "bastard" to be interpreted like
a counter point, does it have elegance or does it express emotional
attachment.
Or do I have to acknowledge that I am old (OMG, I might even die,
eventually)
Please enlighten me.
What about English Best Practices ( for Foreigners )?

A C K N O W L E D G E M E N T:
Great Blog for the rest.

--
Si tu veux construire un bateau ...
Ne rassemble pas des hommes pour aller chercher du bois, préparer des
outils, répartir les tâches, alléger le travail… mais enseigne aux
gens la nostalgie de l’infini de la mer.

If you want to build a ship, don’t herd people together to collect
wood and don’t assign them tasks and work, but rather teach them to
long for the endless immensity of the sea.
Fa2521c6539342333de9f42502657e5a?d=identicon&s=25 Eleanor McHugh (Guest)
on 2009-04-16 14:20
(Received via mailing list)
On 16 Apr 2009, at 09:14, Robert Dober wrote:
> Q U E S T I O N:
> When we program in Ruby and write
>  File.open( "xxx" ) do | f | f.readlines end
> do we not feel stupid? Do we not have any pride to replace this with
>  File.readlines("xxx")
> ?
> Is the usage of four letter words or "bastard" to be interpreted like
> a counter point, does it have elegance or does it express emotional
> attachment.

'Lazy bastard' is an established self-deprecating term (along with
'lazy bitch', 'lazy cow', 'lazy sod', etc.) used to suggest that
someone only works hard at the things which need to be done and not at
the things which don't. It can of course also be derogatory :)

More generally there's an established practice of saying more-or-less
the opposite of what you mean and then letting the context and/or
verbal tone indicate that that's what you've done.

> Or do I have to acknowledge that I am old (OMG, I might even die,
> eventually)
> Please enlighten me.
> What about English Best Practices ( for Foreigners )?

I can't speak for American English which has its own laws on
vulgarity, but here in the UK you'll often find this kind of language
used in the written form to indicate an air of informality as well as
in the spoken form between friends or work colleagues. There is a
class divide in that traditionally the upper and working classes adopt
this trait whilst the middle classes like to feign offence at it (I
blame those damn Puritans for that), but in recent decades a kind of
inverted snobbery has also given it currency amongst young
professionals - although not in a strictly formal business context or
I suspect in the privacy of their own homes ;)

The rules on when exactly to use these forms tend to be very vague and
instinctual so the best advice for non-native speakers is to steer
clear of vulgarities altogether (except for the occasional "bloody
hell" or "well I'll be buggered" as exclamations of surprise when the
severity of a situation requires it) and instead concentrate on
adoption of other English forms which suggest informality: the use of
contraction being the easiest to adopt (i.e. "he's" instead of "he
is") along with lazy vowel sounds and dropped "H"s.

Oh, and ignore absolutely everything written by the Grammar Police
(like "Eats, shoots and leaves") as they'll make your English read
like something from a 1940's Pathé News broadcast!


Ellie

Eleanor McHugh
Games With Brains
http://slides.games-with-brains.net
----
raise ArgumentError unless @reality.responds_to? :reason
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-04-16 15:59
(Received via mailing list)
On Thu, Apr 16, 2009 at 2:19 PM, Eleanor McHugh
<eleanor@games-with-brains.com> wrote:

Does this mean that "bastard" in "lazy bastard" does not have the same
value at all than bastard in e.g. "take this you bastard"? This kills
me ;) but actually there are lots of those expressions in other
languages I know "salopard" in French or "figlio di putana" in Italian
can be used as compliments. However this is a dangerous feature and is
normally used in face to face situations where the context, a friendly
setup and a broad smile or tap at the shoulders bear much more
semantic meaning than the words.
So I can maybe be forgiven, as would be Bill's mom ;)?

Concerning Bill's advice, I believe it is very import for us foreign
speakers, because these subtle things lead normally to very vulgar
expressions, strangers use so often when learning a language. Maybe
that is why I am so worried about it.

Thank you in any case.
Robert
86e33dee4a89a8879a26487051c216a8?d=identicon&s=25 Michael Fellinger (Guest)
on 2009-04-16 16:13
(Received via mailing list)
On Thu, 16 Apr 2009 17:14:27 +0900
Robert Dober <robert.dober@gmail.com> wrote:

> about everybody nowadays, in your example, why "bastard". Why???
> BTW Rick are you reading this, will you support me?
>
> Q U E S T I O N:
> When we program in Ruby and write
>   File.open( "xxx" ) do | f | f.readlines end
> do we not feel stupid? Do we not have any pride to replace this with
>   File.readlines("xxx")
> ?

Well, I would feel stupid, but I also don't see this advocated anywhere.
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-04-16 16:48
(Received via mailing list)
On Thu, Apr 16, 2009 at 9:58 AM, Robert Dober <robert.dober@gmail.com>
wrote:
> On Thu, Apr 16, 2009 at 2:19 PM, Eleanor McHugh
> <eleanor@games-with-brains.com> wrote:
>
> Does this mean that "bastard" in "lazy bastard" does not have the same
> value at all than bastard in e.g. "take this you bastard"?

In this context, the two are not even remotely related.  The post was
entirely a reference to myself, because I personally can't stand
working with Rails and do everything I can to work around its
verbosity.   Thus, I am a lazy bastard.  The post is for lazy bastards
like me.

I didn't consider the possibility of anyone (except maybe Bill's mom)
being offended by the title of the post, but to be fair, I didn't
think of what the literal interpretation by a non-native speaker might
be.   In that case, I hope the tone of the post made it clear that I
was not being derogatory towards any group of people.  But if it was
clear on reading that I wasn't out to hurt anybody, I'm really not
sure why we're having this conversation.

-greg
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-04-16 17:03
(Received via mailing list)
On Thu, Apr 16, 2009 at 4:47 PM, Gregory Brown
<gregory.t.brown@gmail.com> wrote:
> verbosity.   Thus, I am a lazy bastard.  The post is for lazy bastards
> like me.
>
> I didn't consider the possibility of anyone (except maybe Bill's mom)
> being offended by the title of the post, but to be fair, I didn't
> think of what the literal interpretation by a non-native speaker might
> be.   In that case, I hope the tone of the post made it clear that I
> was not being derogatory towards any group of people.  But if it was
> clear on reading that I wasn't out to hurt anybody, I'm really not
> sure why we're having this conversation.
To be honest I suspect people, as Eleanor has confirmed a little bit,
to use those words because it is in, but I completely misunderstood
the term in the context, my bad.
As I said, great effort.
Cheers
Robert
703fbc991fd63e0e1db54dca9ea31b53?d=identicon&s=25 Robert Dober (Guest)
on 2009-04-16 17:05
(Received via mailing list)
On Thu, Apr 16, 2009 at 4:13 PM, Michael Fellinger
<m.fellinger@gmail.com> wrote:

>> Q U E S T I O N:
>> When we program in Ruby and write
>>   File.open( "xxx" ) do | f | f.readlines end
>> do we not feel stupid? Do we not have any pride to replace this with
>>   File.readlines("xxx")
>> ?
>
> Well, I would feel stupid, but I also don't see this advocated anywhere.
Oh it was just an example in the context, please do not take offense.
Personally  when I discovered the one liner I felt quite stupid for
having written the actual three liner all over the places, maybe I am
taking programming too seriously, LOL.
As I said it was only an example, and, but this gets confusing :(, I
meant that normally people want to express themselves nicely.... But
wait, maybe this too is a wrong assumption and even if it is not,
nicety lies in the eyes of the beholder...
R.
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2009-04-16 20:41
(Received via mailing list)
On Thu, Apr 16, 2009 at 2:31 AM, Gregory Brown
<gregory.t.brown@gmail.com> wrote:

> To our RSS readers, I apologize, but we need to use Gist until an
> acceptable syntax highlighting solution appears in Korma.

We now have syntax highlighting[0] that works reasonably well in the
browser.   The code should still show up in the RSS feed, but without
the highlighting.
I think this is probably a reasonable compromise, and hopefully will
solve the issue for now.   Of course, if there is some amazingly
awesome solution out there, patches are welcome :)

-greg

[0] http://code.google.com/p/syntaxhighlighter
This topic is locked and can not be replied to.