teleren/devto huggingface dataset:
Top Game engines for Game Development
Published: 2020-01-20 07:42:00

Who doesn’t love playing games? I mean, it’s the best way to pass time and keep ourselves entertained at the same time, right? We all play some type of games at some point of time, whether it is an Open-world like GTA San Andreas or a first-person shooter like Counter-Strike or Call of Duty.

But has anyone given a thought about how a game is made and what it is all about? Read more to know regarding the game engine and its role in game development and find answers to these questions as well:

<B>How much development goes behind making the game?</B>

All of you must have heard the term “Game Engine” but what does it mean?
How come the games are different when they are developed on the same engine by the same company?
Before going on to discuss the top game engines, let us have a brief description of what a game engine is all about:

<B>What is a Game engine?</B>

A game engine is a software which is used to design games quickly. In other words, it is a framework that brings all the essential tools required for building the games together. The main reason for using it is to reduce the cost, time, and complexity required in the development of the game.

Most of the time, It is observed that whenever there is a lag, crash or frame drop in a game, people immediately blame it on the engine. However, it’s not true. The lagging and the frame drops are caused because of the poor programming in the code.

The core functionality of the game engine includes a rendering engine(“renderer“)for 2D or 3D graphics, networking, animation, artificial intelligence, and memory management.

Most of the big gaming companies have developed their own gaming engine whereas some open-source engines are also available.

<H3>Advantages of Game Engine</H3>

Most of the work like graphic designing, memory management, and audio is easily done by the game engine.
It increases efficiency by reducing the amount of knowledge required by the developer.
When working on a big project, it reduces the time it would have taken by writing the code.

<h3>Disadvantages of Game Engine</h3>

If you are making a small game, then it is best to write the code yourself rather than leaving it for the game engine.

Debugging is not easy if it isn’t open-source.

When we talk about gaming engines for beginners, there are a lot of options available out there like:-

1. Buildbox.
2. RPG Maker.
3. GameMaker Studio 2.
4. CopperCube 5.

<B>Conclusion</B>

We tried compiling the best list for the top game engines in game development and most of them provide more or less the same gaming experience. What you like will completely depend on your experience you had while playing the game designed on that engine.
Never do this in Python
Tags: python
Published: 2020-02-06 02:01:07

---
title: Never do this in Python
published: true
description: In this video I share some things you should avoid doing in when #programming in #python, so called Python #antipatterns and I also show you examples of how to achieve the same result in a better way.
tags: python
---

This video is published in 2 languages.

In English:

In this video I share some things you should avoid doing in when #programming in #python, so called Python #antipatterns and I also show you examples of how to achieve the same result in a better way.

{% youtube Na0QcwtcWEI %}

In Portuguese:

Neste video eu falo sobre algumas coisas que não devemos fazer ao programar em #python, algumas práticas que são caracterizadas como #antipatterns e que podem trazer problemas para o seu #software.

{% youtube p4jWEC7vuKI %}
Hi, I'm ItsASine (again)
Tags: intro, welcome
Published: 2020-02-06 02:00:34

# Hi, I'm ItsASine

To commemorate my 3 year mark on [dev.to](http://dev.to), I'm actually going to start *contributing* content by starting a tech blog

## Who I Am

- I've been around DEV for a while — mostly bookmarking articles I'll never read, but otherwise, I keep to the comments
- I have 5 years experience as a software test engineer
- My normal testing stack is Selenium, Jasmine, and Protractor
- I tend not to end single sentences with punctuation
- I recently got a master's degree in applied mathematics
    - or, I'm a certified mathemagician
- I've overly planned how this will go so that I don't fizzle out after 3 posts
    - It'll be more like 15 posts instead, starting with this one :D
- I'm a DEV mod and tag mod of a bunch of things, so you may have seen me around acting like I'm official and stuff like a hall monitor

## What to Expect

Most of my plans for posts revolve around acceptance testing, as that's where my professional experience is and that's somewhat underrepresented in tech blogs.

Some ideas I have:

- Actual technical posts such as how to test a CSV's contents in Node or what the difference is between Protractor element selectors
- Technical opinion posts, like best practices and how devs' tests differ from a QA's tests
- Other components of testing a webapp, like using automation on a cloud service's devices

Right this second, all this is stored in Notion so I stay motivated and can write anywhere:

![Screenshot of my Chromebook setup](https://i.imgur.com/6EeT3RA.png)

I'll be using Repl to show actual examples in Jasmine where things aren't Selenium/Protractor specific. I might use something like CodeSandbox for full running Selenium/Protractor examples, but I need to get that set up first. If anyone has any other suggestion for embedding a headed Node process somewhere, I'm all ears.

So yeah... just wanted to give a heads up that another QA blog is getting started. Follow me on DEV if you want to join the ride :D
Shell One-liner to view JSON got from any command on Chrome DevTools
Tags: node, json, shell
Published: 2020-02-06 01:23:57

---
title: Shell One-liner to view JSON got from any command on Chrome DevTools
published: true
description: 
tags: #node #json #shell
---

```sh
$ any-command-that-outputs-json | node --inspect-brk --eval 'const chunks = []; process.stdin.resume().setEncoding("utf8").on("data", d => chunks.push(d)).on("end", () => {const result = JSON.parse(chunks.join("")); debugger;})'
```

# Usage

1. Execute the one-liner above.
2. Open `chrome://inspect` and attach to the debugger by clicking the **inspect** link.
3. On inspector, press `F8` once to proceed a step.
4. You'll get a variable named `result` that is a parsed object from the command.

# See also

- [Debugging - Getting Started | Node.js](https://nodejs.org/en/docs/guides/debugging-getting-started/)
How to manage state in swift apps?
Tags: swift, mobx, redux, react
Published: 2020-02-06 02:00:09

---
title: How to manage state in swift apps?
published: true
description: 
tags: #swift #MobX #Redux #React
---

Quick question: I have built a platform using React/Redux/MobX and we have plans to add iOS into the grand scheme of things. The part I am not completely sure is how to port our React app into iOS swift maintaining the same architecture. What kind of state management tools can I use? 

Caveats:
The new code base has to be in swift so the tip to use React-Native might not work for us. Please give me your suggestions.
Windows Desktop Automation with pyWinAuto
Tags: devops, tutorial, todayisearched
Published: 2020-02-06 01:50:45

pywinauto is a set of python modules to automate the Microsoft Windows GUI. At its simplest it allows you to send mouse and keyboard actions to windows dialogs and controls. 

Installation- > pip install pywinauto

To use this tool, you need to get attributes of your application. For this purpose you can use PyInspect tool. Clone the below repository: 
https://github.com/dm-vodopyanov/py_inspect

and run  python py_inspect.py from command prompt.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fwl84ywa15jpstjtqip9.png)

You can inspect the properties of all the elements using this tool.

Later, you need to use these attributes for automation using pyWinAuto.

I will write a python file that will do following stuffs:
1. launch Notepad
2. type 99999 in the notepad
3. Click on Edit -> replace
4. Click on Cancel button on the Replace Dialog box.
5. Again it will enter "Hi from Python...." text in the notepad
6. It will navigate to File-> Save menu
7. Save the file with name "Test"

Here is the pyWinAuto code for this use case:

from pywinauto import application
app=application.Application(backend="uia")
try:
    app.start("Notepad.exe")
    app.window().wait('visible')
    app.window(best_match='Untitled - Notepad').type_keys('99999')
    app.UntitledNotepad.menu_select("Edit -> Replace")
    app.Dialog.CancelButton.click()
    app.UntitledNotepad.Edit.type_keys("Hi from Python.....")
    app.Dialog.menu_select("File->Save")
    app.Dialog.Pane.ComboBox0.Edit5.type_keys("Test")
    app.Dialog.Save.click()
    app.window(title='Test - Notepad').wait('ready', timeout=10)
except TimeoutError as e:
    print(e)
    raise e

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/nq9e4pmt2aspk2cfahb5.png)

Here is the execution video. 
https://vimeo.com/389630552

Hope this was helpful. For more details go through pyWinAuto documentation: https://pywinauto.readthedocs.io/en/latest/
Health Pixel - Get Moving
Published: 2020-02-06 01:50:23

With office jobs, it is crucial to keep moving to maintain good health!

1 - Go for a walk

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/i17vel9hx2q4kg3pq4ag.png)

This one is my favorite, it’s easy and quick: I go for a walk around the block every couple hours. It gets me moving and also allows me to collect my thoughts. 

2 - Clean your home

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/w32zzu8g23lcwkrbr36a.png)

A friend once told me, "To organize your life, start by cleaning your home". Also, depending on the size of your home, it could be a real workout! 

3 - Workout

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ly4hb5gorl9uiegxv487.png)

This one is a no-brainer, literally hit the gym or practice a sport. A couple of hours a week should do the trick. My current goal is about an hour, 3 times a week.

4 - Listen

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/i4neh4osjx9ohf69wbrg.png)

Sometimes our mind is tired but our body is fine, sometimes the opposite. Listen to your mind and body, and act accordingly. When I feel tired mentally, I’ll hit the gym. When I feel tired physically, well easy: sleep!

---

You can also find these pixels on my Instagram: https://instagram.com/valentinprgnd. I will publish Pixels every Monday, Wednesday, and Friday about career development in tech, code, mental health and health for developers. Follow me for more tips @valentinprngd and check out my podcast https://rebased.whatdafox.com.
HOPL again
Tags: help, hopl
Published: 2020-02-06 01:24:24

There was an error in the email address, now fixed in the original article. 

Reiterating, please send [HOPL](http://hopl.info) bugs to hopl.acquisitions@gmail.com (there was a missing "i" in the email address) with "[HOPL] Bug Report" as the subject line.

Kudos to Graydon Hoare for pointing out the problem.
[PT-BR] Enviando SMS com Ruby com o Twilio
Tags: ruby, twilio, sms
Published: 2020-02-06 00:56:05

---
title: [PT-BR] Enviando SMS com Ruby com o Twilio
published: true
description: Para você que é desenvolvedor ruby e quer aprender como enviar SMS.
tags: ruby, twilio, sms
---

Eu nunca havia feito uma aplicação que fosse necessario enviar SMS para alguém, mas o último projeto que fizemos na firma precisou, conversei com um amigo sobre o assunto e ele me falou do [Twilio](http://twilio.com), fiz uma pesquisa rápida sobre e achei a documentação bem completa e fácil de implementar.

Para quem não conhece o [Twilio](http://twilio.com), ele é uma plataforma que possibilita integrar voz, mensagens de texto, vídeo, notificações entre outras facilidades na sua aplicação, através de uma API. As integrações são feitas com Ruby, Java, .NET, Node.js, PHP, entre outras.

Vou mostrar como é fácil enviar SMS pelo console do ruby e em breve pretendo fazer um screencast de como implementar essa funcionalidade em uma aplicação Ruby on Rails.

### Passo 1 - Criar conta no Twilio:

Crie uma conta no Twilio e acesse o [Console do Twilio](http://twilio.com/console).<br>
Criar conta: [https://www.twilio.com/try-twilio](https://www.twilio.com/try-twilio)<br>
Console: [http://twilio.com/console](http://twilio.com/console)

Ao criar a conta, é disponibilizado um Trial para realizar testes:

![Twilio credentials](https://dev-to-uploads.s3.amazonaws.com/i/12pjx8jk6915y7d36d1h.png)

Não esqueça de [cadastrar número verificado](https://www.twilio.com/console/phone-numbers/verified).
[https://www.twilio.com/console/phone-numbers/verified](https://www.twilio.com/console/phone-numbers/verified)<br>
**Observações:** Os números verificados são obrigatórios para você conseguir enviar SMS com TRIAL.


### Passo 2 - Enviar a SMS:

Instale a gem do Twilio com o comando:

```
gem install twilio-ruby -v 5.21.2
```

Abra um console ruby com o comando:

```
irb
```

Dentro do console nós importamos a gem "twilio-ruby", configuramos as variavéis e enviamos uma mensagem.

```ruby
require 'twilio-ruby'

# Pegue seu SID e Auth Token de twilio.com/console
# PERIGO! Isso é inseguro.
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'seu_auth_token'
numero = 'seu_numero' # Número que você alugou no twilio
@client = Twilio::REST::Client.new(account_sid, auth_token)

mensagem = @client.messages.create(
  from: numero, # +15017122661
  body: 'Minha primeira mensagem enviada com ruby.',
  to: '+5544999801281' # +5544998761234
)

puts mensagem.sid
```

Lembrando que isso é uma maneira insegura. É importante manter as credenciais, como o SID e o Auth Token, armazenando-as de maneira a impedir o acesso não autorizado.
Como é apenas um exemplo para testes utilizei elas no console mesmo.

### Finalizando

Como você pode ver é muito fácil sair enviando SMS com Ruby.

O [Twilio](http://twilio.com) oferece muitos outros serviços e você pode ver e consultar o preço de todos acessando [https://www.twilio.com/pricing](https://www.twilio.com/pricing).
Python | print(“It’s cool”)
Tags: python, beginners
Published: 2020-02-06 00:17:50

Python, es un lenguaje de programación interpretado, fácil de aprender y poderoso en su código. Su curva de aprendizaje es relativamente baja, en comparación con otros lenguajes.

Es un lenguaje multiplataforma, lo que hace aun mas llamativo, dado que puede correr, en sistemas operativos como Windows, MacOS y UNIX. Python utiliza una sintaxis limpia, lo que la hace elegante en su forma y estructura, ademas de su simple y enfoque a la programación orientada a objetos.

Python es usado para el desarrollo de scripts y de múltiples aplicaciones en áreas diferentes en la tecnologías que nos rodean hoy en día. Para una mayor información, sobre su ultima versión y librerías disponibles, consultas en su pagina oficial, https://www.python.org/, basta de palabras, y manos a la obra.


1. Python utiliza la palabra reservada print para enviar un mensaje por pantalla; se utilizan las comillas simples o dobles, según preferencias, aunque mas adelante, se vera la diferencia en la utilización de las dos.

{% gist https://gist.github.com/keii25/c90624d79522e8258d611f810861705f %}


2. Asignación de variables en python !!

{% gist https://gist.github.com/keii25/4107feb3c98d3308b2113f4ae49127fb %}

3. Veamos un breve ejemplo, combinando cada ilustración anterior.

{% gist https://gist.github.com/keii25/18514c9b29d93f99bbf34bb2e4ae3690 %}

En el anterior código, notamos, que se utiliza una “ coma”, con el fin concatenar el valor de la variable que había sido asignada en un primer momento, y pueda ser mostrada al momento de ejecutar el código.

El mensaje final que se mostrara es:

*Matt Tiene 25 Años*


Hasta esta instancia, hemos aprendido a mostrar un mensaje y a conocer sobre la asignación de variables.
Project Euler Problem 3 Solved with Javascript

Tags: projecteuler, javascript, beginners, tutorial
Published: 2020-02-05 23:40:30

# Problem 3: Largest Prime Factor

Today we're going to tackle Project Euler problem number 3! We are going to learn all about primes and factors. This problem is fairly straight-forward, so we shouldn't have to dig too deep into Wikipedia.

# Problem Discussion

The prime factors of 13195 are 5, 7, 13 and 29.

What is the largest prime factor of the given number?

# Video Version

If you like to watch rather than read, check out the video that accompanies this article. If not, keep reading!

{%youtube yoqN91pr5qM %}

## Prime Number

First, let's figure out what a prime number is, in case you forgot...which I did.

> a whole number greater than 1 that can not be made by multiplying other whole numbers

Some examples are: 2, 3, 5 and 7.

## Prime Factor

Rather than try and explain it in my own words, i'll let [mathisfun.com](http://mathisfun.com) do the explaining.

> A factor that is a prime number.

or

> In other words: any of the prime numbers that can be multiplied to give the original number.

### Example

The factors of 35 are: 1, 5, 7, 35. 35 is a composite of 7 and 5, therefore 7 is the highest prime number, making it the highest prime factor. 

# Solution

Now that we are armed with grade school math, let's solve this thing!

## Steps

1. Iterate over all factors
2. Check factor is a prime number
3. Return last factor.

## Code
```js
    function largestPrimeFactor(number) {
    	// setup local state
      let primesAndFactor = [];
      // find all factors
      // In order to maintain this property of unique prime factorizations, it is necessary that the number one, 1, be categorized as neither prime nor composite.
      for (let factorIterator = 0; factorIterator <= number; factorIterator++) {
        // check if factor
        let isFactor = number % factorIterator == 0;
        let isPrime = true;
    
        if (isFactor) {
          // see if factor is a prime
          // a prime number has two factors, 1 and itself
          for (let i = 2; i < factorIterator; i++) {
            if (factorIterator % i == 0) {
              isPrime = false;
              continue;
            }
          }
        }
    
        // if so, push to primes list
        if (isFactor && isPrime) {
          primesAndFactor.push(factorIterator);
        }
      } // end for loop
    
      // return last element of array
      return primesAndFactor.pop();
    }
    
    largestPrimeFactor(13195);
```
# Final Thoughts

In this challenge, we start getting into the need for algorithms. This is a brute force approach that requires two for loops, which isn't ideal. This works okay for now, but we will need something more powerful for the next set of problems, I'm sure.

If you want to see the rest of my solutions, check them out here:

{%github DarthOstrich/projectEuler %}

# Resources

[Prime Factor](https://www.mathsisfun.com/definitions/prime-factor.html)
Delete all node_modules from your machine and save space
Tags: npm, nodemodules, save, space
Published: 2020-02-05 23:23:36

Couple of months ago I has having disk space problems on my development machine and started to look for unused folders that were taking some space. Looking for solutions on the internet, I've found that **local `node_modules`s take a lot of space** when you have a couple of Javascript projects. Then, I started looking for solutions on how to smartly delete these folders, since I can rebuild them with `yarn` if I need.

Just FYI, a raw `npx create-react-app` folder has a **227mb `node_modules`.**

So, let's go to the recipe. I present you two ways of deleting these folders:

- `npx npkill` will spawn an **interactive interface** for you to select the `node_modules` you want to delete.
- `find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +` will find and delete **every `node_modules` folder under the current directory**, so beware where you're running it.

If you want more options, check [this SOF question](https://stackoverflow.com/questions/42950501/delete-node-modules-folder-recursively-from-a-specified-path-using-command-line).
How to delete multiple branches in Git
Tags: git, webdev
Published: 2020-02-05 23:06:46


I've been a wee bit lazy keeping my local branches up to date.
Thankfully, I learnt today that it's super easy to delete multiple branches at a time.

First run this command to test what branches will be deleted.

`> git branch | grep "<pattern>"`

Then run this to actually do the delete

`> git branch | grep "<pattern>" | xargs git branch -D`

E.g.
`> git branch | grep "ch100-*"`
`> git branch | grep "ch100-*" | xargs git branch -D`
Chrome v80 release: JS module support for workers
Tags: javascript, webdev, frontend, framework
Published: 2020-02-05 21:26:43

Google just released Chrome version 80 on Tuesday, February 4, 2020. I personally waited for this specific release for over one year and it feels like the most important major release in a very long time.

https://www.chromestatus.com/features/schedule

# What is a Javascript module?
As soon as you are using the ES6+ class system, you will most likely automatically work with JS modules:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/r7u9166gr9lz4rwsvofx.png)

If you stick to the “1 class per file” design pattern, you will most likely want to import the base class which you extend. You will also most likely want to export the new class at the end of your file. As soon as you are using an import or export statement, your file is already considered to be a JS module.

# Can JS modules run directly inside a browser?
Inside the main thread, this is already possible in Chrome, Firefox & Safari for a long time. Using JS modules inside a web worker was already possible in Chrome for quite some time as well, but hidden behind an experimental flag. Now with Chrome v80, it is finally possible out of the box.

Side note: this widens the gap between Chrome & other browsers by a long shot. Sadly the FF & Safari dev teams have related tickets open for several years, without any priority.

# How to create a worker from a JS module?
It is up to you if you want to name your js module files .mjs or just .js, adding type: ‘module’ is the key to do it.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ielv4jzij5r2m0nn5b4q.png)

# What is the advantage to use JS modules directly inside the browser?
You can create well structured apps and run them inside the browser without the need for any JS related build processes. Meaning: you can change the source code and just reload the browser page, without the need for webkit watching the file-changes & hot module replacements.

# Is there already a web workers driven JS UI framework out there?
Yes, neo.mjs got released to the public on November 23rd, 2019.

Repository:

https://github.com/neomjs/neo

Online Examples:

https://neomjs.github.io/pages/

# What is coming next?
If you did look close at the release schedule, you might have noticed that Chrome v81 is scheduled for March 17th. This version will include JS module support for ***shared*** workers. This is the key for crafting multi browser window apps (e.g. apps which can run on multiple screens).

Best regards & happy coding,
Tobias
Junior Web Developer Portfolio Review - Oleg
Tags: webdev, jobs, career, beginners
Published: 2020-02-05 22:43:02

---
title: Junior Web Developer Portfolio Review - Oleg
published: true
description: Today I'm reviewing a junior web developer's portfolio. 
tags: webdev, jobs, career, beginners, 
---

When I saw Oleg's junior web developer portfolio, I knew I had to do a review. Paging through the contents, there were certain components that were total fire. He even has an FAQ page for recruiters! But what can he be doing better to get more calls, interviews and the coveted job offer? 

We're investigating Oleg's portfolio and coming up with some suggestions today with RealToughCandy.

_**Want to transform your portfolio to something average to amazing?** Check out my top-rated course [Portfolio Surgery](https://realtoughcandy.io/p/portfolio-surgery), produced exclusively for aspiring & new developers. You'll learn five proven methods for making projects your own._