teleren/devto huggingface dataset:
The Complete Guide To Angular Load Time Optimization
Tags: angular, javascript, typescript
Published: 2019-08-10 10:47:01

In the past, I have written a lot about performance tuning Angular apps. Now it is time to dive into one of the big and important topics: optimizing Angular load time performance.

Recently, I helped a big e-commerce site with optimizing their load time, as every ms of waiting time decreases conversions. This forced me to really understand how the browser works when loading websites and in the process I developed a systematic approach to making your Angular application as fast as possible.

Read the post here:
https://christianlydemann.com/the-complete-guide-to-angular-load-time-optimization/
"Bringing Peace to the Galaxy" (Zeev Suraski on PHP internals)
Tags: php
Published: 2019-08-10 10:30:46

---
title: "Bringing Peace to the Galaxy" (Zeev Suraski on PHP internals)
published: true
description: 
tags: PHP
---

Really interesting post on the PHP internals mailing list:

### https://externals.io/message/106453

The post was followed up by this FAQ:

### https://wiki.php.net/pplusplus/faq

This discussion is painfully over due, and I'm just thrilled to see it finally taking place! :-)
PWAs for beginners
Tags: pwa, javascript, webdev
Published: 2019-08-10 10:29:39

---
title: PWAs for beginners
published: true
description: What exactly is a PWA for beginners? 
tags: pwa, JavaScript, web development 
---

I was discussing with my step brother a few days ago (he is taking a course on Web development) and I told him about PWAs and much to my surprise he said he hadn't heard much of it neither did he really understand it. A few weeks earlier, I was also discussing with two of my classmates from the university who were also getting into web development and they also didn't really understand what it was. So here's my attempt to explain it. 

What exactly are PWAs?

PWA is an acronym for Progressive Web Applications. They are Web applications that behave like mobile applications- they can be used offline and can be installed on mobile devices like mobile apps. They're making waves because; 
a) they are cheaper to build than mobile applications, and 
b) they are cross platform-- they can run wherever the browser runs. So, if I, an online store owner, wants my users to have a mobile experience, I don't have to build a mobile application. I can have the same web application running as a mobile application on mobile devices. That saves cost and time. Granted, you wouldn't have all the access to the device native features but support for that is growing, besides it's not like an online store needs access to lots of native features.

How do PWAs achieve this?

They use what is known as Service Workers. In simple terms, service workers decide what to fetch for the browser when a url is visited. Service workers intercept the request and check if they already have a copy of the response for that request. If they don't, they fetch the page, cache it for future use, and serve it to the browser. If they do, they send the browser the cached response. Behind the scenes, they also check if the copy of the response they have is the same as what is on the server and will let the browser know if it is not. It is up to the developer to listen for this event and decide the best way to let the user know. Most people use a snack bar. 

So if you visit a url for the first time, the service worker will fetch the page, cache it, and send the page to the browser. Next time, you request the same page, it will not try to fetch it from the server, it will serve you the local copy. This means that with or without Internet, you can still access the page because the beautiful things have it cached.

For further reading, I found this <a href="https://redfin.engineering/service-workers-break-the-browsers-refresh-button-by-default-here-s-why-56f9417694?">article</a> really helpful.
How to keep all moving parts insightful?
Tags: discuss
Published: 2019-08-10 09:14:53

---
title: How to keep all moving parts insightful?
published: true
tags: discuss
---

Hey you,

How do you keep all the moving parts of the applications you work on easy for newcomers to join? How much documentation do you use (if any), or do you draw diagrams?  

![Guilty Gears](https://thepracticaldev.s3.amazonaws.com/i/552mj2frbjohmteigpqn.jpg)
<figcaption>Maybe a gear diagram?</figcaption>

As your applications scale up and evolve, how do you keep track of its components in such a way that doesn't require too much brain power to remember how it all ties together?

What did and/or did not work for you? Please share your story. 😊
Get OTP secrets out of Authy and into 1password
Tags: javascript
Published: 2019-08-09 14:47:24

For a while now I have been trying to figure out how to pull my "secrets" out of Authy (a one time code generator) and import them into 1password.

After a bit of Google-ing I found a post from Guillaume Boudreau that got me 99 percent of the way there.

https://gist.github.com/gboudreau/94bb0c11a6209c82418d01a59d958c93

After following his instructions and executing the javascript code, I noticed that the "period" is hard coded to 10 seconds, and won't work for standard Google Auth codes, just for Authy specific codes.

After stepping through the code, it became clear that I could modify the period to generate the proper 6 digit codes.

I was about to write some conditional logic and noticed that John Chadwick / Yulian Kuncheff in the comments came to the same conclusion so I stole their snipped and dumped it into the sourced posted by Guillaume.

I executed the js and ran some tests and its working great.
The Noob CMS: What we will create in this series?
Tags: tutorial, beginners
Published: 2019-08-10 08:04:11

Good Going Guys, you have successfully setup your environment. Now let's move on.

**Tools and Environment**

The purpose of setting up different environments with the same tools (VsCode, MySQL Workbench, phpMyAdmin, MariaDB, Nginx) is to show that operating systems should not be taken as the great walls of china. All operating systems are viable to produce the same output regardless of its pros and cons, therefore the idea should be used to hinder hurdles to stop you from becoming a full stack developer. The same tools are used irrespective of the environment as we move on. This would clearly set a basis on how the same things can be achieved using different methods.

**The Technology**

Now before my discussion based on [PHP vs NodeJs](https://dev.to/th3n00bc0d3r/php-vs-node-3oa), i was going to skip PHP, but now as the debate has flunk into two political parties, one PHP and second NodeJS, I have included PHP 7 in it. First we will be covering PHP 7 and producing a product and then we will replicate the same product on NodeJS and Angular. To my understanding as PHP is almost a decade old, therefore a little more refined in the context that programming concepts are easy to understand on PHP, maybe because that is the first thing your exposed to or perhaps the concepts made on PHP are further translated into slightly advanced concepts in NodeJS and Angular, irrespective we will produce the same product in both technologies. Now for plain stakes, i will be using MariaDB as the database, which is nothing but a more tweaked version of MySQL, so dont worry. 

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

**Project Overview (The NOOB CMS)**

The Noob CMS will be an open source project where a user will able to register using an email, name and a password. The password will be encrypted using MD5 Encryption so to make it secure. The user will have basic profile as about us and will be able to upload his own display picture. The user will be able to create categories and categories with the same name will not be able to be created. These categories will act as sections in which, the user will be able to write news articles. The user will be able to delete and edit these articles. These articles will be available under the user profile and on a common wall, where other users will be able to comment and share those articles.

**Optional Considerations**

These considerations will be optional based on how well I am able to communicate things over the viewers, therefore a feedback from the viewers is required. Some features that we might cover in the end would be Live Chat and Private Messages. A portion we might consider would be collecting analytical data and storing it into the database for other viewing purposes. 

Expected Output: A Working Web, An Android APP, An IOS App

I will be waiting for some feedback exclusively before we start, so don't keep me waiting.

[Noob Index](https://dev.to/th3n00bc0d3r/noob-guides-index-4mne)
In_array alternative for Golang. Searching value in 'map, array, slice'.
Tags: go, array, search, map
Published: 2019-08-10 07:34:07

Hi, I started golang nowadays. I moved from PHP to Golang and I can say that Golang is too beautiful. 
I didn't know there's not search function exists until I decided to write a package.
Basically in PHP, we might be implement our 'in_array' alternative like this;
```
if (is_array($x)) {
   foreach ($x as $v) {
      if ($v == $searchVal) { return true; }
   }
}
```
Of course, This alternative can be used non-multidimensional.
In Golang, we cannot decide type of variable easily. There's a package called 'Reflect'. 
Reflect package is not used only getting the type of any variable. Its documentation is [here](golang.org/pkg/reflect/).

If we understand what we gonna do then we can do!
Let's write the func prototype;

```
func In_array(search interface{}, array interface{}) bool
```

No body want to restrict the search value's type because we want to search any type, any time. Because of that, I used 'interface{}'.
As same as search, incoming value(which is array) must be interface{} too.

```
import (
	"reflect"
)

func In_array(search interface{}, array interface{}) bool {

	val := reflect.ValueOf(array)
	val = val.Convert(val.Type())

	typ := reflect.TypeOf(array).Kind()

	switch typ {
	case reflect.Map:
		s := val.MapRange()

		for s.Next() {
			s.Value().Convert(s.Value().Type())
			for i := 0; i < s.Value().Len(); i++ {
				if deep {
					if reflect.DeepEqual(search, s.Value().Index(i).Interface()) {
						return true
					}
				} else {
					str := s.Value().Index(i).String()
					if strings.Contains(str, search.(string)) {
						return true
					}
				}
			}
		}
	case reflect.Slice, reflect.Array:
		for i := 0; i < val.Len(); i++ {
			if reflect.DeepEqual(search, val.Index(i).Interface()) {
				return true
			}
		}
	}

	return false
}
```

We're detecting type of value with this line of code;
```
reflect.TypeOf(array).Kind()
```
This code, prepare 'reflect' package's constants they might be;
```
Map,
Array,
Slice,
String,
....
```

We should iterate the Value by MapRange() if Value is Map
(don't forget, we're not doing recursive stuff. This is just a idea)
Then we're looping current index's value and checking if given search value is equal to map's value.
It's same as nested loops.

I used the DeepEqual() because, 
Docs:`
DeepEqual reports whether x and y are “deeply equal,” defined as follows. Two values of identical type are deeply equal if one of the following cases applies. Values of distinct types are never deeply equal.
`

And BUM! This is simple and efficient. We can test it with this;

```
rules := map[string][]string{
	"name":    {"must-be-string", "min-len-20"},
	"surname": {"must-be-string", "min-len-15"},
}
in_array("must-be-string", rules) // true
```

There're some changes made because of deep and logical problems. I updated the code so you can use it with ease. 

Here's the source code, 
{% github ashkan90/golang-in_array %}
Fast, Cheap, Global React Apps w/ Serverless Framework
Tags: react, serverless, aws, javascript
Published: 2019-08-10 07:30:42

I put together a video tutorial on deploying fast, cheap and global React applications on Amazon Web Services via Serverless Framework Components.

{% youtube ts26BVuX3j0 %}

Enjoy!

Infra used behind the scenes: 

* AWS Cloudfront
* AWS S3
* AWS Route53
* AWS Certificate Manager
.com vs .net – What’s the Difference Between Domain Extensions
Tags: domain
Published: 2019-08-10 06:32:20

.com and .net are one of the most popular domain name extensions on the internet. But, which one is right for your website? You might know that choosing a perfect domain name is very important for your website or business as it can help you to build your brand and improve search traffic. In this article, we will share the difference between .com vs .net domain extensions and which one is better for your website.

What is a Domain Extension?

A domain extension is the last part of a domain name, the letters that come after the dot (.) sign of any domain name. For example, the .com is a domain extension of the domain wpmyweb.com.

There are different types of domain extensions available which were created to differentiate different kinds of websites. 

Here are the most well-known domain extensions you see most often:

.com (commercial) – This is the most popular domain extension that is specially designed for commercial businesses (Apple.com)
.net (network) – .net is an excellent alternative to .com domain extension which was intended to be used for networking websites (Speedtest.net)
.org (organization) – This domain extension is mostly used for nonprofit organizations (Wikipedia.org)
.gov (government) – Unlike other domain extensions, the .gov extension is restricted for public use, this means only government organizations are permitted to use it (ca.gov)
.edu (education) – This domain extension is used for academic organizations and schools (mit.edu)

Difference Between .Com and .Net Domain Extensions

.com and .net both are the most popular domain name extensions.

The .Com domain name is primarily used for commercial businesses, including E-commerce websites, personal blogs, portfolios, etc.

On the other hand, the .Net domain extension represents “Network,” which was first created for the use of networking websites such as internet service providers, tech websites, email and database service providers.

However, nowadays, many businesses use both .com and .net extensions to make sure nobody else can use their company name domain. 

Read the whole post at https://www.wpmyweb.com/beginners-guide/com-vs-net.html
Designing Continuous Build Systems: Handling Webhooks with Sanic
Tags: python, github, ci, continuousdelivery
Published: 2019-08-13 23:51:41

---
title: Designing Continuous Build Systems: Handling Webhooks with Sanic
published: true
tags: python, github, ci, continuousdelivery
canonical_url: https://tryexceptpass.org/article/continuous-builds-webhooks/
cover_image: https://tryexceptpass.org/images/continuous-builds-webhooks.webp
---

After covering how to [design a build pipeline](https://dev.to/tryexceptpass/designing-continuous-build-systems-6d9) and [define build directives](https://dev.to/tryexceptpass/designing-continuous-build-systems-parsing-the-specification-2b83) in the continuous builds series, it’s time to look at handling events from a code repository.

As internet standards evolved over the years, the HTTP protocol has become more prevalent. It’s easier to route, simpler to implement and even more reliable. This ubiquity makes it easier for applications that traverse or live on the public internet to communicate with each other. As a result of this, the idea of webhooks came to be as an “event-over-http” mechanism.

With GitHub as the repository management platform, we have the advantage of using their webhook system to communicate user actions over the internet and into our build pipeline.

[Read On ...](https://tryexceptpass.org/article/continuous-builds-webhooks/)
Prompting users for input
Tags: python
Published: 2019-08-10 03:46:00

Getting user input is an important part of any kind of application. Since we've already learned about [options](https://wangonya.com/blog/click-commands-options/), adding a user prompt to our hello world app should be a breeze. All we need to do is add `prompt=True` to the option decorator, so that it prompts the user for input if no option is passed in.

```python
# helloworld.py

import click

@click.command()
@click.option('-c', '--case',
              type=click.Choice(['upper', 'lower']),
              prompt=True)
@click.argument('person', default='you')
def hello(case, person):
    response = "Hello World! Also, hey {} ☺️".format(person)
    if case == 'upper':
        click.echo(response.upper())
    elif case == 'lower':
        click.echo(response.lower())
    else:
        click.echo(response)
```

Save and run the app:

```bash
(venv) $ hello
Case (upper, lower): upper
HELLO WORLD! ALSO, HEY YOU ☺️

(venv) $ hello sally
Case (upper, lower): lower
hello world! also, hey sally ☺️
```

You may also set a custom prompt string if you wish:

```python
# helloworld.py

import click

@click.command()
@click.option('-c', '--case',
              type=click.Choice(['upper', 'lower']),
              prompt='Please enter case')
@click.argument('person', default='you')
def hello(case, person):
    response = "Hello World! Also, hey {} ☺️".format(person)
    if case == 'upper':
        click.echo(response.upper())
    elif case == 'lower':
        click.echo(response.lower())
    else:
        click.echo(response)
```

The set string will now be displayed instead of the default prompt:

```bash
(venv) $ hello
Please enter case (upper, lower): upper
HELLO WORLD! ALSO, HEY YOU ☺️
```
Around the Web – 20190809
Tags: blog
Published: 2019-08-20 20:15:02

---
title: Around the Web – 20190809
published: true
tags: Blog
canonical_url: https://wipdeveloper.com/around-the-web-20190809/
cover_image: https://wipdeveloper.com/wp-content/uploads/2017/07/WIPDeveloper.com-logo-black-with-white-background.png
series: Around the Web
---

And now for somethings to read (or watch) over the weekend, if you have some spare time that is.

## [Touch It with Different Permissions](https://www.gooddaysirpodcast.com/225)

**Good Day, Sir! Show**  – Jeremy Ross – In this episode, we discuss Don Robin’s and Chuck Liddell’s LWC course on PluralSight, Dreamforce 2019 Registration, Illuminated Cloud’s debug analyzer, Guidewire hiring Michael Rosenbaum away from Salesforce, documenting and designing solutions…

## [Salesforce Summaries – Top 10 Things to Know About Salesforce DX](https://www.salesforceben.com/salesforce-summaries-top-10-things-to-know-about-salesforce-dx/)

**Salesforce Ben**  – Andy Hitchings – Jul 14, 6:08 AM – SalesforceSummaries: a series delivering key insights from Salesforce YouTube videos, to save you time as you keep up to date with the latest technological changes within the Salesforce ecosystem. Salesforce DX was released during Winter ’18 and…

## [Documentation – your secret weapon](https://www.anup.io/2019/08/05/documentation-your-secret-weapon/)

**anup.io**  – Aug 5, 1:50 PM – If there is one crime that the Agile manifesto has committed it must be the act of declaring documentation an inferior activity in the software development process. When you work on a software project, someone (usually your teammate) will…

## [Design Principles for Developers: Processes and CSS Tips for Better Web Design](https://css-tricks.com/design-principles-for-developers-processes-and-css-tips-for-better-web-design/)

**CSS-Tricks**  – Aug 8, 7:25 AM – Easily manage projects with monday.com It is technically true that anyone can cook. But there’s a difference between actually knowing how to prepare a delicious meal and hoping for the best as you throw a few ingredients in a pot. Just like web…

## [FuseIT SFDC Explorer 3.12.19175.1 – Summer ’19](http://www.fishofprey.com/2019/06/fuseit-sfdc-explorer-312191751-summer-19.html)

**FishOfPrey.com**  – FishOfPrey – Jun 24 – Another roundup of some of the changes to the FuseIT SFDC Explorer since the 3.11.19071.3 release. One of the primary reasons to use the Partner API in an application is that it is org agnostic. It doesn’t really care which org you are connecting…

## Till Next Week

Want to share something? Let me know by leaving a comment below or emailing [brett@wipdeveloper.com](mailto:brett@wipdeveloper.com)  or following and tell me on [Twitter/BrettMN](https://twitter.com/BrettMN).

Don’t forget to sign up for **[The Weekly Stand-Up!](https://wipdeveloper.com/newsletter/)** to receive free the [WIPDeveloper.com](https://wipdeveloper.com/) weekly newsletter every Sunday

The post [Around the Web – 20190809](https://wipdeveloper.com/around-the-web-20190809/) appeared first on [WIPDeveloper.com](https://wipdeveloper.com).
Emoji picker written with React
Tags: showdev, react, javascript
Published: 2019-08-10 03:02:26

No, this isn't the side project I [posted about earlier](https://dev.to/joeattardi/tips-to-promote-side-projects-4i9k). 😄

This may not be super useful since most OSes have an emoji picker of some kind, but it was a fun learning project while learning what's new in React since I last played with it.

You can see the site here: [https://emojipicker.app](https://emojipicker.app)

If you're curious, the code is all on GitHub: [https://github.com/joeattardi/emoji-picker](https://github.com/joeattardi/emoji-picker)

I actually also extracted the notifications used in the app into a separate library, [React Snackbar Alert](https://joeattardi.github.io/react-snackbar-alert/). Yes, *this* is the side project I posted about earlier!
Why I Started Something
Tags: computerscience, codenewbie, showdev
Published: 2019-08-10 01:27:13

---
description: Not everyone gets lucky. Some of us don't even have the chance to try, and that is why I started `level.codes`.
---

My name is Eric Adamski. I am the founder of https://level.codes and I would like to tell you why I started it. When I was finishing high school and applying to higher educational institutions, I found myself lost in the number of potentially life altering options that confronted me. So without thinking I randomly selected five different programs to attend. The one I ended up accepting was a degree called Computer Science. At the time I had no idea what was involved in Computer Science. It was probably the end of my first year when I actually wrote a working program that I feel in love with it. After I had graduated I realized that it was luck that I stumbled upon Computer Science, and not everyone has that chance.

Not everyone gets lucky. Some of us don't even have the chance to try, and that is why I started `level.codes`. I want to provide opportunity for people to get into a career that they find fulfilling. I want to allow others the same opportunity I had to find my path, my dream job, my life's passion.

Programming has given me the ability to live my life the way __I__ want. `level.codes` __will__ provide countless other with that exact same ability. We will stand behind you every step of the way. Encouraging you, pushing you to do your very best. We will help you find the freedom and happiness you deserve from your career and we'll do it together.

---

This was meant to be an extremely short post, a brief about why I am starting `level.codes`. I would love the opportunity to share _how_ we plan on helping. If anyone wants to talk you can call me through the working section of our site https://level.codes/call or email me eric.adamski@level.codes! (We can talk about anything, not just the things mentioned in this post! I am here to listen.👂🏻)

https://level.codes has only been available to the world for 2 weeks and is still a massive work in progress. Just in that time I have had the pleasure of talking with over 20 of the most wonderful people from all around the world! I am looking forward to getting involved with more people and transforming some careers!

This is also my first post on dev.to! 👏 (Yes, I am clapping for myself 😂)

I hope you enjoyed this short read. I know that writing is not one of my strong suits yet, so any feedback would be greatly appreciated! Either in the discussion below or anonymously here: https://grow-me.level.codes/f/1568671745588