teleren/devto huggingface dataset:
Behavior-Driven Development (BDD) Crash Course
Tags: bdd, skiplist
Published: 2018-03-27 17:50:37

---
title: Behavior-Driven Development (BDD) Crash Course
published: true
description: A composition of resource to aid in the understanding of what Behavior Driven Development is.
tags: bdd, skiplist
---

> "Behavior-driven development combines the general techniques and principles of TDD with ideas from domain-driven design and object-oriented analysis and design to provide software development and management teams with shared tools and a shared process to collaborate on software development." - [Behavior-driven development](https://en.wikipedia.org/wiki/Behavior-driven_development)

---

**Behavior Driven Development (BDD)**, also referred to as **Acceptance Test Driven Development (ATDD)**, is a collaboration process meant to create a shared understanding among team members around a unit of work. A covenant is created between the business and engineering using a common interface, gherkin. The intention is to deliver high-quality software that meets desired business outcomes the first time.

Once the covenant is ratified, the engineer begins work to meet the specification. The system behavior is solidified by codifying the scenarios through automation.

The ten minutes of video below further elaborate the benefits, process, and specifics of gherkin.

---

{% youtube SLu9mm02lxM %}
*Testimonial about the benefits of BDD.*

---

{% youtube Eq70Exm5sT4 %}
*Overview of BDD process.*

---

{% youtube VS6EEUVZGLE %}
*Overview of Gherkin*

---

# Gherkin Syntax Reference:
```
Given <context>
When  <event>
Then  <outcome>
```
Getting all 404s with your firebase functions?
Tags: firebase, firebasefunctions, debugging, reason
Published: 2018-03-27 17:19:35

---
title: Getting all 404s with your firebase functions?
published: true
description: If you're using an Express App as your handler for your firebase function, and your getting all 404s, maybe this will help you out!
tags: firebase, firebase functions, debugging, reason
---

If you're using Firebase Cloud Functions and you get an error like this:

`cannot GET null` after trying to access your function in production, it’s probably because you’re using an Express app a the request handler, and the request object that firebase passes in has an empty string instead of a “/“ as the URL (when accessing the function name directly with no trailing slash).

The trick is to intercept the request and insert that “/“ *before* it gets handed to the Express app. I tried it as middleware for the app and it didn’t work.

Here’s the patch I have:

```
let firebasePathPatch: 'a => Express.App.t = [%bs.raw {|
  app => (req, res) => {
    // patch from https://github.com/firebase/firebase-functions/issues/27#issuecomment-292768599
    // https://some-firebase-app-id.cloudfunctions.net/route
    // without trailing "/" will have req.path = null, req.url = null
    // which won't match to your app.get('/', ...) route 
    if (!req.path) {
      // prepending "/" keeps query params, path params intact
      req.url = `/${req.url}`
    }
    return app(req, res);
  }
|}];
```

And that’s used like this:
`Firebase.CloudFunctions.functions##https##onRequest(app |> firebasePathPatch);`

The snippet above is in Reason, here's a version in JS:

```
let firebasePathPatch = app => (req, res) => {
    // patch from https://github.com/firebase/firebase-functions/issues/27#issuecomment-292768599
    // https://some-firebase-app-id.cloudfunctions.net/route
    // without trailing "/" will have req.path = null, req.url = null
    // which won't match to your app.get('/', ...) route 
    if (!req.path) {
      // prepending "/" keeps query params, path params intact
      req.url = `/${req.url}`
    }
    return app(req, res);
  }

// Used like this:
module.exports.foo = functions.https.onRequest(firebasePathPatch(app));
```

See more here: https://github.com/firebase/firebase-functions/issues/27
Changelog: Suggested follows on onboarding!
Tags: changelog, meta
Published: 2018-03-27 16:51:38

---
title: Changelog: Suggested follows on onboarding!
published: true
description: 
tags: changelog, meta
---

Last week we rolled out an onboarding feature for new users where [dev.to](/) suggests folks they may want to follow based on the tags they have selected. We have since been contacted over confusion of people suddenly being followed by "a bunch of brand new accounts".

I can assure you that **this is a feature and not a bug**. Those new accounts are genuinely new signups. Many have not yet filled out their profiles so it's hard to discern their human qualities. And there are some occasional spam accounts mixed in, but that is happening at a verifiably low rate. All in all this feature means more users following more established contributors. Great for everyone!

Top contributors in popular tags will now get a more consistent flow of new followers if they keep up the great articles. This should help people follow along with the evolving thoughts people are sharing on the subjects they care about. The algorithm favors recentness, so don't feel like you've missed the boat if you haven't written much yet.

We have tried to spread the love so it's not _totally_ top-heavy, so you may get some new followers even if you are not a _top contributor_.

This feature was built by myself and [Andy](/andy). He did a wonderful job of making it all come together. Andy is a critical part of all of our success and he killed it on this feature. The confusing roll out here was my fault in the process.

I hope this clarifies things. **Feature, not bug!** **Feature, not bug!** **Feature, not bug!** Since the launching this feature we have had to make some tweaks to the emails we send to make sure folks aren't hammered with emails. So any initial overflow of emails was sort of a bug. But you're welcome to configure your [email settings here](https://dev.to/settings/notifications). So any initial overflow of emails was sort of a bug. I have personally turned off new follower emails. You may want to do the same.

**Edit:** Speaking of emails, this feature is somewhat related to this feature we also pushed this week after this post. 

{% link https://dev.to/ben/changelog-customized-emails-to-catch-folks-up-on-posts-they-might-not-want-to-miss-4ec %}

I think these features are both pretty great for readers and also help the reach of publishers. Keep up the great work community!

Happy coding ❤️
A .Net man in Linux world.
Tags: beginners, coding, dotnet, linux
Published: 2018-03-27 15:35:32

---
title: A .Net man in Linux world.
published: true
description: My journey to the Linux world.
tags: #beginners #coding #dotnet #linux
cover_image: https://raw.githubusercontent.com/rafalpienkowski/resources/master/dotnet-man-in-linux-world/background6.png
---

After I've read a couple of posts (for example [.NET Core 2.1 highlights: standing on the shoulders of giants](https://dev.to/samueleresca/net-core-21-highlights-standing-on-the-shoulders-of-giants-278m) and [My Linux Development Environment of 2018](https://dev.to/brpaz/my-linux-development-environment-of-2018-ch7) I've started to think about a little experiment. 

What If I, as a .Net developer, which natural environment is a Windows machine, start to work on a Linux machine?

- .Net Core is the cors-platform solution and is fully supported by Linux.
- I'm not a desktop/mobile solution developer (no WinForms, WPF, Xamarin).
- I like to use Docker in my solutions, and Linux OS is more natural for Docker than Windows.
- I can use Visual Studio Core on Linux OS.

Why not give a try at least for mine side projects which I take care after work? 

I'm not an advanced user of Linux. I have got a little experience which I gained during my studies. I've arbitrary chosen Ubuntu 17.10 as my Linux machine. I've already installed [VS Code](https://code.visualstudio.com/docs/setup/linux), [.Net Core](https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x), [Git client](https://git-scm.com/download/linux) and [Docker](https://docs.docker.com/install/linux/docker-ee/ubuntu/) based on tutorials from the Internet. Right now I was surprisingly easy. The plan for next few weeks is to port all my side project to Linux and work on Linux as my main "development" environment.

I'm going to share my feelings about the change of the OS. Feel free to add your suggestions and questions. 

So like Sting's [Englishman in New York](https://youtu.be/d27gTrPPAyk), I'll be a .Net man in Linux world.
React Router 4: A Practical Introduction
Tags: react, javascript, reactrouter, webdev
Published: 2018-03-27 15:21:31

---
title: React Router 4: A Practical Introduction
published: true
description: A gentle introduction to React Router 4 through practical examples.
tags: #reactjs #javascript #reactrouter #webdev
canonical_url: https://auth0.com/blog/react-router-4-practical-tutorial/
---

React Router 4 is a body of navigational components that offers declarative routing in your React apps. In this tutorial, you are going to learn how to use React Router 4 through practical examples.

[Read on ⚛️](https://auth0.com/blog/react-router-4-practical-tutorial/?utm_source=dev&utm_medium=sc&utm_campaign=react_router4)


![React Router 4: A Practical Introduction](https://thepracticaldev.s3.amazonaws.com/i/sqdunhby5jxsrvx3a29n.png)
LHS & RHS Look Ups
Published: 2020-01-27 17:55:34

---
title: LHS & RHS Look Ups
published: true
date: 2018-03-27 15:15:45 UTC
tags: 
canonical_url: https://maeganwilson.micro.blog/lhs-rhs-look/
---

LHS and RHS stand for Left Hand Side and Right Hand Side of an assignment operation. This allows for us to break down the code and analyze exactly what is happening.

For the first part post, we are going to be analyzing the following program

{% gist https://gist.github.com/maeganjwilson/6169f4bc177e70d3d9e1ea0b7fe9f206.js %}

This program actually breaks the LHS and RHS look ups into two different statements.

The LHS of the assignment operation will look up the variable container and assigns a value to that container. In the program, `var a = 2;` looks for the variable a and assigns it the value of 2, so that categorizes the statement as a LHS look up.

The RHS of the assignment operation will look up a value of a variable. In the program, `console.log(a);` looks for the value of `a` and outputs that value, which in this case is `2`.

Now, let’s look at a program that has both a LHS and a RHS look up.

{% gist https://gist.github.com/maeganjwilson/d41c9de95c35679eac3c47f3dbd930d0.js %}

The LHS look up of this program is `foo(2);`. That is because when `foo` is called, `a` is assigned the value 2. The RHS look up in this program is `console.log(a);` since the program has to look up the value of `a` to perform the `console.log`.

---

If you enjoy my posts, please consider sharing it or Buying me a Coffee!

<a href="https://www.buymeacoffee.com/appsbymw" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/arial-blue.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a>
Display flags in the language switcher - Prestashop 1.6, 1.7
Tags: blog, prestashop, tutorials
Published: 2018-04-12 08:14:57

---
title: Display flags in the language switcher - Prestashop 1.6, 1.7
published: true
tags: blog, prestashop, tutorials
canonical_url: https://www.prestasoo.com/blog/display-flags-in-the-language-switcher-prestashop-1-6-1-7.html
---

![](https://www.prestasoo.com/images/stories/prestashop-language-selector-with-flags.jpg)

Sometime you want to display flags in the language switcher in your Prestashop theme. Our clients also asked me how to show the flags and sometime wanna display the flags from dropdown to inline.

All you need is open this file : /your-website/themes/classic/modules/ps\_languageselector/ps\_languageselector.tpl using your favorite code editor ( my tool: text editor :D ) and change it as you wish.

Then follow my [tutorial](https://www.prestasoo.com/blog/display-flags-in-the-language-switcher-prestashop-1-6-1-7.html)
How would you define "decentralized"?
Tags: discuss
Published: 2018-03-27 15:01:52

---
title: How would you define "decentralized"?
published: true
description: 
tags: discuss
---

The word "decentralized" gets used a lot in our circles but I'm not convinced we are always on the same page. I'd love some input on how people use that word and what you think they mean by it.
Compilers 108 – Code Generation
Tags: llvm, compilers, assembly
Published: 2018-03-27 14:47:43

---
title: Compilers 108 – Code Generation
series: Compilers
published: true
description: Learn a bit about how compilers work.
tags: LLVM, compilers, assembly
---

Code generation is one of the last steps of the compiler. This is where the compiler emits actual machine code for the IR that was previously created.

The Compiler series:

* [Compilers 101 – Overview and Lexer](https://dev.to/lefebvre/compilers-101---overview-and-lexer-3i0m)
* [Compilers 102 – Parser](https://dev.to/lefebvre/compilers-102---parser-2gni)
* [Compilers 103 – Semantic Analyzer](https://dev.to/lefebvre/compilers-103--semantic-analyzer-540k)
* [Compilers 104 – IR Generation](https://dev.to/lefebvre/compilers-104---ir-generation-39e8)
* [Compilers 105 – Back End Overview](https://dev.to/lefebvre/compilers-105---back-end-overview-15nj)
* [Compilers 106 - Optimizer](https://dev.to/lefebvre/compilers-106---optimizer--ig8)
* [Compilers 107 - Optimizer Loop Unrolling](https://dev.to/lefebvre/compilers-107---optimizer-loop-unrolling-2n3g)



This is the simple code we started with in the [Compilers 101 blog post](https://dev.to/lefebvre/compilers-101---overview-and-lexer-3i0m):

    sum = 3.14 + 2 * 4 // calculation

It results in a constant value of 11. After the IR is generated and optimized, it can boil down to just a single line of machine code, which will vary by processor and architecture. Machine code is just binary and not readable, so below is what the Assembly code might look like.

This is the Assembly code for 32-bit ARM:

    movs r0, #11

This is the Assembly code for ARM64:

    movz w0, #11

x86 and x86-64 use this Assembly code:

    movl $11, %eax

Obviously this is the tricky part of making a multi-platform compiler since Assembly code is different between processors and architectures.

Once you have machine code that the computer can run, the last step is to link all the pieces together so that you have an app that the OS can run.
Android Development Options
Tags: softwaredevelopment, android, cordova, crossplatform
Published: 2019-11-14 11:20:01

---
title: Android Development Options
published: true
date: 2018-03-26 07:00:19 UTC
tags: Software Development,android,cordova,cross platform
canonical_url: https://www.funkysi1701.com/2018/03/26/android-development-options/
---

A friend asked me how to get started in Android Development and I thought I might have a go at answering that question here.

I am by no means an expert in Android development, I do have an app in the play store so I know something.

#### Manifest File

This is probably the easiest option and also doesn’t actually create an android app so I am not sure if it should be included in this list of not.

If you have a website and you want to create an app for that you could just create a manifest file and add this to your website.

Once your website has a manifest file, if you visit your website using a mobile phone or tablet you will get the option to add a shortcut to the home screen. You then have an app like experience in that you can click an icon to launch your website.

A manifest file is a simple text file which specifies a few settings like the icon size, filename, what page loads when clicked and name of your “app”

[More information](https://developers.google.com/web/fundamentals/web-app-manifest/)

#### Visual Studio

This is the option I know most about as is what I have used.

If you are familiar with Visual Studio you can use the Xamarin Forms software to create your app in C#. Xamarin Forms allows you to easily create cross platform apps that run on Android, IOS and windows phone. So far I have only experimented with Android but it should be relatively easy to extend my code to run on other platforms.

Xamarin Forms allows you to write one a single codebase that can be compiled to run on the different platforms. Xamarin requires the use of XAML a XML like markup language for designing UI elements.

More Information on [Visual Studio](https://www.visualstudio.com/), [Xamarin Forms](https://www.xamarin.com/forms)

#### Android Studio

I don’t know much about this option so do correct me if I don’t get the details correct.

Android Studio can be downloaded from Google this allows you to create java code to run directly on an android device. From what I know this is fairly similar experience to Visual Studio but instead of writing your code in C# you use Android Studio and write it directly in java.

[More information](https://developer.android.com/studio/index.html)

#### Cordova

Cordova allows you to use HTML, CSS and javascript to create cross platform apps. I have no idea why I haven’t heard of this technology until today as it sounds very flexible especially if you know a little bit of javascript.

[More information](https://cordova.apache.org/docs/en/latest/guide/overview/)

To summarize there  are lots of different options available to create an android app. What you choose depends on what you want to build, what language and experience you have and if your app needs to be cross platform.
What will happen to React and React Native #deleteFacebook?
Tags: reactnative, facebook, discuss
Published: 2018-03-27 13:46:07

---
title: What will happen to React and React Native #deleteFacebook?
published: true
description: What will happen to React and React Native if Facebook goes down. My two cents!
tags: react native, Facebook, discuss
---

As <a href="https://www.vox.com/policy-and-politics/2018/3/23/17151916/facebook-cambridge-analytica-trump-diagram" target="_blank">Cambridge Analytica news broke through</a>, outraging millions of people and churning #deleteFacebook campaign. Personally, there’s a lot to dislike about what happened there. But, I am not here to talk about that. 

I don’t know why in our dev community people are talking about the doom of React and React Native if Facebook dies. Some are even leveraging this opportunity to say “Hey! Don’t use React native. It will die now with Facebook”. 

Let’s consider that even if 1% of people even deleted their Facebook accounts, #deleteFacebook would be a huge campaign. Set that aside, check out this <a href ="https://vimeo.com/260417482">talk from Orta</a>. Orta says that they will continue to support React native even if Facebook drops it. Given everything, it is highly unlikely that Facebook would go down, and behemoths of Silicon Valley like Airbnb and Dropbox would still fund/contribute towards evolution and development of React native in one way or another. 

Just some thoughts on the status quo and the BS that spreads around :)
Writing Serial Process with Active Job
Tags: rails
Published: 2018-03-27 06:51:38

---
title: Writing Serial Process with Active Job
published: true
description: Active Job (about perform_now)
tags: rails
---

I am using Active Job in Rails for writing Job Queue, I wrote some jobs that issues SQLs and writing data in temporary table, then I'd like to write a whole processor job that serially executes job1, job2, job3...., and jobN and completed a calculation task. 

then, in ActiveJob, we have two methods:

```
job.perform_later() # asynchronous
job.perform_now() # wait for finishing.
```

so, in my case `perform_now` is a solution.

# Serializaed process with ActiveJob
```job1_job.rb
# this Job is sleeper
class Job1Job < ApplicationJob
  queue_as :default

  def perform()
    puts "hello1"
    sleep(5)
    puts "after sleep"
  end
end
```

```job2_job.rb
# this Job won't sleep
class Job2Job < ApplicationJob
  queue_as :default

  def perform()
    puts "hello2"
  end
end
```

```
# this job is a manager
class Job3Job < ApplicationJob
  queue_as :default

  def perform()
    Job1Job.perform_now()
    Job2Job.perform_now()
    puts "hoge"
  end
end
```

the result of execution in rails console.

```
> Job3Job.perform_later()
```

then we obtain

```
# bundle exec rake jobs:work
hello1
after sleep
hello2
hoge
```

:)
First Day at Skiplist
Tags: entrepreneurship, skiplist
Published: 2018-03-27 04:23:59

---
title: First Day at Skiplist
published: true
description: Quick summary of my first day as VP of Engineering at Skiplist
cover_image: https://thepracticaldev.s3.amazonaws.com/i/53r2rfkxc59bmpq9t2bu.gif
tags: entrepreneurship, skiplist
---


Have you ever thought about doing your own thing? An unspoken calling deep inside of you, yet a dark matter force holds you back? It's terrifying to follow, yet painful to ignore.

Two weeks ago, I ate the red pill.
[Skiplist](https://www.skiplist.com/) is my new reality.

---

Today was the first *official* day of my entrepreneurial journey. We discussed current books of business, expectations, and product ideas. Made some customer commitments. I met a new team of wonderful people. I need baseball cards.

---

We live in a day from which we stand on the shoulders of giants. The ability to craft thoughtful software is easier than any age before us. Managed services are stitched in such a way that the total cost of ownership for a modern product is geometrically cheaper than traditionally staffed operations.

Automation removes cost. We deliver *EVERY* measured commit to production, with extreme confidence, into zero downtime, dynamically scaling, ecosystems. It is our pet black swan. I wish you could see it!

We will not become brute force mercenaries, instead Skiplist positions itself to breed the next generation of coding ninjas. I have big ideas. I feel crazy. I think that is good. I nearly had a panic attack going to sleep a few nights ago.

# Partners 

Andrew Wolfe, the first of his kind, has been barreling through the darkness, on his own, for over a year now. He is a ruthless pure bred stallion. The only person I know who consumes knowledge at (or even above) my volume. He is part machine. Our very own, Kylo Ren. He is one with the source, the source is with him.

Approaching from an entirely different angle, our equal partner JT Tan, comes with a much deserved reputation as a product master. The man sees things differently, a deep-sea explorer that grafts features directly into a user's sense of existence. He is the missing link. He is the customer's voodoo compass. Our sniper rifle.

Finally, there is myself. I humbly walk this journey alongside legends. I aspire to become a thought leader in the agile communities. I walk the path of the technical craftsman. I want to build products that rival soul bearing katanas wielded by the ancient samurai of lore. I aspire to make people awesome. I want to share the secrets to software engineering.

> We are uncovering better ways of developing software by doing it and helping others do it... #Skiplist
> - [Manifesto for Agile Software Development](http://agilemanifesto.org/) -