Testing PyMongo As A Black Pipe

This is the second article in my six-part series on “black pipe” testing. PyMongo, the official Python client for MongoDB, is a great example of a connected application that can’t be fully tested as a black box. It has two ends that take inputs and provide outputs: one is its public API, the methods find and insert_one and so on. ...

Read More »

jQuery Fadeout Example

In this example, the aim is to explain and use the .fadeOut() jQuery method. The fadeOut() method gradually changes the opacity, for selected elements, from visible to hidden (fading effect). If you’ve used this method previously, you probably know it is just the opposite of the .fadeIn() method. It hides the matched elements by fading them to transparent. It comes ...

Read More »

jQuery slideToggle / slideUp / slideDown Example

In this example, we’ll be considering three popular jQuery methods .slideUp, .slideDown, .slideToggle. For your basic understanding, know that slideUp hides the matched elements with a sliding motion, slideDown displays the matched elements with a sliding motion, while slideToggle will toggle between the two states, meaning it will display or hide the matched elements with a sliding motion. The methods ...

Read More »

Alternative Service Communication Using Pub/Sub

The HTTP protocol was designed for synchronous communication between two entities — for instance, a browser requesting a stylesheet or a server charging with a payment processor. Those are synchronous operations where nothing can proceed without an immediate response. Often communication can be asynchronous, like when queueing up work to be performed in the background. It is possible to use ...

Read More »

jQuery Find Example

In this example we’re going to talk about the .find() method of jQuery. What this method does is kind of self-explanatory, it gets the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. A descendant is a child, grandchild, great-grandchild, and so on. It has only one argument, which is ...

Read More »

How to Find Ruby Code Smells with Reek

Your Ruby code smells. And it’s okay — mine does, too! Maybe it has some long methods with too many parameters, a few classes that try to do too much, an uncommunicative name here or there. No codebase is perfect, but it’s worthwhile to be aware of its deficiencies and refactorings that could improve the state of things — so ...

Read More »

How to find a path to mastery as a software developer

Planning out a software development career is hard at all stages of the game. There is no well-defined path to mastery for a developer, unlike other fields like medicine or law where you must get a precise degree with clear specialties. It can be terrifying since you’re never sure if you’re going in the right direction. Many people go to ...

Read More »

You’re not learning too slowly

Learning a new framework or language always feels slow and sluggish at first. I’m working on learning Ruby on Rails right know after a year or two of not learning a new framework and I had also forgotten the feeling. At first, I stumbled at every step on the way and nothing was familiar even if I’ve been programming for ...

Read More »

jQuery Siblings Example

The aim of this example is to go through the .siblings() method of jQuery. Basically, the siblings() method returns all sibling elements of the selected element. Just for your understanding, sibling elements are elements that share the same parent. This method traverse forward and backwards along siblings of DOM elements. In a more strict definition, given a jQuery object that ...

Read More »