teleren/devto huggingface dataset:
Live Release v4.0.0.RC.3 - 2019-11-16
Tags: hangout, community, hoa, phalcon4
Published: 2019-11-15 22:27:58

---
title: Live Release v4.0.0.RC.3 - 2019-11-16
published: true
date: 2019-11-15 20:12:38 UTC
tags: hangout,community,hoa,phalcon4
canonical_url: 
---

Time for a Live Release! Join us tomorrow 2019-11-16 at 12:00 EST (16:00 UTC) for the live release of Phalcon **v4.0.0.RC3** 

Serghei and Nikos will release the latest iteration of Phalcon v4, give a quick update and take questions. The event will be live streamed on YouTube:

[https://youtu.be/iAGWIW9A4Mc](https://youtu.be/iAGWIW9A4Mc)

Looking forward to seeing you there!!

* * *

Don’t forget to star our project on [GitHub](https://phalcon.io/github) and follow us on our social media:

Chat - Q&A

- [Discord Chat](https://phalcon.io/discord)
- [Forum](https://phalcon.link/forum)

Support

- [OpenCollective - Support Us](https://phalcon.io/fund)
- [Store - Merchandise](https://phalcon.io/store)

Social Media

- [Telegram](https://phalcon.io/telegram)
- [Gab](https://phalcon.io/gab)
- [MeWe](https://phalcon.io/mewe)
- [Parler](https://phalcon.io/parler)
- [Reddit](https://phalcon.io/reddit)
- [Facebook](https://phalcon.io/fb)
- [Twitter](https://phalcon.io/t)

Videos

- [BitChute](https://phalcon.io/bitchute)
- [LBRY](https://phalcon.io/lbry)
- [YouTube](https://phalcon.io/youtube)

![](https://assets.phalcon.io/phalcon/images/emoji/heart.png) Phalcon Team
Restore Tmux Sessions After Reboot
Tags: tmux, session, reboot, alias
Published: 2020-02-19 15:37:02

---
title: Restore Tmux Sessions After Reboot
published: true
date: 2019-11-16 00:00:00 UTC
tags: tmux, session, reboot, alias
canonical_url: https://tech.serhatteker.com/post/2019-11/restore-tmux-after-reboot/
---

OK, we see how we save and restore our sessions in `tmux`. Look at this  article: [Restore Tmux Sessions](https://dev.to/serhatteker/restore-tmux-sessions-573a)

But after rebooting the system how can we start the saved sessions? Here what I was doing before:

* To restore sessions after reboot I run:

  ```bash
  $ tmux new-session
  ```

* Then I hit `prefix + ctrl-r`

  This restores all of my sessions and windows, but it also leaves me with the
  "extra" session that was created with `new-session`.

* I kill this new session. This drops me out of `tmux` and back to the default
    terminal. Then I have to run:

  ```bash
  $ tmux attach
  ```

Now I'm finally in my restored session without the "extra new-session".

You see it is a real pain. For every reboot. For. Every. Reboot.

For lazy developers like us, there is always a "one-line" or "one-click" or "one command" solution. Thanks for github there were some alternatives and found mine: [github solution].

```bash
alias mux='pgrep -vxq tmux && tmux new -d -s delete-me && tmux run-shell ~/.tmux/plugins/tmux-resurrect/scripts/restore.sh && tmux kill-session -t delete-me && tmux attach || tmux attach'
```

I had to tweak this code a little bit since `-q` flag throws an error. Also I
made it more readable.

```bash
alias mux='pgrep -vx tmux > /dev/null && \
		tmux new -d -s delete-me && \
		tmux run-shell ~/.tmux/plugins/tmux-resurrect/scripts/restore.sh && \
		tmux kill-session -t delete-me && \
		tmux attach || tmux attach'

```

OK, now it is a "one command" solution.

[whole-ref-url]: https://tech.serhatteker.com/post/2019-11/restore-tmux/
[github solution]: https://github.com/tmux-plugins/tmux-resurrect/issues/139#issuecomment-464392088
How To Test React Hooks Using Jest And React Testing Library
Tags: react, jest
Published: 2019-11-15 23:49:52

---
title: How To Test React Hooks Using Jest And React Testing Library
published: true
description: I made a video showing how to test your custom hooks using react-testing-library
tags: react, jest
---

{% youtube qRw3qKRBW4M %}

I made a video showing how to test your custom hooks using react-testing-library

[Code for this tutorial](https://github.com/satansdeer/test-hooks)
EQ and the Red Queen Effect
Tags: inclusion, career, eq, leadership
Published: 2019-11-15 23:29:06

In our childhood science classes, we learned about dinosaurs. 

Pictures of giant beasts looking like reptiles were depicted as the inhabitants of the Earth hundreds of millions of years ago.

Many teachers also used this story to introduce the concept of evolution. The idea that, over time, all creatures, including humans, change and adapt for survival.

What’s fascinating about the concept of evolution is the instinctual nature of how we understand its power.

Fight or flight. Eat or be eaten.

The emotions tied to these instincts is what we need to be tapped into. Our efforts to develop deeper emotional intelligence are the next evolutionary step in our development as a species.

One way to understand why this is so important is something called the Red Queen Effect.

## What is the Red Queen Effect?

The Red Queen Effect is [a mental model](https://fs.blog/2012/10/the-red-queen-effect/).

It is best understood through the eyes of Lewis Carroll and his novel Alice in Wonderland and its sequel Through the Looking Glass.

Alice is running as fast as she can with the Red Queen to keep up with wherever she is going.

Interestingly, she has noticed that although they are running, their surroundings (trees, bushes, etc.) are not changing. From the book:

>    ‘Why, I do believe we’ve been under this tree the whole time! Everything’s just as it was!’
    ‘Of course it is,’ said the Queen, ‘what would you have it?’
    ‘Well, in our country,’ said Alice, still panting a little, ‘you’d generally get to somewhere else — if you ran very fast for a long time, as we’ve been doing.’
    ‘A slow sort of country!’ said the Queen. ‘Now, here, you see, it takes all the running you can do, to keep in the same place.
    If you want to get somewhere else, you must run at least twice as fast as that!’

The parable is essentially explaining a sobering reality:

- In order to keep up with what is happening in the world, we must continue to change. If we slow down or stop, we will fall behind. 

We need to evolve at the same rate as the systems we interact with everyday. This is often referred to as working smarter, not harder.

## Sticky Frog Tongues and Slippery Fly Bodies

Another simpler, ecological example of the Red Queen Effect is the evolution of frogs and flies.

[Continue reading at eqfordevs.com](https://eqfordevs.substack.com/p/eq-and-the-red-queen-effect)
Optional Chaining in JavaScript Right Now!
Tags: javascript, optionalchaining, proxies, hacks
Published: 2019-11-15 23:03:33

---
title: Optional Chaining in JavaScript Right Now!
published: true
description: You can achieve Optional Chaining in JS today using Proxies!
tags: javascript, optional-chaining, proxies, hacks
---

In case you don't know what [Optional Chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) is, it's the ability to safely access properties of a variable without a reference error.

```js
var obj = undefined
obj?.foo // Returns undefined without throwing an error
```

This is an experimental JavaScript feature proposal, however, we can use a form of this feature today with the help of the a Proxy object! 

Let's define a function which will return a special Proxy object which will prevent references on undefined values allowing us to safely query for properties.

```js
function safe(value){
    return new Proxy({}, {
        get: (_, prop) => {
            if (prop === 'unsafe')
                return value
            else if (value && typeof value[prop] !== 'undefined')
                return safe(value[prop])
            else
                return safe(undefined)
        }
    })
}
```

Now we can use this function as an alternative to the Optional Chaining Operator like so:

```js
var obj1 = undefined
var obj2 = {foo:23}

console.log(safe(obj1).foo.unsafe) // Returns undefined without throwing an error
console.log(safe(obj2).foo.unsafe) // Returns 23
console.log(safe(obj2).foo.bar.baz.unsafe) // Returns undefined
```

There is a con to this approach in that `unsafe` becomes a reserved property within the chain. Though, we can implement a second parameter to the safe function to take care of this edge case:

```js
function safe(value, unsafe = 'unsafe'){
    return new Proxy({}, {
        get: (_, prop) => {
            if (prop === unsafe)
                return value
            else if (value && typeof value[prop] !== 'undefined')
                return safe(value[prop])
            else
                return safe(undefined)
        }
    })
}
```

That's all for now. Let me know in the comments what you think of this pattern.

I've open sourced this idea as an NPM package: [safeunsafe](https://www.npmjs.com/package/safeunsafe)

Cheers!
Day 35 : That Day
Tags: hiphop, code, coding, lifelongdev
Published: 2019-11-15 22:55:28

_liner notes_:
- Professional : Had a good day. Spoke with my manager. Spoke about some ideas I have for new projects. Going to put everything down on paper and share it with him. Worked on the application creation process of the project I'm working on. I want to make it as simple as possible so other team members can spin up their own instance and start using it quickly. Met with other team members for our weekly hangout.

- Personal : Went to the OrlandoJS meetup and streamed it. Or at least I tried to, I had to use my phone's hotspot. It came out okay. You can check out this video and more at https://otech.events Here's the video: 
{% youtube Mh8OvvkU7N4 %}
I'm headed to meet up with some folks from The Iron Yard bootcamp. It'll be good to catch up.

![A wooden dock on a lake surrounded by mountains in Pragser Wildsee, Italy](https://thepracticaldev.s3.amazonaws.com/i/mbvrnn757djqe73e9tpz.jpg)

Going to be a packed weekend! Going to DevFest Florida tomorrow. They asked if I could record some of the presentations. Can't stay till the end, because I've got my radio show. Sunday, hoping to make that day a day of anime, coding and resting. haha I'm heading out.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube Jpd_-QxXBwE %}
Thoughts on No-Code?
Tags: discuss, podcast
Published: 2019-11-15 22:48:46

I recently listened to Sahil Lavingia [(@shl)](https://twitter.com/shl) and Ben Tossell [(@bentossell)](https://twitter.com/bentossell) discuss the no-code movement on the IndieHackers podcast [(link)](https://www.indiehackers.com/podcast/134-ben-tossell-and-sahil-lavingia-on-code-vs-no-code).

Sahil points out the limitations of no-code tools when approaching scale, but admits they may be right in some situations.

Ben speaks about to the capabilities of no-code and that we are just at the beginning.


What do you think about the no-code movement?
CSS basics
Tags: css, html, beginners, tutorial
Published: 2019-11-15 22:32:10

Hello, the purpose of this blog is to show people how to add CSS to an HTML file and how to select elements.


First you'll need to add this to your HTML file.

```<link rel="stylesheet" type="text/css" href="style.css">```

```
href="style.css"
``` 
style.css is the name of my CSS file in this example.


Awesome now your HTML and CSS is connected. What next?

Let's say this is your HTML file.

```
<!DOCTYPE html>
<html lang="en">
<head>
    
    <title>Document</title>
</head>
<body>


    <div class="div-class">
        <card>
            <p id="p-tag">
                </p>
            </card>
        </div>
    
</body>
</html>
```

To select the div we can use the class selector. This will change any elements with the same class name.
``` 
.div-class {}
```


To select the card we can use the element selector. This will change any elements of the same tag name.
```
card {}
```


To select the p tag we can use the id selector. This will only change the element with the selected id.
```
#p-tag {}
```

Once you have something selected to change you can do some cool things such as changing their color.
```
#p-tag {
color: green;
}
```

Play around with CSS and see what you can make!
Haml🤙 #1  #10day introduction.. 
Published: 2019-11-15 22:25:45

Today is the first day about Haml hello, my name is karim coda.
Dear, 
This article is about web design whereas web design is some languages we use it to made websites and to be realistic here are some resources to information about web design

https://en.m.wikipedia.org/wiki/Web_design?wprov=sfla1

There are three important languages we use in web design so it is
Html:
https://developer.mozilla.org/en-US/docs/Learn/HTML

Css
https://developer.mozilla.org/en-US/docs/Learn/CSS

JavaScript
https://developer.mozilla.org/en-US/docs/Learn/JavaScript

When you learn these languages do you think you have become a professional designer.... 

No🚫
There are several techniques in these languages that help you to extend and clariy the design and make the code clear
Example haml scss sass... 

Do you wanna know once it is haml

Haml is Html preprocessor😉

Haml is a markup language predominantly used with Ruby that cleanly and simply describes the Html of any web document without the of inline code. 

http://haml.info/docs/yardoc/file.REFERENCE.html

The end wait the next post it has many examples of haml and thank you for reading this bye and I hope you your days will be a success 👋👋

Follow me 
https://www.facebook.com/karim.coda99

https://www.instagram.com/karimcoda

https://vm.tiktok.com/HRduhe/

https://mediu.com/@karimcoda99
Introducing new Vue.js lightbox!
Tags: vue, webdev, javascript, npm
Published: 2019-11-15 22:22:11

Basic version of Fullscreen Lightbox now working within Vue environment!

Create amazing galleries that looks great on every device! Display images and HTML or YouTube videos! You can even display your own sources like Vimeo videos using custom sources!

Demo: https://fslightbox.com/vue

You can install it using package manager: 
$ npm install --save-dev fslightbox-vue

Or by using tarball archive:
Download: https://fslightbox.com/vue/download

Docs: https://fslightbox.com/vue/documentation/basic

Github repository: https://github.com/banthagroup/fslightbox-vue

![Fullscreen Lightbox Vue](https://fslightbox.com/img/fslightbox/basic/3.png)
Are you using Docker for local development?
Tags: discuss, docker
Published: 2019-11-15 21:56:56

---
title: Are you using Docker for local development?
published: true
description: The discussion about productivity when using Docker for local development
tags: devdiscuss, docker
---

I've been using Docker and Docker-Compose for more than two years and I really can see a lot of benefits when it comes to CI/CD pipelines and deployment.

On the other hand, it seems like the use of Docker can slow down the local development process. Just a few examples from the top of my head:
- more complicated setup (if you want to have auto-reloading and avoid building new version on every change)
- running a single test can be much slower (the cost of bringing up the containers)
- cost of installing new packages
- etc.

What is your experience when it comes to using Docker for development? What are the tricks that can make easier and more efficient? I'm curious to see your ideas :)
DB Design for Storing International Addresses 
Tags: database, discuss
Published: 2019-11-15 21:55:42

Every country has a different address hierarchy with different fields. Some has prefectures, others have counties. USA addresses have a necessary ZIP Code field, etc. 

[This design](http://danielcoding.net/multi-country-address-database-design/) has the country agnostic aspect I am looking for but it is absolutely not scalable at all. 

1. On a RDBMS system, how would you go about your scheme design? 
2. On the corresponding user interface, how would you design form fields? 

What are your design choices on these problems?
What Have You Dev'd This Decade?
Tags: discuss
Published: 2019-11-15 20:44:54

---
title: What Have You Dev'd This Decade?
published: true
description: A discussion thread of the community's proudest development achievements over the last ten years.
tags: #discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/h51c7yan5w3m4g3r6w3g.PNG
---
As the end of the decade fast encroaches upon us like RAM usage when Chrome is open :wink:, I thought I'd ask the Dev community; what dev projects/skills are you most proud of working on this decade?
Day5:for .. in & iter - 100DayOfRust
Tags: rust
Published: 2019-11-15 19:41:53

## for .. in

```rust
fn main() {
    for i in 1..5 {
        println!("i is {}", i);
    }
    
    let mut names = vec!["Alice", "Bob", "Chris"];
    // iter() will borrow element in the array
    // elements can be reused after loop
    println!("{}", "=".repeat(5));
    for name in names.iter() {
        println!("{}", name);
    }
    
    // Borrow as mutably
    // unless change names to be `let mut names =`
    println!("{}", "=".repeat(5));
    for name in names.iter_mut() {
        *name = "Jack";
        println!("{}", name);
    }
    
    // this equals to names.into_iter()
    // into_iter will move ownership
    // so after this, we cannot use elements in names any more
    println!("{}", "=".repeat(5));
    for name in names {
        println!("{}", name);
    }
}
```

Result:
```
i is 1
i is 2
i is 3
i is 4
=====
Alice
Bob
Chris
=====
Jack
Jack
Jack
=====
Jack
Jack
Jack
```
Designing and Building Chatbots the Intuit Way
Tags: chatbot, conversational, natural, language
Published: 2019-11-15 19:41:00

At Intuit, conversational UI is an important part of our strategy to accelerate the time to benefit for our users of TurboTax, QuickBooks, and ProSeries products.

Here is a blog post on how we build tools that enables any users to design and build chatbots in Intuit.

https://medium.com/@greg_coulombe/designing-and-building-chatbots-the-intuit-way-6f3fbdf8f908
Looking to speak with Flask developers
Tags: flask, python
Published: 2019-11-15 19:13:59

Hi Flask Fans,

I’m Pablo and I work for a small startup in San Francisco. We’re creating a tool specifically to help Flask developers. We’d love to interview some of you and get some insight into Flask developers’ needs and wants.

The interview would last about 30 minutes and would help us better understand how you use Flask and what development tools you’d find useful. As a thanks for taking the time to speak with us, we’ll give you a $50 Amazon gift card.

The tool is called [Bento](https://bento.dev/) in case you’d like to learn more about it before deciding.

If you’re interested, please submit this Google Form: https://docs.google.com/forms/d/e/1FAIpQLSc2IQrkM3NX7Uka5JGiU-AkZ4Pt1SgOWtRBCt729ULgcXQ23Q/viewform?usp=sf_link

You can also send me a private message if you prefer!

Thanks,
Pablo
How to force an update to your Cloud Builders
Tags: googlecloudbuild, googlecloudrun
Published: 2019-11-15 18:54:55


<small>ℹ️ The explicit problem space mentioned in this article may no longer be an issue, but the concepts and practical tips discussed may still help you in other ways ✨</small>

With Cloud Run now in [general availability](https://cloud.google.com/blog/products/serverless/knative-based-cloud-run-services-are-ga), you can now update to your deployment scripts. No longer must you call `gcloud beta run`, now you can use just `gcloud run`!

... if you are running a version of `gcloud`, using at least Google Cloud SDK 271.0.0.

And if you've been running Cloud Build with `--config`, you might be using an older version. 

When Cloud Build steps run, they often use [Cloud Builders](https://github.com/GoogleCloudPlatform/cloud-builders) -- specially crafted docker containers. If you've already used one recently, it may be in your registry cache. This makes your builds faster (since it doesn't have to re-download the image), but it won't automatically get a new one if it exists. 

To fix this, you'll have to specify the exact version of the image you want to use. 

The information for the cloud builder in our case can be found by going to [http://gcr.io/cloud-builders/gcloud](http://gcr.io/cloud-builders/gcloud). This automatically redirects us to a nice long view of the most recent image. This image updates nightly, so we can just grab the latest SHA and force our script to use that. 

![Google Cloud Console, image registry listing. ](https://thepracticaldev.s3.amazonaws.com/i/2k3wwh0r9ndxq1g01i1a.png)
<small><i>The image listing for gcr.io/cloud-builders/gcloud, at time of writing</i></small>

For the most recent image at time of writing, you'll need `gcr.io/cloud-builders/gcloud@sha256:4ea77d19d7336d5a8dc4ae0e609d7f5b45fca067c34b70d7ed6740af229392c6` (known to their friends as `4ea77d19d733`). Clicking the 'Copy full image name' icon will enter this in your clipboard, which you can then use to change your config script. 

What we'll end up with is a step in our `cloudbuild.yaml` which looks something like this: 

```yaml
 - id: 'deploy service'
   name: 'gcr.io/cloud-builders/gcloud@sha256:4ea77d19d7336d5a8dc4ae0e609d7f5b45fca067c34b70d7ed6740af229392c6'
   args: ['run', 'deploy', '[SERVICE-NAME]', '--image', 'gcr.io/$PROJECT_ID/[SERVICE-NAME]', '--region', '[REGION]','--platform', '[PLATFORM]']

```

You can always test the image by running a version check directly with Docker. 

```shell
SHA=4ea77d19d7336d5a8dc4ae0e609d7f5b45fca067c34b70d7ed6740af229392c6 
docker pull gcr.io/cloud-builders/gcloud@sha256:$SHA
docker run --rm  gcr.io/cloud-builders/gcloud@sha256:$SHA --version
```

📝 Be sure to also `gcloud components update` to get the latest version of `gcloud` locally!
Daily Challenge #118 - Reversing a Process
Tags: challenge
Published: 2019-11-15 15:23:36

---
title: Daily Challenge #118 - Reversing a Process
published: true
series: Daily Challenge
description: Suppose we know the process (A) by which a string `s` has been coded to a string `r`.
tags: challenge
---

Suppose we know the process (A) by which a string `s` has been coded to a string `r`.

The aim of the kata is to decode `r` to get back the original string s.

Explanation of the known process (A):

- data: a string `s` composed of lowercase letters from a to z and a positive integer `num`

- We know there is a correspondence between `abcde...uvwxyzand` `0, 1, 2 ..., 23, 24, 25` : `0 <-> a, 1 <-> b ...`

- If `c` is a character of `s` whose corresponding number is `x`, apply to x the function `f: x-> f(x) = num * x % 26` then find `ch` the corresponding character of `f(x)`

- Accumulate all these `ch` in a string `r`.

- Concatenate `num` and `r` and return the result.

Example:
`code("mer", 6015) -> "6015ekx"`
`m <-> 12, 12 * 6015 % 26 == 4, 4 <-> e`
`e <-> 4, 4 * 6015 % 26 == 10, 10 <-> k`
`r <-> 17, 17 * 6015 % 26 == 23, 23 <-> x`
`We get "ekx" hence "6015ekx"`

*Task*:

A string `s` has been coded to a string `r` by the above process (A). Write a function r -> decode(r) to get back s whenever it is possible.

Indeed it can happen that the decoding is impossible when positive integer `num` has not been correctly chosen. In that case return "Impossible to decode".

*Example*:

`decode("6015ekx") -> "mer"`
`decode("5057aan") -> "Impossible to decode"`


***

_This challenge comes from g964 on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
How Node.js Transformed the Landscape of Back-End Engineering
Tags: softwaredevelopment, node, javascript, programming
Published: 2020-01-15 00:01:00

---
title: How Node.js Transformed the Landscape of Back-End Engineering
published: true
date: 2019-11-15 18:22:21 UTC
tags: software-development,nodejs,javascript,programming
canonical_url: https://medium.com/better-programming/how-node-js-transformed-the-landscape-of-backend-engineering-cd05731f592c
---

[![](https://cdn-images-1.medium.com/max/1600/1*nl5YMLsKNFEyMDSK4H0iVw.jpeg)](https://medium.com/better-programming/how-node-js-transformed-the-landscape-of-backend-engineering-cd05731f592c?source=rss-5676ca6163ee------2)

A short history of Node.js

[Continue reading on Better Programming »](https://medium.com/better-programming/how-node-js-transformed-the-landscape-of-backend-engineering-cd05731f592c?source=rss-5676ca6163ee------2)