fabiochiu/medium-articles huggingface dataset:
5 Ways to Make the Most of Destructuring in JavaScript to Write Cleaner Code
By: Amy J. Andrews
Tags: Angular, Nodej, JavaScript, React, Programming

5 Ways to Make the Most of Destructuring in JavaScript to Write Cleaner Code

Destructuring is one of the most exciting ES6 features

Photo by Laurentiu Iordache on Unsplash.

Destructuring makes my code shorter and more concise. Especially when it comes to Redux, I have to deal with the immutability concept, which is easier with destructuring’s help.

In this article, I’ll show you five use cases of destructuring. Let’s get into it.
What Mispronouncing the Word ‘Misled’ for 26 Years Taught Me
By: Viggy Hampton
Tags: Life Lessons, Reading, Society, This Happened To Me, Self

Don’t sweat the small mistakes — others don’t even notice

We’ve all been there — whether we tripped in front of a coworker, stumbled over a sentence during a conversation, or gotten through an entire Zoom meeting with spinach in our teeth, we’ve all exposed small mistakes and flaws in front of others.

But you know what? The people who witnessed our tiny faux pas probably didn’t even notice, and if they did, they certainly don’t remember whatever it was that happened.

Don’t believe me? Think about it this way — there’s a phenomenon called the ‘spotlight effect’, which basically means that we think others notice us far more often than they actually do. We feel as though we’re under a spotlight.

The reality is much more comforting. Just as I am at the center of my own world, you are at the center of yours. When everybody feels that the spotlight is trained squarely on them, it’s actually trained on nobody in particular.

Thinking about my persistent mispronunciation in light of the spotlight effect, it’s not surprising at all that nobody called me out or even noticed my mistake.

I think there’s also an element of confidence that comes into play. Because I mispronounced ‘misled’ with confidence (because I truly didn’t know I was making a mistake), others took that at face value.

The (very small) con to reading early

‘Misled’ was not the first word (nor will it be the last) that I’ve consistently mispronounced. Words like ‘ethereal’ (which I thought was eh-the-reel), ‘Hermione’ (hero-mine to me), and ‘annihilate’ (an-nih-hye-late) all sounded completely different in my head than they did in reality.

This phenomenon is actually pretty common for those of us who are voracious readers. When we read a word early, we can’t always connect it with what we’ve heard people say in conversation. In other words, mispronunciations abound and we all probably have a story or two that fits the bill.

This is all to say that mispronouncing words isn’t something you need to feel horribly embarrassed by. Celebrate your vocabulary and embrace your opportunity to learn from your mistakes, because chances are nobody else even noticed your slip-up.
Single Review: Clockwork Heart // Monelise
By: James Hanton
Tags: Review, Music, Songs, Halloween, Music Review

The new single from Monelise tonally diverges from her debut album Hauntology. Released in time for Halloween, there is a deliciously creepy edge to ‘ Clockwork Heart,’ with ticking noises and louder string instrumentation adjoining with the more haunted, ghostly soundscape Monelise has become so good at. Throughout her new single, there’s something reminiscent of Nine Inch Nails in the way synth lies layered underneath all the other sounds, while the high pitches feel inspired from the ethereal sound of Cocteau Twins. The end result is a single with a wonderfully unique feel that rewards you first and foremost with kaleidoscopic sound mixing. It is a hypnotic, entrancing single.

Monelise’s vocals are the jewel in the crown. In a relatively short track, her most full range is on display as her voice sits perfectly alongside the varied layer of instruments. Her voice has adjusted well to a track has more of an obvious beat and pace than her recent work, which founded its quality in a slower, more patient approach.

‘Clockwork Heart’ is a real treat from a consistently unique artist. This macabre and beautifully eerie track builds on Monelise’s strengths while taking her sound in an exciting new direction.

Words by James Hanton.

Support The Indiependent

We’re trying to raise £200 a month to help cover our operational costs. This includes our ‘Writer of the Month’ awards, where we recognise the amazing work produced by our contributor team. If you’ve enjoyed reading our site, we’d really appreciate it if you could donate to The Indiependent. Whether you can give £1 or £10, you’d be making a huge difference to our small team.
Does Manual Therapy Reduce Fear of Movement and Pain Catastrophizing?
By: Zachary Walston
Tags: Health, Research, Pain, Healthcare, Fear

Photo: photology2000/Canva

Fear of movement and fear of future pain can decrease physical activity and quality of life, increase pain intensity and work absenteeism, and cause higher levels of disability. Fear is a powerful motivator. It can create a perpetual negative feedback loop that is difficult to escape. Fear and catastrophic thoughts may cause an over-reaction to pain or potential threats of pain or injury, leading to avoidance behavior.

Manual therapy, such as massage and joint manipulation, can provide short term reductions in the pain experience. But can manual therapy improve fear-avoidance, kinesiophobia, and pain catastrophizing in individuals with chronic musculoskeletal pain?

A recent research review concluded manual therapy was no better than no treatment or other treatments on reducing fear-avoidance, kinesiophobia, and pain catastrophizing. This is not to say manual therapy is useless, but it should not be used to target fear-avoidance, kinesiophobia, or pain catastrophizing.
The complete list of books for Quantitative / Algorithmic / Machine Learning trading
By: Peter Nistrup
Tags: Machine Learning, Books, Algorithms, Finance, Trading

To those who seek wisdom ahead:

Beware, for this is a long list.. (100+ books)

“You wont become an algorithmic genius savant extraordinaire philanthropist billionaire overnight.”

You wont be one in 3 months. You wont be one in a year either. You might not ever become one. But as with mostly everything in life if you apply yourself you might get closer and closer to achieving that dream of financial freedom.

Now obviously some of these have overlapping contents so you should do your own research about which books are more suited for your mindset and current skill set.

This list is comprised from multiple sources online and filtered to the best of my abilities into the following categories:

General Reading

Light Reading

Programming

Mathematics

Economics & Finance

Technical & Time-Series Analysis

Other

Derivatives

Make sure to follow my profile if you enjoy this article and want to see more!
Mastering React Functional Components with Recompose
By: Ilya Suzdalnitski
Tags: Higher Order Components, Recompose, JavaScript, React, Functional Programming

Disclaimer: this is not an introduction to React, and some familiarity with React is required. For an introduction to React, check my other article: React.js: a better introduction to the most powerful UI library ever created.

Over the years I came to a realization that the only proper way to develop high-quality React applications is by writing stateless functional components.

In this article, I will give a brief introduction of functional components, and of higher-order components. After that, we’ll dive right in into refactoring a bloated React component into a clean and elegant solution consisting of multiple composable higher-order components.

Photo by Dean Pugh on Unsplash

Introduction to Functional Components

Functional Components are called so because they literally areplain JavaScript functions. An idiomatic React application should consist exclusively of functional components.

First of all let’s take a look at a very simple class component

And now let’s rewrite the same component as a functional component:

As you can see, the functional component is much cleaner, shorter, and is easier to read. There’s also no need for the this keyword.

Some other benefits:

Easy to reason about - functional components are pure functions, which means that they will always produce the same output for the same input. Given name Ilya, the above component will render <h1>Hi, Ilya</h1> , no matter what.

, no matter what. Easy to test - since functional components are pure functions, it is very easy to run assertions against them: given some props, expect it to render the following markup.

Help prevent abuse of component state, favoring props instead.

Encourage reusable and modular code.

Discourage huge, over-complicated “god” components that have too many responsibilities.

Composable - behavior can be added as needed with a higher-order component.

If your component has no methods other than the render() method, then there’s really no reason to use class components.

Higher Order Components

A higher-order component (HOC) is a technique in React for reusing (and isolating) component logic. You’ve probably already encountered HOCs — Redux’s connect is a higher-order component.

Applying a HOC to a component will enhance the existing component with new features. This is usually done by adding new props that will get passed down to your component. In the case of Redux’s connect your component will get new props that got mapped with mapStateToProps and mapDispatchToProps functions.

We often need to interact with localStorage , however, interacting with localStorage directly inside of a component is wrong because it is a side effect. In idiomatic React, the components should have no side effects. The following simple higher-order component will add three new props to the wrapped component, and will enable it to interact with localStorage .
The N-Word Should Be Indiscriminately Censored
Tags: Race, Advocacy, Censorship, Music

The N-Word Should Be Indiscriminately Censored

Dismantling the double standard associated with this term

Source: Business Insider

Not long ago, Kendrick Lamar was surrounded by some controversy over the use of the term ‘Nigga’. During the Hangout festival in Alabama last year, the rapper called up one of his fans on stage to sing along to M.A.A.D. City — a song from his album titled ‘Good Kid M.A.A.D. City’. For those who do not know the song, it is riddled with the use of this word. The term alone occurs 15 times in the song’s lyrics.

The fan who chose not to censor this term while singing along to the song got booed by the crowd and berated by Kendrick himself because she was white, and she wasn’t allowed to use that word. I detect a double standard here because, had the fan been black, it wouldn’t have been an issue. Kendrick himself wrote that song, made millions of dollars off it, had no issues using the word but thought it was okay to ask someone who paid to come and see his performance not to sing all the lyrics because they are white, and it is offensive to black people? Not at all! I believe Kendrick Lamar was being hypocritical.

If he doesn’t want people to use that word, then he should lead by example. He should not take it upon himself to censor certain paying fans from singing his own lyrics just because they are white. After all, they paid for a ticket like everyone else and should be treated the same.

I myself am a big fan of Kendrick — I paid £80 to attend his concert at Manchester Arena back in March last year and the venue was largely dominated by non-blacks. Everyone sang along to the songs, black and white alike. And although it felt surreal to hear the crowd singing along to these lyrics, I wasn’t offended by the fact that all these white people were using the word ‘Nigga’ because the word was being used strictly in the context of the song lyrics and not maliciously towards another individual.

My own stance on the issue is that the term should not be used by anyone at all — be they black or white. The argument that black people have reclaimed its use to add impact to lyrics is complete nonsense to me. Why would anyone trivialise such a derogatory term which is deeply rooted in the enslavement of generations of black people just to add impact to a song? It doesn’t make sense. The English Language isn’t so limited that one must depend on racial slurs to write impactful lyrics. There would be an uproar — and rightly so — if Drake used the term ‘Jew bag’ in any of his songs. No one would give him a pass just because he is a Jew. In fact, he would probably receive even more criticism because of his Jewish heritage.

Since a lot of young people look up to Kendrick Lamar and other rappers, they have a responsibility to make sure that they are leading by example and passing on the right message to young impressionable minds. Implementing a double standard towards the use of derogatory words in their song lyrics is not the way to go.
Why Your Marketing Should Never Depend on Social Media Alone
By: Delaney Jaye
Tags: Marketing, Business, Thought Leadership, Social Media, Small Business

Why Your Marketing Should Never Depend on Social Media Alone

It’s time to take back your marketing power

Photo by Tracy Le Blanc from Pexels

Did you know that Facebook is investing $1 BILLION in original content this year? It’s the beginning of an experiment, and if it pays off, it could have a huge impact on marketing on this platform (and others).

We currently use platforms like Facebook and Instagram to deliver content to our audiences, and Facebook and Instagram rely on us to provide that interesting content to keep users on their platform. It’s a mutually beneficial arrangement.

As that dependency on our content goes away, the relationship we have today may no longer be mutually beneficial. If that’s the case, you can bet that your content and organic reach will suffer as a result — not theirs.
Rust’s struct update syntax made simple
By: Dylan Kerler
Tags: Rustlang, Rust, Code, Software Engineering, Software Development

Rust provides you with a very powerful type system giving you the benefit of having a nice safety net in case you accidentally mismatch different types.

This is not uncommon in programming languages but one of the things that sets rust apart, is that rust often provides you with syntactic sugar and shortcuts to avoid writing the dreaded boilerplate code that appears so often in other languages.

The struct update syntax is a perfect example of that.

Consider the following code:

Here we have to update every field in bar to be the same as foo but we only want to change the b field. For now, with 3 fields, it seems manageable but what if we have 10 or more fields in foo? That would be lot of boilerplate code, and repetition of foo.<field> .We can improve it using the rust spread operator:

Rust will move all of foos fields into bar, with the same key:value pairs as is in foo. Because we specified b field before the .. then our newly defined b field will take precedence (in the context of bar )over the b field in foo. The fact that rust moves all of the values into bar may be undesireable if you want to use foo at a later date. To prevent this we must ensure that each field in foo implements the clone trait. This can be achieved through macros:

You’ll notice that we also added the Default trait too. This is because we can actually reduce our boilerplate code even further. Consider the examples above — We initialise a and c to be Vec::new() and HashMap::new() These are what’s called initialiser values; They are boilerplate and rust’s Default macro provides you with a function default that actually has the power to infer these values and will return a struct with every field initialised to it’s initialiser value. Because of this, we can now combine both the default function and the struct update syntax to achieve the following:

Now that removed a lot of boilerplate code!
Facebook Sold $301.48 of Access to your Personal Data and News Feed since 2015, Will Sell Over 3X that in next Four Years
By: Tobin Brogunier
Tags: Facebook, Social Media, Media, Media Criticism, Data Science

Facebook Sold $301.48 of Access to your Personal Data and News Feed since 2015, Will Sell Over 3X that in next Four Years Tobin Brogunier Follow Feb 11, 2019 · 3 min read

Yesterday’s Q4 2018 earnings report shows Facebook has raked in an average of over $300 per US/Canada user selling access to your data and your News Feed since January 1, 2015.

Facebook publicly publishes a quarterly report showing “average revenue per user” or ARPU.

Data Source: Facebook Investor Relations

ARPU is the average amount paid at auction by advertisers to access a Facebook user’s personal interests. Advertisers pay to access data Facebook collects about users along with the rights to display their message to those users on the Facebook News Feed and elsewhere across Facebook and Instagram, which is also owned by Facebook.

Facebook also collects users’ personal information on WhatsApp, a private messaging app Facebook bought for $19 Billion in 2014. Information ‘mined’ from a user’s WhatsApp account is also sold to advertisers who are then able to target that same user on Facebook using data collected by the Facebook company on WhatsApp.

According to a Pew Research Poll released Jan. 16, 2019, 74% of Facebook users are not aware of how Facebook sells their data, or how it impacts their Facebook experience. Most experts agree the reason is a combination of factors including the complexity of how data gathering is related to targeting options and advertising auctions on the platform, along with Facebook deliberately hiding what it is doing with user data.

Facebook makes money by classifying a user according to personal interests in anything from specific video games to Ford trucks to hot yoga then brokering your information to people who want to influence how you think. For example, a political operative could pay Facebook for the ability to tell Ford truck owners Hillary Clinton would ban the sale of ammunition in the United States if elected in order to influence the outcome of an election.

For users, this means who you are may well determine who is trying to manipulate how you think, and what they say to manipulate you. In the same poll, users confirmed Facebook’s algorithm had accurately classified their political identity 73% of the time.
Starsky’s VP of Engineering: Disruptive Autonomous Trucking Is Already Here
By: Ain Mckendrick
Tags: Trucking, Autonomous, Transportation, Self Driving Cars, Engineering

Nearly every item sold in the U.S. gets shipped by a truck at some point, but the trucking industry is facing a crisis. Between a severe shortage of drivers and skyrocketing shipping costs, the challenge of meeting the demand for trucking is about to have a significant effect on both consumers and businesses. Some industries are hoping fully autonomous vehicles will solve the crisis, but that’s decades away. The market needs a disruptive solution, and it needs it today.

Just a few weeks ago, I joined the Starsky Robotics team as the VP of Engineering. Throughout my career, I’ve always enjoyed working on projects that presented an opportunity to build disruptive technology while targeting a realistic business plan. As much as I love challenging projects, I really get excited about the chance to ship a groundbreaking product. If there’s a common thread to my career, it’s that I get things built. I took this to heart when working on consumer products early in my career at Palm, and later while enabling millions of streaming devices during my time at Netflix. There’s no better sense of accomplishment than having people tell you that your product has made a positive impact on them.

I made my way into the autonomous driving space a couple of years ago, and the technology in this category is about as hard as it gets. If a hardware or software challenge exists, we have it. Given there’s still a heavy research component, many companies in autonomous driving are not focusing on a path to revenue any time soon. While this might be sustainable for larger companies throwing obscene amounts of money at the elusive robo-taxi, that’s not a wise plan for a startup. Building the equivalent of a research project or a select piece of technology and hoping to get acquired is not a business model that excites me. I want to work on business solutions that can be implemented today.

Enter Starsky Robotics. Starsky has been focusing on taking the autonomy challenge and breaking it down into things we can solve today, combined with a vision for even more sophisticated technology in the future. The Starsky approach is a pragmatic one that involves human drivers in the loop with teleoperations to augment the autonomous vehicles. The benefit is that Starsky has a revenue-generating autonomous fleet now, not years from now.
Are You Playing With The Stuff You’re Collecting?
By: Don The Idea Guy
Tags: Play, Inspiration, Creativity, Collecting, Action

Are You Playing With The Stuff You’re Collecting?

How full are your shelves?

I recently moved into a new apartment and I’m still unpacking boxes. Mostly boxes of books that need to be unpacked and put onto shelves. The process got me thinking…

What if instead of keeping and curating the books you’ve purchased over the years, you had to keep and display the knowledge and lessons and ideas you personally gleaned from the books (waitaminute I’m not done) — and actually put into action?

How many bookcases could you fill?

Could you even fill a single shelf?

I think most folks like to collect things to simply show them off.

Trophies, certificates, degrees (and books) but far fewer of those people put the knowledge they collected to daily use, and too few of them build on the ideas to make them their own and bring the concept to a new and higher purpose. They think:

That stuff might have worked in the classroom, but it’ll never fly in the real world. That stuff looks good on paper, but it’s impractical on a daily basis.

Putting the ideas into action is the entire purpose

It’s like the guy who collects Hot Wheels and Matchbox cars but never races them.

It’s the gal who collects comic books, and puts them into Mylar sleeves without ever reading them.

It’s the kid who collects action figures but never opens the package to construct imaginary battles in Gotham City.

If you’re not going to play with the stuff you’re collecting, what’s the point?
Solar
By: Matthew Donnellon
Tags: Creative Writing, Creativity, Fiction, Short Story, Space

In the spot that exists at the very edge of existence that is not bound by neither time nor space. A place so old it is not bound by death or life nor physics or any natural law. It is the dwelling of the timeless ones. The ones that supersede all natural order and even look down at primordial entities like Death as a old man would look at child.

And so begins the story.

The ageless ones lived a large structure, castle of grand proportions. Here they stayed until it was time for them to ascend, to do their duty. Some stayed longer than others and some played larger roles, but each had a place and each had reason.

The Primes, the first of the ageless ones, gathered their brethren each day to explain their duties. They taught them their new roles.

They were anchors of a new place called the universe. They would hold it together and become the pillars of all existence.

The ageless ones all looked different. Some were blue and hot. Others were giant and red.

As with all things, even entities older than time weren’t safe from ridicule. The larger ones made fun of the smaller ones. The ones that burned bright and blue made fun of their smaller and duller brethren.

There was Sirius who outshone them all. The was Betelgeuse who made them all look small.

They ran the lot and picked on the littlest ones.

They especially liked to pick on a rather average one named Sol. He was not the brightest. He was nowhere near the biggest. In fact, he was so ordinary the others tended to forget about him, except when they wanted to torment him. But he took it in stride, mostly because he didn’t have much choice.

And then it was time.

More accurately, it was time for Time to begin.

The Primes gathered them and announced it was their time to ascend. They lined up and each walked through the gates to another realm.

The Primes watched them leave and remarked on them.

“There goes Betelgeuse. What a sight. He’ll do good in the next world.”

“Ah Sirius. He will bring light to a thousand worlds he’s so bright.”

“Look at poor Sol. He looks so out of place among his brothers.”

The oldest of the Primes laughed, “You haven’t looked at the books have you?”

The others shook their heads.

“So you have no idea what in store for little Sol?”

“Tell us ancient one.”

“That little Sol may not shine the brightest. He might not shine his light on a thousand worlds. He won’t hold down a vast kingdom in the universe, nor will he be part of a particularly noteworthy galaxy. But little Sol is special.”

“How?” they all asked.

“The books say Sol is where life will begin. One little rock spinning around him is where all life will begin. It will take a long time, but one day life will spread from his little corner of the universe and fill the whole realm and little Sol will oversee it all.”

And the Primes watched as Sol walked through the gates not knowing what a role he’d play in the next world.
Teaching Penguins to Fly Wasn’t a Great Idea
By: Jm Miana
Tags: Pets, Fiction, Top Gun, Creativity, Humor

Photo by Paul Carroll on Unsplash

It began a night some years ago. I was drinking with some friends, arguing about the chance of penguins to fly. And after a few beers, a fight over a pictionary drawing of a penguin, and an argument over how many points is worth the word penguin in Scrabble, I went home, determined to teach them a lesson.

At first, it looked quite logical. After all, penguins are birds, and birds do fly, right?

Well, it happens they don’t. They spend the day on the ground, running around, chasing other animals and tweeting, I mean, like just making bird noises. And trying to fit them inside a plane was a complete mess: They refused to let me fasten their seatbelts. It hurt. A lot.

And as if things weren’t already awful, some of them took the plane and went off to Vegas to bet on the roulette. They lost every feather they had. And even lost the plane.

So defeated, I travelled back to the US and tell my friends about my failure training penguins in South Africa.

“Do you realize penguins live in the Antarctic, right?” they asked.

What the hell I’ve been trying to train then?
Using a k3s Kubernetes Cluster for Your GitLab Project
By: Luc Juggery
Tags: Software Development, Kubernetes, DevOps, Data Science, Programming

Integration in Gitlab

Let’s now get all the information needed to integrate our brand new k3s cluster in our Gitlab’s project.

Cluster name

Let’s call it k3s.

URL of the API Server

In the configuration file, the API Server is specified as https://localhost:6443. To access it from outside, we need to provide the external IP address of node1.

Cluster’s CA certificate

To provide the cluster CA certificate to Gitlab, we need to decode the one specified in the configuration (as it’s in base 64).

$ kubectl config view --raw \

-o=jsonpath='{.clusters[0].cluster.certificate-authority-data}' \

| base64 --decode

Service token

The process to get an identification token involves several steps. We first need to create a ServiceAccount and provide it with the cluster-admin role. This can be done with the following command:

$ cat <<EOF | kubectl apply -f -

apiVersion: v1

kind: ServiceAccount

metadata:

name: gitlab-admin

namespace: kube-system

---

apiVersion: rbac.authorization.k8s.io/v1beta1

kind: ClusterRoleBinding

metadata:

name: gitlab-admin

roleRef:

apiGroup: rbac.authorization.k8s.io

kind: ClusterRole

name: cluster-admin

subjects:

- kind: ServiceAccount

name: gitlab-admin

namespace: kube-system

EOF

Once the service account is created, we retrieve the resource of type secret that is associated:

$ SECRET=$(kubectl -n kube-system get secret | grep gitlab-admin | awk '{print $1}')

The next step is to extract the JWT token associated with the secret:

$ TOKEN=$(kubectl -n kube-system get secret $SECRET -o jsonpath='{.data.token}' | base64 --decode)

$ echo $TOKEN

We’re all set. Let’s now use all the information and fill the fields of GitLab’s Add existing cluster form:

Once the cluster is integrated, we can install helm (Kubernetes package manager) directly from the web interface.

We can now check from the command line that the tiller daemon (helm’s server-side component) is running.

$ kubectl get deploy --all-namespaces | grep tiller

NAMESPACE NAME READY UP-TO-DATE AVAILABLE AGE

gitlab-managed-apps tiller-deploy 1/1 1 1 67s

The cluster is now ready to use. On top of this, GitLab’s web interface allows one-click installation of additional components:
Celebrating the Special Olympics 50th Anniversary with Ann Costello
By: Renee Dease
Tags: Sports, Healthcare, Interview, Nonprofit, Health

An athlete shows their medals from the first Special Olympics games in 1968.

In July, I had the honor to travel to Chicago and help celebrate the 50th anniversary of Special Olympics. One of my responsibilities was to interview partners, athletes, and volunteers. While in Chicago, I had the pleasure of interviewing Ann Costello. Ann Costello is the Executive Director of the Golisano Foundation and has been working at the Foundation for more than 20 years.

The Golisano Foundation is an organization whose mission is to ensure that individuals with intellectual and developmental disabilities are valued as people who can contribute and be a vital part of their communities — as good students, neighbors and workers.

The founder, Mr. Tom Golisano, has given Special Olympics the largest gift in Special Olympics’ history and also the largest that Mr. Golisano has given to a single organization.

Prior to joining the Golisano Foundation, Ann worked for the United Way in Rochester, NY. “I was working with many organizations in the community that worked with people with intellectual disabilities (ID). Tom Golisano and I connected In 1999 when he was interested in in expanding his Foundation’s work. Almost 20 years later, we hold the same hope for an incredible future for people with ID as we continue to work to break down the barriers to inclusion.”

Special Olympics strives to make a world where everyone is included.

I asked Ann if she had a Special Olympics story that stood out from all the others. She immediately told me the story of an athlete from the Middle East who competed in the 2013 Special Olympics World Winter Games in South Korea. He practiced on sand because it never snowed in his country. He was able to win a gold medal because he practiced so hard. It’s harder to snowshoe in sand versus snow and he excelled. “No matter what part of the world you are from, everyone has his or her own challenges. By working hard, he brought home the gold for himself and his country,” said Ann.

When I asked Ann what she hopes to see in Special Olympics’ future. Ann responded, “Since 2012, when the Heathy Communities initiative began, Tom and I have seen tremendous progress in health outcomes. The organization, coaches, staff, and athletes all understand the impact of fitness and wellness in order to compete and do your best. This is an area for continued growth for Special Olympics around the world.”

50 years ago, Eunice Kennedy Shriver set forth the idea that all people with ID would be able to live their lives fully included in their communities. As Special Olympics goes into its next 50 years, the leadership of our athletes will show us the way to full inclusion.
An Introduction to React-Table
By: Jennifer Fu
Tags: Programming, React, React Hook, React Table, JavaScript

Basic Table

As always, we use Create React App as a starting point. First, install React Table with the command npm i react-table . Then the package becomes part of dependencies in package.json .

"dependencies": {

"react-table": "^7.1.0"

}

Change src/index.css to this for minimal table styling:

The following is a basic table, with five columns and ten rows.

Similar to any table, a React Table is composed of columns and data:

columns is an array of columns. Columns can be nested, which act as header groups. In addition, columns can be recursively nested as much as needed.

is an array of columns. Columns can be nested, which act as header groups. In addition, columns can be recursively nested as much as needed. data is an array of rows to be displayed on the table.

We set up src/dataSource.js for columns and data . In the following code, accessor serves as a column key, which is used to define each column in row data. The Column ID is generated from a string accessor or provided by the column definition. Header is the column display string or JSX. Both accessor and Header can be a function.

Replace src/App.js with our table code.

Lines 12 to 15 is useTable hook. It takes options and plugins to build a table instance. The basic options are columns and data. Plugins are optional.

In lines 7 to 11, we use a number of props from the useTable instance:

getTableProps is a function to resolve any props needed by the table wrapper. The built-in table props is {role: “table”} , which can be customized.

is a function to resolve any props needed by the table wrapper. The built-in table props is , which can be customized. getTableBodyProps is a function to resolve any props needed by the table body wrapper. The built-in table props is {role: “rowgroup”} , which can be customized.

is a function to resolve any props needed by the table body wrapper. The built-in table props is , which can be customized. prepareRow is a function that must be called on any rows to be displayed. It is responsible for lazily preparing a row for rendering.

is a function that must be called on any rows to be displayed. It is responsible for lazily preparing a row for rendering. headerGroups and rows are internal data structures derived from columns and data.

With the props from useTable instance, we obtain the building blocks to compose the Table in lines 18 to 40. headerGroups , rows , and columns are complex data structures, which include additional functions for use, such as getHeaderGroupProps , getHeaderProps , getRowProps , and getCellProps . You can also call column.render(‘Header’) and cell.render(‘Cell’) .

Below is the translated HTML definition of the table.
Let Users Know When You Have Updated Your Service Workers in Create React App
By: Gert Glükmann
Tags: Pwa, React, Programming, JavaScript, Service Worker

Showing the User an Alert and a Button When a New Version of a Service Worker Is Available

Using the same pattern, we show alert components when service workers have been updated.

{isServiceWorkerUpdated && (

<Alert

text="There is a new version available."

buttonText="Update"

onClick={updateServiceWorker}

/>

)}

This time we add an onClick function that’ll be triggered when clicking on the “Update” button inside the alert component. Because we want user sto click on a button and get a new version of the app.

All the magic is inside the updateServiceWorker function that we’re going to create.

This example is using CRA v3, which has a little addition generated inside the public/service-worker.js file. (If you’re using an older version of CRA, I’ve created a solution for that, too — just write to me.)

skipWaiting is a function that forces your new service worker to become the active one, and next time the user opens a browser and comes to your page, they can see the new version without having to do anything.

You can read more about skipWaiting from MDN. But this just forces your service worker to be the active one, and you see changes only next time. We want to ensure the user has a new version right now. That’s why we have to call it and then refresh the page ourselves — but only after the new service worker is active.

To call it, we need an instance of our new service worker. If you scroll back up to where we registered the service worker, you can see the onUpdate function had an argument called reg . That’s the registration object, and that’s our instance. This will be sent to the serviceWorkerRegistration property in the Redux store, and we can get our waiting SW from serviceWorkerRegistration.waiting .

This will be our function that’s called when the user presses the “Update” button inside the alert:

const updateServiceWorker = () => {

const registrationWaiting = serviceWorkerRegistration.waiting; if (registrationWaiting) {

registrationWaiting.postMessage({ type: 'SKIP_WAITING' }); registrationWaiting.addEventListener('statechange', e => {

if (e.target.state === 'activated') {

window.location.reload();

}

});

}

};

Because the service worker is a worker and thus in another thread, to send any messages to another thread we have to use Worker.postMessage (MDN). The message type is 'SKIP_WAITING' , as we saw from the generated public/service-worker.js file.

And we create an eventListener that waits for our new service-worker state change, and when it’s activated, we reload the page ourselves. And that’s pretty much it.

Now the user can see there’s a newer version available, and if they want, they can update it right away.
Facing Climate Change: Deep Adaptation and “Leftist Prepperism”
By: Violet Bee
Tags: Deep Adaptation, Social Change, Climate Change, Environment, Resilience

Listening to a favorite podcast of mine, The Vegan Vanguard, I was entertained to find them discussing doomsday preppers, or rather mocking doomsday preppers. Of course, it was not so simple as that, their mockery was primarily focused on the ultra wealthy, digging themselves million-dollar bunkers and getting young-blood transplants. Not wrong, I still found myself thinking that they took a very narrow view on the subject.

They did discuss the more “normal” people who are preppers, trying to live more closely to the land and deal with the current state of the world as best they can, but I think they missed the mark on really examining the topic.

As a person who does not fit the prepper mold, but certainly is one, of a sort at least, I wish they had found their way past the cringe-worthy hyper-male-ness of typical prepping and had looked closer at the world of preparation and adaptation.

To be fair, they did give some time to the idea that they should be learning some of the same skills that preppers tend to have and had some real ideas about community building. This isn’t actually a critique of the show, as much as it is reading that way now. It was rather entertaining and I’d recommend a listen, but I wish that more people were trying to really grapple with the truth that the climate is changing and humanity is in peril. These are not some far-off distant threats, society is collapsing around us as we speak.

The time to prepare and adapt has actually arrived.

After thinking for a few days about writing a response to the podcast, I was greatly pleased to find that Jem Bendell had more-or-less beaten me to the punch and posted Why Deep Adaptation needs re-localisation, using the framework of the Transition Towns movement as a concrete example of what adaptation looks like.

Prepping vs. Adapting

Rather than pure survival, prepping can be about resilience, most especially at the household or tribal level. By tribe, I mean a small close-knit group that has chosen to work together and the people you expect to care for in the case of an emergency, such as elderly relatives or other friends/family.

Adaptation is about community resilience. It is about teaching what you learn and sharing experiences. Both preparation and adaptation are necessary parts of a plan for humanity to not just survive, but thrive in our changed world.

It’s time to take concrete steps toward both preparation and adaptation if there is any hope for us.
10 Side Hustles to Make Extra Money As a Software Engineer
By: George Field
Tags: Freelance, Software Development, Startup, Side Hustle, Programming

1. Build an Educational Course

How we learn is changing, and the educational landscape looks far different today than it did 10 years ago. University education is becoming questionable due to the vast amount of online content that in a lot of cases provides more value than a very expensive degree that has no guarantee of a job once completed.

Photo by One zone Studio on Unsplash

It’s far cheaper for a person to spend $500 on several courses that are taught by people who are an expert in that area, who work in it every day, than a lecturer, who quite often, has no industry experience.

The result is that there are huge opportunities out there to create paid educational content in the form of courses and subscription-based businesses. Even more impressive is that this is an area that’s not impossible to get into because you have one thing that separates you from everybody else: your personality and potential teaching style.

People like different styles and personalities and learn better from different teaching styles. All you have to do is be you, teach, and provide value, and you will make money from this.

Although it’s more work, I’d recommend building your own platform to sell your courses as you have more control over pricing, branding, etc., and this is going to be what really makes you successful.

Examples

Yaroslav Shmarov created a course and launched on Udemy, generating 420 sales in 100 days. He made some really good points and more reasons to avoid using platforms such as Udemy.

Hosting courses on Udemy is free, but be ready to sell at $10 and get $2-7

On Udemy, you don’t get access to student emails/phones (so you can’t create your own community, and you can’t cross-sell well)

Hosting on Udemy is good if your potential audience niche is very big

The only engagement a teacher can have with active students is the Q&A section of a course

Overall, selling courses on Udemy can be considered passive income with minimum engagement required after publishing a course

Challenges

Course creation can be a huge earner — demand is high and only growing. The major issues with course creation are as follows:
Sick
By: Ioana Dragnef
Tags: Health, Coming Of Age, Comics, Anxiety, Hypochondria

Spiralbound

Comics for life, brought to life by Edith Zimmerman.
Do You Want To Rent Out Your White Privilege For A Day?
By: Rebecca Stevens A.
Tags: Society, Equality, BlackLivesMatter, Racism, White Privilege

Photo by Jayson Hinrichsen on Unsplash

So here’s the deal, I’ve got a lot of stuff that I need to do today, but I am a black woman. I don’t want to go to shopping because I know I will be followed around by the security guards, and after years of having to go through that, it gravely upsets me. I know that if I go out to walk my dog, I might meet that racist old lady around the corner and she may well insult me and spoil my day as well. I know that if I try to return the oversized jumper I purchased last week, it will be a hassle.

Somedays, the sheer exhaustion of being black is just too hard to bear, too traumatic. And so that’s why I am asking to rent someone with white privilege for a day. You might think that that’s absurd, but it’s not. Imagine how much less stressful my life would be with little to zero racism? I’m already breathing a sigh of relief just thinking about my rented white privilege.
You Don’t Need Math to Be a Software Engineer
By: Brett Fazio
Tags: Software Development, Startup, Computer Science, Careers, Programming

3 Skills More Important Than Math

If you’re going into software engineering and you’re not good at math, I don’t think the best route to make yourself a more attractive candidate is to learn more math. There are many areas that you can get better at or study that will have more tangible benefits for your career.

Interpersonal skills

This is one area that is seemingly overlooked, but improving your abilities in this area will help you from the interview stage all the way into your career. Starting in the interview stage, you will likely have a behavioral interview. Any soft skills you have will surely bolster your case for being hired. Even in technical interviews, soft skills will help you better articulate your solution and any help you may need with it.

Once you get into your career, soft skills will help you develop better relationships with your coworkers, participate better in meetings, and articulate your work.

Learning an additional area of specialization

Most people go into the field with one key area of specialization. This is great. Being very competent at one thing is a good way to make sure your skillset will remain valuable for a long time to come.

It’s very difficult and takes a long time to get extremely competent in one area, so it’s unlikely — but possible — to become skilled in another. What one can hope to do is introduce themselves to new areas and gain a foundation. That new foundation may serve as a career stepping stone, allowing you to transition to a new area or further your insight in your current field. It’s possible that you may pick up a new paradigm that’s applicable to your current job.

Learning design skills

Though probably not a popular choice, this may prove to be rather useful. You don’t have to go out and become a Pixar animator or a Photoshop expert, but a basic understanding of the tools and concepts will help in your software engineering job. In my internships at Apple and Google, I was asked to put together presentations and sometimes struggled to visually articulate what I wanted. An understanding of layout would be useful in that scenario.

If you’re working in the mobile or web field, an understanding of basic UI/UX design will definitely help. You would be able to provide more useful input into UI/UX decisions and write your future code with those principles in mind.

Lastly, if you’re just trying to break into the field with side projects, you will find design skills to be immensely useful. I’ve done a lot of iOS development, and whenever I needed to design a screenshot, an icon, or an asset, it’s never quite turned out the way I wanted it. I always had the idea in my mind, but due to my lack of knowledge in design tools like Photoshop and Pixelmator and my basic knowledge of the theory of design, a lot of my assets in my iOS apps have just been mediocre.
在旋轉拍賣 Carousell 一年看到的後端架構、挑戰與生活
Tags: Backend Development, Experience, Infrastructure, Carousell, Engineering

What's going on under the hood at one of the world's largest and fastest growing classifieds marketplace. We're on a mission to inspire everyone in the world to start selling.

Follow
Chapter 2 : Data Handling and Data Visualisation
By: Francesco Bodria
Tags: Global Warming, Plotly, Data Science, Data Visualization, Pandas

In our Summer Journey, we want you to explore very hot topics in our days. We will go through Reinforcement Learning, Data for Global Warming, fake news e social network analysis.

In this tutorial we will explore global environment and we will do this using our beloved python and its libraries for data analysis.

This tutorial is divided in two part: Data Handling and Data Visualisation

In the first part you will learn how to deal with datasets using Pandas (https://pandas.pydata.org/), a very famous library which is the base of everything. If you want to be a data scientist you need to know pandas.

In the second part you will be guided from the basis of data visualisation (Matplotlib, https://matplotlib.org/), passing from the intermediate level (Seaborn, https://seaborn.pydata.org/) to very end interactive implementation (Plotly, https://plot.ly/).

You will find the notebook on our github:

https://github.com/MLJCUnito/Tensorshow/tree/master/SummerAdventure

Hope you’ll enjoy, I remind you to stay focused and to stay tuned for other updates coming.

Francesco,MLJC

P.S. If you find any bug / error or you have some problems with the code feel free to contact us at mljcunito@gmail.com