SitePoint Sponsor |
|
User Tag List
Results 1 to 13 of 13
Thread: New to Ruby...
-
Jul 21, 2005, 11:44 #1
- 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.
-
Jul 21, 2005, 11:59 #2
- Join Date
- Dec 2003
- Location
- Raleigh, NC
- Posts
- 535
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by jabird
-
Jul 21, 2005, 12:06 #3
- 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?
-
Jul 21, 2005, 12:17 #4
- 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.
-
Jul 21, 2005, 12:28 #5
- 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.
-
Jul 21, 2005, 13:36 #6
- 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).
-
Jul 22, 2005, 07:13 #7
- 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
-
Jul 22, 2005, 09:24 #8
- 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.
-
Jul 25, 2005, 14:04 #9
- Join Date
- Jul 2005
- Location
- Michigan
- Posts
- 1
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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.
-
Aug 2, 2005, 08:01 #10
- 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...
-
Aug 2, 2005, 10:03 #11
Originally Posted by jabird
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.
-
Aug 2, 2005, 12:24 #12
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by jabird
applicant 3
C++
Java
-
Aug 2, 2005, 12:27 #13
- Join Date
- Jul 2004
- Location
- UK
- Posts
- 201
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by bonefry
Bookmarks