teleren/devto huggingface dataset:
What Do You Think About the Virtual DOM?
Tags: discuss, javascript, react, webdev
Published: 2019-02-25 16:55:54

---
title: What Do You Think About the Virtual DOM?
published: true
description: A series of discussions about trending JS patterns. This week's topic is the Virtual DOM.
tags: discuss, javascript, react, webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/pjxtvpftfdg598t631a2.jpg
series: What Do You Think?
---

A few things are becoming de-facto solutions in JavaScript with a lot of tutorials but without much discussion about the practical benefits and reasons. The goal of this series is to talk about these topics.

The rules:

- Speak about the whys, not the hows. It's okay to include a few favorite libs and patterns but it should not be the main focus of your comment.

- No Googling! I am interested in **Your** opinion, experience, anecdotes, and gut feelings.

- Your comment might get linked or quoted in the weekly summary if you are not asking otherwise. I never quote comments in a negative context.

---

### This week's topic is the **Virtual DOM**

- Do you prefer cross-platform vDOM implementations or Progressive Web Apps? Are these two substitute or complementary?

- Do you prefer JSX and CSS-in-JS or the old-school HTML way?

- Did you ever have issues with the extra abstraction layer of a vDOM? I am curious about situations where you wanted to do something - that you could do with vanilla DOM - but was blocked by the vDOM layer.

- Do you feel like vDOM based frameworks are faster? Can you mention a case where you experienced speed differences?

- Whatever pops into your mind about the Virtual DOM.

*All comments are welcomed, there is no wrong answer!*
Help Me Learn Design Skills!
Tags: requestforpost
Published: 2019-02-25 16:43:31

---
title: Help Me Learn Design Skills!
published: true
description: Help Me Learn Design Skills!
tags: requestforpost
---

I am typically a mobile/static web developer, and I fully admit that I am not a designer. If you give me a mockup, I can pretty well create a website or Android app to match, but ask me to make the mockup and I don't even know where to start. But I _want_ to be able to do design, even at just a basic level. 

Does anyone have any good resources for learning design? I'm wanting to learn Figma, but I've never used these kinds of design tools and I don't even really know what the different buttons do and how to actually use them, so some tutorials on design tools, in general, would be great. And then, of course, articles on the fundamentals of design.

Specifically, my main goal is to create a new landing page for [Orchid](https://orchid.netlify.com/) and revamp its documentation theme, so resources more focused on responsive web and landing pages are appreciated. Thanks!
Python Community Interview With Ali Spittel
Tags: python, interview, learningtocode, teaching
Published: 2019-02-25 15:20:54

---
title: Python Community Interview With Ali Spittel
published: true
description: Ali Spittel is a Pythonista with a passion for CSS art and teaching Python. Join me as we talk about her non-traditional path to learning to code, teaching at a Bootcamp, and her recent move to one of the most positive developer communities around
tags: python, interview, learning to code, teaching 
---

Happy Monday, all!

I recently had the enormous pleasure of interviewing Dev.to's very own **Ali Spittel** for my regular *Python Community Interview* series on [RealPython.com](https://realpython.com). 

{% user aspittel %}

Join me as we talk about her love for CSS art, her non-traditional path to learning to code, teaching at a Bootcamp, and her transition from Dev.to user to a Dev.to team member.

Happy reading, 

[(click the here/image for the interview)
![Community Interview](https://files.realpython.com/media/A-Community-Interview_Beige_Watermarked.736393a80080.jpg)](https://realpython.com/interview-ali-spittel/)


P.S. You can check out the rest of my Python Community Interviews [here](https://realpython.com/tutorials/community/).
FeathersJS Emitting
Tags: feathersjs, node, socketio, javascript
Published: 2019-02-26 21:16:33

---
title: FeathersJS Emitting
published: true
tags: feathersjs,nodejs,socketio,javascript
canonical_url: 
---

![](https://cdn-images-1.medium.com/max/1024/1*GcntRQ8wvI-AUugDj8kRUw.jpeg)<figcaption>Photo by <a href="https://unsplash.com/photos/faUzKz3TvpM?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">rawpixel</a> on <a href="https://unsplash.com/search/photos/publish?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption>

FeathersJS makes it really easy to write realtime web API’s. I want to talk about how you can emit data from your hooks. I had an application which had two services groups and group-access , a user could only fetch items from groups if they had a record in the group-access collection.

But what this meant was when a user was granted access via the group-access service they would have to reload the page in order to re-fetch groups to reflect the new access.

{% gist https://gist.github.com/Mattchewone/467eaca2190fbcc3fce743889be1b1c4 %}

The above snippet is for an [after create hook](https://docs.feathersjs.com/api/hooks.html#registering-hooks), this would be for the group-access service. When a new group-access record is created this hook will run and will load the group via a get, so we can emit this record. We then emit on the groups service and use the created event name. We clone the context and add some additional params so that we can use these within the groups publish function.

> Be sure to update the path so that it will emit using that path / service name.

{% gist https://gist.github.com/Mattchewone/c3ae7b57b6b928a982dcd29f02bbdccd %}

In the above publish snippet, we are only going to publish realtime data if we have come from an internal emit, we can verify this by checking the property we added to the context in the emit call. In a real app you would probably be emitting based on some other checks.

What this will do is filter all the channels to only that of context.userId which was passed in by the custom emit. It will send that data to the channel.

If you are using something like can-connect-feathers or feathers-vuex when a realtime created event happens the created item will be added to the list of groups and should be displayed automagically.

This should be done the same for the removed event, so when a groups-access record is deleted, as such revoking the user access. We can emit a removed event, which if configured the client will be listening for, thus removing the record from the list.

Thanks for reading.

If you noticed anything incorrect or that could be improved please comment below. I appreciate all constructive feedback.

[![](https://cdn-images-1.medium.com/max/673/1*nkyFXd8M6S3KXTNtFsCylQ.gif)](https://monzo.me/matthewjohnchaffe/2.50)
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2019-02-25 15:01:03

---
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/sfwcvweirpf2qka2lg2b.png
---
Every Monday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️

#1. Making Regex Less Scary

Cheat sheets are great and all but when they're for regular expressions, they're gold. ✨


{% link https://dev.to/emmawedekind/regex-cheat-sheet-2j2a %}

#2. "I was working on 4 apps at once..."

John created an extension that helps visually differentiate VS Code instances. Awesome tool for all you multitaskers out there. 

{% link https://dev.to/john_papa/peacock---late-night-coding-ftw-3pk0 %}

#3. Parametric, Ad-hoc, Subtype, Row...

Jan shares an overview of various types of polymorphism -- from the commonly used to the less commonly used. They also compare how each type looks in object-oriented or functional languages.

{% link https://dev.to/jvanbruegge/what-the-heck-is-polymorphism-nmh %}

#4. Just Regular Code

Miloslav shares their approach and considerations for scalability. The TLDR is to choose the right tools!

{% link https://dev.to/uyouthe/scalable-architecture-without-magic-and-how-to-build-it-if-youre-not-google-336a %}

#5. Be Less Vulnerable

Ian shares the benefits of type systems, from making your app less vulnerable during runtime to developer experience. 

{% link https://dev.to/iwilsonq/how-a-type-system-improves-your-javascript-code-2jpk %}

#6. Who knows git?

Born out of a hackathon, Nic built a git simulator that visualizes the internal tree model. This has potential to be a super helpful training tool for git!

{% link https://dev.to/nichartley/git-gud-at-git-5d9k %}

#7. `electron-vue`

Thomas demonstrates how simple it is to create an application with `electron-vue`!

{% link https://dev.to/thomas_ph35/how-i-built-a-desktop-app-with-vue-in-minutes-1005 %}

_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!_
How to fix MethodError - undefined method `real_path` with CocoaPods
Tags: cocoapods, xcode, ruby, xcconfig
Published: 2019-02-25 14:58:32

---
title: How to fix MethodError - undefined method `real_path` with CocoaPods
published: true
description: 
tags: cocoapods, xcode, ruby, xcconfig
---

![abc](https://user-images.githubusercontent.com/2284279/53346190-d3622880-3916-11e9-9028-ad0a6a37b277.jpg)

I'm using cocoapods 1.6.0.beta.2 in a React Native apps and it has been working fine. The pods that I need is `Firebase` and `FacebookSDK`. Today after pod install, I got error

```
NoMethodError - undefined method `real_path' for nil:NilClass
```
I then tried running `pod deintegrate` to start from scratch, but that command fails as well.

My next try is with `cocoapods 1.6.0` and `cocoapods 1.6.1` but the problem still persists.

`undefined method` in Ruby means that we are calling a method on an object that is nil. I like to track down problems via reading code, but this error is very vague.

Looking thorough at the log, I see CocoaPods has done fetching dependencies, but fails at the integration step, so it must be something wrong with my project file.

Then I trace back commits to `project.pbxproj` to see if there's anything wrong. It turns out that there was a commit that accidentally removes `Pods-MyApp Staging.release.xcconfig` from project. That also comes with removal of

```
baseConfigurationReference = B7FC69316CC27F11022F8A82 /* Pods-MyApp Staging.release.xcconfig */;
```
## CocoaPods uses xcconfig
As you know, CocoaPods uses `xcconfig` files to declare pod related information like `FRAMEWORK_SEARCH_PATHS`, `OTHER_LDFLAGS` and other variables like

```
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
PODS_ROOT = ${SRCROOT}/Pods
```
And for a normal `pod install`, CocoaPods adds some `xcconfig` files to your project, and the path is `Pods/Target Support Files/Pods-DeepDiffDemo`. There will always be `debug.xcconfig` and `release.xcconfig` for each of your project target.

<img alt="xcconfig" width="1678" src="https://user-images.githubusercontent.com/2284279/53345363-0dcac600-3915-11e9-975f-e6a7207912d0.png">

If your project MyApp has a production target called `MyApp Production` and `MyApp Staging`, then you should have these files

```
Pods-MyApp Staging.debug.xcconfig
Pods-MyApp Staging.release.xcconfig
Pods-MyApp Production.debug.xcconfig
Pods-MyApp Production.release.xcconfig
```
These are added to projects but not checked to any targets. Just like plist, you don't need to add xcconfig files to target.

If you go to project Info page, you will see that these xcconfig files are selected

<img alt="project" width="824" src="https://user-images.githubusercontent.com/2284279/53345592-93e70c80-3915-11e9-9826-3d1b9f30b900.png">

## Missing xcconfig
In my case, `Pods-MyApp Staging.release.xcconfig` was somehow missing from project, hence all pod commands fail.

The fix is to re-add that file and select that xcconfig in project Info page

Original post https://github.com/onmyway133/blog/issues/170
New writer, who dis?
Tags: introduction
Published: 2019-02-25 14:09:33

---
title: New writer, who dis?
published: true
description: Just an introduction post.
tags: introduction
---

Hi everyone!
​
First post on this website after lurking for over a year. I have been thinking about blogging for a while, but struggled to find the right platform for it that combined a good community with a simple interface. Dev.to seems perfect for that (Also, it has Markdown. Suck it, Medium 😛).
​
Also been inspired by Marek's article about the benefits of writing more. It's a great read. {%link https://dev.to/marek/three-arguments-for-why-you-should-write-more-1no6 %}

I intend to write about topics that I like to talk about, including clean coding practices, language design, and software architecture. I'm generally a very chatty person and can talk about these for hours on end. 😁
​
I'm beginning to use https://writingstreak.io/ to help me keep a semi-regular writing schedule. Let's see how well that goes. Cheers! 🎉
Are login forms that ask for your username and password on two different pages more secure?
Tags: discuss, security
Published: 2019-02-25 12:18:31

---
title: Are login forms that ask for your username and password on two different pages more secure?
published: true
description: 
tags: discuss, security
cover_image: https://thepracticaldev.s3.amazonaws.com/i/csdq8k99ezknio0zcqaj.jpg
---

It’s becoming more and more common: instead of a login form where you fill your e-mail or username and your password, you first have to fill your username and submit the form a first time for the password field to appear on the second page (which is often loaded via Ajax, but the fact that the URL doesn’t change doesn’t make the problem disappear).

There is no need to discuss the fact that it’s annoying, but it seems that companies choose to do so because they believe it’s more secure. Is it really? And if so, why?

(Cover image by [Del](https://www.flickr.com/photos/delsblog/).)
Side Project - my not so 'side' project
Tags: product, sideprojects, launch
Published: 2019-02-25 12:09:12

---
title: "Side Project - my not so 'side' project"
published: true
description: "Side Project is a website to find everything you need to build and launch your next Side Project"
tags: product, sideproject, launch
cononical_url: https://kushagragour.in/blog/side-project-app/
---

*Originally posted on [kushagragour.in](https://kushagragour.in/blog/side-project-app/)*

Hello all!

A few months back I left my job to go full-time as an Independent Product Maker. And today I am here to present my latest product: 

[**Side Project**](https://sideproject.app)

[![Side Project banner](https://thepracticaldev.s3.amazonaws.com/i/9iirrn0oocjt1xlarj5w.png)](https://sideproject.app)


"Side Project" aims to be a one-stop website to get new ideas for your side projects and resources to build it whether you want to choose a frontend framework, payment processor and what not. On top of that you also get a continuosly improving [Launch Checklist](https://sideproject.app/checklist) with important things to take care of while launching.

It doesn't stop there, this is also my first paid product. Besides all the free things mentioned above, you can also buy a Side Project pack which allows you to fork the Launch checklist separately for your individual side projects. Plus, you can completely customize the checklist to suit your project. You can get **5 Side Projects for just $3**! And to celebrate the launch you can get a **50% discount using the coupon "launch"**. So what are you waiting for? [Try it now](https://sideproject.app/login).

With this product I have experimented with a lot of stuff like Serverless functions, Netlify, Eleventy, Preact, Gumroad, payments, security, Accessibility, Product design and lots of other things. I'll probably write separate posts on that. It was fun build this mini product. If you have questions on how it was built or the tech behind it, feel free to comment or [ask on twitter](https://twitter.com/chinchang457).

Oh and Side Project is on [ProductHunt today](https://www.producthunt.com/posts/side-project), if you want to show some love there :)
Prism and Some Thoughts On Regex
Tags: compilertheory
Published: 2019-02-25 11:01:42

---
title: Prism and Some Thoughts On Regex
published: true
description: regex or parser?
tags: compilertheory
cover_image: https://images.unsplash.com/photo-1520467795206-62e33627e6ce?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60
---

i was browsing the site of [prism.js](https://prismjs.com/faq.html#isnt-it-bad-to-do-syntax-highlighting-with-regular-expressions) when i saw this:

> Parsers fail on incorrect syntax, where regular expressions keep matching.

the author was explaining one of the decisions taken namely to use regular expressions. but, the statement above is flawed for two points

- Parsers fail on incorrect syntax
- regex have no link to parsers

## Do Parsers Fail On Incorrect Syntax?

that one is an easy one. can't we write parsers that keep going? this point is cleared by the second one

## Are Regex Different From Parsers?

regex are just another way to describe patterns be it large pieces of string like a language or just a simple piece of string like finding an email address in a paragraph.

books on compiler theory sometimes use regex instead of BNF to describe elements. looking from another angle, how does regex work, is it some native language to the computer? no, a parser has been written to understand regex and accomplish the underlying matching.

## Conclusion

natural language parsing offers some interesting reflections from time to time. here is a case of the author trying to say: 'it works, let it be'
Iterative development - the secret to great product launches
Tags: minimumviableproduct, mvp, iterativedevelopment
Published: 2019-02-25 09:36:47

---
title: Iterative development - the secret to great product launches
published: true
description: Elon Musk’s SpaceX is leading in a new space race. His secret to success may well be an innovative approach borrowed straight from software development. Here’s what you should know about iterativ.
tags: Minimum Viable Product, MVP, Iterative development
cover_image: https://www.mindk.com/blog/wp-content/uploads/2019/02/spacex-101796-unsplash-720x460.jpg
canonical_url: https://www.mindk.com/blog/iterative-development/
---
When Elon Musk founded SpaceX with a dream to colonize Mars, few believed that in ten years the company would disrupt the whole industry. His approach to building rockets is called iterative development (and it can help you make better software).

Instead of developing a huge (and expensive) spaceship that could take humans to the Red Planet, he chose to build a smaller rocket and iterate on the design.

Falcon 1 became the company’s Minimum Viable Product (MVP). Its first launch ended in a disaster – the rocket blew up over the launch site on Omelek Island.

Following two more failures, Falcon 1 finally became the first privately-built rocket to deliver payload into the orbit.

The lessons learned from early failures were used to develop Falcon 9, which in turn became a part of Falcon Heavy. Its maiden launch was a tremendous success with two side boosters landing simultaneously at Kennedy Space Center and Musk’s personal Tesla Roadster flying off into the orbit.

All of this would’ve been impossible without iterative development.
 
[Continue reading...](https://www.mindk.com/blog/iterative-development/)
LambdaTest + Trello Integration - One Click Bug Logging
Tags: testing, webdev, showdev, tutorial
Published: 2019-02-25 09:05:52

---
title: LambdaTest + Trello Integration - One Click Bug Logging
published: true
description: Now, with a single click, you can create tasks in Trello directly from LambdaTest.
tags: #testing #webdev #showdev #tutorial 
---

Now, with a single click, you can create tasks in Trello directly from LambdaTest. 

You can choose details like Trello project, assignee, summary etc. and create tasks directly in your desired project. In addition, LambdaTest will automatically include testing environment information tasks as well as add testing screenshots and videos as attachments.

Kick start your testing now: https://goo.gl/uejyYK

Sign Up for free now and get
+ 100 Minutes of Free Automated Cross Browser Testing With Selenium Grid.
+ Access to 2000+ different cloud browsers
+ 60 Minutes of Free Live Interactive testing per month
+ 10 Responsive Testing (Test a page across 19 devices with a single click)
+ 10 Screenshot Testing (Take instant screenshots across 2000+ browsers)
+ Smart Testing
+ Auto Shot Testing
+ 3rd Party Integrations.

Learn more about LambdaTest and Trello integration here - https://goo.gl/kmEauF

[![](https://www.lambdatest.com/blog/wp-content/uploads/2018/11/Adword-Cyber2.jpg)](https://goo.gl/uejyYK)
Different ways to word count in apache spark
Tags: spark, bigdata, java, wordcount
Published: 2019-02-25 08:41:39

---
title: Different ways to word count in apache spark
published: true
description: 
tags: spark,bigdata,java,wordcount
---


#### Hi Big Data Devs,

When it comes to provide an example for a big-data framework, WordCount program is like a hello world programme.The main reason it gives a snapshot of Map-shuffle-reduce for the beginners.Here I am providing different ways to achieve it

## ReduceByKey (Transformation)

_Return type is same as input RDD type_

---

```
JavaRDD<String> file = sc.textFile("/<Path_To_File>/README.md");

JavaRDD<String> words = file
.flatMap(f -> Arrays.asList(f.split(" ")).iterator())
.filter(f -> !f.isEmpty());

// grouping words with number 1
JavaPairRDD<String,Integer> wordMap_to_pair = words
.mapToPair(f -> new Tuple2<String,Integer>(f,1) );

//ReduceBykey,will merge at partition level and sends result to driver
JavaPairRDD<String,Integer> reducebyKey = wordMap_to_pair.reduceByKey((a,b) -> a+b);

System.out.println(reducebyKey.collect());
```

## foldByKey (Transformation)

---

It is similar to reeducebykey but takes the zeroValue.The user does not need to specify a combiner

```

JavaPairRDD<String, Integer> Foldbykey = wordMap_to_pair.foldByKey(0, ((acc, val) -> acc+val));

System.out.println(Foldbykey.collect());
 
```


## aggregateByKey (Transformation)

---

_Return type need not be same as input RDD type_
_parameters_

**initalValue** @primitive types. `0` in Addition and subtraction , `1` in multiplication /division , `[]` on list ,`""` on string<br>
**SequenceFunction** @operates within partition level ,<br>
**CombinerFunction** @operates across partition level<br>
 

```
JavaPairRDD<String,Integer> aggreagteBykey = wordMap_to_pair.aggregateByKey(
0 // initial value
, ( (a,v) -> a+v ) //seq,counting operation within partition
, ( (a,v) -> a+v )); // merge, counting operation across partition

System.out.println( aggreagteBykey.collect());

```

## CombineByKey (Transformation)

---

The user can specify a combiner function and customize combining behavior unlike aggregate and fold bykeys.

_Return type need not be same as input RDD type_

_parameters_

**createCombiner** @A function accepts current values and returns new value

**mergeValue** @merge/combine values within partition level

**mergeCombiners** @merge/combine values across partition level

```

wordMap_to_pair.combineByKey(
i -> i, //createCombiner
(a,v) -> (a+v) //mergeValue
,(a,b) -> a+b) //mergeCombiners
.collect()
.forEach(System.out::println);

```

## groupByKey (Transformation)

---

Returns a Tuple of key and collection of values.performs hash join across partitions

```

JavaPairRDD<String,Iterable<Integer>> groupByKey = wordMap_to_pair.groupByKey();

groupByKey
.mapValues( v -> Iterables.size(v)) // [1,1,1,1] -> [4]
.collect()
.forEach(System.out:println);
```
---