teleren/devto huggingface dataset:
Most Popular Development Posts Of The Week (03 October 2018)
Tags: webdev, node, javascript, css
Published: 2018-10-04 11:49:15

---
title: Most Popular Development Posts Of The Week (03 October 2018)
published: true
tags: webdev,nodejs,javascript,css
canonical_url: https://medium.com/daily-now/most-popular-development-posts-of-the-week-03-october-2018-8b9e6065551f
cover_image: https://cdn-images-1.medium.com/max/1024/1*k6yPFewuUuAMxdjzxKHibQ.jpeg
---

_As long as you’re going to be thinking anyway, think big_

- [Goodbye JavaScript, Hello WebAssembly](https://app.dailynow.co/r/867cb583f5aef360a740358ef26a4879)
- [Top 5 JavaScript IDEs in 2018](https://app.dailynow.co/r/f4daa95d4235dec8e8d494a0bff3137b)
- [Microsoft Learn](https://app.dailynow.co/r/eaf7f81335079329871d5efe43bf06b0)
- [Simple Restful Api’s with NodeJs and ES6.](https://app.dailynow.co/r/9389c7412c0993fff31c8ad8ef9f3f9b)
- [Cogear.JS — modern static websites generator](https://app.dailynow.co/r/ed81f732a7b90f3a4c106ead43fc019e)
- [JavaScript Usage by Industry](https://app.dailynow.co/r/1d87296e0b591eda92c300f7c0ce9c8e)
- [Setup MacOS for Development](https://app.dailynow.co/r/13ab8132435e3b9087f0aefd9b3be3c7) by [Camilo Martinez](https://medium.com/u/e991f5e97350)
- [Why I’m moving to Dev.to?](https://app.dailynow.co/r/345c2b2c683de1341f906d1ed8d0d251) by [Camilo Martinez](https://medium.com/u/e991f5e97350)
- [October Magic For Your Desktop (2018 Edition)](https://app.dailynow.co/r/059bd7fea667da082809ca83796894b0)
- [What is Modular CSS?](https://app.dailynow.co/r/2065643281d128bef306c07e8d6a8e4b) by [Scott Vandehey](https://medium.com/u/b22cf1e18ad)

[_Thanks to Daily_](https://www.dailynow.co/) _developers can focus on code instead of searching for news. Get immediate access to all these posts and much more just by opening a new tab._

[![](https://cdn-images-1.medium.com/max/640/1*jKbLhJsX7eMpNgqrVdWfuw.jpeg)](https://app.dailynow.co/download)

* * *
Fine Tuned Video Compression in iOS (Swift 4, no dependencies)
Tags: ios, videocompression, encoding, swift
Published: 2018-10-03 13:49:07

---
title: Fine Tuned Video Compression in iOS (Swift 4, no dependencies)
published: true
description: Working compression code, configurable a/v bitrate, video resolution, audio sample rate, and many other fine-tuning operations.
tags: iOS, Video Compression, Encoding, Swift
---

I've written my first blog post as an evangelist in TestFairy blog. This is a shameless plug but also a useful piece of guide for encoding videos inside an iOS device. Hope you find it useful and correct my mistakes if there are any.

https://blog.testfairy.com/fine-tuned-video-compression-in-ios-swift-4-no-dependencies/

Have a nice week!
Would you be interested if I started blogging about one of my project? 
Tags: discuss, videogames
Published: 2018-10-03 13:30:25

---
title: Would you be interested if I started blogging about one of my project? 
published: true
description: I am making a 3D game from scratch with a custom 3D engine
tags: discuss, video games
cover_image: https://thepracticaldev.s3.amazonaws.com/i/iqx3tun94iz8s2dlr55g.jpg
---

Hi folks ! 

I wanted to know, would you be interested if I started blogging, on a weekly basis, about one of my project ?

It is a 3D video game made in a minecraft style, but with the idea of making a game like [Proteus](http://twistedtreegames.com/proteus/) to create something visually attractive (I am also giving a lot of importance to the audio part of the game).

Let me know what you think in the comments :)
Final Thoughts on the State of the Web Survey
Tags: webdev, sotwsurvey, datascience
Published: 2018-10-03 13:23:17

---
title: Final Thoughts on the State of the Web Survey
published: true
description: Over the summer we ran a community survey called State of the Web.
tags: webdev, sotwsurvey, datascience
---

Over the summer we ran a community survey called State of the Web. We asked developers, web and otherwise, to weigh in on their thoughts on the the web as a platform for users and developers. The World Wide Web is one of the most ubiquitous platforms ever created and will remain critical to computing for any foreseeable future. It is a technology that evolves quickly and is a topic that needs regular visits. That's an understatement.

Despite the web’s importance, it is far from a perfect platform. With needs of balancing compatibility, innovation, and standards development, the web can often seem like a chaotic mess. Silicon Valley browser giants each have their own motivations for feature development, while developers and users across the world all have their own needs. Somehow we make this resilient platform work.

Our survey of 2,000 developers helped us find out that CSS flex-box has indeed reached critical use among developers, disabling JavaScript on the web remains a heated debate, and that dog people are more disciplined developers than cat people. That last one seems pretty clear in the corollary data, try and prove it wrong!

![](https://discourse-cdn-sjc2.com/standard17/uploads/httparchive/original/2X/c/c23c72c5732c8c650690fe77d9fe6f3685fa0ffd.png)

Here are a few posts relating to the survey you might want to check out. There were many analyses and discussions though, if you know of a good one I didn’t list, feel free to leave it in the comments.  

{% link https://dev.to/devteam/state-of-the-web-data---call-for-analysis-2o75 %}  
{% link https://dev.to/rpalo/state-of-the-web-data-exploration-1b68 %}
{% link https://dev.to/ben/should-browsers-still-allow-users-to-disable-javascript--211d %}  


### [The DEV Survey on BigQuery](https://discuss.httparchive.org/t/the-dev-survey-on-bigquery/1452/7)

### [State Of The Web Data from Dev.to](https://developbit.github.io/)

{% github MartyHimmel/DEV-state-of-the-web-2018 %}  

For a deeper dive, here is an **[Excel file](https://s3.amazonaws.com/thepracticaldev/State+Of+The+Web+Survey+Results.xlsx) or [CSV](https://s3.amazonaws.com/thepracticaldev/State+Of+The+Web+Survey+Results.csv)** of the raw data from the survey.

We rely on the web every day, and each bit of data helps when we make choices. Please user these results to inform some of your choices or win a debate on your web development team.

Happy coding!
Have you ever been hunted by recruiters on Tinder? 
Tags: discuss, career, job, productivity
Published: 2018-10-03 10:20:41

---
title: Have you ever been hunted by recruiters on Tinder? 
published: true
description: Yes, it really takes place. WTF?
tags: #discuss #career #job #productivity
---
My story about the [bot for job proposals](https://dev.to/whokilledkevin/how-i-created-a-bot-that-talked-to-recruiters-for-me-54n5) and the reaction on it made me feel that I am not the one who struggles. Some collegues of mine even told me that they are being attacked by recruiters on Tinder. What do you think about it? Maybe we should talk about it more. Like... where the borders are?
How to run your app on the iPhone with the newest OS version via an older version of Xcode?
Tags: ios, xcode
Published: 2018-10-03 09:19:41

---
title: How to run your app on the iPhone with the newest OS version via an older version of Xcode?
published: true
description: Run your app on the iPhone with the newest OS version via an older version of Xcode
tags: iOS, Xcode
---

![](https://thepracticaldev.s3.amazonaws.com/i/eb5uo0q24j0fl37jboc3.jpg)

_Originally posted on [my blog](http://www.nikola-breznjak.com/blog/ios/run-app-iphone-newest-os-version-via-older-version-xcode/)_

In this short post, I'll explain how to run your app via an older version of Xcode (9.2 in my particular case) on your iPhone that has the newest OS (11.4.1 in my case at the time of this writing).

Say you update your iPhone OS to the newest version, and you open the project in an older version of Xcode and try to run it. You will most probably get an error similar to this (version numbers may vary):

> Could not locate device support files on iPhone X (11.1) with Xcode (9.2 9C32c)

The problem has been addressed in these two StackOverflow posts:

+ [Xcode not supported for iOS 11.3 by Xcode 9.2 needed 9.3](https://stackoverflow.com/questions/49720178/xcode-not-supported-for-ios-11-3-by-xcode-9-2-needed-9-3/5059639)
+ [How to fix Xcode error: Could not locate device support files on iPhone X (11.1) with Xcode Beta (9.2 9C32c)](https://stackoverflow.com/questions/47119186/how-to-fix-xcode-error-could-not-locate-device-support-files-on-iphone-x-11-1)

The solution is basically to go [on this Github project](https://github.com/filsv/iPhoneOSDeviceSupport) and download the device support files and place them in the `DeviceSupport` folder of your Xcode app.

You can get to the `DeviceSupport` folder by going into your `Applications`, find the Xcode app, right-click on it and select `Show Package Contents`. Then navigate to `Contents > Developer > Platforms > iPhoneOS.platform > DeviceSupport` and paste the contents of the downloaded file there.

All you have to do now is to restart Xcode and run the app again.

⚠️ Now here's the potentially tricky party; you may realize that even though you've downloaded the correct support files from Github (and restarted Xcode) the Xcode is still not happy with it. Say for example you've downloaded `11.4 (15F79)` but after restarting and running again you get an error mentioning something like `11.4.1 (15G77)`. The solution there is to just rename the folder to that, restart Xcode and voila, it works!

Hope this helps someone 💪

_edit:_ Thanks to Ikem Krueger's comment, here's the link to the [newest device support files](https://stackoverflow.com/questions/49564533/xcode-device-support-for-11-3-15e5216a/49808795#49808795).
Move Fast and Break Things - How it works
Tags: programming
Published: 2018-10-03 08:27:05

---
title: Move Fast and Break Things - How it works
published: true
description: Why you should move fast and break things, especially when programming
tags: programming
---

![cover image](https://s3.us-east-2.amazonaws.com/devletters/covers/fast.jpeg)

> First posted on [Dev Letters](https://devletters.com/letters/move-fast-break-things/)


Move Fast and Break Things - such a popular saying in the startup world. Some are so in favor of it that they sing it everyday while there are others that absolutely loathe it.

I, for one, used to be not much of a strong believer in this. But then, through my own life experiences, I realized how this works.

There are two components to it -

(1) Move Fast

The first idea is pretty simple. You move fast. You do things fast. You work fast. In other words, you don't over-plan or procrastinate because it won't help. 

(2) Break Things

Things will break. You won't get it correct the first time, Hell you won't get it correct even the second time. Why? Because it is hard to make correct assumptions. There are things that you cannot just assume. I have learned this myself, the hard way. 

Instead, you should mold your product as you keep running into roadblocks. With enough perseverance on your part, you will eventually make it out, and be a success.

This applies to non-startup things like learning a programming language too.

Rather than sitting and thinking about how to write some code correctly, you just write the code in the way you know ("move fast") and if you ever come into a problem while following that method ("break things"), you will realize what is the more correct way to write it.

Repeat this cycle many times and you are eventually a pro.

I don't know of any other way that is more guaranteed to return results like this one. The only thing required here is persistence, really. If you think you have it, this approach is for you.

Otherwise, you go slowly.

Moving fast, breaking things, and then quitting when things break won't work.

PS - Want to learn more? Get yourself a copy of [Rework](https://amzn.to/2MyZOoE) and read it in one sitting (just kidding, I did it though). It will surely change some of your views on entrepreneurship and by extension, life.
Published jest-matcher-vue-test-utils
Tags: vue, jest, testing, showdev
Published: 2018-10-03 08:24:32

---
title: Published jest-matcher-vue-test-utils
published: true
description: Created cute matchers for Jest + Vue Test Utils
tags: vue,jest,testing,showdev
---

Hello, dev.to!
I heard here's the best place to share what I made.

Usually, I'm writing [the articles on Medium](https://medium.com/haiiro-io/tagged/code). But wondering if I move to dev.to.

## The main thing;

Published cute matchers for Jest + Vue Test Utils as [npm module](https://www.npmjs.com/package/jest-matcher-vue-test-utils). You can use nice matchers by installing this npm and setup.

{% github hmsk/jest-matcher-vue-test-utils %}

Get from npm:

```sh
$ npm install -D jest-matcher-vue-test-utils
```

or

```sh
$ yarn install -D jest-matcher-vue-test-utils
```

Then, register matchers on your jest process:

```js
import vueTestUtilMatchers from "jest-matcher-vue-test-utils";
expect.extend({ ...vueTestUtilMatchers });
```

Now, you can use:

```js
expect(() => wrapper.vm.showError()).toShow(wrapper, "p.error");
```

```js
expect(() => wrapper.vm.hideError()).toHide(wrapper, "p.error");`
```

```js
expect(Component).toBeValidProps({ name: "required name", fullName: "Kengo Hamasaki" });`
```

```js
expect(Component).toBeValidProp("name", "Required Name");`
```

```js
expect(Component).toRequireProp("name");`
```

```js
expect(Component).toHaveDefaultProp("address", "Kitakyushu, Japan");`
```

```js
expect(Component).toBeValidPropWithTypeCheck("zipcode", "94103");`
```

```js
expect(Component).toBeValidPropWithCustomValidator("fullname", "Kengo Hamasaki");`
```

Currently there're only 8 matchers, but happy to hear your idea, annoying case for Jest + Vue Test Utils!
As my home is RSpec, so any feedback about matchers **as English** is totally helpful too :)
I have created a tutorial video on how to build a login system in Django by leveraging Django's built-in auth component
Tags: django, authentication, youtubescreencast
Published: 2018-10-03 08:17:51

---
title: I have created a tutorial video on how to build a login system in Django by leveraging Django's built-in auth component
published: true
description: A Simple Authentication system in Django 2 by leveraging Django's built-in auth feature
tags: django, authentication, youtube-screencast
cover_image: https://thepracticaldev.s3.amazonaws.com/i/8vk90n3g8ggaa0o9lhv5.png
---
At some point for a web application, we need the authentication feature to identify the user and manage them.

Being a battery included framework Django comes with a builtin login system. So I have created a video screencast with step by step instructions to build an auth system in Django. 

In this screencast, we will be taking a look into how to leverage Django's power to build a powerful authentication system

Here is the link [http://bit.ly/2NXLgnf](http://bit.ly/2NXLgnf)

{% youtube sCQebCRL7AU %}

Source Code : https://github.com/ShobiExplains/SimpleDjangoAuthentication

Let me know what you guys thinks about the video.
What are best practices for persisting positions when using drag & drop?
Tags: discuss, webdev
Published: 2018-10-03 08:17:47

---
title: What are best practices for persisting positions when using drag & drop?
published: true
description: What are best practices for persisting positions when using drag & drop?
tags: devdiscuss, webdev
---

We're in the process of implementing drag & drop in our platform to reorder elements and while the UX is straightforward to manage I've seen a lot of options for persisting the order in DB.

I'd love to get some wisdom from the community and see what the best practices are. I've looked around on StackOverflow and found [this article](https://softwareengineering.stackexchange.com/questions/304593/how-to-store-ordered-information-in-a-relational-database) that has an interesting option to limit queries.

So, in your experience, what's the best approach for it?

---

Edit: for those stumbling on the post look at [Guillaume's comment](https://dev.to/gmartigny/comment/60lc) for neat SQL statements.
NBA Bar - 🏀 🖥️ Check NBA in your menubar.
Tags: opensource, react, electron, showdev
Published: 2018-10-03 06:29:06

---
cover_image: https://thepracticaldev.s3.amazonaws.com/i/kwgjayeoagtjk645rxrp.png
title: NBA Bar - 🏀 🖥️ Check NBA in your menubar.
published: true
description: This is a menubar app for showing NBA schedule, boxscore, live game, etc.  
tags: #opensource, #react, #electron, #showdev
---

18-19 NBA season is about to begin, so I recently rewrote it using `Next.js` and `react-virtualized`, then it runs faster and more smoothly! Hope you like it :)

It works on MacOS and Windows. Feel free to download and use it, and if it unfortunately has bugs please open an issue for me thanks ;)

## 🖥️ Screenshots

<p align="center">
  <img width="1280" alt="screenshot_1" src="https://user-images.githubusercontent.com/12113222/38746166-4fdee346-3f79-11e8-9c59-e545b0853922.png">
  <img width="1280" alt="screenshot_2" src="https://user-images.githubusercontent.com/12113222/38746603-979c5d70-3f7a-11e8-8cf8-131968d4d36a.png">
</p>

## Repo: https://github.com/xxhomey19/nba-bar
Multiple ActiveRecord Associations
Tags: help
Published: 2018-10-03 04:01:11

---
title: Multiple ActiveRecord Associations
published: true
tags: help
---

Hey so I know with ActiveRecord I can have associations like belongs_to, has_many and has_many through, but how would it work if I have a model that has two associations with the same second model?

For example, if I have three class models Foo, Bar, & Baz. If 

class Foo
    has_many :baz
    has_many :bar 
    has_many :bar, through: :baz 
end 

Basically, I want my foo concept to be able to create a bar but also to have bars through baz. Can I use it the way I have it set up there (with the other associations set up to match) and if I can, am I able to call .bars on my foo object to get back ALL the bars from both associations?
Load testing an API with JMeter
Tags: node, api, testing, jmeter
Published: 2018-10-03 03:25:13

---
title: Load testing an API with JMeter
published: true
description: How to test an API using jmeter
tags: nodejs, api, testing, jmeter
---

Load Testing is quite a stream of its own all I did was smoothly sailed on top of it. With not much time in hand, the only weapon of choice was Jmeter, Well quite brilliant a tool!!


![Load with Max request](https://thepracticaldev.s3.amazonaws.com/i/0i6k7vlbd6v5u70atn9y.jpg)




We had to test a facebook chat-bot built with nodejs. This app is a webhook for FB to push the chat messages down to our app.



This is how we achieved it



On Windows:

Download JMeter from [here](https://jmeter.apache.org/download_jmeter.cgi).



Now run the jmeter.bat, this will open up a java GUI where you can easily configure the endpoints you want to test.

- Add a thread group and set the number of users/thread you want to spawn to test your API
- Add an Http request sampler 
- Fill in the intuitive fields like URL, request body, Method, etc.,
- For setting up HTTP headers like content-type or authorization fields right click on HTTP request and add config element HTTP header manager, then the key values as you may
- To see the results on all the requests that will spawn create add listener View results tree. 
- You are ready to click on play button an check out the View results tree to verify the status.


There is a limitation to the number of threads that you can spawn in one machine, So I suggest couple of things 

use the command prompt to run this test and not the GUI, coz it may give up on you if the memory consumed.
Also if your machine does not have enough memory try running this same test from multiple machines.


So once you create the *.jmx file from the GUI.



Before you run the JMeter with multiple threads set the JVM memory to the max your system can take. Otherwise, you might end up with "java.lang.OutOfMemoryError" every time you cross the limit.



Open the JMeter.bat file in your fav editor and search for "set HEAP" then replace with



> set  HEAP="-Xms512m -Xmx10480m"



* this number is used on my 16gb ram laptop and I was able to run 2k to 4k for threads.



 use the following command from the bin folder of JMeter



> start /REALTIME java -jar ApacheJMeter.jar -n -t filename.jmx -l results1.jtl -j log1.log



Now there is a lot of ways you can get test data, the way we chose was CSV dataset. we had to add config element CSV data-set config on the http request. and make some minor changes on the request to pick the data from the CSV file. Use the csv header as variable in your json like below


> {
   "sender": {"id": "${userid}"}
}


So userid is the column name or header which has to be specified in the CSV data-set config rather than CSV file itself. Each row in the CSV file will be considered as one use case so header cannot go in this file.

Here is s snapshot of the project structure 



![project structure](https://thepracticaldev.s3.amazonaws.com/i/ul2l0sgttux8o56l6yti.PNG)


This is should be enough for a basic load test.

Happy load testing.
AWS MongoDB
Tags: aws, serverless, mongodb
Published: 2018-10-03 02:16:36

---
title: AWS MongoDB
published: true
description: Hello Friends, i am new to AWS. I would like to know, how do i use serverless + MongoDB together. I mean, i wish to create my end-points using aws serverless & save my data in MongoDB. Please guide/advise.
tags: aws, serverless, mongodb
---
API Design
Tags: api, design
Published: 2018-10-02 20:36:59

---
title: API Design
published: true
description: Some standards when dealing with APIs
tags: API,design
cover_image: https://thepracticaldev.s3.amazonaws.com/i/rdeu4djre0mo2dysaje0.jpg
---

## Reference

First and foremost I'd like to reference everything in [this article](https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api).  Please read that for all the details.  There are 3 things I would highlight if we were working together.

## Entities

Almost all routes should represent an entity or a collection of entities.  This means pagination and appropriate filter abilities for the client to use.  If the client requests an entity be updated, the entity should be in the response.  The reference above covers this topic well.

## Bulk Operations

Bulk operations are not covered in the article above.  My preference is the following:

```sh
POST /route
...headers

[{ids: [1, 3], status: 0}, {ids: [2], status: 1}]
```

This should return the modified entities so that the client can merge the data into it's state.

## Errors

The last topic, which I'd like to highlight is errors.  Use 4xx http status for client issues and 5xx for server side issues.  Most js client libraries automatically resolve 4xx and 5xx http status codes as errors.  So in my opinion using the literally correct http status code is not a hard requirement.  The response signature should be:

```json
{
  "message" : "Something bad happened :(",
  "description" : "More details about the error here"
}
```

```json
{
  "message" : "Validation Failed",
  "errors" : [
    {
      "field" : "first_name",
      "message" : "First name cannot have fancy characters"
    },
    {
       "field" : "password",
       "message" : "Password cannot be blank"
    }
  ]
}
```

Most of the time the client should be able to put the message field directly into the interface.  This means it should be human readable and understandable to the end user.  The message should also be < 200 characters.

## Extra

- JSON keys should never have a space
- If a request sends `Accept: application/json` header, the backend should respectfully respond in kind.

Great!  Now we can work together!
React Redux PWA
Tags: workbox, webpack, workboxwebpackplugin, pwa
Published: 2018-10-03 02:11:53

---
title: React Redux PWA
published: true
description: Hello Friends, i have created a demo app using React and Redux. It has very basic authentication & after user is in, a page displays a list of dummy posts. I have also added a workbox webpack plugin to it. But, i need further guidance to enhance this app. Your help will be appreciated. [GitHub Link](https://github.com/harshalhirve/react-pwa-app)
tags: workbox, webpack, workbox-webpack-plugin, pwa
---