title
Ruby Programming

description
Get the Code Here : http://goo.gl/1QMv0a Best Ruby Book : http://goo.gl/heuCJo MY UDEMY COURSES ARE 87.5% OFF TIL December 19th ($9.99) ONE IS FREE ➡️ Python Data Science Series for $9.99 : Highest Rated & Largest Python Udemy Course + 56 Hrs + 200 Videos + Data Science https://bit.ly/Master_Python_41 ➡️ C++ Programming Bootcamp Series for $9.99 : Over 23 Hrs + 53 Videos + Quizzes + Graded Assignments + New Videos Every Month https://bit.ly/C_Course_41 ➡️ FREE 15 hour Golang Course!!! : https://bit.ly/go-tutorial3 Support me on Patreon : https://www.patreon.com/derekbanas 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

detail
{'title': 'Ruby Programming', 'heatmap': [{'end': 1868.489, 'start': 1764.336, 'weight': 0.775}, {'end': 2100.803, 'start': 2031.057, 'weight': 1}, {'end': 2231.922, 'start': 2195.626, 'weight': 0.732}, {'end': 2603.91, 'start': 2563.329, 'weight': 0.791}], 'summary': "'ruby programming' delves into the ruby programming language, covering 95% of its dynamic, interpreted, and object-oriented nature, emphasizing its association with rails, and providing resources for further learning. it also explores fundamentals, data types, file operations, conditional statements, coding concepts, string manipulation, objects, classes, inheritance, modules, polymorphism, and data type manipulation with comprehensive examples and detailed explanations.", 'chapters': [{'end': 72.827, 'segs': [{'end': 37.076, 'src': 'embed', 'start': 0.12, 'weight': 0, 'content': [{'end': 2.901, 'text': 'Well hello internet and welcome to my Ruby programming tutorial.', 'start': 0.12, 'duration': 2.781}, {'end': 9.463, 'text': "In this one tutorial, I'm going to cover pretty much 95% of the Ruby programming language, all of the basic syntax.", 'start': 2.941, 'duration': 6.522}, {'end': 17.566, 'text': 'And Ruby is basically a dynamic, interpreted, object-oriented language in which everything is an object and all of those objects can be overwritten.', 'start': 9.743, 'duration': 7.823}, {'end': 23.728, 'text': 'Ruby is one of the easiest languages to read and learn, and with Rails, it just might be the best web development option.', 'start': 17.766, 'duration': 5.962}, {'end': 31.372, 'text': 'period. In the description underneath this video, you will find easy links to all the individual pieces of the Ruby programming language that I cover,', 'start': 24.008, 'duration': 7.364}, {'end': 37.076, 'text': 'as well as a link to all of the code that is heavily commented and easily transcribed.', 'start': 31.372, 'duration': 5.704}], 'summary': 'Ruby tutorial covers 95% of language, easy to learn, best web development with rails.', 'duration': 36.956, 'max_score': 0.12, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM120.jpg'}, {'end': 83.193, 'src': 'embed', 'start': 53.912, 'weight': 3, 'content': [{'end': 56.233, 'text': "And if you want to install Ruby, I'm not going to go through that.", 'start': 53.912, 'duration': 2.321}, {'end': 57.053, 'text': "It's very easy.", 'start': 56.273, 'duration': 0.78}, {'end': 61.794, 'text': 'Just go to ruby-lang.org and then whatever and installation.', 'start': 57.093, 'duration': 4.701}, {'end': 68.216, 'text': "And here you'll find all of the information you need as well as easy installers depending upon what operating system you're using.", 'start': 62.074, 'duration': 6.142}, {'end': 72.827, 'text': "Alright, so in this first part, I'm just going to briefly cover a whole bunch of different things.", 'start': 68.584, 'duration': 4.243}, {'end': 77.65, 'text': 'If you want to put a comment in, just put a hash symbol, and that is a comment.', 'start': 73.187, 'duration': 4.463}, {'end': 80.471, 'text': "I'm going to go over other different comments as well as we continue.", 'start': 77.67, 'duration': 2.801}, {'end': 83.193, 'text': 'If you want to print something to the screen, very easy to do.', 'start': 80.491, 'duration': 2.702}], 'summary': 'Installing ruby is easy; visit ruby-lang.org for info and installers.', 'duration': 29.281, 'max_score': 53.912, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM53912.jpg'}], 'start': 0.12, 'title': 'Ruby programming', 'summary': 'Covers 95% of the ruby programming language, emphasizing its dynamic, interpreted, and object-oriented nature, and its association with rails as a strong web development option, and provides resources for further learning and code transcription.', 'chapters': [{'end': 72.827, 'start': 0.12, 'title': 'Ruby programming tutorial', 'summary': 'Covers 95% of the ruby programming language, highlighting its dynamic, interpreted, and object-oriented nature, and its association with rails as a strong web development option. it also provides resources for further learning and code transcription.', 'duration': 72.707, 'highlights': ['Ruby is a dynamic, interpreted, object-oriented language, covering 95% of the basic syntax, and all objects can be overwritten.', 'Ruby is considered one of the easiest languages to read and learn, and is noted for its suitability for web development with Rails.', 'The tutorial provides easy access to individual pieces of the Ruby programming language and heavily commented code for transcription.', 'The tutorial emphasizes the ease of installing Ruby and provides resources for installation depending on the operating system.']}], 'duration': 72.707, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM120.jpg', 'highlights': ['Ruby is a dynamic, interpreted, object-oriented language, covering 95% of the basic syntax, and all objects can be overwritten.', 'Ruby is considered one of the easiest languages to read and learn, and is noted for its suitability for web development with Rails.', 'The tutorial provides easy access to individual pieces of the Ruby programming language and heavily commented code for transcription.', 'The tutorial emphasizes the ease of installing Ruby and provides resources for installation depending on the operating system.']}, {'end': 406.197, 'segs': [{'end': 184.701, 'src': 'embed', 'start': 93.819, 'weight': 0, 'content': [{'end': 99.442, 'text': "after the underscore or lowercase letters you're then going to be allowed to use numbers in your variable names.", 'start': 93.819, 'duration': 5.623}, {'end': 101.183, 'text': "let's say i just go and create.", 'start': 99.442, 'duration': 1.741}, {'end': 107.886, 'text': 'the normal way of creating variables is to use dashes between or underscores between all the different words in your variable names.', 'start': 101.183, 'duration': 6.703}, {'end': 111.668, 'text': 'And if I want to get data from the user, I just type in gets.', 'start': 108.206, 'duration': 3.462}, {'end': 117.61, 'text': 'And then if I want to convert that from a string to an integer, I would just put .to underscore i.', 'start': 111.948, 'duration': 5.662}, {'end': 119.971, 'text': 'I could then ask them for another value.', 'start': 117.61, 'duration': 2.361}, {'end': 122.672, 'text': 'Enter another value.', 'start': 120.311, 'duration': 2.361}, {'end': 126.034, 'text': 'And then get that one as well using gets once again.', 'start': 123.013, 'duration': 3.021}, {'end': 128.574, 'text': "And it's very important to convert it to an integer.", 'start': 126.374, 'duration': 2.2}, {'end': 131.617, 'text': 'Then another way we can output data is using puts.', 'start': 128.775, 'duration': 2.842}, {'end': 138.362, 'text': 'And the difference between print and puts is print will not put a new line after it prints out your string on the screen,', 'start': 131.957, 'duration': 6.405}, {'end': 140.524, 'text': 'while puts will put a new line.', 'start': 138.362, 'duration': 2.162}, {'end': 143.947, 'text': "And let's say that we wanted to say something like first number.", 'start': 140.724, 'duration': 3.223}, {'end': 146.328, 'text': 'We want to convert this back to a string to do so.', 'start': 144.147, 'duration': 2.181}, {'end': 147.85, 'text': 'Just put 2 underscore s.', 'start': 146.408, 'duration': 1.442}, {'end': 154.653, 'text': 'If you want to concatenate or combine strings, you just put the plus sign and I could put something like plus like this,', 'start': 148.61, 'duration': 6.043}, {'end': 162.336, 'text': "and then continue on with second number to underscore s plus equal to, and you can see I'm just continuing to add these together.", 'start': 154.653, 'duration': 7.683}, {'end': 167.218, 'text': 'You can skip over to the next line and of course you do not need to put a semicolon at the end of every statement.', 'start': 162.376, 'duration': 4.842}, {'end': 171.223, 'text': 'And then if I wanted to actually perform some arithmetic inside of here, I could do so.', 'start': 167.438, 'duration': 3.785}, {'end': 173.346, 'text': 'And then I would just convert that to a string.', 'start': 171.443, 'duration': 1.903}, {'end': 177.692, 'text': 'And if we come over here, and you can see the name of my file is Ruby or not Ruby.', 'start': 173.586, 'duration': 4.106}, {'end': 184.701, 'text': "And I'm just going to type in Ruby to execute it, followed by the RB extension, which is the extension for all Ruby files.", 'start': 178.112, 'duration': 6.589}], 'summary': 'Ruby variables, input, output, and string manipulation demonstrated in code execution.', 'duration': 90.882, 'max_score': 93.819, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM93819.jpg'}, {'end': 242.614, 'src': 'embed', 'start': 216.647, 'weight': 4, 'content': [{'end': 222.529, 'text': 'and Ruby uses a different way of storing integers that allows you to basically be able to store numbers that are that large.', 'start': 216.647, 'duration': 5.882}, {'end': 226.31, 'text': "now let's say I come in here and let's create another integer.", 'start': 222.529, 'duration': 3.781}, {'end': 230.511, 'text': 'just to show you an example of the accuracy of floats.', 'start': 226.31, 'duration': 4.201}, {'end': 231.471, 'text': 'and this is a float.', 'start': 230.511, 'duration': 0.96}, {'end': 236.772, 'text': "let's just say it's 1.000, and then let's store another float inside of here.", 'start': 231.471, 'duration': 5.301}, {'end': 242.614, 'text': 'and one thing to remember about floats is there must always be a number before the decimal place whenever you define them,', 'start': 236.772, 'duration': 5.842}], 'summary': 'Ruby can store large integers and requires a number before the decimal point in floats.', 'duration': 25.967, 'max_score': 216.647, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM216647.jpg'}, {'end': 289.496, 'src': 'embed', 'start': 258.414, 'weight': 5, 'content': [{'end': 264.799, 'text': 'if we execute it, you can see that it is quite accurate up until it gets to the very, very end of this float, where it has that nine.', 'start': 258.414, 'duration': 6.385}, {'end': 270.103, 'text': 'basically, with floats, you can trust that 14 digits of accuracy is a basic norm.', 'start': 264.799, 'duration': 5.304}, {'end': 275.548, 'text': "so let's come in here and create a big float and there you go and then let's perform a little bit of arithmetic here.", 'start': 270.103, 'duration': 5.445}, {'end': 278.068, 'text': 'big float plus.', 'start': 276.267, 'duration': 1.801}, {'end': 289.496, 'text': 'remember, always put the zero there and you can see that while it will be able to store up to 14 digits of accuracy if we try to perform a calculation like this that it is not so accurate in performing that calculation.', 'start': 278.068, 'duration': 11.428}], 'summary': 'Floats offer about 14 digits of accuracy, showing inaccuracy in complex calculations.', 'duration': 31.082, 'max_score': 258.414, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM258414.jpg'}, {'end': 329.963, 'src': 'embed', 'start': 295.12, 'weight': 6, 'content': [{'end': 300.964, 'text': "Now, I said before that every single thing inside of Ruby is an object, and let's just prove that.", 'start': 295.12, 'duration': 5.844}, {'end': 306.148, 'text': 'If we come in here and type in 1.class, which is going to return the class of whatever precedes it.', 'start': 301.004, 'duration': 5.144}, {'end': 308.85, 'text': 'We could even put a float inside here, .class.', 'start': 306.388, 'duration': 2.462}, {'end': 313.413, 'text': 'And of course we could come in and put a string inside of here, .class.', 'start': 309.17, 'duration': 4.243}, {'end': 318.777, 'text': "And if we execute that, you're going to see that this comes back as a fixed number, float, and string.", 'start': 313.833, 'duration': 4.944}, {'end': 323.999, 'text': "We'll get more examples of exactly what a object is inside of Ruby, basically everything.", 'start': 319.136, 'duration': 4.863}, {'end': 329.963, 'text': 'Now a constant is going to start with an uppercase letter, so we can put something like a constant like that, and 3.14.', 'start': 324.239, 'duration': 5.724}], 'summary': 'In ruby, everything is an object, demonstrated by 1, float, and string returning their respective classes.', 'duration': 34.843, 'max_score': 295.12, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM295120.jpg'}], 'start': 73.187, 'title': 'Ruby programming fundamentals and data types', 'summary': 'Covers basics of ruby programming including variable declaration, user input, data type conversion, concatenation of strings, and outputting data to the screen. it also covers basic arithmetic operations, integer and float data types, highlighting the accuracy of floats, object-oriented nature of ruby, usage of constants, file handling, and the limitations of float arithmetic.', 'chapters': [{'end': 184.701, 'start': 73.187, 'title': 'Ruby programming basics', 'summary': 'Covers basics of ruby programming including variable declaration, user input, data type conversion, concatenation of strings, and outputting data to the screen.', 'duration': 111.514, 'highlights': ['Variables are declared using lowercase letters or underscores, and can include numbers in the name.', "User input can be obtained using 'gets' and can be converted to integer using '.to_i'.", "Outputting data can be done using 'puts', and concatenating strings is achieved using the plus sign.", "The difference between 'print' and 'puts' is that 'print' does not put a new line after printing the string, while 'puts' does."]}, {'end': 406.197, 'start': 185.021, 'title': 'Ruby data types and operations', 'summary': 'Covers basic arithmetic operations, integer and float data types, object-oriented nature of ruby, usage of constants and file handling, highlighting the accuracy of floats, object-oriented nature of ruby, usage of constants and file handling, and the limitations of float arithmetic.', 'duration': 221.176, 'highlights': ['Ruby can accurately store large integers and perform arithmetic operations. Ruby can hold extremely large integers without decimal places and can accurately perform arithmetic operations.', 'Floats in Ruby have limitations in accuracy, with 14 digits being the basic norm. Floats in Ruby have a basic norm of 14 digits of accuracy, but limitations arise in performing calculations beyond this accuracy.', 'Everything in Ruby is treated as an object, including integers, floats, and strings. In Ruby, everything is considered an object, including integers, floats, and strings, as demonstrated by using the .class method.', 'Constants in Ruby are identified by starting with an uppercase letter, and their values can be changed despite being labeled as constants. Constants in Ruby start with an uppercase letter, however, their values can be changed, resulting in a warning but still allowing the change.', 'File handling in Ruby involves creating, writing to, and reading from files using the file object. File handling in Ruby includes creating, writing to, and reading from files using the file object, as demonstrated by creating a file, writing text into it, and reading from it.']}], 'duration': 333.01, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM73187.jpg', 'highlights': ['Variables are declared using lowercase letters or underscores, and can include numbers in the name.', "User input can be obtained using 'gets' and can be converted to integer using '.to_i'.", "Outputting data can be done using 'puts', and concatenating strings is achieved using the plus sign.", "The difference between 'print' and 'puts' is that 'print' does not put a new line after printing the string, while 'puts' does.", 'Ruby can accurately store large integers and perform arithmetic operations.', 'Floats in Ruby have limitations in accuracy, with 14 digits being the basic norm.', 'Everything in Ruby is treated as an object, including integers, floats, and strings.', 'Constants in Ruby are identified by starting with an uppercase letter, and their values can be changed despite being labeled as constants.', 'File handling in Ruby involves creating, writing to, and reading from files using the file object.']}, {'end': 1304.57, 'segs': [{'end': 437.583, 'src': 'embed', 'start': 406.678, 'weight': 0, 'content': [{'end': 410.661, 'text': 'could do that just that easily and as you can see, data from file is random text.', 'start': 406.678, 'duration': 3.983}, {'end': 411.342, 'text': 'just that easily.', 'start': 410.661, 'duration': 0.681}, {'end': 416.766, 'text': "we're creating a file, wrote to it, closed it, reopened it, read from it, now put the data on the screen and then finally,", 'start': 411.342, 'duration': 5.424}, {'end': 421.249, 'text': 'if you wanted to also come in here and load and execute code in another ruby file,', 'start': 416.766, 'duration': 4.483}, {'end': 428.895, 'text': "let's say we have one called ruby or not ruby.rb and let's say give that 2 as a value.", 'start': 421.249, 'duration': 7.646}, {'end': 437.583, 'text': 'we could then come over here and create ruby or not ruby 2 and just say hello from ruby or not ruby 2,', 'start': 428.895, 'duration': 8.688}], 'summary': 'Demonstrated file operations and code execution in ruby, manipulating data and creating a new file.', 'duration': 30.905, 'max_score': 406.678, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM406678.jpg'}, {'end': 504.782, 'src': 'embed', 'start': 468.245, 'weight': 2, 'content': [{'end': 472.508, 'text': 'We could come in here now and use if statements to compare values.', 'start': 468.245, 'duration': 4.263}, {'end': 481.013, 'text': 'So we could say something like if age is greater than or equal to five, we can also use logical operators like and or or not,', 'start': 472.608, 'duration': 8.405}, {'end': 484.896, 'text': 'and then we can go age is less than or equal to six.', 'start': 481.013, 'duration': 3.883}, {'end': 486.077, 'text': 'we could then come in here.', 'start': 484.896, 'duration': 1.181}, {'end': 493.021, 'text': "don't need the curly braces, you might be used to say something like you're in kindergarten, like that.", 'start': 486.077, 'duration': 6.944}, {'end': 504.782, 'text': "we could then come in and go else if age is greater than or equal to 7, and age is less than or equal to 13,, and I'll put some different data.", 'start': 493.021, 'duration': 11.761}], 'summary': 'Using conditional statements to check age for school categories.', 'duration': 36.537, 'max_score': 468.245, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM468245.jpg'}, {'end': 581.652, 'src': 'embed', 'start': 556.576, 'weight': 1, 'content': [{'end': 566.923, 'text': "And just to give you a demonstration of those, let's say we have true and false is equal to plus true and false dot toString.", 'start': 556.576, 'duration': 10.347}, {'end': 571.045, 'text': "And let's do the same thing for your other logical operators.", 'start': 567.203, 'duration': 3.842}, {'end': 573.347, 'text': 'So here is or and or.', 'start': 571.145, 'duration': 2.202}, {'end': 578.89, 'text': "And then not, let's just say not like that and not like that, which is going to return the opposite.", 'start': 573.367, 'duration': 5.523}, {'end': 581.652, 'text': 'And there you can see exactly how those logical operators work.', 'start': 579.11, 'duration': 2.542}], 'summary': 'Demonstration of logical operators: true/false, and, or, not.', 'duration': 25.076, 'max_score': 556.576, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM556576.jpg'}, {'end': 668.964, 'src': 'embed', 'start': 642.037, 'weight': 3, 'content': [{'end': 646.419, 'text': "that's how, unless works as a bunch of different ways to do comparisons inside a ruby,", 'start': 642.037, 'duration': 4.382}, {'end': 657.846, 'text': "you're also going to be able to come in here and add conditions to the output so we can say you are young, is going to execute if age is less than 30,", 'start': 646.419, 'duration': 11.427}, {'end': 659.006, 'text': 'and you can see that it did.', 'start': 657.846, 'duration': 1.16}, {'end': 662.168, 'text': 'another way of comparing things is using the case statement.', 'start': 659.006, 'duration': 3.162}, {'end': 668.964, 'text': 'so we can say something like print, enter greeting, go and get that greeting from the user equal to gets.', 'start': 662.168, 'duration': 6.796}], 'summary': 'Ruby allows for various comparison methods, including using conditions and case statements for executing specific actions based on user input.', 'duration': 26.927, 'max_score': 642.037, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM642037.jpg'}, {'end': 983.238, 'src': 'embed', 'start': 951.398, 'weight': 7, 'content': [{'end': 953.499, 'text': 'All these are sort of considered for loops.', 'start': 951.398, 'duration': 2.101}, {'end': 957.422, 'text': "We could create here an array, and I'll get more into arrays later on.", 'start': 953.819, 'duration': 3.603}, {'end': 961.204, 'text': "It's just basically a box that contains a bunch of different values in memory.", 'start': 957.442, 'duration': 3.762}, {'end': 962.205, 'text': "So there's numbers.", 'start': 961.424, 'duration': 0.781}, {'end': 965.827, 'text': 'We could come in and go for number in numbers.', 'start': 962.605, 'duration': 3.222}, {'end': 969.45, 'text': "And in this situation, it's going to be cycling through this numbers array.", 'start': 966.187, 'duration': 3.263}, {'end': 974.733, 'text': 'And each one of them, as we cycle through, is temporarily going to be stored in a variable called number.', 'start': 969.63, 'duration': 5.103}, {'end': 976.837, 'text': 'We could then output them by going puts.', 'start': 974.977, 'duration': 1.86}, {'end': 983.238, 'text': 'And if you want to have the value of a variable show up inside of a string, you put the hash symbol right like that.', 'start': 977.237, 'duration': 6.001}], 'summary': 'Introduction to arrays and loops in programming with examples.', 'duration': 31.84, 'max_score': 951.398, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM951398.jpg'}, {'end': 1098.812, 'src': 'embed', 'start': 1070.818, 'weight': 6, 'content': [{'end': 1073.619, 'text': 'we can both use conditionals as well as looping.', 'start': 1070.818, 'duration': 2.801}, {'end': 1075.079, 'text': "now let's take a look at functions.", 'start': 1073.619, 'duration': 1.46}, {'end': 1079.78, 'text': "now functions are going to start off with def and then you're going to have your function name.", 'start': 1075.079, 'duration': 4.701}, {'end': 1085.041, 'text': "so let's say add nums and you're going to have parameters, if any, inside of here.", 'start': 1079.78, 'duration': 5.261}, {'end': 1090.623, 'text': "so we'll say num1 and num2 and then you can either return a value or not return a value.", 'start': 1085.041, 'duration': 5.582}, {'end': 1095.247, 'text': "so i'm going to say num1 And I'm going to convert this into an integer.", 'start': 1090.623, 'duration': 4.624}, {'end': 1098.812, 'text': 'And then num2 and convert that into an integer.', 'start': 1095.607, 'duration': 3.205}], 'summary': 'Introduction to using conditionals, looping, and functions in programming.', 'duration': 27.994, 'max_score': 1070.818, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM1070818.jpg'}, {'end': 1197.586, 'src': 'embed', 'start': 1170.731, 'weight': 4, 'content': [{'end': 1175.374, 'text': "We're going to be able to catch exceptions in Ruby using both begin and rescue.", 'start': 1170.731, 'duration': 4.643}, {'end': 1179.657, 'text': "So we're going to say print enter a number.", 'start': 1175.714, 'duration': 3.943}, {'end': 1184.801, 'text': "And once again, we're going to get that value and store it in a variable called first num.", 'start': 1180.017, 'duration': 4.784}, {'end': 1189.004, 'text': "And we'll use gets and then convert it from a string into an integer.", 'start': 1185.101, 'duration': 3.903}, {'end': 1197.586, 'text': "and we'll then say that we want to enter another number and we'll store this in a variable called second num and we'll use gets again.", 'start': 1189.464, 'duration': 8.122}], 'summary': "Demonstrating exception handling in ruby with 'begin' and 'rescue', capturing user input and converting to integers.", 'duration': 26.855, 'max_score': 1170.731, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM1170731.jpg'}], 'start': 406.678, 'title': 'Ruby file operations, conditional statements, coding concepts, and examples', 'summary': 'Covers file operations, including creating, writing, reading, executing code from different files, performing conditional operations using if statements, logical and comparison operators, and case statements. it also covers ruby coding concepts including conditionals, looping, functions, and exceptions, with examples demonstrating their usage and syntax such as creating case statements, using ternary operators, demonstrating loop mechanisms, iterating through arrays, defining and using functions, and handling exceptions with begin and rescue blocks.', 'chapters': [{'end': 662.168, 'start': 406.678, 'title': 'Ruby file operations & conditional statements', 'summary': 'Covers file operations in ruby, including creating, writing, reading, and executing code from different files, as well as performing conditional operations using if statements, logical and comparison operators, and case statements.', 'duration': 255.49, 'highlights': ['Performing file operations in Ruby The chapter demonstrates creating, writing, reading, and executing code from different files in Ruby, showcasing the ease and simplicity of these operations.', "Using if statements and conditional operations It explains the usage of if statements to compare values and execute different statements based on the conditions, including the demonstration of multi-line comments and ending if statements with 'end'.", "Explaining logical and comparison operators It covers the usage of logical operators like 'and', 'or', 'not', as well as comparison operators such as 'equal to', 'not equal to', 'less than', 'greater than', 'less than or equal to', and 'greater than or equal to', with practical demonstrations.", 'Demonstrating case statement and unless operator The chapter explains the usage of the case statement to compare multiple values and the unless operator for executing statements unless a certain condition is met, providing practical examples for better understanding.']}, {'end': 1304.57, 'start': 662.168, 'title': 'Ruby coding concepts and examples', 'summary': 'Covers ruby coding concepts including conditionals, looping, functions, and exceptions, with examples demonstrating their usage and syntax, such as creating case statements, using ternary operators, demonstrating loop mechanisms, iterating through arrays, defining and using functions, and handling exceptions with begin and rescue blocks.', 'duration': 642.402, 'highlights': ["Demonstrating loop mechanisms The speaker demonstrates the use of loop mechanisms in Ruby, including the use of 'loop', 'next' to skip iterations, 'break' to exit the loop, and conditional checks within the loop to print even numbers, showcasing practical examples of each mechanism.", 'Using case statements and ternary operators The chapter covers the usage of case statements for conditional branching, allowing for different output based on user input, as well as the demonstration of the ternary operator to provide different inputs based on a condition, showcasing practical examples of both concepts.', "Iterating through arrays The speaker showcases the iteration through arrays in Ruby, using 'for...in' loop to cycle through array elements, and the 'each' method to iterate through an array, demonstrating the practical implementation of iterating through different types of arrays.", 'Defining and using functions The chapter covers the syntax and usage of defining functions in Ruby, including the use of parameters, returning values, and the scope of variables within functions, with practical examples of defining and invoking functions, illustrating the concepts of function declaration and usage.', "Handling exceptions with begin and rescue blocks The chapter demonstrates the use of begin and rescue blocks to handle exceptions in Ruby, showing the handling of potential errors such as division by zero and raising custom exceptions using 'raise', providing practical examples of error handling in Ruby."]}], 'duration': 897.892, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM406678.jpg', 'highlights': ['Performing file operations in Ruby, showcasing ease and simplicity.', 'Explaining logical and comparison operators with practical demonstrations.', 'Using if statements to compare values and execute different statements.', 'Demonstrating case statement and unless operator with practical examples.', 'Handling exceptions with begin and rescue blocks, providing practical examples.', 'Using case statements for conditional branching and ternary operators.', 'Defining and using functions, including parameters and returning values.', "Demonstrating loop mechanisms, including 'loop', 'next', and 'break'.", "Iterating through arrays using 'for...in' loop and the 'each' method."]}, {'end': 1747.011, 'segs': [{'end': 1333.037, 'src': 'embed', 'start': 1304.57, 'weight': 0, 'content': [{'end': 1309.412, 'text': "there's a whole bunch of different ways to use exceptions inside of ruby now we've been doing a lot of things with strings here,", 'start': 1304.57, 'duration': 4.842}, {'end': 1312.994, 'text': "but let's look specifically at some string functions and a whole bunch of other different things.", 'start': 1309.412, 'duration': 3.582}, {'end': 1318.206, 'text': 'Basically, strings are just a series of characters, either between double quotes or single quotes.', 'start': 1313.322, 'duration': 4.884}, {'end': 1320.527, 'text': "For the most part you're going to use double quotes though.", 'start': 1318.606, 'duration': 1.921}, {'end': 1324.07, 'text': "So let's just come in here and go puts, add them.", 'start': 1320.688, 'duration': 3.382}, {'end': 1327.553, 'text': "and one thing that's important that I didn't cover is, if we put a hash symbol in here,", 'start': 1324.07, 'duration': 3.483}, {'end': 1333.037, 'text': "we'll also be able to do things like perform addition inside of here, a whole bunch of other different things, not just variable names.", 'start': 1327.553, 'duration': 5.484}], 'summary': 'Ruby has various ways to use exceptions, including string functions and character series.', 'duration': 28.467, 'max_score': 1304.57, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM1304570.jpg'}, {'end': 1396.47, 'src': 'embed', 'start': 1355.746, 'weight': 2, 'content': [{'end': 1358.067, 'text': 'and whenever you use single quotes, those do not work.', 'start': 1355.746, 'duration': 2.321}, {'end': 1370.694, 'text': "so something that's important to remember and another reason why we barely ever use single quotes with strings a here doc is normally used whenever you want to use a multi-line string and you want to continue using all of the new lines and things.", 'start': 1358.067, 'duration': 12.627}, {'end': 1373.096, 'text': "so let's just say multi-line string.", 'start': 1370.694, 'duration': 2.402}, {'end': 1378.499, 'text': "and how this would be created is you'd put these two caret symbols here, eom, and then you could go.", 'start': 1373.096, 'duration': 5.403}, {'end': 1387.745, 'text': 'something like this is a very long string that contains interpolation, like,', 'start': 1378.499, 'duration': 9.246}, {'end': 1396.47, 'text': 'and then you put a hash symbol inside of there and say something like four plus five just to do that and then put some new lines inside of here just to prove that the new lines work,', 'start': 1387.745, 'duration': 8.725}], 'summary': 'A here doc is used for multi-line strings with interpolation, avoiding single quotes.', 'duration': 40.724, 'max_score': 1355.746, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM1355746.jpg'}, {'end': 1487.117, 'src': 'embed', 'start': 1462.166, 'weight': 4, 'content': [{'end': 1469.009, 'text': 'there we are and there you can see, true came back for that function and we could also get the number of characters that are inside of that string.', 'start': 1462.166, 'duration': 6.843}, {'end': 1471.09, 'text': "there's 18, Do all kinds of things.", 'start': 1469.009, 'duration': 2.081}, {'end': 1474.111, 'text': "Let's say that we wanted to count the number of vowels inside of here.", 'start': 1471.15, 'duration': 2.961}, {'end': 1478.733, 'text': 'So we could just go vowels and then go full name dot count.', 'start': 1474.231, 'duration': 4.502}, {'end': 1483.015, 'text': "And everything you put inside of here is going to count where it's going to find all of them.", 'start': 1479.013, 'duration': 4.002}, {'end': 1485.116, 'text': 'So A-E-I-O-U.', 'start': 1483.075, 'duration': 2.041}, {'end': 1487.117, 'text': "And let's convert that to a string.", 'start': 1485.396, 'duration': 1.721}], 'summary': 'The string contains 18 characters, and we can count the number of vowels in it.', 'duration': 24.951, 'max_score': 1462.166, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM1462166.jpg'}], 'start': 1304.57, 'title': 'Ruby string manipulation', 'summary': 'Covers different ways to use exceptions in ruby, emphasizing string functions and usage with double quotes, and covers a wide range of string manipulation techniques including concatenation, interpolation, character counting, case transformations, whitespace elimination, string justification, and more.', 'chapters': [{'end': 1412.805, 'start': 1304.57, 'title': 'Ruby exceptions and string usage', 'summary': 'Covers different ways to use exceptions in ruby, focusing on string functions and usage, highlighting the importance of double quotes over single quotes, and demonstrating the creation and printing of multi-line strings.', 'duration': 108.235, 'highlights': ['Strings in Ruby are a series of characters, mainly enclosed in double quotes, allowing for new lines and interpolation, whereas single quotes do not support new lines and are rarely used with strings.', 'A here doc is used for creating multi-line strings in Ruby, allowing for the continuation of new lines and other characters, demonstrated with a specific example containing interpolation and new lines.', 'The chapter also briefly mentions the use of hash symbols inside strings for performing additions and other operations.']}, {'end': 1747.011, 'start': 1412.805, 'title': 'String manipulation in ruby', 'summary': 'Covers string manipulation in ruby, including concatenation, interpolation, checking for string inclusion, counting characters, finding vowels and consonants, checking for equality and object sameness, uppercase and lowercase transformations, eliminating whitespace, justifying text, chopping and chomping strings, deleting specific characters, creating arrays from strings, and splitting strings based on specific delimiters.', 'duration': 334.206, 'highlights': ['The chapter covers string manipulation in Ruby, including concatenation, interpolation, checking for string inclusion, counting characters, finding vowels and consonants, checking for equality and object sameness, uppercase and lowercase transformations, eliminating whitespace, justifying text, chopping and chomping strings, deleting specific characters, creating arrays from strings, and splitting strings based on specific delimiters. The chapter provides a comprehensive overview of string manipulation in Ruby, including various operations such as concatenation, interpolation, inclusion checks, character counting, finding vowels and consonants, equality and object sameness checks, uppercase and lowercase transformations, whitespace elimination, text justification, string chopping and chomping, character deletion, array creation from strings, and splitting strings based on specific delimiters.', 'The chapter covers concatenation and interpolation of strings. It explains how to combine or concatenate strings using the plus sign and interpolation with hash symbols.', 'The chapter demonstrates checking for string inclusion and counting characters within a string. It explains how to check if a string contains a specific substring and count the number of characters inside a string.', 'The chapter explains finding vowels and consonants within a string. It demonstrates how to count the number of vowels and consonants inside a string.', 'The chapter covers checks for equality, object sameness, and transformations to uppercase and lowercase. It covers checking for equality, object sameness, and transforming strings to uppercase and lowercase.', 'The chapter includes functions for eliminating whitespace and justifying text. It explains how to eliminate whitespace from strings and justify text to the left, right, or center.', 'The chapter demonstrates string chopping, chomping, and deletion of specific characters. It covers operations such as chopping off the last character, using chomp to eliminate new lines, and deleting specific characters from strings.', 'The chapter explains creating arrays from strings and splitting strings based on specific delimiters. It demonstrates how to create arrays from strings and split strings based on specific delimiters.']}], 'duration': 442.441, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM1304570.jpg', 'highlights': ['The chapter provides a comprehensive overview of string manipulation in Ruby, including various operations such as concatenation, interpolation, inclusion checks, character counting, finding vowels and consonants, equality and object sameness checks, uppercase and lowercase transformations, whitespace elimination, text justification, string chopping and chomping, character deletion, array creation from strings, and splitting strings based on specific delimiters.', 'Strings in Ruby are a series of characters, mainly enclosed in double quotes, allowing for new lines and interpolation, whereas single quotes do not support new lines and are rarely used with strings.', 'A here doc is used for creating multi-line strings in Ruby, allowing for the continuation of new lines and other characters, demonstrated with a specific example containing interpolation and new lines.', 'The chapter covers concatenation and interpolation of strings. It explains how to combine or concatenate strings using the plus sign and interpolation with hash symbols.', 'The chapter demonstrates checking for string inclusion and counting characters within a string. It explains how to check if a string contains a specific substring and count the number of characters inside a string.']}, {'end': 2302.237, 'segs': [{'end': 1868.489, 'src': 'heatmap', 'start': 1747.371, 'weight': 4, 'content': [{'end': 1751.883, 'text': "And just to reiterate this a little bit, You're going to be able to perform string conversions.", 'start': 1747.371, 'duration': 4.512}, {'end': 1755.767, 'text': 'If you want to convert a string into an integer, you would just put 2 underscore i.', 'start': 1751.923, 'duration': 3.844}, {'end': 1759.031, 'text': 'If you want to convert it into a float, 2 underscore f.', 'start': 1755.767, 'duration': 3.264}, {'end': 1764.096, 'text': "And if you want to convert it into a symbol, which we'll talk about a little bit later, 2 underscore symbol.", 'start': 1759.031, 'duration': 5.065}, {'end': 1769.221, 'text': "And then finally, if you'd like to see the most common backslashes you're going to be able to use, there they are.", 'start': 1764.336, 'duration': 4.885}, {'end': 1774.482, 'text': "Okay, so if everything's an object inside of a Ruby, we might as well talk about objects.", 'start': 1770.379, 'duration': 4.103}, {'end': 1782.268, 'text': 'Now, in object-oriented language, we basically are going to model real-world objects using classes and, just like everyday objects,', 'start': 1774.782, 'duration': 7.486}, {'end': 1786.171, 'text': 'every object is going to have attributes, which we are going to call instance variables.', 'start': 1782.268, 'duration': 3.903}, {'end': 1789.292, 'text': 'as well as capabilities, which we are going to call methods.', 'start': 1786.551, 'duration': 2.741}, {'end': 1792.854, 'text': "now let's say that we have a class called animal.", 'start': 1789.292, 'duration': 3.562}, {'end': 1793.515, 'text': 'inside of it.', 'start': 1792.854, 'duration': 0.661}, {'end': 1797.637, 'text': 'you can put an initialize function and this is going to be called anytime.', 'start': 1793.515, 'duration': 4.122}, {'end': 1802.219, 'text': 'a new animal object is going to be created, and this is where you would normally put default values.', 'start': 1797.637, 'duration': 4.582}, {'end': 1812.125, 'text': "here we're just gonna say creating a new animal and that of course I'm gonna show you really easy ways to create setters and getters inside ruby,", 'start': 1802.219, 'duration': 9.906}, {'end': 1814.627, 'text': "but for now i'm just going to create a setter and getter.", 'start': 1812.125, 'duration': 2.502}, {'end': 1816.649, 'text': "let's say it gets past a new name.", 'start': 1814.627, 'duration': 2.022}, {'end': 1819.912, 'text': 'if you wanted to set an instance variable inside of ruby,', 'start': 1816.649, 'duration': 3.263}, {'end': 1828.541, 'text': "you would put the at symbol and then name don't need to do anything else with it and this is going to assign that value like that and of course we're going to want to put end there as well.", 'start': 1819.912, 'duration': 8.629}, {'end': 1835.467, 'text': "we could then define a getter and you just put at name and that's going to automatically return that and put end.", 'start': 1828.541, 'duration': 6.926}, {'end': 1842.05, 'text': 'Another way you could come in here and get a value is def name and then just put name inside there like that.', 'start': 1835.787, 'duration': 6.263}, {'end': 1848.373, 'text': 'And another way you could provide a setter is go def name equal to new underscore name.', 'start': 1842.35, 'duration': 6.023}, {'end': 1852.995, 'text': 'And one of the reasons we use getters and setters is to make sure that bad data never gets in.', 'start': 1848.753, 'duration': 4.242}, {'end': 1858.597, 'text': "So let's say we want to make sure that the name that is passed in is not a numeric number.", 'start': 1853.055, 'duration': 5.542}, {'end': 1860.478, 'text': "We want to make sure we're using characters here.", 'start': 1858.818, 'duration': 1.66}, {'end': 1861.999, 'text': 'We could just go numeric.', 'start': 1860.939, 'duration': 1.06}, {'end': 1862.647, 'text': 'like that.', 'start': 1862.247, 'duration': 0.4}, {'end': 1868.489, 'text': "And if it is a numeric, we're going to say name can't be a number, something like that.", 'start': 1862.907, 'duration': 5.582}], 'summary': 'Ruby allows string conversions and modeling real-world objects using classes and attributes.', 'duration': 54.848, 'max_score': 1747.371, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM1747371.jpg'}, {'end': 1980.361, 'src': 'embed', 'start': 1954.849, 'weight': 0, 'content': [{'end': 1962.082, 'text': 'if you wanted to create all of your setter functions, you just again list all these different instance variables that you want to have,', 'start': 1954.849, 'duration': 7.233}, {'end': 1966.046, 'text': 'and there you go, or you could create all your getters and setters with one statement,', 'start': 1962.082, 'duration': 3.964}, {'end': 1974.275, 'text': "by just typing attr accessor which is normally what you're going to do and type in your instance variables again and wait, there you go.", 'start': 1966.046, 'duration': 8.229}, {'end': 1980.361, 'text': 'now we could come in here and define another function called bark, which is just going to return a generic bark.', 'start': 1974.275, 'duration': 6.086}], 'summary': 'To create setter functions, list instance variables or use attr_accessor. define a bark function as well.', 'duration': 25.512, 'max_score': 1954.849, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM1954849.jpg'}, {'end': 2023.689, 'src': 'embed', 'start': 1994.312, 'weight': 3, 'content': [{'end': 1996.854, 'text': "I'll put rover on the screen with rover name.", 'start': 1994.312, 'duration': 2.542}, {'end': 2000.055, 'text': 'And there you can see Rover prints out on the screen just like we set it.', 'start': 1997.233, 'duration': 2.822}, {'end': 2005.958, 'text': 'Now whenever we inherit from another class, you get all of the methods as well as instance variables automatically.', 'start': 2000.295, 'duration': 5.663}, {'end': 2007.919, 'text': "So let's go and create another class.", 'start': 2006.098, 'duration': 1.821}, {'end': 2010.001, 'text': "And we'll call this German Shepherd.", 'start': 2008.36, 'duration': 1.641}, {'end': 2014.824, 'text': 'And how you inherit from dog in this situation is just putting that caret symbol in there with dog.', 'start': 2010.401, 'duration': 4.423}, {'end': 2019.246, 'text': 'And of course you would be able to come in here and inherit everything but also overwrite.', 'start': 2015.064, 'duration': 4.182}, {'end': 2023.689, 'text': "So let's say you wanted to have loud bark print out instead of generic bark.", 'start': 2019.486, 'duration': 4.203}], 'summary': 'Inheritance allows automatic access to methods and instance variables. overwriting is possible.', 'duration': 29.377, 'max_score': 1994.312, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM1994312.jpg'}, {'end': 2100.803, 'src': 'heatmap', 'start': 2031.057, 'weight': 1, 'content': [{'end': 2031.798, 'text': 'German Shepherd.', 'start': 2031.057, 'duration': 0.741}, {'end': 2032.518, 'text': 'There he is.', 'start': 2032.018, 'duration': 0.5}, {'end': 2033.739, 'text': 'Again, type new.', 'start': 2032.538, 'duration': 1.201}, {'end': 2041.966, 'text': "And you'll be able to come in here and define name even though you didn't define it inside of the German Shepherd class because it was inherited.", 'start': 2034.08, 'duration': 7.886}, {'end': 2046.91, 'text': 'And while we talk about printf, printf is going to be able to do some formatted printing for us.', 'start': 2042.206, 'duration': 4.704}, {'end': 2048.831, 'text': "So let's say we want our strings inside here.", 'start': 2046.95, 'duration': 1.881}, {'end': 2050.934, 'text': 'Strings is going to be a percentage sign and S.', 'start': 2048.891, 'duration': 2.043}, {'end': 2056.28, 'text': 'Then we can go goes, %s, and then we want to throw a new line inside of there.', 'start': 2051.313, 'duration': 4.967}, {'end': 2060.686, 'text': 'We would then be able to go max name and max bark.', 'start': 2056.541, 'duration': 4.145}, {'end': 2062.849, 'text': 'And if we execute it, you can see everything works out.', 'start': 2060.886, 'duration': 1.963}, {'end': 2065.155, 'text': "Now let's talk about modules.", 'start': 2063.813, 'duration': 1.342}, {'end': 2071.179, 'text': "Modules are made up of methods and instance variables, just like classes, but they can't be instantiated,", 'start': 2065.435, 'duration': 5.744}, {'end': 2073.78, 'text': "which means you can't turn them into an object we can use.", 'start': 2071.179, 'duration': 2.601}, {'end': 2077.663, 'text': "The most common reason you're going to use these is to add functionality to a class,", 'start': 2073.8, 'duration': 3.863}, {'end': 2085.568, 'text': "because we're only going to be able to inherit one class when we're creating a class, but we will be able to inherit multiple modules.", 'start': 2077.663, 'duration': 7.905}, {'end': 2089.199, 'text': "Let's start off by creating a couple modules here.", 'start': 2085.899, 'duration': 3.3}, {'end': 2091.101, 'text': "We're going to create one called human.", 'start': 2089.36, 'duration': 1.741}, {'end': 2093.501, 'text': 'And how we create a module is just go module.', 'start': 2091.4, 'duration': 2.101}, {'end': 2095.101, 'text': "And I'm going to call this human.", 'start': 2093.88, 'duration': 1.221}, {'end': 2100.803, 'text': 'Remember, if we want to automatically have our getters and setters set up for us, accessor, there we go.', 'start': 2095.342, 'duration': 5.461}], 'summary': 'Discusses inheritance, formatted printing using printf, and the creation and use of modules in programming.', 'duration': 69.746, 'max_score': 2031.057, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM2031057.jpg'}, {'end': 2100.803, 'src': 'embed', 'start': 2071.179, 'weight': 2, 'content': [{'end': 2073.78, 'text': "which means you can't turn them into an object we can use.", 'start': 2071.179, 'duration': 2.601}, {'end': 2077.663, 'text': "The most common reason you're going to use these is to add functionality to a class,", 'start': 2073.8, 'duration': 3.863}, {'end': 2085.568, 'text': "because we're only going to be able to inherit one class when we're creating a class, but we will be able to inherit multiple modules.", 'start': 2077.663, 'duration': 7.905}, {'end': 2089.199, 'text': "Let's start off by creating a couple modules here.", 'start': 2085.899, 'duration': 3.3}, {'end': 2091.101, 'text': "We're going to create one called human.", 'start': 2089.36, 'duration': 1.741}, {'end': 2093.501, 'text': 'And how we create a module is just go module.', 'start': 2091.4, 'duration': 2.101}, {'end': 2095.101, 'text': "And I'm going to call this human.", 'start': 2093.88, 'duration': 1.221}, {'end': 2100.803, 'text': 'Remember, if we want to automatically have our getters and setters set up for us, accessor, there we go.', 'start': 2095.342, 'duration': 5.461}], 'summary': "Modules add functionality to classes, allowing multiple inheritance. example: creating a 'human' module with automatic getters and setters.", 'duration': 29.624, 'max_score': 2071.179, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM2071179.jpg'}, {'end': 2231.922, 'src': 'heatmap', 'start': 2195.626, 'weight': 0.732, 'content': [{'end': 2204.72, 'text': 'rover is equal to create a new dog object like that and then rover and we could say make sound, and there you can see ger prints out on the screen.', 'start': 2195.626, 'duration': 9.094}, {'end': 2213.822, 'text': 'we could also create a class called scientist and we could include our human module inside of here just by going include human.', 'start': 2204.72, 'duration': 9.102}, {'end': 2220.643, 'text': 'we could also include our smart module inside of here and if you want your module to supersede,', 'start': 2213.822, 'duration': 6.821}, {'end': 2230.421, 'text': 'so that if a function is in both this class as well as the module you are taking it from, you would use prepend instead of include.', 'start': 2220.643, 'duration': 9.778}, {'end': 2231.922, 'text': "And we'll go smart here.", 'start': 2230.702, 'duration': 1.22}], 'summary': 'Creating dog object rover and scientist class with modules included.', 'duration': 36.296, 'max_score': 2195.626, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM2195626.jpg'}, {'end': 2231.922, 'src': 'embed', 'start': 2204.72, 'weight': 1, 'content': [{'end': 2213.822, 'text': 'we could also create a class called scientist and we could include our human module inside of here just by going include human.', 'start': 2204.72, 'duration': 9.102}, {'end': 2220.643, 'text': 'we could also include our smart module inside of here and if you want your module to supersede,', 'start': 2213.822, 'duration': 6.821}, {'end': 2230.421, 'text': 'so that if a function is in both this class as well as the module you are taking it from, you would use prepend instead of include.', 'start': 2220.643, 'duration': 9.778}, {'end': 2231.922, 'text': "And we'll go smart here.", 'start': 2230.702, 'duration': 1.22}], 'summary': 'Creating a scientist class with human and smart modules included.', 'duration': 27.202, 'max_score': 2204.72, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM2204720.jpg'}], 'start': 1747.371, 'title': 'Ruby programming concepts', 'summary': 'Covers ruby objects, classes, inheritance, modules, and polymorphism, including string conversions, modeling real-world objects, creating animal objects, class inheritance, using modules to add functionality, and utilizing polymorphism.', 'chapters': [{'end': 1974.275, 'start': 1747.371, 'title': 'Ruby objects and classes', 'summary': 'Discusses string conversions, modeling real-world objects using classes and instance variables, and creating animal objects in ruby, including creating setters and getters and ensuring data integrity.', 'duration': 226.904, 'highlights': ['In Ruby, string conversions can be performed by using 2 underscore i for integer, 2 underscore f for float, and 2 underscore symbol for symbol.', 'Modeling real-world objects in Ruby involves using classes, instance variables for attributes, and methods for capabilities.', 'In Ruby, creating animal objects involves defining an initialize function for default values, creating setters and getters, and ensuring data integrity using getters and setters.', 'Shortcut for generating getters and setters in Ruby involves using attr_accessor to create all getters and setters with one statement.']}, {'end': 2302.237, 'start': 1974.275, 'title': 'Ruby class inheritance and modules', 'summary': 'Discusses ruby class inheritance, modules, and polymorphism, demonstrating how to create classes, inherit methods and instance variables, use modules to add functionality to classes, and utilize polymorphism', 'duration': 327.962, 'highlights': ['Classes can inherit methods and instance variables automatically When creating a new class, such as German Shepherd, it can inherit all the methods and instance variables from another class, such as Dog, and also have the ability to overwrite them if needed.', 'Modules add functionality to a class and allow multiple inheritance Modules, such as human and smart, are used to add functionality to a class, and a class can inherit multiple modules, providing a way to extend the functionality of the class beyond single inheritance.', "Using 'prepend' in modules allows the module's function to supersede the class's function By using 'prepend' instead of 'include' when including a module in a class, the module's function will take precedence over the class's function, demonstrating how to manipulate method lookup in Ruby."]}], 'duration': 554.866, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM1747371.jpg', 'highlights': ['Shortcut for generating getters and setters in Ruby involves using attr_accessor to create all getters and setters with one statement.', "Using 'prepend' in modules allows the module's function to supersede the class's function By using 'prepend' instead of 'include' when including a module in a class, the module's function will take precedence over the class's function, demonstrating how to manipulate method lookup in Ruby.", 'Modules add functionality to a class and allow multiple inheritance Modules, such as human and smart, are used to add functionality to a class, and a class can inherit multiple modules, providing a way to extend the functionality of the class beyond single inheritance.', 'Classes can inherit methods and instance variables automatically When creating a new class, such as German Shepherd, it can inherit all the methods and instance variables from another class, such as Dog, and also have the ability to overwrite them if needed.', 'In Ruby, creating animal objects involves defining an initialize function for default values, creating setters and getters, and ensuring data integrity using getters and setters.', 'Modeling real-world objects in Ruby involves using classes, instance variables for attributes, and methods for capabilities.', 'In Ruby, string conversions can be performed by using 2 underscore i for integer, 2 underscore f for float, and 2 underscore symbol for symbol.']}, {'end': 3328.638, 'segs': [{'end': 2433.541, 'src': 'embed', 'start': 2400.812, 'weight': 2, 'content': [{'end': 2405.855, 'text': 'tweet prints out for our cardinal, which we have right here, while squawk prints out for the parrot right there.', 'start': 2400.812, 'duration': 5.043}, {'end': 2409.437, 'text': "So here's an example of duct typing and polymorphism inside of Ruby.", 'start': 2406.135, 'duration': 3.302}, {'end': 2412.336, 'text': "Now I'm just going to briefly cover symbols.", 'start': 2409.775, 'duration': 2.561}, {'end': 2417.937, 'text': 'Now symbols inside of Ruby are basically strings that cannot be changed.', 'start': 2412.716, 'duration': 5.221}, {'end': 2422.998, 'text': "And you're normally going to use them to either conserve memory or to speed string comparison.", 'start': 2418.397, 'duration': 4.601}, {'end': 2425.639, 'text': 'And you would usually use a symbol versus a string.', 'start': 2423.198, 'duration': 2.441}, {'end': 2433.541, 'text': "whenever you need a string, that's value doesn't need to change, as well as you need a string in which you do not need access to string methods.", 'start': 2425.639, 'duration': 7.902}], 'summary': 'Ruby allows for duct typing, polymorphism, and immutable symbols for efficient memory usage and string comparison.', 'duration': 32.729, 'max_score': 2400.812, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM2400812.jpg'}, {'end': 2607.092, 'src': 'heatmap', 'start': 2553.843, 'weight': 0, 'content': [{'end': 2559.827, 'text': 'Now, with arrays, they are going to start off storing things in an index of 0, which is very common.', 'start': 2553.843, 'duration': 5.984}, {'end': 2563.269, 'text': 'So if we just typed in 2 here, you can see the 3 shows up.', 'start': 2560.087, 'duration': 3.182}, {'end': 2564.768, 'text': "That's 0, 1, 2.", 'start': 2563.329, 'duration': 1.439}, {'end': 2568.332, 'text': "That's how we're going to get all those different values inside of our array.", 'start': 2564.77, 'duration': 3.562}, {'end': 2576.438, 'text': 'We would also be able to come in and return two values starting at the second index, for example, by just putting 2 and 2 right there.', 'start': 2568.512, 'duration': 7.926}, {'end': 2578.619, 'text': "And I'm going to put join inside of here.", 'start': 2576.818, 'duration': 1.801}, {'end': 2582.982, 'text': "So we'll join all of our results together and separate them with a comma and a space.", 'start': 2578.679, 'duration': 4.303}, {'end': 2584.983, 'text': "And there you can see that's how that worked out.", 'start': 2583.362, 'duration': 1.621}, {'end': 2590.665, 'text': 'We could also come and return values by doing values underscore at.', 'start': 2585.183, 'duration': 5.482}, {'end': 2596.787, 'text': 'And then inside of here, we could list we want the 0 index, the 1 index, and the 3, for example.', 'start': 2590.885, 'duration': 5.902}, {'end': 2603.91, 'text': "And once again, we're going to join those together with a comma and a space and put a dot inside of there because that is a method.", 'start': 2597.107, 'duration': 6.803}, {'end': 2607.092, 'text': 'execute and there you can see it returned those nicely for us.', 'start': 2604.29, 'duration': 2.802}], 'summary': 'Array manipulation and retrieval demonstrated with indices and methods', 'duration': 53.249, 'max_score': 2553.843, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM2553843.jpg'}, {'end': 2763.219, 'src': 'embed', 'start': 2736.344, 'weight': 3, 'content': [{'end': 2739.886, 'text': 'And if we execute, all those things show up right there on our screen.', 'start': 2736.344, 'duration': 3.542}, {'end': 2740.446, 'text': 'So pretty cool.', 'start': 2739.926, 'duration': 0.52}, {'end': 2743.988, 'text': "So that's pretty much everything you want to know about using arrays.", 'start': 2740.706, 'duration': 3.282}, {'end': 2748.03, 'text': "Why don't we look at a close cousin to array called hashes.", 'start': 2744.028, 'duration': 4.002}, {'end': 2750.852, 'text': 'And a hash is just a collection of key-valued pairs.', 'start': 2748.511, 'duration': 2.341}, {'end': 2754.534, 'text': "So let's go and create ourselves a number hash, for example.", 'start': 2751.272, 'duration': 3.262}, {'end': 2756.835, 'text': 'We would use curly braces in this situation.', 'start': 2754.774, 'duration': 2.061}, {'end': 2758.996, 'text': "And first you're going to have your key.", 'start': 2757.215, 'duration': 1.781}, {'end': 2760.757, 'text': 'Instead of indexes, you have keys.', 'start': 2759.257, 'duration': 1.5}, {'end': 2763.219, 'text': "And then you're going to put that little symbol right there.", 'start': 2761.138, 'duration': 2.081}], 'summary': 'Introduction to hashes as key-value pairs in programming.', 'duration': 26.875, 'max_score': 2736.344, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM2736344.jpg'}, {'end': 2990.583, 'src': 'embed', 'start': 2964.869, 'weight': 1, 'content': [{'end': 2971.617, 'text': 'Now a class that includes the enumerable module is going to gain collection capabilities, sort of like we saw with arrays and hashes.', 'start': 2964.869, 'duration': 6.748}, {'end': 2973.598, 'text': "Now let's just come in here and create one.", 'start': 2972.057, 'duration': 1.541}, {'end': 2978.119, 'text': "Let's call it menu and let's say include enumerable just like this.", 'start': 2973.638, 'duration': 4.481}, {'end': 2986.082, 'text': "One requirement however is if you're going to inherit this you're going to have to provide a function that is called each.", 'start': 2978.539, 'duration': 7.543}, {'end': 2990.583, 'text': "Now we're going to put inside of here all the different things that we're going to have in this enumerable.", 'start': 2986.422, 'duration': 4.161}], 'summary': 'Classes with the enumerable module gain collection capabilities, requiring a function called each for inheritance.', 'duration': 25.714, 'max_score': 2964.869, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM2964869.jpg'}], 'start': 2302.557, 'title': 'Ruby data types and manipulation', 'summary': 'Explains duck typing, polymorphism, symbols, and arrays in ruby, with examples and detailed explanations on usage, advantages, and methods, covering arrays, hashes, and enumerables.', 'chapters': [{'end': 2463.524, 'start': 2302.557, 'title': 'Duck typing and polymorphism in ruby', 'summary': 'Explains how duck typing and polymorphism work in ruby, using bird, cardinal, and parrot classes as examples, demonstrating the concept with a specific code example, and also briefly covers the usage and advantages of symbols in ruby.', 'duration': 160.967, 'highlights': ['The chapter explains duck typing and polymorphism in Ruby using a bird, cardinal, and parrot classes as examples, demonstrating the concept with a specific code example. Explanation of duck typing and polymorphism using specific classes and code example', 'The chapter briefly covers the usage and advantages of symbols in Ruby, including memory conservation and speed of string comparison. Brief coverage of symbols in Ruby, including their usage and advantages']}, {'end': 2699.579, 'start': 2463.88, 'title': 'Ruby arrays and symbols', 'summary': 'Introduces the usage of symbols and arrays in ruby, with detailed explanations on creating, accessing, manipulating, and querying arrays, along with examples and methods, including count, include, and empty check.', 'duration': 235.699, 'highlights': ['The chapter introduces the usage of symbols and arrays in Ruby. The transcript delves into the usage of symbols and arrays in Ruby, setting the groundwork for further exploration.', 'Detailed explanations on creating, accessing, manipulating, and querying arrays. The transcript provides detailed explanations on creating arrays using different methods, accessing array elements, and manipulating arrays by adding, removing, and joining elements.', 'Examples and methods, including count, include, and empty check. The transcript includes practical examples and methods such as count to check occurrences, include to verify the presence of a value, and empty check to determine if the array is empty.']}, {'end': 3328.638, 'start': 2699.579, 'title': 'Ruby: arrays, hashes, and enumerables', 'summary': 'Covers the usage of arrays, hashes, and enumerables in ruby, including printing array contents, creating and using hashes, and using the enumerable module to manipulate collections.', 'duration': 629.059, 'highlights': ['The chapter covers the usage of arrays, hashes, and enumerables in Ruby. Covers the fundamental data structures and collection capabilities in Ruby.', "Printing array contents and using each loop to print individual values. Demonstrates printing array contents and iterating through each element using the 'each' loop.", 'Creating and using hashes with keys and values, and adding, updating, and deleting key-value pairs. Explains the creation, manipulation, and deletion of key-value pairs in hashes.', 'Usage of enumerable module to manipulate collections, including finding, selecting, rejecting, and sorting items. Demonstrates various operations on collections using the enumerable module such as finding, selecting, rejecting, and sorting.', 'File object usage, including creating, writing, reading, and appending to files. Explains the usage of the file object for creating, writing, reading, and appending to files in Ruby.']}], 'duration': 1026.081, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/Dji9ALCgfpM/pics/Dji9ALCgfpM2302557.jpg', 'highlights': ['Detailed explanations on creating, accessing, manipulating, and querying arrays. The transcript provides detailed explanations on creating arrays using different methods, accessing array elements, and manipulating arrays by adding, removing, and joining elements.', 'Usage of enumerable module to manipulate collections, including finding, selecting, rejecting, and sorting items. Demonstrates various operations on collections using the enumerable module such as finding, selecting, rejecting, and sorting.', 'The chapter explains duck typing and polymorphism in Ruby using a bird, cardinal, and parrot classes as examples, demonstrating the concept with a specific code example. Explanation of duck typing and polymorphism using specific classes and code example', 'The chapter covers the usage of arrays, hashes, and enumerables in Ruby. Covers the fundamental data structures and collection capabilities in Ruby.', 'Creating and using hashes with keys and values, and adding, updating, and deleting key-value pairs. Explains the creation, manipulation, and deletion of key-value pairs in hashes.']}], 'highlights': ['Ruby is a dynamic, interpreted, object-oriented language, covering 95% of the basic syntax, and all objects can be overwritten.', 'The tutorial provides easy access to individual pieces of the Ruby programming language and heavily commented code for transcription.', 'The tutorial emphasizes the ease of installing Ruby and provides resources for installation depending on the operating system.', 'Variables are declared using lowercase letters or underscores, and can include numbers in the name.', "User input can be obtained using 'gets' and can be converted to integer using '.to_i'.", "Outputting data can be done using 'puts', and concatenating strings is achieved using the plus sign.", 'Ruby can accurately store large integers and perform arithmetic operations.', 'Everything in Ruby is treated as an object, including integers, floats, and strings.', 'Constants in Ruby are identified by starting with an uppercase letter, and their values can be changed despite being labeled as constants.', 'File handling in Ruby involves creating, writing to, and reading from files using the file object.', 'Performing file operations in Ruby, showcasing ease and simplicity.', 'Explaining logical and comparison operators with practical demonstrations.', 'Using if statements to compare values and execute different statements.', 'Handling exceptions with begin and rescue blocks, providing practical examples.', 'Defining and using functions, including parameters and returning values.', 'The chapter provides a comprehensive overview of string manipulation in Ruby, including various operations such as concatenation, interpolation, inclusion checks, character counting, finding vowels and consonants, equality and object sameness checks, uppercase and lowercase transformations, whitespace elimination, text justification, string chopping and chomping, character deletion, array creation from strings, and splitting strings based on specific delimiters.', 'Strings in Ruby are a series of characters, mainly enclosed in double quotes, allowing for new lines and interpolation, whereas single quotes do not support new lines and are rarely used with strings.', 'A here doc is used for creating multi-line strings in Ruby, allowing for the continuation of new lines and other characters, demonstrated with a specific example containing interpolation and new lines.', 'The chapter covers concatenation and interpolation of strings. It explains how to combine or concatenate strings using the plus sign and interpolation with hash symbols.', 'Shortcut for generating getters and setters in Ruby involves using attr_accessor to create all getters and setters with one statement.', "Using 'prepend' in modules allows the module's function to supersede the class's function By using 'prepend' instead of 'include' when including a module in a class, the module's function will take precedence over the class's function, demonstrating how to manipulate method lookup in Ruby.", 'Modules add functionality to a class and allow multiple inheritance Modules, such as human and smart, are used to add functionality to a class, and a class can inherit multiple modules, providing a way to extend the functionality of the class beyond single inheritance.', 'Classes can inherit methods and instance variables automatically When creating a new class, such as German Shepherd, it can inherit all the methods and instance variables from another class, such as Dog, and also have the ability to overwrite them if needed.', 'In Ruby, creating animal objects involves defining an initialize function for default values, creating setters and getters, and ensuring data integrity using getters and setters.', 'Detailed explanations on creating, accessing, manipulating, and querying arrays. The transcript provides detailed explanations on creating arrays using different methods, accessing array elements, and manipulating arrays by adding, removing, and joining elements.', 'Usage of enumerable module to manipulate collections, including finding, selecting, rejecting, and sorting items. Demonstrates various operations on collections using the enumerable module such as finding, selecting, rejecting, and sorting.', 'The chapter explains duck typing and polymorphism in Ruby using a bird, cardinal, and parrot classes as examples, demonstrating the concept with a specific code example.', 'The chapter covers the usage of arrays, hashes, and enumerables in Ruby. Covers the fundamental data structures and collection capabilities in Ruby.', 'Creating and using hashes with keys and values, and adding, updating, and deleting key-value pairs. Explains the creation, manipulation, and deletion of key-value pairs in hashes.']}