Refactoring Code With Extract Method Live Code Example 001-002
Refactoring Code With Extract Method Is Clean Code and live code example. In this refactoring tutorial, Adam Culp of Beachcasts shares how to refactor code using the extract method pattern to reduce cyclomatic complexity and achieve clean code.
Though this code refactoring is a PHP refactoring, the principles can be applied to any language and will help you achieve clean code.
Extract method is one of the most common methods of refactoring and is also used in legacy code refactoring.
This video covers step 001 to 002 in the Refactoring101 repo on Github linked below.
Please * LIKE, COMMENT, AND SUBSCRIBE * - and share with others!
Key Topics:
- Refactoring code using the extract method
- Step by step to extract method
- Using a Jetbrains IDE to automate the extract method refactoring
- Reducing cyclomatic complexity with refactoring using the extract method
Support the channel with this Cloudways affiliate link: https://www.cloudways.com/en/?id=1013434 and use the discount code BEACHCASTS to get a free month of hosting.
For a nice list of equipment I use in my studio, and to support the channel if you make any purchases (doesn't cost you a thing), visit my kit at kit.co: https://kit.co/beachcasts/beachcasts-studio
Errata:
Let me know if you notice anything that should be errata
At 05:09 I mistakenly create a variable named $amountFor, which should be $thisAmount. I correct it at 06:20.
Associated Links:
https://github.com/adamculp/refactoring101
https://beachcasts.com
Timeline:
00:00 Video intro
01:14 Introducing the video sponsor, Cloudways
01:38 Walking through code needing refactored
03:19 Beginning the method extraction manually
06:50 Automated extract method using JetBrains PhpStorm
08:14 Recommending additional videos to watch for code analysis
Other @Beachcasts videos you might find interesting:
Vital Tips for Learning A New Codebase Quickly For Faster Productivity https://youtu.be/3A41JaqKj8Q
How To Be A Better Software Engineer And Professional Programmer https://youtu.be/AnoLP33unUw
Laravel Query Builder Usage With Example Code https://youtu.be/H4p05Bz4nfg
How To Create And Use Github Packages For Docker Containers https://youtu.be/qoMg86QA5P4
Measure PHP Code Quality With Static Analysis Using PHPStan https://youtu.be/OiS2xGVWEa0
Define Technical Debt and Contributing Factors for Software Errors https://youtu.be/ZJ5a4mxBbWw
Getting Started using Laravel Sail for Docker on WSL 2 https://youtu.be/Zxi157MpoRE
Developing on Windows with WSL2 (Subsystem for Linux) and PHP https://youtu.be/_H1iKXksjF0
WSL 2 With Docker Getting Started and Docker Desktop Installation https://youtu.be/h0Lwtcje-Jo
Getting Started with WSL 2 and Ubuntu on Windows 10 https://youtu.be/X3bPWl9Z2D0
Secrets To Get A Developer Job And Searching For Programming Jobs https://youtu.be/zls-4vbjFxk
Store sensitive data in environment variables using phpdotenv https://youtu.be/oTrJfgUF1SI
How to understand code written by someone else https://youtu.be/lj6GH6yWSlk
Ways to advance your programming skills and improve as a developer https://youtu.be/X6abVw8SlZc
Make your local DEV environment available on the internet https://youtu.be/xs2o7B_Ex9E
AWS Elastic Load Balancer (ELB) Tutorial How-To https://youtu.be/Sr2Mq9Gegew
Laravel Model Factory Tutorial using Artisan make:model https://youtu.be/hM135dPJ1dM
Authentication in Laravel Tutorial https://youtu.be/2qJkzWJNpjQ
Top 5 skills to be a better software developer https://youtu.be/kbX8iATLqxs
Install Laravel in Docker container on Ubuntu for beginners https://youtu.be/0HTruhilvcU
Getters and Setters accessors in object-oriented programming https://youtu.be/cozignPaoLg
Critical programming issues preventing a PHP 7 upgrade https://youtu.be/z13glyDnm6s
Behat for beginners functional REST API testing tutorial https://youtu.be/nFNGDhyFrm4
PHP Mess Detector static analysis to find PHP code smells https://youtu.be/8fEfHESrK5E
How to get lines of code in PHP https://youtu.be/HpC-Cvxj6oY
Use UUID with Doctrine ORM for DB keys https://youtu.be/SYuLwMwSIpg
Learn about Hypermedia and how to create it https://youtu.be/aV6ro_JXL_A
Configure PhpStorm for PHP development with Docker https://youtu.be/FQWL-JTZvf4
Create PHP development environment with docker https://youtu.be/2ESAi2vq-80
Help through referrals:
I use TubeBuddy to help me manage my YouTube channel. If you're interested, click the following link to check it out. https://www.tubebuddy.com/beachcasts
#refactoring #extractmethod #jetbrains
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Refactoring Code With Extract Method Live Code Example 001-002», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.