The benefits of applying test-driven development (TDD) methodologies in our every day are huge:

  • Tested code, great coverage
  • Modular and loosely coupled code
  • Great relation and understanding between customer — PM — developer
  • 40% — 80% fewer bugs in production
  • Can save development time with some experience

TDD stands for Test Driven Development and the process consist on:

  • Write a test and watch it fail
  • Implement minimal expression of code to make it pass
  • Refactor both test and code if needed
TDD is interesting and serious business at the same time — Photo by Masha Raymers

TDD saves everybody in your team a lot of time. Putting in place some continuous integration and deployment (CI/CD)…


By: Serguey Martinez, Staff Engineer, TribalScale

I’ll be explaining what the Ethereum ecosystem offers and why it can be an opportunity for you as a developer.

But first I’ll be critic and talk about the scary stuff.

Original ETH/USDT chart from Binance.com

What you see in the chart is the movement of price in history for Ethereum’s cryptocurrency “ether” (ETH), with high volatility, as any other cryptocurrency and only allowed for those with a brave heart to HODL. Or that’s what the big whales want you to think…


In Part 4 we implemented the necessary code to satisfy the assertions we made in the acceptance criteria which we stipulated with the customer/PO and PM for that specific feature.

If you are lost with code/files, you can always check the repo to see the complete project

In Part 5 you will learn:

  • the importance of decision making in BDD, TDD projects
  • Possible problems and how to approach them
  • How to approach a refactor
  • Execute your integration tests against different environments

There will be obstacles

sometimes it’s not even easy when there are no obstacles — Photo by cottonbro

Another question that the PM can ask you is how granular the features should be. In my opinion…


In Part 3 we got our first feature and implemented its steps in cucumber. We did everything using TDD as part of our BDD process.

In Part four we will try to apply TDD to produce our production code.

If you are lost with code/files, you can always check the repo to see the complete project

What you will learn:

  • Use of cucumber hooks to prepare the environment
  • Spawn processes in Node JS
  • Use of BDD and TDD as a workflow
  • Functional patterns
  • The “wrong first approach”
we both agree that cucumber is great — Photo by cottonbro

Start stubs with cucumber hooks

First, let’s analyze the feature we got.

First let’s create a server…


In part 2 we set our environment. For part 3 let’s talk to our PM and to our customer so we, as a team, can understand what type of features the customer wants to get done. We will use Gherkin as natural language to try and achieve this.

If you are lost with code/files, you can always check the repo to see the complete project

You will learn:

  • Gherkin as a tool to create acceptance criteria
  • Importance of communication between customer and PM
  • Black box testing or to “stop caring about the implementation”
  • Match Gherkin steps with Cucumber JS
  • Use…

In part 1 of this series I wrote about some concerns to keep in mind and decisions we need to make before adding TDD, BDD to our workflow. In part 2 we are going to focus in setting up our environment.

You will learn:

  • basic Cucumber JS setup for a Node project with BDD
  • basic Tape setup to unit test your functions

Set up

You can install cucumber as shown in the picture — Photo by cottonbro

$ npm i -D cucumber cucumber-pretty tape tap-nirvana

After installing dependencies, create this directory structure:

test
├── integration
│ ├── features
│ │ └── sample.feature
│ ├── steps
│ │ └──…

Welcome to this workshop series. It is a series consisting of five parts focusing on the application of BDD and TDD to our every day workflow for an express/NodeJS application.

In Part One we will discuss some mental models and patterns that will help us on our way to build a loosely coupled app.

You will learn:

  • basic knowledge of how BDD and TDD integrates in your workflow
  • some mental models and preparation that need to be done before implementing BDD and TDD.
  • patterns and abstractions that go well with TDD
  • some functional programming concepts

Come along and let’s start…


By: Serguey Martinez, Staff Engineer, TribalScale

At first, I didn’t see my teammates using some functional tools and patterns that swift provides. I didn’t know either that those patterns existed!

Don’t get me wrong, my team mates write quality code…

I saw nice structured code and just the right amount of “if lets”, “guard lets” and “?”

So I thought I should ask some questions to the language and see if I could apply patterns that I’ve used before in my beloved Javascript, or my old buddy Haskell.

Higher order functions

Functions in Swift are special citizens; meaning that you can pass functions…


Let’s say we want to notify our users if they are subscribed to some sort of daily reminder. Here we can use an AWS cron job along with EventBridge to send push notifications with firebase.

Let’s start with a simple diagram to identify the different parts or steps:


Read Part 1: How To Configure AWS Route 53 here.

I’ve been having a problem with microservices in AWS for a while. How do integrate a swagger UI endpoint within the API itself?

Ideally, I’d have this:

api.mydomain.com/docs
api.mydomain.com/path1
api.mydomain.com/path2
...

There is actually a way I came up with to achieve this that doesn’t need CloudFront:

So why without CloudFront? I don’t want to invalidate the CloudFront instances every time I deploy a new version of my spec and wait until the CDN “unregisters” or “un-caches” the previous content. I want it to be instantaneous.

Creating an S3 static website

Remember to give the…

Serguey Arellano Martínez

Javascript developer

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