teleren/devto huggingface dataset:
Fortnite is the greatest example of Agile development I have seen to date.
Tags: discuss
Published: 2018-11-17 02:34:41

---
title: Fortnite is the greatest example of Agile development I have seen to date.
published: true
description: 
tags: discuss
---

This is something I plan on doing a series on, maybe next month, but during season 2 of Fortnite I started to see what they where going for and predicted much of what they have done to date. When they introduced "Battle Royal" mode, I at first thought it was a desperate attempt to pivot their poorly received initial PVE early access mode, but later started to realize they may not care about the game mode at all. They are using what is popular and easy to build (Battle Royals) to deliver a steady stream of new content, new modes and most importantly new skins. In the months I have been watching the amount of content added to Fortnite has been absolutely off the charts.
Online Hackathon! -- Vlog 11.16.2018 -- Benjamin Spak
Tags: vlog, devgains, spakmedia, 301daysofcode
Published: 2018-11-17 02:07:24

---
title: Online Hackathon! -- Vlog 11.16.2018 -- Benjamin Spak
published: true
description: Chatting about how I'm approaching the user retention problem on spak.co with hackathons.
tags: #Vlog, #DevGains, #SpakMedia, #301DaysOfCode
---

[![](https://thepracticaldev.s3.amazonaws.com/i/c5rzru47v2q543g20rxh.png)](https://youtu.be/OL7QTBI9xbA)

⚠️ Question of the Day:
In an online hackathon 💻, what non-physical prizes would be ideal to award 🏆 winners? By non-physical, I mean things that do not have to be mailed.
[https://twitter.com/benjaminspak/status/1063444382123257857](https://twitter.com/benjaminspak/status/1063444382123257857)
Daily Coding Puzzles - Nov 11th - Nov 16th
Tags: codingpuzzle, programming, challenge
Published: 2018-11-17 00:45:24

---
title: Daily Coding Puzzles - Nov 11th - Nov 16th
published: true
description: A discussion about this week's Coding Puzzles
tags: #CodingPuzzle, #programming, #challenge
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ylbj2edgpxuum7soeyyo.jpg
---

Every day on [Twitter](https://twitter.com/aspittel), I post coding puzzles. These are quick coding challenges that increase in difficulty across the span of the week -- with Monday being the most beginner friendly and Friday being super tough. I love seeing other people's solutions as well, and so people post their solution to the problem in any programming language.

[Here's more about them.](https://dev.to/aspittel/daily-coding-puzzles-4ce9)

I wanted to try posting these here. I'm going to post each question from this week as a comment below, and then we will thread answers under those questions. Please feel free to post your solutions to the ones you are interested in below! Then, you can comment with insights into people's solutions below that! I will also add a meta thread if you have advice on how to format this in the future!

Excited to see your solutions!
How fast do you code?
Tags: productivity, developers, discuss
Published: 2018-11-16 21:56:45

---
title: How fast do you code?
published: true
description: does how fast you code matter? is a faster coder a better coder?
tags: productivity, developers, discuss 
---

I’ve always wondered how fast other developers code. How many lines of code do they write per day, per hour? To be honest i’m a pretty slow coder, i can type faster but i prefer to go slow. 

I want to know what everyone thinks? Are the so called “real” developers really fast coders? does it matter at all?

Any input would be appreciated:)
Magic Grid - Creating a dynamic grid layout with Javascript
Tags: javascript, frontend, showdev
Published: 2018-11-16 20:46:08

---
title: Magic Grid - Creating a dynamic grid layout with Javascript
published: true
description: 
tags: javascript, frontend, showdev
---

[Magic Grid](https://github.com/e-oj/Magic-Grid) is a simple, lightweight Javascript library for creating dynamic grid layouts. Check out the library on [GitHub](https://github.com/e-oj/Magic-Grid) or read about its implementation on [Codeburst](https://codeburst.io/magic-grid-f8e2221e7cef).
Virtual DOM
Tags: react
Published: 2018-11-16 20:05:59

---
title: Virtual DOM
published: true
description: 
tags: react
---

So why is react fast. They are saying the magic is because of the virtual DOM. 

A virtual DOM is a programming concept by which the system stores a copy of the DOM in the memory. 

Whenever a change occurs to the VDOM, it's compared with the old VDOM and only those changes are committed to the actual DOM.

This is also called "diffing".

If we don't use React it takes a lot of time and APIs that the browser has to call to update the DOM. But with React it's easier to update the VDOM as it's a JS object. This object is optimized in such a way that it makes minimum calls to the browser DOM to update it.
The Wrong of Doing Right
Tags: programming, hacking, startup, entrepreneur
Published: 2018-11-16 19:54:51

---
title: The Wrong of Doing Right
published: true
description: Chasing after perfection is likely going to kill you and your project
tags: programming, hacking, startup, entrepreneur
---

> "If you're not embarrassed by the first version of your product, you’ve launched too late" -- Reid Hoffman

I like Reid Hoffman, not because he founded LinkedIn but because of his entrepreneurial mindset (and also his creative podcast Master of Scale).

I found myself fighting the urge to take the "right" route everyday building something. The temptation to take the extra miles just because I can is substantial. There are just too many things out there. Should I learn AI, deep learning, block chain, functional programming, or VR/AR? Should I build something that makes use of them?

We are drowning in the equivalent of the technological postmodernism, where the only principle is to not have one in the pursue of sexiness, hypablibilty, and the "right" way of the cooler kids.

![A House for Essex, UK, 2015, by FAT and Grayson Perry](https://static.dezeen.com/uploads/2018/01/house-for-essex-dezeen-hero-1704x959.jpg)

And that's so wrong because it does not differentiate us. If you can't do anything different, the chance of success is small. Also, doing things the right way will often disorient you, slow you down, and veer you off course because you don't have a principle in the first place.

So the best way to overcome the urge to do everything right is to keep focusing on the value proposition for the users and how to delight them and focus less on the journey. Last time, I did not get a middleware right and idiomatic, but hey I only needed one and so I wrote my own. My test run on EC2 was less than secure and I am still learning how to set up security groups, but heck it was a "test" run. I did not go for one of those containers to deploy, but why should I when I have very little to no customers to even worry about distribution and scaling. I do not have a single test in place yet, but the code is still constantly changing and unmaintainable at best (what if I had to rewrite everything?). Chances are my better self will be able to improve on them or better yet someone else who are much better and smarter will. 

Despite what everyone tells you, to be able to build something meaningful, sometime you need to stop thinking like an engineer and more like a hacker. The magic question I ask myself whenever I am tempted to take the longer path is "Who am I building this for?"
How do you use GitHub?
Tags: discuss, beginners
Published: 2018-11-16 18:48:16

---
title: How do you use GitHub?
published: true
description: Tell me how you use GitHub
tags: discuss, beginners
cover_image: http://blog.buildingengines.com/wp-content/uploads/2016/02/work-pileup_teaser.jpg
---

My GitHub profile is *full of crap*.  I've noticed this is not actually the case with a lot of profiles I snoop.

Am I doing it wrong?

I regularly use my home desktop computer, my crappy laptop, and my employer-assigned workstation to hack on the same code.  I use GitHub constantly - pretty much every scrap of code I write will end up there because it's convenient to not have to think about where the project is stored.  It's also nice to know I can pretty much fearlessly wipe my HD - my projects and dotfiles are safe and sound.

I also like the little bit of gamification - it's good motivation to keep my commit streak up because otherwise I'm stuck remembering how useless I was that one gray day for a *whole year*.  This habit leads to a pretty solid-looking commit grid, but a lot of the code is throwaway quality, or experiments that I wanted to continue at home after leaving work, projects I don't intend to finish, things like that.  It's definitely not all portfolio material.

A lot of folks seem to only put polished code up, code they'd want to show others or for which they are actively soliciting contributions.  

Where do you stand on publishing unpolished code?  Yes, I'm airing my dirty laundry to some extent, but it's not like I have any shame - and do people really go and sift through old crap on other people's
 profiles?  Does it reflect poorly on my habits?
Need help in understanding 'Why use REST'
Tags: rest, api, discuss, design
Published: 2018-11-16 18:44:56

---
title: Need help in understanding 'Why use REST'
published: true
description: 
tags: #rest , #api , #discuss , #design
---

I have been using RESTful services for quite a while (#what and #how of REST). I am looking for examples where the example might look like REST but it doesn't follow the core REST principles. Help me out please!.


[UPDATE] - The following video https://youtu.be/pspy1H6A3FM?t=1018 has been an eye opener, however its worth while to have a discussion.
Deploy a Dapp to Loom PlasmaChain | Tutorial Using Loom SDK & Truffle DappChain Example
Tags: ethereum, loomnetwork, plasmachain, loomsdk
Published: 2018-11-16 18:38:07

---
title: Deploy a Dapp to Loom PlasmaChain | Tutorial Using Loom SDK & Truffle DappChain Example
published: true
description: 
tags: Ethereum, Loom network, Plasma Chain, Loom sdk
---

https://youtu.be/1TVRfWQTxas
Front-End Web Dev
Tags: frontend, javascript, bootstrap, learning
Published: 2018-11-16 18:37:42

---
title: Front-End Web Dev
published: true
description: I've been doing web development with just HTML and CSS while using the Bootstrap framework. I'm looking for ways to improve on what I know.
tags: Front-End, JavaScript, Bootstrap, Learning
---

Hello, DEV community!

My name is Arthur and I'm currently a CompSci major at the University of Central Florida wanting to learn more about machine learning and its applications. But, there's a huge part of me that'll always want to work with design. I've been doing a lot of Web Development the past two years with mainly HTML and CSS; I feel like it's time for me to go one step further and finally implement the 'beast' of what is JavaScript (I've heard it's insane to work with it). I'm currently learning JS using Mozilla's MDN documentation but I don't feel like I have enough supplemental learning. I've bought courses on udemy but I tend to do a lot better when it comes to reading content. I was wondering if there are any resources you guys may have used to learned JS and what kind of learning method you used to get to where you are now in terms of expertise with the language.

This is my first time contributing to a community thread and it feels great to be able to have a resource like this around.

If you took your time to read this, thank you so much and have a fantastic day!
Test Clicks On Connected Components In Under 10 Lines of Code
Tags: testing, javascript, react
Published: 2020-01-22 12:19:48

---
title: Test Clicks On Connected Components In Under 10 Lines of Code
published: true
tags: testing,javascript,react
canonical_url: https://www.peanutbutterjavascript.com/how-to-test-async-redux-thunks/
---

Here’s a fairly benign component, that can give developers pause when its time to write unit tests for your components: 

```js
const ClickableButton = props => (
  <button onClick={props.doSomething}>Click Me!</button>
)
const mapDispatchToProps () => ({
  doSomething: dispatch(someFancyAction())
})
export default connect(
  null, 
  mapDispatchToProps,
)(ClickableButton)
```

There is the only thing worth testing here: That when we click the button, the function we passed in as a prop gets called. That prop function could be a complex chain of actions & API calls. You don’t want to stress about that, at least not in these tests.  But to do this, are we going to have to create a mock store and a provider component just because it’s connected? Ugh!

There has to be a better way. 

## You Can Remove The Redux Connection Entirely

While you want your component to be the default export, you can export the unconnected component, and just test that! Hat tip to Dave Ceddia for showing me a better way to [export a connected component](https://daveceddia.com/redux-connect-export/).  All you have to do is change one line:

```js
export const ClickableButton = props => (
```

As an additional trick, if you have any helper functions not attached to the component, you can export those as well for easy testing. 

## With Jest and Enzyme, The Rest is Easy

Inside our test, import the unconnected component. Then, you can create a [mock function using Jest](https://jestjs.io/docs/en/mock-functions), and [simulate the click using Enzyme](https://airbnb.io/enzyme/docs/api/ReactWrapper/simulate.html). Here’s what the test looks like all together:

```js
describe('<ClickableButton />', () => {
  it('calls the doThing prop when the button is clicked', () => {
    const props = { doSomething: jest.fn() }
    const wrapper = shallow(<ClickableButton {...props} />)
    wrapper.find("button").first().simulate("click")
    expect(props.doSomething).toHaveBeenCalled()
  })
})
```

The post [Test Clicks On Connected Components In Under 10 Lines of Code](https://glennstovall.com/test-connected-component-clicks/) appeared first on [Glenn Stovall](https://glennstovall.com).
An ASP.NET CORE Request - Response Logger Middleware
Tags: aspnet, middleware, logger
Published: 2018-11-16 17:02:03

---
title: "An ASP.NET CORE Request - Response Logger Middleware"
published: true
description: "An ASP.NET CORE Request - Response Logger Middleware"
tags: asp.net, middleware, logger
---
{% gist https://gist.github.com/McKabue/f661b15fe0c59ee29b2d4541d38de50f %}
Curated list for developers using Gatsby JS
Tags: gatsby, react, devtools, showdev
Published: 2018-11-16 16:47:50

---
title: Curated list for developers using Gatsby JS
published: true
description: I always had useful tools and libraries bookmarked. But somehow when I need them or recall them and try to find them its a daunting task. So I create a curated list where I save all my cool findings. 
tags: Gatsby, React, Dev Tools, showdev
---
![openik.com curated list of developer tools](https://thepracticaldev.s3.amazonaws.com/i/cy9280m6vpoyutz0ey0r.png)

I always had useful tools and libraries bookmarked. But somehow when I need them or recall them and try to find them its a daunting task. So I create a curated list where I save all my cool findings. 
    I built it using Gatsby JS which is a new cool static site generator. I store all my finding in YAML files with categories. And using Gatsby we can query the data using GraphQl inside a react component. You can find the website here at [openik.com](https://openik.com)
Addy Osmani's 18-Point Web Performance Checklist
Tags: webdev, webperf, javascript, bestofdev
Published: 2018-11-16 16:37:06

I was just perusing [Addy Osmani's Ask Me Anything](https://dev.to/addyosmani/im-addy-osmani-ask-me-anything-596c) from this summer. While the post is full of wisdom, this comment stands out as web dev gold:

{% devcomment 46n7 %}

Web performance is critical for user experience. Prioritize it before it becomes a problem. 

Happy coding ❤️
webdriverIO tips: element wrapped in a div is not clickable
Tags: javascript, webdev, testing, webdriverio
Published: 2018-11-16 15:49:10

---
title: webdriverIO tips: element wrapped in a div is not clickable
published: true
description: Have you run into an error saying "Element is not clickable at point" when you're trying to click a button? You might be seeing this if you have a spinner that appears on your buttons or its a customized button...
tags: javascript, webdev, testing, webdriverio
canonical_url: https://www.intricatecloud.io/2018/11/webdriverio-tips-element-wrapped-in-div-is-not-clickable/
---
Have you run into an error saying "Element is not clickable at point" when you're trying to click a button? You might be seeing this if you have a spinner that appears on your buttons or its a customized button (like a div as a button with inner styled elements). In these cases, you're kinda out of luck if you want selenium to be able to do it because it can't see the element that you want to click on. However... you can hack around it. While selenium isn't able to click the button obscured by another element, the browser can still do it and selenium can inject javascript to run inside the browser. Check out this example:

```
var runInBrowser = function(argument) { 
  argument.click();
};
var elementToClickOn = browser.$(selector)
> browser.execute(runInBrowser, elementToClickOn);
```

[.execute](http://webdriver.io/api/protocol/execute.html) to the rescue here. You can inject a snippet into the page, so as long as the browser can do it, you can get past the "Element is not clickable" error. This is a hack though and you should only use it sparingly when you need it, `$(element).click()` should still work the majority of the time. [Check out this Stack Overflow discussion here if you're in this situation](https://stackoverflow.com/questions/11908249/debugging-element-is-not-clickable-at-point-error)

---
Last week, I started working on integrating a test suite previously built using Nightwatch, and making it work with webdriverIO. While I love all of webdriverIO’s features like synchronous code when using their test runner and a REPL, there were a few things that I’d like to share which were a little hard to find in the docs or on a quick search.

In case you missed it... Each day this week, I've been posting one thing I've learned while setting up webdriverIO. Check out my previous posts here:

- [Using $$.(selector) vs browser.elements(selector)](https://www.intricatecloud.io/2018/11/webdriverio-tips-using-selector-vs-browser-elementsselector/)
- [Using browser.debug() to help debug your tests](https://www.intricatecloud.io/2018/11/webdriverio-tips-using-browser-debug-to-help-debug-your-tests/)
- [Get text from a list of items](https://www.intricatecloud.io/2018/11/webdriverio-tips-get-text-from-a-list-of-items/)
- [finding your errors when using waitUntil](https://www.intricatecloud.io/2018/11/webdriverio-tips-finding-your-errors-when-using-waituntil/)
Would you want to turn your unused phone into a hosting server?
Tags: discuss, iot, hosting, android
Published: 2018-11-16 15:44:16

---
title: Would you want to turn your unused phone into a hosting server?
published: true
description: Would you want to host websites from your unused phones?
tags: #discuss #IoT #hosting #android
---

With the renaissance in privacy & DIY solutions I wonder how many people would want to turn their old phones into a mini self-hosting platforms. I have been recently working on a prototype that:

* Can host static websites
* Cloud based load balancer where TLS termination happens on the phone to shield the server from the data going through it. 
* Due to cloud loadbalancer setup - no IP/firewall configuration is required and the phone can switch between 3G/4G/wifi without any need to reconfigure DNS settings
* TLS termination on the phone with Let's Encrypt support
* Easy to use web interface from your desktop browser (phone app is just an agent) 
* Can run JavaScript in a secure internal VM to enable some backend functionality
* Potential PHP support as well
What dev topic do you think you should understand, but don't?
Tags: career, beginners, discuss
Published: 2018-11-16 15:34:39

---
title: What dev topic do you think you should understand, but don't?
published: true
description: An all-too-common experience
tags: career, beginners, discuss
---

## Happy Friday, dev.to

Let's get introspective.

!["Too afraid to ask" meme](https://i.kym-cdn.com/photos/images/newsfeed/000/853/556/29e.gif)

We all know this situation: Someone is discussing a tech topic and, suddenly, *bam!*, they bring up monads or prototypical inheritance. Usually, we are just left there nodding along, hoping we get some time to Google that thing later. 

I'd like to know what dev-related topics you don't understand, but are too afraid to ask about. Maybe we can all learn something!

**NOTE: If you don't want to post them here, shoot me a [DM on Twitter](https://twitter.com/callmewuz)! I'll anonymize and post back here!**

I'll start this out! I don't understand the concept of monads. It's made worse by the fact that I feel like I _almost_ understand monads. Anyone want to try and tackle explaining them to me (or linking to somewhere that does), I would really appreciate it!

![happy tortoise, eating pancakes](https://media.giphy.com/media/3o7qDFqyTXbUKr8COs/giphy.gif)
Quick Tip. Don't use Fragment.setRetainInstance(true)!
Tags: android
Published: 2018-11-16 15:27:40

---
title: Quick Tip. Don't use Fragment.setRetainInstance(true)!
published: true
description: 
tags: android
---

I'm developing android app for few months.

TL;DR
just don't. don't use it. don't create zombie. let them die.

Long story.
I was making nice feed in android app, using fragments. And I thought if I rotate my phone my feed is recreating. That's bad. So I used setRetainInstance(true). And it solved this trouble for short period of time. But then it brings million others. Your fragment that survived rotation is attached to old activity which is dying slowly. (yeah, android is such a retarded in this way but nvm). And so when you try to do smth with it after some period it will die.
Also you can't run any of the method of this fragment from your activity. For example survivedFragment.doSomth() -  when you run this android will tell fragment that his context is dead and you can't reattach new activity to it. But even without running command, the dying activity will eventually die and your fragment will too.

So I come to conclusion that you shouldn't use setRetainInstance(true) on a fragment that has at least 1 view object.

Thanks, and shoutout to google: I hate android lifecycle. I think android lifecycle wasted some trillion of human life hours.
React so far
Tags: react
Published: 2018-11-16 13:35:29

---
title: React so far
published: true
description: 
tags: react
---

So this is what I have learnt so far. Correct me if I am wrong.

1. React is a UI library developed by Facebook. Meaning it's the V in the MVC.
2. It uses the concept of Virtual DOM which makes it extremely fast.
3. Everything in React is a component. Components are nothing but a portion of the 
   DOM.
4. There are props and states. While a prop cannot be changed, a state can be 
   changed at runtime.
5. There are different lifecycle events of a component - 7 exactly, which gives 
   more control to the programmer to manipulate the component rendering.
6. React is best for SPAs which is achieved by Router, Switch, Link etc 
   components.

I shall break down the points further soon.

In brief, it's good as it doesn't seem too difficult, but I have heard Redux is quite complicated. So fingers crossed.