Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Best Language to Perform Basic Calculations

What language is best for a user input data into a form, post that data to a server have that server perform basic calculations (addition and multiplication) then return user input along with the calculated values? When would one use JAVAScript vs Python vs Ruby vs any other server side language?

4 Answers

Joe Ainsworth
Joe Ainsworth
13,588 Points

It depends what you want to do with the data that is input and the calculation. If you need to save the data or the calculation to a database you'll want to use a server side language like Ruby or Python. JavaScript is client side so for simple calculations why not use the users processing power rather than send it server side?

DON'T SPAM!!!

Dylan Shine
Dylan Shine
17,565 Points

It's all the same at the end of the day, I prefer Python...better libraries for handling data.

Andrew Kiernan
Andrew Kiernan
26,892 Points

Hi Yolanda:

For something like that any language will work, and I doubt there would be much if any difference in response times, etc. So you can use whichever you like best!

-Andrew