SlideShare a Scribd company logo
1 of 38
Besut Kode
Challenge 1
… add linting to mwparserfromhell
Your mission, should you choose to accept it
Build your online profile
Practise GCI tasks
Learn about Wikimedia,
a GCI participating organisation
Challenge environment
● Using Github Classroom
● You each have a private copy of mwparserfromhell
– Make mistakes
– Not in public
● Full administrator access to your copy
● Best answers will be migrated to the public repository
– It will appears on the Github profile of the selected participants
Challenge 1: two parts
● Add linting enforced by Continuous Integration
– “If you cant enforce a coding standard,
it is just a guideline.” - jayvdb, and others
● Update the least amount of code to pass the
lint rules, with optimal rules enforced to
minimise “disruption”
– “Beauty is in the eye of the beholder”
– However, least amount is not subjective
Challenge 1: two languages
● Choose either C and/or Python
● Only one required to pass the challenge
● Solve both to maximise your chance of winning
the challenge
Language: C
– Low- to Medium-level
– General-purpose
– Compiled to a single platform
– Static
– Structured imperative/procedural
– Linting is hard, but many tools exist
Language: Python
– High-level
– General-purpose
– Interpreted by any platform
– Dynamic
– Object-oriented, functional, and imperative/procedural
– Language is very simple
– Very good lint tools that are simple to use
Automated linting services
https://github.com/integrations
Code Climate
https://codeclimate.com/dashboard
Code Climate consolidates the results from a suite of static analysis tools into a
single, real-time report, giving your team the information it needs to identify
hotspots, evaluate new approaches, and improve code quality.
Code Climate
https://codeclimate.com/github/earwig/mwparserfromhell
CSS
Go
JavaScript
PHP
Python
Ruby
Apex
CoffeeScript
Ember
ESLint
Haskell
Haxe
RubyMotion
Rails
SCSS
Swift
Vim Script
Brakeman OSS
Bundler-Audit
Coffeelint
CSSLint
Duplication
ESLint
FIXME
Node Security Project (nsp)
Pep8
PHP Code Sniffer
PHP Mess Detector
Radon
RuboCop
ApexMetrics
Ember-watson
Foodcritic
gofmt
golint
...
Code Climate
https://codeclimate.com/github/earwig/mwparserfromhell/issues
Code Climate
https://codeclimate.com/github/earwig/mwparserfromhell/issues
https://en.wikipedia.org/wiki/Cyclomatic_complexity
landscape.io
https://landscape.io/dashboard
landscape.io
https://landscape.io/github/jayvdb/mwparserfromhell/1
landscape.io
https://landscape.io/github/jayvdb/mwparserfromhell/1/modules/mwparserfromhell/compat.py
quantifiedcode.com
https://www.quantifiedcode.com/app/project/gh:jayvdb:mwparserfromhell
scrutinizer-ci.com
https://scrutinizer-ci.com/g/jayvdb/mwparserfromhell/code-structure/develop/….
codacy.com
codacy.com
sideci.com
blissai.com
blissai.com
Three similar linting tasks
1) setuptools – dragons be there
2) html5lib-python – watch and learn
3) Pywikibot – test your theory, if you dare
Example 1: setuptools
http://pypi-ranking.info/alltime
Setuptools – ez_setup.py
https://bitbucket.org/pypa/setuptools/pull-requests/117
https://phabricator.wikimedia.org/T87169
Setuptools - mecurial
https://bitbucket.org/pypa/setuptools/pull-requests/157/activity
Setuptools – moved to github
https://github.com/pypa/setuptools/issues/489#issuecomment-216246073
https://github.com/pypa/setuptools/pull/567
Setuptools – @stepshal to the rescue
https://github.com/pypa/setuptools/pull/621
Setuptools – 40 tasks later ...
https://github.com/pypa/setuptools/issues?utf8=%E2%9C%93&q=author%3Astepshal
Setuptools – 40 tasks later ...
https://github.com/stepshal
setuptools
https://landscape.io/github/jayvdb/setuptools/1/messages/style
Example 2: html5lib-python
https://landscape.io/github/html5lib/html5lib-python
html5lib-python: more linters
https://github.com/html5lib/html5lib-python/pull/292
html5lib-python:
is that lint, or a bug?
https://github.com/html5lib/html5lib-python/pull/292
Example 3: Pywikibot
● 15 years old
● Supports Python 2.6 – 3.6, and PyPy
● Optional dependencies, except for httplib2 or
requests
● Uses mwparserfromhell
Pywikibot: lots of lint messages
Pywikibot - “gotten worse”!
Good luck.
After that: no more help from jayvdb.
Next: 10 private minutes.

More Related Content

What's hot

Introducing Github and Octocats by Tony Bangratz
Introducing Github and Octocats by Tony BangratzIntroducing Github and Octocats by Tony Bangratz
Introducing Github and Octocats by Tony BangratzRailsGirls_RTM
 
Front Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab PagesFront Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab PagesWill Hall
 
Montreal.rb ruby debugging basics - march 20th 2012
Montreal.rb   ruby debugging basics - march 20th 2012Montreal.rb   ruby debugging basics - march 20th 2012
Montreal.rb ruby debugging basics - march 20th 2012Rafael Rosa
 
componentDidCatch and Error Boundaries in React v16+
componentDidCatch and Error Boundaries in React v16+componentDidCatch and Error Boundaries in React v16+
componentDidCatch and Error Boundaries in React v16+Rohan Nair
 
Let's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsLet's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsPaul Balogh
 
RigaDevDay 2016 - Testing with Spock: The Logical Choice
RigaDevDay 2016 - Testing with Spock: The Logical ChoiceRigaDevDay 2016 - Testing with Spock: The Logical Choice
RigaDevDay 2016 - Testing with Spock: The Logical ChoiceIván López Martín
 
VirtualJUG24 - Testing with Spock: The logical choice
VirtualJUG24 - Testing with Spock: The logical choiceVirtualJUG24 - Testing with Spock: The logical choice
VirtualJUG24 - Testing with Spock: The logical choiceIván López Martín
 
Version open source everything
Version   open source everythingVersion   open source everything
Version open source everythingBaylee Schmeisser
 
Automated prometheus benchmarking pushing it to its limits until it breaks
Automated prometheus benchmarking   pushing it to its limits until it breaksAutomated prometheus benchmarking   pushing it to its limits until it breaks
Automated prometheus benchmarking pushing it to its limits until it breaksHarsh Agarwal
 
Nordic Testing Days - Tallinn 2017 - Test your Java applications with Spock
Nordic Testing Days - Tallinn 2017 - Test your Java applications with SpockNordic Testing Days - Tallinn 2017 - Test your Java applications with Spock
Nordic Testing Days - Tallinn 2017 - Test your Java applications with SpockIván López Martín
 
Craate Your Own PHP Package - DILo Surabaya
Craate Your Own PHP Package - DILo SurabayaCraate Your Own PHP Package - DILo Surabaya
Craate Your Own PHP Package - DILo SurabayaDILo Surabaya
 
Nicolás Aravena - Cómo aprender Git y no morir en el intento
Nicolás Aravena - Cómo aprender Git y no morir en el intentoNicolás Aravena - Cómo aprender Git y no morir en el intento
Nicolás Aravena - Cómo aprender Git y no morir en el intento9punto5
 
Go for Mobile Games
Go for Mobile GamesGo for Mobile Games
Go for Mobile GamesTakuya Ueda
 
Helping Yourself With_Open_Source_Software at Ruby Conference Kenya 2017 by M...
Helping Yourself With_Open_Source_Software at Ruby Conference Kenya 2017 by M...Helping Yourself With_Open_Source_Software at Ruby Conference Kenya 2017 by M...
Helping Yourself With_Open_Source_Software at Ruby Conference Kenya 2017 by M...Michael Kimathi
 
Migrating python.org to buildbot 9 and python 3
Migrating python.org to buildbot 9 and python 3Migrating python.org to buildbot 9 and python 3
Migrating python.org to buildbot 9 and python 3Craig Rodrigues
 
Go, Docker & Kubernetes
Go, Docker &  KubernetesGo, Docker &  Kubernetes
Go, Docker & KubernetesGlobant
 

What's hot (20)

Introducing Github and Octocats by Tony Bangratz
Introducing Github and Octocats by Tony BangratzIntroducing Github and Octocats by Tony Bangratz
Introducing Github and Octocats by Tony Bangratz
 
Front Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab PagesFront Page of Hacker News with GitLab Pages
Front Page of Hacker News with GitLab Pages
 
Jedi knight
Jedi knightJedi knight
Jedi knight
 
Montreal.rb ruby debugging basics - march 20th 2012
Montreal.rb   ruby debugging basics - march 20th 2012Montreal.rb   ruby debugging basics - march 20th 2012
Montreal.rb ruby debugging basics - march 20th 2012
 
componentDidCatch and Error Boundaries in React v16+
componentDidCatch and Error Boundaries in React v16+componentDidCatch and Error Boundaries in React v16+
componentDidCatch and Error Boundaries in React v16+
 
Let's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsLet's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeads
 
RigaDevDay 2016 - Testing with Spock: The Logical Choice
RigaDevDay 2016 - Testing with Spock: The Logical ChoiceRigaDevDay 2016 - Testing with Spock: The Logical Choice
RigaDevDay 2016 - Testing with Spock: The Logical Choice
 
VirtualJUG24 - Testing with Spock: The logical choice
VirtualJUG24 - Testing with Spock: The logical choiceVirtualJUG24 - Testing with Spock: The logical choice
VirtualJUG24 - Testing with Spock: The logical choice
 
Version open source everything
Version   open source everythingVersion   open source everything
Version open source everything
 
Automated prometheus benchmarking pushing it to its limits until it breaks
Automated prometheus benchmarking   pushing it to its limits until it breaksAutomated prometheus benchmarking   pushing it to its limits until it breaks
Automated prometheus benchmarking pushing it to its limits until it breaks
 
Nordic Testing Days - Tallinn 2017 - Test your Java applications with Spock
Nordic Testing Days - Tallinn 2017 - Test your Java applications with SpockNordic Testing Days - Tallinn 2017 - Test your Java applications with Spock
Nordic Testing Days - Tallinn 2017 - Test your Java applications with Spock
 
Craate Your Own PHP Package - DILo Surabaya
Craate Your Own PHP Package - DILo SurabayaCraate Your Own PHP Package - DILo Surabaya
Craate Your Own PHP Package - DILo Surabaya
 
Driving development in PHP
Driving development in PHPDriving development in PHP
Driving development in PHP
 
Nicolás Aravena - Cómo aprender Git y no morir en el intento
Nicolás Aravena - Cómo aprender Git y no morir en el intentoNicolás Aravena - Cómo aprender Git y no morir en el intento
Nicolás Aravena - Cómo aprender Git y no morir en el intento
 
Go for Mobile Games
Go for Mobile GamesGo for Mobile Games
Go for Mobile Games
 
Helping Yourself With_Open_Source_Software at Ruby Conference Kenya 2017 by M...
Helping Yourself With_Open_Source_Software at Ruby Conference Kenya 2017 by M...Helping Yourself With_Open_Source_Software at Ruby Conference Kenya 2017 by M...
Helping Yourself With_Open_Source_Software at Ruby Conference Kenya 2017 by M...
 
Comparing C and Go
Comparing C and GoComparing C and Go
Comparing C and Go
 
Migrating python.org to buildbot 9 and python 3
Migrating python.org to buildbot 9 and python 3Migrating python.org to buildbot 9 and python 3
Migrating python.org to buildbot 9 and python 3
 
Let's Contribute
Let's ContributeLet's Contribute
Let's Contribute
 
Go, Docker & Kubernetes
Go, Docker &  KubernetesGo, Docker &  Kubernetes
Go, Docker & Kubernetes
 

Similar to Besut Kode Challenge 1

PHP - Programming language war, does it matter
PHP - Programming language war, does it matterPHP - Programming language war, does it matter
PHP - Programming language war, does it matterMizno Kruge
 
Highly Surmountable Challenges in Ruby+OMR JIT Compilation
Highly Surmountable Challenges in Ruby+OMR JIT CompilationHighly Surmountable Challenges in Ruby+OMR JIT Compilation
Highly Surmountable Challenges in Ruby+OMR JIT CompilationMatthew Gaudet
 
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpPHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpAhmed Abdou
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingShyam Sunder Verma
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptnRob Jahn
 
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdf
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdfManaging Software Dependencies and the Supply Chain_ MIT EM.S20.pdf
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdfAndrew Lamb
 
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeDevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeMatt Ray
 
Code, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers wayCode, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers wayAlex Baitov
 
An Introduction to Microservices
An Introduction to MicroservicesAn Introduction to Microservices
An Introduction to MicroservicesAd van der Veer
 
Continuous Integration Step-by-step
Continuous Integration Step-by-stepContinuous Integration Step-by-step
Continuous Integration Step-by-stepMichelangelo van Dam
 
Onivim: Modal Editing from the Future
Onivim: Modal Editing from the FutureOnivim: Modal Editing from the Future
Onivim: Modal Editing from the FutureBryan Phelps
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleIT Arena
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to GoSimon Hewitt
 
Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applicationsRoman Podoliaka
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsYoshiki Shibukawa
 
Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UKRicard Clau
 

Similar to Besut Kode Challenge 1 (20)

PHP - Programming language war, does it matter
PHP - Programming language war, does it matterPHP - Programming language war, does it matter
PHP - Programming language war, does it matter
 
Highly Surmountable Challenges in Ruby+OMR JIT Compilation
Highly Surmountable Challenges in Ruby+OMR JIT CompilationHighly Surmountable Challenges in Ruby+OMR JIT Compilation
Highly Surmountable Challenges in Ruby+OMR JIT Compilation
 
PHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in phpPHP Mega Meetup, Sep, 2020, Anti patterns in php
PHP Mega Meetup, Sep, 2020, Anti patterns in php
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation Testing
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
 
Framework
FrameworkFramework
Framework
 
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdf
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdfManaging Software Dependencies and the Supply Chain_ MIT EM.S20.pdf
Managing Software Dependencies and the Supply Chain_ MIT EM.S20.pdf
 
Go at Skroutz
Go at SkroutzGo at Skroutz
Go at Skroutz
 
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeDevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
 
Code, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers wayCode, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers way
 
An Introduction to Microservices
An Introduction to MicroservicesAn Introduction to Microservices
An Introduction to Microservices
 
Continuous Integration Step-by-step
Continuous Integration Step-by-stepContinuous Integration Step-by-step
Continuous Integration Step-by-step
 
Onivim: Modal Editing from the Future
Onivim: Modal Editing from the FutureOnivim: Modal Editing from the Future
Onivim: Modal Editing from the Future
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Debugging of (C)Python applications
Debugging of (C)Python applicationsDebugging of (C)Python applications
Debugging of (C)Python applications
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and Errors
 
Os Lattner
Os LattnerOs Lattner
Os Lattner
 
Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UK
 

More from John Vandenberg

Rust & Python : Python WA October meetup
Rust & Python : Python WA October meetupRust & Python : Python WA October meetup
Rust & Python : Python WA October meetupJohn Vandenberg
 
Rust ORMs and Migrations
Rust ORMs and MigrationsRust ORMs and Migrations
Rust ORMs and MigrationsJohn Vandenberg
 
Rust & Python : Rust WA meetup 1
Rust & Python : Rust WA meetup 1Rust & Python : Rust WA meetup 1
Rust & Python : Rust WA meetup 1John Vandenberg
 
Besut Kode seminar Lampung
Besut Kode seminar LampungBesut Kode seminar Lampung
Besut Kode seminar LampungJohn Vandenberg
 
Besut Kode Seminar Malang
Besut Kode Seminar MalangBesut Kode Seminar Malang
Besut Kode Seminar MalangJohn Vandenberg
 
Wikimedia indigenous voices
Wikimedia indigenous voicesWikimedia indigenous voices
Wikimedia indigenous voicesJohn Vandenberg
 
SGU - Creating an English Wikipedia draft
SGU - Creating an English Wikipedia draftSGU - Creating an English Wikipedia draft
SGU - Creating an English Wikipedia draftJohn Vandenberg
 
SGU Wikimedia in Education overview
SGU Wikimedia in Education overviewSGU Wikimedia in Education overview
SGU Wikimedia in Education overviewJohn Vandenberg
 
SLQ Wikipedia workshop: creating a draft
SLQ Wikipedia workshop: creating a draftSLQ Wikipedia workshop: creating a draft
SLQ Wikipedia workshop: creating a draftJohn Vandenberg
 
Intelligent info 2012 wikipedia
Intelligent info 2012 wikipediaIntelligent info 2012 wikipedia
Intelligent info 2012 wikipediaJohn Vandenberg
 

More from John Vandenberg (14)

syn
synsyn
syn
 
Rust & Python : Python WA October meetup
Rust & Python : Python WA October meetupRust & Python : Python WA October meetup
Rust & Python : Python WA October meetup
 
butane Rust ORM
butane Rust ORMbutane Rust ORM
butane Rust ORM
 
Rust ORMs and Migrations
Rust ORMs and MigrationsRust ORMs and Migrations
Rust ORMs and Migrations
 
Rust & Python : Rust WA meetup 1
Rust & Python : Rust WA meetup 1Rust & Python : Rust WA meetup 1
Rust & Python : Rust WA meetup 1
 
Besut Kode seminar Lampung
Besut Kode seminar LampungBesut Kode seminar Lampung
Besut Kode seminar Lampung
 
Besut Kode Seminar Malang
Besut Kode Seminar MalangBesut Kode Seminar Malang
Besut Kode Seminar Malang
 
Besut Kode - Workshop 2
Besut Kode - Workshop 2Besut Kode - Workshop 2
Besut Kode - Workshop 2
 
Wikimedia indigenous voices
Wikimedia indigenous voicesWikimedia indigenous voices
Wikimedia indigenous voices
 
SGU - Creating an English Wikipedia draft
SGU - Creating an English Wikipedia draftSGU - Creating an English Wikipedia draft
SGU - Creating an English Wikipedia draft
 
SGU Wikimedia in Education overview
SGU Wikimedia in Education overviewSGU Wikimedia in Education overview
SGU Wikimedia in Education overview
 
Commons
CommonsCommons
Commons
 
SLQ Wikipedia workshop: creating a draft
SLQ Wikipedia workshop: creating a draftSLQ Wikipedia workshop: creating a draft
SLQ Wikipedia workshop: creating a draft
 
Intelligent info 2012 wikipedia
Intelligent info 2012 wikipediaIntelligent info 2012 wikipedia
Intelligent info 2012 wikipedia
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 

Besut Kode Challenge 1

Editor's Notes

  1. This challenge is a real world example of how to build your online profile. There are millions of projects that need extra linting added. While linting, you will find bugs that can be added to the bug database, and then you can either fix yourself, or .. if it is too hard … you can watch an expert fix it (and learn from them). The minimum solution for this challenge is approximately a single “advanced” CGI task. If you do it well, it is at least 10 GCI tasks, and possibly 20 GCI tasks.
  2. Only the best answer(s) will be guided in how to submit their changes to the real public mwparserfromhell project, to start their online profile.
  3. Part 1 raises the qualify bar for the mwparserfromhell project. mwparserfromhell has good tests, however any new code that passes the tests is “good enough”. Currently a human must reject any messy new code submissions.Humans are not good at meticulous checking.And humans naturally avoid disagreement. An automated check, with automated rejection, means the submitter must fix the problems. They can not argue with a computer. But, your lint patch must be acceptable to Github user @earwig (Ben Kurtovic). He owns the repository. Unless he has indicated a coding guideline for mwparserfromhell, the only coding standard that exists is the code. The current code passes all of the implicit rules in Ben’s head. Part 2 is a trick question. You should not ever change code just because a linter reports an error. The only reason to change code is because you can prove that the code should be improved. One justification for change is code inconsistency.If all of the code is written in one style, except for one line, then fix that one line. If all of the code disagrees with a linting rule, you should disable that rule unless you can prove it found a bug.
  4. The languages C & Python are extemely different. Both are general purpose. Learn both to succeed as a programmer.
  5. If you dont know C, you dont understand computers. You do not need to like C, but you must understand it. The end. --- https://commons.wikimedia.org/wiki/File:The_C_Programming_Language_logo.svg https://commons.wikimedia.org/wiki/File:Pointers.svg
  6. The point to stress is that Python is very dynamic. So dynamic it is crazy. But it is fun. It is a simple language to learn functional programming. It is a simple language to learn language theory. Other recently created languages have many similar features, and are less crazy. Python is 25 years older and more mature. New languages come and go every year. Languages like Perl and Php rot your brain. ---- https://commons.wikimedia.org/wiki/File:Python.svg https://commons.wikimedia.org/wiki/File:Python_version_history_(1991-2015).svg
  7. So what are the linting problems to be solved in mwparserfromhell? We dont need to open a text editor, or a command prompt. Github integrates many online services that do the linting for us. e.g. Code Climate on the bottom right.
  8. Here are some projects I have in Code Climate.
  9. It supports many languages and linters. But it doesnt support C.
  10. Some of the problems it finds
  11. An explanation of the problem.
  12. Landscape.io is a python only service, but it is very good at Python. It will only run checks on your own github repos, not earwig’s repos brechtm/citeproc-py is in my list because I am a committer on that project. So, …. 1. Fork an existing Github project 2. Add a landscape.io project for your fork.
  13. All of you should already know that the linter tools dont like compat.py
  14. Pretty colors!!
  15. And here are some more online lint services that you can use....
  16. Here are some lint warnings that you probably havent ever seen.
  17. Blissai supports the most languages, with many types of linters, including C.
  18. I will not be giving any more general tips regarding the mwparserfromhell challenge... Everyone sighs...WHAT?!?! But I will show you three similar linting tasks for you to study and use in your solution for mwparserfromhell.
  19. Dont try this one at home... Setuptools is one of the most important tools in Python.
  20. Pywikibot copies ez_setup.py from setuptools, with all of its lint violations. Being a good internet citizen, I thought I’ll fix the lint violations in setuptools. Ouch! Declined.
  21. The author used mecurial, and mecurial was partially to blame for the mess.
  22. Setuptools was moved to Github, and they start to become more open to fixes.
  23. A nobody “stepshal” appears, with a few spelling corrections...
  24. That was merged, so @stepshal tried a few more...
  25. @stepshal now has an awesome profile for a beginner, with setuptools on their resume.
  26. While setuptools still has many horrenous style problems yet to be fixed. So, you could fix these, and have setuptools on your resume…? But I advise you : do not try your luck with setuptools. Now consider: what if @earwig is like @jaraco ? Will @earwig like your patch if it includes unnecessary changes? You must have a good reason to push your changes into his repository.
  27. html5lib has a perfect score! It already has CI linting using flake8 ....
  28. So I submitted a pull request with many more flake8 checker plugins integrated, and pylint also enabled. 30 files modified! You can watch my progress here… live, this week.
  29. One small linting message become a very large fix. Nobody has used this script for a while, and it has “bit rot”.
  30. I am one of the “grumpy old men” on the Pywikibot project.
  31. Pywikibot has many linters in place, but there are still many linting prolems to fix. Look at the linting structure of this project, to understand Wikimedia python developers. Each of you is welcome to submit one de-linting patch this week to Pywikibot, and I will review it within 24 hours. Choose a problem that you need help with on your mwparserfromhell challenge.
  32. Even some regressions occurring very recently. Good luck.