All examples in this article actually work, so feel free to try them in your browsers console 🤓
Adds one or more elements to the end of an array. Or grows a farm.
let livestock = ["🐷", "🐮", "🐔"];
// ["🐷", "🐮"…
I know there is still a lot of hatred for PHP out there, but in my opinion with version 7 at the latest (which is already over 5 years old!), PHP evolved to a great language that is fun and even type-safe to use. Next to Just-In-Time compilation, which may give a big performance boost to PHP applications, version 8 brings a lot of useful features.
In the first post of this series I told you the background story why I built a tool that’s able to show some email analytics in the Mozilla Thunderbird email client. After using this tool for a year now, I’ve determined three major issues:
❌ It depends on the mail storage engine
❌ The stats creation process is a little too complex
❌ The stats page cannot be accessed directly from Thunderbird
I’m not really sure if it’s a thing to be ashamed of today, but I’m still pushing build files of most of my personal open source projects manually via good ol’ FTP to my server. Maybe I just don’t wanted to give up too much control over the files that I push to production. Or after doing web development for more than 15 years now, I was just too lazy to change something 😅
However, I found an awesome GitHub action to publish files automatically via FTP to my server on build.
It’s the FTP-Deploy-Action by Sam Kirkland which utilizes…
Since I wrote my first lines of code in Python, I was fascinated by its simplicity, excellent readability and its popular one-liners in particular. In the following, I want to present and explain some of these one-liners — maybe there are a few you didn’t already know and are useful for your next Python project.
# a = 1; b = 2
a, b = b, a
# print(a,b) >> 2 1
Let’s start with a classic: swapping the values of variables by simply swapping positions on assignment — the most intuitive way in my opinion. No need to use…
If you haven’t heard of Emmet before, see this awesome introduction to Emmet by Thabi. Emmet is integrated in most code editors by default, so maybe you’re using it right now without knowing it’s Emmet under the hood 😅. In VS Code e.g. you just have to type the Emmet abbreviation and hit TAB to create the markup.
I humbly assume that every single one of us has a bad habit we want to get rid of. At least I have those habits 😅. Be it committing untested code, coding without proper documentation, just copying-and-pasting code or not even programming or computer related things like spending too less time with family or friends, blaming others for any faults instead of taking responsibility or eating too many candies 🍭🤷🏻♂️.
Back in July 2018 I came to a point where I really got frustrated about my inability to listen to my wife. I mean real listening. Listening without instantly forgetting…
In this article I want to present some of these alternatives. This is useful, if you’re searching for possibilities to decrease execution time even more in production. Let’s see, which PHP methods might be replaced by a more performant approach and if there is any cost or trade-off.
ℹ All these methods were tested with PHP 7.4 on a local web server
You have a large array with duplicates and want to remove them to only have an array with unique values only.
I created an array with more than 4 million elements having more than 3 million…
Sorry if this is a bit emotional, but I just have to say this now. Even at the risk of boring some of you. This isn’t another Vue vs React vs Angular post — it’s more like the opposite.
I love the open source community. I really do. It’s simply amazing what people are capable of to make things easier to use, make things more performant, build things to connect and find solutions for complex problems — in short: make the life of other developers and users easier and help each other out — even without being paid (in many…