A Git tutorial with example and demo.
YouTube Videos
Day 1: https://www.youtube.com/watch?v=XBreuLi79bk
Day 2: https://www.youtube.com/watch?v=5e6i3r5Vz34
This document provides an overview of startup best practices including lean startup methodology, user stories, agile development practices, Git version control, metrics and analytics, and customer acquisition and retention strategies. It emphasizes frequent iteration and customer feedback to build the minimum viable product and validate business assumptions quickly.
This document provides an overview of RSpec testing for Rails applications. It discusses installing and generating RSpec files, different types of RSpec specs including model, controller, view, helper and routing specs. It covers spec syntax for expectations, matchers, factories and stubs. It also mentions features specs using Capybara, debugging techniques, JavaScript testing, and tools like DatabaseCleaner. The document is intended as a tutorial for setting up and writing different kinds of RSpec tests for a Rails application.
A Git tutorial with example and demo.
YouTube Videos
Day 1: https://www.youtube.com/watch?v=XBreuLi79bk
Day 2: https://www.youtube.com/watch?v=5e6i3r5Vz34
This document provides an overview of startup best practices including lean startup methodology, user stories, agile development practices, Git version control, metrics and analytics, and customer acquisition and retention strategies. It emphasizes frequent iteration and customer feedback to build the minimum viable product and validate business assumptions quickly.
This document provides an overview of RSpec testing for Rails applications. It discusses installing and generating RSpec files, different types of RSpec specs including model, controller, view, helper and routing specs. It covers spec syntax for expectations, matchers, factories and stubs. It also mentions features specs using Capybara, debugging techniques, JavaScript testing, and tools like DatabaseCleaner. The document is intended as a tutorial for setting up and writing different kinds of RSpec tests for a Rails application.
This document discusses the benefits of functional programming (FP) that the author learned. It begins by explaining how multithreading programs are difficult to write, test, and ensure thread safety due to mutable shared state. FP avoids these issues by not using mutable variables. The document then covers some key aspects of FP like recursion, higher-order functions, function composition, and immutable data structures. It provides examples in various languages to illustrate these concepts. The author argues that FP provides a good foundation for writing concurrent programs due to its avoidance of mutable state.
This document provides an overview introduction to the Ruby programming language. It discusses what Ruby is, basic syntax, key features like being dynamically typed and object-oriented, implementations, applications, and the ecosystem. It also covers topics like variables, data types, control flow, methods, classes, and encapsulation. Code examples are provided to demonstrate various language constructs.
The document summarizes RubyConf Taiwan 2012. Some key details include:
1) The conference had over 160 attendees including 35 speakers, with about 25 foreign attendees from countries like Japan.
2) Notable speakers included Yukihiro "Matz" Matsumoto, the creator of Ruby, and other Ruby Core Team members.
3) The two-day conference included 15 main talks and 23 lightning talks.
4) The organizers expressed thanks to the speakers, sponsors, and attendees for their participation in making the conference a success.
This document provides an overview of the Ruby programming language. It discusses Ruby's history, design, syntax features like classes, modules, blocks, and metaprogramming. It also covers Ruby implementations like MRI, JRuby, REE, and others. In 3 sentences:
Ruby is a dynamic, reflective, object-oriented scripting language created in the mid-1990s by Yukihiro Matsumoto. It supports features like classes, modules, blocks and closures, duck typing, and metaprogramming. Popular Ruby implementations include MRI, JRuby, REE, and others that provide the Ruby language on different platforms and virtual machines.
The document discusses exception handling in Ruby programming. It begins with an introduction to exception handling and why it is important. Then it covers the main concepts of exception handling in Ruby, including raise, rescue, ensure, retry and else. It also discusses some caveats and guidelines for exception handling, such as only using exceptions for truly unexpected situations and avoiding exception abuse.
Exception Handling: Designing Robust Software in RubyWen-Tien Chang
?
The document discusses exception handling in Ruby. It begins with explaining why exception handling is important for building robust software. It then covers various aspects of exception handling in Ruby including raising exceptions, rescuing exceptions, ensuring code is executed, retrying code, and using else blocks. It provides guidelines for proper exception handling practices such as only raising exceptions for unexpected situations. The document concludes by discussing different failure handling strategies like ensuring exception safety and categorizing operational errors versus programmer errors.
This document provides an introduction to the Ruby on Rails web framework. Some key points:
- Rails is a model-view-controller framework for building database-backed web applications using the Ruby programming language. It emphasizes conventions over configuration for rapid development.
- Rails was created by David Heinemeier Hansson in 2004 and saw major growth and adoption from 2005-2006. It provides features like object-relational mapping and support for Ajax.
- Comparisons between Rails and other technologies like Java show much higher growth and smaller project sizes for Rails applications. Rails allows developers to be more productive and focus on business logic rather than infrastructure code.
Here are some potential caveats with BDD style testing:
1. The framework can feel too "magical" if it uses too much metaprogramming under the hood. The implementation details should not be obscured.
2. Descriptions can become too vague if they only state intentions at a very high level without concrete examples. Tests as documentation only works if the descriptions are clear and specific.
3. There is a risk of duplication if contexts or examples are not properly organized and nested. Descriptions should aim to be DRY.
4. Performance overhead of the framework if it does a lot of runtime reflection or string manipulation. The framework should have a small performance footprint.
5. Tests become brittle
The document discusses Git and GitHub. It begins with an overview of distributed version control systems (DVCS) like Git and how they differ from centralized version control systems. It then covers the basics of Git, including installing Git, initializing repositories, tracking changes, branching and merging. Finally, it discusses GitHub and how developers can use features like forking, pull requests and wikis to collaborate on projects hosted there. Common Git workflows like Git flow are also introduced.
this is 3 hours speech for non IT related students.
I briefly introduce chat bot application, learning path, restful api, and Microsoft bot framework. Finally I run my skype bot project and explain how it works.
Service-Oriented Design and Implement with Rails3Wen-Tien Chang
?
The service implements a RESTful Users web service with Rails 3. It customizes Rails to remove unnecessary components and optimize for a lightweight REST service. The service follows best practices for API design including using JSON format, placing JSON conversion in the controller, and returning appropriate HTTP status codes. Requests are designed to be stateless and atomic. Errors are returned in a standardized JSON format.
The document summarizes changes in Rails 3 including:
1. Bundler is introduced for managing gem dependencies through a Gemfile.
2. The ActiveRecord query interface is updated with method chaining and relations to unify finders, named scopes, and with_scope.
3. The ActiveRecord validation API is updated to use hashes instead of separate validator methods for validation options.
4. Views are updated with automatic XSS escaping, unobtrusive JavaScript, and consistent <%= %> usage for output.
5. Internationalization is updated with %{} instead of {{ }} for translations.
The document introduces Ruby on Rails and provides an overview of its features and benefits. It summarizes the speaker's experience with web development over time, introduces MVC and ORM concepts, and demonstrates Rails through a live coding example. Key advantages of Rails highlighted include its convention over configuration approach, use of Ruby as a dynamic scripting language, and ability to rapidly develop database-backed web applications.
The document provides techniques for designing beautiful Ruby APIs. It discusses 10 techniques: 1) argument processing, 2) code blocks, 3) module, 4) method_missing, 5) const_missing, 6) method chaining, 7) core extension, 8) class macro, 9) instance_eval, and 10) Class.new. For each technique, it provides examples of how it can be implemented and used to create clean, readable APIs in Ruby. It also includes a sub-talk on Ruby's object model and how metaprogramming works.
Rails security best practices involve defending at multiple layers including the network, operating system, web server, web application, and database. The document outlines numerous vulnerabilities at the web application layer such as information leaks, session hijacking, SQL injection, mass assignment, unscoped finds, cross-site scripting (XSS), cross-site request forgery (CSRF), and denial-of-service attacks. It provides recommendations to address each vulnerability through secure coding practices and configuration in Rails.
The document provides performance best practices for Ruby on Rails applications. It discusses avoiding premature optimization, measuring performance bottlenecks, caching, SQL optimizations, and alternative storage options like NoSQL. It also recommends profiling tools like New Relic, Scout, Rack::Bug and ruby-prof to analyze logs and identify slow requests and actions. Benchmarking and integrating performance tests are also suggested for measuring and testing performance.
Distributed Ruby and Rails
This document discusses distributed Ruby programming and using message queues with Ruby on Rails applications. It introduces several distributed Ruby technologies including DRb for remote method invocation, Rinda for distributed tuple spaces, Starfish for map-reduce programming, and the MagLev VM. It also covers various message queue systems like Starling, RabbitMQ, ActiveMQ, and beanstalkd that can be used to build scalable and reliable distributed Ruby applications.