Ruby Essentials for Beginners (Part 01)

preview_player
Показать описание
These videos are a series of lectures on Ruby that I gave recently in my programming languages course. While this is not a comprehensive guide to learning Ruby, we do discuss its salient features and compare it to other languages, especially Java and other languages with a C pedigree. In this particular video we look at defining functions/methods in ruby, return values, parallel assignments, and duck typing.
Рекомендации по теме
Комментарии
Автор

It's worth mentioning that Ruby peformance has been improving a lot with newer versions of the language interpreter. Also there are huge efforts to make it a lot faster, one of them is called Ruby 3x3 & another is truffle ruby.

Unless you are working for NASA or have to do some computation-intensive work (finding PI numbers & things like that) then Ruby will be fine for most of the things you want to do. So don't let this performance thing keep you from learning Ruby, it's a very fun & satisfying language to work with.

JesusCastello
Автор

There are some Ruby tutorials in YouTube and you are one of the best for those who already know at least one programming language. Thanks for putting this up! :)

amaterasu
Автор

This is the best prep to Ruby video series! It just make you want to start throwing code at it! Thanks

spongebobmx
Автор

I like your pace and starting with functions.

nubalci
Автор

That was a good explanation of the raise an exception at the beginning.
For me it made a lot of sense. I agree that ruby is dynamic and interpreted;
that is very nice.
Thanks!

eldhdp
Автор

You said for beginners although you reference C and other languages... Unless you solely mean beginners to Ruby with knowledge of other languages?

zmbiesquidman
Автор

I am not getting any return from the first example is it because my editor isn't compatible with ruby. And if so which editor should i use.

thereadroom
Автор

am trying to learn ruby...i'd love if u made it into a series

ibrahimlsatti
Автор

I heard that in Ruby, just calling a method is a slow process. if that's right, I'll be forced to write less methods, and clutter code into huge methods. that seems to defeat the purpose of ruby being 'readable', with less lines of code overall, and eaiser to debug.
I've seen someone who made his Ruby program faster: from 20 seconds to just 1, by avoiding calling methods and some other tricks.. the thing is.. it didn't look like the kind of program that'll take 20 seconds to run, in the first place... can you please give an example, of how slow ruby is, for larger programs? will it actually lag your PC for like 5 minutes, or is it only a difference of a few seconds?

whitemoon
Автор

Is this a CMS? Do you have to learn HTML first? How do content strategist use this program?

Kwintessential
Автор

The second examples doesn't return  anthing for me...??

gregshubert
Автор

thanks ! very helpful! Appreciate the effort

spongebobmx
Автор

Ruby is the computer language that is used for making games on RPG Maker MV.

sonny
Автор

Why didnt he just put *factorial(n)* in the *else* statement?

chriscelestine
Автор

This language just dosent make sense. For eg. Why would you use "def" and "end" to open and close  a function, if statement, whille loop ect. Its alot faster to use curly brackets {}.Also, why is there no semi colons? You dont know where the statement is sobosed to end.

rafalpilat
Автор

require 'complex' will do the polar for you. Complex(x, y).polar
>> Complex(3, 4).polar
==>[5.0, 0.9272952180016122]

Although it returns an array we can get the parts with indexing.

>> Complex(3, 4).polar[0]
==>5.0

>> Complex(3, 4).polar[1]
==>0.9272952180016122

>> Complex(3, 4).polar[1] * 180.0 / Math::PI
==>53.13010235415598

And why are you typing return. Style and sugar is missing here old dude.

kbagt
visit shbcf.ru