Problem I’m implementing a checkers engine for a scientific experiment. I found out through profiling that this is one of […]
Tag: generator
Wrapping my head around generators
Problem I am going on with refactoring my code base while migrating from Python 2 to Python 3. I am […]
Fibonacci sequence methods
Problem Decided to get a little JDK 8 practice in today, so I built two methods to print out the […]
A GapHelper static class to create unique (non-existing) size restricted names
Problem I am working with a 3th party library which has following interface defined for a processing task: public interface […]
Subscriptable/Indexable generator
Problem I’m not a Python developper, but I enjoy programming with it, and for a project I wanted to have […]
Lazy generator of strings in lexicographical order
Problem I needed to write a Python generator that lazily generates, in lexicographical order, strings composed of a certain alphabet […]
Exponential backoff generator
Problem Exponential backoff in the context of various networking protocols looks something like this: When a collision first occurs, send […]
Determining whether a loop iterated at least one element in generator function
Problem I have a case in which I need to determine whether a for loop yielded at least one element: […]
Password Generator “Crapcode”
Problem I made Password Generator on C#. It prompts the user for the length of the password, whether it contains […]
Using generators on Observable class
Problem I’ve decided to implement a simple case of the Observer pattern. I’ve gone about this considering you can only […]