Ruby Programming

Ruby Programming

Derek Banas

9 лет назад

665,059 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Valencia Walker
Valencia Walker - 27.09.2023 20:55

Thank you

Ответить
Robbie Podosek
Robbie Podosek - 16.09.2023 01:42

You missed the shovel << operator for adding to arrays smh

Ответить
Thomas Slone
Thomas Slone - 24.02.2023 01:33

Bro how come every video is like learn ruby coding but no videos are like here's what I did with ruby coding, might have to do something about that

Ответить
Karen Dominique
Karen Dominique - 02.01.2023 11:15

Tyhansen

Ответить
Twattus & Bobble
Twattus & Bobble - 25.11.2022 14:03

Are you still smoking Ecigs Derek? 😀Nice bookmark on your browser 😀

Ответить
GereldDev
GereldDev - 07.10.2022 10:07

thank you for course

Ответить
Manuel Gonçalves
Manuel Gonçalves - 07.10.2022 00:03

Great video.

Ответить
Victor R
Victor R - 25.08.2022 17:58

Any new updated video coming of Ruby ?

Ответить
Ruby
Ruby - 17.07.2022 05:40

Amazing tutorial my guy <3

Ответить
Max Kamrani
Max Kamrani - 21.06.2022 16:19

amazing work ! thanks so much !

Ответить
Guilherme Moresco
Guilherme Moresco - 17.05.2022 03:47

Excellent. Really glad to find a source that did not cover all the basics of programming and just got to the point.

Ответить
Everton Santos de Andrade Júnior
Everton Santos de Andrade Júnior - 04.05.2022 23:35

scarlet ruby farmming

Ответить
Aqua
Aqua - 31.03.2022 08:28

After this one video, I'll probably be mostly good. I'll go straight to the Go video next

You should do a Rust video sometime! As a advanced Rust dev, we need more material out there

Ответить
Khakalaka
Khakalaka - 01.03.2022 23:34

Thank you. I will look for you on Udemy.

Ответить
Richard Huang
Richard Huang - 25.02.2022 03:38

Best

Ответить
Raja Cxi
Raja Cxi - 28.12.2021 16:48

Good explanation...thank you.

Ответить
spiritus
spiritus - 06.07.2021 12:38

Which IDE are you using?

Ответить
ParanoidVibri
ParanoidVibri - 15.06.2021 03:03

i know ruby

Ответить
Squid
Squid - 14.05.2021 22:57

Thank you so much for the tutorial, as a python learner as well I see a ton of similarities to Python. So I think it can glom onto this language

Ответить
Divy Grover
Divy Grover - 06.03.2021 23:29

The syntax parser seems to be doing left-first traversal. Meaning, in Python we do "If (condition): continue", while here its "next unless". Maybe I am wrong, but most commands do something similar it seems

Ответить
Saad
Saad - 23.02.2021 15:06

Speedrunning Ruby, WORLD RECORD

Ответить
Le Castor Bricolor
Le Castor Bricolor - 28.01.2021 16:50

Is Derek Banas god ?

Ответить
Leo Bozkir
Leo Bozkir - 06.01.2021 16:21

I just have ONE question. Why *STAY HOME*??

Ответить
Francisco Barros
Francisco Barros - 24.12.2020 20:09

55 minutes later... Ruby syntax is ugly.

Ответить
Rik
Rik - 01.12.2020 06:44

Incredibly efficient, well put-together video. Helped me review for my final without wasting time. Thanks!

Ответить
michał botor
michał botor - 16.11.2020 23:34

ok, now this:
"""
s = "cat cat cat"
puts s.count("cat") # = 9
"""
is annoying.
apparently one has to use:
"""
s = "cat cat cat"
puts s.scan(/cat/).length # = 3
"""
to achieve what one would expect.

Ответить
michał botor
michał botor - 16.11.2020 22:10

if someone is interested how a not-completely-trivial recursion works in ruby, here's what i have managed to discover:
"""
def max(*args)
case args.length
when 0 then return nil
when 1 then return args[0]
else
def _max(*args)
x, y, *tail = args
m = (x > y) ? x : y
return (tail.empty?) ? m : _max(m, *tail)
end
return _max(*args)
end
end

def min(*args)
case args.length
when 0 then return nil
when 1 then return args[0]
else
def _min(*args)
x, y, *tail = args
m = (x < y) ? x : y
return (tail.empty?) ? m : _min(m, *tail)
end
return _min(*args)
end
end

def sum(*args)
case args.length
when 0 then return nil
when 1 then return args[0]
else
def _sum(*args)
x, y, *tail = args
s = x + y
return (tail.empty?) ? s : _sum(s, *tail)
end
return _sum(*args)
end
end

def avg(*args)
case args.length
when 0 then return nil
when 1 then return args[0]
else
n = 2
def _avg(*args, n)
x, y, *tail = args
a = ((n-1)*x + y).fdiv(n)
return (tail.empty?) ? a : _avg(a, *tail, n+1)
end
return _avg(*args, n)
end
end

arr0 = []
arr1 = [4]
arr2 = [2, -3]
arr3 = [3, 5, 0, -4]

arrs = [arr0, arr1, arr2, arr3]

for arr in arrs do
nums = arr.to_s[1..-2]
puts "max(#{nums}) = #{max(*arr)}"
puts "min(#{nums}) = #{min(*arr)}"
puts "sum(#{nums}) = #{sum(*arr)}"
puts "avg(#{nums}) = #{avg(*arr)}"
end
"""

Ответить
michał botor
michał botor - 16.11.2020 20:57

regarding looping on arrays, i have seen another that seems to be popular and quite funny:
"""
nums = [1, 2, 3, 4]
N = nums.length

N.times do |idx|
puts nums[idx]
end
"""

Ответить
michał botor
michał botor - 16.11.2020 20:47

i have found a more ruby way to display these even numbers:
"""
num = 1

while num <= 10 do
puts num if num.even?
num += 1
end
"""
or
"""
num = 1

while num <= 10 do
puts num unless num.odd?
num += 1
end
"""

Ответить
michał botor
michał botor - 16.11.2020 20:33

regarding ruby's case example, i think this would have been better:

"""
print "Enter greeting: "

greeting = gets.chomp.capitalize

case greeting
when "French" then
puts "Bonjour!"
when "Spanish" then
puts "Hola!"
else
puts "(peace sign)"
end
"""

i.e. one can capitalize and there is no need for these "exit"s as it doesn't seem to cascade anyways.
also, i like to put optional "then" as it reads almost like a sentence. ruby is amazing. :)

Ответить
michał botor
michał botor - 16.11.2020 19:44

one thing I like to check in a new language is what it returns when I enter something like "-1 % 4", and i am so pleased to see that ruby returns 3 here and not -1. so pleased. 💗💗💗

Ответить
Farruh Habibullaev
Farruh Habibullaev - 23.09.2020 08:32

Great. A quick, complete and professional teaching.

Ответить
cherrie
cherrie - 03.09.2020 11:31

"elsif" why no e??

Ответить
Jim Gordon
Jim Gordon - 23.08.2020 22:19

Awesome

Ответить
verified_tinker
verified_tinker - 14.07.2020 17:25

Alternative title: Derek having a midlife crisis.

Ответить
A random person
A random person - 10.06.2020 13:42

This is the way i teach people.
Thank you, Derek.
Now i can use this object-oriented language (it has classes i see).

Ответить
Pedro Belaciano
Pedro Belaciano - 20.05.2020 17:28

Saving this for later

Ответить
Salil Chincholikar
Salil Chincholikar - 04.05.2020 23:20

Loved it! Thanks man!!

Ответить
Dallsant
Dallsant - 28.03.2020 17:37

Just wondering, but what's the point of ennumerabels? like, it seems like an Array with extra steps, great content, thank you so much

Ответить
Krishna Gupta
Krishna Gupta - 25.03.2020 02:15

How about a refresher? what changed in new latest version

Ответить
Vail Arvia
Vail Arvia - 15.03.2020 06:54

Thank you so much for this video. I will take it piece by piece.

Ответить
Dario Cangialosi
Dario Cangialosi - 14.03.2020 23:13

def ask_integer(message)
print message+' '
gets.to_i
end

i1=ask_integer('first integer?')
i2=ask_integer('second integer?')
puts "#{i1}+#{i2}=#{i1+i2}"

Ответить