+ All Categories
Home > Internet > Coding for entrepreneurs

Coding for entrepreneurs

Date post: 18-Jul-2015
Category:
Upload: amine-sadry
View: 68 times
Download: 0 times
Share this document with a friend
40
< StartupDecode /> Coding for entrepreneurs: from zero to hero Amine Sadry @donaminos www.startupdecode.com @startupdecode /startupDecode /user/startupDecode meetup.com/startupDecode
Transcript

< StartupDecode />

Coding for entrepreneurs: from zero to hero

Amine [email protected]

@startupdecode /startupDecode /user/startupDecodemeetup.com/startupDecode

< Program />

1. What is Programming ?

2. OOP Principle

3. World Wide Web

4. The best programming language

5. Architecture 101

6. Hands-on Ruby On Rails

7. Apéro Networking

www.startupdecode.com

What is programming?

< Machine language />

www.startupdecode.com

< Assembler language />

www.startupdecode.com

2000 DEF PROCasm(pass,org)2010 P%=org2020 [ OPT pass2030 ADR R0, message2040 SWI OS_Write02050 MOV PC, R142060 .message2070 EQUS "Hello, World!" + CHR$(0)2080 ALIGN2090 ]2100 ENDPROC

1000 REM Hello World using a mix of BBC Basic and ARM assembler1010 DIM org 1001020 OS_Write0 = &21030 FOR pass=0 TO 3 STEP 31040 PROCasm(pass,org)1050 NEXT pass1060 CALL org1070 END1080

< High-level language />

www.startupdecode.com

void main (void) {

printf ("Hello \n");

if ( x == y ) printf("x equal y \n");

}

101001100101000111100101

Compile

< Implementation />

www.startupdecode.com

Compiled vs Interpreted

< Procedural programming />

www.startupdecode.com

main(){

var data1, data2;

procedure_1();

procedure_2(data1);

procedure_3(data1, data2);

print data2;}

procedure_1(){...

} procedure_2(param){

….

}

procedure_3(p1, p2){….

}

Object Oriented Programming

< OOP principle 1/3 />

www.startupdecode.com

Properties:● Brand● Color

Actions:● Strart● Accelerate● Stop

< OOP principle 2/3 />

www.startupdecode.com

Properties:● Name● Email● …

Actions:● Move● Text● …

< OOP principle 3/3 />

www.startupdecode.com

Attributes

Methods

Class

< Code 1/2 />

www.startupdecode.com

Class Nom_classeattr_accessor :var1, :var2

Def nom_methode_1…

end

Def nom_methode_2…

endend

Class Car attr_accessor :brand, :color

Def start_engineputs “Engine started.”

end

Def turn_leftputs “Turn left.”

endend

< Code 2/2 />

www.startupdecode.com

voiture1 = Car.new voiture1.brand = “Peugeot” voiture1.color = “rouge”

voiture2 = Car.new voiture2.brand = “Fiat” voiture2.color = “verte”

voiture2.start_engine voiture1.brand

—— ——— ——— —— —— — — — — — # Engine started. # Peugeot

Inheritance

< Inheritance />

www.startupdecode.com

B

A

C

A A

< Inheritance />

www.startupdecode.com

class User

attr_accessor :name

def login“I logged in!”

end

def logout“I logged out!”

end

end

class Freelance < Userdef add_resume “I added a resume!”end

end

class Entreprise < Userdef add_offer “I added an offer!”end

end

< Ruby code />

www.startupdecode.com

World Wide Web

< HTTP Protocol />

www.startupdecode.com

Client Server

Request

Response

< HTML document />

www.startupdecode.com

<head>

</head>

<body>

</body>

<!DOCTYPE html><html>

</html>

< Head />

www.startupdecode.com

<head>

<title> Titre du document html </title>

</head>

< Body />

www.startupdecode.com

<body>

<h1> Titre de ma page </h1>

<p>Le contenu de mon paragraphe.

</p>

<a href=“www.google.com”> Lien vers google </a>

</body>

< The first website />

http://www.w3.org/...

www.startupdecode.com

Browser / Client Server

Response

Request

index.html

page1.html page2.html

Source: http://www.w3.org/History/19921103-hypertext/hypertext/WWW/TheProject.html

< CSS Principle />

www.startupdecode.com

<body>

<p id=“identifiant_unique” class=“ma_classe”>Le contenu de mon paragraphe.

</p>

<p id=“autre_identifiant” class=“ma_classe”>Un autre paragraphe.

</p>

</body>

#identifiant_unique {margin-top:20px;

}

.ma_classe {width:200px;height: 300px;

}

< Great design />

www.startupdecode.com

< Static website />

http://www.horriblest.com/

www.startupdecode.com

Browser / Client Server

Response

Request

index.html

page1.html page2.html

< Dynamic website />

http://www.facebook.com

www.startupdecode.com

Browser / Client / Front-end Server / Back-end

Response

Request

Database

Web Application

< Relational database />

www.startupdecode.com

cars

id brand color created_at

1 peugeot rouge 23/11/2014

2 fiat verte 23/11/2014

n ... ... ...

SQL:

SELECT * FROM cars WHERE id = 2

INSERT INTO cars (brand, color) VALUES (fiat, verte);

DELETE FROM cars WHERE id = 1;

< Languages />

http://www.facebook.com

www.startupdecode.com

Browser / Client / Front-end Server / Back-end

Response

Request

Database

Web Application

HTML, CSS, javascript

SQL

?

The best programming language

Java C# Python PHP Node JS RubyLearning curve

Stability

Ecosystem

Enthusiasm

Workforce

Java C# Python PHP Node JS Ruby

Resources

Use case Linkedin

< Languages />

www.startupdecode.com

Criteo Facebook MySpacePinterest AirBnB

Architecture 101

Presentation:

HTML / CSS JavaScript

< Application layers />

Front-end Back-end

Data:

SQL

Logic:

Ruby on Rails

www.startupdecode.com

< MVC architecture />

http://www.facebook.com

www.startupdecode.com

Browser / Client / Front-end Server / Back-end

Database

APP

Controller

View Model

< Rails app directory />

www.startupdecode.com

$ rails new APP_NAME

1. generate new app

3. http://localhost:3000

2. run the server

$ rails server

< Rails app architecture />

www.startupdecode.comDatabase

Rails app

Controller(ActionController)

View(ActionView)

Model(ActiveRecord)

Rou

tes

Hands-on Ruby on Rails

< Ruby code />

www.startupdecode.com

< StartupDecode />

@startupdecode /startupDecode /user/startupDecodemeetup.com/startupDecode

Merci&

A bientôt


Recommended