SitePoint Sponsor

User Tag List

Results 1 to 13 of 13

Thread: New to Ruby...

Hybrid View

  1. #1
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    New to Ruby...

    Hello, I read a ton of great things about Ruby over at the PHP section, so I decided to check it out, I saw that it has alot of functions to help with system administration. So with Ruby, could I get a list of all the users in my /home folder, and print them out to the website, and from there make it linkable, so I can change there home directory, username, and password?

    I've always wanted a language that could help me administer my server(s) from the web.
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  2. #2
    SitePoint Evangelist Andrewaclt's Avatar
    Join Date
    Dec 2003
    Location
    Raleigh, NC
    Posts
    535
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jabird
    So with Ruby, could I get a list of all the users in my /home folder, and print them out to the website, and from there make it linkable, so I can change there home directory, username, and password?
    Yes, but you could do that with about any language.

  3. #3
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then what benefits would I receive from learning Ruby instead of PHP?
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  4. #4
    throw me a bone ... now bonefry's Avatar
    Join Date
    Nov 2004
    Location
    Romania
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    None. You should learn both. And you should start with PHP because it may pay your bill.

    Also, consider Python. It's more mature, and a new framework that follows Rails principles WITHOUT BEING A RAILS CLONE has been anounced: http://www.djangoproject.com/.
    It is also mature (it's been in production for 2 years and there are good sites made with it). And it also started a buzz between Ruby/Python developers. And who knows, maybe it will have a big impact like Rails did.

  5. #5
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I've started PHP, and am now getting to the point where I really want to learn OOP for PHP, but I'm right in the middle of coding a CMS and I don't want to throw it all away and redo it with OOP. So that will come later.

    So I should learn PHP OOP and get good at it, or just get a firm grasp on it? and then move to Ruby? I've considered Python, but I never really knew if it would be beneficial.

    I know PHP might pay my bill, because it already is. I am just looking for an example where Ruby would be better than PHP, or Python better than either.
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  6. #6
    throw me a bone ... now bonefry's Avatar
    Join Date
    Nov 2004
    Location
    Romania
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP is more lightweight than both Ruby and Python. It can be easilly deployed and hostings cheap. Also there is a big community around it.

    Python is a mature and very dynamic and powerfull language. So is Ruby. They are both going head to head.

    Ruby has the advantage of a good framework (Ruby on Rails). Don't believe all that Ruby is cleaner then Python nonsense. I've tried both. It's all a matter of personal taste and you should try both to see what you like.

    I like Python because it appears cleaner IMO, has a big standard library, and it's faster (compiles to bytecode). Also it is more widespread than Ruby among hosting sollutions. If I think about it, I rarelly see a Ruby hosting plan. Also, I liked it because it changed the way I think about OOP. What I don't like about Python is that documentation for web development can be hard to find (although the language and standard libraries are pretty well explained by the official docs).

  7. #7
    Resident Java Hater
    Join Date
    Jul 2004
    Location
    Gerodieville Central, UK
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Both Ruby and Python are on par with each other. Both seem to target the same audience (you can use them to do web work, basic GUI apps, shell scripting etc). Python is more widespread but argueably doesn't have such a tight OO integration (like C++ OO is a bolt on), and Ruby has some other features with blocks etc, which I think newer versions of Python have or will have anyway.

    If you are new to both, try both for a few weeks and use what you feel more at home with.

    If you want something to pay bills, learn .NET C#, or Java. Both have more money than PHP but PHP has more commercial appeal than Ruby and Python. Personally I've gone off PHP recently, but it's still good for small sites where Rails can be a little bit of an overkill (then again there is erb in Ruby).

    As for PHP being more lightwight than Ruby or Python, I find Ruby much easier to deploy and more lightweight (PHP depends on too much other stuff, and fails on ./configure more often). I would probably say the same with Python as most Redhat boxes have Python installed, but I don't have any hands on experience with Python tbh

    Both Ruby and Python offer more thna PHP. PHP is very much limited to web scripting, where as the others aren't

  8. #8
    throw me a bone ... now bonefry's Avatar
    Join Date
    Nov 2004
    Location
    Romania
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unfortunatelly, yes, PHP is more limited. Once you learn Ruby or Python you will definitelly like them more than PHP.

  9. #9
    SitePoint Member MonkeyG's Avatar
    Join Date
    Jul 2005
    Location
    Michigan
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Which one is better down the road?

    I have never worked with Ruby or Python so I'll take your word on the Python stuff. However, I have been looking at Ruby and see alot of exciting and interesting things going on. Maybe its just getting buzz, but It makes the decision to use one over the over more difficult. I currently employ PHP and ASP.NET for my dynamic applications and I really enjoy both, so where is the incentive to learn Ruby or Python for future use. Is one easier to pickup? Does one have better support? I would like to get into a more powerful language like Ruby or Python but I can't find the drive to do so.

    Please dangle the carrot in front of my nose if you think you have a good idea.
    All actions are reactions - think about it.

  10. #10
    011110010110000101111001 jabird's Avatar
    Join Date
    Aug 2004
    Location
    U.S.
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've heard many people say that an experience coder should be able to pick up any language relatively easy. I agree with this, because I've been coding PHP for sometime now.. and recently I looked into C# and got a grasp on it surprisingly fast. The odd thing about that is. I've hardly ever done OOP in PHP, and C# is OOP... but I still picked it up, because I already have background in a couple other langauges.

    And the incentive would be. Say you where the boss of a large company. 2 people come in. Theres resume's are as follows:

    Applicant #1
    3 year experience in Coding.
    Languages:
    PHP
    ASP.net
    C#
    Ruby

    Applicant #2
    3 year experience in Coding.
    Languages:
    PHP
    ASP.net
    C#

    Who gets the job?

    Thats just one reason to learn it though. Another may be that whatever you are working on. Would be easier in Ruby or Python than in PHP/ASP...
    ~Jabird
    Jabird.com
    If I were binary... I'd be all 1's for you.
    BBCode trouble?

  11. #11
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by jabird
    And the incentive would be. Say you where the boss of a large company. 2 people come in. Theres resume's are as follows:

    Applicant #1
    3 year experience in Coding.
    Languages:
    PHP
    ASP.net
    C#
    Ruby

    Applicant #2
    3 year experience in Coding.
    Languages:
    PHP
    ASP.net
    C#

    Who gets the job?
    If the job is for a C# or PHP developer then it's still up for grabs. Who knows, applicant #2 could have spent his time more focused on two languages and knows them better than applicant #1, and that could be all the employer cares about.

    Learn a language because you find it interesting. If you like it enough and the language has a market share greater than just yourself, odds are you will be able to find work doing it.

  12. #12
    throw me a bone ... now bonefry's Avatar
    Join Date
    Nov 2004
    Location
    Romania
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jabird
    Applicant #1
    3 year experience in Coding.
    Languages:
    PHP
    ASP.net
    C#
    Ruby

    Applicant #2
    3 year experience in Coding.
    Languages:
    PHP
    ASP.net
    C#
    To be honest, in a company that focuses on multiple technologies, since that's what you have in mind, the one that gets the job is ussualy:
    applicant 3
    C++
    Java

  13. #13
    SitePoint Addict
    Join Date
    Jul 2004
    Location
    UK
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by bonefry
    To be honest, in a company that focuses on multiple technologies, since that's what you have in mind, the one that gets the job is ussualy:
    applicant 3
    C++
    Java
    Concur



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •