From ng at johnwlong.com Mon May 1 15:45:31 2006 From: ng at johnwlong.com (John W. Long) Date: Mon, 01 May 2006 15:45:31 -0400 Subject: [Chirb] [ANN] Radius 0.0.1 -- Powerful Tag-Based Templates Message-ID: <4456655B.3060401@johnwlong.com> I am pleased to announce the immediate release of Radius 0.5.0. Radius is a small, but powerful tag-based template language for Ruby inspired by the template languages used in MovableType and TextPattern . It uses tags similar to XML, but can be used to generate any form of plain text (HTML, e-mail, etc...). This release is much more feature complete than previous releases with it's own domain language and support for nested tags. From the change log: 0.5.0 * Created a DSL for tag definitions (introducing a DSL makes this version of Radiant incompatible with the last). The DSL has the following features: - full support for nested tags - global and local tag variables - Contexts can now be defined dynamically (instead of being subclassed) - see the QUICKSTART for more info * Many refactorings of the library and unit tests. * Changed the license to the MIT-LICENSE. * Updated documentation to reflect the changes. * Updated the version number to reflect the maturity of the code base. Download: http://rubyforge.org/frs/?group_id=1262 Documentation: http://radius.rubyforge.org Instalation: % gem install --remote radius A small example: require 'radius' # Define tags on a context that will be available to a template: context = Radius::Context.new do |c| c.define_tag 'hello' do 'Hello world' end c.define_tag 'repeat' do |tag| number = (tag.attr['times'] || '1').to_i result = '' number.times { result << tag.expand } result end end # Create a parser to parse tags that begin with 'r:' parser = Radius::Parser.new(context, :tag_prefix => 'r') # Parse tags and output the result puts parser.parse("A small example:\n" + '* !\n') Output: A small example: * Hello world! * Hello world! * Hello world! Learn more by reading the Quick Start guide: http://radius.rubyforge.org/files/QUICKSTART.html Enjoy! -- John Long http://wiseheartdesign.com/ From cremes at mac.com Mon May 1 15:54:39 2006 From: cremes at mac.com (Chuck Remes) Date: Mon, 1 May 2006 14:54:39 -0500 Subject: [Chirb] parking tonight? Message-ID: <76DD2E89-C45F-45B5-89F5-327ABD828519@mac.com> Is there going to be parking available tonight or has all the illegal alien marching screwed that up? From qzzzq1 at gmail.com Mon May 1 16:13:55 2006 From: qzzzq1 at gmail.com (colin h) Date: Mon, 1 May 2006 15:13:55 -0500 Subject: [Chirb] suggestions for uger - email reminders Message-ID: <507da57a0605011313u59897a75l57bad2e02295deb5@mail.gmail.com> does uger support email reminders? if so, i vote for using them because i just realized i allready made plans for this evening because i forgot it was the ruby meeting. that was one good thing about meetup, because it was helpful to forgetful people like myself. i'm also not opposed to working on a patch if one is needed to add this feature, unless someone else is so inclined. -colin From myself at walkerhamilton.com Mon May 1 17:30:37 2006 From: myself at walkerhamilton.com (Walker Hamilton) Date: Mon, 1 May 2006 16:30:37 -0500 Subject: [Chirb] parking tonight? In-Reply-To: <76DD2E89-C45F-45B5-89F5-327ABD828519@mac.com> References: <76DD2E89-C45F-45B5-89F5-327ABD828519@mac.com> Message-ID: nah. I promise you it'll be dead. I just rode through downtown on my way home to wickerpark and the protesters were all headed home. np. Walker Hamilton 312.493.8467 http://www.walkerhamilton.com On May 1, 2006, at 2:54 PM, Chuck Remes wrote: > Is there going to be parking available tonight or has all the illegal > alien marching screwed that up? > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list From JScruggs at thoughtworks.com Mon May 1 17:31:43 2006 From: JScruggs at thoughtworks.com (Jake Scruggs) Date: Mon, 1 May 2006 16:31:43 -0500 Subject: [Chirb] parking tonight? In-Reply-To: <76DD2E89-C45F-45B5-89F5-327ABD828519@mac.com> Message-ID: The only parking restrictions I saw today ended at 4pm. The marching past our office ended at 2:40pm and everything is clear now. -Jake Scruggs chicagogroup-members-list-bounces at rubyforge.org wrote on 05/01/2006 02:54:39 PM: > Is there going to be parking available tonight or has all the illegal > alien marching screwed that up? > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/chicagogroup-members-list/attachments/20060501/4cac1fb3/attachment.htm From qzzzq1 at gmail.com Mon May 1 17:37:32 2006 From: qzzzq1 at gmail.com (colin h) Date: Mon, 1 May 2006 16:37:32 -0500 Subject: [Chirb] parking tonight? In-Reply-To: References: <76DD2E89-C45F-45B5-89F5-327ABD828519@mac.com> Message-ID: <507da57a0605011437r494bd735r2e318777b0cf9ad7@mail.gmail.com> everything is clear when i look at my window.. and i'm 3 blocks away down washington... On 5/1/06, Jake Scruggs wrote: > > The only parking restrictions I saw today ended at 4pm. The marching past > our office ended at 2:40pm and everything is clear now. > -Jake Scruggs > > chicagogroup-members-list-bounces at rubyforge.org wrote on > 05/01/2006 02:54:39 PM: > > > > Is there going to be parking available tonight or has all the illegal > > alien marching screwed that up? > > _______________________________________________ > > ChicagoGroup-Members-List at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > From ng at johnwlong.com Mon May 1 17:38:33 2006 From: ng at johnwlong.com (John W. Long) Date: Mon, 01 May 2006 17:38:33 -0400 Subject: [Chirb] [ANN] Radiant CMS Message-ID: <44567FD9.5020201@johnwlong.com> I am pleased to announce that Radiant CMS is now publically available from the Subversion repository at: http://radiantcms.org/ What is Radiant? ---------------- Radiant is a no-fluff, open source content management system designed for small teams. It is similar to Textpattern or MovableType, but is a general purpose content management system (not a blogging engine). Radiant features: * An elegant user interface * Flexible templating with layouts, snippets, page parts, and a custom tagging language (Radius - http://radius.rubyforge.org) * Extensible with special page-oriented plugins called behaviors * Support for Markdown and Textile as well as traditional HTML (it's easy to create other filters) * A Simple user management/rights system * Operates in two modes: dev and production - depending on the URL * A caching system which expires pages every 5 minutes * Built using Ruby on Rails (which means that extending Radiant is as easy as creating a new controller) * Radiant is licensed under the MIT-LICENSE. * And much more... Radiant is the content management system that will eventually power Ruby-Lang.org (yes we are nearing completion on the project!). With this in mind I would really appreciate it if a few of you could kick the tires hard and make sure that Radiant is ready to go for Ruby-Lang. Please! Download Radiant from the Subversion repository and get this puppy on the road. -- John Long http://wiseheartdesign.com/ From chris.mcavoy at gmail.com Mon May 1 17:42:55 2006 From: chris.mcavoy at gmail.com (Chris McAvoy) Date: Mon, 1 May 2006 16:42:55 -0500 Subject: [Chirb] parking tonight? In-Reply-To: <507da57a0605011437r494bd735r2e318777b0cf9ad7@mail.gmail.com> References: <76DD2E89-C45F-45B5-89F5-327ABD828519@mac.com> <507da57a0605011437r494bd735r2e318777b0cf9ad7@mail.gmail.com> Message-ID: <3096c19d0605011442s22d0c7dcpf38a9e64dc5dad68@mail.gmail.com> On 5/1/06, Chuck Remes wrote: > Is there going to be parking available tonight or has all the illegal > alien marching screwed that up? I just got back from walking around down there. I don't think there's going to be enough parking for you Chuck. You should probably stay home. Don't bother coming in. There's no telling what kind of crazy stuff could possibly happen. It's best to stay put and protect your home. Chris From ryan at platte.name Mon May 1 17:47:47 2006 From: ryan at platte.name (Ryan Platte) Date: Mon, 1 May 2006 16:47:47 -0500 Subject: [Chirb] parking tonight? In-Reply-To: <3096c19d0605011442s22d0c7dcpf38a9e64dc5dad68@mail.gmail.com> References: <76DD2E89-C45F-45B5-89F5-327ABD828519@mac.com> <507da57a0605011437r494bd735r2e318777b0cf9ad7@mail.gmail.com> <3096c19d0605011442s22d0c7dcpf38a9e64dc5dad68@mail.gmail.com> Message-ID: <2f1a1dcb0605011447n25245ea2i24163919ab7c0139@mail.gmail.com> Ladies and gentlemen, Chris McAvoy! He'll be here all night, shows at 5, 6:30, and 8. On 5/1/06, Chris McAvoy wrote: > On 5/1/06, Chuck Remes wrote: > > Is there going to be parking available tonight or has all the illegal > > alien marching screwed that up? > > I just got back from walking around down there. I don't think there's > going to be enough parking for you Chuck. You should probably stay > home. Don't bother coming in. There's no telling what kind of crazy > stuff could possibly happen. It's best to stay put and protect your > home. > > Chris > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > -- Ryan Platte From chris.mcavoy at gmail.com Mon May 1 17:51:04 2006 From: chris.mcavoy at gmail.com (Chris McAvoy) Date: Mon, 1 May 2006 16:51:04 -0500 Subject: [Chirb] parking tonight? In-Reply-To: <2f1a1dcb0605011447n25245ea2i24163919ab7c0139@mail.gmail.com> References: <76DD2E89-C45F-45B5-89F5-327ABD828519@mac.com> <507da57a0605011437r494bd735r2e318777b0cf9ad7@mail.gmail.com> <3096c19d0605011442s22d0c7dcpf38a9e64dc5dad68@mail.gmail.com> <2f1a1dcb0605011447n25245ea2i24163919ab7c0139@mail.gmail.com> Message-ID: <3096c19d0605011451g6b20c9a8qeaaa0af51abb2530@mail.gmail.com> On 5/1/06, Ryan Platte wrote: > Ladies and gentlemen, Chris McAvoy! He'll be here all night, shows at > 5, 6:30, and 8. > I'm 80% hilarious, and 20% shockingly abrasive. Chris From cremes at mac.com Mon May 1 20:07:01 2006 From: cremes at mac.com (Chuck Remes) Date: Mon, 1 May 2006 19:07:01 -0500 Subject: [Chirb] parking tonight? In-Reply-To: References: <76DD2E89-C45F-45B5-89F5-327ABD828519@mac.com> Message-ID: On May 1, 2006, at 4:30 PM, Walker Hamilton wrote: > nah. I promise you it'll be dead. > I just rode through downtown on my way home to wickerpark and the > protesters were all headed home. > np. An emergency came up which prevented me from coming tonight anyway. Crap. See you in a month. cr From NStowe at ThorntonTomasetti.com Tue May 2 09:25:39 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Tue, 2 May 2006 08:25:39 -0500 Subject: [Chirb] Ruby User ?s Group Monday 5/1/06: CODEFEST! Message-ID: Thanks everyone, it was fun last night. I had to leave a little early, did you all talk about your solutions? I wondered if you could post to the list so we can review. I'll post what Peter and I worked on tonight. Thank you ThroughtWorks for pizza, drinks and location! Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com _____ From: Jake Scruggs [mailto:JScruggs at thoughtworks.com] Sent: Monday, April 24, 2006 11:52 PM To: chicagogroup-members-list at rubyforge.org Subject: [Chirb] Ruby User ?s Group Monday 5/1/06: CODEFEST! Lately our topics have been accused of being a little too high level for everyone in the crowd. Our speakers have been great but it looks like it's time for a break. On Monday, May 1, let's get together and do what we do best: code. We are going to have some exercises for you to complete if you wish. We'll take a couple of examples from the Ruby Quiz site and post them up with unit tests (like Jim W's continuation koans with 33% less hurting of your brain). Then, you can break into teams and make those tests pass. Never really done any Ruby? No problem, we will have people there to help you along. Unit tests really aren't your thing? Don't like the format? No problem, bring in something you would like to play with and we will try and find someone to help you out. At the end we can do a series of lightning rounds of quick show and tell. How did you approach the problem, and what did you learn? Don't worry about skill level. Just bring your laptop, your brain, and a copy of the PickAxe if you have one. When: Monday, May 1, 2006, 6:30 PM Where: ThoughtWorks 651 W. Washington Blvd. Suite 600 Chicago , IL 60661 (312) 373-1000 The building entrance on Des Plaines will be open until 7. The elevators will be on until 7 as well so that people can get to the 6th floor. After that, please feel free to call Joe at 614/906-1394 or Jake at 773/905-9102 and we'll have someone get you. Pizza and pop will, as usual, be provided. - Joe O'Brien and Jake Scruggs <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/chicagogroup-members-list/attachments/20060502/8f378e43/attachment.htm From ryan at platte.name Tue May 2 10:05:01 2006 From: ryan at platte.name (Ryan Platte) Date: Tue, 2 May 2006 09:05:01 -0500 Subject: [Chirb] Kill the meetup site? Message-ID: <2f1a1dcb0605020705l2a4ce124k18ab9b4be3ac627d@mail.gmail.com> Hi folks, We're plotting to dump our meetup.com account at the end of the day today. If you know of a reason to hang on to it, speak now or forever hold your peace. -- Ryan Platte From JScruggs at thoughtworks.com Tue May 2 10:53:26 2006 From: JScruggs at thoughtworks.com (Jake Scruggs) Date: Tue, 2 May 2006 09:53:26 -0500 Subject: [Chirb] Solutions In-Reply-To: Message-ID: Solutions: my personal solution to the text munger exercise (along with a dead end solution that I abandoned and the corrected unit tests, in case yer interested): http://catdesigns.textdriven.com/text_munger.zip (note: I'll probably take this down after a week or so (as it doesn't really belong here)) the Ruby Quiz Text Munger page with a bunch of solutions you can download: http://www.rubyquiz.com/quiz76.html The Ruby Quiz Rock Paper Scissors page with solutions: http://www.rubyquiz.com/quiz16.html Thanks to everyone who came, -Jake Scruggs P.S. http://catdesigns.textdriven.com/rps.zip has the original rps exercise I gave out at the meeting in case you weren't there. chicagogroup-members-list-bounces at rubyforge.org wrote on 05/02/2006 08:25:39 AM: > Thanks everyone, it was fun last night. I had to leave a little early, > did you all talk about your solutions? I wondered if you could post to > the list so we can review. I'll post what Peter and I worked on tonight. > > > Thank you ThroughtWorks for pizza, drinks and location! > > > > Nola J. Stowe > Systems Programmer > Thornton Tomasetti > 14 E. Jackson Boulevard, Suite 1100 > Chicago, IL 60604 > T 312.596.2000 F 312.596.2001 > D 312.596.2248 > NStowe at ThorntonTomasetti.com > > > From: Jake Scruggs [mailto:JScruggs at thoughtworks.com] > Sent: Monday, April 24, 2006 11:52 PM > To: chicagogroup-members-list at rubyforge.org > Subject: [Chirb] Ruby User ?s Group Monday 5/1/06: CODEFEST! > > Lately our topics have been accused of being a little too high level > for everyone in the crowd. Our speakers have been great but it looks > like it's time for a break. On Monday, May 1, let's get together and > do what we do best: code. > > We are going to have some exercises for you to complete if you wish. > We?ll take a couple of examples from the Ruby Quiz site and post them > up with unit tests (like Jim W?s continuation koans with 33% less > hurting of your brain). Then, you can break into teams and make those > tests pass. Never really done any Ruby? No problem, we will have > people there to help you along. > > Unit tests really aren't your thing? Don't like the format? No > problem, bring in something you would like to play with and we will > try and find someone to help you out. > > At the end we can do a series of lightning rounds of quick show and > tell. How did you approach the problem, and what did you learn? > > Don't worry about skill level. Just bring your laptop, your brain, > and a copy of the PickAxe if you have one. > > When: > Monday, May 1, 2006, 6:30 PM > > Where: > ThoughtWorks > 651 W. Washington Blvd. Suite 600 > Chicago , IL 60661 > (312) 373-1000 > > The building entrance on Des Plaines will be open until 7. The > elevators will be on until 7 as well so that people can get to the 6th > floor. After that, please feel free to call Joe at 614/906-1394 or > Jake at 773/905-9102 and we?ll have someone get you. > > Pizza and pop will, as usual, be provided. > > - Joe O?Brien and Jake Scruggs > > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > The information in this email and any attachments may contain > confidential information that is intended solely for the > attention and use of the named addressee(s). This message or > any part thereof must not be disclosed, copied, distributed or > retained by any person without authorization from the addressee. > If you are not the intended addressee, please notify the sender > immediately, and delete this message. > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/chicagogroup-members-list/attachments/20060502/f98c3368/attachment.htm From peter at oaktop.com Tue May 2 11:00:44 2006 From: peter at oaktop.com (Peter K Chan) Date: Tue, 2 May 2006 11:00:44 -0400 Subject: [Chirb] Kill the meetup site? Message-ID: Hi Ryan, Do we have a way of getting a list of the current meetup.com members? Peter -----Original Message----- From: chicagogroup-members-list-bounces at rubyforge.org [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of Ryan Platte Sent: Tuesday, May 02, 2006 9:05 AM To: Chirb discussion list Subject: [Chirb] Kill the meetup site? Hi folks, We're plotting to dump our meetup.com account at the end of the day today. If you know of a reason to hang on to it, speak now or forever hold your peace. -- Ryan Platte _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list From ryan at platte.name Tue May 2 11:23:39 2006 From: ryan at platte.name (Ryan Platte) Date: Tue, 2 May 2006 10:23:39 -0500 Subject: [Chirb] Kill the meetup site? In-Reply-To: References: Message-ID: <2f1a1dcb0605020823j2b7250bam46c6369cdf2f6763@mail.gmail.com> Nope! Fortunately a large number of our meetup members have joined the mailing list. We'll mail out one last "see you on the other side" Meetup mailing just before closing the Meetup account. On 5/2/06, Peter K Chan wrote: > Hi Ryan, > Do we have a way of getting a list of the current meetup.com > members? > > Peter > > -----Original Message----- > From: chicagogroup-members-list-bounces at rubyforge.org > [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of > Ryan Platte > Sent: Tuesday, May 02, 2006 9:05 AM > To: Chirb discussion list > Subject: [Chirb] Kill the meetup site? > > Hi folks, > > We're plotting to dump our meetup.com account at the end of the day > today. If you know of a reason to hang on to it, speak now or forever > hold your peace. > > -- > Ryan Platte > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > -- Ryan Platte From peter at oaktop.com Tue May 2 12:14:52 2006 From: peter at oaktop.com (Peter K Chan) Date: Tue, 2 May 2006 12:14:52 -0400 Subject: [Chirb] Kill the meetup site? Message-ID: Sounds good. Peter -----Original Message----- From: chicagogroup-members-list-bounces at rubyforge.org [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of Ryan Platte Sent: Tuesday, May 02, 2006 10:24 AM To: Chirb discussion list Subject: Re: [Chirb] Kill the meetup site? Nope! Fortunately a large number of our meetup members have joined the mailing list. We'll mail out one last "see you on the other side" Meetup mailing just before closing the Meetup account. On 5/2/06, Peter K Chan wrote: > Hi Ryan, > Do we have a way of getting a list of the current meetup.com > members? > > Peter > > -----Original Message----- > From: chicagogroup-members-list-bounces at rubyforge.org > [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of > Ryan Platte > Sent: Tuesday, May 02, 2006 9:05 AM > To: Chirb discussion list > Subject: [Chirb] Kill the meetup site? > > Hi folks, > > We're plotting to dump our meetup.com account at the end of the day > today. If you know of a reason to hang on to it, speak now or forever > hold your peace. > > -- > Ryan Platte > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > -- Ryan Platte _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list From chris.mcavoy at gmail.com Tue May 2 12:20:08 2006 From: chris.mcavoy at gmail.com (Chris McAvoy) Date: Tue, 2 May 2006 11:20:08 -0500 Subject: [Chirb] Paid Internship Opportunity Message-ID: <3096c19d0605020920s5aae8d34y8cb152fc6e2ab6fc@mail.gmail.com> Hi, I have an intern position open in my group. The position is for a full time Ruby / Python developer. You won't be doing busy work, this is a good position with a fair amount of responsibility. Our goal is to build tools that cut funding to Spyware vendors. The product you'll be working on is written in Python with a Ruby on Rails reporting interface. The project is largely conceptual currently, so you'll have a lot of input in the overall design and execution. You need to be a student to apply. For more information, write me at chris.mcavoy at gmail.com. The position is in the Loop. Most importantly though, you'll be working for me. I'm awesome. Chris From cremes.devlist at mac.com Tue May 2 12:32:51 2006 From: cremes.devlist at mac.com (cremes.devlist at mac.com) Date: Tue, 2 May 2006 11:32:51 -0500 Subject: [Chirb] Paid Internship Opportunity In-Reply-To: <3096c19d0605020920s5aae8d34y8cb152fc6e2ab6fc@mail.gmail.com> References: <3096c19d0605020920s5aae8d34y8cb152fc6e2ab6fc@mail.gmail.com> Message-ID: <148FFBC9-8C75-4440-87AB-94FE2E21CDFB@mac.com> On May 2, 2006, at 11:20 AM, Chris McAvoy wrote: > Hi, > > I have an intern position open in my group. The position is for a > full time Ruby / Python developer. You won't be doing busy work, this > is a good position with a fair amount of responsibility. Our goal is > to build tools that cut funding to Spyware vendors. The product > you'll be working on is written in Python with a Ruby on Rails > reporting interface. The project is largely conceptual currently, so > you'll have a lot of input in the overall design and execution. > > You need to be a student to apply. For more information, write me at > chris.mcavoy at gmail.com. The position is in the Loop. Most > importantly though, you'll be working for me. I'm awesome. I'd apply, but I'm too afraid to leave my home unprotected. Plus, the parking situation in the Loop is so crazy there's no telling what might happen. ;-) cr From rubygroup at johnwlong.com Tue May 2 14:45:37 2006 From: rubygroup at johnwlong.com (John W. Long) Date: Tue, 02 May 2006 14:45:37 -0400 Subject: [Chirb] Kill the meetup site? In-Reply-To: References: Message-ID: <4457A8D1.3070704@johnwlong.com> Before we do that, perhaps we could setup a redirect to the /uger/ folder on chirb.org? A Forbidden error isn't very friendly. -- John Peter K Chan wrote: > Sounds good. > > Peter > > -----Original Message----- > From: chicagogroup-members-list-bounces at rubyforge.org > [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of > Ryan Platte > Sent: Tuesday, May 02, 2006 10:24 AM > To: Chirb discussion list > Subject: Re: [Chirb] Kill the meetup site? > > Nope! Fortunately a large number of our meetup members have joined the > mailing list. We'll mail out one last "see you on the other side" > Meetup mailing just before closing the Meetup account. > > On 5/2/06, Peter K Chan wrote: >> Hi Ryan, >> Do we have a way of getting a list of the current meetup.com >> members? >> >> Peter >> >> -----Original Message----- >> From: chicagogroup-members-list-bounces at rubyforge.org >> [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of >> Ryan Platte >> Sent: Tuesday, May 02, 2006 9:05 AM >> To: Chirb discussion list >> Subject: [Chirb] Kill the meetup site? >> >> Hi folks, >> >> We're plotting to dump our meetup.com account at the end of the day >> today. If you know of a reason to hang on to it, speak now or forever >> hold your peace. >> >> -- >> Ryan Platte >> >> _______________________________________________ >> ChicagoGroup-Members-List at rubyforge.org >> http://rubyforge.org/mailman/listinfo/chicagogroup-members-list >> >> _______________________________________________ >> ChicagoGroup-Members-List at rubyforge.org >> http://rubyforge.org/mailman/listinfo/chicagogroup-members-list >> > > > -- > Ryan Platte > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > From ryan at platte.name Tue May 2 15:42:48 2006 From: ryan at platte.name (Ryan Platte) Date: Tue, 2 May 2006 14:42:48 -0500 Subject: [Chirb] Kill the meetup site? In-Reply-To: <4457A8D1.3070704@johnwlong.com> References: <4457A8D1.3070704@johnwlong.com> Message-ID: <2f1a1dcb0605021242n675ab516if9b149ac4d501f6c@mail.gmail.com> Yes, just maybe. :-) Could even be argued we should do that anyway. Hey everybody, let's take web discussion over to website at lists.chirb.org. You can subscribe to that list at: http://lists.chirb.org/mailman/listinfo/website On 5/2/06, John W. Long wrote: > Before we do that, perhaps we could setup a redirect to the /uger/ > folder on chirb.org? A Forbidden error isn't very friendly. > > -- > John > > Peter K Chan wrote: > > Sounds good. > > > > Peter > > > > -----Original Message----- > > From: chicagogroup-members-list-bounces at rubyforge.org > > [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of > > Ryan Platte > > Sent: Tuesday, May 02, 2006 10:24 AM > > To: Chirb discussion list > > Subject: Re: [Chirb] Kill the meetup site? > > > > Nope! Fortunately a large number of our meetup members have joined the > > mailing list. We'll mail out one last "see you on the other side" > > Meetup mailing just before closing the Meetup account. > > > > On 5/2/06, Peter K Chan wrote: > >> Hi Ryan, > >> Do we have a way of getting a list of the current meetup.com > >> members? > >> > >> Peter > >> > >> -----Original Message----- > >> From: chicagogroup-members-list-bounces at rubyforge.org > >> [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of > >> Ryan Platte > >> Sent: Tuesday, May 02, 2006 9:05 AM > >> To: Chirb discussion list > >> Subject: [Chirb] Kill the meetup site? > >> > >> Hi folks, > >> > >> We're plotting to dump our meetup.com account at the end of the day > >> today. If you know of a reason to hang on to it, speak now or forever > >> hold your peace. > >> > >> -- > >> Ryan Platte > >> > >> _______________________________________________ > >> ChicagoGroup-Members-List at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > >> > >> _______________________________________________ > >> ChicagoGroup-Members-List at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > >> > > > > > > -- > > Ryan Platte > > > > _______________________________________________ > > ChicagoGroup-Members-List at rubyforge.org > > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > > > _______________________________________________ > > ChicagoGroup-Members-List at rubyforge.org > > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > -- Ryan Platte From marcel at vernix.org Tue May 2 22:26:18 2006 From: marcel at vernix.org (Marcel Molina Jr.) Date: Tue, 2 May 2006 21:26:18 -0500 Subject: [Chirb] Ruby User ?s Group Monday 5/1/06: CODEFEST! In-Reply-To: References: Message-ID: <20060503022618.GR9231@chicago.vernix.org> On Tue, May 02, 2006 at 08:25:39AM -0500, Stowe, Nola wrote: > Thanks everyone, it was fun last night. I had to leave a little early, did > you all talk about your solutions? I wondered if you could post to the > list so we can review. I'll post what Peter and I worked on tonight. Here's the TextMunger that we came up with: http://vernix.org/marcel/text_munger.rb.txt marcel -- Marcel Molina Jr. From peter at oaktop.com Tue May 2 23:35:33 2006 From: peter at oaktop.com (Peter K Chan) Date: Tue, 2 May 2006 23:35:33 -0400 Subject: [Chirb] Kill the meetup site? Message-ID: Hi John, Thanks for the catch. It has been taken care of. Thanks, Peter -----Original Message----- From: chicagogroup-members-list-bounces at rubyforge.org [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of John W. Long Sent: Tuesday, May 02, 2006 1:46 PM To: Chirb discussion list Subject: Re: [Chirb] Kill the meetup site? Before we do that, perhaps we could setup a redirect to the /uger/ folder on chirb.org? A Forbidden error isn't very friendly. -- John Peter K Chan wrote: > Sounds good. > > Peter > > -----Original Message----- > From: chicagogroup-members-list-bounces at rubyforge.org > [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of > Ryan Platte > Sent: Tuesday, May 02, 2006 10:24 AM > To: Chirb discussion list > Subject: Re: [Chirb] Kill the meetup site? > > Nope! Fortunately a large number of our meetup members have joined the > mailing list. We'll mail out one last "see you on the other side" > Meetup mailing just before closing the Meetup account. > > On 5/2/06, Peter K Chan wrote: >> Hi Ryan, >> Do we have a way of getting a list of the current meetup.com >> members? >> >> Peter >> >> -----Original Message----- >> From: chicagogroup-members-list-bounces at rubyforge.org >> [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of >> Ryan Platte >> Sent: Tuesday, May 02, 2006 9:05 AM >> To: Chirb discussion list >> Subject: [Chirb] Kill the meetup site? >> >> Hi folks, >> >> We're plotting to dump our meetup.com account at the end of the day >> today. If you know of a reason to hang on to it, speak now or forever >> hold your peace. >> >> -- >> Ryan Platte >> >> _______________________________________________ >> ChicagoGroup-Members-List at rubyforge.org >> http://rubyforge.org/mailman/listinfo/chicagogroup-members-list >> >> _______________________________________________ >> ChicagoGroup-Members-List at rubyforge.org >> http://rubyforge.org/mailman/listinfo/chicagogroup-members-list >> > > > -- > Ryan Platte > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list From NStowe at ThorntonTomasetti.com Wed May 3 12:35:42 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Wed, 3 May 2006 11:35:42 -0500 Subject: [Chirb] Ruby User ?s Group Monday 5/1/06: CODEFEST! Message-ID: Thanks Marcel! Boy this solution here is nice http://rubyquiz.com/quiz76.html Its obvious that I'm still thinking in PHP.. Here's what Peter and I worked on.. Both of us kinda new to Ruby. class TextMunger def initialize(str) @str = str end def mungword word matches = /(.*?\w)(\w+)(\w.*)/.match(word) mid = matches[2].split '' orig = mid.dup i = mid.size while (i = i - 1) > 0 do mid = [mid.pop] + mid return (([matches[1]] + mid + [matches[3]]).join '') if mid != orig end word end def mung words = @str.split(/(\W+)/) words = words.collect do |word| if word.size < 4 then word else mungword word end end munged_str = words.join('') munged_str end end <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> From ryan at platte.name Wed May 3 14:46:05 2006 From: ryan at platte.name (Ryan Platte) Date: Wed, 3 May 2006 13:46:05 -0500 Subject: [Chirb] Ruby User ?s Group Monday 5/1/06: CODEFEST! In-Reply-To: References: Message-ID: <2f1a1dcb0605031146g17c6f2dfjbb26a6e951c65df0@mail.gmail.com> Vivek and I were pretty jazzed at how ours turned out. We both had some ideas that would've passed the tests with too much code, the breakthrough was that we could use a gsub block, then the code shriveled up to nothing: class TextMunger def initialize(input) @input = input end def twist(input) input.reverse end def mung @input.gsub(/([A-Za-z])([A-Za-z]+)([A-Za-z])/) do $1 + twist($2) + $3 end end end -- Ryan Platte From marcel at vernix.org Wed May 3 15:11:08 2006 From: marcel at vernix.org (Marcel Molina Jr.) Date: Wed, 3 May 2006 14:11:08 -0500 Subject: [Chirb] Ruby User ?s Group Monday 5/1/06: CODEFEST! In-Reply-To: <2f1a1dcb0605031146g17c6f2dfjbb26a6e951c65df0@mail.gmail.com> References: <2f1a1dcb0605031146g17c6f2dfjbb26a6e951c65df0@mail.gmail.com> Message-ID: <20060503191108.GX9231@chicago.vernix.org> On Wed, May 03, 2006 at 01:46:05PM -0500, Ryan Platte wrote: > Vivek and I were pretty jazzed at how ours turned out. We both had > some ideas that would've passed the tests with too much code, the > breakthrough was that we could use a gsub block, then the code > shriveled up to nothing: Yeah, gsub with a block seems to be one of the best tools for fulfilling the "punctuation must be preserved in its original position" requirement. String#reverse is cheating ;) > class TextMunger > > def initialize(input) > @input = input > end > > def twist(input) > input.reverse > end > > def mung > @input.gsub(/([A-Za-z])([A-Za-z]+)([A-Za-z])/) do > $1 + twist($2) + $3 > end > end > > end marcel -- Marcel Molina Jr. From ryan at platte.name Wed May 3 15:21:58 2006 From: ryan at platte.name (Ryan Platte) Date: Wed, 3 May 2006 14:21:58 -0500 Subject: [Chirb] Ruby User ?s Group Monday 5/1/06: CODEFEST! In-Reply-To: <20060503191108.GX9231@chicago.vernix.org> References: <2f1a1dcb0605031146g17c6f2dfjbb26a6e951c65df0@mail.gmail.com> <20060503191108.GX9231@chicago.vernix.org> Message-ID: <2f1a1dcb0605031221g6d088972gb7b60d1dd9378891@mail.gmail.com> On 5/3/06, Marcel Molina Jr. wrote: > String#reverse is cheating ;) That's why we put it in its own method. Hey, the tests pass and it does indeed munge! > > def twist(input) > > input.reverse > > end -- Ryan Platte From qzzzq1 at gmail.com Wed May 3 22:04:12 2006 From: qzzzq1 at gmail.com (colin h) Date: Wed, 3 May 2006 21:04:12 -0500 Subject: [Chirb] Fwd: Keep Your Ruby programmers Meetup Group Going -- Be the Organizer In-Reply-To: <6707053.1146707679690.JavaMail.root@admin.meetup.com> References: <6707053.1146707679690.JavaMail.root@admin.meetup.com> Message-ID: <507da57a0605031904y1b52fd67q836f6d78ddaa8ee2@mail.gmail.com> it's almost like they are crying and begging us to come back... 8) long live uger!!!! ---------- Forwarded message ---------- From: Meetup.com Date: May 3, 2006 8:54 PM Subject: Keep Your Ruby programmers Meetup Group Going -- Be the Organizer To: qzzzq1 at gmail.com Dear Meetup Member, The Organizer of Chicago Area Ruby Group stepped down without nominating a successor. The 184 members of the group need a new Organizer. You can keep the group going by taking over as Organizer. It's a real & rewarding responsibility, and Meetup.com will help you each step of the way. As Organizer, you'll get special access to tools specifically designed for managing and growing a local OFFLINE community group. Thousands of people take great pride in being a Meetup Organizer because they're helping others connect and create community. See what they're saying here: http://www.meetup.com/thanks/ While Organizers are responsible for paying a monthly Group Fee, many groups share the cost among the group members - this often breaks down to a few dollars per member. Plus there's a 30-day money back guarantee. Step up today and if you are not satisfied with the Meetup service, we'll give you a full refund. To step up go to: http://ruby.meetup.com/55/handover/?op=c&ic=en1 We hope you'll keep Chicago Area Ruby Group going for all the current and future group members out there. Thanks for using Meetup.com! *Win a trip for 2 to any Meetup anywhere!* Hug a pug in Honolulu... Sit 'n Knit in San Francisco... Practice French in Paris...YOU chose! See the details and get started here: http://orc.meetup.com/archives/2006/04/win_a_trip_to_a_1.html ---------------------------------------------------------------- Did this end up in your spam/junk/bulk folder? Add info at meetup.com to your address book to ensure that you receive emails from us. ---------------------------------------------------------------- HOW TO UNSUBSCRIBE: To remove yourself from individual Meetup Groups and their related emails, click the link below and select 'Remove yourself' under the name of the appropriate group: http://www.meetup.com/account/#memberships To unsubscribe from ALL Meetup Groups and the Meetup.com service as a whole, click here: http://www.meetup.com/account/unsub/ From nshb at inimit.com Sat May 6 20:05:20 2006 From: nshb at inimit.com (Nathaniel Brown) Date: Sat, 6 May 2006 17:05:20 -0700 Subject: [Chirb] Canada on Rails presents.. Riding the Rails Workshop - May 27th & 28th Message-ID: <47e90342b74e96ad5cb8a3308e1c6aed@newsletter.osevents.com> Canada on Rails presents, Riding the Rails Workshop on May 27th and 28th. This is a two day intensive workshop for those eager to get into Ruby on Rails. Alex will drive you through the principles behind Ruby on Rails, such as MVC, convention over configuration, Code Generators, and the other core principles driving Ruby on Rails to be the most celebrated technology advancement in web development. This course is meant for those who have not yet worked with Rails, and want to get comfortable with the basic functionality. These core areas will be covered in this workshop: * Comprehensive list of Ruby and Rails resources * Installing and configuring your first Ruby on Rails application * Ruby on Rails Opinions * Using the code generators * Understanding Model-View-Controller (MVC) architecture * Customizing your Rails MVC * Introduction to Gems, Plug-in?s, and Engines Registration, and additional information is available online at: http://store.osevents.com/product_info.php?products_id=5 For any questions about this workshop, please direct them to Nathaniel Brown, nshb at inimit.com, or by calling 1-877-446-4648 toll free within North America, or 604-724-6624 internationally. -- Powered by Toolbawks, www.toolbawks.com -- From NStowe at ThorntonTomasetti.com Thu May 11 17:16:19 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Thu, 11 May 2006 16:16:19 -0500 Subject: [Chirb] ROR question, legacy db sequence generation Message-ID: I am in the process of converting a php site, which uses PEAR DB's sequence structure to fake the native MySQL autoincrement (supposedly, then I could port my code to any database without worrying that feature). Its not really fesible at this point to go back to autoincrement, although some tables created by another developer ignore our policy of using PEAR DB and did autoincrement anyways. Grrrr - no more donuts for him) What PEAR DB does is this. Say I have a table "contacts". It creates a table contacts_seq which contains just one field. When I need to insert a new record into the database, first I do this $next_id = $db->nextID("contacts"); // retrieves value in contacts_seq, increments and saves new id back to contacts_seq Then use that in my sql to insert my record in another db. Lovely, huh? Is there some way I could override the id method? I've poked around and tried a few things, but it looks like rails just totally leaves that up to the database. I've googled for the past few hours and can't find anything that really says either way. Any ideas? Thanks Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> From jbalint at gmail.com Thu May 11 17:48:37 2006 From: jbalint at gmail.com (Jess Balint) Date: Thu, 11 May 2006 17:48:37 -0400 Subject: [Chirb] ROR question, legacy db sequence generation In-Reply-To: Message-ID: <4463b135.7bfa9075.569c.ffff9dba@mx.gmail.com> You can use auto increment in the new database and just set the next sequence value for the auto increment id to whatever the next value would be from your sequence table. -----Original Message----- From: chicagogroup-members-list-bounces at rubyforge.org [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of Stowe, Nola Sent: Thursday, May 11, 2006 5:16 PM To: Chirb discussion list Subject: [Chirb] ROR question, legacy db sequence generation I am in the process of converting a php site, which uses PEAR DB's sequence structure to fake the native MySQL autoincrement (supposedly, then I could port my code to any database without worrying that feature). Its not really fesible at this point to go back to autoincrement, although some tables created by another developer ignore our policy of using PEAR DB and did autoincrement anyways. Grrrr - no more donuts for him) What PEAR DB does is this. Say I have a table "contacts". It creates a table contacts_seq which contains just one field. When I need to insert a new record into the database, first I do this $next_id = $db->nextID("contacts"); // retrieves value in contacts_seq, increments and saves new id back to contacts_seq Then use that in my sql to insert my record in another db. Lovely, huh? Is there some way I could override the id method? I've poked around and tried a few things, but it looks like rails just totally leaves that up to the database. I've googled for the past few hours and can't find anything that really says either way. Any ideas? Thanks Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list From NStowe at ThorntonTomasetti.com Fri May 12 08:44:42 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Fri, 12 May 2006 07:44:42 -0500 Subject: [Chirb] ROR question, legacy db sequence generation Message-ID: I could yes... If I changed the php code to not use the pear DB sequence table. If ActiveRecord could use a method to retrieve a value and use it for creating a new record, then I could continue in same fashion as with PEAR DB. Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: Jess Balint [mailto:jbalint at gmail.com] Sent: Thursday, May 11, 2006 4:49 PM To: 'Chirb discussion list' Subject: Re: [Chirb] ROR question, legacy db sequence generation You can use auto increment in the new database and just set the next sequence value for the auto increment id to whatever the next value would be from your sequence table. -----Original Message----- From: chicagogroup-members-list-bounces at rubyforge.org [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of Stowe, Nola Sent: Thursday, May 11, 2006 5:16 PM To: Chirb discussion list Subject: [Chirb] ROR question, legacy db sequence generation I am in the process of converting a php site, which uses PEAR DB's sequence structure to fake the native MySQL autoincrement (supposedly, then I could port my code to any database without worrying that feature). Its not really fesible at this point to go back to autoincrement, although some tables created by another developer ignore our policy of using PEAR DB and did autoincrement anyways. Grrrr - no more donuts for him) What PEAR DB does is this. Say I have a table "contacts". It creates a table contacts_seq which contains just one field. When I need to insert a new record into the database, first I do this $next_id = $db->nextID("contacts"); // retrieves value in contacts_seq, increments and saves new id back to contacts_seq Then use that in my sql to insert my record in another db. Lovely, huh? Is there some way I could override the id method? I've poked around and tried a few things, but it looks like rails just totally leaves that up to the database. I've googled for the past few hours and can't find anything that really says either way. Any ideas? Thanks Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> From cremes.devlist at mac.com Fri May 12 09:05:01 2006 From: cremes.devlist at mac.com (cremes.devlist at mac.com) Date: Fri, 12 May 2006 08:05:01 -0500 Subject: [Chirb] ROR question, legacy db sequence generation In-Reply-To: References: Message-ID: I don't know if you've tried this, so I apologize if I'm stating the obvious. (I just read this last night so it is very fresh in my mind.) If you have the Agile Rails book, take a peek at page 207. It describes how you can override AR's primary key behavior by using #set_primary_key to use your own field. AR then gives up any pretense of managing the primary key and leaves it up to you to set yourself. I haven't tried it (or looked at the code), but I imagine you could override #id= in your model subclass and wrap up all this funky logic in the new method. That way your model code would remain DRY. Or maybe this is all completely wrong. :-) cr On May 11, 2006, at 4:16 PM, Stowe, Nola wrote: > I am in the process of converting a php site, which uses PEAR DB's > sequence > structure to fake the native MySQL autoincrement (supposedly, then > I could > port my code to any database without worrying that feature). Its > not really > fesible at this point to go back to autoincrement, although some > tables > created by another developer ignore our policy of using PEAR DB and > did > autoincrement anyways. Grrrr - no more donuts for him) > > What PEAR DB does is this. Say I have a table "contacts". It > creates a table > contacts_seq which contains just one field. When I need to insert a > new > record into the database, first I do this > > $next_id = $db->nextID("contacts"); // retrieves value in > contacts_seq, > increments and saves new id back to contacts_seq > > Then use that in my sql to insert my record in another db. Lovely, > huh? > > > Is there some way I could override the id method? I've poked around > and > tried a few things, but it looks like rails just totally leaves > that up to > the database. I've googled for the past few hours and can't find > anything > that really says either way. > > Any ideas? > > > Thanks > > > > Nola J. Stowe > Systems Programmer > Thornton Tomasetti > 14 E. Jackson Boulevard, Suite 1100 > Chicago, IL 60604 > T 312.596.2000 F 312.596.2001 > D 312.596.2248 > NStowe at ThorntonTomasetti.com > > > > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > The information in this email and any attachments may contain > confidential information that is intended solely for the > attention and use of the named addressee(s). This message or > any part thereof must not be disclosed, copied, distributed or > retained by any person without authorization from the addressee. > If you are not the intended addressee, please notify the sender > immediately, and delete this message. > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list From NStowe at ThorntonTomasetti.com Fri May 12 09:54:05 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Fri, 12 May 2006 08:54:05 -0500 Subject: [Chirb] ROR question, legacy db sequence generation Message-ID: That's what I was trying, not sure if this is correct.. : class ContactPerson < ActiveRecord::Base set_table_name "contacts" set_primary_key "c_key" def id=(value) write_attribute(self.class.primary_key, 50000) end End Just for a test, I tried to just set the key as 50000, I figured if that worked then I can add the code to retrieve the value ... But it doesn't seem to work. I went to the console, created a new object, added a few values, saved.. Checked.. And it didn't have the key 50000 Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] Sent: Friday, May 12, 2006 8:05 AM To: Chirb discussion list Subject: Re: [Chirb] ROR question, legacy db sequence generation I don't know if you've tried this, so I apologize if I'm stating the obvious. (I just read this last night so it is very fresh in my mind.) If you have the Agile Rails book, take a peek at page 207. It describes how you can override AR's primary key behavior by using #set_primary_key to use your own field. AR then gives up any pretense of managing the primary key and leaves it up to you to set yourself. I haven't tried it (or looked at the code), but I imagine you could override #id= in your model subclass and wrap up all this funky logic in the new method. That way your model code would remain DRY. Or maybe this is all completely wrong. :-) cr On May 11, 2006, at 4:16 PM, Stowe, Nola wrote: > I am in the process of converting a php site, which uses PEAR DB's > sequence structure to fake the native MySQL autoincrement (supposedly, > then I could port my code to any database without worrying that > feature). Its not really fesible at this point to go back to > autoincrement, although some tables created by another developer > ignore our policy of using PEAR DB and did autoincrement anyways. > Grrrr - no more donuts for him) > > What PEAR DB does is this. Say I have a table "contacts". It creates a > table contacts_seq which contains just one field. When I need to > insert a new record into the database, first I do this > > $next_id = $db->nextID("contacts"); // retrieves value in > contacts_seq, increments and saves new id back to contacts_seq > > Then use that in my sql to insert my record in another db. Lovely, > huh? > > > Is there some way I could override the id method? I've poked around > and tried a few things, but it looks like rails just totally leaves > that up to the database. I've googled for the past few hours and can't > find anything that really says either way. > > Any ideas? > > > Thanks > > > > Nola J. Stowe > Systems Programmer > Thornton Tomasetti > 14 E. Jackson Boulevard, Suite 1100 > Chicago, IL 60604 > T 312.596.2000 F 312.596.2001 > D 312.596.2248 > NStowe at ThorntonTomasetti.com > > > > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > The information in this email and any attachments may contain > confidential information that is intended solely for the attention and > use of the named addressee(s). This message or any part thereof must > not be disclosed, copied, distributed or retained by any person > without authorization from the addressee. > If you are not the intended addressee, please notify the sender > immediately, and delete this message. > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> From cremes.devlist at mac.com Fri May 12 11:42:30 2006 From: cremes.devlist at mac.com (cremes.devlist at mac.com) Date: Fri, 12 May 2006 10:42:30 -0500 Subject: [Chirb] ROR question, legacy db sequence generation In-Reply-To: References: Message-ID: I just took a look at activerecord-1.14.2/lib/active_record/base.rb and found the method #define_attr_method. It's involved with the whole #set_primary_key shenanigans. It aliases the original accessors when you call #set_primary_key so the original primary_key is still around under the new accessor #original_primary_key. Try changing #id= to: def id=(value) original_primary_key = 5000 end The ActiveRecord stuff looks really complicated so I'm probably wrong. But it doesn't hurt to try... cr On May 12, 2006, at 8:54 AM, Stowe, Nola wrote: > That's what I was trying, not sure if this is correct.. : > > > class ContactPerson < ActiveRecord::Base > set_table_name "contacts" > set_primary_key "c_key" > > def id=(value) > write_attribute(self.class.primary_key, 50000) > end > End > > > Just for a test, I tried to just set the key as 50000, I figured if > that > worked then I can add the code to retrieve the value ... But it > doesn't seem > to work. > > I went to the console, created a new object, added a few values, > saved.. > Checked.. And it didn't have the key 50000 > > > -----Original Message----- > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > Sent: Friday, May 12, 2006 8:05 AM > To: Chirb discussion list > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > I don't know if you've tried this, so I apologize if I'm stating the > obvious. (I just read this last night so it is very fresh in my mind.) > > If you have the Agile Rails book, take a peek at page 207. It > describes how > you can override AR's primary key behavior by using > #set_primary_key to use > your own field. AR then gives up any pretense of managing the > primary key > and leaves it up to you to set yourself. > > I haven't tried it (or looked at the code), but I imagine you could > override > #id= in your model subclass and wrap up all this funky logic in the > new > method. That way your model code would remain DRY. > > Or maybe this is all completely wrong. :-) > > cr > > On May 11, 2006, at 4:16 PM, Stowe, Nola wrote: > >> I am in the process of converting a php site, which uses PEAR DB's >> sequence structure to fake the native MySQL autoincrement >> (supposedly, >> then I could port my code to any database without worrying that >> feature). Its not really fesible at this point to go back to >> autoincrement, although some tables created by another developer >> ignore our policy of using PEAR DB and did autoincrement anyways. >> Grrrr - no more donuts for him) >> >> What PEAR DB does is this. Say I have a table "contacts". It >> creates a >> table contacts_seq which contains just one field. When I need to >> insert a new record into the database, first I do this >> >> $next_id = $db->nextID("contacts"); // retrieves value in >> contacts_seq, increments and saves new id back to contacts_seq >> >> Then use that in my sql to insert my record in another db. Lovely, >> huh? >> >> >> Is there some way I could override the id method? I've poked around >> and tried a few things, but it looks like rails just totally leaves >> that up to the database. I've googled for the past few hours and >> can't >> find anything that really says either way. From NStowe at ThorntonTomasetti.com Fri May 12 11:48:49 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Fri, 12 May 2006 10:48:49 -0500 Subject: [Chirb] ROR question, legacy db sequence generation Message-ID: Hmmmm... No... In console... >> p.first = "Oscar" => "Oscar" >> p.last = "Grouch" => "Grouch" >> p.save ActiveRecord::StatementInvalid: MysqlError: Duplicate entry '0' for key 1: So, its not pulling in 50000 as a key value. Hmm.. Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] Sent: Friday, May 12, 2006 10:43 AM To: Chirb discussion list Subject: Re: [Chirb] ROR question, legacy db sequence generation I just took a look at activerecord-1.14.2/lib/active_record/base.rb and found the method #define_attr_method. It's involved with the whole #set_primary_key shenanigans. It aliases the original accessors when you call #set_primary_key so the original primary_key is still around under the new accessor #original_primary_key. Try changing #id= to: def id=(value) original_primary_key = 5000 end The ActiveRecord stuff looks really complicated so I'm probably wrong. But it doesn't hurt to try... cr On May 12, 2006, at 8:54 AM, Stowe, Nola wrote: > That's what I was trying, not sure if this is correct.. : > > > class ContactPerson < ActiveRecord::Base > set_table_name "contacts" > set_primary_key "c_key" > > def id=(value) > write_attribute(self.class.primary_key, 50000) > end > End > > > Just for a test, I tried to just set the key as 50000, I figured if > that worked then I can add the code to retrieve the value ... But it > doesn't seem to work. > > I went to the console, created a new object, added a few values, > saved.. > Checked.. And it didn't have the key 50000 > > > -----Original Message----- > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > Sent: Friday, May 12, 2006 8:05 AM > To: Chirb discussion list > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > I don't know if you've tried this, so I apologize if I'm stating the > obvious. (I just read this last night so it is very fresh in my mind.) > > If you have the Agile Rails book, take a peek at page 207. It > describes how you can override AR's primary key behavior by using > #set_primary_key to use your own field. AR then gives up any pretense > of managing the primary key and leaves it up to you to set yourself. > > I haven't tried it (or looked at the code), but I imagine you could > override #id= in your model subclass and wrap up all this funky logic > in the new method. That way your model code would remain DRY. > > Or maybe this is all completely wrong. :-) > > cr > > On May 11, 2006, at 4:16 PM, Stowe, Nola wrote: > >> I am in the process of converting a php site, which uses PEAR DB's >> sequence structure to fake the native MySQL autoincrement >> (supposedly, then I could port my code to any database without >> worrying that feature). Its not really fesible at this point to go >> back to autoincrement, although some tables created by another >> developer ignore our policy of using PEAR DB and did autoincrement >> anyways. >> Grrrr - no more donuts for him) >> >> What PEAR DB does is this. Say I have a table "contacts". It creates >> a table contacts_seq which contains just one field. When I need to >> insert a new record into the database, first I do this >> >> $next_id = $db->nextID("contacts"); // retrieves value in >> contacts_seq, increments and saves new id back to contacts_seq >> >> Then use that in my sql to insert my record in another db. Lovely, >> huh? >> >> >> Is there some way I could override the id method? I've poked around >> and tried a few things, but it looks like rails just totally leaves >> that up to the database. I've googled for the past few hours and >> can't find anything that really says either way. _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> From NStowe at ThorntonTomasetti.com Fri May 12 12:44:05 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Fri, 12 May 2006 11:44:05 -0500 Subject: [Chirb] ROR question, legacy db sequence generation Message-ID: Well.. I have this: class Contact < ActiveRecord::Base set_table_name "contact_person" set_primary_key "p_key" # following example: http://railsmanual.org/class/ActiveRecord::Base/define_attr_method define_attr_method(:p_key) do p_key end def p_key get_next_id end def get_next_id 50000 end end I can do in console p = Contact.new p.get_next_id => 50000 p.p_key => 50000 But if I just do p = Contact.new p.save I get an error about the primary key being set to 0. I'm done pestering you guys about it unless someone else response.. Seems kind of close to a solution..but..I'm sure I'm missing something simple... Thanks for your help cremes.devlist at mac.com :) it kept me thinking this far Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] Sent: Friday, May 12, 2006 10:43 AM To: Chirb discussion list Subject: Re: [Chirb] ROR question, legacy db sequence generation I just took a look at activerecord-1.14.2/lib/active_record/base.rb and found the method #define_attr_method. It's involved with the whole #set_primary_key shenanigans. It aliases the original accessors when you call #set_primary_key so the original primary_key is still around under the new accessor #original_primary_key. Try changing #id= to: def id=(value) original_primary_key = 5000 end The ActiveRecord stuff looks really complicated so I'm probably wrong. But it doesn't hurt to try... cr On May 12, 2006, at 8:54 AM, Stowe, Nola wrote: > That's what I was trying, not sure if this is correct.. : > > > class ContactPerson < ActiveRecord::Base > set_table_name "contacts" > set_primary_key "c_key" > > def id=(value) > write_attribute(self.class.primary_key, 50000) > end > End > > > Just for a test, I tried to just set the key as 50000, I figured if > that worked then I can add the code to retrieve the value ... But it > doesn't seem to work. > > I went to the console, created a new object, added a few values, > saved.. > Checked.. And it didn't have the key 50000 > > > -----Original Message----- > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > Sent: Friday, May 12, 2006 8:05 AM > To: Chirb discussion list > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > I don't know if you've tried this, so I apologize if I'm stating the > obvious. (I just read this last night so it is very fresh in my mind.) > > If you have the Agile Rails book, take a peek at page 207. It > describes how you can override AR's primary key behavior by using > #set_primary_key to use your own field. AR then gives up any pretense > of managing the primary key and leaves it up to you to set yourself. > > I haven't tried it (or looked at the code), but I imagine you could > override #id= in your model subclass and wrap up all this funky logic > in the new method. That way your model code would remain DRY. > > Or maybe this is all completely wrong. :-) > > cr > > On May 11, 2006, at 4:16 PM, Stowe, Nola wrote: > >> I am in the process of converting a php site, which uses PEAR DB's >> sequence structure to fake the native MySQL autoincrement >> (supposedly, then I could port my code to any database without >> worrying that feature). Its not really fesible at this point to go >> back to autoincrement, although some tables created by another >> developer ignore our policy of using PEAR DB and did autoincrement >> anyways. >> Grrrr - no more donuts for him) >> >> What PEAR DB does is this. Say I have a table "contacts". It creates >> a table contacts_seq which contains just one field. When I need to >> insert a new record into the database, first I do this >> >> $next_id = $db->nextID("contacts"); // retrieves value in >> contacts_seq, increments and saves new id back to contacts_seq >> >> Then use that in my sql to insert my record in another db. Lovely, >> huh? >> >> >> Is there some way I could override the id method? I've poked around >> and tried a few things, but it looks like rails just totally leaves >> that up to the database. I've googled for the past few hours and >> can't find anything that really says either way. _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> From erik.bryn at gmail.com Fri May 12 13:26:38 2006 From: erik.bryn at gmail.com (Erik Bryn) Date: Fri, 12 May 2006 12:26:38 -0500 Subject: [Chirb] ROR question, legacy db sequence generation In-Reply-To: References: Message-ID: <33f2e0550605121026k2118d600gede8df40035f4b1f@mail.gmail.com> Try: class Contact < ActiveRecord::Base set_table_name "contact_person" set_primary_key "p_key" def id #insert code to determine id here 50000 end end I've been reading source code and that seems like it would work. - Erik On 5/12/06, Stowe, Nola wrote: > Well.. I have this: > > class Contact < ActiveRecord::Base > set_table_name "contact_person" > set_primary_key "p_key" > > # following example: > http://railsmanual.org/class/ActiveRecord::Base/define_attr_method > define_attr_method(:p_key) do > p_key > end > > def p_key > get_next_id > end > > def get_next_id > 50000 > end > > end > > I can do in console > > p = Contact.new > p.get_next_id > => 50000 > p.p_key > => 50000 > > But if I just do > p = Contact.new > p.save > > I get an error about the primary key being set to 0. > > > I'm done pestering you guys about it unless someone else response.. Seems > kind of close to a solution..but..I'm sure I'm missing something simple... > > Thanks for your help cremes.devlist at mac.com :) it kept me thinking this far > > > > Nola J. Stowe > Systems Programmer > Thornton Tomasetti > 14 E. Jackson Boulevard, Suite 1100 > Chicago, IL 60604 > T 312.596.2000 F 312.596.2001 > D 312.596.2248 > NStowe at ThorntonTomasetti.com > > > > -----Original Message----- > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > Sent: Friday, May 12, 2006 10:43 AM > To: Chirb discussion list > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > I just took a look at activerecord-1.14.2/lib/active_record/base.rb > and found the method #define_attr_method. It's involved with the whole > #set_primary_key shenanigans. > > It aliases the original accessors when you call #set_primary_key so the > original primary_key is still around under the new accessor > #original_primary_key. > > Try changing #id= to: > > def id=(value) > original_primary_key = 5000 > end > > The ActiveRecord stuff looks really complicated so I'm probably wrong. But > it doesn't hurt to try... > > cr > > On May 12, 2006, at 8:54 AM, Stowe, Nola wrote: > > > That's what I was trying, not sure if this is correct.. : > > > > > > class ContactPerson < ActiveRecord::Base > > set_table_name "contacts" > > set_primary_key "c_key" > > > > def id=(value) > > write_attribute(self.class.primary_key, 50000) > > end > > End > > > > > > Just for a test, I tried to just set the key as 50000, I figured if > > that worked then I can add the code to retrieve the value ... But it > > doesn't seem to work. > > > > I went to the console, created a new object, added a few values, > > saved.. > > Checked.. And it didn't have the key 50000 > > > > > > -----Original Message----- > > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > > Sent: Friday, May 12, 2006 8:05 AM > > To: Chirb discussion list > > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > > > I don't know if you've tried this, so I apologize if I'm stating the > > obvious. (I just read this last night so it is very fresh in my mind.) > > > > If you have the Agile Rails book, take a peek at page 207. It > > describes how you can override AR's primary key behavior by using > > #set_primary_key to use your own field. AR then gives up any pretense > > of managing the primary key and leaves it up to you to set yourself. > > > > I haven't tried it (or looked at the code), but I imagine you could > > override #id= in your model subclass and wrap up all this funky logic > > in the new method. That way your model code would remain DRY. > > > > Or maybe this is all completely wrong. :-) > > > > cr > > > > On May 11, 2006, at 4:16 PM, Stowe, Nola wrote: > > > >> I am in the process of converting a php site, which uses PEAR DB's > >> sequence structure to fake the native MySQL autoincrement > >> (supposedly, then I could port my code to any database without > >> worrying that feature). Its not really fesible at this point to go > >> back to autoincrement, although some tables created by another > >> developer ignore our policy of using PEAR DB and did autoincrement > >> anyways. > >> Grrrr - no more donuts for him) > >> > >> What PEAR DB does is this. Say I have a table "contacts". It creates > >> a table contacts_seq which contains just one field. When I need to > >> insert a new record into the database, first I do this > >> > >> $next_id = $db->nextID("contacts"); // retrieves value in > >> contacts_seq, increments and saves new id back to contacts_seq > >> > >> Then use that in my sql to insert my record in another db. Lovely, > >> huh? > >> > >> > >> Is there some way I could override the id method? I've poked around > >> and tried a few things, but it looks like rails just totally leaves > >> that up to the database. I've googled for the past few hours and > >> can't find anything that really says either way. > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > The information in this email and any attachments may contain > confidential information that is intended solely for the > attention and use of the named addressee(s). This message or > any part thereof must not be disclosed, copied, distributed or > retained by any person without authorization from the addressee. > If you are not the intended addressee, please notify the sender > immediately, and delete this message. > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > From erik.bryn at gmail.com Fri May 12 14:08:51 2006 From: erik.bryn at gmail.com (Erik Bryn) Date: Fri, 12 May 2006 13:08:51 -0500 Subject: [Chirb] ROR question, legacy db sequence generation In-Reply-To: References: Message-ID: <33f2e0550605121108k3f95ad8ew3a0d1352e224cfdf@mail.gmail.com> OK, ignore my earlier response... that obviously doesn't work now that I actually tested the code first. What I believe you have to do is overload the save method. The strategy is to set the id attribute before the save. Here is code that I've tested and works great: class Contact < ActiveRecord::Base set_primary_key "p_key" def save self.id = 50000 # insert the code to determine the next id here super # this calls the actual save method end end - Erik On 5/12/06, Stowe, Nola wrote: > Well.. I have this: > > class Contact < ActiveRecord::Base > set_table_name "contact_person" > set_primary_key "p_key" > > # following example: > http://railsmanual.org/class/ActiveRecord::Base/define_attr_method > define_attr_method(:p_key) do > p_key > end > > def p_key > get_next_id > end > > def get_next_id > 50000 > end > > end > > I can do in console > > p = Contact.new > p.get_next_id > => 50000 > p.p_key > => 50000 > > But if I just do > p = Contact.new > p.save > > I get an error about the primary key being set to 0. > > > I'm done pestering you guys about it unless someone else response.. Seems > kind of close to a solution..but..I'm sure I'm missing something simple... > > Thanks for your help cremes.devlist at mac.com :) it kept me thinking this far > > > > Nola J. Stowe > Systems Programmer > Thornton Tomasetti > 14 E. Jackson Boulevard, Suite 1100 > Chicago, IL 60604 > T 312.596.2000 F 312.596.2001 > D 312.596.2248 > NStowe at ThorntonTomasetti.com > > > > -----Original Message----- > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > Sent: Friday, May 12, 2006 10:43 AM > To: Chirb discussion list > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > I just took a look at activerecord-1.14.2/lib/active_record/base.rb > and found the method #define_attr_method. It's involved with the whole > #set_primary_key shenanigans. > > It aliases the original accessors when you call #set_primary_key so the > original primary_key is still around under the new accessor > #original_primary_key. > > Try changing #id= to: > > def id=(value) > original_primary_key = 5000 > end > > The ActiveRecord stuff looks really complicated so I'm probably wrong. But > it doesn't hurt to try... > > cr > > On May 12, 2006, at 8:54 AM, Stowe, Nola wrote: > > > That's what I was trying, not sure if this is correct.. : > > > > > > class ContactPerson < ActiveRecord::Base > > set_table_name "contacts" > > set_primary_key "c_key" > > > > def id=(value) > > write_attribute(self.class.primary_key, 50000) > > end > > End > > > > > > Just for a test, I tried to just set the key as 50000, I figured if > > that worked then I can add the code to retrieve the value ... But it > > doesn't seem to work. > > > > I went to the console, created a new object, added a few values, > > saved.. > > Checked.. And it didn't have the key 50000 > > > > > > -----Original Message----- > > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > > Sent: Friday, May 12, 2006 8:05 AM > > To: Chirb discussion list > > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > > > I don't know if you've tried this, so I apologize if I'm stating the > > obvious. (I just read this last night so it is very fresh in my mind.) > > > > If you have the Agile Rails book, take a peek at page 207. It > > describes how you can override AR's primary key behavior by using > > #set_primary_key to use your own field. AR then gives up any pretense > > of managing the primary key and leaves it up to you to set yourself. > > > > I haven't tried it (or looked at the code), but I imagine you could > > override #id= in your model subclass and wrap up all this funky logic > > in the new method. That way your model code would remain DRY. > > > > Or maybe this is all completely wrong. :-) > > > > cr > > > > On May 11, 2006, at 4:16 PM, Stowe, Nola wrote: > > > >> I am in the process of converting a php site, which uses PEAR DB's > >> sequence structure to fake the native MySQL autoincrement > >> (supposedly, then I could port my code to any database without > >> worrying that feature). Its not really fesible at this point to go > >> back to autoincrement, although some tables created by another > >> developer ignore our policy of using PEAR DB and did autoincrement > >> anyways. > >> Grrrr - no more donuts for him) > >> > >> What PEAR DB does is this. Say I have a table "contacts". It creates > >> a table contacts_seq which contains just one field. When I need to > >> insert a new record into the database, first I do this > >> > >> $next_id = $db->nextID("contacts"); // retrieves value in > >> contacts_seq, increments and saves new id back to contacts_seq > >> > >> Then use that in my sql to insert my record in another db. Lovely, > >> huh? > >> > >> > >> Is there some way I could override the id method? I've poked around > >> and tried a few things, but it looks like rails just totally leaves > >> that up to the database. I've googled for the past few hours and > >> can't find anything that really says either way. > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > The information in this email and any attachments may contain > confidential information that is intended solely for the > attention and use of the named addressee(s). This message or > any part thereof must not be disclosed, copied, distributed or > retained by any person without authorization from the addressee. > If you are not the intended addressee, please notify the sender > immediately, and delete this message. > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > From erik.bryn at gmail.com Fri May 12 14:11:44 2006 From: erik.bryn at gmail.com (Erik Bryn) Date: Fri, 12 May 2006 13:11:44 -0500 Subject: [Chirb] ROR question, legacy db sequence generation In-Reply-To: <33f2e0550605121108k3f95ad8ew3a0d1352e224cfdf@mail.gmail.com> References: <33f2e0550605121108k3f95ad8ew3a0d1352e224cfdf@mail.gmail.com> Message-ID: <33f2e0550605121111g60293e19iaebbb3ffbde67e0c@mail.gmail.com> Arrgh, to make that method safe for updates make sure you check that self.id.nil? is true. - Erik On 5/12/06, Erik Bryn wrote: > OK, ignore my earlier response... that obviously doesn't work now that > I actually tested the code first. > > What I believe you have to do is overload the save method. The > strategy is to set the id attribute before the save. Here is code that > I've tested and works great: > > class Contact < ActiveRecord::Base > set_primary_key "p_key" > > def save > self.id = 50000 # insert the code to determine the next id here > super # this calls the actual save method > end > end > > - Erik > > On 5/12/06, Stowe, Nola wrote: > > Well.. I have this: > > > > class Contact < ActiveRecord::Base > > set_table_name "contact_person" > > set_primary_key "p_key" > > > > # following example: > > http://railsmanual.org/class/ActiveRecord::Base/define_attr_method > > define_attr_method(:p_key) do > > p_key > > end > > > > def p_key > > get_next_id > > end > > > > def get_next_id > > 50000 > > end > > > > end > > > > I can do in console > > > > p = Contact.new > > p.get_next_id > > => 50000 > > p.p_key > > => 50000 > > > > But if I just do > > p = Contact.new > > p.save > > > > I get an error about the primary key being set to 0. > > > > > > I'm done pestering you guys about it unless someone else response.. Seems > > kind of close to a solution..but..I'm sure I'm missing something simple... > > > > Thanks for your help cremes.devlist at mac.com :) it kept me thinking this far > > > > > > > > Nola J. Stowe > > Systems Programmer > > Thornton Tomasetti > > 14 E. Jackson Boulevard, Suite 1100 > > Chicago, IL 60604 > > T 312.596.2000 F 312.596.2001 > > D 312.596.2248 > > NStowe at ThorntonTomasetti.com > > > > > > > > -----Original Message----- > > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > > Sent: Friday, May 12, 2006 10:43 AM > > To: Chirb discussion list > > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > > > I just took a look at activerecord-1.14.2/lib/active_record/base.rb > > and found the method #define_attr_method. It's involved with the whole > > #set_primary_key shenanigans. > > > > It aliases the original accessors when you call #set_primary_key so the > > original primary_key is still around under the new accessor > > #original_primary_key. > > > > Try changing #id= to: > > > > def id=(value) > > original_primary_key = 5000 > > end > > > > The ActiveRecord stuff looks really complicated so I'm probably wrong. But > > it doesn't hurt to try... > > > > cr > > > > On May 12, 2006, at 8:54 AM, Stowe, Nola wrote: > > > > > That's what I was trying, not sure if this is correct.. : > > > > > > > > > class ContactPerson < ActiveRecord::Base > > > set_table_name "contacts" > > > set_primary_key "c_key" > > > > > > def id=(value) > > > write_attribute(self.class.primary_key, 50000) > > > end > > > End > > > > > > > > > Just for a test, I tried to just set the key as 50000, I figured if > > > that worked then I can add the code to retrieve the value ... But it > > > doesn't seem to work. > > > > > > I went to the console, created a new object, added a few values, > > > saved.. > > > Checked.. And it didn't have the key 50000 > > > > > > > > > -----Original Message----- > > > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > > > Sent: Friday, May 12, 2006 8:05 AM > > > To: Chirb discussion list > > > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > > > > > I don't know if you've tried this, so I apologize if I'm stating the > > > obvious. (I just read this last night so it is very fresh in my mind.) > > > > > > If you have the Agile Rails book, take a peek at page 207. It > > > describes how you can override AR's primary key behavior by using > > > #set_primary_key to use your own field. AR then gives up any pretense > > > of managing the primary key and leaves it up to you to set yourself. > > > > > > I haven't tried it (or looked at the code), but I imagine you could > > > override #id= in your model subclass and wrap up all this funky logic > > > in the new method. That way your model code would remain DRY. > > > > > > Or maybe this is all completely wrong. :-) > > > > > > cr > > > > > > On May 11, 2006, at 4:16 PM, Stowe, Nola wrote: > > > > > >> I am in the process of converting a php site, which uses PEAR DB's > > >> sequence structure to fake the native MySQL autoincrement > > >> (supposedly, then I could port my code to any database without > > >> worrying that feature). Its not really fesible at this point to go > > >> back to autoincrement, although some tables created by another > > >> developer ignore our policy of using PEAR DB and did autoincrement > > >> anyways. > > >> Grrrr - no more donuts for him) > > >> > > >> What PEAR DB does is this. Say I have a table "contacts". It creates > > >> a table contacts_seq which contains just one field. When I need to > > >> insert a new record into the database, first I do this > > >> > > >> $next_id = $db->nextID("contacts"); // retrieves value in > > >> contacts_seq, increments and saves new id back to contacts_seq > > >> > > >> Then use that in my sql to insert my record in another db. Lovely, > > >> huh? > > >> > > >> > > >> Is there some way I could override the id method? I've poked around > > >> and tried a few things, but it looks like rails just totally leaves > > >> that up to the database. I've googled for the past few hours and > > >> can't find anything that really says either way. > > _______________________________________________ > > ChicagoGroup-Members-List at rubyforge.org > > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > > > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > > The information in this email and any attachments may contain > > confidential information that is intended solely for the > > attention and use of the named addressee(s). This message or > > any part thereof must not be disclosed, copied, distributed or > > retained by any person without authorization from the addressee. > > If you are not the intended addressee, please notify the sender > > immediately, and delete this message. > > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > > _______________________________________________ > > ChicagoGroup-Members-List at rubyforge.org > > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > > From NStowe at ThorntonTomasetti.com Fri May 12 14:23:58 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Fri, 12 May 2006 13:23:58 -0500 Subject: [Chirb] ROR question, legacy db sequence generation Message-ID: Hey that works.. Cept I used the @new_record def save if @new_record self.id = get_next_id end super end Now I'll write a real test ... Thanks Erik! Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: Erik Bryn [mailto:erik.bryn at gmail.com] Sent: Friday, May 12, 2006 1:12 PM To: Chirb discussion list Subject: Re: [Chirb] ROR question, legacy db sequence generation Arrgh, to make that method safe for updates make sure you check that self.id.nil? is true. - Erik On 5/12/06, Erik Bryn wrote: > OK, ignore my earlier response... that obviously doesn't work now that > I actually tested the code first. > > What I believe you have to do is overload the save method. The > strategy is to set the id attribute before the save. Here is code that > I've tested and works great: > > class Contact < ActiveRecord::Base > set_primary_key "p_key" > > def save > self.id = 50000 # insert the code to determine the next id here > super # this calls the actual save method > end > end > > - Erik > > On 5/12/06, Stowe, Nola wrote: > > Well.. I have this: > > > > class Contact < ActiveRecord::Base > > set_table_name "contact_person" > > set_primary_key "p_key" > > > > # following example: > > http://railsmanual.org/class/ActiveRecord::Base/define_attr_method > > define_attr_method(:p_key) do > > p_key > > end > > > > def p_key > > get_next_id > > end > > > > def get_next_id > > 50000 > > end > > > > end > > > > I can do in console > > > > p = Contact.new > > p.get_next_id > > => 50000 > > p.p_key > > => 50000 > > > > But if I just do > > p = Contact.new > > p.save > > > > I get an error about the primary key being set to 0. > > > > > > I'm done pestering you guys about it unless someone else response.. > > Seems kind of close to a solution..but..I'm sure I'm missing something simple... > > > > Thanks for your help cremes.devlist at mac.com :) it kept me thinking > > this far > > > > > > > > Nola J. Stowe > > Systems Programmer > > Thornton Tomasetti > > 14 E. Jackson Boulevard, Suite 1100 > > Chicago, IL 60604 > > T 312.596.2000 F 312.596.2001 > > D 312.596.2248 > > NStowe at ThorntonTomasetti.com > > > > > > > > -----Original Message----- > > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > > Sent: Friday, May 12, 2006 10:43 AM > > To: Chirb discussion list > > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > > > I just took a look at activerecord-1.14.2/lib/active_record/base.rb > > and found the method #define_attr_method. It's involved with the > > whole #set_primary_key shenanigans. > > > > It aliases the original accessors when you call #set_primary_key so > > the original primary_key is still around under the new accessor > > #original_primary_key. > > > > Try changing #id= to: > > > > def id=(value) > > original_primary_key = 5000 > > end > > > > The ActiveRecord stuff looks really complicated so I'm probably > > wrong. But it doesn't hurt to try... > > > > cr > > > > On May 12, 2006, at 8:54 AM, Stowe, Nola wrote: > > > > > That's what I was trying, not sure if this is correct.. : > > > > > > > > > class ContactPerson < ActiveRecord::Base > > > set_table_name "contacts" > > > set_primary_key "c_key" > > > > > > def id=(value) > > > write_attribute(self.class.primary_key, 50000) > > > end > > > End > > > > > > > > > Just for a test, I tried to just set the key as 50000, I figured > > > if that worked then I can add the code to retrieve the value ... > > > But it doesn't seem to work. > > > > > > I went to the console, created a new object, added a few values, > > > saved.. > > > Checked.. And it didn't have the key 50000 > > > > > > > > > -----Original Message----- > > > From: cremes.devlist at mac.com [mailto:cremes.devlist at mac.com] > > > Sent: Friday, May 12, 2006 8:05 AM > > > To: Chirb discussion list > > > Subject: Re: [Chirb] ROR question, legacy db sequence generation > > > > > > I don't know if you've tried this, so I apologize if I'm stating > > > the obvious. (I just read this last night so it is very fresh in > > > my mind.) > > > > > > If you have the Agile Rails book, take a peek at page 207. It > > > describes how you can override AR's primary key behavior by using > > > #set_primary_key to use your own field. AR then gives up any > > > pretense of managing the primary key and leaves it up to you to set yourself. > > > > > > I haven't tried it (or looked at the code), but I imagine you > > > could override #id= in your model subclass and wrap up all this > > > funky logic in the new method. That way your model code would remain DRY. > > > > > > Or maybe this is all completely wrong. :-) > > > > > > cr > > > > > > On May 11, 2006, at 4:16 PM, Stowe, Nola wrote: > > > > > >> I am in the process of converting a php site, which uses PEAR > > >> DB's sequence structure to fake the native MySQL autoincrement > > >> (supposedly, then I could port my code to any database without > > >> worrying that feature). Its not really fesible at this point to > > >> go back to autoincrement, although some tables created by another > > >> developer ignore our policy of using PEAR DB and did > > >> autoincrement anyways. > > >> Grrrr - no more donuts for him) > > >> > > >> What PEAR DB does is this. Say I have a table "contacts". It > > >> creates a table contacts_seq which contains just one field. When > > >> I need to insert a new record into the database, first I do this > > >> > > >> $next_id = $db->nextID("contacts"); // retrieves value in > > >> contacts_seq, increments and saves new id back to contacts_seq > > >> > > >> Then use that in my sql to insert my record in another db. > > >> Lovely, huh? > > >> > > >> > > >> Is there some way I could override the id method? I've poked > > >> around and tried a few things, but it looks like rails just > > >> totally leaves that up to the database. I've googled for the past > > >> few hours and can't find anything that really says either way. > > _______________________________________________ > > ChicagoGroup-Members-List at rubyforge.org > > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > > > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > > The information in this email and any attachments may contain > > confidential information that is intended solely for the attention > > and use of the named addressee(s). This message or any part thereof > > must not be disclosed, copied, distributed or retained by any person > > without authorization from the addressee. > > If you are not the intended addressee, please notify the sender > > immediately, and delete this message. > > <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> > > _______________________________________________ > > ChicagoGroup-Members-List at rubyforge.org > > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > > _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> From jim at weirichhouse.org Fri May 12 14:55:28 2006 From: jim at weirichhouse.org (Jim Weirich) Date: Fri, 12 May 2006 14:55:28 -0400 Subject: [Chirb] ROR question, legacy db sequence generation In-Reply-To: References: Message-ID: <4464DA20.3050504@weirichhouse.org> Stowe, Nola wrote: > > Hey that works.. Cept I used the @new_record > > def save > if @new_record > self.id = get_next_id > end > super > end Would it be better to use a before_create hook? E.g. def before_create self.id = get_next_id end No need to call super and it checks the create/update thang for you. This is untested, but I do something very similar in Ruse to hashify passwords before saving. -- -- Jim Weirich jweirich at one.net http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From NStowe at ThorntonTomasetti.com Fri May 12 15:00:18 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Fri, 12 May 2006 14:00:18 -0500 Subject: [Chirb] ROR question, legacy db sequence generation Message-ID: Thanks Jim! See.. I knew there had to be some nifty cool hook somewhere.. :) Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: Jim Weirich [mailto:jim at weirichhouse.org] Sent: Friday, May 12, 2006 1:55 PM To: Chirb discussion list Subject: Re: [Chirb] ROR question, legacy db sequence generation Stowe, Nola wrote: > > Hey that works.. Cept I used the @new_record > > def save > if @new_record > self.id = get_next_id > end > super > end Would it be better to use a before_create hook? E.g. def before_create self.id = get_next_id end No need to call super and it checks the create/update thang for you. This is untested, but I do something very similar in Ruse to hashify passwords before saving. -- -- Jim Weirich jweirich at one.net http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> From NStowe at ThorntonTomasetti.com Fri May 12 15:25:17 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Fri, 12 May 2006 14:25:17 -0500 Subject: [Chirb] ROR question, legacy db sequence generation Message-ID: Doh ... I looked on the Rails Recipies sites... Guess I missed this page http://fora.pragprog.com/rails-recipes/users/show/56 Looks like another way to handle custom sequences. I turned off the pluralize .. But when I run my unit test its looking for the plurialized verison of the name... :/ Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: Stowe, Nola [mailto:NStowe at thorntontomasetti.com] Sent: Friday, May 12, 2006 2:00 PM To: Chirb discussion list Subject: Re: [Chirb] ROR question, legacy db sequence generation Thanks Jim! See.. I knew there had to be some nifty cool hook somewhere.. :) Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: Jim Weirich [mailto:jim at weirichhouse.org] Sent: Friday, May 12, 2006 1:55 PM To: Chirb discussion list Subject: Re: [Chirb] ROR question, legacy db sequence generation Stowe, Nola wrote: > > Hey that works.. Cept I used the @new_record > > def save > if @new_record > self.id = get_next_id > end > super > end Would it be better to use a before_create hook? E.g. def before_create self.id = get_next_id end No need to call super and it checks the create/update thang for you. This is untested, but I do something very similar in Ruse to hashify passwords before saving. -- -- Jim Weirich jweirich at one.net http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> From NStowe at ThorntonTomasetti.com Fri May 12 15:31:54 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Fri, 12 May 2006 14:31:54 -0500 Subject: [Chirb] ROR question, legacy db sequence generation Message-ID: Sorry, link didn't work like I thought: Here's the link, near the bottom: Using legacy databases http://fora.pragprog.com/rails-recipes/write-your-own/post/42 Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: Stowe, Nola [mailto:NStowe at thorntontomasetti.com] Sent: Friday, May 12, 2006 2:25 PM To: Chirb discussion list Subject: Re: [Chirb] ROR question, legacy db sequence generation Doh ... I looked on the Rails Recipies sites... Guess I missed this page http://fora.pragprog.com/rails-recipes/users/show/56 Looks like another way to handle custom sequences. I turned off the pluralize .. But when I run my unit test its looking for the plurialized verison of the name... :/ Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: Stowe, Nola [mailto:NStowe at thorntontomasetti.com] Sent: Friday, May 12, 2006 2:00 PM To: Chirb discussion list Subject: Re: [Chirb] ROR question, legacy db sequence generation Thanks Jim! See.. I knew there had to be some nifty cool hook somewhere.. :) Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com -----Original Message----- From: Jim Weirich [mailto:jim at weirichhouse.org] Sent: Friday, May 12, 2006 1:55 PM To: Chirb discussion list Subject: Re: [Chirb] ROR question, legacy db sequence generation Stowe, Nola wrote: > > Hey that works.. Cept I used the @new_record > > def save > if @new_record > self.id = get_next_id > end > super > end Would it be better to use a before_create hook? E.g. def before_create self.id = get_next_id end No need to call super and it checks the create/update thang for you. This is untested, but I do something very similar in Ruse to hashify passwords before saving. -- -- Jim Weirich jweirich at one.net http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> From ryan at platte.name Tue May 16 21:48:46 2006 From: ryan at platte.name (Ryan Platte) Date: Tue, 16 May 2006 20:48:46 -0500 Subject: [Chirb] Fwd: Starting a Milwaukee Ruby Users Group In-Reply-To: References: Message-ID: <2f1a1dcb0605161848o24ba96d8k77842ab45bc187ba@mail.gmail.com> I'll tell him it helps if there's a huge agile consultancy in town that decides to champion the cause. ;-) Seriously, if any of you are near Milwaukee or know a Ruby fan who is, please get in touch with D. J. and help Milwaukee.rb get rolling! ---------- Forwarded message ---------- From: D.J. Vogel Date: May 15, 2006 7:56 PM Subject: Starting a Milwaukee Ruby Users Group Do you have anyone in your group from the greater Milwaukee Area that would be interested in a Milwaukee Ruby Users Group? We're starting up a group here and our first meeting will likely be around the June 1. Please feel free to pass the information on to anyone in the area let me know if you have any tips that you've learned with starting up your local group. Our temporary site is http://ruby.georgey.org. Thanks! D.J. Vogel -- Ryan Platte From cremes.devlist at mac.com Tue May 16 23:02:16 2006 From: cremes.devlist at mac.com (cremes.devlist at mac.com) Date: Tue, 16 May 2006 22:02:16 -0500 Subject: [Chirb] June meeting topic? Message-ID: <26174FAF-AE1E-4C89-B56A-65F6CD80AFF2@mac.com> Do we have a set topic for the June meeting yet? If not, I have a few suggestions. 1. BackgrounDRb - a new framework for creating an application-wide context within Rails. Also really useful for spawning background worker threads within Rails that provide a simple facility for communicating progress back to your controllers. See it here [1]. 2. RSpec - Behavior Driven Development (BDD) as the successor to Test Driven Development (TDD). 3. TDD - a quick run through of the core concepts of Test Driven Development and how it can help a programmer "evolve" a design from a blank page to a full blown set of classes (and tests!). Personally, nothing is scarier than a blinking cursor in a blank window waiting for code & tests. :-) 4. Idioms - one of the most pleasurable discoveries I had when I began learning Ruby was its propensity to jettison old concepts like for/do for object.each enumeration. There are tons of other examples that make Ruby interesting yet at the same time somewhat unapproachable for those of us with a lot of background in less dynamic languages (like C). I know a lot of this stuff is 30 years old (from the Smalltalk legacy) but it's still worthwhile to introduce it to us newbies. Well, those are my ideas. I'd be happy to teach any one of them if the audience is satisfied with a speaker who invents things on the spot to cover up his gaps in knowledge (I used to be a manager, so I'm good at this). cr [1] http://brainspl.at/articles/2006/05/15/backgoundrb-initial-release From peter at oaktop.com Wed May 17 00:10:38 2006 From: peter at oaktop.com (Peter K Chan) Date: Wed, 17 May 2006 00:10:38 -0400 Subject: [Chirb] June meeting topic? Message-ID: Hi Chris, Great ideas! I would especially like to second the fourth item - Idioms. There is nothing more pleasurable to me than replacing a 5 lines construct in Java with a half-line Ruby code (think var ||= "default"). If we don't already have a topic/speaker lined up, I would love to hear more about that. Thanks, Peter -----Original Message----- From: chicagogroup-members-list-bounces at rubyforge.org [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of cremes.devlist at mac.com Sent: Tuesday, May 16, 2006 10:02 PM To: Chirb discussion list Subject: [Chirb] June meeting topic? Do we have a set topic for the June meeting yet? If not, I have a few suggestions. 1. BackgrounDRb - a new framework for creating an application-wide context within Rails. Also really useful for spawning background worker threads within Rails that provide a simple facility for communicating progress back to your controllers. See it here [1]. 2. RSpec - Behavior Driven Development (BDD) as the successor to Test Driven Development (TDD). 3. TDD - a quick run through of the core concepts of Test Driven Development and how it can help a programmer "evolve" a design from a blank page to a full blown set of classes (and tests!). Personally, nothing is scarier than a blinking cursor in a blank window waiting for code & tests. :-) 4. Idioms - one of the most pleasurable discoveries I had when I began learning Ruby was its propensity to jettison old concepts like for/do for object.each enumeration. There are tons of other examples that make Ruby interesting yet at the same time somewhat unapproachable for those of us with a lot of background in less dynamic languages (like C). I know a lot of this stuff is 30 years old (from the Smalltalk legacy) but it's still worthwhile to introduce it to us newbies. Well, those are my ideas. I'd be happy to teach any one of them if the audience is satisfied with a speaker who invents things on the spot to cover up his gaps in knowledge (I used to be a manager, so I'm good at this). cr [1] http://brainspl.at/articles/2006/05/15/backgoundrb-initial-release _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list From hubrix at hubrix.com Wed May 17 01:40:45 2006 From: hubrix at hubrix.com (Mark Alexander Friedgan) Date: Wed, 17 May 2006 00:40:45 -0500 Subject: [Chirb] June meeting topic? In-Reply-To: References: Message-ID: My favorite is "fork and exit" On 5/16/06, Peter K Chan wrote: > > Hi Chris, > Great ideas! I would especially like to second the fourth item - > Idioms. There is nothing more pleasurable to me than replacing a 5 lines > construct in Java with a half-line Ruby code (think var ||= "default"). > > If we don't already have a topic/speaker lined up, I would love > to hear more about that. > > Thanks, > > Peter > > -----Original Message----- > From: chicagogroup-members-list-bounces at rubyforge.org > [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of > cremes.devlist at mac.com > Sent: Tuesday, May 16, 2006 10:02 PM > To: Chirb discussion list > Subject: [Chirb] June meeting topic? > > Do we have a set topic for the June meeting yet? > > If not, I have a few suggestions. > > 1. BackgrounDRb - a new framework for creating an application-wide > context within Rails. Also really useful for spawning background > worker threads within Rails that provide a simple facility for > communicating progress back to your controllers. See it here [1]. > > 2. RSpec - Behavior Driven Development (BDD) as the successor to Test > Driven Development (TDD). > > 3. TDD - a quick run through of the core concepts of Test Driven > Development and how it can help a programmer "evolve" a design from a > blank page to a full blown set of classes (and tests!). Personally, > nothing is scarier than a blinking cursor in a blank window waiting > for code & tests. :-) > > 4. Idioms - one of the most pleasurable discoveries I had when I > began learning Ruby was its propensity to jettison old concepts like > for/do for object.each enumeration. There are tons of other examples > that make Ruby interesting yet at the same time somewhat > unapproachable for those of us with a lot of background in less > dynamic languages (like C). I know a lot of this stuff is 30 years > old (from the Smalltalk legacy) but it's still worthwhile to > introduce it to us newbies. > > Well, those are my ideas. I'd be happy to teach any one of them if > the audience is satisfied with a speaker who invents things on the > spot to cover up his gaps in knowledge (I used to be a manager, so > I'm good at this). > > cr > > [1] http://brainspl.at/articles/2006/05/15/backgoundrb-initial-release > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/chicagogroup-members-list/attachments/20060517/c95073e2/attachment-0001.htm From peter at oaktop.com Wed May 17 11:14:28 2006 From: peter at oaktop.com (Peter K Chan) Date: Wed, 17 May 2006 11:14:28 -0400 Subject: [Chirb] June meeting topic? Message-ID: Hi Mark, That's a nice one too. Here is a page with more Ruby idioms: http://wiki.rubygarden.org/Ruby/page/show/RubyIdioms Peter ________________________________________ From: chicagogroup-members-list-bounces at rubyforge.org [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of Mark Alexander Friedgan Sent: Wednesday, May 17, 2006 12:41 AM To: Chirb discussion list Subject: Re: [Chirb] June meeting topic? My favorite is "fork and exit" On 5/16/06, Peter K Chan wrote: Hi Chris, ????????Great ideas! I would especially like to second the fourth item - Idioms. There is nothing more pleasurable to me than replacing a 5 lines construct in Java with a half-line Ruby code (think var ||= "default"). ????????If we don't already have a topic/speaker lined up, I would love to hear more about that. Thanks, Peter -----Original Message----- From: chicagogroup-members-list-bounces at rubyforge.org [mailto: chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of cremes.devlist at mac.com Sent: Tuesday, May 16, 2006 10:02 PM To: Chirb discussion list Subject: [Chirb] June meeting topic? Do we have a set topic for the June meeting yet? If not, I have a few suggestions. 1. BackgrounDRb - a new framework for creating an application-wide context within Rails. Also really useful for spawning background worker threads within Rails that provide a simple facility for communicating progress back to your controllers. See it here [1]. 2. RSpec - Behavior Driven Development (BDD) as the successor to Test Driven Development (TDD). 3. TDD - a quick run through of the core concepts of Test Driven Development and how it can help a programmer "evolve" a design from a blank page to a full blown set of classes (and tests!). Personally, nothing is scarier than a blinking cursor in a blank window waiting for code & tests. :-) 4. Idioms - one of the most pleasurable discoveries I had when I began learning Ruby was its propensity to jettison old concepts like for/do for object.each enumeration. There are tons of other examples that make Ruby interesting yet at the same time somewhat unapproachable for those of us with a lot of background in less dynamic languages (like C). I know a lot of this stuff is 30 years old (from the Smalltalk legacy) but it's still worthwhile to introduce it to us newbies. Well, those are my ideas. I'd be happy to teach any one of them if the audience is satisfied with a speaker who invents things on the spot to cover up his gaps in knowledge (I used to be a manager, so I'm good at this). cr [1] http://brainspl.at/articles/2006/05/15/backgoundrb-initial-release _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list From hubrix at hubrix.com Wed May 17 11:56:09 2006 From: hubrix at hubrix.com (Mark Alexander Friedgan) Date: Wed, 17 May 2006 10:56:09 -0500 Subject: [Chirb] Embedding rails apps in other rails apps Message-ID: Has anyone had experience embedding a rails app into another railsapp. In particularI am considering how difficult it would be to embed mailr and instikiinto an existing app. I don't think I am looking for super tight integration but I washoping to share authenticationinformation between the three, but perhaps keep separate databases for them. Any ideas, suggestions? Mark From jbreen at centerpost.com Wed May 17 17:49:34 2006 From: jbreen at centerpost.com (Jim Breen) Date: Wed, 17 May 2006 16:49:34 -0500 Subject: [Chirb] June meeting topic? Message-ID: <3C8E90FACF3F44459539D0AC4BD8CD739E40DF@CPOMAIL01.centerpostcorp.com> I also cast my vote for Idioms if there is nothing in the pipe. -----Original Message----- From: chicagogroup-members-list-bounces at rubyforge.org [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of cremes.devlist at mac.com Sent: Tuesday, May 16, 2006 10:02 PM To: Chirb discussion list Subject: [Chirb] June meeting topic? Do we have a set topic for the June meeting yet? If not, I have a few suggestions. 1. BackgrounDRb - a new framework for creating an application-wide context within Rails. Also really useful for spawning background worker threads within Rails that provide a simple facility for communicating progress back to your controllers. See it here [1]. 2. RSpec - Behavior Driven Development (BDD) as the successor to Test Driven Development (TDD). 3. TDD - a quick run through of the core concepts of Test Driven Development and how it can help a programmer "evolve" a design from a blank page to a full blown set of classes (and tests!). Personally, nothing is scarier than a blinking cursor in a blank window waiting for code & tests. :-) 4. Idioms - one of the most pleasurable discoveries I had when I began learning Ruby was its propensity to jettison old concepts like for/do for object.each enumeration. There are tons of other examples that make Ruby interesting yet at the same time somewhat unapproachable for those of us with a lot of background in less dynamic languages (like C). I know a lot of this stuff is 30 years old (from the Smalltalk legacy) but it's still worthwhile to introduce it to us newbies. Well, those are my ideas. I'd be happy to teach any one of them if the audience is satisfied with a speaker who invents things on the spot to cover up his gaps in knowledge (I used to be a manager, so I'm good at this). cr [1] http://brainspl.at/articles/2006/05/15/backgoundrb-initial-release _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list From qzzzq1 at gmail.com Wed May 17 18:02:13 2006 From: qzzzq1 at gmail.com (colin h) Date: Wed, 17 May 2006 17:02:13 -0500 Subject: [Chirb] June meeting topic? In-Reply-To: <3C8E90FACF3F44459539D0AC4BD8CD739E40DF@CPOMAIL01.centerpostcorp.com> References: <3C8E90FACF3F44459539D0AC4BD8CD739E40DF@CPOMAIL01.centerpostcorp.com> Message-ID: <507da57a0605171502x52db4546q2cd071cea44e2a38@mail.gmail.com> /me raises hand for idioms... On 5/17/06, Jim Breen wrote: > I also cast my vote for Idioms if there is nothing in the pipe. > > > -----Original Message----- > From: chicagogroup-members-list-bounces at rubyforge.org > [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of > cremes.devlist at mac.com > Sent: Tuesday, May 16, 2006 10:02 PM > To: Chirb discussion list > Subject: [Chirb] June meeting topic? > > Do we have a set topic for the June meeting yet? > > If not, I have a few suggestions. > > 1. BackgrounDRb - a new framework for creating an application-wide > context within Rails. Also really useful for spawning background worker > threads within Rails that provide a simple facility for communicating > progress back to your controllers. See it here [1]. > > 2. RSpec - Behavior Driven Development (BDD) as the successor to Test > Driven Development (TDD). > > 3. TDD - a quick run through of the core concepts of Test Driven > Development and how it can help a programmer "evolve" a design from a > blank page to a full blown set of classes (and tests!). Personally, > nothing is scarier than a blinking cursor in a blank window waiting for > code & tests. :-) > > 4. Idioms - one of the most pleasurable discoveries I had when I began > learning Ruby was its propensity to jettison old concepts like for/do > for object.each enumeration. There are tons of other examples that make > Ruby interesting yet at the same time somewhat unapproachable for those > of us with a lot of background in less dynamic languages (like C). I > know a lot of this stuff is 30 years old (from the Smalltalk legacy) but > it's still worthwhile to introduce it to us newbies. > > Well, those are my ideas. I'd be happy to teach any one of them if the > audience is satisfied with a speaker who invents things on the spot to > cover up his gaps in knowledge (I used to be a manager, so I'm good at > this). > > cr > > [1] http://brainspl.at/articles/2006/05/15/backgoundrb-initial-release > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > From vinay.doma at gmail.com Wed May 17 19:21:26 2006 From: vinay.doma at gmail.com (Vinay Doma) Date: Wed, 17 May 2006 18:21:26 -0500 Subject: [Chirb] June meeting topic? In-Reply-To: <507da57a0605171502x52db4546q2cd071cea44e2a38@mail.gmail.com> References: <3C8E90FACF3F44459539D0AC4BD8CD739E40DF@CPOMAIL01.centerpostcorp.com> <507da57a0605171502x52db4546q2cd071cea44e2a38@mail.gmail.com> Message-ID: irb> idioms += 1 On 5/17/06, colin h wrote: > > /me raises hand for idioms... > > On 5/17/06, Jim Breen wrote: > > I also cast my vote for Idioms if there is nothing in the pipe. > > > > > > -----Original Message----- > > From: chicagogroup-members-list-bounces at rubyforge.org > > [mailto:chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of > > cremes.devlist at mac.com > > Sent: Tuesday, May 16, 2006 10:02 PM > > To: Chirb discussion list > > Subject: [Chirb] June meeting topic? > > > > Do we have a set topic for the June meeting yet? > > > > If not, I have a few suggestions. > > > > 1. BackgrounDRb - a new framework for creating an application-wide > > context within Rails. Also really useful for spawning background worker > > threads within Rails that provide a simple facility for communicating > > progress back to your controllers. See it here [1]. > > > > 2. RSpec - Behavior Driven Development (BDD) as the successor to Test > > Driven Development (TDD). > > > > 3. TDD - a quick run through of the core concepts of Test Driven > > Development and how it can help a programmer "evolve" a design from a > > blank page to a full blown set of classes (and tests!). Personally, > > nothing is scarier than a blinking cursor in a blank window waiting for > > code & tests. :-) > > > > 4. Idioms - one of the most pleasurable discoveries I had when I began > > learning Ruby was its propensity to jettison old concepts like for/do > > for object.each enumeration. There are tons of other examples that make > > Ruby interesting yet at the same time somewhat unapproachable for those > > of us with a lot of background in less dynamic languages (like C). I > > know a lot of this stuff is 30 years old (from the Smalltalk legacy) but > > it's still worthwhile to introduce it to us newbies. > > > > Well, those are my ideas. I'd be happy to teach any one of them if the > > audience is satisfied with a speaker who invents things on the spot to > > cover up his gaps in knowledge (I used to be a manager, so I'm good at > > this). > > > > cr > > > > [1] http://brainspl.at/articles/2006/05/15/backgoundrb-initial-release > > _______________________________________________ > > ChicagoGroup-Members-List at rubyforge.org > > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > > > _______________________________________________ > > ChicagoGroup-Members-List at rubyforge.org > > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/chicagogroup-members-list/attachments/20060517/453ea120/attachment.htm From NStowe at ThorntonTomasetti.com Thu May 18 08:54:28 2006 From: NStowe at ThorntonTomasetti.com (Stowe, Nola) Date: Thu, 18 May 2006 07:54:28 -0500 Subject: [Chirb] June meeting topic? Message-ID: How about two topics? BackgrounDRb - a new framework for creating an application-wide context within Rails. Also really useful for spawning background worker threads within Rails that provide a simple facility for communicating progress back to your controllers. See it here [1]. and Idioms! Nola J. Stowe Systems Programmer Thornton Tomasetti 14 E. Jackson Boulevard, Suite 1100 Chicago, IL 60604 T 312.596.2000 F 312.596.2001 D 312.596.2248 NStowe at ThorntonTomasetti.com _____ From: Vinay Doma [mailto:vinay.doma at gmail.com] Sent: Wednesday, May 17, 2006 6:21 PM To: Chirb discussion list Subject: Re: [Chirb] June meeting topic? irb> idioms += 1 On 5/17/06, colin h > wrote: /me raises hand for idioms... On 5/17/06, Jim Breen > wrote: > I also cast my vote for Idioms if there is nothing in the pipe. > > > -----Original Message----- > From: chicagogroup-members-list-bounces at rubyforge.org > [mailto: chicagogroup-members-list-bounces at rubyforge.org] On Behalf Of > cremes.devlist at mac.com > Sent: Tuesday, May 16, 2006 10:02 PM > To: Chirb discussion list > Subject: [Chirb] June meeting topic? > > Do we have a set topic for the June meeting yet? > > If not, I have a few suggestions. > > 1. BackgrounDRb - a new framework for creating an application-wide > context within Rails. Also really useful for spawning background worker > threads within Rails that provide a simple facility for communicating > progress back to your controllers. See it here [1]. > > 2. RSpec - Behavior Driven Development (BDD) as the successor to Test > Driven Development (TDD). > > 3. TDD - a quick run through of the core concepts of Test Driven > Development and how it can help a programmer "evolve" a design from a > blank page to a full blown set of classes (and tests!). Personally, > nothing is scarier than a blinking cursor in a blank window waiting for > code & tests. :-) > > 4. Idioms - one of the most pleasurable discoveries I had when I began > learning Ruby was its propensity to jettison old concepts like for/do > for object.each enumeration. There are tons of other examples that make > Ruby interesting yet at the same time somewhat unapproachable for those > of us with a lot of background in less dynamic languages (like C). I > know a lot of this stuff is 30 years old (from the Smalltalk legacy) but > it's still worthwhile to introduce it to us newbies. > > Well, those are my ideas. I'd be happy to teach any one of them if the > audience is satisfied with a speaker who invents things on the spot to > cover up his gaps in knowledge (I used to be a manager, so I'm good at > this). > > cr > > [1] http://brainspl.at/articles/2006/05/15/backgoundrb-initial-release > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > > _______________________________________________ > ChicagoGroup-Members-List at rubyforge.org > http://rubyforge.org/mailman/listinfo/chicagogroup-members-list > _______________________________________________ ChicagoGroup-Members-List at rubyforge.org http://rubyforge.org/mailman/listinfo/chicagogroup-members-list <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> The information in this email and any attachments may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. If you are not the intended addressee, please notify the sender immediately, and delete this message. <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/chicagogroup-members-list/attachments/20060518/74ec3923/attachment-0001.htm