SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
freeCodeCamp Tokyo
#19 2016/08/31
@ Fork Inc.
Welcome to freeCodeCamp
Tokyo meetup!
Who am I?
Tanoue Kenta
Web Programmer
Ruby on Rails
React
“Less is more”
What is freeCodeCamp?
Today's schedule
19:15~ Opening
19:25~ Pair programming
20:00~ Presentation
20:15~ Drinking party 🍺 (fee: 500 yen)
Pair programming
Design quality Learning
Two programmers work together at
one workstation.
One, the driver, writes code
while the other, the navigator,
reviews each line of code as it is
typed in.
https://en.wikipedia.org/wiki/Pair_programming
Better code (in my opinion)
Readability
Maintainability
var i = 5
What does “i” variable means?
function calMaxAndExcludeOddNumbersInArr(arr)
Too many roles!
Modern Javascript (ES2015)
Better code part2
https://github.com/metagrover/ES6-for-humans
https://babeljs.io/docs/learn-es2015/
Arrows
var plus = (x, y) => { return x + y; };
Classes
class Human {
constructor(name) { this.name = name; }
}
Array Spread
function f(x, ...y) {
return x * y.length;
}
f(3, "hello", true) == 6
• Array Map, Filter, Reduce (Functional Programming)
Better code part3
Map Filter Reduce
Array Map, Filter and Reduce in JS | Aten Design Group http://atendesigngroup.com/blog/array-map-filter-and-reduce-js
Strange behavior in
Javascript numbers
var x = 9999999999999999;
x will be 10000000000000000
Strange behavior in
Javascript numbers
var x = 0.2 + 0.1;
x will be 0.30000000000000004
Why?
JavaScript Numbers are always 64-bit Floating Point
https://en.wikipedia.org/wiki/IEEE_754-1985
Solutions
• var x = (0.2 * 10 + 0.1 * 10) / 10;
• use math.js library http://mathjs.org/index.html
Javascript data types
• Six data types that are primitives:
• Boolean
• Null
• Undefined
• Number
• String
• Symbol (new in ECMAScript 6)
• and Object
What is type of Date?
typeof( Date.now() );
Numbers(Unix Timestamp)
ex) 1472635026140
Today’s challenge
Exact Change
https://www.freecodecamp.com/challenges/exact-change
ONE HUNDRED: 100.0$
TWENTY: 20.0$
TEN: 10.0$
FIVE: 5.0$
ONE: 1.0$
QUARTER: 0.25$
DIME: 0.1$
NICKEL: 0.05$
PENNY: 0.01$
Have a nice code!
sample code
https://gist.github.com/regonn/
1ffb5a71e61d569bedd98f7ac58fcef3

Weitere ähnliche Inhalte

Was ist angesagt?

Introducing the Lingo project
Introducing the Lingo projectIntroducing the Lingo project
Introducing the Lingo project
Kazki Matsumoto
 
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DBWeb aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Raimonds Simanovskis
 

Was ist angesagt? (19)

Presentation php
Presentation phpPresentation php
Presentation php
 
It's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspecIt's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspec
 
Flutter beers and pizza
Flutter beers and pizzaFlutter beers and pizza
Flutter beers and pizza
 
How to debug mruby (rubyconftw2014)
How to debug mruby (rubyconftw2014)How to debug mruby (rubyconftw2014)
How to debug mruby (rubyconftw2014)
 
Writing mruby Debugger
Writing mruby DebuggerWriting mruby Debugger
Writing mruby Debugger
 
.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn.NET compiler platform codename Roslyn
.NET compiler platform codename Roslyn
 
Automatic image moderation in classifieds
Automatic image moderation in classifiedsAutomatic image moderation in classifieds
Automatic image moderation in classifieds
 
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 
Building End-to-End Apps Using Typescript
Building End-to-End Apps Using TypescriptBuilding End-to-End Apps Using Typescript
Building End-to-End Apps Using Typescript
 
Typescript language
Typescript languageTypescript language
Typescript language
 
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTERC++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
 
[INNOVATUBE] Tech Talk #3: Golang - Vũ Nguyễn
[INNOVATUBE] Tech Talk #3: Golang - Vũ Nguyễn [INNOVATUBE] Tech Talk #3: Golang - Vũ Nguyễn
[INNOVATUBE] Tech Talk #3: Golang - Vũ Nguyễn
 
Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)Productive Android developers (Meetup slides)
Productive Android developers (Meetup slides)
 
Verbatim experience
Verbatim experienceVerbatim experience
Verbatim experience
 
We b development trends
We b  development  trendsWe b  development  trends
We b development trends
 
Frontend 2017. Ecosystem of frameworks: Forecasts and trends
Frontend 2017. Ecosystem of frameworks: Forecasts and trendsFrontend 2017. Ecosystem of frameworks: Forecasts and trends
Frontend 2017. Ecosystem of frameworks: Forecasts and trends
 
Exploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQLExploring Ruby on Rails and PostgreSQL
Exploring Ruby on Rails and PostgreSQL
 
Introducing the Lingo project
Introducing the Lingo projectIntroducing the Lingo project
Introducing the Lingo project
 
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DBWeb aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
 

Andere mochten auch

サテライトラブ
サテライトラブサテライトラブ
サテライトラブ
健太 田上
 
ビッグデータ解析
ビッグデータ解析ビッグデータ解析
ビッグデータ解析
健太 田上
 
Presentatie CMS Congres 2012
Presentatie CMS Congres 2012Presentatie CMS Congres 2012
Presentatie CMS Congres 2012
ColoursDenBosch
 

Andere mochten auch (20)

Meguro es7
Meguro es7Meguro es7
Meguro es7
 
プログラミング初心者に ECMAScript(JavaScript) を最初の言語として勧めるべき? Meguro es6
プログラミング初心者に ECMAScript(JavaScript) を最初の言語として勧めるべき? Meguro es6プログラミング初心者に ECMAScript(JavaScript) を最初の言語として勧めるべき? Meguro es6
プログラミング初心者に ECMAScript(JavaScript) を最初の言語として勧めるべき? Meguro es6
 
freeCodeCampTokyoMeetup 17
freeCodeCampTokyoMeetup 17freeCodeCampTokyoMeetup 17
freeCodeCampTokyoMeetup 17
 
freeCodeCamp Tokyo Meetup #18
freeCodeCamp Tokyo Meetup #18freeCodeCamp Tokyo Meetup #18
freeCodeCamp Tokyo Meetup #18
 
サテライトラブ
サテライトラブサテライトラブ
サテライトラブ
 
ビッグデータ解析
ビッグデータ解析ビッグデータ解析
ビッグデータ解析
 
Rails composerでrails newを楽にしよう
Rails composerでrails newを楽にしようRails composerでrails newを楽にしよう
Rails composerでrails newを楽にしよう
 
Rust言語
Rust言語Rust言語
Rust言語
 
Freshwater Matters September2013
Freshwater Matters September2013Freshwater Matters September2013
Freshwater Matters September2013
 
Intro
IntroIntro
Intro
 
Memòria
MemòriaMemòria
Memòria
 
2014 BTSN Presentation
2014 BTSN Presentation2014 BTSN Presentation
2014 BTSN Presentation
 
Presentatie CMS Congres 2012
Presentatie CMS Congres 2012Presentatie CMS Congres 2012
Presentatie CMS Congres 2012
 
Session 4
Session 4Session 4
Session 4
 
Quantum computing
Quantum computingQuantum computing
Quantum computing
 
Destination 100%: The evolutionary journey to a total quality concept in the ...
Destination 100%: The evolutionary journey to a total quality concept in the ...Destination 100%: The evolutionary journey to a total quality concept in the ...
Destination 100%: The evolutionary journey to a total quality concept in the ...
 
Memòria
MemòriaMemòria
Memòria
 
Retention and Development Strategies
Retention and Development StrategiesRetention and Development Strategies
Retention and Development Strategies
 
Gestion blog parte 1
Gestion blog parte 1Gestion blog parte 1
Gestion blog parte 1
 
Barriers2
Barriers2Barriers2
Barriers2
 

Ähnlich wie freeCodeCamp Tokyo meetup 19

Ruby on rails探索
Ruby on rails探索Ruby on rails探索
Ruby on rails探索
Mu Chun Wang
 

Ähnlich wie freeCodeCamp Tokyo meetup 19 (20)

"Generating Types without climbing a tree", Matteo Collina
"Generating Types without climbing a tree", Matteo Collina "Generating Types without climbing a tree", Matteo Collina
"Generating Types without climbing a tree", Matteo Collina
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
 
Introduction to Angular with TypeScript for .NET Developers
Introduction to Angular with TypeScript for .NET DevelopersIntroduction to Angular with TypeScript for .NET Developers
Introduction to Angular with TypeScript for .NET Developers
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
 
How to Lose Functional Programming at Work
How to Lose Functional Programming at WorkHow to Lose Functional Programming at Work
How to Lose Functional Programming at Work
 
DrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low CodeDrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low Code
 
Reactive web applications using MeteorJS
Reactive web applications using MeteorJSReactive web applications using MeteorJS
Reactive web applications using MeteorJS
 
Presentation of programming languages for beginners
Presentation of programming languages for beginnersPresentation of programming languages for beginners
Presentation of programming languages for beginners
 
Evolving big microservice architectures
Evolving big microservice architecturesEvolving big microservice architectures
Evolving big microservice architectures
 
Rcpp
RcppRcpp
Rcpp
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Try! Swift Tokyo2017
Try! Swift Tokyo2017Try! Swift Tokyo2017
Try! Swift Tokyo2017
 
Ruby on rails探索
Ruby on rails探索Ruby on rails探索
Ruby on rails探索
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
 
Spark core intro
Spark core introSpark core intro
Spark core intro
 
Pair programming
Pair programmingPair programming
Pair programming
 
Angular2 & Native Script GDG DevFest 2016
Angular2 & Native Script GDG DevFest 2016Angular2 & Native Script GDG DevFest 2016
Angular2 & Native Script GDG DevFest 2016
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

freeCodeCamp Tokyo meetup 19