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:

Continue reading

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 do something else, we’re breaking the Tell, Don’t Ask principle.

Continue reading

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 was doing, but it was fixing things.

Continue reading

The little details matter most

Although I’m a big, big fan of YAGNI (You Ain’t Gonna Need It), lately I find myself discovering and appreciating more and more the value little details can bring to the table.

Gainslog has a filterable food list you can use to quickly find and add foods to your day. You just type in the name, click the add button and that’s it. No multi steps, no modals, no nothing.

Continue reading

Gainslog menu and average stats get some space to breathe

The previous cluttered menu items now have a more room to breathe, and if previously one would have to tap the exact teeny tiny piece of text to navigate around, now you can tap anywhere on the menu item.

Gainslog mobile menu

Gainslog mobile menu

Continue reading

Gainslog now makes daily backups to Google Drive

Thanks to this great tutorial on how to extend Laravel’s storage to Google Drive, Gainslog now pushes daily updates to Google Drive.

Following the tutorial, one issue people run into is a File not found error when running the backup command.

You can get around it by setting the backup folder name to an empty string – but that will place all the backup zip files directly into the storage/app folder.

One way to make sure all backups go into a single folder is to setup a new local disk in filesystem.php and update the backup.php config to use that one instead.

'local' => [ 
    'driver' => 'local', 
    'root' => storage_path('app')
], 
'local-backups' => [ 
    'driver' => 'local', 
    'root' => storage_path('app/backups')
]

And then in config/backup.php

'destination' => [

    /*
     * The filename prefix used for the backup zip file.
     */
    'filename_prefix' => 'backup-',

    /*
     * The disk names on which the backups will be stored.
     */
    'disks' => [
        'local-backups',
        'google'
    ],
]

Interfering in the way users are used to doing things is a no-no

Gainslog is a simple calorie tracker I made with only a handful of users.

If you ever tracked your macros before, you know reaching your daily protein intake goal is the most difficult to attain from all three macronutrients (proteins, carbs, and fats). Once you hit your proteins target, the other ones come around easy. Continue reading

Video quality and editing over great content

Great content is usually something entirely new or offers a different perspective on things we already know, but… consider fitness videos.

Exercises don’t change over the years. Yes, the social media fitness industry keeps throwing at us different variations of the same exercise to keep us entertained, but the basics stay the same.

Hands outside shoulder width. Chest up, keep shoulders retracted, make a slight arch with your back, keep your butt on the bench and the legs firmly placed on the ground. Push from your nipples towards your upper chest in a slightly arched path

Continue reading

More than ordinary

It’s immensely pleasing when the barber doesn’t need to ask how you want your hair done, or when the barista hands your favorite drink the second you sit at the bar, or even when things go wrong and apologies are made.

More than ordinary. We love that.

And we give back. It’s no longer just ‘a barber’, it’s ‘my barber‘. Not a random bar, ‘my favorite bar.

We return the favor. Always.

© 2019 cdruc

Theme by Anders NorénUp ↑