teleren/devto huggingface dataset:
Moving from Java8 to JavaX...
Tags: java
Published: 2021-02-25 12:43:30

I would like to keep this article to list out following

Key features in each version beginning from Java9 till Java12.
Challenges faced in migration from Java8 to JavaX
Good Blogs and Vlog available to refer to while migrating.

Refer this wiki page for complete details on JAVA releases and features and timelines.

Key Features by release:
#Java9
Java Module System
Linking
Jshell - runtime console
Javadoc improvments
Collection Factory Methods ex: List<String> stringsOf = List.of("apple","orange","grapes");
Stream API improvements
private interface methods
Http - new classes to make request/response
Multi release Jar - where you can specify which class file to pick based on the JRE.

*Good Blogs to refer pluralsight, baeldung and journaldev*


#Java 10:
Local-Variable Type Inference ex: var = "number", var = 1;
Garbage-Collector Interface
Parallel Full GC for G1
Application Class-Data Sharing
Thread-Local Handshakes
Remove the Native-Header Generation Tool (javah)
Additional Unicode Language-Tag Extensions
Heap Allocation on Alternative Memory Devices
Experimental Java-Based JIT Compiler ex: Graal vm
Root Certificates
Time-Based Release Versioning

*Good blogs : Journaldev*


#Java11:

Java11 is long term support(LTS) release. If we download JDK11 from oracle and use it in production then it's enterprise level and have to be paid.

Nest-Based Access Control
Dynamic Class-File Constants
Improve Aarch64 Intrinsics
Epsilon: A No-Op Garbage Collector
Remove the Java EE and CORBA Modules
HTTP Client (Standard)
Local-Variable Syntax for Lambda Parameters
 Key Agreement with Curve25519 and Curve448
 Unicode 10
 Flight Recorder
 ChaCha20 and Poly1305 Cryptographic Algorithms
 Launch Single-File Source-Code Programs
 Low-Overhead Heap Profiling
 Transport Layer Security (TLS) 1.3
 ZGC: A Scalable Low-Latency Garbage Collector
(Experimental) -
Deprecate the Nashorn JavaScript Engine
Deprecate the Pack200 Tools and API
Java12:
Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
Microbenchmark Suite
Switch Expressions (Preview)
JVM Constants API
One AArch64 Port, Not Two
Default CDS Archives
Abortable Mixed Collections for G1
Promptly Return Unused Committed Memory from G1

*Good Blogs : whizlabs journaldev*


#Java13:
Dynamic CDS Archives
ZGC: Uncommit Unused Memory
Reimplement the Legacy Socket API
Switch Expressions (Preview)
Text Blocks (Preview)
Introducing Serverless UI: A command-line utility for deploying serverless applications to AWS
Tags: serverless, javascript, aws, showdev
Published: 2021-02-25 12:42:38

{% github jakepartusch/serverlessui %}

#  Deploying Websites to AWS on Easy Mode 

Serverless UI is a free, open source command-line utility for quickly building and deploying serverless applications on AWS

- **Bring your own UI** It doesn't matter if it's React, Vue, Svelte or JQuery. If it compiles down to static files, then it is supported.

- **Serverless Functions** Your functions become endpoints, automatically. Serverless UI deploys each function in your `/functions` directory as a Node.js lambda behind a CDN and API Gateway for an optimal blend of performance and scalability.

- **Deploy Previews** Automatically deploy each iteration of your application with a separate URL to continuously integrate and test with confidence.

- **Custom Domains** Quickly configure a custom domain to take advantage of production deploys!

- **TypeScript Support** Write your serverless functions in JavaScript or TypeScript. Either way, they'll be bundled down extremely quickly and deployed as Node.js 14 lambdas.

- **Own your code** Skip the 3rd Party services — get all of the benefits and security of a hosted AWS application, without going through a middleman. Deploy to a new AWS account, or an existing account and get up and running in five minutes!

## 🚀 Get Up and Running in 5 Minutes

You can get a new Serverless UI site deployed to you AWS account in just a few steps:

1. **AWS Prerequisites**

   In order to deploy to AWS, you'll have to configure your machine with local credentials. You'll find the best instructions [here](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html).

2. **Install the AWS CDK.**

   ```shell
   npm install -g aws-cdk
   ```

3. **Install the Serverless UI Command-Line Interface**

   ```shell
   npm install -g @serverlessui/cli
   ```

4. **Bootstrap your AWS Environment**

   Next, specify your account and region to bootstrap the CDK environment for quicker subsequent deployments

   ```shell
   cdk bootstrap aws://ACCOUNT-NUMBER-1/REGION-1
   ```

5. **Deploy your static website**

   Finally, tell the Serverless UI where to find your website's static files

   ```shell
   sui deploy --dir="./dist"
   ```

## That's It!
Enjoy your serverless application, deployed on your _own_ infrastructure.
Event bubbling in JavaScript
Tags: javascript, beginners
Published: 2021-02-25 12:38:08

Event bubbling is an event propagation type which is observed in DOM API.

```
<div>
  <p>
    <img> </img>
  </p>
</div>
```

For example suppose all 3 elements have registered to handle an event, then as per bubbling rule the event will be handled from inner to outer that is img element will handle the event first then p and last will be div element.

For general use event bubbling is convenient but some rare cases we need to handle outer event first than inner so in those situation we need to avoid event bubbling.

This is achieved by making useCapture true to the event handler function where by default it's passed as false.

```
btn.addEventListener('click',action item(),true);
```

OR

To stop bubbling we can use either 
```
// stops immediately
event.stopImmediatePropagation()
```

Or

```
//stops after running current event
event.stopPropagation()
```
Random Stars Animation with JavaScript and CSS
Tags: animation, javascript, css, random
Published: 2021-02-25 12:33:56

I created this pen a long time ago when a client wanted this type of animation for a project. Maybe someone can use the code to make the animation smoother. 

{% codepen https://codepen.io/typo3-freelancer/pen/KKwXErx %}

### Things you could add

- more randomness
- performance optimization

### Any ideas?
Write a comment ;-)
How to Create Task Manager App with PHP
Tags: php, mysql, tutorial, webdev
Published: 2021-02-25 12:32:31

Trying to find a course or a tutor to learn any programming language or a technical course is daunting task.
Though there are lots of resources available for FREE, it's really difficult to self-motivate and start the learning process.

*And it's based on my own experience.*

For me, learning any programming language was easier by doing a project.
It doesn't matter how good you're in theory, if you can't make a real world project out of your knowledge.

But if you start doing real projects with the knowledge you currently have, you'll develop the necessary skills and knowledge as your projects start to be big and complex.

So, *with the intention of Making the Learning Fun*, Here's a PHP Course for Beginners where you'll create a **TASK MANAGER App**.

#What is Task Manager App?

Whether in a daily life or in a workplace, you've lots of tasks throughout the day. It's easier to miss a task on a busy day. And sometimes it becomes horrible when we miss the most important task of the day.

So, TASK MANAGER is a simple web app where You can Manage Tasks, group them by Categories, set the Priority and Deadline.

And in this course, you will create your own Task Manager App Step-by-Step with PHP programming language and MySQL Database.


#What is in a Task Manager App?
In this tutorial, we will be creating a web app which will have Lists and Tasks.
Simply **Lists** can be called as categories like To Do, Doing, Done, Review, etc.
And **Tasks** will be assigned on these Lists.

**In this application You will be able to**
1. Manage Lists (Create/Update/Delete)
2. Manage Tasks (Create/Update/Delete)
3. Display Lists on Menu
4. View Tasks and Sort by Lists

#Technologies Used in this project
1. Core PHP (Procedural)
2. MySQL Database
3. HTML
4. CSS


#Step by Step Tutorials

###1. Design Homepage and Manage Lists Page
{% youtube 1rl36zxqZZw %}

###2. Insert and Display Lists
{% youtube 6fJ1AI8UdQs %}

###3. Update and Delete List
{% youtube tQA7pl9Gijc %}

###4. Insert and Display Tasks
{% youtube 0iekWNh0rVk %}

###5. Update and Delete Task
{% youtube OmU04RzO36U %}

###6. Add Lists on Menu and Display Tasks by List
{% youtube lxfYNw_GE5M %}

###7. Adding CSS in our project to make it more Beautiful
{% youtube JO8HcXuFYGU %}


Thank You So Much for following the article till the end. 

If you're more interested to create more PHP projects, Follow my next article to create "Food Order Website with PHP and MySQL"

{% link https://dev.to/vijaythapa/how-to-make-food-ordering-website-l9a %}
Using Deequ 1.1 with Spark 3
Tags: apachespark, awsdeequ, deequ, dataquality
Published: 2021-02-25 12:31:36

---
title: Using Deequ 1.1 with Spark 3
published: true
description: 
tags:
  - apachespark
  - awsdeequ
  - deequ
  - dataquality
//cover_image: https://direct_url_to_image.jpg
---

If you try to upgrade [AWS Deequ](https://github.com/awslabs/deequ) to latest version ([1.1.0](https://github.com/awslabs/deequ/releases/tag/1.1.0)) atm and use with Spark 3.0.1 you will get following error:

```
[error] (update) Conflicting cross-version suffixes in: org.apache.spark:spark-launcher, org.apache.spark:spark-sketch, org.apache.spark:spark-kvstore, org.json4s:json4s-ast, org.apache.spark:spark-catalyst, org.apache.spark:spark-network-shuffle, com.twitter:chill, org.apache.spark:spark-sql, org.scala-lang.modules:scala-xml, org.json4s:json4s-jackson, com.fasterxml.jackson.module:jackson-module-scala, org.json4s:json4s-core, org.apache.spark:spark-unsafe, org.json4s:json4s-scalap, org.scala-lang.modules:scala-parser-combinators, org.apache.spark:spark-tags, org.apache.spark:spark-core, org.apache.spark:spark-network-common
[error] Total time: 6 s, completed 10-Feb-2021 13:07:46
```

This is due to the fact that Deque has [transitive dependencies](https://mvnrepository.com/artifact/com.amazon.deequ/deequ/1.1.0_spark-3.0-scala-2.12) to Scala 2.11 for some unknown reason (a bug?). You can fix that by using the following `build.sbt`:

```scala
name := "dq"

scalaVersion := "2.12.12"

val sparkVersion = "3.0.1"

libraryDependencies += "org.apache.spark" %% "spark-sql" % sparkVersion % "provided"


// https://mvnrepository.com/artifact/com.amazon.deequ/deequ
// issue with Deequ transitive libs cross-compiled to Scala 2.11
libraryDependencies += ("com.amazon.deequ" % "deequ" % "1.1.0_spark-3.0-scala-2.12")
  .exclude("org.scalanlp", "breeze_2.11")
  .exclude("com.chuusai", "shapeless_2.11")
  .exclude("org.apache.spark", "spark-core_2.11")
  .exclude("org.apache.spark", "spark-sql_2.11")
```

P.S. Originally published [on my blog](https://www.aloneguid.uk/posts/2021/02/deequ-1.1-spark3.0/).
Why security, encryption, and privacy are not the same thing, by Anastasiia Voitova
Tags: security, cryptography, encryption, privacy
Published: 2021-02-25 12:09:19

> *You are welcome to “data security taken seriously”! 
Let’s move step by step.*
 
In this video by [Anastasiia Voitova] (https://www.linkedin.com/in/anastasiiavoitova/) aka [@vixentael](https://twitter.com/vixentael/), Head of customer solutions at infosec company [Cossack Labs] (https://www.cossacklabs.com/), you will get as simple as ABC answer on why security, encryption, and privacy, in fact, are three different words, not synonyms and not the same concept.
***
Say hi to [@vixentael] (https://twitter.com/vixentael/) and follow [@Cossack Labs] (https://twitter.com/vixentael/) on Twitter.
Watch the full video on [ Cossack Labs' YouTube channel] (https://www.youtube.com/watch?v=CqsrA4eeGSs&ab_channel=CossackLabs).
Get through the [slides here](https://speakerdeck.com/vixentael/e2ee-equals-security-equals-privacy).🐬
{% speakerdeck ba7464de4e2e46aa9aff6154ee8b1a89 %}
Trunk based development
Published: 2021-02-25 11:48:54

Trunk based development is where all developers commit to the trunk, there are no branches.  A team following TBD will pull from the trunk many times a day, knowing that the build passes.  If you are developing a feature there are various ways such as feature flags or toggles to keep it hidden until it is ready to be presented to users.

You need:

- Small story sizes:  devs will break up a story into smaller sub-tasts so that when working on a change, it should only take a few hours before committing and pushing.  Therefore commits are typically small.  
- Small build times:  If build times are too big developers will be discouraged from committing often.  

The benefits: 

You will no longer encounter the problems with working on branches, those being:
- Merge conflicts - imagine a team of developers each having their own branch, perhaps even more than one branch.  This could easily result in merge hell.  Merge conflicts means the developer needs to focus on the code of another developer as well as their own code.  
- Less visibility and communication.  When working on branches you do not see the code that other developers have been working on until you merge your code in, leading to possible work duplication and/or you could break something unexpected once code is merged.  Your code could even be incompatible with the code of another developer.

With TBD you are always release ready and this up-to-date state encourages more refactoring.  

TBD goes hand in hand with continuous integration/ continuous deployment.  In contrast to big stressful releases by frequently pushing to master this means that small improvements are continously being made to your live app.  Smaller changes means smaller bugs that are easier to fix.
Python Vs PHP: Know the Key Difference in 2 Min
Tags: python, php, startup, programming
Published: 2021-02-25 11:47:52

We all know that for fast application development, Python is the most trending high-level object-oriented programming language, whereas to develop a dynamic website or web application, PHP is used. 

Between Python and PHP, PHP's many frameworks and compare to PHP Python have a small number of frameworks. 

AI and Machine learning are now trending and growing rapidly, so Python is widely used in AI and ML, the scientific community, data science. For web development, PHP is the preferable choice.

Python created by Guido VAn Rossum in 1991
PHP created by Rasmus Lerdorf in 1994


**Key Features of Python:**

Dynamic Typing
Rapid development
Beautiful code

**Key features of PHP:**

Easy development
Open-source
Continual Improvements

**Learning Curve:** For long-term projects, Python is the better choice. The PHP learning curve is very low. 

**Community:**
PHP community- web-focused, innovates quickly and 
Python Community- diverse and stable, used in academia widely

For web development, PHP is exclusively designed.
For the general-purpose language, Python is designed. 

Python and PHP are both most lovable by the developers. Nowadays, many businesses and startups [hire python developer](https://www.bacancytechnology.com/hire-python-developer) for AL and ML projects, web development, desktop or back-end development. While on the web, PHP is a famous language.
updating Angular version
Published: 2021-02-25 11:45:36

I am updating angular project version 6.0.1 to 9.1
below Issues are getting in  html.

1. No directive found with exportAs 'ngForm'.
2.Can't bind to 'ngModel' since it isn't a known property of 'input'.


I have included  FormsModule, ReactiveFormsModule.

Please help me on this issue
Prestashop: the good, the bad and the ugly
Tags: prestashop, rant
Published: 2021-02-25 11:42:11

![Prestashop logo](https://news.jae.moe/IMG/arton8.png?1614247659)

I recently got a job opportunity where I had to maintain a PrestaShop website & additional modules, how bad could it be?  
Well, even worse than you may think.

At first, PrestaShop seemed like an _okay_ CMS, not good, not bad, just _meh_.  
The pages were loading in a reasonable time for a PHP application this big and there were no major issues.

And then a week passed.  
I immediately noticed the "_Modules and Services_" tab took at least a minute to load in the first place, more than ten in the worst cases, this is due to PrestaShop trying to load the distant module shop, which is frankly hosted by people that don't know how to run a server.  
Did I also mention that there is **no way** for a regular user to disable that? I had to modify PrestaShop's core to get rid of this "feature" because modules that previously blocked this loading were not working any more.

Currently, the shop runs on the 1.6 of PrestaShop which is riddled with thousands, if not millions of bugs.  
PrestaShop themselves, in their incompetence, decided to **not** fix the bugs of the 1.6 and release the 1.7, without prior notice, changing everything and rendering thousands of modules unusable on newer versions.  
As of now, updating PrestaShop adds way more bugs than it fixes, this is why updating is **not even remotely recommended for anyone in their right minds**!

Also, when we're at it, let's talk a bit about modules and support.  
PrestaShop is managed by **idiots**; some modules can cost up to [a fucking thousand Euros](https://addons.prestashop.com/en/third-party-data-integrations-crm-erp/39985-atoo-sync-gescom-sage-100c.html) but the support is as good as talking to a bot.  
In the best case, you pay more and only get three months of support and one update for a module that will _maybe_ work.  
Nothing on their shop is tested before being sold, and it wouldn't surprise me if there would be malicious content on there, sold for real money.  
When having a problem with a module, the person charged with your support request will most likely say "it's your server, not our module" and close your support ticket (for both unofficial **and** official modules).

Given the countless bugs, incompetent people and shitty support, please, please do not use PrestaShop.  
A good alternative would be [WooCommerce](https://woocommerce.com/); if you really want to use PrestaShop, please use the fork [ThirtyBees](https://thirtybees.com/) whose goal is to offer a stable experience, without any bugs.
Why Use Microservices?
Tags: microservices, benefitsofmicroservices, microservicesforbusinesses, microservicearchitecture
Published: 2021-02-25 11:16:40

Once your business is ready and all set to make the transition from Monolithic to Microservice architecture, you must know what the application needs are and how you plan to move forward with the shift. 

Discussed in this infographic are some of the <b><i><a href="https://medium.com/buildpiper/3-ways-microservices-are-transforming-businesses-today-5bf156930f2a">business benefits of <b>Microservices</b></a></i></b>. Having a look at these can help your enterprise to identify the unique goals for the move and ensure you have the right support in hand to manage the added complexity of transitioning to a containerized architecture.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4xxt6ztmj0zkilkrpt3v.png)

But for better scaling and deployment of microservices, you must have a strategy in hand. Without proper planning, managing microservices can be cumbersome and excessively demanding.

<b><i> Realizing this issue, Opstree came up with a unique solution. Here is the most powerful Microservice Delivery Platform- <a href="https://www.buildpiper.io/index.html"><B><I>BuildPiper</a></b></i><b><I> for seamless and highly intuitive management of large and complex Microservices lifecycles.</i></b>

With "Managed Microservices" as one of the core functionality pillars of the platform, BuildPiper has other added functionalities of Managed Kubernetes, Secure CI/CD Pipelines with features like complete security, compliance, and observability.
Quickly check which PHP extensions are needed on your server
Tags: composer, php, extension
Published: 2021-02-25 11:31:41

I just ran into a composer command which displays the required PHP extensions for your production server:

```
composer check-platform-reqs
```

It displays all required extensions in a table :-)
![Screen Shot 2021-02-25 at 12.30.30](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7xh38d7pag13m3k3wia2.png) 
Happy coding!
#NLW04 - REACT
Tags: braziliandevs, codenewbie, react, beginners
Published: 2021-02-25 10:01:00

### useEffect()?

Não faz muito tempo desde a primeira vez que vi um código feito com React, menos de uma semana, na verdade.
 
Porém não foi um choque muito grande por já ter visto códigos em Angular, por exemplo. Há algum tempo tenho percebido que apenas olhar, mesmo que não entenda, para outros códigos ajuda **muito** a ter facilidade em reconhecer e relacionar prática com conceito quando você começa a estudar de fato.

Cada biblioteca e cada framework tem suas particularidades e penso em falar mais sobre o que aprendi na Trilha ReactJS da #NextLevelWeek da Rocketseat, mas hoje o espaço é do `useEffect()`.

Quando o Diego explicou que **hooks** são efeitos colaterais, anotei no caderno com cores coloridas para procurar mais sobre em outro momento. E cá estou. 

De acordo com a documentação do React um [Effect Hook](https://pt-br.reactjs.org/docs/hooks-effect.html) te permite executar efeitos colaterais em componentes funcionais. Mas o que pode ser isso?  

> *Buscar dados, configurar uma subscription, e mudar o DOM manualmente dentro dos componentes React são exemplos de efeitos colaterais.*

Um efeito colateral acontece depois de alguma coisa, certo? Os efeitos são geralmente executados **depois** que o React atualiza a DOM. 

###### Então o que o *useEffect* faz? 
O React guarda as informações do efeito para serem utilizadas depois, por exemplo nesse código: 
```
useEffect(() => {
    if (isActive && time > 0) {
      countdownTimeOut = setTimeout(() => {
        setTime(time - 1);
      }, 1000);
    } else if (isActive && time === 0) {
      setHasFinished(true);
      setIsActive(false);
      startNewChallenge();
    }
  }, [isActive, time]);
```

Os efeitos agendados com `useEffect` não bloqueiam o navegador de atualizar a tela, então os efeitos são mais sutis e parecem muito mais fluidos quando utilizados. Por exemplo, no momento em que vemos uma nova imagem e um novo texto chamado pelo `startNewCHallenge()`, que só acontece quando o countdown está ativo, porém zerado após cumprir sua função, vemos a mudança de imagem e texto no bloco de Desafios sem alterações no resto do layout. A maioria dos efeitos não precisa acontecer de forma síncrona e pensando assim, as coisas fazem um pouco mais de sentido. 

Em breve irei separar os tópicos que aprendi e tentar falar mais sobre, assim como as coisas que ainda quero estudar. Documentar o que eu estou aprendendo sempre foi uma vontade minha, mas sempre ficava em segundo plano. Agora graças a #NextLevelWeek04 da Rocketseat, tenho algumas inspirações pra começar!