Language Assessment for a More Equitable Era: Featuring Innovative Sessions

Language Assessment for a More Equitable Era: Featuring Innovative Sessions
Slide Note
Embed
Share

Cutting-edge topics in language assessment, including AI applications, remote proctoring, and discourse analysis. Engage with experts and stay updated on the latest trends in language testing. Enhance your knowledge and contribute to the reform of assessment systems.

  • Language Assessment
  • Technology
  • AI Applications
  • Remote Proctoring
  • Discourse Analysis

Uploaded on Apr 13, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Chapter 2 - OOP More about OOP Presented by: Maciej Mensfeld maciej@mensfeld.pl dev.mensfeld.pl github.com/mensfeld Maciej Mensfeld

  2. Chapter 2 - OOP Classes Maciej Mensfeld

  3. Chapter 2 - OOP Variables in a Ruby Class Ruby provides four types of variables: Local Variables: Local variables are the variables that are defined in a method. Local variables are not available outside the method. Instance Variables: Instance variables are available across methods for any particular instance or object. That means that instance variables change from object to object. Instance variables are preceded by the at sign (@) followed by the variable name. Maciej Mensfeld

  4. Chapter 2 - OOP Variables in a Ruby Class Ruby provides four types of variables: Class Variables: Class variables are available across different objects. A class variable belongs to the class and is a characteristic of a class. They are preceded by the sign @@ and are followed by the variable name. Global Variables: Class variables are not available across classes. If you want to have a single variable, which is available across classes, you need to define a global variable. The global variables are always preceded by the dollar sign ($). Maciej Mensfeld

  5. Chapter 2 - OOP Custom Method to create Objects When you plan to declare the new method with parameters, you need to declare the method initialize at the time of the class creation. The initialize method is a special type of method, which will be executed when the new method of the class is called with parameters. Maciej Mensfeld

  6. Chapter 2 - The accessors & setters The accessor & setter methods Accessors Maciej Mensfeld

  7. Chapter 2 - The accessors & setters The accessor & setter methods Setters Maciej Mensfeld

  8. Chapter 2 - The accessors & setters The accessor & setter methods Setters + getters Maciej Mensfeld

  9. Chapter 2 - Access Control Access Control Maciej Mensfeld

  10. Chapter 2 - Access Control Access Control Public Methods: Public methods can be called by anyone. Methods are public by default except for initialize, which is always private. Protected Methods: A protected method can be invoked only by objects of the defining class and its subclasses. Access is kept within the family. Private Methods: Private methods cannot be accessed, or even viewed from outside the class. Only the class methods can access private members. Maciej Mensfeld

  11. Chapter 2 - Inheritance Class Inheritance This is how it works Maciej Mensfeld

  12. Chapter 2 - Inheritance Class Inheritance Ruby does not support Multiple level of inheritances but Ruby supports mixins. A mixin is like a specialized implementation of multiple inheritance in which only the interface portion is inherited. Maciej Mensfeld

  13. Chapter 2 lets do programming! A bit of programming Maciej Mensfeld

  14. Chapter 2 writing some cool stuff Web crawler! Enough theory! Let s be pragmatic! Fetch and store urls Simple web crawler requirements Search 4 keywords (support regexp) Don t revisit urls Print results Maciej Mensfeld

  15. Chapter 2 writing some cool stuff Web crawler page content parser What do we need? Parser Crawler Extracts data from page content Crawl all available pages Maciej Mensfeld

  16. Chapter 2 writing some cool stuff Simple parser 13LOC attr_reader set instance variable as readonly from the outside attr_accessor make instanca variable R/W from the outside Maciej Mensfeld

  17. Chapter 2 writing some cool stuff Simple parser 13LOC Try it out! Maciej Mensfeld

  18. Chapter 2 writing some cool stuff Crawler How should it work? Try to download page No Select another page Success? Yes Do something with result (parse, send, etc) Mark page as visited Maciej Mensfeld

  19. Chapter 2 writing some cool stuff Crawler 37LOC We will check only pages with specified extensions (html, asp, php, etc) Try it out! Add our start url to a @new_urls array (basicly create @new_urls array with one address in it) No pages where visited yet so @visited_urls = [] (empty array) Maciej Mensfeld

  20. Chapter 2 writing some cool stuff Crawler read page in Ruby Reading pages in Ruby is easy! Try it out! Mark page as visited (add it to @visited_urls array) Load current content page (parse URL and address) Catch any type of exception (404, 500, etc) mark page as visited so we don t go there again and return false Maciej Mensfeld 20/23

  21. Chapter 2 writing some cool stuff Crawler extract URLs Reading pages in Ruby is easy! Try it out! Use URI.extract method to extract all urls from @current_content Check if URL is valid (try to parse it and check extension) If anything failes assume that this URL is incorrect Maciej Mensfeld

  22. Chapter 2 writing some cool stuff Crawler run crawler! Try it out! Maciej Mensfeld

  23. Chapter 2 - OOP THX Presented by: Maciej Mensfeld maciej@mensfeld.pl dev.mensfeld.pl github.com/mensfeld Maciej Mensfeld

Related


More Related Content