Ruby Programming

Ruby Programming



Get the Code Here :
Best Ruby Book :

MY UDEMY COURSES ARE 87.5% OFF TIL April 12th ($9.99)

➡️ Python Data Science Series for $9.99 : Highest Rated & Largest Python Udemy Course + 55 Hrs + 200 Videos + Data Science

➡️ New C++ Programming Bootcamp Series for $9.99 : Over 23 Hrs + 53 Videos + Quizzes + Graded Assignments + New Videos Every Month

I LIVESTREAM CODE HERE :
MY DISCORD : ( Contact Me Anytime )

Support me on Patreon :

Get Input 1:47
Arithmetic 3:11
Integers 3:24
Floats 3:42
Constants 5:23
Basic File I/O 5:52
Load Ruby File 6:56
Multiline Comment 7:27
If Elsif Else 7:42
Comparison Operators 8:45
Logical Operators 8:59
Unless 10:19
Case 10:58
Ternary Operator 12:14
Loop Next Break 12:19
While 14:21
Until 15:09
For Loops 15:48
Each 16:40
Functions 17:54
Exception Handling 19:28
Strings 21:47
Chop Chomp 27:45
Class Objects 29:29
Inheritance 33:19
Modules 34:23
Polymorphism 38:20
Symbols 40:11
Arrays 41:26
Hashes 45:43
Enumerables 49:21
File I/O 52:05

#Ruby #Programming

learn ruby

Ruby Programming,Ruby (Programming Language),Ruby Tutorial,Ruby Programming Tutorial,Programming Language (Software Genre)

33 Replies to “Ruby Programming”

  1. Learn in One Videos for Every Programming Language
    Subscribe to Bookmark them: http://bit.ly/2FWQZTx
    C++ : https://youtu.be/Rub-JsjMhWY
    Python : https://youtu.be/N4mEzFDjqtA
    Java : https://youtu.be/n-xAqcBCws4
    PHP : https://youtu.be/7TF00hJI78Y
    MySQL : https://youtu.be/yPu6qV5byu4
    JavaScript : https://youtu.be/fju9ii8YsGs
    C# : https://youtu.be/lisiwUZJXqQ
    HTML5 : https://youtu.be/kDyJN7qQETA
    CSS3 : https://youtu.be/CUxH_rWSI1k
    JQuery : https://youtu.be/BWXggB-T1jQ
    TypeScript : https://youtu.be/-PR_XqW9JJU
    ECMAScript : https://youtu.be/Jakoi0G8lBg
    Swift : https://youtu.be/dKaojOZ-az8
    R : https://youtu.be/s3FozVfd7q4
    Haskell : https://youtu.be/02_H3LjqMr8
    Handlebars : https://youtu.be/4HuAnM6b2d8
    Bootstrap : https://youtu.be/gqOEoUR5RHg
    Rust : https://youtu.be/U1EFgCNLDB8
    Matlab : https://youtu.be/NSSTkkKRabI
    Arduino : https://youtu.be/QO_Jlz1qpDw
    Crystal : https://youtu.be/DxFP-Wjqtsc
    Emacs : https://youtu.be/Iagbv974GlQ
    Clojure : https://youtu.be/ciGyHkDuPAE
    Shell : https://youtu.be/hwrnmQumtPw
    Perl : https://youtu.be/WEghIXs8F6c
    Perl6 : https://youtu.be/l0zPwhgWTgM
    Elixir : https://youtu.be/pBNOavRoNL0
    D : https://youtu.be/rwZFTnf9bDU
    Fortran : https://youtu.be/__2UgFNYgf8
    LaTeX : https://youtu.be/VhmkLrOjLsw
    F# : https://youtu.be/c7eNDJN758U
    Kotlin : https://youtu.be/H_oGi8uuDpA
    Erlang : https://youtu.be/IEhwc2q1zG4
    Groovy : https://youtu.be/B98jc8hdu9g
    Scala : https://youtu.be/DzFt0YkZo8M
    Lua : https://youtu.be/iMacxZQMPXs
    Ruby : https://youtu.be/Dji9ALCgfpM
    Go : https://youtu.be/CF9S4QZuV30
    Objective C : https://youtu.be/5esQqZIJ83g
    Prolog : https://youtu.be/SykxWpFwMGs
    LISP : https://youtu.be/ymSq4wHrqyU
    Express : https://youtu.be/xDCKcNBFsuI
    Jade : https://youtu.be/l5AXcXAP4r8
    Sass : https://youtu.be/wz3kElLbEHE

  2. 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

  3. 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

  4. 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

  5. This was great, so useful to have a quick summary of key syntax, to help me move from other languages to Ruby.

    I just wanted to note that at 47:56 you describe `.merge()` as keeping all the keys and values even if they matched, which is a bit confusing. My understanding of how merge works (though this might have changed in Ruby since you made this), is that .merge() returns a new hash with the updated values, where as .update() changes the values in place. Not that the old and new keys and values are kept in the same hash, which does not make a lot of sense based on how hashes work.

  6. 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.

  7. 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
    """

  8. 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
    """

  9. 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
    """

  10. 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. 🙂

  11. 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. 💗💗💗

  12. can someone explain how come at 13:53 the unless operator printed out the even numbers? I thought that would only print out the odd numbers because unless is basically used for false statements

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

Leave a Reply