Ionic menu not closing

Ionic – close menu on navigation

I’m working on an Ionic app and I stumbled upon this problem where the side menu does not close whenever I tap the menu item. It navigates to the page, but the menu stays open.

Laravel not nullable timestamp without a default value

I ran into the following question today: Is there no way to create a timestamp as not null with no default using #laravel migrations? I could get it to work making `shown_at` nullable, which… ok… but why? I’m OK w/ `created_at` using current but `shown_at` should always have a value. [1] For MySQL there is […]

People using your website are there on a mission

When people visit your website, they are there on a mission. They are there to get something done. Your job is to understand what that something is and provide the easiest route that will help them achieve just that. Anything else is just a distraction. As straightforward as it sounds, it’s hard. It’s hard because we […]

Chrome to start speed shaming websites

In a recent post, Google announced their intention to badge websites based on their speed and “in the future”, based on “high-quality experience, which may include signals beyond just speed”. Their motivation – “to help users understand when a site may load slow, while rewarding sites delivering fast experiences” is shady at best. Because, well, […]

Electron tray app windows taskbar

Positioning Electron Tray apps on Windows taskbar

One challenge when building an Electron Tray app is window positioning – assuming you want the app to act as a tooltip (eg: Google Drive app). If you’re here just for the resulting code, scroll down and grab it, otherwise I highly recommend using a pen and paper to draw the screen, taskbar and tray […]

VIN validation – Laravel custom validation rule

Working on a project involving dealerships and cars, I needed a way to validate car VIN (Vehicle Identification Number) so I came up with a custom Laravel validation rule.

Laravel fillable vs guarded

Laravel: Why I gave up on $fillable

Mass-assignment is when you use an array to create/update eloquent models. The $fillable and $guarded model properties are part of Laravel’s solution to avoid mass-assigning unwanted attributes when someone passes an unexpected HTTP parameter through a request and ends up changing a column in your database you did not expect.

ElectronJS ipcMain and ipcRenderer

Lately I found myself developing an ElectronJS app. I am building some kind of a bridge between software clients and project management tools like Jira, GitLab, Trello, etc. Here are a few things you should know if you are just starting with ElectronJS:

Tell, Don’t Ask

Tell, Don’t Ask is an object oriented programming principle saying we should just tell objects what to do, without asking them unnecessary questions. Asking is when we’re writing conditionals solely based on one object’s internals. Either we’re checking a property or a method returning a result, if we’re doing it to tell the object to […]

Composer PHP

Composer: everything I should have known

Composer was just something I used to get my project up and running and occasionally install additional libraries. I never put too much thought into it – it just worked. Sometimes I would run into problems, but often they were easily fixed by running composer install or composer dump-autoload. I had no idea what dump-autoload […]