B
Bas van Gils
All,
A little while ago I picked up a copy of the pickaxe book and got hooked to
Ruby. Never had a `real' project to work on though (that's what you get when
you don't hack for a living I suppose . Either way, a few weeks back I
needed an app that generates deals for the card game bridge. I made a small
design and hacked up some unit tests. After a while no more tests failed:
bas@Librarian { ~/bridgehands }$ ruby bridgeTests.rb
Loaded suite bridgeTests
Started
....
Finished in 0.003154 seconds.
After a bit more coding to format the output I got something that outputs:
bas@Librarian { ~/bridgehands }$ ruby deal.rb
AQJ652
92
T53
Q5
973 4
K87653 AQJ
8 J742
JT4 A9876
KT8
T4
AKQ96
K32
Not bad... Like I said, I'm not a full-time programmer. I would *love* to
learn more about `proper' ruby style though. Is there even such a thing? I
mean, the book cover said something about *pragmatic*
Could anyone have a look at:
http://www.van-gils.org/~bas/bridgehands/
and give me some suggestions on style / ruby idiom / other things?
Any help would be greatly appreciated,
yours
Bas
--
Bas van Gils <[email protected]>, http://www.van-gils.org
[[[ Thank you for not distributing my E-mail address ]]]
Quod est inferius est sicut quod est superius, et quod est superius est sicut
quod est inferius, ad perpetranda miracula rei unius.
A little while ago I picked up a copy of the pickaxe book and got hooked to
Ruby. Never had a `real' project to work on though (that's what you get when
you don't hack for a living I suppose . Either way, a few weeks back I
needed an app that generates deals for the card game bridge. I made a small
design and hacked up some unit tests. After a while no more tests failed:
bas@Librarian { ~/bridgehands }$ ruby bridgeTests.rb
Loaded suite bridgeTests
Started
....
Finished in 0.003154 seconds.
After a bit more coding to format the output I got something that outputs:
bas@Librarian { ~/bridgehands }$ ruby deal.rb
AQJ652
92
T53
Q5
973 4
K87653 AQJ
8 J742
JT4 A9876
KT8
T4
AKQ96
K32
Not bad... Like I said, I'm not a full-time programmer. I would *love* to
learn more about `proper' ruby style though. Is there even such a thing? I
mean, the book cover said something about *pragmatic*
Could anyone have a look at:
http://www.van-gils.org/~bas/bridgehands/
and give me some suggestions on style / ruby idiom / other things?
Any help would be greatly appreciated,
yours
Bas
--
Bas van Gils <[email protected]>, http://www.van-gils.org
[[[ Thank you for not distributing my E-mail address ]]]
Quod est inferius est sicut quod est superius, et quod est superius est sicut
quod est inferius, ad perpetranda miracula rei unius.