IndyWatch Education Feed Archiver

Go Back:30 Days | 7 Days | 2 Days | 1 Day

IndyWatch Education Feed Today.

Go Forward:1 Day | 2 Days | 7 Days | 30 Days

IndyWatch Education Feed was generated at Community Resources IndyWatch.

Saturday, 18 November

01:16

React Pattern: Centralized PropTypes freeCodeCamp - Medium

Avoid repeating yourself by centralizing PropTypes

Grand Central Station, New York, NY

There are three popular ways to handle types in React: PropTypes, TypeScript and Flow. This post is about PropTypes, which are currently the most popular.

Since PropTypes provide type warnings at runtime, its helpful to be as specific as possible.

  • Component accepts an object? Declare the objects shape.
  • Prop only accepts a specific list of values? Use oneOf.
  • Array should contain numbers? Use arrayOf.
  • You can even declare your own types. AirBnB offers many additional PropTypes.

Heres a PropType example:

https://medium.com/media/e019278c6f44de68391613cd427f60bf/href

In real apps with large objects, this quickly leads to a lot of code. Thats a problem, because in React, youll often pass the same object to multiple components. Repeatin...

00:27

Do you want to learn more about React? Lets build and then play a game. freeCodeCamp - Medium

When I teach React to beginners, I start by introducing them to the React API. Then I have them build a simple browser game after that. I think this is a good introduction strategy, because a simple game usually has a small state and, in most cases, no data dependencies at all. Learners get to focus entirely on the React API itself. The official React tutorial is a simple Tic-Tac-Toe game, which is an excellent choice.

Building simple game apps beats building abstract (and todo) apps on so many levels. I have always been against the use of abstract foo-bar types of examples, because they lack context and engagement.

Learners need to like what they are building. They need to accomplish something at the end of each phase in their learning journey. They need to make design decisions and see progress on features they can relate to.

Please note that this article is not a beginners tutorial. I will be assuming that you know the basics of React. If you are absolutely new to React, start by writing your first React component and then learn the fundamental concepts of React.

The Target Sum Game: Pick the set of challenge numbers that sum to the target 42 within 10 seconds

I named the game we are going to build in this article The Target Sum. It is a simple one: you start with a random number in the header, the target (42 in the screenshot above), and a list of random challenge numbers below that target (the six numbers in the screenshot above).

Four of the six random numbers used above (8, 5, 13, 16) add up exactly to the target sum of 42. Picking the correct subset of numbers is how you win the game.

Wanna play a few rounds? Click the Start button below:

https://medium.com/media/8a93f032b875ee96a0d710ef0067f1db/href

Were you able to win? I am SO bad at this game.

Now that you know what we are going to build, lets dive right in. Dont worry we will build this game in small increments, one step at a time.

Step #1: initial markup and styles

It is a good idea...

Go Back:30 Days | 7 Days | 2 Days | 1 Day

IndyWatch Education Feed Today.

Go Forward:1 Day | 2 Days | 7 Days | 30 Days

Friday, 17 November

23:21

The freeCodeCamp Podcast is live. Here are 6 episodes you can binge-listen now. freeCodeCamp - Medium

The freeCodeCamp Podcast is now live. You can go binge-listen to the first 6 episodes in Apple iTunes, Google Play, or wherever you want.

Well publish new episodes every Monday, so remember to subscribe.

You can help our podcast get up to 88 miles-per-hour by leaving us a 5-star review. 

Heres a list of the first six episodes:

Episode 1: How I went from Selling Food in the Street to Working as a Developer at Companies, Part 1Learning to Code

Art by Sebastian Navas

Listen on Apple iTunes | Listen on Google Play | Listen in browser

Episode 2: How I went from Selling Food in the Street to Working as a Developer for Top Tech Companies, Part 2The Interview

Art by Sebastian Navas

Listen on Apple iTunes | Listen on Google Play | Listen in browser

Episode 3: How I went from Selling Food in the Street to Working as a Developer for Top Tech Companies, Part 3First Week on the Job

Art by Sebastian Navas

Listen on Apple iTunes |...

10:31

Divergentand other stories livingwithoutschool

We believe in ordinary acts of bravery, in the courage that drives one person to stand up for another.

This quote, from the novel Divergent, highlights why some of what I read is Young Adult fiction.

I read for truth. Truth and hope. Divergent_(book)_by_Veronica_Roth_US_Hardcover_2011

Young adult novels, regardless of genre, reflect the virtue of hope. They are not afraid to honestly portray hope as a human desire. The worlds of YA novels are not tainted by unnervng, unforgiving, unending cyncicism. For, while cynicism, exists, as in Quicksilver by R. J. Anderson, the cynicism of  a girl who is different and who learns to mistrust others, there also exists a parallel of hope . Maybe things can be different. Maybe  two people who care deeply about something bigger than each other,drawn together by a shared commitment to that common ideal or goal can describe both friendship and love.

It is this hope that marks the call to action one encounters in YA fiction. YA fiction has a strong voice. It is often writt...

00:38

Perhaps the tide is turning, but the struggle to stay afloat continues IN DEFENCE OF YOUTH WORK

Ill resist sliding into what seems the standard youth sector account of anything it does, namely somehow that its always overwhelmingly new, innovative and inspiring. My caution aside the reports from the medley of Is the tide turning events and discussions held in the last week or so do give grounds for a measure of hope and optimism. Here are a few quotes and photos to back up a collective sense that the struggle to reclaim and reimagine a youth work freed from the shackles of neoliberal dogma is alive and even flourishing.

 

Chris Warren leading off the Derby debate

 

A great IDYW Turning the Tide Event hosted by the D2N2 Youth Work Alliance at the University of Derby today. Over 65 practitioners and youth work students in attendance....

Thursday, 16 November

23:01

Sanity arrives? Owen Jones in todays Guardian. Education, Economy and Society

At last!   Sanity emerges on the British Left !! Now that socialism is re-emerging as a political force that can no longer be ignored or ridiculed, the struggle for more time for leisure, family and relaxation should be linked to broader fights. Increased public ownership of the economy should be structured to create more worker []

21:41

Link freeCodeCamp - Medium

We didnt have any problems with image sharpness in the early years of the internet, because we didnt need to show websites on mobile devices.

Today we see a tremendous growth in mobile web surfing. So much so that, this year, it has even overtaken traffic on desktops.

Most clients try to create responsive interfaces for their websites so they are easily accessible from any kind of device. And it doesnt seem strange that many layout developers have started to use

img {
width: 100%;
height: auto;
}

for their images. So they seamlessly work across any browser window resolution, scaling to the available space.

Conceptually, everything looks good. Designers create nice big images, and developers use those images for every device. In some cases, developers create multiple versions of the same image, so a smaller image is downloaded for mobile screens, and a bigger image for desktops.

Unfortunately, Chrome doesnt want to resize images in the way that good image editors do. Instead, it out-puts the image with not the same, or similar, sharpness as the initial image.

The main reason for this may be performance. When a webpage has many images, and the device processor is not highly productive, additional image processing could lead to bigger lags in page rendering, so Chrome omit this process as not being crucial for end users.

I will show you some examples using Chrome browser, and then using other browsers. Here is an image, downsized to 1000 px in Photoshop:

The same image uploaded in original size and downscaled by the browser. Compare the sharpness of the dogs eyes.

Photoshop:

Browser:

Things get even worse when you add sharpness in Photoshop after downsizing. But photos are more forgiving in this case, as they typically dont have many sharp edges. Issues with any vector illustrations saved as .png images are much more noticeable. Frequent casewebsite logos.

Asanas logo, initial file:

Resized in Photoshop:

Rendered in browser:

Wecans logo, initial file:

...

20:22

Your code stinks. Heres what you can do about it. freeCodeCamp - Medium

(source/CC0)

Humans stink. Its nothing to be ashamed of: it is the inevitable consequence of our animal nature.

But humans aspire to be more than animals.

Humanitys singular endeavor throughout history has been the journey to eliminate stink. Weve always hated it. Even in antiquity, we sent people on ridiculous journeys around the world in rickety sailboats, and across deserts on tiny horses, to find some remedy for it.

We have iterated for thousands of years to reach a stink-free world. From the invention of soap and toothpaste to the Yankee Doodle Candle Co. and Febrezeour soaps, candles, and sprays now give us a way to make food waste and industrial garbage smell like mountain raindrops and sugar cookies.

Mmmm! Pumpkin spice! (Photo by NeONBRAND on Unsplash)

And yet with each innovation, we find a new way to stink.

Like our battle between antibiotics and bacteria, we have launched an endless arms race between ourselves and our environment. Now were moving beyond the era of physical products.

With our advancement, we have brought stink along with usjust as we always have. We created the information age.

And we created information stink.

Should I drink this?

Garbage comes cloaked in a wonderful variety of smells. As a new father, a door opened for me into an undiscovered country of stink. Previously, I had only heard rumors of this world from the few parents who survived it. Rumors always accompanied by a thousand-yard stare.

Just so, there are many types of stinky information. Teenagers in central Europe write up fake news articles for social media clicks. There is always one more weird trick that doctors dont want you to know.

Today, in this article, were going past all that. Were diving into the very seams of our new information era to learn about the stinks that we Morlocks are creating in our very own products. Im talking about code smell.

Kent Beck and Martin Fowler define code smell as a surface...

20:00

Lets talk about variables and why you should use them in JavaScript. freeCodeCamp - Medium

The main purpose of coding is to solve problems. For example, what happens when you click on a button? Thats a problem for us to solve.

So, lets begin this article by solving a simple problem.

Counting apples

If you have 4 apples and you buy 27 more, how many apples do you have? Take a second and write your answer in your text editor.

Whats your answer?

// This? 
31
// Or this? 
4 + 27

Both answers are right, but the second method is betterbecause youre offloading the calculation to JavaScript. Youre teaching it how to arrive at the answer.

But theres still one problem with the code.

If you look at 4 + 27 without any context from our apple problem, do you know were calculating the number of apples youre currently holding?

Probably not.

So, a better way is to use algebra to substitute 4 and 27 with variables. When you do so, youll get the ability to write code that has meaning:

initialApples + applesBought

The process of substituting 4 with a variable called initialApples is called declaring variables.

Declaring variables

You declare variables with the following syntax:

const variableName = 'value'

There are four parts youll want to take note of:

  1. The variableName
  2. The value
  3. The = sign
  4. The const keyword

The variableName

variableName is the name of the variable youre declaring. You can name it anything, as long as it follows these rules:

  1. It must be one word
  2. It must consist only of letters, numbers, or underscores (09, a-z, A-Z, _).
  3. It cannot begin with a number.
  4. It cannot be any of these reserved keywords

If you need to use two or more words to name your variable, just join the words together but capitalize the first letter of each subsequent word. This weird capitalization is called camel case.

A good example of a camel-cased variable is applesToBuy.

The value

The value is what you want the variable to be. It can be primitives (like strings and numbers) or objects (like arrays and functions).

= in JavaScript

= in JavaScript doesnt work like = in math. Dont get confused.

In JavaScript, = means assignment. When you use =, you set (or assign) the value on the right hand side (RHS) of the = sign to the left hand side (LHS) of the = sign.

In the following statement, you set the variable initialApples to the number 4.

const initialApples = 4

If you console.log this variable, you can see that initialApples is 4.

console.log(initialApples) // 4

Evaluation before assignment

Ev...

18:24

[BONUS] Drive Journal Day 32 School Sucks Project

(AUDIO, 43 minutes) -Albuquerque, NM to Amarillo, TX (even though we weren't sure at the time of recording) -Discussing our visit with the Erwin family today and our exploration of New Mexico -overcoming stress and frustration on both legs of the trip Click HERE to download. On October 15th Brett began a road trip across ...

The post [BONUS] Drive Journal Day 32 appeared first on School Sucks Project.

06:24

User Management with AWS Cognito (1/3) Initial Setup freeCodeCamp - Medium

The Complete AWS Web BoilerplateTutorial 1A

Main Table of Contents Click Here
Part A: Initial Setup
Part B: The Core Functionality
Part C: Last Steps to Full Fledged

Download the Github here.

Introduction

Setting up user authentication can take ages, but it is an essential cornerstone of any production app. There are options out there such as AuthO and PassportJS, but they either have hard learning curves, require continual maintenance, or are vulnerable to programmer errors as they require self-setup. If only there was a hands-off, customizable, secure and highly scalable user management service on the cloud.

Introducing Amazon Cognito and Federated Identities. Cognito is the AWS solution for managing user profiles, and Federated Identities help keep track of your users across multiple logins. Integrated into the AWS ecosystem, AWS Cognito opens up a world of possibility for advanced front end development as Cognito+IAM roles give you selective secure access to other AWS services. Want to only allow S3 Bucket access to specific signed on users? Simply connect a Cognito login with an IAM role allowed access to the bucket, and now your bucket is secure! Best of all, the free tier gives you 50,000 monthly active users so you wont have to worry about paying more until youre ready to boom.

This boilerplate is a React-Redux web app that has the full features of AWS Cognito and Federated Identities pre-integrated. Use this boilerplate if you have an app that you want developed with a production-ready authentication service from the very beginning. Indeed this is a powerful launchpad for your next great idea.

Go to AWS Cognito on the AWS console to get started!

Initial SetupCognito

We will be setting up AWS Cognito, which is a custom login pool (such as login with email). Cognito IS NOT a login manager for any type of login (such as Facebook and Gmail), only for custom logins....

06:18

Education without jobs Education, Economy and Society

Todays  ONS Labour Market Bulletin, provides further  data about the changing  relationship between young people, education and employment.  Even if its still much higher than for other age groups, youth unemployment continues to fall.  For July to September 2017, joblessness  for 16 to 24 year olds was 11.9% ( down from  13.1%  a year earlier []

04:27

Roarr! the perfect JSON logger for Node.js and browser freeCodeCamp - Medium

Zero-configuration, out of process transports and adheres to the Twelve Factors

The past 8 months I have been creating GO2CINEMA. This web application allows users to discover showtimes. They can also book cinema tickets across the world.

The platform grew to over +50 distinct services. The services support data aggregation, normalization, validation, analysis, distribution, invalidation, and more. Some of these services run in high replication environments, into the hundreds.

I needed to know when things break. And I needed to be able to correlate logs across all these services to identify the issue.

Running services in high-concurrency you need to be able to pin point when and what breaks.

I needed a logger that did not exist.

Existing loggers

For a long time I have been a big fan of using debug. Debug is simple to use, works in Node.js and browsers, does not require configuration and it is fast. However, problems arise when you need to parse logs. Anything but one-line text messages cannot be parsed in a safe way.

To log structured data, I have been using Winston and Bunyan. These packages are great for application-level logging. I have preferred Bunyan because of the Bunyan CLI program used to pretty-print logs.

However, these packages require program-level configuration. When constructing an instance of a logger, you need to define the transport and the log-level. This makes them unsuitable for use in code designed for use by other applications.

Then there is pino. Pino is a fast JSON logger. Its CLI program is equivalent to Bunyan. It decouples transports, and it has a sane default configuration. Yet you still need to instantiate logger instance at the application-level. This makes it more suitable for application-level logging like Winston and Bunyan.

I needed a logger that:

In other words a logger that:

  • I can use in an application code and in dependencies
  • allows me to correlate logs between the main application code and the dependency code
  • works well with transports in external processes

and it needs to be loud...

IndyWatch Education Feed Archiver

Go Back:30 Days | 7 Days | 2 Days | 1 Day

IndyWatch Education Feed Today.

Go Forward:1 Day | 2 Days | 7 Days | 30 Days

IndyWatch Education Feed was generated at Community Resources IndyWatch.

Resource generated at IndyWatch using aliasfeed and rawdog