teleren/devto huggingface dataset:
Cross-browser integration testing: best scalable solutions?
Tags: discuss, testing, devops, ui
Published: 2018-02-12 19:43:05

---
title: "Cross-browser integration testing: best scalable solutions?"
published: true
tags: discuss, testing, devops, ui
---

I'm curious what everyone's using, trying to find IE/Chrome/Safari friendly integration/regression testing solutions.

I'm interested in functional as opposed to visual testing, but that's welcome as well!
How does your language handle memory?
Tags: discuss
Published: 2018-02-12 19:26:11

---
title: How does your language handle memory?
published: true
description: 
tags: discuss
---

It occurred to me that memory management is an area where I have only a vague understanding of the differences across languages. I really only understand the nuts and bolts of the environments I've been involved with. And since I mostly work with higher level languages, it's certainly not an area I'm strong in.

I'd love to hear the finer points about how different languages deal with memory, and perhaps why it is done this way.
Write a program or script to find Lucky Numbers
Tags: challenge
Published: 2018-02-12 18:01:43

---
title: Write a program or script to find Lucky Numbers
published: true
description: 
tags: challenge
---

# Lucky numbers

After the ["Happy Numbers" challenge](https://dev.to/peter/write-a-script-to-find-happy-numbers-133b), here are "Lucky Numbers": Some positive integer numbers are lucky, because they pass the sieve of Josephus.

The 1 is lucky by definition. 

The successor of 1 is 2. So, every second number gets eliminated:
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, ...

The next number is 3. Now, every third number gets eliminated:
1, 3, 7, 9, 13, 15, 19, 21, ...

Number 3 is lucky! It's successor is 7. Now, every seventh number gets eliminated. And so on.

Read more about it in [this Wikipedia article](https://en.wikipedia.org/wiki/Lucky_number).

# Challenge
1) Write a program or script in your language of choice, that prints the lucky numbers between 1 and n.
2) Try to make it as fast as possible for sieving lucky numbers between 1 and a million. (Perhaps it is sensible to measure the time without printing the results.)

Edit: Consider to start with odd numbers.

I found it especially interesting to make it fast. That seems to primarily depend on the used data structure. It has to meet different requirements that sometimes seemed contradictive. I am really curious, what data structures you use in your implementation.

# Verification
There are 
- 23 lucky numbers below 100, 
- 153 are below 1000, 
- 1118 are below 10000,
- 8772 are below 100000,
- and among the first million positive integers 71918 are lucky.

The lucky numbers between 1 and 300:
```
[1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 49, 51, 63, 67, 69, 73, 75, 79, 87, 93, 99, 105, 111, 115, 127, 129, 133, 135, 141, 151, 159, 163, 169, 171, 189, 193, 195, 201, 205, 211, 219, 223, 231, 235, 237, 241, 259, 261, 267, 273, 283, 285, 289, 297]
```
Do you have a record of what the right configuration is?
Tags: devops
Published: 2019-02-12 23:27:11

---
title: Do you have a record of what the right configuration is?
published: true
tags: devops
canonical_url: 
---

Unless you’re just starting out, you already have servers doing what they need to be doing. They got configured and built in a datacenter or launched in a cloud. Either way, there was some amount of configuration that helped shape how it does its work. Just because you or your team configured it once, doesn’t mean that it’s recorded at all or even correctly. The core question to ask of yourself and your team is: “Do you have all the information you need to create an identical version of that server in a minimal amount of time if needed?” This could be part of disaster recovery. Something catastrophic happens and you need to make a new server. Do you know what that would entail? Or it could be part of something good, maybe you’re growing and want a new app server, or something more powerful. How do you make sure that the new server has all the features, configurations, and functionality the old one did?

If you don’t have the answers to these questions, don’t worry, it’s not too late to gather them.

Some questions to ask as you go through recovering or recreating this information: What software must be running on the machine for it to do its job? What configuration needs to be present for that software to work the way you need it to? Are there special users that need to be created on the machine? For example, for automation or support Are there limits or quotas on a the machine that need to be put in place or removed? What operating system does it need? Is there a specific version or patch level? What sort of network connectivity and firewall rules does the application need to be present or absent?

Once you have this information in hand, not only are you on your way to having a more robust disaster recovery process, you’ll also have begun to pave your way to have [infrastructure as code](https://dev.to/thaiwoodhere/what-is-infrastructure-as-code-and-why-should-you-use-it-51k7-temp-slug-8181978) and the automation that allows.

With this information at the ready you’ll be able to respond more quickly to disasters, limiting your downtime and the time that recovery takes. You’ll have opened the doors to automating your infrastructure itself.

Further, you’ll be able to use this information to answer questions and solve problems. Perhaps you’re subject to an auditing standard. With all your configuration on record and accessible, you can begin to answer questions like “Are we using a secure version of our operating system?”, “Are our firewall rules too permissive or strict?”

Already did this? Great! The next step is to automate this configuration and provisioning, using [infrastructure as code](https://dev.to/thaiwoodhere/what-is-infrastructure-as-code-and-why-should-you-use-it-51k7-temp-slug-8181978).

What do you think? Leave a comment. To see more like this click here: https://thaiwood.io/DevTo
New Ebiten package inpututil
Tags: go, ebiten
Published: 2018-02-12 15:14:53

---
title: New Ebiten package inpututil
published: true
description: New Ebiten package `inpututil`
tags: go, ebiten
---

Hi all,

This is the very first post for [Ebiten](https://hajimehoshi.github.io/ebiten/), my own game library in Go. I didn't have any places to announce the recent updates of Ebiten until now, and I started that here now!

I'd like to announce that I have introduced a new package, [`inpututil`](https://godoc.org/github.com/hajimehoshi/ebiten/inpututil)! With this package, for example, you can detect the key is pressed just in the current frame (`IsKeyJustPressed`). This is a very common idiom, and the package would help you do such things.

Enjoy!
How to set up Atom for Jekyll blogging
Tags: markdown, atom, setup, jekyll
Published: 2018-02-11 22:32:06

---
title: How to set up Atom for Jekyll blogging
published: true
description: Quick guide to setting up the Atom editor for editing and previewing Markdown with YAML front matter
tags: markdown, atom, setup, jekyll
---

I like to use [Atom](https://atom.io/) as a relatively lightweight code editor. I also really like using static website generators like Jekyll, and writing in Markdown comes naturally to me. If you write a post on [dev.to](https://dev.to), you'll also see the same Markdown with YAML front matter. This short post should help you set up Atom for Markdown editing and previewing with support for the YAML front matter. 

## Prerequisites 
Obviously you'll need [Atom](https://atom.io/) installed, but you also need to install [pandoc](https://pandoc.org/).

## Atom Packages
I tried a few different combinations of packages before finally getting the right ones. I believe the following is all you need to set up Atom for Markdown support:
* [language-markdown](https://atom.io/packages/language-markdown) - Markdown syntax support
* [markdown-preview-plus](https://atom.io/packages/markdown-preview-plus) - Preview Markdown with live updates

## Configuration
There's not too much configuration needed, but the Jekyll front matter by default will not parse well with the default settings. In the setting for Markdown Preview Plus, do the following:
1. Enable Pandoc parser
2. Set Markdown flavor: 
```
markdown-raw_tex+tex_math_single_backslash+yaml_metadata_block
```

The Markdown Preview Plus settings should then look something like this:
![Settings screenshot](https://thepracticaldev.s3.amazonaws.com/i/tm8hih3cpehgnk7tzlow.png)

Let me know if I missed anything or if you have a better setup you'd like to share 😉
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2018-02-12 12:46:31

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/xsr1z6iqv0pd7p3s6ns3.png
---

#1. Make It Personal

Amanada walks us through different types of personal websites and points out which elements make them unique and memorable. This is valuable information, especially for devs looking for new opportunities. 

{% link https://dev.to/asopki/fantastic-personal-websites-and-how-to-make-them--22om %}

#2. Better Context

Kent explains why he's stoked for React's new, much more intuitive, Context API. We learn about `React.createContext`, `Provider`, and `Consumer`.

{% link https://dev.to/kentcdodds/reacts--new-context-api-dpi %}

#3. "Do you have any questions for us?"

Kim share basic questions you should ask your interviewer and why you should ask them. 

{% link https://dev.to/kimberlypilbeam/interview-questions-you-should-ask--3dkc %}

#4. _PHP IS NOT DEAD_

Based on usage stats compared to other languages, Mike explains that PHP is still well and alive. He also gives us reasons why so many people claim php is irrelevant, even though it isn't. 

{% link https://dev.to/mporam/is-php-relevant--1np %}

#5. Soften Up to Level Up 

There's a lot more to being a good programmer than just writing code. Aman shares some important practices with us.

{% link https://dev.to/amangautam/softer-skills-that-make-you-a-better-programmer--2g3e %}

#6. _Cannot read property 'foo' of undefined_

How to safely access nested object in JavaScript in a super cool way so you never get that error again.

{% link https://dev.to/flexdinesh/accessing-nested-objects-in-javascript--9m4 %}

#7. We've all been there.

How do we even determine if we are burnt out or just tired? Lewis provides some tips on how to identify burnout, as well as ideas on how to recover. 

{% link https://dev.to/lewismenelaws/how-to-fix-burnout-as-a-developer--4opl %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Monday!_
Why I chose the Firebase ecosystem
Tags: firebase, startup, entrepreneur, discuss
Published: 2018-02-12 02:07:50

---
title: Why I chose the Firebase ecosystem
published: true
description: Why I chose the Firebase ecosystem?
tags: firebase,startup,entrepreneur,discuss
---
![Firebase Logo](https://thepracticaldev.s3.amazonaws.com/i/1cpozv1jc7lgue4iqgi9.png)

I've been using Firebase for a few months now, and the experience I've had with this has been amazing.

Quick definition:

_"Firebase is a mobile and web application development platform."_

Firebase provide us [a lot of functionalitys](https://firebase.google.com/products/), in order to reduce the development time and to make web/movile apps more maintainable. Must of the time Firebase works like a [SaaS](https://en.wikipedia.org/wiki/Software_as_a_service) making easy and fast for us, things like handling authentication.


Want to see it?
*Social Authentication cannot be easier than this...*

![Handling login](https://thepracticaldev.s3.amazonaws.com/i/gxzc5zbuxzvrs1jh8u35.PNG)
***



##To whom I recommend Firebase?

I recommend Firebase the most to entrepreneurs, startups and people on [hackathons](https://en.wikipedia.org/wiki/Hackathon) I say so because those particular markets, has requirement that constantly change during development phase.

Building a MVP with Firebase gives a greate adavantage agains others that are using other tools that takes to much time for example the analisys of a big database structure. If you have been in a Hackathon before, you already know that time is crucial; you have to spend time thinking on a good business idea, and then when you have something concrete in your mind, you have to document it and then the development time gets reduce to around 40% or less to create a functional MVP... If this is the case Firebase will be your hero.

If you want to learn more about Firebase, feel free to visit the official guide: https://firebase.google.com/docs/guides/ 

***

####*Have you used Firebase or plan to use it? Let me know in the comments.*
Explain Service Mesh like I'm five
Tags: explainlikeimfive, devops
Published: 2018-02-12 08:52:06

---
title: Explain Service Mesh like I'm five
published: true
description: What is a Service Mesh?
tags: explainlikeimfive, devops
---

Hey, the five year old wants to know what a Service Mesh is and if there are cookies involved!
★ A package to assign statuses to Eloquent models
Tags: laravel, php
Published: 2020-01-02 22:58:55

---
title: ★ A package to assign statuses to Eloquent models
published: true
date: 2018-02-12 06:33:18 UTC
tags: laravel, php
canonical_url: https://freek.dev/973-a-package-to-assign-statuses-to-eloquent-models
---

Imagine you want to have an Eloquent model hold a status. It's easily solved by just adding a `status` field to that model and be done with it. But in case you need a history of status changes or need to store some extra info on why a status changed, only adding a single field won't cut it. To handle these cases, our team has created a package called [laravel-model-status](https://github.com/spatie/laravel-model-status).

After [installing the package](https://github.com/spatie/laravel-model-status/blob/master/README.md#installation) you must add the `HasStatuses` trait to all models that need to have statuses.

You can set a new status like this:

```
$model->setStatus('my first status');
```

A reason for the status change can be passed as a second argument.

```
$model->setStatus('my second status', 'I found a reason');
```

There are a few options to retrieve the latest status:

```
$model->status; // returns 'my second status'
$model->status(); // returns the latest instance of `Spatie\ModelStatus\Status`
$model->status()->reason; // returns 'I found a reason'
```

Of course you can also retrieve the whole status history of a model.

```
$model->statuses; // returns a collection of all statuses
```

The package provides a scope to retrieve all models that have a given status.

```
$allPendingModels = Model::currentStatus('pending');
```

To know more about the package, head over the [the readme on GitHub](https://github.com/spatie/laravel-model-status). The principle author of package is our intern [Thomas Verhelst](https://twitter.com/TVke91). Be sure to also check out [the other Laravel packages](https://spatie.be/en/opensource/laravel) our team has previously made.
I just got a Raspberry Pi 3. What can I do with it?
Tags: discuss, raspberrypi
Published: 2018-02-12 02:09:56

---
title: I just got a Raspberry Pi 3. What can I do with it?
published: true
tags: discuss, raspberrypi
---

Just got a Raspberry Pi 3 setup and it's my first one. If you own a Raspberry Pi, what do you use it for? Don't think I'll dive into hardware stuff right now but definitely software related things.
What was your worst experience as QA? 
Tags: qa, testing, discuss
Published: 2018-02-11 23:53:25

---
title: What was your worst experience as QA? 
published: true
description: What was your worst experience as QA?
tags: qa,testing,discuss
---
![PC on fire](https://thepracticaldev.s3.amazonaws.com/i/wko5eod2l32et07jyuom.jpg)

I've been working as a QA Analyst for more than a year but have used QA techniques for more than 3 years in personal projects. Quality assurance means that most of the time you should evaluate the things that another person has worked on; so it has the responsibility to say if something meets the requirements of the company or not.

QA is challenging position regardless of whether the system you are working on is large or not. If you left that something wrong goes to production your head could be in the guillotine... During the time that I've been involved on this, I've got good experiences and other not so good.

When I started working with an international QA team, I thought that it was going to be the must difficult step in my career, and I wasn't wrong at all. Work with people that have different cultures it's somekind of hard; but that was nothing that the time can not resolve.

![Approved for QA](https://thepracticaldev.s3.amazonaws.com/i/o1is2r9y0mte25e10y2y.jpg)

I think that the worst and also one of the best experience I've got so far was when I started doing QA to my own projects (Yeah! that was weird XD). In the Software QA world there's like a rivalry between Dev and QA; that is like a secret war where everybody has a smiley in their faces, but most of the time they are internally burning because of two things:

1- Dev gets bother when QA opens a new bug report.
2- QA gets bother when Devs hasn't fixed the bug reported.

There might be more reasons, but those are the most common that I've seen. There's like a balance between each other (Dev/QA) but the problem start when dev and qa is the same person (me).

![Working in my local](https://thepracticaldev.s3.amazonaws.com/i/o0vgn8fh5a3fkrjbm2mw.jpg)

When I started doing QA to my own projects I started complainign internally like: _"This code should work because it was made by me and I know everything of it"_ and then during QA process I say _"Oh, that doesn't work. Lets open a bug report to the dev...(myself)"_. Doing QA to my projects was an internal war with myself, between me as QA and me also as Dev. During this time I understod that finding guiltys is just a waste of time and that the only way to be successful is accepting our errors and fixing them, it wasn't easy, but it was a wonderful experience.


What about you? What was your worst experience as QA?
Are you a member of a professional organization related to computing or software development? Why or why not?
Tags: discuss, career, professionalism
Published: 2018-02-11 23:19:28

---
title: Are you a member of a professional organization related to computing or software development? Why or why not?
published: true
description: Understanding why professional software developers join, don't join, or leave professional organizations and societies.
tags: discuss, career, professionalism
---

I've been a member of the IEEE since 2007 and the ACM since 2008, joining around my second year of undergraduate education. Every few years, I evaluate whether or not the membership continues to be worth it to me. For me, that time is now as my memberships expire at the end of February.

As I consider what I do for 2018, I'd like to hear from other professionals:

* If you have never joined a professional society, why have you never joined, what is keeping you from joining, or what would need to happen to encourage you to join?
* If you have have joined a professional society and canceled or opted to not renew your membership, what drove you to cancel or not renew your membership?
* If you are currently a member of one or more professional societies, what keeps you renewing your membership?

Since there were comments asking about professional organizations and professional societies, I'm primarily thinking about the [ACM](https://www.acm.org/) and the [IEEE](http://www.ieee.org/) (and even more specifically, the [IEEE Computer Society](https://www.computer.org/web/guest). But this could also be any number of smaller organizations focused on a particular demographic or with a smaller geographic footprint as well.
Help fix my bloated C++ macros!
Tags: discuss, cpp, leaf
Published: 2018-02-11 18:23:57

---
title: Help fix my bloated C++ macros!
published: true
tags: discuss, cplusplus, leaf
---

I've been working on error messages in [Leaf](http://leaflang.org/), these use a lot of macros to reduce code size and keep speed up. I'm not too happy about them. I even started writing an article on how to minimize them, but realized I don't know how.  Do any C++ gurus have some ideas?

## The Macro

One macro invocation to test for a user-code error  looks like below (this checks the condition that an index into a tuple is within range).

```cpp
CHECK_RETURN( ctx, ex, index < tup->sub.size(), "index-out-of-range" );
```

The macro looks like this:

```cpp
#define CHECK_RETURN( ctx_, stmt_, cond_, reason_, ... )	\
	if( !(cond_) ) { (ctx_).mark_failed(*(stmt_)).error( *(stmt_), (reason_),\
		{ LOGGER_COND(cond_) }, { __VA_ARGS__ } ); \
		return (stmt_); }

```

Where `LOGGER_COND` adds more info (assume `S__LINE__` is the string version of `__LINE__`)

```cpp
#define LOGGER_COND(cond_) util::logger::item_debug_loc( __FILE__ "@" S__LINE__ ), \
	util::logger::item_debug_cond( #cond_ )
```

## The Reason

This macro fulfills a few requirements:

- It reduces redundant code (this type of macro is used hundreds of times in the source code)
- The costly bit, of creating the items for the logger, is not done unless the condition fails
- It reports common information to the logger
- It marks the compilation failed in a consistent manner


## But Yuck!

But I just don't like this. I'm already keeping the macro short, but somehow I feel as though it could get shorted. The need for the deferred evaluation, and ultimate `return` statement prevent me from writing a function that does the same thing -- unless, and this is where I'm hoping, there is a C++14/17 feature that somehow helps me.


## Notes

The `...`/`__VA__ARGS__` part in the macro is for places where I pass extra information:

```cpp
CHECK_RETURN( ctx, field, msym, "unknown-field", util::logger::item_symbol(field->field) );
```

There are several redundant variants of the macro, some throw, others take slightly different parameters. I'd like a cleaner solution.
Koda: the year of the Tanuki
Tags: unity3d, plateformer
Published: 2018-02-11 10:52:07

---
title: "Koda: the year of the Tanuki"
published: true
description: Koda, a plateformer 3d with Unity   
tags: Unity,Plateformer
---
*Originally posted on my [blog](https://www.mathieu-nivoliez.com/posts/2018-02-08-koda-the-year-of-the-tanuki)*

Hello everyone! I am sorry for the delay, but the begining of the year was kind of a rush!
You mays have noticed some change on the site, including its name.

But the main main topic here will be "Koda, Kiyomori’s Guardian !".

## "Ok, but what is it?"

*"Kiyomori’s Guardian !"* is a game where you control *Koda* the *Tanuki* (a forest spirit), who has to fight the corruption of his home, the forest of *Kiyomori*. It's a 3D plateformer realized with *Unity*.
We are a team of 15 people including graphist, game designer and programmers. We make it in the scope of a school project and we aim to present it at the *Gamagora GameShow* which is organized by our school.

![The Koda's team](https://www.mathieu-nivoliez.com/images/koda_team.gif)
*I am the blond dancing one in the middle*

We got to develop it until end of March and there is a *metric tonne* of task to carry out. I believe we are motivate enough to carry them out.
Feel free to visit our page on [Facebook](https://www.facebook.com/Koda-Kiyomoris-Guardian-Projet-Gamagora-2018-538811786477040/) or our [Twitter](https://twitter.com/Kodamagora).

In a few words, stay tuned I shall speak about it again soon.
In the mean time, do not hesitate to ask about the project, I cannot promise to answer to everything but I will do my best.

--Mathieu