Berkeley CSUA MOTD:Entry 39372
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/25 [General] UID:1000 Activity:popular
5/25    

2005/8/31-9/2 [Computer/SW/Languages/Perl] UID:39372 Activity:nil
8/31    Anyone here use ruby? Is it worth learning (say for someone who
        mostly programs in perl/c)?
        \_ You don't say what your intended use is.  For what?  For personal
           pleasure because you're a language geek?  For work?  For a big
           team project?  For one off throw away code?  What?
           \_ I've been hearing a lot about it from co-workers and
              I wanted to know if I should spend some time to learn
              it b/c it is one of those things that any reasonable
              unix person is expected to know.
              Also it is pretty nice, I'd like to re-write some of
              my personal perl programs so I can ditch perl.
        \_ Yeah, it's worth learning, why? Because it's not perl. I'd suggest
           learning Python over Ruby (probably bigger base). Scripting in
           perl just plain sucks, especially if you have to come back to
           it in a couple of months and update the crap.
           \_ If you write crap code in ruby, it will still be crap code
              months from now.  Don't blame the language if you're a shitty
              programmer.
        \_ I started on it.  I read all the online intro/how-to/beginner docs
           but since I'm already proficient with perl I just couldn't find a
           real excuse to write anything in ruby.  Same thing happened to me
           with python.  Yes, there are some things that might be somewhat
           easier in one language over the others, but not so much better
           that I saw value in climbing the learning curve for the rest of it.
        \_ So, all the "small clean code" fans I know swear by it,
           including my boss.  They usually say it's got the best of Perl
           and Python, plus some new features.
           \_ Getting paid to write in it is different than choosing to
              because you like it.  If my boss swore by it I'd be over that
              pesky little learning curve.  :-)
        \_ I use ruby for scripting, primarily because I know Smalltalk
           and I don't know perl. Ruby has a bit of kitchen-sink syndrome
           (let's throw in another language construct / feature!), but
            all-in-all it's decent.
           If you can already do everything you need to in perl,
           there's probably no need to learn ruby, but, I think ruby programs
           are usually easier to read and ruby has some features like
           continuations that are good to know for general programming
           knowledge.  - ciyer
        \_ I've started to use it.  A buddy of mine who was a bigtime
           coldfusion programmer says that Ruby on Rails is prob one of
           the coolest things out now for web app dev.
           see: http://www.michaelbuffington.com and search for ruby.
                                                - vallard
        \_ Ruby is probably the most fun language I've ever coded in.  It makes
           writing everything as beautiful little OO jewels beautifully easy.
           It also lets you do lots of "cool hacks" that probably don't lead
           to good, maintainable code, but they're a hell of a lot of fun to
           write.  That being said, it has some issues:
           * it's the slowest modern language i've ever used
           * dynamic typing + no sigils (perl's @foo, $foo, %foo things to
             sort of indicate type) = lots of runtime errors, for me.
             supposedly if you're a better programmer this doesn't happen, but
             I'm just weak.
           --dbushong
           \_ Yeah this is what I'd say. Well, the slowness part. The lack of
              sigils is a benefit I think... if it's a problem I think you
              might try using naming conventions. But mainly I've only played
              around with it for fun because nobody at work knows about it,
              it's slower, and the smaller userbase and "stuff" out there
              for it compared to Perl. Perl's OO blows so hard though.
              \_ I think one thing Perl is teaching me is that it's important
                 to give pretty names to stupid things.  'Sigil' sounds so
                 much better than 'declare-with-every-use.'  -- ilyas
        \_ I like perl, being a slow learner I have a hard time learning
           yet another new language.  I think what you get with The use of
           ruby on rails is nice; Active Record, MVC (CRUD w/ scaffolding),
           AJAX 'api', testing and debug builtin, reflection (MINIMAL schema
           configuration), etc.  Check out the intro videos on.
           http://www.rubyonrails.org
Cache (6547 bytes)
www.michaelbuffington.com
NEF Slaps Are HealthyAugust 31, 2005 | 11:44 AM I'm not sure if I've shared my super good method for meeting effectivenes s before (as if that were possible in the first place), but I thought it worth mentioning now that I'm back from my little vacation and I have s ome meetings to attend: Before the meeting starts all participants should slap each other in the face. On a scale of 1-10, 10 being a slap that wou ld make someone cry and walk around the rest of the week with a shiner, you should give slaps in the 3-6 range. The slapping is good for a lot of reasons: It gets your adrenaline pumping. When we were cave men and women, we used to beat chests, claw at each other for the best spears, and then rush o ff and take down mighty mastodons. We don't get to do that any more, but our bodies want to. You're not just having a meeting, you're havi ng a thoughtful sit down with people you just spent some time slapping i n the face. These are your friends, people you'd let slap you in the fac e, and people you swung your arm at so that your hand would connect with their, arguably, most important body parts. And finally, it gives meetings a purpose (something all meetings that don 't start with slapping lack). If you're just gathering in a room without slapping, there's no adrenaline pumping. There's no "we're going to tak e down a herd of mastodons" sort of feeling. It's just a bunch of people digesting their lunches that they didn't even have to hunt for or even pull out of the dirt. They're all thinking about something other than th e meeting, rather than "that was a pretty good smack I gave Stu from Acc ounting, and boy, his slap got me riled up alright - we're ready to tack le some important issues now aren't we." Sunset Feel free to confirm my status in the Hall of Dorks - I'm perfectly comfo rtable with that status and you'll certainly be entitled in a moment. Carrie and I are huge fans of the TV show The Amazing Race, an interest t hat has been fueled lately by old season reruns that our TiVo gobbles up for our back to back viewing pleasure. We do a lot of analysis of the p eople on the show, and mostly pick at the weak points in people's behavi ors towards their racing partner. We say things like "we'd totally not freak out and break down over that" or "we're far more patient". During this little road trip we've been on we've been pretending we're on the Amazing Race. I mean we're not racing to the pit st op or opening fake clues or anything, we're just assuming that through w hatever little uncomfortable patch we're going through, it's for the gre ater good - whether that's driving for hours or holding your toddler in the air in the middle of your truck as the other changes the poopiest di aper possible in the middle of a hail storm. That's the kind of stuff th at happens on The Amazing Race, and so it makes us happy. Reluctantly (and sorely) jump with her and wait for the stars to c ome out. Tomorrow we're going to relax and then drive the entire 12 hours back to Portland on Tuesday. The entire time we'll be pretending that we're on the Amazing Race, becau se it totally makes everything easier and hundreds of times more fun. comments Mish MashAugust 26, 2005 | 08:48 AM We're on the road, traveling with the kids to Utah to pay a surprise visi t on family (they were indeed surprised) so blog entries will be sparse. I've jumped on the trampoline (required by Utah st ate law) a few times a day, and stood in the middle of a massive toddler pirate sword fight. Today we're going to try and kill ourselves on some alpine slides, and tomorrow - water skiing on a reservoir with cousins (one of which pegged me as a Panguitch boy the first time he saw me). If we avoid collapsing from exhaustion within the next several days it wil l be a miracle. Ruby on Rails Comparisons Part IAugust 16, 2005 | 03:23 PM I had to make some changes to a ColdFusion project the other day, and as I was digging through the code, it struck me that it would be interestin g to see a direct comparison of code. I'll try to be objective, but I ad mit a bias right up front - I prefer writing Ruby code lately, both for the clean and uncluttered code and because my text editor came with a bu nch of powerful code snippet tools (which are a good thing for lazy typi sts like myself). Cameron and I heade d up to visit the Robot Coop in Seattle. On Sunday afternoon Cameron and I hit bumper to bumper traffic essentiall y from the Washington/Oregon border all the way to Seattle. A three hour trip turned into a nearly five hour trip, but the conversation was live ly and worth it. While waiting for a seat, Erik told the story about how he saw a m an drop dead while walking down the sidewalk. I can't remember if it was before or after Erik's story, but as we were waiting on the sidewalk a woman carrying takeout home tripped on a crack in the sidewalk and crash ed to the ground so hard I felt the cement shudder underneath me. She wa sn't injured but walked away from the scene shaking the pain out of her limbs and probably feeling a bit embarrassed and grateful for not having ruined her dinner at the same time. While telling the st ory, Cameron stepped backwards a bit and threw his hands up to give us a visual interpretation of the event and (he doesn't know this, I don't t hink) nearly slapped a woman in the face. Her boyfriend looked as if it wouldn't take much provocation to start a fight. A fight over a story ab out a fight that started from a man yelling "Don't walk backwards". I ha d fantasies of a huge sidewalk brawl starting over Cameron's enthusiasm, and how if it had happened there'd be an epic story of bravery and phys ical combat prowess (on my part) to tell for years. We'd recount the mom ent in the battle when I climbed a tree for a strategic impression of th e melee and then proceeded to use flanking formations to keep the enemy (those who didn't like Cameron's story of people getting in brawls over walking backwards) at bay. We'd be victorious, and they'd call our name at the Mexican restaurant where we'd eat Enchilada's Rancheras while com paring our wounds. truly glorious mom ents that will remain mysterious to the reader. I'm paying for the weeke nd/beginning today as I count up the total hours of sleep had between Su nday night and last night and realize it's in the single digits. describe the businesses they want to invest i n and the exact dollar amounts they think the ideas are worth. If this i sn't a sign of the economy shaping up, I'm not sure what is.
Cache (1092 bytes)
www.rubyonrails.org
Austin Moody: "I'd rather write a video game in Fortran than have to write another web- based application without Rails." MySQL, PostgreSQL, SQLite, SQL Server, DB2, and Oracle are supported out of the box. Rails is a full-stack, open-source web framework in Ruby for writing real -world applications with joy and less code than most frameworks spend do ing XML sit-ups Being a full-stack framework means that all layers are built to work seam lessly together. In striving for DRY compliance, Rails shuns configuration files and annot ations in favor of reflection and run-time extensions. This means the end of XML files telling a story that has already been tol d in code. It means no compilation phase: Make a change, see it work. Me ta-data is an implementation detail left for the framework to handle. Action Mailer Consolidates code for sending out forgotten passwords and invoices for bi lling in easy-to-test email service layers on top of smtp or sendmail. Flowing on the Rails Most of the time, all the frameworks of Rails are invoked on each request in order to produce a response.