diff --git a/content-testing/schemas.js b/content-testing/schemas.js index 7fbf41ba9..be35a548b 100644 --- a/content-testing/schemas.js +++ b/content-testing/schemas.js @@ -21,9 +21,15 @@ const baseVideosSchema = strictObject({ title: string().required(), description: string().required(), - videoId: youtubeIdValidator.when(['parts'], (parts, schema) => { + videoId: youtubeIdValidator.when('parts', ([parts], schema) => { // videoId required if the `parts` array is missing or empty - return parts && parts.length > 0 ? schema : schema.required(); + return parts && parts.length > 0 + ? schema.test( + 'videoId and parts conflict', + 'Top-level "videoId" should not be defined if "parts" exist', + (value) => value === undefined + ) + : schema.required(); }), nebulaSlug: nonUrlStringValidator, diff --git a/content/videos/challenges/10-dfs-maze-generator/index.json b/content/videos/challenges/10-dfs-maze-generator/index.json index 600f72b5c..39507366c 100644 --- a/content/videos/challenges/10-dfs-maze-generator/index.json +++ b/content/videos/challenges/10-dfs-maze-generator/index.json @@ -2,7 +2,6 @@ "title": "Maze Generator", "description": "Choo choo! In this multi-part coding challenge, I create a maze generator using a depth-first search algorithm with recursive backtracking. The idea is to walk through a grid of cells, removing walls as we go to build a maze.", "videoNumber": "10", - "videoId": "", "date": "2016-05-02", "languages": ["p5.js", "JavaScript"], "topics": ["maze", "recursion", "backtracking", "depth-first search"], diff --git a/content/videos/challenges/100-neuroevolution-flappy-bird/index.json b/content/videos/challenges/100-neuroevolution-flappy-bird/index.json index b9cc7f01a..d37de9acf 100644 --- a/content/videos/challenges/100-neuroevolution-flappy-bird/index.json +++ b/content/videos/challenges/100-neuroevolution-flappy-bird/index.json @@ -2,7 +2,6 @@ "title": "Neuroevolution Flappy Bird", "description": "In this challenge, I use my JavaScript neural network library and a genetic algorithm to train an agent to play Flappy Bird.", "videoNumber": "100", - "videoId": "c6y21FkaUqw", "date": "2018-04-16", "languages": ["JavaScript", "p5.js"], "topics": ["neural network", "reinforcement learning", "genetic algorithms", "evolution", "Flappy Bird game"], diff --git a/content/videos/challenges/110-recamans-sequence/index.json b/content/videos/challenges/110-recamans-sequence/index.json index e92ae6c17..4c0005a28 100644 --- a/content/videos/challenges/110-recamans-sequence/index.json +++ b/content/videos/challenges/110-recamans-sequence/index.json @@ -2,7 +2,6 @@ "title": "Recamán's Sequence", "description": "In this coding challenge, I visualize the Recamán’s number sequence using the p5.js library and go on to generate a series of musical tones using p5.js sound.", "videoNumber": "110", - "videoId": "", "date": "2018-07-24", "languages": ["p5.js", "JavaScript"], "topics": ["number sequence", "Recamán's sequence", "music", "audio-visual", "visualization"], diff --git a/content/videos/challenges/121-logo-interpreter/index.json b/content/videos/challenges/121-logo-interpreter/index.json index 258d0fe7c..5f2a7151f 100644 --- a/content/videos/challenges/121-logo-interpreter/index.json +++ b/content/videos/challenges/121-logo-interpreter/index.json @@ -2,7 +2,6 @@ "title": "Logo Interpreter", "description": "In this coding challenge, I discuss turtle graphics and make a Logo Interpreter in JavaScript.", "videoNumber": "121", - "videoId": "", "date": "2018-10-31", "languages": ["p5.js", "JavaScript"], "topics": ["Logo", "Logo interpreter", "turtle graphics"], diff --git a/content/videos/challenges/122-quick-draw/index.json b/content/videos/challenges/122-quick-draw/index.json index d9aee7f0c..4e3ae08e1 100644 --- a/content/videos/challenges/122-quick-draw/index.json +++ b/content/videos/challenges/122-quick-draw/index.json @@ -2,7 +2,6 @@ "title": "Quick, Draw!", "description": "In this multi-part coding challenge, I take a closer look at the Quick, Draw! dataset and create a simple node API to \"replay\" drawings of rainbows and cats using p5.js.", "videoNumber": "122", - "videoId": "", "date": "2018-11-19", "languages": ["p5.js", "Node.js", "JavaScript"], "topics": ["Quick, Draw! game", "machine learning (ML)", "doodle classifiers", "sketch-RNN"], diff --git a/content/videos/challenges/123-chaos-game/index.json b/content/videos/challenges/123-chaos-game/index.json index d4614c22a..c210164ce 100644 --- a/content/videos/challenges/123-chaos-game/index.json +++ b/content/videos/challenges/123-chaos-game/index.json @@ -2,7 +2,6 @@ "title": "Chaos Game", "description": "In this multi-part coding challenge, I visualize the \"Chaos Game\".", "videoNumber": "123", - "videoId": "", "date": "2018-11-29", "languages": ["p5.js", "JavaScript"], "topics": ["chaos game", "fractal", "seed points", "probability"], diff --git a/content/videos/challenges/130-drawing-with-fourier-transform-and-epicycles/index.json b/content/videos/challenges/130-drawing-with-fourier-transform-and-epicycles/index.json index b3a6e7ca6..84b4bf772 100644 --- a/content/videos/challenges/130-drawing-with-fourier-transform-and-epicycles/index.json +++ b/content/videos/challenges/130-drawing-with-fourier-transform-and-epicycles/index.json @@ -2,7 +2,6 @@ "title": "Drawing with Fourier Transform and Epicycles", "description": "In this coding challenge, I implement the Discrete Fourier Transform algorithm in JavaScript and render a drawing using epicycles derived from the transform.", "videoNumber": "130", - "videoId": "MY4luNgGfms", "date": "2019-01-24", "languages": ["JavaScript", "p5.js"], "topics": ["Fourier transform square wave", "discrete Fourier transform", "epicycles drawing"], diff --git a/content/videos/challenges/134-heart-curve/index.json b/content/videos/challenges/134-heart-curve/index.json index 764e0e638..bac5c607c 100644 --- a/content/videos/challenges/134-heart-curve/index.json +++ b/content/videos/challenges/134-heart-curve/index.json @@ -2,7 +2,6 @@ "title": "Heart Curve", "description": "In this multi-part challenge, I use a parametric equation (from Wolfram Mathworld) to draw a heart curve in Processing (Java).", "videoNumber": "134", - "videoId": "", "date": "2019-02-18", "languages": ["Processing"], "topics": ["heart curve", "parametric equation", "polar coordinates", "GIF loop"], diff --git a/content/videos/challenges/136-polar-noise-loops/index.json b/content/videos/challenges/136-polar-noise-loops/index.json index 73d7fa6ea..4f5fe1e3b 100644 --- a/content/videos/challenges/136-polar-noise-loops/index.json +++ b/content/videos/challenges/136-polar-noise-loops/index.json @@ -2,7 +2,6 @@ "title": "Polar Noise Loops", "description": "In this multi-part coding challenge I show how to use a noise field and polar coordinates to create a perfect GIF loop.", "videoNumber": "136", - "videoId": "", "date": "2019-02-25", "languages": ["p5.js", "Processing"], "topics": ["GIF loop", "Perlin noise", "polar coordinates"], diff --git a/content/videos/challenges/142-rubiks-cube/index.json b/content/videos/challenges/142-rubiks-cube/index.json index 33a06b212..1a99752e0 100644 --- a/content/videos/challenges/142-rubiks-cube/index.json +++ b/content/videos/challenges/142-rubiks-cube/index.json @@ -2,7 +2,6 @@ "title": "Rubik's Cube", "description": "Can I build an interactive 3D Rubik's cube in Processing? Yes! Someday I hope to return to this project and add an AI solver!", "videoNumber": "142", - "videoId": "", "date": "2019-04-01", "languages": ["Processing"], "topics": ["Rubik's cube", "rotation matrix", "peasyCam", "simulation"], diff --git a/content/videos/challenges/32-agario/index.json b/content/videos/challenges/32-agario/index.json index 01b556662..def6a9f2f 100644 --- a/content/videos/challenges/32-agario/index.json +++ b/content/videos/challenges/32-agario/index.json @@ -2,7 +2,6 @@ "title": "Agar.io", "description": "In this multi-part coding challenge, I create a clone of the multiplayer online game Agar.io with JavaScript, node.js and websockets.", "videoNumber": "32", - "videoId": "", "date": "2016-08-16", "languages": ["JavaScript", "Node.js"], "topics": ["agar.io", "WebSocket"], diff --git a/content/videos/challenges/35-traveling-salesperson/index.json b/content/videos/challenges/35-traveling-salesperson/index.json index d2cc8f960..6a6219934 100644 --- a/content/videos/challenges/35-traveling-salesperson/index.json +++ b/content/videos/challenges/35-traveling-salesperson/index.json @@ -2,7 +2,6 @@ "title": "Traveling Salesperson", "description": "In Part 1 of this multi-part coding challenge, I introduce the classic computer science problem of the Traveling Salesperson (TSP) and discuss the pitfalls with a brute force solution. In Part 2, I discuss Lexicographic Ordering and demonstrate one algorithm to iterate over all the permutations of an array. In Part 3, I apply this algorithm to a brute-force solution of the TSP problem. Every single route permutation is checked one by one. In Part 4, I attempt to create a solution to the TSP problem with a genetic algorithm, and then I add a “crossover” algorithm in Part 5.", "videoNumber": "35", - "videoId": "BAejnwN4Ccw", "date": "2016-08-24", "languages": ["p5.js"], "topics": [ diff --git a/content/videos/challenges/40-word-counter/index.json b/content/videos/challenges/40-word-counter/index.json index 91d46d303..c52100e80 100644 --- a/content/videos/challenges/40-word-counter/index.json +++ b/content/videos/challenges/40-word-counter/index.json @@ -2,7 +2,6 @@ "title": "Word Counter", "description": "In this challenge, we build a word counting (concordance) application, and visualize the frequency of each word using variable font size! We also implement the TF-IDF algorithm", "videoNumber": "40", - "videoId": "", "date": "2016-10-10", "languages": ["p5.js", "Processing", "JavaScript", "Java"], "topics": ["word counting", "visualization", "tf-idf"], diff --git a/content/videos/challenges/42-markov-chain-name-generator/index.json b/content/videos/challenges/42-markov-chain-name-generator/index.json index c4627cd1f..de1a3b317 100644 --- a/content/videos/challenges/42-markov-chain-name-generator/index.json +++ b/content/videos/challenges/42-markov-chain-name-generator/index.json @@ -2,7 +2,6 @@ "title": "Markov Chain Name Generator", "description": "In this multi-part coding challenge I attempt to use a Markov Chain to generate a new name for my YouTube channel.", "videoNumber": "42", - "videoId": "", "date": "2016-10-24", "languages": ["JavaScript", "p5.js"], "topics": ["Markov chain", "n-gram", "text generator"], diff --git a/content/videos/challenges/44-afinn-111-sentiment-analysis/index.json b/content/videos/challenges/44-afinn-111-sentiment-analysis/index.json index b9ad17a4a..d58f35dc0 100644 --- a/content/videos/challenges/44-afinn-111-sentiment-analysis/index.json +++ b/content/videos/challenges/44-afinn-111-sentiment-analysis/index.json @@ -2,7 +2,6 @@ "title": "AFINN-111 Sentiment Analysis", "description": "In this multi-part coding challenge I implement sentiment analysis using the AFINN-111 word list.", "videoNumber": "44", - "videoId": "", "date": "2016-12-01", "languages": ["JavaScript", "p5.js"], "topics": ["sentiment analysis", "AFINN-111"], diff --git a/content/videos/challenges/46-asteroids/index.json b/content/videos/challenges/46-asteroids/index.json index e6f265adb..35b01b095 100644 --- a/content/videos/challenges/46-asteroids/index.json +++ b/content/videos/challenges/46-asteroids/index.json @@ -2,7 +2,6 @@ "title": "Asteroids", "description": "In this two part coding challenge, I use the p5.js library to create my own version of the classic Atari video game Asteroids!", "videoNumber": "46", - "videoId": "", "date": "2016-12-15", "languages": ["p5.js", "JavaScript"], "topics": ["Atari Asteroids game", "polar to Cartesian coordinates"], diff --git a/content/videos/challenges/50-animated-circle-packing/index.json b/content/videos/challenges/50-animated-circle-packing/index.json index 4545e248e..273db8336 100644 --- a/content/videos/challenges/50-animated-circle-packing/index.json +++ b/content/videos/challenges/50-animated-circle-packing/index.json @@ -2,7 +2,6 @@ "title": "Circle Packing", "description": "In this multi-part coding challenge, I demonstrate how to use a circle packing algorithm.", "videoNumber": "50", - "videoId": "", "date": "2017-01-09", "languages": ["Processing"], "topics": ["circle packing", "pixels"], diff --git a/content/videos/challenges/51-a-pathfinding-algorithm/index.json b/content/videos/challenges/51-a-pathfinding-algorithm/index.json index 436bd955d..5968cc607 100644 --- a/content/videos/challenges/51-a-pathfinding-algorithm/index.json +++ b/content/videos/challenges/51-a-pathfinding-algorithm/index.json @@ -2,7 +2,6 @@ "title": "A* Pathfinding Algorithm", "description": "In this multi-part coding challenge, I attempt an implementation of the A* Pathfinding Algorithm to find the optimal path between two points in a 2D grid.", "videoNumber": "51", - "videoId": "", "date": "2017-01-16", "languages": ["p5.js", "JavaScript"], "topics": ["A* algorithm", "pathfinding", "heuristic"], diff --git a/content/videos/challenges/54-islamic-star-patterns/index.json b/content/videos/challenges/54-islamic-star-patterns/index.json index be9e0da00..36d03c10d 100644 --- a/content/videos/challenges/54-islamic-star-patterns/index.json +++ b/content/videos/challenges/54-islamic-star-patterns/index.json @@ -2,7 +2,6 @@ "title": "Islamic Star Patterns", "description": "In this bonus super-sized coding challenge, I work through visualizing Islamic Star Patterns in p5.js.", "videoNumber": "54", - "videoId": "", "date": "2017-02-01", "languages": ["p5.js", "JavaScript"], "topics": ["Islamic star patterns", "Hankin's method", "tile pattern", "law of sines"], diff --git a/content/videos/challenges/62-plinko-with-matterjs/index.json b/content/videos/challenges/62-plinko-with-matterjs/index.json index d340d9b54..577b06d29 100644 --- a/content/videos/challenges/62-plinko-with-matterjs/index.json +++ b/content/videos/challenges/62-plinko-with-matterjs/index.json @@ -2,7 +2,6 @@ "title": "Plinko with Matter.js", "description": "I love all things random and chance so why not make a Plink simulation with the matter.js physics engine and p5.js!", "videoNumber": "62", - "videoId": "KakpnfDv_f0", "date": "2017-03-10", "languages": ["JavaScript", "p5.js", "Matter.js"], "topics": ["collision detection", "matter.js", "physics engine", "Plinko game"], diff --git a/content/videos/challenges/63-texturing-cloth-simulation/index.json b/content/videos/challenges/63-texturing-cloth-simulation/index.json index 0462aba55..e6304b265 100644 --- a/content/videos/challenges/63-texturing-cloth-simulation/index.json +++ b/content/videos/challenges/63-texturing-cloth-simulation/index.json @@ -2,7 +2,6 @@ "title": "Texturing Cloth Simulation", "description": "In this two part challenge, I cover beginShape(), endShape(), and texture(), TRIANGLE_STRIP, QUAD_STRIP, and more. I combine these geometry functions with the Toxiclibs physics library to simulate a waving flag (with a unikitty image texture!)", "videoNumber": "63", - "videoId": "", "date": "2017-03-14", "languages": ["Processing", "Java"], "topics": ["physics engine", "texture 3D", "Toxiclibs", "cloth", "simulation"], diff --git a/content/videos/challenges/64-kinematics/index.json b/content/videos/challenges/64-kinematics/index.json index 5cb853274..e22ea26ca 100644 --- a/content/videos/challenges/64-kinematics/index.json +++ b/content/videos/challenges/64-kinematics/index.json @@ -2,7 +2,6 @@ "title": "Kinematics", "description": "In this multi-part coding challenge, I demonstrate how to implement kinematics in Processing (Java).", "videoNumber": "64", - "videoId": "xXjRlEr7AGk", "date": "2017-03-16", "languages": ["Processing"], "topics": ["forward kinematics", "inverse kinematics", "tentacle animation", "linked lists", "array"], diff --git a/content/videos/challenges/65-binary-tree/index.json b/content/videos/challenges/65-binary-tree/index.json index 5a10ab667..29adceabd 100644 --- a/content/videos/challenges/65-binary-tree/index.json +++ b/content/videos/challenges/65-binary-tree/index.json @@ -2,7 +2,6 @@ "title": "Binary Tree", "description": "This multi-part coding challenge is part of the first week of my course: \"Intelligence and Learning.\" Here I attempt to implement a classic data structure: The Binary Search Tree.", "videoNumber": "65", - "videoId": "ZNH0MuQ51m4", "date": "2017-03-21", "languages": ["JavaScript", "p5.js"], "topics": ["tree", "binary search", "data structure", "intelligence and learning"], diff --git a/content/videos/challenges/68-breadth-first-search/index.json b/content/videos/challenges/68-breadth-first-search/index.json index bdb17610f..8591fd23a 100644 --- a/content/videos/challenges/68-breadth-first-search/index.json +++ b/content/videos/challenges/68-breadth-first-search/index.json @@ -2,7 +2,6 @@ "title": "Breadth-First Search", "description": "In this two part challenge, I implement the Breadth-First Search algorithm in JavaScript. My demo application is \"6 Degrees of Kevin Bacon\" (finding the closest relationship between Kevin Bacon and another actor).", "videoNumber": "68", - "videoId": "piBq7VD0ZSo", "date": "2017-03-30", "languages": ["JavaScript", "p5.js"], "topics": ["breadth-first search algorithm", "Six Degrees of Kevin Bacon"], diff --git a/content/videos/challenges/69-evolutionary-steering-behaviors/index.json b/content/videos/challenges/69-evolutionary-steering-behaviors/index.json index 763c33a54..fb5064255 100644 --- a/content/videos/challenges/69-evolutionary-steering-behaviors/index.json +++ b/content/videos/challenges/69-evolutionary-steering-behaviors/index.json @@ -2,7 +2,6 @@ "title": "Evolutionary Steering Behaviors", "description": "In this multi-part coding challenge, I create a system where autonomous steering agents evolve the behavior of eating food and avoiding poison.", "videoNumber": "69", - "videoId": "flxOkx0yLrY", "date": "2017-04-18", "languages": ["JavaScript", "p5.js"], "topics": ["genetic algorithms", "steering behaviors", "seek function", "autonomous agent", "evolution"], diff --git a/content/videos/challenges/70-nearest-neighbors-recommendation-engine/index.json b/content/videos/challenges/70-nearest-neighbors-recommendation-engine/index.json index 4f8f19b90..bf5d6b06d 100644 --- a/content/videos/challenges/70-nearest-neighbors-recommendation-engine/index.json +++ b/content/videos/challenges/70-nearest-neighbors-recommendation-engine/index.json @@ -2,7 +2,6 @@ "title": "Nearest Neighbors Recommendation Engine", "description": "In this multi-part coding challenge, I create a movie recommendation engine using the \"nearest neighbor\" algorithm.", "videoNumber": "70", - "videoId": "", "date": "2017-05-09", "languages": ["p5.js", "JavaScript"], "topics": ["nearest neighbors", "similarity score", "Euclidean distance", "associative arrays"], diff --git a/content/videos/challenges/72-frogger/index.json b/content/videos/challenges/72-frogger/index.json index 2b0887b1e..01a744d55 100644 --- a/content/videos/challenges/72-frogger/index.json +++ b/content/videos/challenges/72-frogger/index.json @@ -2,7 +2,6 @@ "title": "Frogger", "description": "In this multi-part challenge, I create a simplified version of the classic Atari video game Frogger in Processing (Java).", "videoNumber": "72", - "videoId": "giXV6xErw0Y", "date": "2017-06-14", "languages": ["Processing"], "topics": ["game mechanics", "Atari Frogger game", "inheritance"], diff --git a/content/videos/challenges/81-circle-morphing/index.json b/content/videos/challenges/81-circle-morphing/index.json index 625d189ca..55832b5df 100644 --- a/content/videos/challenges/81-circle-morphing/index.json +++ b/content/videos/challenges/81-circle-morphing/index.json @@ -2,7 +2,6 @@ "title": "Circle Morphing", "description": "In this multi-part challenge, I implement two possible solutions to Golan Levin's Circle Morphing challenge.", "videoNumber": "81", - "videoId": "u2D4sxh3MTs", "date": "2017-11-01", "languages": ["JavaScript", "p5.js"], "topics": ["Golan Levin", "interpolation", "circle morphing", "polar coordinates"], diff --git a/content/videos/challenges/91-snakes-and-ladders/index.json b/content/videos/challenges/91-snakes-and-ladders/index.json index 7994bda89..cb4d1dac0 100644 --- a/content/videos/challenges/91-snakes-and-ladders/index.json +++ b/content/videos/challenges/91-snakes-and-ladders/index.json @@ -2,7 +2,6 @@ "title": "Snakes & Ladders", "description": "In this multi-part coding challenge, I attempt to create a simulation of the classic board game Snakes & Ladders (also known as Chutes and Ladders).", "videoNumber": "91", - "videoId": "", "date": "2018-01-29", "languages": ["p5.js", "JavaScript"], "topics": ["Snakes & ladders game", "games"], diff --git a/content/videos/challenges/94-2048/index.json b/content/videos/challenges/94-2048/index.json index 7a926ef37..10c5b2ee9 100644 --- a/content/videos/challenges/94-2048/index.json +++ b/content/videos/challenges/94-2048/index.json @@ -2,7 +2,6 @@ "title": "2048 Sliding Puzzle Game", "description": "In this multi-part coding challenge, I code the sliding puzzle game 2048 in JavaScript using canvas and p5.js.", "videoNumber": "94", - "videoId": "JSn-DJU8qf0", "date": "2018-02-26", "languages": ["JavaScript", "p5.js"], "topics": ["2048 game", "sliding puzzle game"], diff --git a/content/videos/challenges/97-book-of-pi/index.json b/content/videos/challenges/97-book-of-pi/index.json index f2e2e295c..5c1369561 100644 --- a/content/videos/challenges/97-book-of-pi/index.json +++ b/content/videos/challenges/97-book-of-pi/index.json @@ -2,7 +2,6 @@ "title": "The Book of Pi", "description": "In yet another “Pi Day” coding challenge, I attempt to generate a pdf “Book of Pi” with the first 10 million digits of Pi mapped to color. Processing (Java) is used for this project.", "videoNumber": "97", - "videoId": "", "date": "2018-03-20", "languages": ["Processing", "Java"], "topics": ["Pi", "Pi day", "visualization"], diff --git a/content/videos/challenges/98-quadtree/index.json b/content/videos/challenges/98-quadtree/index.json index c0c50bcb6..1eae8de83 100644 --- a/content/videos/challenges/98-quadtree/index.json +++ b/content/videos/challenges/98-quadtree/index.json @@ -2,7 +2,6 @@ "title": "Quadtree", "description": "In this multi-part coding challenge, I implement a Quadtree data structure in JavaScript and visualize it with p5.js.", "videoNumber": "98", - "videoId": "OJxEcs0w_kE", "date": "2018-03-26", "languages": ["JavaScript", "p5.js"], "topics": ["quadtree data structure", "quadtree collision detection"], diff --git a/gatsby/createSchemaCustomization.mjs b/gatsby/createSchemaCustomization.mjs index da76542f6..99112b4da 100644 --- a/gatsby/createSchemaCustomization.mjs +++ b/gatsby/createSchemaCustomization.mjs @@ -6,7 +6,7 @@ const schema = /* GraphQL */ ` id: ID! title: String! slug: String! - videoId: String! + videoId: String description: String! date: String videoNumber: String @@ -32,7 +32,7 @@ const schema = /* GraphQL */ ` id: ID! title: String! slug: String! - videoId: String! + videoId: String description: String! date: String videoNumber: String @@ -58,7 +58,7 @@ const schema = /* GraphQL */ ` id: ID! title: String! slug: String! - videoId: String! + videoId: String description: String! date: String videoNumber: String