GE143 - 8: Human vs AI system

Related considerations

Dr Robert Batzinger
Instructor Emeritus

2023-10-19

1 Session 8: Other considerations

2 Computer Art Contest

2.1 Example 1:

student walking in front of school with umbrella in the rain day

3 Example 2:

Two handsome men

3.1 Example 3:

Asian girl friend swimming in a cup of tea

3.2 Example 4

Midget man with a pumpkin head riding a pink pony on top of a rainbow, on a spooky halloween day

3.3 Copy.AI

Webspider -> 
         Text parser -> 
            Outline ->
               Talking points ->  
                  Content Developer ->
                      Blog formatter

3.4 Setup

  • What are you looking to create?// Introduction to Ruby on Rails

  • What are the main points you want to cover?// General introduction

  • Choose a tone// Professional

  • Choose an output format:\ Blog

3.5 Target output types

  • Marketing: Digital Ad Copy, Ad Copy Variants, LinkedIn Ad Copy, Sales Copy, Email/Letter, Startup Tools
  • Facebook: Headlines, Link Descriptions, Listicle, Primary Text
  • Google: Headlines, Descriptions
  • Web: Website Copy, Blog Tools, Social Media Tools, Article Writing Tools

3.6 Example

3.6.1 Introduction to Ruby on Rails

If you’ve ever heard of Ruby, chances are that you know about Rails. But what is it? And why should you care about it? Well, let’s break down the basics of how Rails works and how it can help your projects.

3.6.2 The Rails philosophy

The Rails philosophy is a web application framework that you can use to develop web applications on the Ruby on Rails (RoR) development platform. RoR is an open source web application framework created by David Heinemeier Hansson and his team at Basecamp. The framework allows you to create elegant, scalable applications without having to write any code yourself.

3.6.3 The four pillars of RoR are:

Model View Controller (MVC): MVC is a design pattern where your data lives in models and its state is represented by views; then you have controllers that handle the logic behind how these views should be displayed. The controller handles all interactions between user input and business logic while also handling page lifecycle hooks like before_render and after_render .

Code Orientation: RoR’s focus on simplicity makes it easy for developers who are new or experienced alike—whether they’re newbies who need help learning how best use their tools or seasoned professionals who just want more power out of their current ones—to get started quickly without having too much overhead in terms of learning curve time spent getting familiarized with unfamiliar concepts like ActiveRecord::Base relationships versus object attributes versus properties

3.6.4 The Ruby programming language

Ruby is a dynamic, object-oriented programming language that was designed and developed in the mid-1990s by Yukihiro Matsumoto. It is often compared to Perl, Python, and other languages because it has similar syntax but differs from them in some ways.

Ruby’s syntax is similar to JavaScript (which we will discuss later), but unlike JavaScript it does not have curly braces for blocks of code. Instead of curly braces you use square brackets for blocks of code. Here’s an example:

$ puts “Hello World!”$

3.6.5 Don’t Repeat Yourself (DRY)

DRY is a principle of software development that states: Don’t Repeat Yourself. It means you should not write the same code twice in your application, but rather use different methods or classes depending on where they are used. This helps to make sure that if one piece of code needs to be modified, it doesn’t need to be touched elsewhere in order for those changes to take effect.

One example would be if you wanted your model object (in this case an employee) as well as its relationships with other objects such as departments and managers, thus forming what we call an entity-relationship diagram (ERD).

If we were using ActiveRecord which is our ORM toolkit then each time we create a new record via crud actions like create_table() or create_one(), those actions would need updating everywhere else too; but if DRY principles are followed then none of these updates will happen since all models share common properties like id and name so changing those values won’t affect any other entity related objects

3.6.6 Conventions over configuration

Rails is a convention over configuration framework, meaning that it encourages you to follow conventions instead of writing your own custom code. This makes it easy to learn and use, but also has benefits beyond just being easier to use:

You can rely on things like Active Record patterns that are already well-documented and tested (and thus more likely to work).

You don’t need to spend time learning how things work under the hood—you can focus on building things instead of figuring out how they work.

By using some common practices in your codebase and following conventions for naming variables and methods, others will be able to understand what’s going on faster than if you hadn’t followed those rules at all!

3.6.7 What’s the deal with Ruby on Rails?

Ruby on Rails is a web development framework that helps you build web applications. It’s open source, free, and written in Ruby.

Rails allows developers to quickly write clean and simple code while still providing the flexibility they need to add whatever functionality they want. You can also use Ruby on Rails with other languages like Javascript or PHP—it’s compatible with many different programming languages! This makes it easy for developers who work with multiple languages (or know how) because all of the code will be maintained by one central team instead of having to do everything yourself from scratch each time.*

3.6.8 Rails web server

Rails is a web application framework that runs on the Ruby programming language. It provides a DSL for defining routes, models and controllers.

Rails was created by David Heinemeier Hansson in 2004 as an open source project (now available under MIT License). The first version was released in early 2005 and since then it has become one of the most popular frameworks for building web applications with Ruby.

### Creating a simple Rails application
To get started, create a new Rails project by running the following command:
$ rails new myapp_name $
Then install the Ruby on Rails gem:
$ gem install rails$

3.6.9 Create your first controller:

$ controller :index do end$

Create an index view in app/views/index.html.erb (or whatever file you named it) and add some text to it like this: . Now you can visit http://localhost:3000/myapp in your browser, which will display all of the files that have been created so far as well as any others that were created after adding them to your application’s Gemfile . If you want to see all of these files at once, open up Terminal or iTerm2 and run ls -lh $(find . -type f | sort); then click on File Explorer from there; then browse through those directories until you find one called layout , which contains templates for views like index , about , signup etc., along with stylesheets for making each page look nice together (i would recommend checking out https://github.com/rails/rails_assets).

3.6.10 Ruby on rails is a cross-platform web development framework.

Ruby on Rails is a cross-platform web development framework. It’s written in Ruby, which is an object-oriented programming language.

  • Rails also has a large community and open source license, which means you can use it for free!

  • Rails has many features that make it easy to create web applications:

Model View Controller (MVC) architecture - This structure separates the data from how it’s presented to users and makes it easier to scale as your business grows by separating concerns between models, views and controllers. The controller acts as the glue between these three components so they can work together without interfering with each other or clashing with each other’s responsibilities.

3.6.11 Conclusion

We hope you enjoyed learning about Rails and want to dive into your own project. If so, we’d love to hear from you! Feel free to send us a message on Twitter or send an email at support@rubyonrails.org.

3.7 AI Music Generator - SOUNDRAW

https://soundraw.io

4 AI and architecture

  • Changes the basic fundamentals
  • Parametric architecture will become more common
  • Construction will become much easier and faster
  • Smart cities will pop up everywhere
  • Artificial intelligence will change your home

5 Sustainability

  • Business model: Costs, Revenue, Profit

  • Cost-benefit: Value for money

  • Business projections: Short-term, Long-term

5.1 Risk accessment - 3 common methods

SWOT Analysis

  • Strengths: What are you good at?
  • Weaknesses: What challenges are being faced? Is there room for improvement?
  • Opportunity: Can new advantages be created or can weaknesses be turned into strengths?
  • Threats: What issues could weaken you in the near future?

Porter’s Five Forces

  • Threat of new competitors: How easy is it for newcomers to become competitors?
  • Threat of substitutes: Are there any substitutes for the product?
  • Bargaining power of the buyers: Are there any conditions that will change the affordability of the product?
  • Bargaining power of the suppliers: Are there changes in availability?
  • Competition among existing players: Is there room for a new competitor?

5 C’s of Business

  • Company: Who are you and what are you all about?
  • Collaborators: Who helps to get the work done?
  • Customers: What motivates your target audience?
  • Competitor: Who is competing against you?
  • Climate: What external forces will effect outcomes?

5.2 AI kitchen

https://youtu.be/9LqqcDL99UA https://www.youtube.com/watch?v=ryI5MmN0wOw

https://www.aiplusinfo.com/blog/ai-data-driven-starbucks-deep-brew/

5.3 Drug trials

  • Drug discovery - identification of an effective drug compound
  • Drug design - development of an effective means to administer the drug
  • Preclinical trials - animal and human trials to establish the safe dosage and identify any toxic side effects
  • Clinical trials - Double blind study to establish effectiveness and safety
  • Clinical study - Larger study to verify effectiveness and safety
  • Drug approval - Certification for the range of users and uses

5.4 Unexpected drug effects

Fetal alcohol syndrome

6 Fairness

\[\left\{\begin{matrix} \hbox{Compensation}\\ \hbox{Benefits}\\ \end{matrix}\right\}= \left\{\begin{matrix} \hbox{Investment}\\ \hbox{Effort}\\ \hbox{Risk}\\ \hbox{Costs}\\ \end{matrix}\right\}\]

6.1 Accountability

6.2 Ownership of intellectual property

  • Copyrights gives its owner the exclusive rights:
    • copy,
    • distribute,
    • adapt,
    • display,
    • performance

Patent: gives the creator of an invention the legal right to exclude others from:

  • making it
  • using it
  • selling it

6.3 Intellectual property rights

Wil Smith

Whose art is this? Toonify, Wil Smith, or Dr Bob?

6.4 DALLE CG Art

Bat professor in front of Gen X freshmen

Bat professor in front of Gen X freshmen

6.5 NightCafe Studio

Bat instructor teaching millential cats

6.6 Night Cafe Studio

Bat professor in front of millenial cucumbers

Bat professor in cutoff shorts front of a class of Gen X cucumbers

6.7 Adversarial machine learning

Adversarial machine learning https://youtu.be/SVcsDDABEkM ## Profit sharing

  • Shares
  • Commissions
  • Dividends