fabiochiu/medium-articles huggingface dataset:
Term 1 Assignment — Blog post. 5 ways a glass of red wine can be good…
By: Jenny Lucas
Tags: Wine

5 ways a glass of red wine can be good for you

We don’t know about you but we love a relaxing evening with a glass of our Smashed wine. And it seems the nation agrees, as stats from the Wine and Spirit Trade Association (WSTA) says over half of consumers in every UK region chose wine as their drink of choice

But did you know there are benefits to drinking red wine? Here are some surprising facts about red wine.

A glass a day keeps the dentist away…

‘Red wine mouth’ is real. Or is it?

Research suggests red wine could actually be good for your teeth.

Spanish scientists dipped cultures of bacteria responsible for dental diseases into various liquids, and found that red wine was the most effective at removing the bacteria.

A brain’s best friend

It keeps you mentally fit

People who drink a glass of red wine a day are less likely to develop dementia, especially Alzheimer’s, according to a study conducted at the Central Institute of Mental Health.

The study found that subjects who drank between two and three units a day were almost a third less likely to be showing signs of dementia at the end of a three-year-period than those who were teetotal.

Easier than the gym…

It keeps you physically fit

Women who drink a moderate amount of alcohol with meals are less likely to become overweight in middle age, says a report in the Archives of Internal Medicine. And red wine drinkers are the least likely to put on weight.

The report also noted that the women showed an increase in energy expenditure after drinking, suggesting they balanced out the additional calories in the alcoholic drink.

To infinity and beyond!

It can make you live longer

Research suggests resveratrol could help humans live longer lives, by suppressing molecules which cause inflammation as well as compounds in the blood which interfere with the production of insulin.

But, as with all these benefits, the advantage is only felt when wine is drunk in moderation.

It can help your bank balance…

If you’re looking for a delicious bottle of red that doesn’t break the bank we have you covered.

Shop our red wine selection and start feeling the benefits of drinking red wine today!

Smashed Wine Co. promotes responsible drinking. Get the facts here: www.drinkaware.co.uk
NFL Quarterbacks make Top Rated Wine
By: Mark Ihrig
Tags: Wine, Alcohol, NFL, Football

As we near the end of football season and the Super Bowl is upon us, we want to bring attention to Passing Time Winery. It was founded by NFL Hall of Fame Quarterback Dan Marino, and University of Washington Quarterback legend Damon Huard in 2014. Who would have thought that wine and football would be match made in heaven? Well Dan and Damon did and it all started with a dream and vision.

A friendship started when Damon served as Dan’s backup for the Miami Dolphins. Working together as teammates before and then remaining friends helped to bring their dream to reality. “Dan and Damon remained good friends and they finally got the nerve to start a winery in Woodinville and they have been crafting some seriously good Cabernet wines since their first release with the 2012 vintage (Washingtonwineblog.com).” With the help of a great esteemed winemaker, Chris Peterson, they were able to hit the ground running and produce an exquisite product. “The first vintage was 450 cases, and even at $75 per bottle, the wines quickly vanished, thanks in no small part to the owners’ athletic fame and Peterson’s winemaking prowess (Seattle Times).” They have continued to produce since then and still sell out every vintage.

Their passion for this business has shown brightly and they have truly made a name for themselves in the ever growing wine world. They are very hands on and even Damon can even be seen delivering the wine to their accounts. “I drive to the back of El Gaucho in Tacoma and deliver the wine. To me, I felt like we had to have that personal touch early on for people to take us seriously. I want to have that relationship with the restaurants and the folks (Damon Huard, thenewstribune.com).” You won’t find many pro athletes that you can shake hands and drink wine with.

Originally published at www.cellarswineclub.com.
Ordering Wine For Beginners
By: Mark Ihrig
Tags: Wine, Drinking, Alcohol

48% of American adults drink wine a few times a month. If you’re not sure of the difference between a Côtes du Rhône and a Château Méaume, though, choosing a wine on a date can seem impossible. From choosing a type, to a vintage, to knowing the correct procedure for tasting, the world of wine can be intimidating. But if you’re worried about picking the wine for your next date, don’t — there are a few simple guidelines that can turn wine from a headache into a relaxing, enjoyable experience.

What Are You Eating?

On a date, it’s likely that you’re having dinner at a restaurant, rather than just drinking wine. Lucky for you, this makes choosing your wine a lot easier — instead of worrying about particular notes, one of the simplest ways to pick a wine is when you’re pairing it with a meal. The easiest way to remember wine and food pairings is by color: red wines pair well with red meat, where lighter meats like fish pair well with white wines.

Once you know that, you can delve into the particulars of different blends: acidic foods like tomato-based meals pair well with acidic wines like Sauvignon Blanc, where lighter wines like Pinot Gris can pair well with salads or other light meals. When pairing a wine and food, you want to avoid a mismatch: the wine should complement the food, not clash with it.

If you’re eating something bitter, for example, you don’t want a sweet wine like moscato — rather, a dry white or a full-bodied red will match well. The most important thing, of course, is to choose a wine you and your date will both enjoy: if you don’t like reds, then don’t order one, even with a steak.

How Are You Meant To Pick Up The Notes?

If you’re a wine novice, don’t worry about the discrete flavors in your wine. Learning to pick up notes takes time and practice, and you shouldn’t expect yourself to know it right away. When you taste a wine, the primary purpose is to see if you like it, and if it’ll go with your meal. Neither the sommelier or your date is expecting you to pick up the hints of other flavors in your wine — don’t sweat it. All you need to do is enjoy the wine.

Wine menus can be long and complicated, so there’s no shame in being intimidated by one. Keeping a few simple pairing guidelines in your mind can help you narrow down your choices, as well as knowing your personal preferences. As for your date, if they have any particular dislikes, they’ll make sure to tell you before you order. The most important thing, of course, is to make sure you have a good evening, so don’t try to stick to “rules” that tell you to choose something you don’t like. Just remember, there’s a wine out there for everyone.

Originally published at www.cellarswineclub.com.
Parmesan & White Wine Risotto
By: Allie Jane
Tags: Cheese, Dinner, Parmesan, Risotto, Wine

I’ll just come right out and say it. Wine and butter make for the best building blocks of a meal, and it is a damn shame that I don’t care for mussels because otherwise I KNOW that they would be all I eat.

In the meantime, when I am looking for a soupy, but not soup, dish with infinite depth and richness, I lean in hard to risotto with parmesan and white wine. I love the idea of a fussy-to-make dish that is very elemental in the ingredient list — arborio rice, wine, butter, shallots, chicken stock, parmesan, perhaps some peas or lemon or garlic if you’re felling frisky, but not required.

Standing over the stove and cooking down risotto is pretty laborious, but I love the way it develops as you go through the stages of adding broth cup by cup, and you watch the liquid go from stringent, bubbling white wine to a rich, velvet stock that gently coats each grain of rice.

Then the most satisfying part: you stir in the parmesan and the whole dish comes together in a slick, decadent cloud of flavor and texture. The twenty minutes of stirring (enjoying some leftover wine helps move things along in this stage) are worth the experience of sitting over a lovely bowl of risotto on a rainy evening, knowing that each fold of wine, cheese, and butter has been churned in with love.
What is wine?
By: Brenda Galaviz
Tags: Winemaking, Wine, Wine Tasting, Wineries

Wine is an alcoholic beverage made from fermented grape juice. There are also fruit wines, like apple wine, that are made from fermented fruits. But, strictly wine is made from wine grapes.

The difference between table grapes and wine grapes, among others, is that wine grapes are smaller, have thicker skins, more sugar and acidity, and more flavor. Actually, this is what gives wine structure and flavor.

But of course you know this already. What makes wine so special and aspires to be more than an alcoholic drink is their expression of place and time. Wine can tell you a lot about a vineyard, the year of the harvest and the work of a winemaker.

In searching to grow the perfect grape, the viticulturist has to remember certain indelible facts. He or she must be extremely aware that grapes require very specific growing conditions to be successful in wine making. The essential factors consist of the following:

· Soil conditions

· Temperature

· The number of days of sunlight

· The angle of the sun

· The variety of grape

· Vinification — the changing of grape juice into wine

The final factor in making wine that does not taste like rotgut is the skill of the vintner. He or she must utilize his or her skills to produce the best wine possible. In the process, the viticulturist must select plants that work into the schedule. Usually, the only grapes selected for wine come from 3rd year vines.

With love Brenda
Rarely will I review the same brand two days in a row, but such is the nature of *organized*…
By: Stephen Mcconnell
Tags: Wine Industry, Tuscany, Wine, Food And Drink, Wine Tasting

Rarely will I review the same brand two days in a row, but such is the nature of *organized* tastings. This morning at 10 AM Pacific, I had to open this bad boy and share it with a group of other “influencers”. Their word–not mine. So, with barely a couple drags out of the bottle, it has sat here all day waiting for me. Nearly identical color and body to the Rosso of last night, perhaps a bit deeper towards the ruby-scale from its clear, amber-tinged garnet. Smelling much more tincure-ish, the nose brings up many vermouth-rouge notes and even Aperol-type bitters. The fruit runs much darker cherry, black and concentrated, and the bramble lying at the core a deep woodsy instead of younger–cheaper–version’s candied bright berry. It’s obviously ripe and thick, with heady alcohol coating every surface. The elegance is unmistakable, the barnyard refined and compost-y, but the herbaceous funk is everywhere: a testament to old-world Sangiovese and the house-style.

Apparently, 2015 was a quite warm year, and the 14-5 the wine ultimately displayed quite higher than normal. This is probably why it shows so well at this young age: an almost *California* version which will no doubt be popular with their export market. Still, it’s a classic–and not particularly 99%-friendly. Obviously, I drink a lot of California wines, a good number of California Sangiovese’s, and also a generous helping of Tuscan 100% Sangio’s which are NOT Brunello’s, Rosso Montalcino’s or Chianti’s. These wines tend to be riper and rounder and fuller-fruited than the classic Italians, with vegetal funk firmly in check to appeal to the new-world demographic and possibly stemming from the scourge of Super-Tuscan-inspired palates. I love those versions of Sangiovese, but something like this takes you back a hundred years.

Clean and calm in the mouth, acid displaying at levels I don’t believe the “14-5” will ever have an issue with. The rich fruit is firmly integrated with tannin, making the two nearly inseparable. Brash and violently structured, peppery briar clanging away at the earth and mineral crispness and funkiness completely forgotten. I don’t have to sell you this wine: if you know, you know.

2015 BIONDI-SANTI Sangiovese Brunello Di Montalcino Tuscany Italy 14.5

https://www.wilsondaniels.com/winery/biondi-santi/
12 WINE MYTHS DEBUNKED
By: The Finest Italian Wine
Tags: About Wine, Wine, Wine Guide, Myths, Wine Myths

We’ve all heard at least one of them. How many have you fallen for?

Learning how to enjoy wine can be a daunting experience for beginners. With all the wine jargon and the sheer number of grape varieties and wine styles available, it’s little wonder a few ‘wine myths’ have crept in.

They may seem harmless, but some of these misconceptions about wine can derail your wine discovery journey. To help you make the most of your wine, let’s set the record straight about 12 common wine myths.

1. WINE ALWAYS GETS BETTER WITH AGE

When you hear about wine auctions where exquisite old wines are sold for astronomical sums of money, it’s easy to assume that all wine gets better with age. In reality, only a small number of wines benefit from ageing. These tend to be of exceptional quality and often have notably high levels of tannins and/or acidity, as these elements help to preserve wine. Most wines are meant to be drunk within a couple of years after bottling.

2. RED WINE SHOULD NEVER BE CHILLED

One of the first things most beginner wine drinkers hear is “only keep white or sparkling wines in the fridge” and “reds should be always served at room temperature”. Although in many cases red wine characteristics are best expressed at warmer temperatures than whites, there are some exceptions. The best red wines to try chilled are usually light- to medium-bodied with low levels of tannins, such as wines from Beaujolais and those made from the Pinot Noir grape. Don’t be afraid to try experimenting, or to ask your restaurant wine server what temperature they would recommend!

Top tip: ‘room temperature’ is probably cooler than you think. Ideal serving temperatures for red wines range from 13˚C-18˚C (55˚F-64˚F).

3. A SILVER SPOON WILL KEEP YOUR FIZZ FRESH

We all know someone who puts a metal spoon or a fork inside the bottle of sparkling wine before putting it in the fridge, thinking it keeps the wine fizzy for longer. The rationale behind this sounds very convincing. The theory goes — as a good conductor, the metal spoon is quickly chilled in the fridge, the cold metal then emits cooler air around it, supposedly making it more difficult for the gas to escape from the bottle. However, this has been tested by many respectable researchers and it’s been found ineffective.

Top tip: If you don’t finish a bottle of sparkling wine in one sitting, you’re better off buying a good sparkling wine stopper or revive the bubbles using raisin. Kindly click on the link to read more: https://thefinestitalianwine.com/12-wine-myths-debunked/
As we are at the start of summer
By: Business Terms
Tags: Wine

LaSaan Georgeson. As we near the start of summer, let’s consider the mood we’re in…do we need to wine-down or wine-up? In either case, if you and I are anything alike, early summer spells moderate priced wines under $25/bottle, NICE.

Let’s see if the following suggestions help us in our wine-down mode and thirsting for a Red early summer: Think a bit more weight for that yummy BBQ you are about to embark upon with a to-die-for sip of Fall Creek’s Vintners Select CSM (Cabernet Sauvignon, Shiraz and Merlot), a take on a superTuscan, your meal will thank you with enhancements from this smokey sensational sip of fruity goodness from this Texas winery. Perhaps take a longer trip to France and enjoy the balanced lovely dustiness of a gamay filled with terroir at every corner engaging the mind like no other from Chateau de Pierreux Brouilly. Perhaps a slight more rustic sip of red plums, tobacco, a surprising lift of vibrancy on the palate throughout and smokiness on the finish from this red of Cape, S.Africa in the Fleur du Cap / Pinotage (just maybe another BBQ summer pairing).

If you are thirsting for early summer Whites to wine-down, let’s visit the Pacific Northwest again this time for a Pinot Gris with vibrant yet luscious mouthfeel of grapefruit citrus and limes, intriguing finish of spice from the Eola Hills Winery in Oregon. Alternatively lets travel to Greece and try an elegant vibrant unique Vidiano from Alexakis Winery in Crete, engaging sip of peach and pear wonder with streams of minerality running through the finish.

Looking to wine-up the season with Reds…lighten up the palate with these bottles in your arsenal. Get excited with a crazy sip of delicious and aromatic Petillant Naturel Rosé (Pet-Nat) a try, loaded with tropical fruits, a bit of minerality and awesome funk likely from ambient yeasts, simple yet engaging with a lift of fizziness which you can’t stop sipping, from William Chris Vineyards, 100% Texas grown grapes in Texas Hill Country. Consider a pleasant balanced, old-world style Pinot Noir that you can’t wait to cozy up to with a hint of spice and all things nice from Firelands Winery in Isle St. George, Ohio of all places…dead serious, this is one serious sip of deliciousness. Or a more jovial taste of fresh red and black fruits, luscious mouthfeel with a clear sense of raw muscularity Clayhouse / Adobe Red from Paso Robles, California.

For wine-up whites, let’s revisit Texas with this lovely perfumey Viognier http://perissosvineyards.com/shop/2015-viognier-estate-grown /from Perissos all Texas grown grapes, providing a pleasant lift of exotic fruits, citrus happiness, slight spice centered with stoney goodness…this is your happy go-lucky elegant sip of amazing! As a complete contrast, give this aromatic Torrontes a try, loaded with ripened fruits of pear, peach and tangerine peel and subtle lingering astringent complexity of black tea, from Tilia Winery in Mendoza, Argentina.

Happy sipping~
Reducers in JavaScript
By: Nadun Malinda
Tags: JavaScript, Reducer, ES6

How do Reducers work?

The reducer is nothing else but a simple function that accepts two arguments and base on those two arguments, returns a new state value.

The reducer will accept a state and an action and then return a new state. Bellow is the pseudo function that represents this concept.

This can rewrite as follows with the JavaScript arrow function.

Please note that even though I used “color” as the first argument above, it is still the state variable, and we can name it whatever we need. And also, note that the second argument, “action.” This is a simple object with a property called type and optional payload property, another object. Because that payload object is optional, and for the simplicity of this first example, I’ll just omit it here and use it later down in this article.

Based on the type property in the action object, the reducer can return a new state conditionally.

This is a straightforward use of the reducer concept, but you’ll most often have complex states than this in your applications. It’s very common to use a switch-case statement rather than the if-else statement inside reducer functions. If this rewrite using a switch-case, it’ll look like this:-

Then let’s look at a bit complex reducer function with an additional payload property (object) in the action object.

Before diving into the reducer function itself, I need to highlight a couple of things in the above code section. First, in line number 2, I used JavaScript object destruction to extract properties from the payload object and bind them to a constant. If you are not familiar with this concept, I recommend going through that first.

The other main thing is, the reducer functions are used to return a new state value based on the incoming state value to the function. This means we never directly change the todos state; rather, the reducer function returns a new todos object. So, in short, the state processed by the reducer function is immutable.

Please note that in the line number 8 and 17 above, I’m using the JavaScript spread operator to change only the part of the matched todo without touching the rest of that todo. And also, using the array map method, I always ensure to return a new array by using the incoming todos array. That’s how we ensure the immutability of the state, in our case, the todos.

So, we can use our todoReducer function in our application like below. Please pay attention to how I define the action object and its optional payload property. The payload property (object) consists of a minimal amount of information our reducer functions need to know to change the state.

After calling to our todoReducer, the new todos state object will look like this:-
Destructuring in Javascript
By: Viral Patel
Tags: JavaScript, Web Development, Objects, Destructuring, ES6

Destructuring assignment, introduced in ES6, lets you unpack values from arrays and properties of objects and save them into distinct variables. Destructuring assignment allows you to assign the properties of an array or object to variables using syntax that looks similar to an array or object literals.

Examples

Array destructuring

const [a, b] = ["This", "That"]

console.log(a) // "This"

console.log(b) // "That" const [a, b, ...rest] = ["This", "That", "Else", "is", "rest"]

console.log(a) // "This"

console.log(b) // "That"

console.log(rest) // [ "Else", "is", "rest"]

Fallback to default values

Array values can be destructured into variables positionally. Any missing values will use the default values specified.

const [email = "john@abc.com", name = "John"] = ["john@gmail.com"]; console.log(email); // "john@gmail.com"

console.log(name); // "John"

Swapping Variables

We can use the destructuring assignment to swap the values of variables. With this, you no longer need to use intermediate variables to swap the values of the assigned variables.

var x = 33;

var y = 20; [x, y] = [y, x]

console.log(x); // 20

console.log(y); // 33

Object destructuring

const data = {

user: { id: 1, name: "John Doe" }

} const { user } = data;

console.log(user); // { id: 1, name: "John Doe" }

Nested Object destructuring

const data = {

user: { id: 1, name: "John Doe" }

} const { user: { id, name } } = data;

console.log(id); // 1

console.log(name); // "John Doe" // For more complex cases, the left side must have the same

// structure as the right side.

Fallback to default values

With destructuring, we can set defaults or fallback values so that if an item is not in the object (or Array, Map, or Set) it will fall back to what you have set as the default.

const styles = { width: 100 }; const { width = 50, height = 50 } = styles;

console.log(width); // 100

console.log(height); // 50

Note: ES6 destructuring default values only kick in if the value is undefined. If the returned value is false, null, or 0, it will not use the defaults.

Summary

Destructuring assignment allows for instantly mapping an object or array onto many variables resulting in saving us a couple of lines of code per function.

This syntax is more declarative and makes the intention clear.

The alternative to array destructuring would be to access and default things based on array index etc, which is less clear.

Destructuring in ES6 has already changed the way javascript applications are written.

You can learn more about destructuring at this link. https://babeljs.io/docs/en/learn/
ES5 vs ES6
Tags: Es5, JavaScript, Es5 Vs Es6, ES6

ES5 vs ES6 -one of the most important questions asked in the interview!👻Modern browsers currently support ES5 but ES6 has made writing the code for devs much easier and also tackles a lot of limitations of the language.

ES5 vs ES6

Normal function vs Arrow function

Here is the ES5 version -

ES6 version-

The above code can also be written as-

In ES6 you don’t have to write the return keyword if you don’t write the function body inside braces.

String interpolation

ES5 version-

ES6 version-

Destructuring

If you have to extract multiple values from the ES5 object you have to write code like this:

ES6 version-

Merging Objects

Code of merging objects in ES5-

We have to merge the object using Object.assign() which takes both objects as input and outputs the merged object.

ES6 version-

Default

ES6 allows you to set the default value to the parameters.

Promises vs Callbacks

In ES5 async code is handles using callbacks-

In ES6 async code is handled using Promises to get rid of callback hell-

To know more about Promises and Callbacks- Promises, Callbacks

Var, let, and const

ES5 does not support let and const. var is supported in ES5.

To know more about var, let, and const — read this article.

Exporting & Importing Modules

The syntax of importing and exporting modules in ES6 has completely changed. Let’s have a look at ES5 exporting and importing syntax-

Export-

Import-

Now, let’s have a look at ES6 syntax-

Import-

The ES6 syntax is quite easy right!

Now let’s talk about named export(export) and export default

Named Export-

Export multiple values in a file-

export const x = 1;

export const y = 2;

Importing these values-

import {x, y} from './module';

1.With named exports, you can have multiple named exports per file.

2. Import the specific exports you want to be surrounded in braces.

3. The name of the imported module has to be the same as the name of the exported module

Default Export-

const x= () => {

name:'Sher'

}

export default x;

Import it as-

import x from './module

You can have only one default export per file. The naming of import is completely independent when you are using default export and you can use any name you like.

Thank you for reading this article.🙏🌺
How to implement localization in your React App
By: Debabrata Nayak
Tags: JavaScript, React, Reactjs, Localization, ES6

In this tutorial I am gonna guide you how you can introduce localization in your react app. Before diving into detail, let me tell you what is localization. Localizaion of your app is nothing but providing your app users’ a privilege to read app’s text in a language of their choice translated by you. Read more here

The codebase for this tutorial is https://github.com/debabrata100/react-localization

After the end of tutorial we should be able to achieve this

We will finish this in 4 steps:

Project setup and installation from scratch Add header, footer and language dropdown Define messages in different locales and initialize react-intl Render correct text for locale selected

NOTE: This tutorial is based on create-react-app

Install create-react-app on your machine $ npm i -g create-react-app

1. Project setup and installation

Initialize your react boilerplate

$ create-react-app react-localization

Add react-intl(2.8.0) to your project.

$ yarn add react-intl@2.8.0

Start your project $ yarn start

2. Add header, footer and language change dropdown

Let’s add some text in Header and Footer section where we will format our text to different locales as well as add some style to our application. We will also add a dropdown to select different locales and save the selected locale in react component state as well as in localStorage.

You can add header and footer text as below

<div className="App">

<h1>Localization in Create React App</h1>

<footer>Love you 3000</footer>

</div>

Now let’s add the dropdown to select a locale. For now let’s add only one locale as English

<select>

<option value="en">English</option>

</select>

Now let’s add some more languages in a list and render the list. We will subscribe to the event on change of dropdown as shown below.

const defaultLocale = localStorage['locale'] ? localStorage['locale'] : 'en'; // English is default locale if none //is set const localeList = [

{ name: 'English', code: 'en', lang: 'English' },

{ name: '中文', code: 'zh', lang: 'Chinese' },

{ name: 'русский', code: 'ru', lang: 'Russian' },

{ name: 'Française', code: 'fr', lang: 'French' }

]; const [currentLocale, setCurrentLocale] = useState(defaultLocale); const onChangeLanguage = (e) => {

const selectedLocale = e.target.value;

setCurrentLocale(selectedLocale);

localStorage.setItem('locale',selectedLocale)

} ... <select onChange={onChangeLanguage} defaultValue={currentLocale}>

{

localeList.map((locale,index)=>(

<option key={index} value={locale.code}>{locale.name}</option>

))

}

</select>

I have used react hooks. If you are not familiar with hooks, you can create a class component. I have used localStorage here to store the locale so that even if we refresh the page, we will set our locale value as last selected. We have assigned localStorage value to defaultLocale variable.

Add some styles to App.css as below

.App {

text-align: center;

}

footer{

margin-top: 24px;

display: flex;

flex-direction: column;

justify-content: center;

}

Post these changes our component should look as below

App.js
Writing Clean JavaScript — ES6 Edition
By: Jihad Al Khurfan
Tags: JavaScript, Javascript Tips, Software Engineering, ES6, Clean Code

Photo by Redaco on dribbble

Clean code is not just code that works, but rather code that can be easily read, reused, and refactored by others. Writing clean code is important because, in a typical work environment, you are not writing for yourself or for the machine. In reality, you are writing for a group of developers who will need to understand, edit and build over your work.

This article focuses on writing clean JavaScript ES6 code which is not framework-specific, nonetheless, most of the mentioned examples can apply to almost any other programming language. In general, the following concepts are recommendations mostly adopted from Robert C. Martin’s book Clean Code, and they are not meant to be strictly followed.

1. Variables

Use meaningful names

Names of variables should be descriptive. The rule of thumb is that most JavaScript variables are in Camel Case (camelCase).

Note that boolean names usually answer specific questions, for example:

isActive

didSubscribe

hasLinkedAccount

Avoid adding unnecessary contexts

Do not add redundant context to variable names when the context is already provided by the containing object or class.

Avoid hardcoded values

Instead of plugging in constant values, make sure to declare meaningful and searchable constants. Notice that global constants can be stylized in Screaming Snake Case (SCREAMING_SNAKE_CASE).
How to create a React App without create-react-app
By: Nacef Otay
Tags: React, ES6, Js, Babel, Webpack

So for a pretty minimal setup, you’d want to :

Initialize a folder

mkdir folder

cd /folder

npm init -y

2. Create index.html under /dist folder

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8" />

<title></title>

</head>

<body>

<div id="root"></div>

<script src="./node_modules/react/umd/react.development.js"></script>

<script src="./node_modules/react-dom/umd/react-dom.development.js"></script>

<script src="./dist/main.js"></script>

</body>

</html>

3. Then you’d want to

npm install react react-dom

yarn add react react-dom //Dev_Dependencies npm install --save-dev @babel/preset-env react-hot-loader webpack webpack-cli webpack-dev-server @babel/core @babel/preset-react babel-loader yarn add --save-dev react-hot-loader webpack webpack-cli webpack-dev-server @babel/core @babel/preset-react @babel/preset-env babel-loader

Package.json

4. Create .babelrc

{ "presets": [ "@babel/preset-env", "@babel/preset-react"

] }

5. Create webpack.config.js

ot

6. Build your root component

Create a src/ folder and then create your app.jsx :

7. Write your ReactDOM renderer in src/index.js (note .js, not jsx - webpack won't find the file otherwise, without more configurations):

The easiest way to handle an incoming update is by self-accepting it from the changed module. This will cause webpack to execute the new version of the module. All we need to add module.hot.accept();

And congratulations, your react application has been created and configured.
Do Millionaires Think Like Us?
By: Brian Dickens Barrabee
Tags: Data, Couples, Women, Wealth, Men

Does beauty make a woman as desirable to a man as his wealth may attract her?

Are there traits that are more important than either physical appearance or wealth in a long term relationship?

Photo by Esther Ann on Unsplash

An article in The Atlantic Magazine points out that beauty and wealth were not the number one attraction that draw people together. “Kindness and understanding” took the day followed by “exciting personality” and then “intelligence.”

Men did valued “physical attraction” more than women did and women were attracted to “superior earning capacity” more than men in the Atlantic survey.

The article pointed out, however, that people tend to answer questions asked in surveys of man/woman atraction in a more altruistic way than their actual beliefs dictate. Their response is often affected by their perception of society’s approval.

Atlantic author James Hamblin goes on to point out, “ The love of beauty or attraction to wealth is relatively temporary and a deeper appreciation of character, kindness, understanding, intelligence and personality are more long lasting.*

Mutual appreciation of character traits run the marathon of life; looks and wealth run the sprints.

What of the millionaire? Do they think like us? Do we all appreciate similar traits in our partners?

In a study of 693 millionaires in which the wealthy couples were asked the qualities of their spouse that contributed to their successful long term marriages (average 30 years) the following results were somewhat surprising.

Percentage indicating important quality in partner:

Quality in spouse — -Male — -Female

High income. — — 12% — — 49%

Wealth — — — — — 12% — — 37%

Virtuous — — — — -88% — — -71%

Tidy — — — — — — 69% — — -55%

Cheerful — — — — -88% — — — 80%

Unselfish— — — — -86% — — -74%

Physically Attractive 88% — — 80%

Well mannered — — 91% — — -84%

Frugal — — — — —-46% — — — 39%

Honest — — — — — 99% — — —94%**

As the data would indicate, income and wealth took a back seat to all character traits and physical attractiveness in these couples..The survey indicates income and wealth*** are more valued by women than men but, even so, they lag far behind the other qualities.

Interestingly, physical attraction is shared as comparatively important by both.

A note to beautiful women out there: wealth and income in a marriage can’t buy you happiness. It can however, buy you a BMW so you can drive around in luxury while you try to find it.

Make sure to take your husband with you while you’re looking.

It is not lack of love, but a lack of friendship that makes unhappy marriages.” — Friedrich Nietzche

*The Atlantic Magazine — “The Myth of Wealthy Men and Beautiful Women— James Hamblin

** “The Millionaire Mind” — Dr. Thomas Stanley

*** Income is to be distinguished from wealth in that income is earning power whereas wealth are assets already accumulated.
The Value Of Good Conversation
By: Bekri M
Tags: Couples, Relationships, Lovers, Chatting, Love

One of the biggest privileges we have as humans is the ability to communicate with one another in deep and meaningful ways. No other living creatures have the ability to relate with one another on the level that humans do. While there are many ways that we experience depth in relationship, few things are as significant and powerful in our search for connection as good conversation.

If you think about it, it is quite amazing that humans have the abilitiy to grow up in entirely separate households, cities and sometimes cultures and still be able to have intelligent and meaningful conversation with one another. A child born in the center of London and a child born in the middle of nowhere in Canada could meet and share a conversation because they both have the ability to communicate in the same language. Amazing.

Because the ability to communicate in depth with other humans is one of our most distinguished privileges, we should never take that ability for granted. Instead, we should do all we can to increase our ability to have good conversation with the people around us. Think about all of the opportunities you have each day to engage another human being in conversation. You can talk to rocks, trees, or your favorite stuffed animal for as long as you want and you will never get a response. Saying something as simple as “hello” to another person can elicit a response.

One of the best ways to get good at conversation with other people is simply to practice. Take every opportunity that presents itself to learn the art of making good conversation with other people. Start by saying hello to the people you pass on the street. Ask the person who is checking you out at the grocery store or the teller at the bank how they are doing and ask if they are enjoying their day. Learn to respond with more than just one word when someone asks you a question. You will be surprised at how quickly you learn about conversation by doing small things such as these.

One of the things that is necessary for getting good at conversation is to really care about people and the things that they care about. It will be much easier to have a good conversation with someone if you are engaged and really caring about the things they are saying. There is nothing worse than trying to carry on conversation with someone that is disinterested in it. So commit to asking people questions that you really want to know the answers to and you’ll be a step ahead when it comes to making great conversation.

The ability to have good conversation is valuable because it is unique to humans. Enjoy the privilege you have to learn from others and to share wisdom with them by getting good at conversation.

12 word text that makes him need you in his life
Quiz Your Love Is It Love Or Infatuation
By: Bekri M
Tags: Relationships, Couples, Lovestory, Love

You are getting attracted. You think about him/her. You want to be with your object of love. You are showing all the signs of being in love. But is it love? Or is it infatuation that will go away after some time?

Let us examine this in little more detail. What is the difference between love and infatuation? The first difference is that infatuation is short lived. It disappears soon.

How will you test it? Think about all the qualities that are making you fall in this love.

Now think of another person. Imagine that the new candidate has all the qualities in greater measure. Think deeply and imagine as much as you can. Are you still in love, or you are shifting your allegiance to the new candidate?

Take another scenario. Imagine having a bad fight with your lover. Imagine of him/her calling you different names and arguing furiously with you. Are you still in love? Will you go back next day to them? Or you already hate them?

Take this test. After many years, your beloved is losing physical charm. Pick up photographs of some movie stars when they were young and compare with the way they look now. Do something similar with your lover. Are you still in love? Will you love them after so many years when they would have lost most of their physical charm?

Love is a feeling that lasts despite years. Love can take fights in its stride. Love cannot be easily defined, but in love you care for your beloved more than yourself. You become very selfless with your true sweetheart. Do you have that feeling? If yes, it is love. Otherwise you need to think more.

Next time your man shuts you out do this Men secretly crave this 1 thing more than anything else (and it’s not what you think)
Therapists Jerry Wise and Mark Smith tell us that the reason affairs happen is neither of the two…
By: A. Nonymous
Tags: Couples, Therapy, Relationships, Mental Health, Affairs

Therapists Jerry Wise and Mark Smith tell us that the reason affairs happen is neither of the two people have the emotional health to have a fifty-year connected marriage. The reason for this is you got married that way. The reason for this is your childhood.

I’m sharing this because I am a former “other woman” who did a HELL of a lot of work understanding WTF happened. I work and I work hard.

I also had a bit of help. You see, my guy dropped me to go into marriage counseling with his wife. I heard from him two and a half years later, and therapy did not help at all. He’s pretty honest with me, so I get the inside poop if I ask for it, and I have a pretty good bullshit detector.

The reasons counseling did not help in this case:

) The husband did not come clean about the affair in the first place. Therefore, the wife had no idea how truly serious the situation was. If she had, she might have had better sense than to go around badmouthing him to people outside the relationship when he moved out, saying things like, “He’s depressed,” and “He’s crazy.” Yep … He was depressed. But … yep. He had a good reason … two, actually. a.) He’s an adult child of an alcoholic with VERY low self esteem, and b.) She’s a champion distancer in the relationship who can’t connect to him with her own feelings because half the time she doesn’t know what they are. ) The second reason therapy didn’t do shit for this couple is this counselor only did the “five love languages,” which isn’t going to do poodoo when two people have deeply ingrained childhood issues such as the ones I’ve described. What these two needed was a Bowen systems therapist like the WISE fellow in the video up there, who could have unraveled how this happened in these two people making one the emotionally numb henpeckER and the other the emotionally numb henpeckEE. If you pick a therapist who doesn’t go deep enough, you’re likely to doom your marriage. ) The third reason this couple flunked therapy: The wife’s attitude. I heard from Husband: “I was hoping for a change in her that would spark a change of feelings in me. Instead, after insisting on the counseling, she sort of slept through it and acted like she really didn’t want to be there.” The person who behaves this way DOOMS THEIR MARRIAGE.

Interestingly enough, affairs also show up in your horoscope, and these three charts talk about all the same stuff.

This is all really important shit. From a former Other Woman, if you want to save your marriage, you are going to have to work and work hard. Go look up a video called “The Slaughter of Trust” on YouTube and watch ALL THREE PARTS. If you don’t want me coming back to steal your husband, this is your homework. Go Do It!!
Too tired or too busy for love?
By: Harikiran Singh
Tags: Relationships, Couples, Love

People say love is inevitable. Its human nature — impossible to ignore. And I agree — it indeed is human nature and from the moment we are born we are centred around that emotion.

What I mean, however, is romantic love — love that’s supposed to surpass all barriers and be a constant in our lives — is that love really inevitable?

As a person who has lived almost 3 decades of his life — my experience with love is the complete opposite to that of a traditional love story that Shahrukh Khan or Colin Firth seems to enjoy on the silver screen.

I have never had the chance to dance in a sequence when the girl I love looked at me or touched my hands. A snippet of a song might have played in my head but that was the extent of it. And I knew for a fact that even if I did break into an impromptu dance number — no one around me would join or know the moves to deliver a choreographed dance number.

In fact, as I grew older I realized that I actually do not want any snippets of such songs in my mind. I did not have the time to do a dance number or even wait behind the girl to keep saying ‘Palat’ till she turned.

I was increasingly becoming happy being on my own without any obligations towards anything or anyone. Possibly that might not be a very positive thing but inherently I am happy! And I observed that this was not peculiar to me — almost all my friends and peers seem to feel the same way. We would rather spend the time that is left with us after work with ourselves — we tend to get too tired to indulge in activities that leave us with no time for ourselves.

If I speak for myself, I would rather give my time at this point to myself than to anyone else. I feel too tired to do anything else or to give the same level of priority as myself to another person at this stage of my life.

I don’t know if I am being selfish at this point but this makes me happy. I don’t feel lonely or sad — I am occupied through most of the day and remainder of the time I am happy being with myself. And this feels like a more common norm at this point than it was ever before. People are indulging in short relationships or flings and honestly seem to be pretty happy in their lives.

Are we all too tired to invest in a proper relationship or do we not have the time or energy for it? I don’t know the answer yet but I do know that I don’t miss it. Not yet at least.
Wipe Her Lips|Love Quotes|Couple Quotes |TheSimplyPoems
Tags: Couples, Relationships, Quotes About Love, Quotes, Lovestory

QUOTE: He didn’t want to know her battling brain….He never expected her justifications….All he wanted was….To wipe her lips, with her eyes closed

The relationship between lovers or married people gets interesting when it becomes old. At the nurture stage it tests the love of each other.

Let’s see what the quote says

When she had her own problem with her life, she was mad at everything and everyone. He was no exception from her madness, but for people in relationship it hurts more seeing their partner suffering. Instead of fighting her or asking any explanation for her madness, he just wanted to be with her and go through the tough process together. That was what all relationship are about!

“Love alone can rekindle life.”

— Henri Frederic Amiel

Everybody needs love to be rejoiced in their life. It heals the soul. Fixes the heart. Guides you in the right path of life.

When you get the true love, the first thing you need do to is respect it. You can give it back in all ways, but respecting the true love you get from your partner is the more important. In the long run it will take your relationship into great heights.

“To know when to go away and when to come closer is the key to any lasting relationship.”

— Doménico Cieri Estrada

When you are in relationship, you don’t own your partner, the relationship should exist by your mutual understanding and not take any ownership on anyone. Respect each other’s feelings at the right time.

Share this with your loved ones and rejoice your wonderful journey together. Best wishes!

Follow us on

Facebook: https://www.facebook.com/thesimplypoems/

Instagram: https://www.instagram.com/thesimplypoems/

Twitter: https://twitter.com/poems_simply

Pinterest: https://in.pinterest.com/thesimplypoems/

Tumblr: https://www.tumblr.com/blog/thesimplypoems

Youtube: https://www.youtube.com/channel/UC1aClmpxhF91a4HwF__Wovw?view_as=subscriber