have we forgotten how to program? - tunisian webdev meetup
TRANSCRIPT
![Page 1: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/1.jpg)
Have we forgotten how to program?
@elacheche_bedis SOUSSE, April 2016.
![Page 2: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/2.jpg)
Modern Javascript
![Page 3: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/3.jpg)
Javascript is no longer just being used to enhance the user-experience on sites, it’s being used to build complex applications.
![Page 4: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/4.jpg)
If you’re still including all of your scripts in your pages using a <script> tag, you’re doing it WRONG.
![Page 5: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/5.jpg)
![Page 6: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/6.jpg)
What a modern front-endworkflow looks like?
![Page 7: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/7.jpg)
Dependency management
Tasks automation
Testing
Docs
Continuous Integration
Version control
Build
Code linting
![Page 8: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/8.jpg)
Prerequisites
![Page 9: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/9.jpg)
- NPM
- GIT
- A command line with less suck*
*If you’re doing development in Windows, the built-in console sucks
![Page 10: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/10.jpg)
![Page 11: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/11.jpg)
- Command Line Interface Application
- Allows users to install Node.js apps that are available on the npm registry
- Manages dependencies
![Page 12: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/12.jpg)
Manages dependencies ?
![Page 13: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/13.jpg)
Generally when working on a project, there comes a time when you have to leave the dev environment and if there are dependencies, you will have to follow them. Rather than copying them by hand, which more completely pollute a source manager.
![Page 14: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/14.jpg)
/* Hello world */
require('module1');require('module2');/* Awesome Code */
/* Bazinga */
app.js
./node_modules
module1.js module2.js
![Page 15: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/15.jpg)
- When you distribute your program, simply provide your sources and a config file.
- A simple command and the module is downloaded and installed!
- If a module requires another module to operate, NPM will download automatically!
![Page 16: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/16.jpg)
NPM registry
![Page 17: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/17.jpg)
- When it comes to building programs, there are a whole lot of modules and tools available to make the process quicker and simpler.
- NPM registry works sort of like an App store for developers. They look up the functionality they want, and hopefully fund a module that does it for them.
![Page 18: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/18.jpg)
![Page 19: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/19.jpg)
The guywho broke
the internet
![Page 20: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/20.jpg)
![Page 21: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/21.jpg)
“ @izs accepted to change the ownership of this module, without my permission. ”
![Page 22: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/22.jpg)
“ I know you for years and would never imagine you siding with corporate patent lawyers threatening open source contributors ... I want all my modules to be deleted including my account, along with this package. I don’t wanna be a part of npm anymore. If you don’t do it, let me know how do it quickly. I think I have the right of deleting all my stuff from npm. ”
![Page 23: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/23.jpg)
Unpublished more than 275 of his modules from NPM,
![Page 24: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/24.jpg)
Left-pad
![Page 25: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/25.jpg)
- Left-pad was fetched 2,486,696 downloads in just the last month, according to NPM.
- It was relied upon by companies such as Facebook, Netflix, and Airbnb.
- Programmers were left staring at broken builds and failed installations.
![Page 26: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/26.jpg)
WHAAAAAAAAAAAT !?
![Page 27: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/27.jpg)
“ This situation made me realize that NPM is someone’s private land where corporate is more powerful than the people, and I do open source because, Power To The People. ”
![Page 28: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/28.jpg)
“ I did it for the benefit of the community in long term. NPM's monopoly won't be dictated to the free software community anymore. ”
![Page 29: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/29.jpg)
Now what?
![Page 30: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/30.jpg)
“ If a developer calls on an npm module, it’s basically shorthand for 'put this code in later', and a software compiler will just download the code when the time is right. ”
- Matt Weinberger
![Page 31: Have we forgotten how to program? - Tunisian WebDev MeetUp](https://reader034.vdocuments.site/reader034/viewer/2022042706/5873ba6e1a28abbc788b53c9/html5/thumbnails/31.jpg)
Have we forgotten how to program?
@elacheche_bedis SOUSSE, April 2016.