teleren/devto huggingface dataset:
What Is The Future of Java?
Tags: java, programming, javascript, coding
Published: 2021-06-29 08:22:31

Java is a simple, portable, flexible, easy-to-understand programming language that has seen many ups and downs. Many believed that it would die with the changing technologies, but nothing of that sort happened. 

Java is still flourishing and giving solid competition to newer languages such as Python and JavaScript. It is a secure, reliable language that supports cross-platform functionality. Its versatility and uniqueness make it relevant even in today's time. 

Many newer technologies like big data, IoT, machine learning, etc., have come up in recent years. But java has held its ground, staying in the top 5 programming languages of all time. 
 
The global community of developers will increase by 28.7 million in 2024. And approx. 63 percent of programmers admitted to code in java along with Python, SQL HTML, and CSS for future technologies. 

You should learn java by joining a <a href="https://www.synergisticit.com/java-training-in-bay-area-ca/">java bootcamp</a> as it will help perform following applications. 

## What Is The Future of Java?

**Mobile Apps Development**
Most people today have a smartphone, and the number of smartphone users exceeds more than six billion. Data also suggests that the number will increase by several hundred million in the next few years. 

Java is also the official language of Andriod app development, with more than 450,000 apps developed by java. So, having a <a href="https://www.synergisticit.com/java-training-in-bay-area-ca/">java certification</a> will prepare you for a career in web development. 

**Internet of Things (IoT)**
IoT is a popular technology today. The increase in new computers, devices, and technologies makes it even more popular. According to IDC, the total number of IoT devices will cross 35 billion this year. 

With more industries investing in IoT, the demand for IoT developers will increase. Features like flexibility, simplicity,  rich library and APIs, make it ideal for IoT and a career as an IoT developer. 

**Big Data and Cloud**
The Big Data industry is growing exponentially as more businesses are shifting to cloud-based solutions. And, fortunately, most essential big data tools like Hadoop and Spark run on java. 

So, the future of java is promising and will grow with the growth of big data. It has many frameworks that support multi-cloud strategies like Spring Boot, Cloud Foundry, etc. A <a href="https://www.synergisticit.com/java-training-in-bay-area-ca/">java training</a> will equip you with the basics as well as the advanced concepts of java.

Almost all the industries use java today for some purpose, be it for web development, app development, developing enterprise-level applications, and more. Its simplicity, device, and OS support make it a popular programming language that will influence the IT industry for years. So, java is here to stay for a very long time.
Javascript: déconstruire des tableaux et des objets
Tags: french, javascript, beginners, react
Published: 2021-06-29 07:55:58

---
title: Javascript: déconstruire des tableaux et des objets
description: La déconstruction de tableau est un concept souvent utilisé avec React.js
published: true
tags: french, javascript, beginner, react
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ik1c8mr2sz8zi3g466dq.jpg
canonical_url: https://www.ericlecodeur.com/perfectionner-votre-javascript-deconstruire-des-tableaux-et-des-objets
---
Si vous désirez plus de contenu francophone comme celui-ci, cliquer <strong>Follow<string> ou <a href="https://twitter.com/EricLeCodeur" class="twitter-follow-button">suivez-moi sur Twitter</a>
<hr>
<h2>Déconstruire des tableaux</h2>
```js
// Code sans déconstruire
const names = ['Mike', 'Paul', 'John']
const name1 = names[0]
const name2 = names[1]
const name3 = names[2]

// Code avec déconstruction de tableau
const [name1, name2, name3] = names

// Déconstruire seulement les deux premiers éléments
const [name1, name2] = names

// Déconstruire premier et troisième élément
const [name1, ,name3] = names

// Déconstruction avec lors d'un return d'une fonction
const sumAndMultiplication = function(num1, num2) {
  return [num1 + num2, num1 * num2]
}
const [sum, multiplication] = sumAndMultiplication(10, 10)

console.log(sum, multiplication) // 20 100

// Déconstruction partiel
const [number1, number2] = [1]
// number1 = 1, number2 = undefined

// Déconstruction avec valeur par défaut
const [number1 = 0, number2 = 0] = [1]
// number1 = 1, number2 = 0
```

<h2>Déconstruire des objets</h2>
```js
const post = {
  id: 100,
  title: 'This is my Blog',
  description: 'This is my blog text body..',
  tags: ['web', 'dev', 'js'],
}

// Déconstruire avec les mêmes noms d'attributs
const {id, title} = post

// Déconstruire avec noms d'attributs différents
const {number: id, main: title} = post

// Valeur par défaut si attribut non présent
const {id, title, user = 1} = post

// Autre exemple
const {id, title, categorie = []} = post

// Assignation de variables existantes
let id = 100
let title = 'My Blog title'
// use the parentheses
({id, title} = post)

// Déconstruire les paramètres d'une fonction
const createPost = function({id = 200, name, title}) {
  console.log(id)
  console.log(name)
  console.log(title)
}

// Passer un object comme paramètre
const obj = {
  name: 'Mike',
  title: 'New Title'
}
createPost(obj)
// ou déconstruire
createPost({name: 'Mike', title: 'New title'})

```
Read/Write Splitting for User-Managed Redis - Pros & Cons
Tags: redis, database, career
Published: 2021-06-29 07:50:58

* Do you use Redis? 
* Would you like to know why people usually also use Sentinel when they use Redis? 
* What kind of problems can it resolve? and what it can not? 

Find the answer in this 10 mins video.
[Watch the video >](https://youtu.be/rmqehkhkt4c)

I believe there are people who enjoy doing everything from scratch and taking proud of it. For example, establishing a LAMP environment from installing a Linux system even costing hours, or downloading a LAMP built-in package directly from some open source platform and achieve the same in one command which only just takes a few minutes, what delights you the most? 
No matter what your answer is, it's clear you are pretty practical, think you might be interested in playing new stuffs also. Don't miss your chance to experience our cloud-native database PolarDB, and I won't tell you that you can also get an extra benefits from it. Apply now, and uncover the gifts by your own.
[Take a closer look >](https://www.alibabacloud.com/product/polardb#J_5764451150)
Weekly Challenge 119
Tags: perl, theweeklychallenge
Published: 2021-06-29 07:43:54

[Challenge](https://theweeklychallenge.org/blog/perl-weekly-challenge-119), [My solutions](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-119/sgreen)

Two quick fire tasks this week.

## TASK #1 › Swap Nibbles

### Task

You are given a positive integer `$N`.

Write a script to swap the two [nibble](https://en.wikipedia.org/wiki/Nibble) of the binary representation of the given number and print the decimal number of the new binary representation. A nibble is a four-bit aggregation, or half an octet.

To keep the task simple, we only allow integer less than or equal to 255.

### My solution

Rather than turning the number into a binary representation, perform some swapping and then turning it back into a decimal number, I took a more mathematical approach with binary arithmetic.

We take the first nibble and downshift it four place with `$number >> 4`. We use [bitwise arithmetic](https://perldoc.perl.org/perlop#Bitwise-And) to get the second nibble, and multiple that by 16 to make it the first.

### Examples

```
$ ./ch-1.pl 101
86

$ ./ch-1.pl 18
33
```

## TASK #2 › Sequence without 1-on-1

### Task

Write a script to generate sequence starting at 1. Consider the increasing sequence of integers which contain only 1’s, 2’s and 3’s, and do not have any doublets of 1’s like below. Please accept a positive integer `$N` and print the $Nth term in the generated sequence.

1, 2, 3, 12, 13, 21, 22, 23, 31, 32, 33, 121, 122, 123, 131, …

## My solution

For this task, I assign the input number as `$counter`. I then have a while loop that runs while $counter != 0 and increases the number. I subtract 1 from the $counter if the number only contains 1, 2 and 3s `$number =~ /^[123]*$/` and the number doesn't have double 1s `index( $number, '11' ) == -1`.

## Examples

```
$ ./ch-2.pl 5
13

$ ./ch-2.pl 10
32

$ ./ch-2.pl 60
2223
```
weechat for matrix.org on a Digitalocean droplet with tmux
Tags: ubuntu, weechat, tmux, cloud
Published: 2021-06-29 07:41:06


Picture from [flickr m.maddo](https://www.flickr.com/photos/14141796@N05/3556068078)

A quick writeup of what I learned installing weechat on a digital ocean droplet - and keeping it running with tmux.

Written on June 29th 2021

## Get a Digital Ocean droplet
Set up the [Digital Ocean](https://www.digitalocean.com) account and a means of payment - the budget for this project is USD 5-7 per month (to keep the droplet running).

Under distributions choose the Ubuntu image - as of writing 20.04 x64
Choose a plan - basic
Choose a cpu option - regular intel
Choose a size - smallest - 1GB and 1 CPU.

### Secure the machine - Create a login user to the droplet
To secure the machine and avoid logging in with root I followed this tutorial:
[First steps to secure ubuntu server](https://www.andrewhoog.com/post/first-steps-to-securing-ubuntu-server-18.04-on-digital-ocean/)

I didn't enable a firewall - and therefore no need to allow the ssh.
I might want to come back to this later.

The security for this droplet in my setup is mainly coming from using an ssh key.

## Install Weechat
To install I followed the instructions on the [weechat website](https://weechat.org/download/debian/)

I was using apt command instead of apt-get. You can find a detailed description of the difference [here](https://itsfoss.com/apt-vs-apt-get-difference/)

### connect to libera chat
This is well documented in the [weechat quickstart](https://weechat.org/files/doc/stable/weechat_quickstart.en.html).


### connect to matrix.org

I followed this description - [weechat matrix github](https://github.com/poljar/weechat-matrix) 

I installed libolm-dev like this: 
   `sudo apt install libolm-dev`
It's a cryptographic library needed for matrix.org.

Caveat: It's not quite working yet for me - for some reason I have to reload the script with `/script load matrix.py` every time I log in to Weechat. If you know what might be the issue here - comments are very much appreciated.

## use tmux to keep the session logged in

I am really just scratching the surface here - using it to  keep the Weechat session alive when disconnecting.

- command to start: 
`tmux`
- to detach: `Ctrl-b d`
- to reattach: `tmux att`

More details can be found [here](https://linuxize.com/post/getting-started-with-tmux/)
Join us today for deploy - DigitalOcean’s virtual conference
Tags: webdev, cloud, startup
Published: 2021-06-29 07:37:45

It is not too late to join us for our signature event - deploy.  This edition of deploy is focused on helping small businesses and startups scale on the cloud:

**deploy, Power Your Business**
[Register now](http://do.co/deploy)

##From products to pitches: Content that speaks to all builders
Kicking off the event, DigitalOcean’s CEO, Yancey Spruill will talk about where we're headed as a company and also share some exciting product updates. His keynote will be followed by presentations from community members, engineers, customers, and other experts that are building technologies and businesses powered by the cloud. 

The content spans a wide breadth of topics relevant to anyone who is a builder - whether you are building a simple app, a business, or a body of knowledge. From learning how to scale your applications to understanding the complex world of fundraising with Techstars, this event covers all aspects of setting up and scaling your apps and businesses.

##Come for the resources, stay for the real connections
With live Q&A and an active Discord server that connects speakers and attendees one on one, there’s ample opportunity to engage and learn something new. 

1. Ask your burning tech questions to speakers in the breakout groups.
2. Take a break and enjoy some live entertainment in the off-topic channels.
3. Snap selfies in the deploy photo booth.
4. Network with fellow attendees in the #introductions channel.
5. Follow the event on social and tag your experience with #DOdeploy. 

Members of our team will be available throughout the event. Everyone is invited, from executive staff and engineers to product builders and content creators. 

We’re so honored to have such an incredible community and we can’t wait to connect with each and every one of you at deploy. The time and details are below:

Date: June 29th, 2021 @ 9 am ET 
[RSVP HERE](http://do.co/deploy)
\#DOdeploy

We look forward to seeing you there!
Atom vs VS Code
Tags: beginners, vscode, atom
Published: 2021-06-29 07:33:35

If you're searching for the perfect code editor, there's a good chance that you've run into both Atom and Visual Studio Code. Sure, there are plenty of other editors, but these two are among the most talked about. Atom has been around a while, but Visual Studio Code was once the new kid in town no one was quite sure about. Long story short, I settled down upon VS Code.

## _A little background_
Both the VS Code and Atom are open-source code editors, originally created by Microsoft and GitHub respectively. Each of these editors is based on Electron - a framework for creating "native" desktop apps with web technologies - HTML, CSS, JS - with the addition of Node.js.
![atom/microsoft](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6rotnv5ccmwjezjg4p9w.png)

##_Performance_
Even if Atom was the first, everyone who has used both of these editors, at least to some small extent, must agree - VS Code is just faster. Visual Studio Code has a firmly composed crux set of functionalities with plugins adding exterior level features. On the contrary, the Atom uses an extension-based approach to almost everything. So, when the number of plugins increases in Atom, it adds the sluggish behavior by placing it behind the Visual Studio code in terms of performance. Visual Studio Code has an in-built debugger, making the development flow less ‘clicky’ and maintains a single view with code and debugger. You don’t need to have multiple screens to run the different consoles and rearrange them each time you need to minimize something. It’s built into the design and your desired workspace set up. With the addition of framework, library, and language plugin extensions, you can leverage this even further with ready-made boiler-plates.  Although the major feature of Visual Studio Code is being a code editor, with the addition of extensions, it becomes more than just a code editor. With the right settings, extensions, and configured shortcut keys, it can easily become a full-stack workstation. Atom allows for plugins and runs on the same general philosophy of extensibility – like Visual Studio Code. However, ATOM out of the box requires more configuration to turn it into an IDE. Visual Studio Code, in contrast, comes preconfigured with what you generally need to get started. This makes the ease of adoption much faster and easier than Atom.
![vs code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t96trdf7clbtplmcpima.png)

##_Decision time_
###So is Visual Studio Code the best code editor?
For most web-related development, the answer is yes. 
Now, it's your time to choose! Especially for beginners, it might be a very time-consuming process, so I recommend you to just try out a little of both, to finally pick the one.
How Javascript Engine's Work?
Tags: javascript, programming, webdev, beginners
Published: 2021-06-29 07:29:03

𝗝𝗮𝘃𝗮𝘀𝗰𝗿𝗶𝗽𝘁 𝗘𝗻𝗴𝗶𝗻𝗲 is a program that executes the javascript code. These days relevant modern engines use just-in-time compilation for improved performance. (As per Wikipedia)

![javascript engine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/baivubsmprmukfu2jyqc.png)

𝗗𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝘀𝘁𝗲𝗽𝘀 𝗼𝗳 𝗝𝗮𝘃𝗮𝘀𝗰𝗿𝗶𝗽𝘁 𝗲𝗻𝗴𝗶𝗻𝗲 𝗽𝗶𝗽𝗲𝗹𝗶𝗻𝗲 𝗮𝗿𝗲  (Generic for any JS Engine):

1. Javascript source code is passed to "Parser"

2. Parser divides the code into multiple tokens

3. It is converted into AST (Abstract Syntax Tree), a tree-like structure that represents functions, conditionals, scopes etc.

4. This AST is passed to the interpreter which converts the code into Bytecode.

5. At the same time engine is actually running the Javascript code

6. Bytecode is used by optimizing compiler along with profiling data

7. "Optimizing compiler" make certain assumptions based on profiling data and produces highly optimized machine code.

Sometimes there is a case where the 'optimization' assumption is incorrect and then it goes back to the previous version via the "Deoptimize" phase (where it actually becomes the overhead to us)

JS Engine usually optimizes "hot functions" and uses inline caching techniques to optimize the code.

𝗟𝗲𝘁'𝘀 𝘀𝗲𝗲 𝘁𝗵𝗲𝘀𝗲 𝗶𝗻 𝗩𝟴:
1. Interpreter is called "Ignition".
2. Optimizing compiler is called "TurboFan".
3. Apart from Parser, there is a "pre-parser" that checks for syntax and tokens

𝗔 𝗿𝗲𝗰𝗲𝗻𝘁 𝘂𝗽𝗱𝗮𝘁𝗲 𝗶𝗻 𝗩𝟴: "Sparkplug" is introduced which is present between "Ignition" & "TurboFan" which is also called Fast Compiler.

𝗡𝗼𝘁𝗲: These are high-level step's that most of the JS engines goes through and every engine goes through their own set of steps for further optimizations.

They do have stack, heap, garbage collector and is out of scope for this post.

Do share more about JS engines in the comments

Checkout my youtube channel for more such content:
https://www.youtube.com/channel/UCJErruzdazYFQfDdb6avbtA
My 3 year Linux anniversary
Tags: linux, opensource, computerscience, webdev
Published: 2021-06-29 07:15:23

Hi all,

It's been close to 3 years (newbie in Linux standards) since I've made the switch to full time desktop Linux and I just want to put it out there that I've been really enjoying the whole  journey and learned a lot from the community than I ever did from anywhere else. It had helped me understand more about software and  computers and also improved my workflow and speed up computing tasks in general and my love for the terminal keeps on reaching newer heights.


I believe that Linux would be very interesting for those people who likes the DIY approach and since Windows 11 doesn't offer decent support for older hardware that can be one of the many reasons for you to change to a much more free and privacy respecting more secure and open operating system build by the people without business intentions (*not all though).


Don't blindly switch to Linux when someone says so! It's not for everybody and I respect that. But for any of you interested in switching to full time Linux. Do watch this: [linux-for-windows-users](https://www.youtube.com/watch?v=fvkc5WzciHw) (The guy doing the video is not from a tech background!)


Do check out my blog (some things have improved from the time of writing): [reasons-i-switched-to-linux](https://dev.to/gauthamp10/reasons-why-i-switched-to-linux-full-time-30ek)


PS: Neither am I an activist nor trying to stir up any debate here Just the user!. I do respect other people's effort. But I prefer Linux over other operating systems that's all. 

Penguin (TUX) image credits:[Brian McMahon](https://brianmcmahon.myportfolio.com)

Have a nice week.
WatchOS modular error complication

Published: 2021-06-29 06:41:05

Hello everyone, 

This doesn’t really fit on this subreddit, but since there is no watchkit development subreddit, I thought I’d try here.

The calendar app on watch has a complication for the modular large slot. The design is like this: header colored red, first line colored white & second line colored gray. I want this for my complication but I can only get it to header red & other lines gray. Is this a private api that the calendar app is using or am I missing something.

Hope i'll get my query resolved. 

Regards
Jessica
Performance heads-up display in Chrome
Tags: chrome, webdev
Published: 2021-06-29 06:31:25

As you may have noted, I'm busy with the performance on this website lately as we just talked about [optimizing animated content](https://daily-dev-tips.com/posts/moving-from-gif-to-video-format/), and [improving our lighthouse score](https://daily-dev-tips.com/posts/keep-improving-your-lighthouse-score/).

And with that, I found a super cool feature in Chrome, a so-called Performance Heads-up Display (HUD) baked in the core of Chrome!

![Performance heads-up display in Chrome](https://cdn.hashnode.com/res/hashnode/image/upload/v1624544268299/qX5qR5qua.png)

This used to be an extension that you could add to Chrome, but it's now inside Chrome.
The display shows very useful information that you know from Lighthouse.

Including:

- Largest Contentful Paint
- First Input Delay
- Cumulative Layout Shift
- Average Dropped Frame
- Max Dropped Frame
- 95th Percentile DF

## Enable the performance heads-up display in Chrome

Of course, you are now wondering how to enable this, right?

1. Type `about:flag` in your chrome browser
2. Search for `Show performance metrics in HUD`
3. enable it and relaunch Chrome

These steps make it available in the top right corner.

![Enable Performance HUD in Chrome](https://cdn.hashnode.com/res/hashnode/image/upload/v1624544153380/YHHmpAwNZ.png)

This is super useful when doing many performance upgrades that you want to check right away, without waiting for Lighthouse to render.

The feature is also coming to mobile, but it doesn't seem to be in Chrome for iOS yet.

I am looking forward to also having the display there.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)