This video was a boost to my self confidence. I was working with the Wikipedia API for the first time and thought I must be doing something wrong because it was so many steps. Then I found this video and thought, "Hey, it's not me, it's Wikipedia."
@edazpotato49084 жыл бұрын
1:28 : *...* - most big brain moment in the history of web development
@ShadowDev69694 жыл бұрын
could have been avoided if he used visual studio 2019
@zackydev4 жыл бұрын
@@ShadowDev6969 oooooof
@KangJangkrik4 жыл бұрын
@@ShadowDev6969 Visual Studio Code to be precise
@ShadowDev69694 жыл бұрын
@@KangJangkrik vs code is bloat.
@KangJangkrik4 жыл бұрын
(surprised pikachu face)
@NicolaiWeitkemper6 жыл бұрын
Using all those "shortcuts" but writing counter = counter + 1
@ilijaradosavljevic71666 жыл бұрын
Nicolai Weitkemper loool
@kaio37k6 жыл бұрын
What would you use instead? I assume "counter+=;" ?
@ilijaradosavljevic71666 жыл бұрын
Anernermus contuer+=1;
@kaio37k6 жыл бұрын
Thanks!
@pulloutking6 жыл бұрын
counter++?
@akshatjain21577 жыл бұрын
You sir are a gift to humanity.
@xzero015017 жыл бұрын
userimput gave me a headache.
@_keano7 жыл бұрын
same
@okay-bro17 жыл бұрын
same
@beyondcatastrophe_7 жыл бұрын
So unnerving...
@requiitas6 жыл бұрын
too ... :D
@courtneyhackshaw34206 жыл бұрын
I really don't know what to make of that loool
@devjimmy7 жыл бұрын
9 times... (counter = 0, counter = counter + 1, counter < 10). I like you're doing little mistakes, feels more natural ot rehearsed.
@steffenderfreak14 жыл бұрын
There are no bug, just happy little accidents
@pythonSefer4 жыл бұрын
Yes, there is a Wikipedia article for "P": en.wikipedia.org/wiki/P
@slick85097 жыл бұрын
Coding challenge : pacman
@riguidixrodriguez10905 жыл бұрын
I actually like and enjoy to see your coding challenges, the way that you explaind, the way that a programmer thinks it's a cool things. Nice job in every single video. Keep it good, and stay good as always, seeing this far from a computer to start coding, lol
@yuliaberezina17524 жыл бұрын
Thank you so much! I like your way of telling the code and allowing to have a mess in your thoughts, it helps to focus and see that Programmers don't have to be perfectly focused people!!!
@CCcrafted7 жыл бұрын
Dear god man, you have no idea how much that probably just helped me with my a level computer science coursework! Thankyou!
@QW3RTYUU7 жыл бұрын
Guys! Set the playback speed at 0.5 And seek to 22:06 and enjoy the trainwreck! :) 22:06 to 22:20, I'm crying this is way too funny
@zen20815 жыл бұрын
QW3RTYUU Looool
@MrMeszaros4 жыл бұрын
Totally sounds like drunk
@koetter_boater7 жыл бұрын
Hey Dan, would you ever consider doing separate videos where you go into depth explaining topics that you briefly touch on in the coding challenges? For instance, jsonp, or something similar. I think it would be very beneficial to have a separate video for those that want to go in and learn the details about what you are talking about.
@TheCodingTrain7 жыл бұрын
Yes! In this case, however, I would check out my playlist about data in JS, it goes through lots of pieces of how things work in this video in more detail.
@jhuluan-jyun25946 жыл бұрын
for those who cant get result from loadJSON() function with 'jsonp' parameter, change your p5.js cdn to version 0.6.0 or eariler. In ver0.6.1 p5 will throw an error if you try to load a json file with jsonp format. It should work then :D
@ignacioalamo43036 жыл бұрын
Thanks! I was stuck with that
@gregfletcher23606 жыл бұрын
Any reason why the new version of p5.js hasn't fixed this issue?
@OmarOviedo5 жыл бұрын
Thanks you help a lot with that!
@ggcadc7 жыл бұрын
thank you for doing these, reminding me when im stressed that coding is fun! and im proud to say I finally know enough vanilla js that I could write this, and follow what the p5 lib is doing for you, slick stuff, useful indeed.
@PianoCat-Music7 жыл бұрын
hey Daniel, as always great Video! could you do an episode on the KZbin API? I think that would be fun - and also maybe go deeper into how to secure the API-Key? I really struggle a lot with this security stuff.
@PianoCat-Music7 жыл бұрын
Thanks for the explanation. I figured I can request the API data with cURL in php - and I passed the json object in a variable to a javascript and can call this javascript via AJAX. I think this is secure, right? But what can I do if I want to change the php request after it loaded to make a new request?
@archie64987 жыл бұрын
12:54 that's why I don't have a beard
@slevig4156 жыл бұрын
Don't lie, you can't even grow one lol
@geekyprogrammer48315 жыл бұрын
I feel beard is a form of blessing. Otherwise, we wont be able to differentiate girls and guys!
@RandoSpear7 жыл бұрын
I love your videos! Keep it up!
@saadrahman5626 Жыл бұрын
one of the best tutorials! keep it up!!!
@RicoGalassi6 жыл бұрын
Man I wish i had coding skills like this. I LOVE designing interfaces, but this just seems so much cooler with the right knowledge and skill
@Typhoon8602 жыл бұрын
Okay it's been 3 years. Have you learned the skills yet?
@RicoGalassi2 жыл бұрын
@@Typhoon860 😂 not nearly as much as Dan knows, but I am a developer working full time!!
@steffenderfreak14 жыл бұрын
This is how I use Wikipedia. I search for something about IT stuff and 2 hours later, I end on a page about "8-Oxo-2'-deoxyguanosine"
@aryamankejriwal59597 жыл бұрын
Moral of the story: Wikipedia programmers must watch tom Scott’s programming videos...
@flashgames12736 жыл бұрын
you inspired me to start learning javascript and p5 !! thanks :D
@ianprado14886 жыл бұрын
Your end product was surprisingly very awesome
@kevnar7 жыл бұрын
It goes from "Unicorn" to "Violence in the Quran" in only 3 steps. Wow.
@incernpakistan6 жыл бұрын
plz read translation of Quran in your native language bro. i hope you will change your mind
@incernpakistan6 жыл бұрын
dont go with explanations of scholars. quran is in v.easy language and common man can understand easily
@faizkhairi31656 жыл бұрын
More like from "school" to "shooting range"
@kaio37k6 жыл бұрын
I read it, but all I see is page after page of violence, oppression of women, murder of gays and non-believers and other messed up things. Are you sure you're not reading a story book?
@shakos41056 жыл бұрын
Anernermus I don't know if you've bothered to even look at the Bible or Torah before but all of these holy scriptures talk about violence, blood, death etc. They all have stories behind them , simply looking at it without knowing and understanding it's context, does not make you knowledgeable enough to judge the Quran.
@paddym276 жыл бұрын
first time i have watched one of these videos, but i can totally relate to this processes as he goes through the problem. It's almost like exactly how i'd approach it. Love it - subscribed.
@FMpundit7 жыл бұрын
Love that first random word is just an average word.
@ThommyKane4 жыл бұрын
where the fuck has this channel been my whole life?
@JordanMSeverns2 жыл бұрын
Sometimes i wonder how this guy codes anything without chat pointing out his typos lol
@buffetglider4 жыл бұрын
Amazing effect of presenting with the screen behind you. Well done.
@critstixdarkspear53755 жыл бұрын
Saint Codius of KZbin. ❤️
@forgoroe7 жыл бұрын
Back when I tried using the wikipedia API, I sorta hated it. So convoluted for no reason.
@TheCalax7 жыл бұрын
Forgoroe things tend to get complicated when you're that big of a website/webservice and have hundreds of people work on open source software
@rainaw09246 жыл бұрын
It’s so funny to watch you coding
@franzjosephliszt15557 жыл бұрын
I thought it said "Return of Satan" at first
@sebastiansosa30726 жыл бұрын
I get this error after implementing loadJSON(..):TypeError: res.text is not a function at p5.js:60536? anyone know what is happening.
@ignacioalamo43036 жыл бұрын
Same here!
@sebastiansosa30726 жыл бұрын
It was that he has p5 library installed or linked to the html so instead i just used the jquery version: getJSON(..).
@Codejoy5 жыл бұрын
@@sebastiansosa3072 Where? instead of loadJSON? I did that and same error...
@orduan30206 жыл бұрын
Adding "&formatversion=2" to the query string will solve the insane json format :)
@TheCodingTrain6 жыл бұрын
Thank you!
@ColaBeGaming7 жыл бұрын
This was a great Coding Challenge! I loved it! You still seem to mix up var and let a bit, I guess old habits are hard to break :D
@ColaBeGaming7 жыл бұрын
BurgerBob Check out the Coding Train video on this exact topic! 😊
@willemschipper77365 жыл бұрын
The fact that this is a challenge does not make the Wikipedia API seem very user-friendly
@edwinhighdefinition4 жыл бұрын
why i don't get any description in index 1 off the json array, that's empty
@kirtanmagan30234 жыл бұрын
same
@edwinhighdefinition4 жыл бұрын
@@kirtanmagan3023 and nope... I solve my problem, if you want to get too, you can get it in my api luckedwin.herokuapp.com/wikipedia/en?q=unicorn
@joshuavillenadiaz4026 жыл бұрын
You make me happy. Nice video
@toastyPredicament2 жыл бұрын
The bell makes me euphoric
@grainfrizz7 жыл бұрын
Hey Dan. It turned out to be so great!
@charliedinerman79414 жыл бұрын
Yoooo just found this video congrats on 1m
@mohsinjaved61406 жыл бұрын
1:25 😂😂
@CuongNguyen-le5ic6 жыл бұрын
You see that /, it’s a ledge to next level, lol.
@gjcarrow7 жыл бұрын
You can also avoid the CORS error by adding an options parameter to the URL. Set its value to * (action=opensearch&origin=*&format=json) More info on that can be found at www.mediawiki.org/wiki/API:Cross-site_requests
@rezabavarikor80604 жыл бұрын
Hey, How u doing? That's a good approach for using Wikipedia API.Happy Coding!
@gritkit7 жыл бұрын
Thanks so much for all your great tutorials! I wanted to experiment with the API of xeno-canto.org, a site that collects birds sounds: xeno-canto.org/article/153 However I am getting stuck trying to request the data. Using the search examples given there I get the "No 'Access-Control-Allow-Origin' header..." error. Adding 'jsonp' as a paramter in loadJSON doesn't help, but gives me yet another error: "Uncaught SyntaxError: Unexpected token :". Adding 'json' instead doesn't help either. Could you give me a hint how to solve this? Thanks again and kind regards.
@RedHair651 Жыл бұрын
Did you find a solution in the end?
@gritkit Жыл бұрын
@@RedHair651 Unfortunately not. After trying this or that I gave up on it.
@jasperreichardt4 жыл бұрын
"Your Bank account is -5000$, you cannot buy food right now" .... hmm let me just do 'jsonp' there and .............MAGIC! trolololo
@Rolo-Tony6 жыл бұрын
@denisschulz38147 жыл бұрын
Your Videos are awesome! Ever thought about making a video about the Amazon Echo / Alexa API? I think it's in JavaScript too, and it would be great!
@TheCodingTrain7 жыл бұрын
Yes it's on my list!
@denisschulz38147 жыл бұрын
Wow! I did not expect you would respond to this at all, let alone this fast! Well, this makes you even more awesome! Thank You for all the great Videos :) I am really looking forward to see you dealing with the Alexa API, since I am going to study Software Engineering starting next year and I eventually want to found a company in this whole smart-connected-home field, so I think your video will help me to better understand how cutting-edge technology like Amazon's API is scripted and scripted with. Again, thank you for your quick Answer! Have a nice day
@ledues33362 жыл бұрын
@@denisschulz3814 what are you up to these days?
@alsacchi6 жыл бұрын
I will improve this version, one user input(target), add the random wiki page api,and the code have to go to the target using link in the first random page loaded before
@igotapochahontas6 жыл бұрын
Wheres the jsonp video? I'd like to check that one out next. I've been doing a lot of node and api stuff because of these inspiring videos. Keep up the good work, bro.
@AncientPixel_AP7 жыл бұрын
let it stop when finding "Kevon_Bacon" ^^
@TheCoolSquare7 жыл бұрын
I just tried changing the source to do this and it went for a while before just crashing
@akashsapiens81576 жыл бұрын
Soo cute... You're really a cool developer 😊 I just wanna work with such guyz like you... Continue your service here its really inspiring us💕
@amey70646 жыл бұрын
Hey Daniel, next coding challenge : GitHub Bot It can pick random repositories, but also choose them based upon stars.
@poonamdevi29014 жыл бұрын
where do you get this app from please tell i should also do it
@subzeronitro46865 жыл бұрын
I was screaming at my screen when I saw instead of
@carljorgensen84897 жыл бұрын
I have serious problems downloading p5 on my pc. Or not exactly the download but how to set it up
@Sejiko7 жыл бұрын
hi go to this site:p5js.org/download/ hit the full package extract the zip and link the html with that p5.js just like javascript files .... now you have to link your own script.js and write this 2 functions setup and draw then u are ready
@eugen1897639876893796 жыл бұрын
I was wondering if it impacts performance if I use a „global“ variable instead of passing it as argument to a function. In your case you made the method goWiki() read from the input field instead of passing the content of the input field to the method. So, is this (in JS world) different performance wise or is it semantically equal?
@nirmalmattmusic39934 жыл бұрын
For first time in the history of programming, Daniel Shiffman wrote noCanvas()
@HdRFan76 жыл бұрын
11:38 No you couldn't because this would only replace the first whitepace.
@carlospita5566 жыл бұрын
I've ran his code copied from github both locally and from a server, and I always get this error: TypeError: res.text is not a function at p5.js:60536 pls help
@TheCodingTrain6 жыл бұрын
Would you mind asking at discourse.processing.org/! It's a better platform for Processing and p5.js related code questions. You can share code there easily! Feel free to link from here to your post.
@TheCalax7 жыл бұрын
Damn, you're pretty fun and awesome at presenting this stuff! I'd kinda love to do something with you some time :p
@ac130kz7 жыл бұрын
How do I avoid Access-Control-Allow-Origin with POST requests (as jsonp works only with GET)? I've been using a chrome extension to do this, but I need another method to do it within javascript or python
@POGOLAUNCHER7 жыл бұрын
If it is for a small experimental project you could make your request using cors.now.sh/
@POGOLAUNCHER7 жыл бұрын
Or google making your own proxy that allows CORS, probably using php or something.
@ac130kz7 жыл бұрын
thanks! I got it working with this handy script pastebin.com/gWgwcF77
@rje6136 жыл бұрын
Stresses me out how hard he hits enter
@mii39396 жыл бұрын
open h1 and close h2... Logic? :'D Nice vid man!
@flashgames12736 жыл бұрын
How would you make a "wait for data function" (maybe with a loading bar) if your internet connection is really slow?
@TheAbsoluteProduction5 жыл бұрын
progress ?
@charbelsarkis35676 жыл бұрын
Ohh these videos without the es6 arrow function are nostalgic
@chuck.rincon7 жыл бұрын
Does anyone knows what JSON extensión is using for view the formated JSON on the browser?
@ac130kz7 жыл бұрын
JSON Formatter
@juicepops78194 жыл бұрын
7:27 Tony Stark gets a anxiety attack
@xiaoqi2002681467 жыл бұрын
is there a way to overwrite and result instead of appending to the end of the last result on html page?
@ankk986 жыл бұрын
how you remember so much syntax? I am so confused and forget the syntax over time and how you type so fast? Is it just experiance and practice ??
@Maric186 жыл бұрын
yeah it is ... if you work with something a lot, you get familiar, dont give up
@SocksYTTV6 жыл бұрын
Does anyone know how I would go about doing a breadth first search type of program for Wikipedia hyper links so I can see the fastest way to go from one article to another by only clicking hyperlinks ?
@ali-ahmed.7 жыл бұрын
There should be a KZbin bot that likes every video you upload.
@sandywyper6 жыл бұрын
But how do you parse the ruddy wikiText?!? Was waiting for ages for that. I eventually gave in and just used the link from the JSON to the desired article.
@sweetberries46115 жыл бұрын
Why did you close tag?
@kunjchoksi6 жыл бұрын
Great Video sir. Is it possible to fetch data using vanilla JS and solving error "No 'Access-Control-Allow-Origin'" . cause i'm stuck in this error. I do not want to use p5.js.
Some of these functions such as select do not work in codepen.io! Also, where are you calling setup() ? I am sorry I'm so confused how this works
@TheCodingTrain7 жыл бұрын
you have to import the p5.js library! You can try some of these workflow videos: sublime text: kzbin.info/www/bejne/i3Srq5-Lnql3Z5I atom editor: kzbin.info/www/bejne/mmSylHmbrcpsf80 brackets: kzbin.info/www/bejne/pJ69k5uDltOJmbs codepen: kzbin.info/www/bejne/a5jJhpqEpbhpobs
@MediaCoastline7 жыл бұрын
Wow, thanks! Love the way you teach by the way. Your series on regular expressions is a masterpiece.
@Karl93rus7 жыл бұрын
The most hard part of this all was to get through the most complicated api description EVER! )) You should make a video about how to understand what the hell should a person do to make a query to wikipedia )) by the way, did u sell ur soul for this knowledge? ))
@l2ubio11 ай бұрын
21:30 lol of all the 2000 words ofc you got the word "average" from a random() function
@youchuanwang17387 жыл бұрын
5:52 You are welcome :)
@breeneehuson51593 жыл бұрын
I watch many of your video, and you manner to present videos attrack me to continue, although, that I am looking for how to handle data from a json file using javascript. Here I try to use datatable but, I have a problem of iterate over the json file which is a compelxed (contain an object of array and object with repetitive keys in different level). It seems easy :))
@samuelcoelho52676 жыл бұрын
I get this error -- "Origin null is not allowed by Access-Control-Allow-Origin" when trying to connect to the API. Anyone have any idea how can I fix this? (I get the same error when hosting a local server as well)
@Maric186 жыл бұрын
see video
@surekhalate42076 жыл бұрын
Keep it up sir
@wilkins74077 жыл бұрын
Why do you use `let` so much when you're not reassigning? you should use `const`
@wilkins74077 жыл бұрын
you also make a page variable which is `data.query.pages` but you don't replace that call in `Object.keys(data.query.pages)` to be `Object.keys(page)` :'(
@TheRealKitWalker4 жыл бұрын
This was fun! I was sceptical of this video but it turned out really really fun 🤓 Thanks
@krishgarg28062 жыл бұрын
Fun Fact: You can pretty easily do this without p5js and with just browser apis like fetch and document.querySelector
@Jackfromstatefarm4 жыл бұрын
10:45 the story of my god damn life lmao
@etemkaandelibas36497 жыл бұрын
Great video
@notnooryno7 жыл бұрын
How do you get Processing.py sketches to display in a web page?
@LeeWalton_19996 жыл бұрын
Maybe a game where you have to try to pick a word that calls back the highest number of other terms before it encounters an error and ends, would have to test on average how many times it would though haha.
@vcothur76 жыл бұрын
There's an Unicorn cricket team 😂
@ytsks4 жыл бұрын
I like how this dude looks like he is on speed, even tho I am sure he isn't.
@geraldbustos7 жыл бұрын
Something With Google Maps???
@hermannbarbato7 жыл бұрын
I think my brain crashed somewhere between the callbacks and the regular expressions.
@alonattar38367 жыл бұрын
Great work Dan ! :) Can you please next time program in CSS :D Thanks alon :)
@TheCalax7 жыл бұрын
You don't really "program" in CSS
@rivarelven41296 жыл бұрын
make google maps api challenge
@twistedsim7 жыл бұрын
Nice video, you should try using only the embedded Wikipédia links instead of random word in the page.
@TheMrInfantaria7 жыл бұрын
Daniel, do you still update the patreon page? Last post i see there from you is from 2016....
@TheCodingTrain7 жыл бұрын
I am using Patreon as a service but really only to process payments, I release the content here and correspond with Patrons via slack and e-mail.
@amirmekk96497 жыл бұрын
I hate CORS so much that I stopped learning to code because of it for a while , anyway awesome workman
@DimGG7 жыл бұрын
cors.now.sh
@amirmekk96497 жыл бұрын
Dim this seems awesome I am gonna use it thanks
@not2day6466 жыл бұрын
@@DimGG wait dim? How good to see you here. I know you'd from discord.js discord server xD