My findings…

Handling file input

Basically the condition has to evaluate to true or false. This is different from how conditionals work in js. Here’s what i mean:

data.length > 0 && <div />
data.length && <div />

In the first case, if the size of the array is 0, 0 > 0 will evaluate to false so false && [anything really] evaluates to…

My understanding of the module system in Javascript/Node

Reusable React Table

Importing and exporting things in React, and generally in Javascript, can be confusing if one doesn’t really understand how the Node.js module system, and Javascript object referencing work.

Here are some examples that may lead to one wondering what exactly is going on behind the scenes.

import React from 'react';
import * as React from 'react';
import React, { useState } from 'react';
import React, { Component } from 'react';

Photo by Jan Antonin Kolar on Unsplash

The process is pretty much the same as that of a MySQL database, with a few minor changes. For that reason I recommend you read the MySQL guide for explanations, as I will only be providing commands in this guide.

One more thing, I will assume you’re comfortable with postgres and the psql client — of course you are! But just in case you need to brush up on anything here’s a link.


psql -h <Host> -p <Port> -d <Name> -U <User> -W

Name is a placeholder for the database name and User for the database…

You already know how to…

Photo by Henri L. on Unsplash

As I normally start, this is not a primer on laravel. My goal is to walk you through the steps of containerizing a very basic laravel application. As you’ve probably guessed, the steps could vary depending on how you’ve designed your application.

You may want to start here before proceeding. But basically you need an HTTP server at the front of your app, to handle requests. The choice is yours: Apache, Nginx, etc. Technically, you could just run php artisan serve and skip the web server, but it is not recommended to run a dev server in production.

Let me…

A Crane Cloud case study.

Photo by Caspar Camille Rubin on Unsplash

Connecting to a MySQL database is pretty straight forward, provided you have the credentials. When you create a database with Crane Cloud, we return a list of credentials needed to connect with your database from anywhere.

In this quick guide, I’ll be going over a few things you can do with your new remote database.

Dockerfile config for an Apache + PHP + MySQL setup.

Photo by Ben on Unsplash

This piece is about the directives to build a docker image of a PHP application running on an Apache server, and talking to a MySQL database.

Check out this article if you’re looking for a general guide on Dockerizing/Containerizing applications.

We shall be walking through a very basic scenario to try and understand the options needed, especially for database connectivity.

For this application we’re running the database as a separate service using the Crane Cloud platform. Crane Cloud, on top of enabling you to quickly deploy containerized workloads, allows you to create a database of choice with a single click…

…or any app, for that matter — “Node” and “API” are just clickbait.

Photo by Dominik Lückmann on Unsplash

This article is not about designing APIs, nor is it a primer on docker and containers. My assumptions are: you have a node API (or at least know how to build one), convinced that you need docker in your workflow and just want to put it all together — and, quite obviously, you have docker installed and running on your machine.

It took me a while to get my head around some of these patterns, so this simply is my (always improving) understanding of the subject. …

…and what I’ve learned, so far!

Photo by Dmitry Moraine on Unsplash

Like you — and many other people out there, I had always wanted to “invest” in bitcoin but, for some reason, I didn’t. I think I never really had that kind of money to throw around (also known as being broke), didn’t have sufficient knowledge or information, and also because Uganda is a third-world country (more on that in a moment)!

I personally first heard of bitcoin in 2014. That was pretty early — about five years in from the initial release! I think I’d be a millionaire (not in Uganda shillings) by now. No regrets tho. …

Should you?

Photo by Steve Halama on Unsplash

I should warn you tho: you’re taking dating advice from a guy who is single at the time of this writing — keep that at the back of your mind.

Alright! That said…
So, you’re dating a programmer, planning on dating one, or you simply have no idea what I’m talking about? No worries, I got you.

A programmer, in my own words, is a person that knows how to convince a machine to do whatever it is that they want. Programmers are not your IT guy. The folks that fix printers and Internet at your workplace are not programmers…

What browser do I use?

Artwork by yours truly. Icons by Freepik

The other day, a friend asked me a question that seems so simple and easy, “Kawere, what browser do you use?”

In case you don’t know, a browser (or web browser to be more specific) is basically an app installed on your phone or computer that helps you surf the Internet. Notable examples are Google’s Chrome, Mozilla’s Firefox, Microsoft’s Edge, Apple’s Safari, Opera’s Opera, and — for some of you — Microsoft’s Internet Explorer. You really make life so hard, don’t you?

So, what browser do I use? It depends!
I gave my friend a very honest answer, “ It depends…

Kawere Wagaba

Creator. Human. Curious.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store