Coding Challenge #75: Wikipedia API

  Рет қаралды 317,439

The Coding Train

The Coding Train

Күн бұрын

Пікірлер: 288
@kmeadows100
@kmeadows100 4 жыл бұрын
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."
@akshatjain2157
@akshatjain2157 6 жыл бұрын
You sir are a gift to humanity.
@edazpotato4908
@edazpotato4908 4 жыл бұрын
1:28 : *...* - most big brain moment in the history of web development
@ShadowDev6969
@ShadowDev6969 4 жыл бұрын
could have been avoided if he used visual studio 2019
@zackydev
@zackydev 4 жыл бұрын
@@ShadowDev6969 oooooof
@KangJangkrik
@KangJangkrik 4 жыл бұрын
@@ShadowDev6969 Visual Studio Code to be precise
@ShadowDev6969
@ShadowDev6969 4 жыл бұрын
@@KangJangkrik vs code is bloat.
@KangJangkrik
@KangJangkrik 4 жыл бұрын
(surprised pikachu face)
@NicolaiWeitkemper
@NicolaiWeitkemper 6 жыл бұрын
Using all those "shortcuts" but writing counter = counter + 1
@ilijaradosavljevic7166
@ilijaradosavljevic7166 6 жыл бұрын
Nicolai Weitkemper loool
@kaio37k
@kaio37k 6 жыл бұрын
What would you use instead? I assume "counter+=;" ?
@ilijaradosavljevic7166
@ilijaradosavljevic7166 6 жыл бұрын
Anernermus contuer+=1;
@kaio37k
@kaio37k 6 жыл бұрын
Thanks!
@pulloutking
@pulloutking 6 жыл бұрын
counter++?
@devjimmy
@devjimmy 7 жыл бұрын
9 times... (counter = 0, counter = counter + 1, counter < 10). I like you're doing little mistakes, feels more natural ot rehearsed.
@steffenderfreak1
@steffenderfreak1 4 жыл бұрын
There are no bug, just happy little accidents
@xzero01501
@xzero01501 7 жыл бұрын
userimput gave me a headache.
@_keano
@_keano 7 жыл бұрын
same
@okay-bro1
@okay-bro1 7 жыл бұрын
same
@beyondcatastrophe_
@beyondcatastrophe_ 7 жыл бұрын
So unnerving...
@requiitas
@requiitas 6 жыл бұрын
too ... :D
@courtneyhackshaw3420
@courtneyhackshaw3420 6 жыл бұрын
I really don't know what to make of that loool
@koetter_boater
@koetter_boater 7 жыл бұрын
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.
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
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.
@yuliaberezina1752
@yuliaberezina1752 4 жыл бұрын
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!!!
@CCcrafted
@CCcrafted 7 жыл бұрын
Dear god man, you have no idea how much that probably just helped me with my a level computer science coursework! Thankyou!
@slick8509
@slick8509 7 жыл бұрын
Coding challenge : pacman
@PianoCat-Music
@PianoCat-Music 7 жыл бұрын
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-Music
@PianoCat-Music 7 жыл бұрын
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?
@riguidixrodriguez1090
@riguidixrodriguez1090 5 жыл бұрын
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
@QW3RTYUU
@QW3RTYUU 7 жыл бұрын
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
@zen2081
@zen2081 5 жыл бұрын
QW3RTYUU Looool
@MrMeszaros
@MrMeszaros 4 жыл бұрын
Totally sounds like drunk
@archie6498
@archie6498 7 жыл бұрын
12:54 that's why I don't have a beard
@slevig415
@slevig415 6 жыл бұрын
Don't lie, you can't even grow one lol
@geekyprogrammer4831
@geekyprogrammer4831 5 жыл бұрын
I feel beard is a form of blessing. Otherwise, we wont be able to differentiate girls and guys!
@ggcadc
@ggcadc 7 жыл бұрын
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.
@RicoGalassi
@RicoGalassi 6 жыл бұрын
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
@Typhoon860
@Typhoon860 2 жыл бұрын
Okay it's been 3 years. Have you learned the skills yet?
@RicoGalassi
@RicoGalassi 2 жыл бұрын
@@Typhoon860 😂 not nearly as much as Dan knows, but I am a developer working full time!!
@saadrahman5626
@saadrahman5626 Жыл бұрын
one of the best tutorials! keep it up!!!
@flashgames1273
@flashgames1273 6 жыл бұрын
you inspired me to start learning javascript and p5 !! thanks :D
@RandoSpear
@RandoSpear 7 жыл бұрын
I love your videos! Keep it up!
@buffetglider
@buffetglider 4 жыл бұрын
Amazing effect of presenting with the screen behind you. Well done.
@paddym27
@paddym27 6 жыл бұрын
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.
@aryamankejriwal5959
@aryamankejriwal5959 7 жыл бұрын
Moral of the story: Wikipedia programmers must watch tom Scott’s programming videos...
@critstixdarkspear5375
@critstixdarkspear5375 5 жыл бұрын
Saint Codius of KZbin. ❤️
@kevnar
@kevnar 7 жыл бұрын
It goes from "Unicorn" to "Violence in the Quran" in only 3 steps. Wow.
@incernpakistan
@incernpakistan 6 жыл бұрын
plz read translation of Quran in your native language bro. i hope you will change your mind
@incernpakistan
@incernpakistan 6 жыл бұрын
dont go with explanations of scholars. quran is in v.easy language and common man can understand easily
@faizkhairi3165
@faizkhairi3165 6 жыл бұрын
More like from "school" to "shooting range"
@kaio37k
@kaio37k 6 жыл бұрын
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?
@shakos4105
@shakos4105 6 жыл бұрын
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.
@toastyPredicament
@toastyPredicament 2 жыл бұрын
The bell makes me euphoric
@forgoroe
@forgoroe 7 жыл бұрын
Back when I tried using the wikipedia API, I sorta hated it. So convoluted for no reason.
@TheCalax
@TheCalax 7 жыл бұрын
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
@jhuluan-jyun2594
@jhuluan-jyun2594 6 жыл бұрын
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
@ignacioalamo4303
@ignacioalamo4303 6 жыл бұрын
Thanks! I was stuck with that
@gregfletcher2360
@gregfletcher2360 5 жыл бұрын
Any reason why the new version of p5.js hasn't fixed this issue?
@OmarOviedo
@OmarOviedo 5 жыл бұрын
Thanks you help a lot with that!
@ianprado1488
@ianprado1488 6 жыл бұрын
Your end product was surprisingly very awesome
@FMpundit
@FMpundit 7 жыл бұрын
Love that first random word is just an average word.
@rainaw0924
@rainaw0924 6 жыл бұрын
It’s so funny to watch you coding
@willemschipper7736
@willemschipper7736 5 жыл бұрын
The fact that this is a challenge does not make the Wikipedia API seem very user-friendly
@ColaBeGaming
@ColaBeGaming 7 жыл бұрын
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
@ColaBeGaming
@ColaBeGaming 7 жыл бұрын
BurgerBob Check out the Coding Train video on this exact topic! 😊
@JordanMSeverns
@JordanMSeverns 2 жыл бұрын
Sometimes i wonder how this guy codes anything without chat pointing out his typos lol
@orduan3020
@orduan3020 6 жыл бұрын
Adding "&formatversion=2" to the query string will solve the insane json format :)
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
Thank you!
@joshuavillenadiaz402
@joshuavillenadiaz402 6 жыл бұрын
You make me happy. Nice video
@grainfrizz
@grainfrizz 7 жыл бұрын
Hey Dan. It turned out to be so great!
@Rolo-Tony
@Rolo-Tony 6 жыл бұрын
@franzjosephliszt1555
@franzjosephliszt1555 7 жыл бұрын
I thought it said "Return of Satan" at first
@igotapochahontas
@igotapochahontas 6 жыл бұрын
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.
@charliedinerman7941
@charliedinerman7941 4 жыл бұрын
Yoooo just found this video congrats on 1m
@Karl93rus
@Karl93rus 6 жыл бұрын
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? ))
@akashsapiens8157
@akashsapiens8157 5 жыл бұрын
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💕
@ThommyKane
@ThommyKane 4 жыл бұрын
where the fuck has this channel been my whole life?
@amey7064
@amey7064 6 жыл бұрын
Hey Daniel, next coding challenge : GitHub Bot It can pick random repositories, but also choose them based upon stars.
@mii3939
@mii3939 6 жыл бұрын
open h1 and close h2... Logic? :'D Nice vid man!
@rezabavarikor8060
@rezabavarikor8060 4 жыл бұрын
Hey, How u doing? That's a good approach for using Wikipedia API.Happy Coding!
@steffenderfreak1
@steffenderfreak1 4 жыл бұрын
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"
@denisschulz3814
@denisschulz3814 7 жыл бұрын
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!
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
Yes it's on my list!
@denisschulz3814
@denisschulz3814 7 жыл бұрын
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
@ledues3336
@ledues3336 2 жыл бұрын
@@denisschulz3814 what are you up to these days?
@charbelsarkis3567
@charbelsarkis3567 6 жыл бұрын
Ohh these videos without the es6 arrow function are nostalgic
@sandywyper
@sandywyper 6 жыл бұрын
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.
@subzeronitro4686
@subzeronitro4686 5 жыл бұрын
I was screaming at my screen when I saw instead of
@TheCalax
@TheCalax 7 жыл бұрын
Damn, you're pretty fun and awesome at presenting this stuff! I'd kinda love to do something with you some time :p
@jasperreichardt
@jasperreichardt 4 жыл бұрын
"Your Bank account is -5000$, you cannot buy food right now" .... hmm let me just do 'jsonp' there and .............MAGIC! trolololo
@pythonSefer
@pythonSefer 3 жыл бұрын
Yes, there is a Wikipedia article for "P": en.wikipedia.org/wiki/P
@mikefigueiredo4312
@mikefigueiredo4312 3 жыл бұрын
The best!
@aniekanumoren6088
@aniekanumoren6088 7 жыл бұрын
+The Coding Train I don't mean to spam, and I know you've done a box2d tutorial but I can't seem to find any good examples on how to use *raycasting* in Box2DProcessing. I was hoping that you could make tutorial for it. Thank you for your consideration. Nice video!
@nirmalmattmusic3993
@nirmalmattmusic3993 4 жыл бұрын
For first time in the history of programming, Daniel Shiffman wrote noCanvas()
@TheRealKitWalker
@TheRealKitWalker 4 жыл бұрын
This was fun! I was sceptical of this video but it turned out really really fun 🤓 Thanks
@O1zo
@O1zo 5 жыл бұрын
Your input tag is wrong . . Do not need a closing tag for input
@AncientPixel_AP
@AncientPixel_AP 7 жыл бұрын
let it stop when finding "Kevon_Bacon" ^^
@TheCoolSquare
@TheCoolSquare 7 жыл бұрын
I just tried changing the source to do this and it went for a while before just crashing
@rje613
@rje613 6 жыл бұрын
Stresses me out how hard he hits enter
@surekhalate4207
@surekhalate4207 6 жыл бұрын
Keep it up sir
@eugen189763987689379
@eugen189763987689379 5 жыл бұрын
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?
@RogelioIturra
@RogelioIturra Жыл бұрын
Thanks master! :D
@mohsinjaved6140
@mohsinjaved6140 6 жыл бұрын
1:25 😂😂
@CuongNguyen-le5ic
@CuongNguyen-le5ic 6 жыл бұрын
You see that /, it’s a ledge to next level, lol.
@gritkit
@gritkit 6 жыл бұрын
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
@RedHair651 Жыл бұрын
Did you find a solution in the end?
@gritkit
@gritkit Жыл бұрын
@@RedHair651 Unfortunately not. After trying this or that I gave up on it.
@geraldbustos
@geraldbustos 7 жыл бұрын
Something With Google Maps???
@juicepops7819
@juicepops7819 4 жыл бұрын
7:27 Tony Stark gets a anxiety attack
@etemkaandelibas3649
@etemkaandelibas3649 7 жыл бұрын
Great video
@breeneehuson5159
@breeneehuson5159 3 жыл бұрын
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 :))
@wilkins7407
@wilkins7407 7 жыл бұрын
Why do you use `let` so much when you're not reassigning? you should use `const`
@wilkins7407
@wilkins7407 7 жыл бұрын
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)` :'(
@LeeWalton_1999
@LeeWalton_1999 5 жыл бұрын
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.
@abdalhfeez4350
@abdalhfeez4350 6 жыл бұрын
I love code challenge ❤🇸🇩
@l2ubio
@l2ubio 9 ай бұрын
21:30 lol of all the 2000 words ofc you got the word "average" from a random() function
@PhilippeRigovanov
@PhilippeRigovanov 7 жыл бұрын
Awesome!
@betillgalvan1094
@betillgalvan1094 6 жыл бұрын
Amazing!
@sweetberries4611
@sweetberries4611 5 жыл бұрын
Why did you close tag?
@amirmekk9649
@amirmekk9649 7 жыл бұрын
I hate CORS so much that I stopped learning to code because of it for a while , anyway awesome workman
@DimGG
@DimGG 7 жыл бұрын
cors.now.sh
@amirmekk9649
@amirmekk9649 7 жыл бұрын
Dim this seems awesome I am gonna use it thanks
@not2day646
@not2day646 6 жыл бұрын
@@DimGG wait dim? How good to see you here. I know you'd from discord.js discord server xD
@HdRFan7
@HdRFan7 6 жыл бұрын
11:38 No you couldn't because this would only replace the first whitepace.
@krishgarg2806
@krishgarg2806 2 жыл бұрын
Fun Fact: You can pretty easily do this without p5js and with just browser apis like fetch and document.querySelector
@hermannbarbato
@hermannbarbato 7 жыл бұрын
I think my brain crashed somewhere between the callbacks and the regular expressions.
@twistedsim
@twistedsim 7 жыл бұрын
Nice video, you should try using only the embedded Wikipédia links instead of random word in the page.
@poonamdevi2901
@poonamdevi2901 3 жыл бұрын
where do you get this app from please tell i should also do it
@edwinhighdefinition
@edwinhighdefinition 4 жыл бұрын
why i don't get any description in index 1 off the json array, that's empty
@kirtanmagan3023
@kirtanmagan3023 4 жыл бұрын
same
@edwinhighdefinition
@edwinhighdefinition 4 жыл бұрын
@@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
@ytsks
@ytsks 4 жыл бұрын
I like how this dude looks like he is on speed, even tho I am sure he isn't.
@rujor
@rujor 5 жыл бұрын
Linter please. Would save us all some minutes here and there. ☺️
@walterclementsjr.5947
@walterclementsjr.5947 3 жыл бұрын
wikipedia has an option to accept CORS requests by adding '&origin=*' to the url.
@sebastiansosa3072
@sebastiansosa3072 6 жыл бұрын
I get this error after implementing loadJSON(..):TypeError: res.text is not a function at p5.js:60536? anyone know what is happening.
@ignacioalamo4303
@ignacioalamo4303 6 жыл бұрын
Same here!
@sebastiansosa3072
@sebastiansosa3072 6 жыл бұрын
It was that he has p5 library installed or linked to the html so instead i just used the jquery version: getJSON(..).
@Codejoy
@Codejoy 5 жыл бұрын
@@sebastiansosa3072 Where? instead of loadJSON? I did that and same error...
@ali-ahmed.
@ali-ahmed. 7 жыл бұрын
There should be a KZbin bot that likes every video you upload.
@abdalhfeez4350
@abdalhfeez4350 6 жыл бұрын
You're awesome sir I need the steps to be full software engineer in JavaScript Please give me the steps ❤
@chris56a
@chris56a 6 жыл бұрын
i cant really code but i understand what your doing, I dont really think in numbers i see more in images, i understood your "snake" video more than this one
@kunjchoksi
@kunjchoksi 6 жыл бұрын
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.
@miroslavsafin
@miroslavsafin 6 жыл бұрын
fetch(url).then(r => r.json()) .then(data => console.log(data)) .catch(e => console.log("Booo"))
@flashgames1273
@flashgames1273 6 жыл бұрын
How would you make a "wait for data function" (maybe with a loading bar) if your internet connection is really slow?
@TheAbsoluteProduction
@TheAbsoluteProduction 5 жыл бұрын
progress ?
@carljorgensen8489
@carljorgensen8489 7 жыл бұрын
I have serious problems downloading p5 on my pc. Or not exactly the download but how to set it up
@Sejiko
@Sejiko 7 жыл бұрын
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
@vcothur7
@vcothur7 6 жыл бұрын
There's an Unicorn cricket team 😂
@rivarelven4129
@rivarelven4129 6 жыл бұрын
make google maps api challenge
@xiaoqi200268146
@xiaoqi200268146 6 жыл бұрын
is there a way to overwrite and result instead of appending to the end of the last result on html page?
@alonattar3836
@alonattar3836 7 жыл бұрын
Great work Dan ! :) Can you please next time program in CSS :D Thanks alon :)
@TheCalax
@TheCalax 7 жыл бұрын
You don't really "program" in CSS
@raghavgupta1157
@raghavgupta1157 7 жыл бұрын
are you doing webscrapping?
@IgorMarty
@IgorMarty 7 жыл бұрын
I love your challenge but this HTML is so wong !
@TheCodingTrain
@TheCodingTrain 7 жыл бұрын
Say more! Or better yet post an issue with explanation at the Rainbow-Code github!
@condor07uk
@condor07uk 7 жыл бұрын
Igor Marty for starters you have declared an h1 and closed an h2 tag input tags dont need to be closed
Coding Challenge #74: Clock with p5.js
20:39
The Coding Train
Рет қаралды 495 М.
Coding Challenge 185: Unfolding Fractals
31:04
The Coding Train
Рет қаралды 41 М.
兔子姐姐最终逃走了吗?#小丑#兔子警官#家庭
00:58
小蚂蚁和小宇宙
Рет қаралды 11 МЛН
НИКИТА ПОДСТАВИЛ ДЖОНИ 😡
01:00
HOOOTDOGS
Рет қаралды 2,9 МЛН
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 341 М.
Coding Challenge 93: Double Pendulum
31:11
The Coding Train
Рет қаралды 920 М.
CSS Anchor Is The Best New CSS Feature Since Flexbox
15:39
Web Dev Simplified
Рет қаралды 373 М.
Coding Challenge #20: 3D Cloth with toxiclibs
30:40
The Coding Train
Рет қаралды 94 М.
Inheritance in JavaScript - Prototypal Inheritance tutorial
20:06
How One Small Change Broke Wikipedia's First Link Rule
20:33
Not David
Рет қаралды 823 М.
I learned to code from scratch in 1 year. Here's how.
41:55
Thomas Frank
Рет қаралды 420 М.
Coding Challenge 179: Elementary Cellular Automata
21:41
The Coding Train
Рет қаралды 154 М.
Coding Challenge #29: Smart Rockets in p5.js
48:17
The Coding Train
Рет қаралды 405 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 409 М.
兔子姐姐最终逃走了吗?#小丑#兔子警官#家庭
00:58
小蚂蚁和小宇宙
Рет қаралды 11 МЛН