# Month: June 2019

## Why You Are Stuck in Coding

Today I want to address a very controversial topic. I know why you feel stuck and you don’t improve as a coder anymore. You are stuck in coding because you don’t produce enough — you are consuming way too much. It’s an ugly truth and I’m sorry if you feel offended. But it’s nonetheless the …

## Code From Home! How to Be Happier & Earn More Money

What is the number one reason why you should consider working from home instead of working from where you work? The number one reason, I find, is commute time. It’s very healthy and good for your happiness and life to skip commute time altogether. For a few years, I had a lot of commute time …

## [Python Powerset] How To Get All Subsets of a Set?

This is a simple algorithm to find all the powersets of a given set. If you feel like you need to refresh your Python set skills, have a look at my complete guide to Python sets (with Harry Potter examples). What is the Powerset of Set s? The powerset is the set of all subsets …

## How to Calculate the Edit Distance in Python

Type “Helo World” into your Google search bar. Google will ask you: “Did you mean: hello world” A simple method to detect these typos is the Levensthein distance (also called edit distance). In fact, Google’s algorithm seems to use some variant of it. (source) By studying this article, you’ll learn about the important practical algorithm …

## Iterative vs. Recursive Binary Search Algorithms in Python

In this article, you’ll learn about a basic algorithm, every computer scientist must know: the binary search algorithm. If you just want to try the algorithm in Python, feel free to play with our interactive Python shell: The algorithm has important practical applications in many basic data structures such as sets, trees, dictionaries, bags, bag …

## The Shortest Quicksort Implementation in Python

In this one-liner tutorial, you’ll learn about the popular sorting algorithm Quicksort. Surprisingly, a single line of Python code is all you need to write the Quicksort algorithm! If you just want to get a quick idea of how to do it in more than one line, check out this Instagram post (swipe right): Sieh …

## A Simple Python Factorial Program Using Recursion

This article explains a simple and effective way of computing the factorial in a single line of code. The Basics Consider the following problem: There are 20 football teams in England’s premier league. Each team can possibly reach any of the 20 ranks at the end of the season. How many possible rankings exist in …

## The Sieve of Eratosthenes in One Line of Python

Finding prime numbers is of critical importance for practical applications such as cryptography. Many public-key methods are only safe (from a cryptographic point of view) because it’s generally inefficient and slow to compute the prime factors of large numbers. A Simple Algorithm to Check Whether a Number is Prime A prime number n is an …

## Check Palindromes in One Line Python. No For Loop. No Recursion.

This one-liner introduces another basic computer science term: palindromes. Similarly to anagrams, palindromes are a popular interview question. First things first: What is a palindrome? “A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward, such as madam or racecar or the number 10201.“ [1] Here …

## Anagrams in Python: A Simple One-Liner Solution

A popular question in programming interviews is about anagrams. The interviewer wants to test your knowledge about the basic terminology in computer science, and how good you are at developing your own simple algorithms to solve the problems you are facing. In this article, you’ll learn about a simple algorithm to find anagrams in Python. …

## How to Earn \$4000/M Passive Income as a Coder?

Everybody talks about passive income these days. Is it a scam? Yes and no. Nothing can truly exist passively for an unlimited time. True passive income really means: a more or less slowly dying income stream. But the idea is still powerful and transformative. And there are a lot of income streams that are much …

## Get More Clients as a Freelance Developer with This One Simple Trick

How to make it easier as a freelance programmer to attract clients? You’ve mastered the first level as a freelance programmer and wonder how to make it easier to get clients? Or you’re generally interested in becoming a freelancer but you don’t know how to get clients? Here’s a major building block of your success: …