From: Adam Bilbrough Date: 2009-10-06T17:49:30+09:00 Subject: Re: Ruby for the wrong reason --0-281835408-1254818567=:65096 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Sounds like what I had trouble with (regarding Python) hated the indentatio= ns, especially when porting from Python 2 - 3 what a nightmare :D For an IDE (if you are using OS X) I'd suggest Textmate, it has everything = you could possibly want (C, C++, Python, Ruby, Ruby on Rails, PHP, Perl, et= c) it costs about =A340 ($60 ish) but is well worth it.=A0 As for Ruby vers= ion, 1.8.7 works great with Rails and is the prefered version.=A0 I use 1.8= .6 (or .7) on Snow Leopard and the same on Linux I think, though personally= , I'd always prefer to go with the most stable and newest version (being 1.= 9.1). Regards, Adam --- On Tue, 6/10/09, Rajinder Yadav wrote: From: Rajinder Yadav Subject: Re: Ruby for the wrong reason To: "ruby-talk ML" Date: Tuesday, 6 October, 2009, 4:14 AM flebber wrote: > Hi >=20 > A few months ago, I started learning Python - my first language for a > project I want to do (personal) which will involve several facets > including MySql/postgres database and gui frontend I need to create on > windows xp. So I started this in python and I use Eric 4 ide. >=20 > At the time I had no knowledge and tossed up between Ruby and Python, > I chose python because I thought it had been around longer so may be > more mature. I went through this same process, even tried learning Perl which I disliked= , tasted like I chalk in my mouth. Being a C++ developer, Ruby was my natur= al choice (front runner). Python lost me because I thought it was just stup= id to only have indentations to declare code blocks. Other Python users tol= d me I would overcome this. Someone did a good job of trying to sell me Pyt= hon + Django as the way to go. So even though Ruby was more fun and felt na= tural to me, I still struggled with what to go with. In the end I didn't pick Ruby, Ruby picked me. I just when with what felt g= ood to me and then the rest didn't matter what was better. There are never no wrong reasons, it's better to explore and then go with t= he flow for what feels good to you, not someone else. >=20 > So why Ruby now, well honestly my 3rd daughter has been born two days > ago Ruby Jean, why would I program Python when my daughter is Ruby? >=20 > My question would Eric4 still be a good choice for Ide in Ruby, code > completion, highlighting(syntax) and debugging would be required in > IDE. Someone was capturing the various IDE in a spreadsheet, I don't have that e= mail around...possibly they will reply with the link soon =3D) But I suggest you take a look at Aptana, it's got everything you need and i= t will also allow you to create Rails applications. http://aptana.com Enjoy and save the python for the wife ;) >=20 > Secondly I found capturing the date input from a console in python to > be a little long winded, below is the script I wrote in python would > this be significantly easier in Ruby. >=20 > Which version of Ruby should I use 1.8.6, 1.9.1 or a preview version > of 1.9.2? >=20 > My python script to capture date input and check for errors. >=20 > import datetime as dt > def ObtainDate(): >=A0 =A0=A0=A0isValid=3DFalse >=A0 =A0=A0=A0while not isValid: >=A0 =A0 =A0 =A0=A0=A0userIn =3D raw_input("Type Date dd/mm/yy: ") >=A0 =A0 =A0 =A0=A0=A0try: # strptime throws an exception if the input does= n't match > the pattern >=A0 =A0 =A0 =A0 =A0 =A0=A0=A0d1 =3D dt.datetime.strptime(userIn, "%d/%m/%y= ") >=A0 =A0 =A0 =A0 =A0 =A0=A0=A0isValid=3DTrue >=A0 =A0 =A0 =A0 =A0 =A0=A0=A0print d1, type(d1)=A0 # 2003-07-15 00:00:00 <= type > 'datetime.datetime'> >=A0 =A0 =A0 =A0 =A0 =A0=A0=A0"convert datetime object to a 10 character st= ring" >=A0 =A0 =A0 =A0 =A0 =A0=A0=A0d2 =3D str(d1)[:10] >=A0 =A0 =A0 =A0 =A0 =A0=A0=A0print d2, type(d2)=A0 # 2003-07-15