[{"data":1,"prerenderedAt":1114},["ShallowReactive",2],{"post-cards":3,"categories":529,"post-bem-methodology-overview-and-naming-conventions":567},[4,27,38,54,68,78,87,97,111,124,134,145,160,172,185,196,207,218,229,240,251,264,277,292,307,321,335,347,358,369,379,389,399,409,419,429,439,449,459,469,479,489,499,509,519],{"path":5,"title":6,"slug":7,"summary":8,"date":9,"readTime":10,"hasImage":11,"category":12,"tags":17,"tagSlugs":26},"\u002Fposts\u002Fgit-flow-vs-github-flow-choosing-a-branching-strategy","Git Flow vs GitHub Flow: Choosing a Branching Strategy for Your Team","git-flow-vs-github-flow-choosing-a-branching-strategy","Git Flow and GitHub Flow take very different approaches to team branching and releases. Let's compare them, see where trunk-based development fits, and sort out how to handle versioned releases, hotfixes, and everything in between.","2026-06-14",7,false,{"id":13,"name":14,"slug":15,"hue":16},4,"Git","git",158,[18,20,23],{"name":19,"slug":15},"GIT",{"name":21,"slug":22},"Workflow","workflow",{"name":24,"slug":25},"GitHub","github",[15,22,25],{"path":28,"title":29,"slug":30,"summary":31,"date":9,"readTime":10,"hasImage":11,"category":32,"tags":33,"tagSlugs":37},"\u002Fposts\u002Fgithub-flow-keep-your-main-branch-deployable","GitHub Flow: Keep Your Main Branch Deployable","github-flow-keep-your-main-branch-deployable","GitHub Flow is the lightweight branching workflow built on a single rule: anything in main is deployable. Here is the whole loop, branch, pull request, review, merge and deploy, with the git and gh commands and an honest look at where it fits.",{"id":13,"name":14,"slug":15,"hue":16},[34,35,36],{"name":19,"slug":15},{"name":21,"slug":22},{"name":24,"slug":25},[15,22,25],{"path":39,"title":40,"slug":41,"summary":42,"date":43,"readTime":44,"hasImage":11,"category":45,"tags":50,"tagSlugs":53},"\u002Fposts\u002Fstarting-with-rust-installation-first-program","Starting with Rust: From Installation to Your First Program","starting-with-rust-installation-first-program","Learn how to install Rust and write your first \"Hello, world!\" program.","2024-03-23",2,{"id":46,"name":47,"slug":48,"hue":49},6,"Rust","rust-programming",38,[51],{"name":52,"slug":52},"rust",[52],{"path":55,"title":56,"slug":57,"summary":58,"date":59,"readTime":44,"hasImage":11,"category":60,"tags":65,"tagSlugs":67},"\u002Fposts\u002Fflutter-version-management-fvm","Flutter Version Management","flutter-version-management-fvm","Managing multiple Flutter versions does not need not be a headache. Let's jump into FVM and see how it can simplify your Flutter journey.","2023-10-07",{"id":61,"name":62,"slug":63,"hue":64},5,"Flutter","flutter",230,[66],{"name":63,"slug":63},[63],{"path":69,"title":70,"slug":71,"summary":72,"date":59,"readTime":73,"hasImage":11,"category":74,"tags":75,"tagSlugs":77},"\u002Fposts\u002Fsetting-up-cocoapods-fvm","Setting Up CocoaPods for FVM-managed Flutter Projects","setting-up-cocoapods-fvm","A guide to installing CocoaPods for a Flutter project while using FVM to manage Flutter versions, ensuring a smooth setup for iOS development.",1,{"id":61,"name":62,"slug":63,"hue":64},[76],{"name":63,"slug":63},[63],{"path":79,"title":80,"slug":81,"summary":82,"date":59,"readTime":73,"hasImage":11,"category":83,"tags":84,"tagSlugs":86},"\u002Fposts\u002Ftroubleshooting-xcode-15-build-issues-flutter","Troubleshooting Xcode 15 Build Issues in Flutter Projects","troubleshooting-xcode-15-build-issues-flutter","Uncovering solutions to common issues faced when updating to Xcode 15 in a Flutter project using an older version of CocoaPods.",{"id":61,"name":62,"slug":63,"hue":64},[85],{"name":63,"slug":63},[63],{"path":88,"title":89,"slug":90,"summary":91,"date":92,"readTime":13,"hasImage":11,"category":93,"tags":94,"tagSlugs":96},"\u002Fposts\u002Fgit-tracking-a-remote-branch-upstream-for-changes","Git: Tracking a Remote Branch for Changes","git-tracking-a-remote-branch-upstream-for-changes","When you fork a project, you need a way to pull in changes from the original repository, usually called upstream. Here is how to wire up an upstream remote, actually sync your fork, and set up branch tracking so plain git pull and git push just work.","2018-11-04",{"id":13,"name":14,"slug":15,"hue":16},[95],{"name":19,"slug":15},[15],{"path":98,"title":99,"slug":100,"summary":101,"date":92,"readTime":102,"hasImage":103,"category":104,"tags":108,"tagSlugs":110},"\u002Fposts\u002Fjavascript-array-map-filter-reduce-functions","JavaScript's map, filter, and reduce methods","javascript-array-map-filter-reduce-functions","JavaScript provides some amazing functions that can be called against your arrays to help filter them, manipulate them, or even reduce them down to a single value or grouped values.",3,true,{"id":44,"name":105,"slug":106,"hue":107},"JavaScript","javascript",92,[109],{"name":105,"slug":106},[106],{"path":112,"title":113,"slug":114,"summary":115,"date":116,"readTime":73,"hasImage":103,"category":117,"tags":121,"tagSlugs":123},"\u002Fposts\u002Fphp-fizzbuzz-example","FizzBuzz in PHP: A Fresh Approach","php-fizzbuzz-example","FizzBuzz is a very popular programming question that tests your logic to see if you can build a simple program.","2018-11-02",{"id":73,"name":118,"slug":119,"hue":120},"PHP","php",264,[122],{"name":118,"slug":119},[119],{"path":125,"title":126,"slug":127,"summary":128,"date":129,"readTime":44,"hasImage":103,"category":130,"tags":131,"tagSlugs":133},"\u002Fposts\u002Fphp-array-reduce","PHP's array_reduce is not only for outputting single values","php-array-reduce","PHP's array_reduce is a simple way to partition a set of data or return a single value. It is super powerful and worth spending time learning.","2018-11-01",{"id":73,"name":118,"slug":119,"hue":120},[132],{"name":118,"slug":119},[119],{"path":135,"title":136,"slug":137,"summary":138,"date":139,"readTime":46,"hasImage":11,"category":140,"tags":141,"tagSlugs":144},"\u002Fposts\u002Fimprove-your-git-workflow-with-git-flow","Improve Your Git Workflow with Git Flow","improve-your-git-workflow-with-git-flow","Git Flow is a structured branching model built around versioned, scheduled releases. Here is how its branches fit together, a hands-on walkthrough of features, releases and hotfixes, and an honest take on when it is still the right call.","2016-12-06",{"id":13,"name":14,"slug":15,"hue":16},[142,143],{"name":19,"slug":15},{"name":21,"slug":22},[15,22],{"path":146,"title":147,"slug":148,"summary":149,"date":150,"readTime":46,"hasImage":11,"category":151,"tags":155,"tagSlugs":159},"\u002Fposts\u002Fusing-css-transitions","Using CSS Transitions","using-css-transitions","CSS transitions are the standard way to apply transitions to your elements, and have been for years, replacing the old approach of using JavaScript. In this article, I'll go through each of the transition properties available, and provide examples of how to use them.","2016-12-05",{"id":102,"name":152,"slug":153,"hue":154},"HTML & CSS","html-css",55,[156],{"name":157,"slug":158},"CSS","css",[158],{"path":161,"title":162,"slug":163,"summary":164,"date":165,"readTime":13,"hasImage":11,"category":166,"tags":167,"tagSlugs":171},"\u002Fposts\u002Fstructuring-your-website-with-html-5-semantics","Structuring Your Website With HTML 5 Semantics","structuring-your-website-with-html-5-semantics","Prior to HTML 5, there was no real markup to help explain the intent behind your HTML code. The goal of HTML 5 was to offer a more readable way of writing your code, so that any author that comes after you can have an easier time going through what you've created.","2016-12-04",{"id":102,"name":152,"slug":153,"hue":154},[168],{"name":169,"slug":170},"HTML","html",[170],{"path":173,"title":174,"slug":175,"summary":176,"date":177,"readTime":44,"hasImage":11,"category":178,"tags":179,"tagSlugs":184},"\u002Fposts\u002Finterpolation-in-stylus-css-pre-processor","Interpolation in Stylus","interpolation-in-stylus-css-pre-processor","You can also use interpolation to improve your functions for reuse, as well as your other code within your stylesheet. The way it works is that you can wrap your expression within {}, which will then be outputted as the identifier.","2016-12-03",{"id":102,"name":152,"slug":153,"hue":154},[180,183],{"name":181,"slug":182},"Stylus","stylus",{"name":157,"slug":158},[182,158],{"path":186,"title":187,"slug":188,"summary":189,"date":190,"readTime":73,"hasImage":11,"category":191,"tags":192,"tagSlugs":195},"\u002Fposts\u002Fcreating-configuration-files-in-stylus-css-pre-processor","Creating Configuration Files In Stylus","creating-configuration-files-in-stylus-css-pre-processor","It's super simple to create a configuration file for instance that would manage your media query break points. You could also use a configuration file for managing colors, font sizes, and other variables such as gutter spacing and more.","2016-12-02",{"id":102,"name":152,"slug":153,"hue":154},[193,194],{"name":157,"slug":158},{"name":181,"slug":182},[158,182],{"path":197,"title":198,"slug":199,"summary":200,"date":201,"readTime":13,"hasImage":11,"category":202,"tags":203,"tagSlugs":206},"\u002Fposts\u002Fusing-functions-and-mixins-with-stylus-css-pre-processor","Using Functions and Mixins with Stylus","using-functions-and-mixins-with-stylus-css-pre-processor","Stylus allows you to create functions and mixins of reusable code for your stylesheets. You can also handle mathematical operations, unary operations, and more allowing you complete control over your stylesheets with ease.","2016-12-01",{"id":102,"name":152,"slug":153,"hue":154},[204,205],{"name":157,"slug":158},{"name":181,"slug":182},[158,182],{"path":208,"title":209,"slug":210,"summary":211,"date":212,"readTime":44,"hasImage":11,"category":213,"tags":214,"tagSlugs":217},"\u002Fposts\u002Fsetting-variables-in-stylus-css-pre-processor","Setting Variables in Stylus","setting-variables-in-stylus-css-pre-processor","Unlike CSS, in Stylus you can assign expressions to variables that can be reusable throughout your stylesheets.","2016-11-29",{"id":102,"name":152,"slug":153,"hue":154},[215,216],{"name":157,"slug":158},{"name":181,"slug":182},[158,182],{"path":219,"title":220,"slug":221,"summary":222,"date":223,"readTime":61,"hasImage":11,"category":224,"tags":225,"tagSlugs":228},"\u002Fposts\u002Fusing-selectors-in-stylus-css-pre-processor","Using Selectors in Stylus","using-selectors-in-stylus-css-pre-processor","Selectors are a way to pick the elements that you want styled. In Stylus, similar to CSS, you can apply a set of styles to any element by separating them by a comma delimited list. Stylus though, also allows you to select multiple elements by separating each on their own line.","2016-11-28",{"id":102,"name":152,"slug":153,"hue":154},[226,227],{"name":157,"slug":158},{"name":181,"slug":182},[158,182],{"path":230,"title":231,"slug":232,"summary":233,"date":234,"readTime":73,"hasImage":11,"category":235,"tags":236,"tagSlugs":239},"\u002Fposts\u002Flearning-stylus-a-css-pre-processor","Learning Stylus: A CSS Pre-Processor","learning-stylus-a-css-pre-processor","This mini-series will be a little different to how you may see other articles on my site. Really this article is more geared as notes for me as I go through the documentation for Stylus, and learn the ins and outs of this beautiful language.","2016-11-27",{"id":102,"name":152,"slug":153,"hue":154},[237,238],{"name":157,"slug":158},{"name":181,"slug":182},[158,182],{"path":241,"title":242,"slug":243,"summary":244,"date":245,"readTime":13,"hasImage":11,"category":246,"tags":247,"tagSlugs":250},"\u002Fposts\u002Fbem-methodology-overview-and-naming-conventions","BEM Methodology Overview and Naming Conventions","bem-methodology-overview-and-naming-conventions","BEM or Block Element Modifier is a naming convention used to help organize your code base. In this article, I discuss its uses within your CSS projects.","2016-11-26",{"id":102,"name":152,"slug":153,"hue":154},[248,249],{"name":157,"slug":158},{"name":169,"slug":170},[158,170],{"path":252,"title":253,"slug":254,"summary":255,"date":256,"readTime":73,"hasImage":11,"category":257,"tags":258,"tagSlugs":263},"\u002Fposts\u002Fintroduction-to-ecmascript-6","Introduction to ECMAScript 6","introduction-to-ecmascript-6","The latest in ECMAScript 6 introduces new features to JavaScript which makes it so much more fun to use, while solving problems that have been around for years. The intent of this article is to provide you with resources you can use to start learning ES6 today.","2016-11-25",{"id":44,"name":105,"slug":106,"hue":107},[259,260],{"name":105,"slug":106},{"name":261,"slug":262},"ECMAScript","ecmascript",[106,262],{"path":265,"title":266,"slug":267,"summary":268,"date":269,"readTime":102,"hasImage":11,"category":270,"tags":271,"tagSlugs":276},"\u002Fposts\u002Fbabel-installation-and-configuration","Babel Installation and Configuration","babel-installation-and-configuration","Babel offers a convenient way to transform your ES6 code to JavaScript that all browsers can understand. In this article we'll go over a basic configuration that will enable you to start using it with any project right away.","2016-11-24",{"id":44,"name":105,"slug":106,"hue":107},[272,273],{"name":105,"slug":106},{"name":274,"slug":275},"Babel","babel",[106,275],{"path":278,"title":279,"slug":280,"summary":281,"date":282,"readTime":73,"hasImage":11,"category":283,"tags":284,"tagSlugs":291},"\u002Fposts\u002Fconfiguring-stylus-css-pre-processor-with-gulp-and-sourcemaps","Configuring Stylus CSS Pre-Processor with Gulp and Sourcemaps","configuring-stylus-css-pre-processor-with-gulp-and-sourcemaps","In this article we'll go over how to configure your project to process Stylus files using Gulp. We'll also create source map file which your browser will use to help point you in the right direction of your files when developing","2016-11-23",{"id":44,"name":105,"slug":106,"hue":107},[285,286,287,288],{"name":105,"slug":106},{"name":181,"slug":182},{"name":157,"slug":158},{"name":289,"slug":290},"Gulp","gulp",[106,182,158,290],{"path":293,"title":294,"slug":295,"summary":296,"date":297,"readTime":44,"hasImage":11,"category":298,"tags":299,"tagSlugs":306},"\u002Fposts\u002Fconfiguring-gulp-with-less-css-pre-processor","Configuring Gulp With Less CSS Pre-Processor","configuring-gulp-with-less-css-pre-processor","Less is a CSS pre-processor allowing you to create variables, mixins, and functions in an effort to make your CSS more maintainable.","2016-11-22",{"id":44,"name":105,"slug":106,"hue":107},[300,301,302,305],{"name":289,"slug":290},{"name":105,"slug":106},{"name":303,"slug":304},"Less","less",{"name":157,"slug":158},[290,106,304,158],{"path":308,"title":309,"slug":310,"summary":311,"date":312,"readTime":44,"hasImage":103,"category":313,"tags":314,"tagSlugs":320},"\u002Fposts\u002Fusing-browser-sync-with-gulp-for-live-reloading","Using Browser Sync with Gulp for Live Reloading","using-browser-sync-with-gulp-for-live-reloading","Browser Sync is a nice tool to use while developing. It allows your browser to reload live when changes are made to your files. For instance, assuming we're watching our CSS file for changes we can have the browser auto refresh\u002Fsync when it sees those changes made.","2016-11-21",{"id":44,"name":105,"slug":106,"hue":107},[315,316,319],{"name":105,"slug":106},{"name":317,"slug":318},"Browser Sync","browser-sync",{"name":289,"slug":290},[106,318,290],{"path":322,"title":323,"slug":324,"summary":325,"date":326,"readTime":44,"hasImage":11,"category":327,"tags":328,"tagSlugs":334},"\u002Fposts\u002Fgulp-watch-automate-your-gulp-tasks","Gulp Watch: Automate Your Gulp Tasks","gulp-watch-automate-your-gulp-tasks","Gulp watch is perfect for when you're editing project files since it allows you to not have to run the gulp command manually each time.","2016-11-20",{"id":44,"name":105,"slug":106,"hue":107},[329,330,333],{"name":105,"slug":106},{"name":331,"slug":332},"Yarn","yarn",{"name":289,"slug":290},[106,332,290],{"path":336,"title":337,"slug":338,"summary":339,"date":340,"readTime":46,"hasImage":11,"category":341,"tags":342,"tagSlugs":346},"\u002Fposts\u002Fconfiguring-gulp-on-a-new-project","Configuring Gulp On A New Project","configuring-gulp-on-a-new-project","Gulp may seem like a scary thing to wrap your head around at first, but it's actually quite easy to start using once you understand the basics.","2016-11-19",{"id":44,"name":105,"slug":106,"hue":107},[343,344,345],{"name":105,"slug":106},{"name":289,"slug":290},{"name":331,"slug":332},[106,290,332],{"path":348,"title":349,"slug":350,"summary":351,"date":352,"readTime":102,"hasImage":11,"category":353,"tags":354,"tagSlugs":357},"\u002Fposts\u002Fyarn-publishing-a-package","Yarn: Publishing a Package","yarn-publishing-a-package","Publishing a package to the npm repository has never been simpler. With a few steps, you can create a package that is redistributable to all of your projects.","2016-11-18",{"id":44,"name":105,"slug":106,"hue":107},[355,356],{"name":105,"slug":106},{"name":331,"slug":332},[106,332],{"path":359,"title":360,"slug":361,"summary":362,"date":363,"readTime":102,"hasImage":11,"category":364,"tags":365,"tagSlugs":368},"\u002Fposts\u002Fyarn-fast-and-secure-dependency-management","Yarn: Fast and Secure Dependency Management","yarn-fast-and-secure-dependency-management","Yarn is a super simple dependency management tool which is way faster to use instead of traditional npm. It acts as a drop-in replacement, so you can get started using yarn right away. The best way to install yarn is by using npm.","2016-11-17",{"id":44,"name":105,"slug":106,"hue":107},[366,367],{"name":105,"slug":106},{"name":331,"slug":332},[106,332],{"path":370,"title":371,"slug":372,"summary":373,"date":374,"readTime":73,"hasImage":103,"category":375,"tags":376,"tagSlugs":378},"\u002Fposts\u002Fsupport-for-keys-in-list-or-its-new-shorthand-syntax-in-php","Support for keys in list(), or its new shorthand syntax [] in PHP","support-for-keys-in-list-or-its-new-shorthand-syntax-in-php","Now as of PHP 7.1, you can define the keys of your array that will be parsed when destructuring your arrays. Prior to PHP 7.1, you could only use arrays with numeric indexes. Now with this new addition, our lives just got easier.","2016-11-16",{"id":73,"name":118,"slug":119,"hue":120},[377],{"name":118,"slug":119},[119],{"path":380,"title":381,"slug":382,"summary":383,"date":384,"readTime":73,"hasImage":103,"category":385,"tags":386,"tagSlugs":388},"\u002Fposts\u002Ftype-hinting-with-the-iterable-pseudo-type-in-php","Type Hinting With The Iterable pseudo-type In PHP","type-hinting-with-the-iterable-pseudo-type-in-php","As of PHP 7.1, you can now type hint your method\u002Ffunction arguments with the keyword iterable for handling arrays or even objects that implement the Traversable interface.","2016-11-15",{"id":73,"name":118,"slug":119,"hue":120},[387],{"name":118,"slug":119},[119],{"path":390,"title":391,"slug":392,"summary":393,"date":394,"readTime":73,"hasImage":103,"category":395,"tags":396,"tagSlugs":398},"\u002Fposts\u002Ftype-hinting-callable-functions-in-php","Type Hinting Callable Functions in PHP","type-hinting-callable-functions-in-php","As of PHP 5.4, you can type hint your method arguments with the callable keyword allowing you to enforce the type of data that is passed via your arguments.","2016-11-14",{"id":73,"name":118,"slug":119,"hue":120},[397],{"name":118,"slug":119},[119],{"path":400,"title":401,"slug":402,"summary":403,"date":404,"readTime":73,"hasImage":103,"category":405,"tags":406,"tagSlugs":408},"\u002Fposts\u002Fsetting-visibility-for-your-class-constants-in-php","Setting Visibility for Your Class Constants in PHP","setting-visibility-for-your-class-constants-in-php","Now in PHP 7.1+, you can set different visibility modifiers for each of your class constants. The available visibility modifiers consist of public, protected, and private.","2016-11-13",{"id":73,"name":118,"slug":119,"hue":120},[407],{"name":118,"slug":119},[119],{"path":410,"title":411,"slug":412,"summary":413,"date":414,"readTime":73,"hasImage":103,"category":415,"tags":416,"tagSlugs":418},"\u002Fposts\u002Fanonymous-classes-php","Using Anonymous Classes in PHP","anonymous-classes-php","As of PHP 7, you can now create quick throwaway objects for use within your projects. This can be especially useful for your automated tests, for instance, with allowing you to create quick implementations of your interfaces.","2016-11-12",{"id":73,"name":118,"slug":119,"hue":120},[417],{"name":118,"slug":119},[119],{"path":420,"title":421,"slug":422,"summary":423,"date":424,"readTime":73,"hasImage":103,"category":425,"tags":426,"tagSlugs":428},"\u002Fposts\u002Fsymmetric-array-destructuring-in-php","Symmetric Array Destructuring in PHP","symmetric-array-destructuring-in-php","As of PHP 7.1, you can now use the shorthand array syntax to destructure your arrays for assignment. Previously you would have had to use a function like list, but now you can use the simple new array shorthand syntax.","2016-11-11",{"id":73,"name":118,"slug":119,"hue":120},[427],{"name":118,"slug":119},[119],{"path":430,"title":431,"slug":432,"summary":433,"date":434,"readTime":44,"hasImage":103,"category":435,"tags":436,"tagSlugs":438},"\u002Fposts\u002Fphp-array-map-to-format-your-arrays-without-loops","Using PHP's array_map to format your arrays without loops","php-array-map-to-format-your-arrays-without-loops","So let's face it, loops are a bit boring. So how can we mix it up? Let's assume we have a case where we have a CSV file that we want to quickly parse.","2016-11-10",{"id":73,"name":118,"slug":119,"hue":120},[437],{"name":118,"slug":119},[119],{"path":440,"title":441,"slug":442,"summary":443,"date":444,"readTime":10,"hasImage":103,"category":445,"tags":446,"tagSlugs":448},"\u002Fposts\u002Fsolid-principles-in-php","SOLID Principles in PHP","solid-principles-in-php","The 5 basic principles for Object-Oriented Design, SOLID, were first created in an effort to improve maintainability in our code bases. SOLID is a mnemonic acronym that stands for each of the following principles: Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion.","2016-11-09",{"id":73,"name":118,"slug":119,"hue":120},[447],{"name":118,"slug":119},[119],{"path":450,"title":451,"slug":452,"summary":453,"date":454,"readTime":73,"hasImage":103,"category":455,"tags":456,"tagSlugs":458},"\u002Fposts\u002Ffiltering-arrays-without-using-loops-in-php","Filtering Arrays Without Using Loops in PHP","filtering-arrays-without-using-loops-in-php","PHP has a built-in function called array_filter that allows you to filter through your arrays without the need for a loop. Personally, this approach feels much cleaner to me and simpler to comprehend.","2016-11-08",{"id":73,"name":118,"slug":119,"hue":120},[457],{"name":118,"slug":119},[119],{"path":460,"title":461,"slug":462,"summary":463,"date":464,"readTime":73,"hasImage":103,"category":465,"tags":466,"tagSlugs":468},"\u002Fposts\u002Fvoid-return-types-in-php","Void Return Types in PHP","void-return-types-in-php","As of PHP 7.1, we can now use void return types within our methods. This is useful for cases where you have methods that are just setting or processing data without the need of returning any values.","2016-11-07",{"id":73,"name":118,"slug":119,"hue":120},[467],{"name":118,"slug":119},[119],{"path":470,"title":471,"slug":472,"summary":473,"date":474,"readTime":73,"hasImage":103,"category":475,"tags":476,"tagSlugs":478},"\u002Fposts\u002Ftype-hinting-with-nullable-types-in-php","Type Hinting with Nullable Types in PHP","type-hinting-with-nullable-types-in-php","As of PHP 7.1, you can now set your type declarations as nullable by simply prefixing them with a question mark ?. In doing so a null value can be passed in as a parameter or returned as a value for your methods.","2016-11-06",{"id":73,"name":118,"slug":119,"hue":120},[477],{"name":118,"slug":119},[119],{"path":480,"title":481,"slug":482,"summary":483,"date":484,"readTime":73,"hasImage":103,"category":485,"tags":486,"tagSlugs":488},"\u002Fposts\u002Fphp-group-multiple-use-declarations","PHP Group Multiple use Declarations","php-group-multiple-use-declarations","As of PHP 7, you can now group your imported classes, functions, and constants from under the same namespace.","2016-11-05",{"id":73,"name":118,"slug":119,"hue":120},[487],{"name":118,"slug":119},[119],{"path":490,"title":491,"slug":492,"summary":493,"date":494,"readTime":73,"hasImage":103,"category":495,"tags":496,"tagSlugs":498},"\u002Fposts\u002Fphp-null-coalescing-operator","PHP Null Coalescing Operator","php-null-coalescing-operator","One of my new favorite additions to PHP 7, is the Null Coalescing Operator. It cleans up your code by removing a tedious step of checking if some value is isset() and not NULL and returning it or if not setting a default.","2016-11-04",{"id":73,"name":118,"slug":119,"hue":120},[497],{"name":118,"slug":119},[119],{"path":500,"title":501,"slug":502,"summary":503,"date":504,"readTime":44,"hasImage":103,"category":505,"tags":506,"tagSlugs":508},"\u002Fposts\u002Fphp-spaceship-operator","PHP Spaceship Operator","php-spaceship-operator","One of the new features to hit PHP 7 is the Spaceship Operator. This new trick helps improve the way you'd compare 2 expressions. In short, the comparison returns 1 of 3 values (-1, 0, or 1) depending on the result of the comparison.","2016-11-03",{"id":73,"name":118,"slug":119,"hue":120},[507],{"name":118,"slug":119},[119],{"path":510,"title":511,"slug":512,"summary":513,"date":514,"readTime":102,"hasImage":103,"category":515,"tags":516,"tagSlugs":518},"\u002Fposts\u002Freturn-type-declarations-in-php","Return Type Declarations in PHP","return-type-declarations-in-php","PHP 7 now makes it possible to declare return types for your methods. This allows you better control over the data that will be returned from each method in your application.","2016-11-02",{"id":73,"name":118,"slug":119,"hue":120},[517],{"name":118,"slug":119},[119],{"path":520,"title":521,"slug":522,"summary":523,"date":524,"readTime":73,"hasImage":103,"category":525,"tags":526,"tagSlugs":528},"\u002Fposts\u002Fscalar-type-hints-php","Scalar Type Hints in PHP","scalar-type-hints-php","Starting with PHP 7.0, it's now possible to declare scalar type hints for your method arguments. Previously, we were able to use array and callable, but now with PHP 7+, we have much more control.","2016-11-01",{"id":73,"name":118,"slug":119,"hue":120},[527],{"name":118,"slug":119},[119],[530,537,543,549,555,561],{"id":531,"description":532,"extension":533,"hue":120,"meta":534,"name":118,"slug":119,"stem":535,"weight":73,"__hash__":536},"categories\u002Fcategories\u002Fphp.json","PHP articles and tutorials ranging from new language features to using interesting packages.","json",{},"categories\u002Fphp","h_EmN4YMO4b2mBt3MPLs7RvscJx0NBmwDIZPxqPqKLE",{"id":538,"description":539,"extension":533,"hue":107,"meta":540,"name":105,"slug":106,"stem":541,"weight":44,"__hash__":542},"categories\u002Fcategories\u002Fjavascript.json","JavaScript articles and tutorials ranging from new language features to using interesting packages.",{},"categories\u002Fjavascript","7gmVgkw5BRo26i1bFoSv96bwDJ4nTtZcJ9Ud6u5p0yk",{"id":544,"description":545,"extension":533,"hue":154,"meta":546,"name":152,"slug":153,"stem":547,"weight":102,"__hash__":548},"categories\u002Fcategories\u002Fhtml-css.json","HTML & CSS articles and tutorials ranging from new language features to using interesting packages.",{},"categories\u002Fhtml-css","vXvPlRA-iaeCJ64Wi3sLyUR0kqL48zYcZWORRqt8N70",{"id":550,"description":551,"extension":533,"hue":16,"meta":552,"name":14,"slug":15,"stem":553,"weight":13,"__hash__":554},"categories\u002Fcategories\u002Fgit.json","Git articles and tutorials ranging from new language features to different workflows.",{},"categories\u002Fgit","qOqFsFTKI9XB444UodUKW_3AakFadHzW-ss8V-maUmE",{"id":556,"description":557,"extension":533,"hue":64,"meta":558,"name":62,"slug":63,"stem":559,"weight":61,"__hash__":560},"categories\u002Fcategories\u002Fflutter.json","Dive into Flutter, the open-source UI software development toolkit, as we explore its capabilities in creating natively compiled applications for mobile, web, and desktop from a single codebase.",{},"categories\u002Fflutter","aD1moU8CgoYt4FRnSeA4Iy9xxnnopdEKBEYP2arAzdI",{"id":562,"description":563,"extension":533,"hue":49,"meta":564,"name":47,"slug":48,"stem":565,"weight":46,"__hash__":566},"categories\u002Fcategories\u002Frust-programming.json","From setting up your environment to advanced concepts, this is your go-to resource for all things Rust.",{},"categories\u002Frust-programming","LscnqSsk-htWc9yZg9eXaIUJwNfTK5oaZOClYKagNC4",{"id":568,"title":242,"body":569,"category":1103,"date":245,"description":1104,"extension":1105,"hasImage":11,"meta":1106,"navigation":103,"path":241,"readTime":13,"seo":1107,"slug":243,"stem":1108,"summary":244,"tagSlugs":1109,"tags":1110,"__hash__":1113},"posts\u002Fposts\u002Fbem-methodology-overview-and-naming-conventions.md",{"type":570,"value":571,"toc":1091},"minimark",[572,584,589,592,636,639,642,647,650,716,720,723,736,739,742,865,869,872,875,878,882,885,888,891,1003,1006,1010,1013,1016,1044,1052,1056,1059,1077,1080,1084,1087],[573,574,575,576,583],"p",{},"BEM or Block Element Modifier is a naming convention used to help organize your code base. In this article, I discuss its uses within your CSS projects. For a more detailed look into BEM, feel free to read through the ",[577,578,582],"a",{"href":579,"rel":580},"https:\u002F\u002Fgetbem.com\u002F",[581],"nofollow","official BEM documentation",".",[585,586,588],"h2",{"id":587},"block","Block",[573,590,591],{},"So what is a block? Basically a block is a higher level element used to define a section's purpose. You can think of a block as a reusable grouping of code that you will identify by a class name. For instance you may have a div that holds a single product's specific data. We'll call this div .product",[593,594,598],"pre",{"className":595,"code":596,"language":170,"meta":597,"style":597},"language-html shiki shiki-themes github-dark github-dark","\u003Cdiv class=\"product\">\n\u003C\u002Fdiv>\n","",[599,600,601,627],"code",{"__ignoreMap":597},[602,603,605,609,613,617,620,624],"span",{"class":604,"line":73},"line",[602,606,608],{"class":607},"suv1-","\u003C",[602,610,612],{"class":611},"sxg3X","div",[602,614,616],{"class":615},"sFR8T"," class",[602,618,619],{"class":607},"=",[602,621,623],{"class":622},"s4wv1","\"product\"",[602,625,626],{"class":607},">\n",[602,628,629,632,634],{"class":604,"line":44},[602,630,631],{"class":607},"\u003C\u002F",[602,633,612],{"class":611},[602,635,626],{"class":607},[573,637,638],{},"If your block name consists of more than one word, separate the words with a hyphen, like block-name.",[573,640,641],{},"Block names should never describe the appearance.",[643,644,646],"h3",{"id":645},"nesting-blocks","Nesting Blocks",[573,648,649],{},"You can nest your blocks any number of levels deep. For example, let's create a block that holds all of our product blocks.",[593,651,653],{"className":595,"code":652,"language":170,"meta":597,"style":597},"\u003C!-- Block --> \n\u003Cdiv class=\"product-list\">\n    \u003C!-- Nested Block -->\n    \u003Cdiv class=\"product\">\n    \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n",[599,654,655,664,679,684,699,708],{"__ignoreMap":597},[602,656,657,661],{"class":604,"line":73},[602,658,660],{"class":659},"sJ8bj","\u003C!-- Block -->",[602,662,663],{"class":607}," \n",[602,665,666,668,670,672,674,677],{"class":604,"line":44},[602,667,608],{"class":607},[602,669,612],{"class":611},[602,671,616],{"class":615},[602,673,619],{"class":607},[602,675,676],{"class":622},"\"product-list\"",[602,678,626],{"class":607},[602,680,681],{"class":604,"line":102},[602,682,683],{"class":659},"    \u003C!-- Nested Block -->\n",[602,685,686,689,691,693,695,697],{"class":604,"line":13},[602,687,688],{"class":607},"    \u003C",[602,690,612],{"class":611},[602,692,616],{"class":615},[602,694,619],{"class":607},[602,696,623],{"class":622},[602,698,626],{"class":607},[602,700,701,704,706],{"class":604,"line":61},[602,702,703],{"class":607},"    \u003C\u002F",[602,705,612],{"class":611},[602,707,626],{"class":607},[602,709,710,712,714],{"class":604,"line":46},[602,711,631],{"class":607},[602,713,612],{"class":611},[602,715,626],{"class":607},[643,717,719],{"id":718},"element","Element",[573,721,722],{},"Within each product we'll want to set a few elements. Elements, similar to blocks describe the purpose. The names should never be describing the appearance, but more the idea of what information will go within each section. For instance, we'll create the following 3 elements within our product block.",[724,725,726,730,733],"ol",{},[727,728,729],"li",{},"Product Name",[727,731,732],{},"Product Price",[727,734,735],{},"Link For More Details",[573,737,738],{},"Each element when using the BEM Methodology should be named starting with the name of the Block followed by 2 underscores and then the name of the element itself. block-name__element-name",[573,740,741],{},"Here's our new example with the 3 specified elements.",[593,743,745],{"className":595,"code":744,"language":170,"meta":597,"style":597},"\u003Cdiv class=\"product\">\n    \u003Cdiv class=\"product__name\">\n        Test Name\n    \u003C\u002Fdiv>\n    \u003Cdiv class=\"product__price\">\n        $20.00\n    \u003C\u002Fdiv>\n    \u003Ca class=\"product__link\" href=\"#\">\n        Details\n    \u003C\u002Fa>\n\u003C\u002Fdiv>\n",[599,746,747,761,776,781,789,804,809,817,841,847,856],{"__ignoreMap":597},[602,748,749,751,753,755,757,759],{"class":604,"line":73},[602,750,608],{"class":607},[602,752,612],{"class":611},[602,754,616],{"class":615},[602,756,619],{"class":607},[602,758,623],{"class":622},[602,760,626],{"class":607},[602,762,763,765,767,769,771,774],{"class":604,"line":44},[602,764,688],{"class":607},[602,766,612],{"class":611},[602,768,616],{"class":615},[602,770,619],{"class":607},[602,772,773],{"class":622},"\"product__name\"",[602,775,626],{"class":607},[602,777,778],{"class":604,"line":102},[602,779,780],{"class":607},"        Test Name\n",[602,782,783,785,787],{"class":604,"line":13},[602,784,703],{"class":607},[602,786,612],{"class":611},[602,788,626],{"class":607},[602,790,791,793,795,797,799,802],{"class":604,"line":61},[602,792,688],{"class":607},[602,794,612],{"class":611},[602,796,616],{"class":615},[602,798,619],{"class":607},[602,800,801],{"class":622},"\"product__price\"",[602,803,626],{"class":607},[602,805,806],{"class":604,"line":46},[602,807,808],{"class":607},"        $20.00\n",[602,810,811,813,815],{"class":604,"line":10},[602,812,703],{"class":607},[602,814,612],{"class":611},[602,816,626],{"class":607},[602,818,820,822,824,826,828,831,834,836,839],{"class":604,"line":819},8,[602,821,688],{"class":607},[602,823,577],{"class":611},[602,825,616],{"class":615},[602,827,619],{"class":607},[602,829,830],{"class":622},"\"product__link\"",[602,832,833],{"class":615}," href",[602,835,619],{"class":607},[602,837,838],{"class":622},"\"#\"",[602,840,626],{"class":607},[602,842,844],{"class":604,"line":843},9,[602,845,846],{"class":607},"        Details\n",[602,848,850,852,854],{"class":604,"line":849},10,[602,851,703],{"class":607},[602,853,577],{"class":611},[602,855,626],{"class":607},[602,857,859,861,863],{"class":604,"line":858},11,[602,860,631],{"class":607},[602,862,612],{"class":611},[602,864,626],{"class":607},[643,866,868],{"id":867},"nesting-elements","Nesting Elements",[573,870,871],{},"Just like blocks, you can also nest elements within each other. One thing to note, is that an element can only be a part of a block. Never another element. Meaning you cannot define a hierarchy when creating the class names for your elements.",[573,873,874],{},"For instance, this is invalid\nblock-name__element-name__element-name",[573,876,877],{},"Your element names should only ever be in the format of\nblock-name__element-name",[585,879,881],{"id":880},"modifier","Modifier",[573,883,884],{},"Lastly we have our modifiers, which describe the appearance of either elements or blocks. A modifier could be viewed as changing the default behavior of a particular block or element. Let's say we want one of our products to be featured and stand out with a background color. We can simply make a modifier class of .product_is-featured.",[573,886,887],{},"Note that a modifier is named using the Block or Element name followed by a single underscore and the name of the modifier.\nblock-name_modifier-name",[573,889,890],{},"Here's an example with a Product block that is featured.",[593,892,894],{"className":595,"code":893,"language":170,"meta":597,"style":597},"\u003Cdiv class=\"product product_is-featured\">\n    \u003Cdiv class=\"product__name\">\n        Test Name\n    \u003C\u002Fdiv>\n    \u003Cdiv class=\"product__price\">\n        $20.00\n    \u003C\u002Fdiv>\n    \u003Ca class=\"product__link\" href=\"#\">\n        Details\n    \u003C\u002Fa>\n\u003C\u002Fdiv>\n",[599,895,896,911,925,929,937,951,955,963,983,987,995],{"__ignoreMap":597},[602,897,898,900,902,904,906,909],{"class":604,"line":73},[602,899,608],{"class":607},[602,901,612],{"class":611},[602,903,616],{"class":615},[602,905,619],{"class":607},[602,907,908],{"class":622},"\"product product_is-featured\"",[602,910,626],{"class":607},[602,912,913,915,917,919,921,923],{"class":604,"line":44},[602,914,688],{"class":607},[602,916,612],{"class":611},[602,918,616],{"class":615},[602,920,619],{"class":607},[602,922,773],{"class":622},[602,924,626],{"class":607},[602,926,927],{"class":604,"line":102},[602,928,780],{"class":607},[602,930,931,933,935],{"class":604,"line":13},[602,932,703],{"class":607},[602,934,612],{"class":611},[602,936,626],{"class":607},[602,938,939,941,943,945,947,949],{"class":604,"line":61},[602,940,688],{"class":607},[602,942,612],{"class":611},[602,944,616],{"class":615},[602,946,619],{"class":607},[602,948,801],{"class":622},[602,950,626],{"class":607},[602,952,953],{"class":604,"line":46},[602,954,808],{"class":607},[602,956,957,959,961],{"class":604,"line":10},[602,958,703],{"class":607},[602,960,612],{"class":611},[602,962,626],{"class":607},[602,964,965,967,969,971,973,975,977,979,981],{"class":604,"line":819},[602,966,688],{"class":607},[602,968,577],{"class":611},[602,970,616],{"class":615},[602,972,619],{"class":607},[602,974,830],{"class":622},[602,976,833],{"class":615},[602,978,619],{"class":607},[602,980,838],{"class":622},[602,982,626],{"class":607},[602,984,985],{"class":604,"line":843},[602,986,846],{"class":607},[602,988,989,991,993],{"class":604,"line":849},[602,990,703],{"class":607},[602,992,577],{"class":611},[602,994,626],{"class":607},[602,996,997,999,1001],{"class":604,"line":858},[602,998,631],{"class":607},[602,1000,612],{"class":611},[602,1002,626],{"class":607},[573,1004,1005],{},"One important thing to note is that a modifier cannot be used outside the context of its owner (block or element).",[643,1007,1009],{"id":1008},"double-dash-instead-of-the-single-underscore","Double Dash Instead of the Single Underscore",[573,1011,1012],{},"You may also come across a few other naming conventions for modifiers which are perfectly acceptable.",[573,1014,1015],{},"With some projects you'll see the use of the double dash when separating a block or element from its modifier. For instance, using the example from the above, here's how you would see it using the double dash syntax.",[593,1017,1019],{"className":595,"code":1018,"language":170,"meta":597,"style":597},"\u003Cdiv class=\"product product--is-featured\">\n\u003C\u002Fdiv>\n",[599,1020,1021,1036],{"__ignoreMap":597},[602,1022,1023,1025,1027,1029,1031,1034],{"class":604,"line":73},[602,1024,608],{"class":607},[602,1026,612],{"class":611},[602,1028,616],{"class":615},[602,1030,619],{"class":607},[602,1032,1033],{"class":622},"\"product product--is-featured\"",[602,1035,626],{"class":607},[602,1037,1038,1040,1042],{"class":604,"line":44},[602,1039,631],{"class":607},[602,1041,612],{"class":611},[602,1043,626],{"class":607},[573,1045,1046,1047,583],{},"You can read more about the ",[577,1048,1051],{"href":1049,"rel":1050},"https:\u002F\u002Fgetbem.com\u002Fnaming\u002F",[581],"BEM naming conventions",[585,1053,1055],{"id":1054},"file-structure","File Structure",[573,1057,1058],{},"When writing your CSS, you may be using a tool such as Stylus or SASS which in that case it will be easy for you to break out each of the blocks and elements into their own files.",[724,1060,1061,1064,1067,1074],{},[727,1062,1063],{},"A block should always be within its own directory. In the case of our Product block, we'd simply create a product directory.",[727,1065,1066],{},"The elements of a block should be inside of the block's directory as their own directories. For instance, the product name element should have a directory for __name.",[727,1068,1069,1070],{},"Within each elements directory, you'd have the CSS file for that element. For instance for our product name we'd have a file for product__product-name.css ",[1071,1072,1073],"em",{},"Your file extensions may vary depending on the tools you're using.",[727,1075,1076],{},"Modifier directories would be named starting with the single underscore. For instance _is-featured",[573,1078,1079],{},"This is the recommended file structure, but you're free to organize your project how you like if this doesn't seem like a good fit for you.",[585,1081,1083],{"id":1082},"where-bem-fits-in-2026","Where BEM Fits in 2026",[573,1085,1086],{},"BEM is still a solid choice, especially on larger teams and in server-rendered, multi-page apps where your CSS lives apart from your markup. Since I first wrote this, a couple of popular alternatives have grown up alongside it: CSS Modules scope class names to a component automatically, and utility-first frameworks like Tailwind compose styles right in your markup. They are less competitors than different trade-offs, and BEM's naming discipline still pairs nicely with whatever custom CSS you write, even inside a Tailwind project. The convention covered above has aged well, so it is worth knowing whichever approach you reach for.",[1088,1089,1090],"style",{},"html pre.shiki code .suv1-, html code.shiki .suv1-{--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sxg3X, html code.shiki .sxg3X{--shiki-default:#85E89D;--shiki-dark:#85E89D}html pre.shiki code .sFR8T, html code.shiki .sFR8T{--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .s4wv1, html code.shiki .s4wv1{--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":597,"searchDepth":44,"depth":44,"links":1092},[1093,1098,1101,1102],{"id":587,"depth":44,"text":588,"children":1094},[1095,1096,1097],{"id":645,"depth":102,"text":646},{"id":718,"depth":102,"text":719},{"id":867,"depth":102,"text":868},{"id":880,"depth":44,"text":881,"children":1099},[1100],{"id":1008,"depth":102,"text":1009},{"id":1054,"depth":44,"text":1055},{"id":1082,"depth":44,"text":1083},{"id":102,"name":152,"slug":153,"hue":154},"BEM or Block Element Modifier is a naming convention used to help organize your code base. In this article, I discuss its uses within your CSS projects. For a more detailed look into BEM, feel free to read through the official BEM documentation.","md",{},{"title":242,"description":1104},"posts\u002Fbem-methodology-overview-and-naming-conventions",[158,170],[1111,1112],{"name":157,"slug":158},{"name":169,"slug":170},"InUWjgWNcVh8tWKxvzmIBC3HVPq6p8lkZW7lTCYyMGk",1781454357693]