Mar 20, 2020

Frontend Testing Fundamentals With Cypress

Cypress is a end to end frontend testing tool which simulates user navigation while running in browser. Few weeks ago we discovered the fundamentals of it, how we could install it and how we could create custom commands for it. The trick with testing is to find the right balance between not enough tests and too many tests. Not enough tests would yield less confidence in code changes while too many tests will yield more maintainance hassle. Therefore what we really want is to focus on specific aspects of our application that if properly tested will ensure that the quality remains. Today we will look at three of the main pillars, the routes, the posts and the displays.

JavaScript Cypress

Mar 13, 2020

Recursive Query In Sqlite With Cte

Few months ago we talked about the Basket of Apple problem where we represented a tree of rules to distribute apples in baskets. Trees are quite common in software, a simpler example is the example of managers and employees where employees can be managers and managers themselves can have managers. In today’s post, we will look at how we can represent a tree structure in SQLite and how we can retrieve the nodes of a tree using Common Table Expressions (CTE).

SQLite

Mar 06, 2020

Full Text Search With Sqlite

Full text search allows users to search records in data storage using properties of the objects. For example a full text search on a blog engine could allow a user to search for a post based on the title or content of the post or categories. The text provided could be a word, or a sentence or part of a sentence and the result would be a list of posts ranked by best match. In today’s post we will look at how we can take implement fts using SQLite built in fts5 module.

SQLite

Feb 28, 2020

Python Unit Test

Unit tests ensure that the functionalities of the Software are maintained while developping new features. Every language provides library for writing unit tests, and any decent framework provides facilities to enable easy unit testing. In Python the core comes packed with unittest, a module providing all the necessary functuonalities to unit test our application. In today’s post we will look at how we can setup unittest for our Python application.

Python

Feb 21, 2020

Cypress Commands

Few weeks ago we looked at Cypress, we looked into how we could install it, the different assertion we could use and how we could debug the tests. In today’s post, we will look at how we can create reusable commands to be used across all integration tests.

JavaScript Cypress

Feb 14, 2020

Manage Windows On Macos With Amethyst

When I first moved to MacOS, the first thing I looked for was a window manager. There were few paid options but one of them, Amethyst, striked me as a free open source window manager. In today’s post I’ll share my setup of Amethyst together with the shortcuts I use most in order to manage my windows.

Feb 07, 2020

Improve Your Python Shell With Pythonrc

Few weeks ago we looked at IPython, showcasing how the Python Shell with the additional features of IPython provides an incredible boost in productivity. In today’s post we will see how we can go a step further and provide quick scripting functionalities for testing or scripting.

Python

Jan 31, 2020

Setup Black With Vscode Python

Few weeks ago we looked at Prettier, an opinionated formatter for Javascript and Typescript. Formatter allows us to automate the tasks of making sure that the code written is well aligned, readable, and maintainable. As a side effect, it allows all developers to conform to the same formatting rules since it is automatically enforced. In today’s post, we will look at Black, the Python autoformatter.

Python

Jan 24, 2020

Alembic Operations

A few weeks ago we looked into Alembic to perform database migrations. We looked into how to install it and the commands it provides to manage databases. In today’s post we will look at the main DDL operations we would use to manage databases.

SQLAlchemy

Jan 17, 2020

Debug Python With Pudb

Python comes with a debugger pdb which allows us to debug code right from the terminal. PUDB enhances the debugger by providing a nice GUI directly inside the terminal. In this post we will look into how we can install PUDB and how we can install PUDB and the commands it offers.

Python

Jan 10, 2020

Coding Challenge Array Exercises

Coding exercises are hard, no matter what level of experience you have and which point of your career you are at, it is a very different skills to succeed coding exercises versus building real life application. Nonetheless some of them are quite interesting and highlight techniques that can vastly change the performance of a program. In today’s post we look at optimization techniques used in arrays on common problems.

Python

Jan 03, 2020

How To Change Wsl User Password

During the installation of WSL, we are asked to create a user and a password for that user. Each sudo commands will require the password input. In this post we will see how we can reset that password.

Ubuntu

Dec 27, 2019

Jenkins Shared Libraries

When we have multiple pipelines in Jenkins, it becomes necessary to share code between them. For example, we might want to have a stage that we want to setup for a different environment therefore the only change needed would be its parameters. Today we will see how we can provide reusable functionalities in Jenkins pipeline across a single or multiple pipelines.

Jenkins

Dec 20, 2019

Embedded Static Pages Library

In today post we will explore one of the technique used in ASP NET Core libraries to share static content (like html pages) in the form of a library.

DotNetCore CSharp

Dec 13, 2019

Covariance And Contravariance

In programming languages supporting generic types, we sometimes come accross the terms Covariance and Contravariance. Those two terms describe how generic type paramters act and how they can be assigned. In today’s post, we will look at their definition together with examples.

DotNetCore CSharp