teleren/devto huggingface dataset:
Advantages of PHP Web Development for Businesses

Tags: webdev, webdesigncompany, websitedevelopmentservices, websitedevelopmentcompanyinusa
Published: 2020-11-24 12:56:15


In the last few years, the business website has become the most important aspect of every business. The better your website is, the more your business appear professional.
Many businessmen get confused about which programming language to use for developing their business website. Here, we’ll discover how PHP web development is the ideal choice for businesses.
<strong>The Advantages of Choosing PHP for Web Development</strong>
<strong>Save Money</strong>
PHP is open-source and free to use. This fact is the selling factor for PHP. As an open-source programming language, PHP opens horizons for developers to develop the web apps without any limitation.
And as PHP is freely distributed under General Public License, it stands out as the most cost-effective programming language for your business.
<strong>Scalability</strong>
One of the biggest advantages of PHP language is its dynamically scalable features.
The PHP functionalities get regular updates for continuous evolution. Thus, PHP-based websites can easily adjust with your business.
<strong>Easy to Use</strong>
Because of PHP’s object-oriented and open-source nature, it is easy for developers to develop PHP websites and maintain them afterward.
<strong>Save Time</strong>
PHP is an object-oriented as well as a procedural language.
Therefore, PHP enables code reusability. While building web apps, incorporating the reusable PHP components saves a lot of time and effort.
<strong>Better User Experience</strong>
Compared to other programming languages, the user experience provided by PHP-based websites is extremely rich.
The PHP-based websites are multi-responsive and provide easy navigation and a smooth user experience.
<strong>Less Dependency</strong>
PHP-based websites can run on any platform including macOS, Linux, or Windows.
It also supports multiple servers like iPlanet, Apache, Caudium, Netscape, Microsoft IIS, etc., and more than 20 databases such as MongoDB and MySQL.
<strong>Massive Community</strong>
Over the decades, PHP has built a supporting community. If you are confused about how to use PHP in the best possible way for your business or facing any technical issue, the members of the PHP community are always there to help you out.
Take advantage of the best in the game PHP <a href="https://mindpooltech.com/website-development-services/">website development services</a> provided by Mindpool. Our years of experience with PHP and a highly dedicated team of PHP developers make us the best website development company in the USA.
My First React Custom Hook
Tags: react, hooks
Published: 2020-11-24 13:17:03

###Premise

I've created a simple counter in React that increases and decreases a number, using the useState hook in React to pass down props to the buttons.  I wanted to create a hook that showed the previous total to the user

It uses useRef() to store the current value.  This is then placed inside a variable.  The useRef hook returns an object with one property (current) You can read more about useRef here https://reactjs.org/docs/hooks-reference.html#useref

usePreviousTotal
![code](https://dev-to-uploads.s3.amazonaws.com/i/fm8nxfsxp50r3962qmje.png)


I've also used a useEffect hook as I'm reaching inside the DOM to grab the current value, this is stored in the dependancy array as I only want to render this when that value changes. You can read more about useEffect here https://reactjs.org/docs/hooks-effect.html

Now all that is left is to import the hook into the app.

![hook](https://dev-to-uploads.s3.amazonaws.com/i/d6w2jx7ffsyx0vjcfgwz.png)
 And that's it.  Look more at the React docs for more information. 

![counter](https://dev-to-uploads.s3.amazonaws.com/i/kcuqy4rie6ow9j9rjxkx.png)
Daily Developer Jokes - Tuesday, Nov 24, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-11-24 13:00:25

---
title: "Daily Developer Jokes - Tuesday, Nov 24, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Tuesday%2C%20Nov%2024%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125997196ca.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q___: Why are keyboards always working so hard?

___A___: Cause they have two shifts!
 -->
Good HTML Practices
Tags: books, startup, entrepreneur
Published: 2020-11-24 10:32:54

Over time just writing code holds very little value, that is because it is no more efficient, and loses modularity. Writing clean code becomes very essential.
Some good practices while writing HTML are listed below:

1. Start with DOCTYPE
   DOCTYPE is required for activating standard mode.
   Bad:                             Good:
    <html>                           <!DOCTYPE html>
     ...                             <html>
    </html>                           ...
                                     </html>
  
2. don't put white spaces around tags and attribute values.
Bad:
<h1 class=" title " >HTML Best Practices</h1>

Good:
<h1 class="title">HTML Best Practices</h1>

3.Don’t omit the closing tag
It is always a good practice to close all opened tags and in the same order.
Bad:                                 Good:
<html>                               <html>
  <body>                                <body>
    ...                                  ...
                                        </body>
                                     </html>

4.Don’t mix character cases
Either have them written in UPPER case on in the lower case. It gives consistency also.
Bad:
<a HREF="#general">General</A>

Good:
<a href="#general">General</a>

Also Good:
<A HREF="#general">General</A>

5.Don’t mix tag for CSS and JavaScript
Sometimes script element blocks construction.
Bad:
<script src="/js/jquery.min.js"></script>
<link href="/css/screen.css" rel="stylesheet">
<script src="/js/main.js"></script>

Good:
<link href="/css/screen.css" rel="stylesheet">
<script src="/js/jquery.min.js"></script>
<script src="/js/main.js"></script>

Also good:
<script src="/js/jquery.min.js"></script>
<script src="/js/main.js"></script>
<link href="/css/screen.css" rel="stylesheet">

6.Use main element
main element can be used wrapping contents.Not use <div> everywhere.
Bad:
<div id="content">
  ...
</div>

Good:
<main>
  ...
</main>

These practices make error rectification much easier and also helps with accessing elements easily
Validation of the tech roundup providing statistics for Android Developers
Tags: android, androidstudio, developer, research
Published: 2020-11-24 12:18:53

We're reaching out to Android Developers who would like to share their thoughts and help us validate the user journey of the tech roundup providing statistics for Android developers across the world. 

Please comment or email agata.stasiuk@potatolondon.com if you'd like to help.
The Black Friday 🎁 and Cyber Monday 💝 Thread 2020
Tags: discuss, watercooler
Published: 2020-11-24 12:09:11

---
title: The Black Friday 🎁 and Cyber Monday 💝 Thread 2020  
published: true
description: Best Black Friday deals and Cyber Monday offers you came across
tags: discuss, watercooler 
cover_image: https://user-images.githubusercontent.com/3650216/100090638-7b54af00-2e79-11eb-8c93-3d3a6593b934.gif
---

What are the Best Black Friday and Cyber Monday deals you came across for fellow developers?

***🚨 PLEASE DON'T SPAM*** 

All the deals are accumulated in this Repo, even those that are not mentioned here.

{% github sarthology/DevBlackFriday2020 %}
Top 9 best & most popular tools of Big Data
Published: 2020-11-24 11:48:38

What is Big Data :- The term ‘big data’ is self-explanatory − a collection of huge data sets that normal computing techniques cannot process. The term not only refers to the data, but also to the various frameworks, tools, and techniques involved. Technological advancement and the advent of new channels of communication (like social networking) and new, stronger devices have presented a challenge to industry players in the sense that they have to find other ways to handle the data.

As Gartner defines it – “Big Data are high volume, high velocity, or high-variety information assets that require new forms of processing to enable enhanced decision making, insight discovery, and process optimization. Let’s dig deeper and understand this in simpler terms.

Current usage of the term big data tends to refer to the use of predictive annalistic ,user behavior analytics or certain other advanced data analytics methods that extract value from data, and seldom to a particular size of data set. “There is little doubt that the quantities of data now available are indeed large, but that’s not the most relevant characteristic of this new data ecosystem. Analysis of data sets can find new correlations to “spot business trends, prevent diseases, combat crime and so on

Sources of Big Data :- There are several sources of Big Data and some of them are mentioned below, Read More at https://www.devopsschool.com/blog/top-9-best-most-popular-tools-of-big-data/
Intro to Bulma 
Tags: css, bulma
Published: 2020-11-03 23:48:09

I recently starting using a CSS framework called Bulma for a small react app I am making, which improves upon CSS significantly. It is open-source, standardizes criteria and concepts, and deals with quite a few issues in front-end development as a whole. It is based on Flexbox and reduces the amount of CSS code needed for customizing layouts. 

It is quite easy to learn and there are many templates on the official site for starting out. Bulma is also modular, allowing users to use parts of it like button styles or columns by importing .sass files. It also contains a large of components for anything one might need for a frontend layout and it also is compatible with most web browsers.

**Installation** 

`npm install bulma`

You also need to make your webpage responsive for Bulma to work correctly either by using the HTML5 doctype:

`<!DOCTYPE html>`

Or add the responsive viewport meta tag:

`<meta name="viewport" content="width=device-width, initial-scale=1">`

**Quick Guide**

An HTML starter template from the official site:

```
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Hello Bulma!</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css">
  </head>
  <body>
  <section class="section">
    <div class="container">
      <h1 class="title">
        Hello World
      </h1>
      <p class="subtitle">
        My first website with <strong>Bulma</strong>!
      </p>
    </div>
  </section>
  </body>
</html>
```

- Bulma modifier classes allow you to set alternative styles to almost all of the Bulma elements. Starting with is- or has-, you add after - a style of your choice. Example with buttons:

```
<button class="button">
   Button
</button>

<button class="button is-primary">
   Primary button
</button>
```
There are many more components like colors, cards, containers, dropdowns etc. that you can see in the documentation on the official site. Also Bulma libraries exist for React and Vue and other frameworks.

**References**

- https://bulma.io/
- https://bulmastyle.com/
- https://blog.devmountain.com/why-bulma-css-could-be-your-new-favorite-framework/
What is Dart ?
Tags: dart, flutter, programming
Published: 2020-11-24 10:51:20

Hello Geeks, In this article, we'll try to understand, what is Dart? and some interesting Features/Facts of Dart.

###**What is Dart?**
The Google's definition for dart says that
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tc4194ksjgyd5jgudspx.PNG)

So, We will divide the line into 3 parts:

####1. What is a Client Optimized Language in General?
The programming language optimized for crafting beautiful user interfaces and high-quality experiences is a Client Optimized Programming Language.

####2. It says Dart can be used for fast apps.

- So, guys talking about dart's speed, if we compare dart with few other OOP languages like java or especially javascript, dart is **2x faster**.
- The reason is that dart can complie at both the Run-Time (JIT) or Ahead-of-time(AOT).
- The difference between **JIT** and **AOT** Compilation:
    - In [JIT](https://en.wikipedia.org/wiki/Just-in-time_compilation) (Just in Time) compliation the complier converts program source code into native machine code just before program execution.
    - In [AOT](https://en.wikipedia.org/wiki/Ahead-of-time_compilation) compiliation works by compiling your code before the runtime environment runs the code.The AOT compiler is typically used when the app is ready to be deployed.
- You can also take a look at Dart versus Node js fastest programs [here](https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/dart.html)

####3. Then it states Dart can be used on any Platform.

Yes, Dart runs on any platform, whether you’re creating a Mobile app, Web app, Command-line script, or Server-side app. Due to Flexible compiler technology Dart code can run depending on your target platform.

###**Few Features of Dart** :

1. Getting started with dart is very easy.We don't even need to install anything. Directly hit the [Dartpad](https://dartpad.dev/) which is an open-source tool that lets you play with the Dart language in any modern browser.
2. Second most interesting thing about dart is it is Open Source which means that if you see a bug, you can immediately report it, or fix it yourself.This is something a lot of programming languages lack.
3. Dart is easy to scale whether you are working with a small database with 100 records or a large set with 1 million.
4. Dart is consistently updating which inturn indicates its active development.
5. Dart has its own package manager called [Pub](https://pub.dev/)
6. Dart has built in support for different types of [Testing](https://dart.dev/guides/testing) like Unit Testing, Integration Testing, and Component Testing.
7. Dart when used in Web Applications, is transpiled to JavaScript so it runs on all web browsers.
8. The Dart installation comes with a Dart VM as well to run the .dart files from a command-line interface.

Thank you guys, let me know what you think about this article, and Dart. I hope this guide will help you with your learning, and hopefully save your time!
Why You Should Always Use Curly Braces For Single Statement Blocks In C#
Tags: csharp, beginners, codequality, dotnet
Published: 2020-11-24 10:41:51

> Some say it is a personal preference and it's not a big deal. I'd say it is not a personal preference anymore to omit curly braces for single statement blocks ... here is why:

A single statement is one line of code that usually sits below *If*, *While* or *For* commands.


```c#
if(string.IsNullOrEmpty(someStr))
   Console.WriteLine("someStr is empty. surprise!!!");
```

I used to think if it is a one liner, it's cleaner to have it without curly braces. Even maybe put it in one nice and short line. After all, C# compiler allows it, who am I to disagree with that .. lol

I posted a while ago about [how a newly joined developer affects how you should write code](https://programmerbyday.wordpress.com/2020/11/13/why-a-newly-joined-developer-affects-how-you-write-code/), we want to write the code in a way that it is easily readable by every team member in future and it also creates a structure that prevents future mistakes. Over my past years, I learnt that always using curly braces is one of those structures.

### Curly braces makes the block less error-prone to future modifications by others.

What if someone decides to comment out that one-line:

```c#
if(string.IsNullOrEmpty(someStr))
   Console.WriteLine("someStr is empty. surprise!!!");
```

What if someone adds a new line and forgets to surround the block with curly braces:

```c#
if(string.IsNullOrEmpty(someStr))
   Console.WriteLine("someStr is empty. surprise!!!");
someStr = "Default string in case of being empty";
```

### Curly braces make the code more organised in case of multiple *if..else* statements
```c#
if(varA > varB)
   Console.WriteLine("varA is bigger");
if(varA == varB)
{
   logger.Log("we got a match");
   CalculateFee(varA, varB);
}
if(varA < varB)
{
   var result = fetchItemsDatabase(varB);
   if(result is null)
      break;
   if(result.Length > 0)
      foreach(var item in result)
         Console.WriteLine(item);
   if(result.Length == 100)
   {
      logger.Log("Celebrating 100");
      Celebrate100();
   }
}
```

You see? It puts cognitive mental load in order to separate each block of code. God forbids, if indentation was not done right, it will get even worse and becomes a nightmare to maintain this code!

### There is not much value for a single line block anymore

When this feature was introduced (perhaps in C/C++ compiler), I believe it was to save some space and shrink the code to make it more readable. Back then, functions and code blocks were quite lengthy and convoluted.

It is not the case anymore though. We now break down logics into small manageable pieces, the storage is cheap, compilers can handle millions of files in a project and most developers use multiple big screens to read the code. So there is no point in shrinking the code and saving some space by not using curly braces.

Takeaway
--------

Use curly braces always 🙂
Angular Directives in 5 minutes
Tags: webdev, angular, html, typescript
Published: 2020-11-24 10:33:39

# So what are directives?
These are attributes added to our DOM elements, that make them dynamic. They supercharge  ⚡ our DOM by adding extra functionality.

In angular there are two types of directives. Structural and Attribute directives.

Structural directives, change the DOM layout, by adding or removing content. Some examples include *ngIf and *ngFor.
On the other hand attribute directives, change the behavior of an element. Some examples include *ngClass and *ngStyle.

In this post, we will be looking at the most commonly used directives.


### *ngIf
This directive conditionally shows content based on an expression's value. 

Syntax:
 *ngIf="expression"

 Example:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6pt22303spifz1g78q7g.png)


If our expression results in a truthy value, our HTML tag will be rendered. In this case our expression is false, so the p tag will not be rendered


### *ngFor
This directive repeats a given DOM element for each element found in an array.
 
Syntax:
*ngFor="let item of items"

Example:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/102thpeefencqiiwurrr.png)


Here our array is the fruits array, and we reference each item in the array as fruit. Then we display it in our component using interpolation.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wli6cj7bei7g6i9xl50c.png)


### *ngStyle
This directive allows us to add styles dynamically to our tags.
Syntax:
In its simplest form, it is just property binding
We bind the background color of this div to be red

![ngStyle](https://dev-to-uploads.s3.amazonaws.com/i/028o8vxcas09t36935y7.png)

Plain syntax:
[ngStyle]="{style: expression}"

In this case, we bind it directly to a property in our logic. So our div will be red.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2ryvf49y88ok7zpsknqt.png)



### *ngClass
This directive allows us to set classes dynamically to our elements.
Syntax:
[ngClass]="{cssClass: expression}"

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qtlaoa9mzmru4462h3mc.png)

Result:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/s5unj9z7rt9e0x46x8sd.png)

Directives are powerful, when it comes to handling logic, there is a lot more to directives. We can even create our own custom directives.
Advantages of Using Fish Shell 🐟 
Tags: linux, bash, opensource
Published: 2020-11-24 10:27:04

### A Short Definition: 
Fish is a smart and user-friendly command-line shell for Linux, macOS, and the rest of the family. I've been using [zsh](https://ohmyz.sh/) and some other bunch of shells for many years but recently I have upgraded my hardware and I got a chance to taste the [Fish](http://fishshell.com/). Additionally, I have to say that I'm not planning to go back and I encourage others to use and experience Fish.
There are so many advantages of using Fish as a default shell which can improve your experience, namely:

## 1. Autosuggestion
One of the main reasons that I use Fish Shell is the autosuggestion implemented in the shell. This feature gives you the capability of quick access to the commands as you type. You can find this in [zsh](https://github.com/zsh-users/zsh-autosuggestions) as well. However, it was originally in Fish Shell at first place. In addition, Fish Shell has other features too, like if you mistype, it will show the wrong and invalid commands in red.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hvzjvug8gd6r1xblekpo.png)

## 2. Web Interface
Another amazing feature of Fish is that you can configure it as a web interface running on your local server. Also, the web interface allows you to modify the color of the scheme that you want. It also lets you browse your environment variables too. There are more features:
1. Finding terminal keybindings.
2. Beautiful and colorful command prompts.
3. Command line history!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fe7vht8bcqrz0wl23j8e.png)

## 3. Obvious Error Messages
When you screw up, Fish shows the errors and your faults plus the way that you can handle it!

### To sum up
Fish is so powerful and useful for users who work with other shells like zsh, bash, and so on if they want to try a new and advantageous shell.
❎❓Quiz: Web Performance #24
Tags: challenge, webperf, webdev, quiz
Published: 2020-11-24 10:03:48

Quiz time! Read what's to question of the day.

What is the module/nomodule pattern?

- A web performance monitoring pattern.
- A method in CSS to wrap images into modules.
- A pattern to export a WebAssembly component from RUST.
- A pattern that describes the practice of serving only modern code to modern browsers and only code to old browsers.

---
<center>[Answer the question](https://marcradziwill.com/web-performance-quiz/what-is-the-modulenomodule-pattern/)</center>
---
SCSS Là Gì- Cách Viết CSS Bằng SASS/SCSS Chuẩn Nhất
Published: 2020-11-24 09:56:38

SCSS là gì- Đây là một trong những chương trình tiền xử lý CSS .Nó sẽ giúp cho bạn viết CSS dựa theo ngôn ngữ lập trình với cấu trúc rõ ràng. Xem chi tiết tại: http://nghelaptrinh.net/scss-la-gi/