teleren/devto huggingface dataset:
10 Most-Popular Developer Posts in 2018
Tags: frontend, backend, programming, coding
Published: 2018-12-17 20:27:35

---
title: 10 Most-Popular Developer Posts in 2018
published: true
description: Auth0 10 most-popular developer posts in 2018 ranging from front-end development to open source contributions.
tags: #frontend #backend #programming #coding
canonical_url: https://auth0.com/blog/10-most-popular-developer-posts-in-2018/
---

Time flies when you are having fun. It's December already and we are getting ready to wrap up this year. 2018 was a prolific year for the Auth0 blog: we published more than 200 posts (😱) where we tackled a diverse amount of topics: frontend and backend technologies, data breaches, GDPR, Cybersecurity, Company Culture, and of course, Identity.

We believe looking back is key to look ahead. That is why this week, we are going to take a look back at the best and most impactful posts we have published in 2018.

[Read on 🎉](https://auth0.com/blog/10-most-popular-developer-posts-in-2018/?utm_source=dev&utm_medium=sc&utm_campaign=eoy2018_dev)

![10 Most-Popular Developer Posts in 2018](https://thepracticaldev.s3.amazonaws.com/i/2creibbf60dxzomoc76b.png)
A month of Flutter: configure Firebase Auth for Sign in with Google on iOS
Tags: flutter, authentication, ios, tutorial
Published: 2018-12-17 20:25:16

_Originally published on [bendyworks.com](https://bendyworks.com/blog/a-month-of-flutter-configure-sign-in-with-google-ios)._

Yesterday I configured Sign in with Google on [Android](https://bendyworks.com/blog/a-month-of-flutter-configure-sign-in-with-google-android). Today is more of the same but in iOS land.

From the `app` directory I ran `open ios/Runner.xcworkspace` to open the iOS project in Xcode. Then in Xcode I selected ["Runner" under "Project navigator"](https://codelabs.developers.google.com/codelabs/flutter-firebase/index.html#6) in the left sidebar followed by "Runner" under "Targets" in the main content area. Here I set "Bundle identifier" to `app.birb`.

![update Bundle identifier in Xcode](https://thepracticaldev.s3.amazonaws.com/i/2q0oqhz5e7qrpj69xxw1.png)

Using the development [Firebase project](https://firebase.google.com/) from yesterday, I added a new iOS app using the same bundle ID.

![add iOS app to Firebase project](https://thepracticaldev.s3.amazonaws.com/i/qaow9smxq9ck8ex5azvw.png)

Firebase then prompted me to download a `GoogleService-Info.plist` file.

![download iOS config file](https://thepracticaldev.s3.amazonaws.com/i/rtba20pse8vuyvrefow9.png)

Once downloaded, I dragged the plist file into the Xcode "project navigation" sidebar within the "Runner" directory next to `Info.plist`. By dragging it into Xcode, it gets registered for inclusion during builds. There isn't any sensitive information in the file but for an open source project it will need to be different for every developer so I'm adding it to `.gitignore`.

![drag plist into Xcode](https://thepracticaldev.s3.amazonaws.com/i/2q0oqhz5e7qrpj69xxw1.png)

I then skipped step three "add Firebase SDK" and step four "add initialization code".

There is one [important change](https://pub.dartlang.org/packages/google_sign_in#ios-integration) to `ios/Runner/Info.plist`: configuring a `CFBundleURLSchemes`. The value can be copied from the `GoogleServiceInfo.plist` file. I would like to not hard code this but I currently don't have a better alternative.

~~~xml
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <!-- Copied from GoogleServices-Info.plist key REVERSED_CLIENT_ID -->
      <string>com.googleusercontent.apps.483795507272-cavro2su6d78ldumt6003lo2krdrb2dd</string>
    </array>
  </dict>
</array>
~~~

Starting the app should give Firebase the all set signal.

![adding Android app to Firebase project](https://thepracticaldev.s3.amazonaws.com/i/c04mqs2kzgcm3026bp3k.png)

And the Sign in with Google button still doesn't do anything but maybe tomorrow it really will.

## Code changes

- [#47 Configure Firebase Auth iOS](https://github.com/abraham/birb/pull/47)
Minimum Elm Component with Percel and WebComponents
Tags: elm
Published: 2018-12-17 19:19:40

---
title: Minimum Elm Component with Percel and WebComponents
published: true
description: 
tags: elm
---

```
yarn add parcel-bundle node-elm-compiler -D
```

directories

```
elements/
  foo.js
  Foo.elm
run.js
index.html # import run.js
package.json
```

## Write elm-foo component

```elm
-- elements/Foo.elm
import Html exposing (div, text)
main = div [] [text "foo"]
```

```js
// elements/foo.js
import { Elm } from "./Foo.elm";

customElements.define(
  "elm-foo",
  class extends HTMLElement {
    connectedCallback() {
      Elm.Main.init({ node: this });
    }
  }
);
```

## Run

Mount this elm-foo element.

```js
// run.js
import "./elements/foo";
document.body.innerHTML = '<elm-foo></elm-foo>'
```
HTTP library for Android
Tags: android, http, java
Published: 2018-12-17 18:36:10

---
title: HTTP library for Android
published: true
description: 
tags: Android, http, Java
---

Hello fellow Developers,

I have developed a small Android library for handling HTTP POST and GET requests. Anyone who is looking for an easy way to perform HTTP calls, can use this library. It supports post requests with JSON and Multipart Form data, file uploading and Get request with URL parameters.

Hope it will help you guys.

https://github.com/shubhadeepb14/Android-HTTPLib
What Rails or JS programming problem(s) do you wish you could watch someone work out?
Tags: discuss, learning, rails, javascript
Published: 2018-12-17 18:14:20

---
title: What Rails or JS programming problem(s) do you wish you could watch someone work out?
published: true
description: We're considering producing a free web-series where we resolve issues and add features to real-world Rails and JavaScript applications. What kind of problems would you find most useful to see illustrated by a couple of Rails and JavaScript veterans?
tags: discuss, learning, rails, js
---

Hello Friends!

In 2019, we're shifting our focus away from client work and towards accessible programming education. 

We're in a lucky position where we have some real-world, open-or-near-open source production applications that are giving us a lot of nuanced problems to work through. And we're thinking "Why not take the time to package some of that up into something that's useful for people that aren't us?"

If you could ask two people with ~30-ish combined years of experience writing production web applications to walk you through step-by-step how to solve a particular problem in video form what would it be?

Would it be adding a feature to an existing code base over a few hours? Diagnosing and resolving performance issues? Performing a hairy, multi-step refactor?

Maybe something completely different we'd never thought of? Whatever it is, we'd love to hear about it so we can figure out a way to show how we would approach the problem together. Also, if you want you can vote in [an informal twitter poll](https://twitter.com/zspencer/status/1074724243235950592), in which we regret not providing an option for CodeyMcCodeFace.

Zee & Betsy
The value of unit or integration testing
Tags: testing, beginners
Published: 2018-12-17 17:08:01

![Where are the tests?](https://thepracticaldev.s3.amazonaws.com/i/hspbbk87c3w9bxgp6fnj.jpg)

Comic by CommitStrip: http://www.commitstrip.com/en/2017/02/08/where-are-the-tests/

**TL;DR**: Try to write unit/integration tests, at least, for you core processes. Your future self will thank you.

---

A few days ago I had to refactor two processes in a stock system: sales and purchases. Both have, at least, one step in common: they query a list of products filtering by a list of IDs. Both use the same data except that sales uses the `sale_price` (aliased as `unit_price`) and purchases uses the `unit_price`. Both manage a "unit price", one as the unit price for sale, and another for purhcase.

The sales process was written by me and the purchases process was written by a teammate, so, even when they have that step in common, both processes did in different ways. It's OK and normal. We didn't knew what they'll have in common until we wrote the code.

Those processes are _extremely_ important and sensitive because they are the core of the system AND manage money. Because of that, we decided to add unit and integration tests for each constraint they have.

Because of that decision, _even_ when my teammate, who isn't used to write tests, didn't wanted to "waste" time written them, today I could refactor both processes and prevented a dangerous bug to emerge:

While refactoring that common step in one method, I decided to query every attribute required by the sales and purchases processes, which means that now both will have accessible the `sale_price` and `unit_price` props. But I didn't remembered that inside the sales process, the total attribute was being calculated using the old `sale_price` alias: `unit_price`. With the change, everything still worked fine, but the total, instead of multipliying the `sale_price` for the amount of products, was using the _real_ `unit_price`.

Only because the snapshot tests warned me about a diff, I could catch the error. Only because we decided to add tests to our processes, instead of letting the user catch us for us, with everything that means.

I hope this experience will motivate you to write tests!

Thank you for reading!
The Best Remote Work is Delightfully Unglamorous
Tags: career, productivity, remotework
Published: 2018-12-17 18:14:10

This came across my Twitter feed today:

{% tweet 1074722960768929792 %}

Brianne is right to celebrate how awesome this situation is. If you have to be working, you might as well be doing so in a fabulous environment. From everything I personally know about her, she is living her best life here, and that's great.

But to me, this is not the ideal to shoot for in remote work. I'm currently working from my home office. My boring home office.

What is awesome about my setup is that everything is plugged in, and all my A/V works well and I have the same setup every day. The awesome part is that I don't commute and can really be as productive as I want to be. Remote work "from anywhere" is just hard to get right.

I have been able to dramatically optimize for the 95% of the time I get to be sitting at the same desk with the same peripherals all hooked up.

More on this "optimize for the 95%" here:

{% link https://dev.to/nickjj/optimize-your-programming-decisions-for-the-95-not-the-5-2n42 %}

The 5% of the time I find myself away from this setup and still fully in work mode is a rather unideal scenario. It can be pleasant, but I try hard to make it a planned-for exception these days.

There are _a lot_ of great posts about specific advice of getting set up remote:

{% link https://dev.to/ivancrneto/what-i-have-learned-from-eight-years-of-being-a-remote-developer-3eob %}

{% link https://dev.to/peteranglea/6-months-of-working-remotely-taught-me-a-thing-orten %}

A lot of them tend to touch on equipment and setup. Other advice typically revolves around communication and teamwork. Either way, it doesn't come easy and the consistent, optimized home setup seems key to me.

We have digital nomads in the community, and it's fascinating to see how they organize themselves:

{% link https://dev.to/vickylai/knapsack-problem-algorithms-for-my-real-life-carry-on-knapsack-33jj %}

If you want to go this route, your 95% optimization is going to be a whole different approach. I'd advise against going half-way to this lifestyle if you want to get good work done.

Here is a good post on the important task of creating a great developer experience for yourself:

{% link https://dev.to/theoutlander/how-to-improve-your-development-experience-ldl %}

Words matter. We _are a distributed team_, as opposed to _having remote workers_. It's an identity for the whole team, even those who work from the office we keep in Brooklyn.

It's a great way to work, and it's pleasantly mundane. Happy coding.
Wreck it Ralph 2 Virus Popup
Tags: javascript, animation, css
Published: 2018-12-17 17:58:58

---
title: Wreck it Ralph 2 Virus Popup
published: true
description: Recreate the scene when Ralph is duplicating on the screen.
tags: 
- javascript
- animation
- css
---

## I just watched Ralph Breaks the Internet 😍
and I absolutely love the scene where Ralph is popping everywhere on the screen.


## Ralph in CSS
Because it's late and we need Ralph in CSS so I stole the amazing CSS pixel art by [Jason Delia](https://codepen.io/jasonadelia) using box-shadow. We need to play with box-shadow again.

{% codepen https://codepen.io/toomuchome/pen/RERXgw %}

[WRECK-IT-RALPH DEMO](https://linxea.github.io/wreck-it-ralph)

## Simple Popup Animation

Hide the original Ralph so the first Ralph is always at random position.
``` html
<div id="ralph"></div>
```

Duplicate Ralph using `cloneNode` and put it in `body`.
``` javascript
const body = document.getElementsByTagName("body")[0];
const ralph = document.getElementById("ralph");

function duplicateRalphAtRandomPosition() {
	const ralphClone = ralph.cloneNode(true);
	ralphClone.style.display = "block";
	ralphClone.style.top = getRandomPercentage();
	ralphClone.style.left = getRandomPercentage();
	ralphClone.style.transform = `scale(${getRandomSize()})`;
	body.appendChild(ralphClone);
}
```

Place cloned Ralph in random position with random size.
``` javascript
// Return 0% to 100%
function getRandomPercentage() {
	return Math.random() * 101 + "%";
}

// Return 0.3 - 1
function getRandomSize() {
	return Math.random() * 0.8 + 0.3;
}

```

Keep doing it every second until the Internet breaks using `setInterval`
``` javascript
// Duplicate Ralph every second yo
setInterval(function() {
	duplicateRalphAtRandomPosition();
}, 1000);
```
NEW TUTORIAL: Develop your 1st blockchain program in GoLang
Tags: webdev, programming, blockchain, go
Published: 2018-12-17 17:53:23

---
title: NEW TUTORIAL: Develop your 1st blockchain program in GoLang
published: true
description: You may have experience writing web applications in Go but would you know how to write a decentralized app?
tags: webdev,programming,blockchain,go
---

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

A weekend full of Go programming!

What a crazy weekend. Just got my first tattoo on Thursday and then spent the whole weekend working on a new tutorial for you Gophers!

UPDATE:

I converted the tutorial to a coaching class. You can apply at: https://web3.coach
[DopeTales] String operation slowdown in Source Generator Streams
Tags: cpp, compiler
Published: 2018-12-17 17:36:37

---
title: [DopeTales] String operation slowdown in Source Generator Streams 
published: true
description: 
tags: Cpp,Compiler
---
Compilers tends to manipulate readable strings way to much than any other software. Source generators written  decade ago and six months back dont really have than much difference. Here is attempt to improve that.

Source Generators tend to build strings by concatenating strings. Usual go to solution for this problem is Attempt 1 

#### Attempt 1

```cpp
std::string oBuffer;
oBuffer.append("ContextPrefix");
oBuffer.append("_");
oBuffer.append(pClassName.c_str());
Stream<<oBuffer.c_str();
```
This solution creates different string in memory, results in memory allocations,resizing etc. moreover tend to slow down whole software stack.
Concatenating string with "+" operator does no good either.

#### Attempt 2

```cpp
StringBuffer  sBuffer;
sBuffer.append("ContextPrefix");
sBuffer.append("_");
sBuffer.append(pClassName.c_str());
Stream<<sBuffer.c_str();
```

This solution was inspired by Java/CSharp followup and sadly help from Stackoverflow. While Cpp does not support this, writing own implementation of StringBuffer give much more flexibility of optimizing whole operation. Still we will end up separate buffer. 

#### Attempt 3

```cpp
typedef std::pair<const char *,const char *> PrefixString;
inline std::ostream& operator<< (std::ostream& pOut,PrefixString& pPair){
	pOut<<pPair.first<<"_"<<pPair.second;
	return pOut;
}
/*Using PrefixString in Source Generator code */
void SourceWriter::ClassBegin(const char * pQualifiedName){
	PrefixString oStr =  std::make_pair(Constants::ContextPrefix,pQualifiedName);
	mOut <<	oStr;
}
```

Third attempt is made considering fact that strings are always present in objects.
We need not have separate buffer to create output string. In example shown above, 
PrefixString is pair which is just placeholder for char string pointers. It can directly write Prefix String without any intermediate buffer. moreover operator << is inlined. Most of runtime decisions are moved to compile time. and Hence faster alternative.

Hope this helps.
#1
Tags: codenewbie
Published: 2018-12-17 16:37:20

---
title: #1
published: true
description: Initiation
tags: #codenewbie
---



<body>
    <h1>Hello, world of code!</h1>
    <p>As a coding beginner, you are an intimidating acquaintance to have.</p>
    <p>I have created my first website called Efiko for the CodeFirst: Girls course, alongside two lovely code newbies. While the final product hasn't been as good as we hoped, it's been a learning experience in terms of what to expect from you.</p>
    <p>I am now starting my personal website, alongside some side projects showcasing my skills and interests. Hoping to create some interesting social campaigns regarding domestic abuse, education, social class and more.</p>
    <p>Speak soon,</p>
    <p>Teodora</p>
</body>
What is Hacking?
Tags: whatishacking
Published: 2018-12-17 15:48:26

---
title: What is Hacking?
published: true
description: Please note that the information given in this document is given only for educational and entertainment purposes. Every effort has been made to provide accurate, up-to-date and more confident information in these posts.
tags: What is Hacking?
---

Hacking is a term that is mostly associated with malicious and Illegal activities. It may be that you have heard a lot about it in the news and social media that someone’s e-mail account has been hacked, or the bank’s website has been stolen and many information stolen.

All this is entirely possible because we are in a world where everyone uses the Internet, no information is private.

Hacking is not illegal in itself if it is done with good intentions. For example, to help a company, its system or network can check the security, hacking is not illegal.

Neatness in hacking matters a lot. If there is no reason to harm anyone or anyone’s property, hacking is not illegal.

A person who hacks with bad intentions and causes serious harm, he is known as a cracker and he is not a hacker, therefore, hacking and cracking are very different.

In simple language, if someone hacks into the network to point out the flaws in the system, then it is called hacking.

Even if a person breaks the system without permission, even then it is not considered invalid, because the main purpose behind this hacking is to point out security flaws so that they can be fixed.

A cracker is a person who enters the system to steal or cause a loss. This is done with bad intentions, and in most cases, crackers leave malware in the system and create problems and steal information.

Read more :) https://www.oxipress.com/everything-about-hacking/
Bokeh effect, Reaction card, Hover directory & more | Module Monday 23
Tags: showdev, opensource, webdev, javascript
Published: 2018-12-17 15:46:05

---
title: Bokeh effect, Reaction card, Hover directory & more | Module Monday 23
published: true
description: Module Monday 23
tags: showdev, opensource, webdev, javascript
cover_image: https://res.cloudinary.com/component/image/upload/b_rgb:ffffff,c_lpad,h_350,w_800/v1544816110/bokeh_nt7cqf.gif
canonical_url: https://guide.anymod.com/module-monday/23.html
---

## Open-source mods for your next project

All of these modules are open source and free to use on any website, web app, or anywhere else. [Anymod](https://anymod.com) has hundreds more.

Click a mod to see it along with its source code.

### Bokeh effect modal
A festive overlay with blurred bokeh dots in the background.

<a class="btn btn-sm" href="https://anymod.com/mod/llbmrk?v=40">View mod</a>

<a href="https://anymod.com/mod/llbmrk?v=40">
  <img src="https://res.cloudinary.com/component/image/upload/v1544816110/bokeh_nt7cqf.gif"/>
</a>

### Reaction card
Hover to highlight and click to visit.

<a class="btn btn-sm" href="https://anymod.com/mod/badbbl?v=40">View mod</a>

<a href="https://anymod.com/mod/badbbl?v=40">
  <img src="https://res.cloudinary.com/component/image/upload/v1544900424/reaction-card_f5uref.gif"/>
</a>

### Split dropdown
Classic bootstrap button with link or dropdown.

<a class="btn btn-sm" href="https://anymod.com/mod/emkko?v=34&h1=35&h2=50">View mod</a>

<a href="https://anymod.com/mod/emkko?v=34&h1=35&h2=50">
  <img src="https://res.cloudinary.com/component/image/upload/v1539276131/dd-2_gnhmgw.png"/>
</a>

### Team directory
Browse & contact your team members.

<a class="btn btn-sm" href="https://anymod.com/mod/orlook?v=20">View mod</a>

<a href="https://anymod.com/mod/orlook?v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1544903423/directory_75_nkpe3z.gif"/>
</a>

### Pinterest profile embed
Add a profile & follow button anywhere.

<a class="btn btn-sm" href="https://anymod.com/mod/badom?v=20">View mod</a>

<a href="https://anymod.com/mod/badom?v=20">
  <img src="https://res.cloudinary.com/component/image/upload/v1495120032/yi36gjlo1yuesg2xcbjs.png"/>
</a>

<hr>

I post new mods [here](https://dev.to/tyrw) every (Module) Monday -- I hope you find them useful!

Happy coding ✌️
Everything about Hacking
Tags: hacking, hacker
Published: 2018-12-17 15:46:04

---
title: Everything about Hacking
published: true
description: Please note that the information given in this article is given only for educational and entertainment purposes. Every effort has been made to provide accurate, up-to-date and more confident information in these posts.
tags: Hacking, Hacker
---
Basic information has been given about hacking in this article. Regarding the world of hacking, people have many misconceptions and ideas, and now you are going to learn something about them.

Hacking is a very complex activity, for which many skills and knowledge are required. This guide will give you a basic idea about what is hacking and how it can be done.

There is no such information in this age of the internet that is now private, hanking can be useful. It is illegal in some cases but it depends on the way it is used.

Hacking can only be beneficial when you can use it to make the world better. Whatever you do with the information provided in this guide, its final choice is completely up to you.

Different types of hacking are possible. If someone has the required knowledge, he can easily hack someone’s laptop or mobile phone.

If you want to satisfy your thirst for knowledge in connection with hacking, then this is the right song for you.

Read more :)
1. What is Hacking?
2. Types of Hacking
3. Types of Hackers
4. Tools Required For Hacking
 All above topics are here :) https://www.oxipress.com/everything-about-hacking/