Did one of my favourite people just reference another of my favourite people? My life is complete.
@Italiankid10296 жыл бұрын
The day I see "Coding Train ft. Tom Scott" is the day I can die happy
@zach_attakk6 жыл бұрын
@@Italiankid1029 As good as Tom Scott is at explaining things, it's more in the abstract. I think it would make more sense if Tom featured Daniel to explain the actual code. Still an awesome concept. Like that time Mark Rober featured Captain Disillusion. Early-youtube-me was very happy.
@faridwakim6 жыл бұрын
@@zach_attakk well jabrils and daniel did a collab recently, so this isn't a distant idea
@UserUnknown074 жыл бұрын
Haha yes
@MineBill_6 жыл бұрын
Enjoy people, you don't know the horror he went through on the live stream :p
@TheCodingTrain6 жыл бұрын
I should link to a timecode so people can find it. . .
@umarajaraman92106 жыл бұрын
Which stream
@umarajaraman92106 жыл бұрын
Could u link the stream
@glitch3dout6 жыл бұрын
Here you go: kzbin.info/www/bejne/mGm1qIJnoJ53jsU
@umarajaraman92106 жыл бұрын
Thanks machan
@sujals71086 жыл бұрын
You are awesome, you inspired me to become a programmer
@infernocaptures87396 жыл бұрын
Nice! You and Tom are my favourite computer people on KZbin. Also I appreciate the use of the word 'bodge'.
@TheCodingTrain6 жыл бұрын
I thought maybe I said "kludge"? Did I say bodge in this video? I love that word too!
@infernocaptures87396 жыл бұрын
@@TheCodingTrain Idk, you might have said 'kludge', but since I'm not natively English and I don't know that word, I guess I just assumed you said 'bodge'. Doesn't matter, keep up the content!
@sarthakdhanawade13013 жыл бұрын
Sir you are the best coder and a teacher in the world.
@malik6416 жыл бұрын
These are so fun to watch at 2x speed
@ericboyer66525 жыл бұрын
Thanks Daniel using processing, some kind of clock, yes I should have made a class for the segment, it is so not optimize, but anyway int[] nums={0x7E,0x30,0x6D,0x79,0x33,0x5B,0x5F,0x70,0x7F,0x7B}; int index=0; void setup(){ size(1200,700); frameRate(1); } void draw(){ background(0); //future time String strD="10"; String strD1=strD.substring(strD.length()-2).substring(0,1); String strD2=strD.substring(strD.length()-2).substring(1,2); String strM="08"; String strM1=strM.substring(strM.length()-2).substring(0,1); String strM2=strM.substring(strM.length()-2).substring(1,2); String strY="2019"; String strY1=strY.substring(0,1); String strY2=strY.substring(1,2); String strY3=strY.substring(2,3); String strY4=strY.substring(3,4); String strh="07"; String strh1=strh.substring(strh.length()-2).substring(0,1); String strh2=strh.substring(strh.length()-2).substring(1,2); String strm="00"; String strm1=strm.substring(strm.length()-2).substring(0,1); String strm2=strm.substring(strm.length()-2).substring(1,2); String strs="00"; String strs1=strs.substring(strs.length()-2).substring(0,1); String strs2=strs.substring(strs.length()-2).substring(1,2); sevenSegment(nums[parseInt(strD1)],0,0); sevenSegment(nums[parseInt(strD2)],1,0); sevenSegment(nums[parseInt(strM1)],2,0); sevenSegment(nums[parseInt(strM2)],3,0); sevenSegment(nums[parseInt(strY1)],5,0); sevenSegment(nums[parseInt(strY2)],6,0); sevenSegment(nums[parseInt(strY3)],7,0); sevenSegment(nums[parseInt(strY4)],8,0); sevenSegment(nums[parseInt(strh1)],10,0); sevenSegment(nums[parseInt(strh2)],11,0); sevenSegment(nums[parseInt(strm1)],12,0); sevenSegment(nums[parseInt(strm2)],13,0); sevenSegment(nums[parseInt(strs1)],14,0); sevenSegment(nums[parseInt(strs2)],15,0); //current time strD="0"+day(); strD1=strD.substring(strD.length()-2).substring(0,1); strD2=strD.substring(strD.length()-2).substring(1,2); strM="0"+month(); strM1=strM.substring(strM.length()-2).substring(0,1); strM2=strM.substring(strM.length()-2).substring(1,2); strY=""+year(); strY1=strY.substring(0,1); strY2=strY.substring(1,2); strY3=strY.substring(2,3); strY4=strY.substring(3,4); strh="0"+hour(); strh1=strh.substring(strh.length()-2).substring(0,1); strh2=strh.substring(strh.length()-2).substring(1,2); strm="0"+minute(); strm1=strm.substring(strm.length()-2).substring(0,1); strm2=strm.substring(strm.length()-2).substring(1,2); strs="0"+second(); strs1=strs.substring(strs.length()-2).substring(0,1); strs2=strs.substring(strs.length()-2).substring(1,2); sevenSegment(nums[parseInt(strD1)],0,1); sevenSegment(nums[parseInt(strD2)],1,1); sevenSegment(nums[parseInt(strM1)],2,1); sevenSegment(nums[parseInt(strM2)],3,1); sevenSegment(nums[parseInt(strY1)],5,1); sevenSegment(nums[parseInt(strY2)],6,1); sevenSegment(nums[parseInt(strY3)],7,1); sevenSegment(nums[parseInt(strY4)],8,1); sevenSegment(nums[parseInt(strh1)],10,1); sevenSegment(nums[parseInt(strh2)],11,1); sevenSegment(nums[parseInt(strm1)],12,1); sevenSegment(nums[parseInt(strm2)],13,1); sevenSegment(nums[parseInt(strs1)],14,1); sevenSegment(nums[parseInt(strs2)],15,1); //past time strD="09"; strD1=strD.substring(strD.length()-2).substring(0,1); strD2=strD.substring(strD.length()-2).substring(1,2); strM="08"; strM1=strM.substring(strM.length()-2).substring(0,1); strM2=strM.substring(strM.length()-2).substring(1,2); strY="2019"; strY1=strY.substring(0,1); strY2=strY.substring(1,2); strY3=strY.substring(2,3); strY4=strY.substring(3,4); strh="07"; strh1=strh.substring(strh.length()-2).substring(0,1); strh2=strh.substring(strh.length()-2).substring(1,2); strm="01"; strm1=strm.substring(strm.length()-2).substring(0,1); strm2=strm.substring(strm.length()-2).substring(1,2); strs="00"; strs1=strs.substring(strs.length()-2).substring(0,1); strs2=strs.substring(strs.length()-2).substring(1,2); sevenSegment(nums[parseInt(strD1)],0,2); sevenSegment(nums[parseInt(strD2)],1,2); sevenSegment(nums[parseInt(strM1)],2,2); sevenSegment(nums[parseInt(strM2)],3,2); sevenSegment(nums[parseInt(strY1)],5,2); sevenSegment(nums[parseInt(strY2)],6,2); sevenSegment(nums[parseInt(strY3)],7,2); sevenSegment(nums[parseInt(strY4)],8,2); sevenSegment(nums[parseInt(strh1)],10,2); sevenSegment(nums[parseInt(strh2)],11,2); sevenSegment(nums[parseInt(strm1)],12,2); sevenSegment(nums[parseInt(strm2)],13,2); sevenSegment(nums[parseInt(strs1)],14,2); sevenSegment(nums[parseInt(strs2)],15,2); //index=(index+1)%nums.length; } color getColor(int val,int shift,int offset){ color c=color(0,0,0); int a=255*((val >> shift) & 1); if (offset==0){ c=color(255,0,0,a); } if (offset==1){ c=color(0,255,0,a); } if (offset==2){ c=color(255,255,0,a); } return c; } void sevenSegment(int val,int x,int y){ push(); stroke(25); noFill(); //A fill(getColor(val,6,y)); rect(30+70*x,59+200*y,36,9); //B fill(getColor(val,5,y)); rect(70+70*x,70+200*y,9,49); //C fill(getColor(val,4,y)); rect(70+70*x,130+200*y,9,49); //D fill(getColor(val,3,y)); rect(30+70*x,180+200*y,36,9); //E fill(getColor(val,2,y)); rect(20+70*x,130+200*y,9,49); //F fill(getColor(val,1,y)); rect(20+70*x,70+200*y,9,49); //G fill(getColor(val,0,y)); rect(30+70*x,120+200*y,36,9); pop(); } void push(){ } void pop(){ }
@ramizchili80244 жыл бұрын
Finally - a video with 1080p!
@offtheball874 жыл бұрын
My favourite use of bitwise operations in JS was basically implementing a truth table. I had four conditions that could come together in about twelve different ways to affect five different pieces of state, so I just tested them, packed the results in an integer, and used a switch.
@Her0Phi16 жыл бұрын
I just thought over and over again 'what is wrong with him' 🤣🤣👍 Made my day! Keep up this fun content! It suits you.
@grainfrizz6 жыл бұрын
Dan, do the Big O notation and visualize :)
@caribbeanman33796 жыл бұрын
Coding challenge suggestion: Code to spell out a number in full - almost any number, and with the proper placement of commas and "and" - given its numeric digits (e.g. 1254 --> "one thousand, two hundred and fifty four"). I imagine the problem would have to be broken down with the use of several helper functions and the use of recursion. Should be a lot of fun.
@vierajohaninecova39986 жыл бұрын
This video is truly pain to watch 😂
@ChristianSchmid6 жыл бұрын
Hey Dan, you are the real Bit shiftman ! ;-)
@Morphior6 жыл бұрын
Will the Real Bit Shiftman please stand up? Please stand up? Please stand up?
@kennyscott88636 жыл бұрын
I am happy to let the hard coding slide because bitwise. That was an epic win. So happy to see it being used in js.
@paulpandi505 жыл бұрын
It's awesome. You giving crystal clear explanation. 👌👌👌👌👌👌
@harshareddy82636 жыл бұрын
thanks to coding train I was struck at my bit shift color ,thanks your video helped me at color frame
@arnavgarg68026 жыл бұрын
I just really admire your knowledge
@arnavgarg68026 жыл бұрын
Oh my god he liked my comment
@julianburger68576 жыл бұрын
Oh my god, he liked your comment again
@TheCodingTrain6 жыл бұрын
💖💖💖
@julianburger68576 жыл бұрын
💝💝💝
@camiloandrespizahernandez54506 жыл бұрын
He also commented! :O
@skmgeek4 жыл бұрын
The Tom Scott video is literally the top video in my recommended bar on the right of the video XD
@sorbunsong69343 жыл бұрын
i love the way you teach bro.
@charanvengatesh82026 жыл бұрын
Coding Train, Numberphile, Tom Scott, and Jabrilis altogether ->>>> Voltron of Knowledge
@kevnar6 жыл бұрын
I did this on my own one day for a retro scoreboard in a game I was making. I wish I would have known about the bit shifting stuff. Would have saved all kinds of time. I just sent in the digit required, and used a bunch of if-thens to light up each segment if it applies to a given number. So segment A lights up for 2, 3, 5, 6, 7, 8, and 9. B is on for 1, 2, 3, 4, 7, 8, and 9, and so on. I hard-coded the values as well, but I passed an x, y and size values and adjusted the draw positions relative to those, so I could put the digits anywhere on screen and any size.
@nicolasmarois096 жыл бұрын
loved this one!
@patricks59976 жыл бұрын
Ayy a new video ^^ I love it soo much
@nahfamimgood6 жыл бұрын
thinking of this out of context is great. "G is like a but its half way down!"
@asdasddas1006 жыл бұрын
This is why 8 is my favorite number. It took up all the spaces on the seven segment display on my old microwave LOL
@LIGHTRAYMultimedia4 жыл бұрын
Hahahaha. Vou are the best teacher ever! Thanks!
@lorenzm74126 жыл бұрын
just wanna bump the slimemold simulation thingy again, nice challenge this one aswell !
@LuizFernando-ff4ip6 жыл бұрын
Hello The Coding Train, I'm from Brazil so my English is not very good but I'll try to explain my situation. I am 17 year old guy, and I think that I'm a little "old" to learn programming, I tried several times but I failed. Now I'm coming back to study programming more specifically C++, so... My question is: - Do you think that is too late? How old was you when you learned your first programming language?! Greetings from Brazil I love to watch your videos, you inspire me. Oh, one more question guys: Did I write everything right? ^^
@TheCodingTrain6 жыл бұрын
Not a chance you are too old! I started when I was 28. 😱
@LuizFernando-ff4ip6 жыл бұрын
Oh, thank you! So, I still have time.
@coced6 жыл бұрын
The cool tricks of the seventh segment of a seventh segment
@Draugo6 жыл бұрын
That's like... 49 segments
@AniketSingh-zv8sm6 жыл бұрын
I have watched the Livestream , believe me it was hilarious...
@EENYX5 жыл бұрын
Dude, why u so genius ??
@luismiguelgallegogomez80006 жыл бұрын
5:20 Awesome, now I'm going for the 9, 14 and 16 segment display challenge XXDD
@emanuelrouse70765 жыл бұрын
I just found out you were born a day before me!! Awesome haha.
@thefireblaster80426 жыл бұрын
I literally watched the tom scott video before clicking in this
@hickehelbro4 жыл бұрын
"the chat needs to relax" lol
@TheOneAndOnlySecrest6 жыл бұрын
I really like your channel, but sometimes I look on your code thinking this is the most inperformant way of doing stuff :D But great work, maybe some more advanced stuff would be nice in the future.
@bhavikkumargevariya13866 жыл бұрын
5:43 just E is rect(20,.........).
@ZombieOnUSB6 жыл бұрын
The Charlie Day of programming strikes again ! Thanks a lot for videos, going through them as I write this.
@Blananas25 жыл бұрын
"Could you make a clock out of this? Make a rainbow seven-segment display?" "Why not both?" editor.p5js.org/blananas2/full/_XMmUDfxl I'll warn you though that this is extremely difficult to read.
@AbhishekKumar-mq1tt6 жыл бұрын
Thank u for this awesome video
@akhil-sharma6 жыл бұрын
Love it!
@realhuman79114 жыл бұрын
BRUH I CAME HERE CAUSE OF THAT TOM SCOTT VIDD
@isaacbankart6 жыл бұрын
wow with all that bit shifting no wonder they call you Daniel Shiftman!
@nataliekidd21356 жыл бұрын
So weird i just designed circuits for this in my computer architecture class.
@davidbermudez77046 жыл бұрын
Next he’ll teach us the display from the FOX 11 show “24”
@studeii6 жыл бұрын
three quarter speed is a special function
@anuraghazra47726 жыл бұрын
Hi Daniel Love the video but I have some issues understanding Bitwise operations in programming can you please make a tutorial on them, that will be very helpfull for me.
@TheCodingTrain6 жыл бұрын
Yes I am planning to!
@anuraghazra47726 жыл бұрын
Thank You Very Much
@EcoDev-Solutions5 жыл бұрын
Hi. Excellent your tutorials. Have you created the hanoi towers? Greetings from Venezuela
@TheCodingTrain5 жыл бұрын
Not yet! Please suggest or upvote here! github.com/CodingTrain/Rainbow-Topics/issues
@sagartyagi31596 жыл бұрын
Hope you'll get 1M subscribers soon
@dandk_6 жыл бұрын
Wouldn't this be easier using OOP with the desired segments on/off or is that considered worse?
@TheCodingTrain6 жыл бұрын
I agree it would probably be best with OOP!
@MrUgleh6 жыл бұрын
I learned a couple cool things in this video. The mod trick you did with the index, I never thought about doing something like that, and bitwise logic. Although, why is it more perferred to write 0x7E instead of 126? Is it because people looking at your code will think 126 is important, but if they see 0x7E it implies hex trickery?
@davidgildegomezperez43646 жыл бұрын
It would make sense for this application to actually express it in binary
@83daxx6 жыл бұрын
my maturity thesis was on the seven-segment display ;)
@NK-ec8um6 жыл бұрын
"Rounder rectangles" do you see the mistake? ;)
@nero37006 жыл бұрын
RoundeD rectangles, perfectly fine if you'd ask me? :)
@netanelberman62913 жыл бұрын
some people have a bad hair day... dan has a bad code day :)
@michalbotor5 жыл бұрын
how are these hexadecimals and bit shifts making things any easier and clearer than if we simply passed on-off sequences to a display function instead?
@JosueRodriguez086 жыл бұрын
You know that you can use a 8 bit number and make some bitwise operations right? That would be a lot more efficient...I can't understand the way that high level programmers think....
@mastercode78516 жыл бұрын
amazing
@JV-pu8kx2 жыл бұрын
There is a typeface called LCD.
@averagewojak26236 жыл бұрын
That reaction at 7:15
@gamingbutnotreally60776 жыл бұрын
I literally watched Tom Scott’s video right before. Then I come to your channel and see this video! What are the chances?
@followthetrawler6 жыл бұрын
why not use bcd like the electronic drivers do? Or.. or... build it totally out of combinational logic.... ooooo
@sommie49356 жыл бұрын
How does the mod 10 make the index go back to 0 after it exceeds?
@KillerGuy6 жыл бұрын
Can you do a coding challange in processing?
@gamingbutnotreally60776 жыл бұрын
He has... lots of them. You just need to search through the channel
@KillerGuy6 жыл бұрын
@@gamingbutnotreally6077 i know but i already watched all i want a new one
@monikachuttani66455 жыл бұрын
I am in a problem pls help me out In processing when we set the size by writing size(100,100); And the we draw at the pixel (0,0) we get a pixel on the top left corner the what is address of the last bottom right corner pixel will it be 100,100 or 99,99
@danielneiger87766 жыл бұрын
If you wanted to have an object oriented approach then why didn't you do it? There's a lot of people depending on your instruction and some times you take the easy way out.
@tehsimo6 жыл бұрын
God dammit just do a case statement
@osiris54496 жыл бұрын
Interesting. 🤔
@javascripttutorials12216 жыл бұрын
Do you still do JavaScript
@FlameStrykeShadowDark6 жыл бұрын
I attempted to create a seven segment display clock by converting your segment code into a class. I got everything working, but for some reason the segments are being displayed with logarithmic spacing instead of linear spacing, and I'm not sure how to fix it: editor.p5js.org/LordFlameStryke/sketches/rJNT5KWhQ
@FlameStrykeShadowDark6 жыл бұрын
NVM, I figured it out. The translate function was moving everything wrong the way I had it.
@TheCodingTrain6 жыл бұрын
Nice work! You can submit a link to the coding train website if you like! github.com/CodingTrain/website/wiki/Community-Contributions-Guide
@moneymayhem20006 жыл бұрын
What code editor do you use?
@TheCodingTrain6 жыл бұрын
This is using the p5.js web editor! editor.p5js.org For more: kzbin.info/www/bejne/mqWrqXednNB1j8U
@nivemaxe28525 жыл бұрын
Yaah I Mad a zero that was fun thanks 😂😂😂😂
@atanughosh42216 жыл бұрын
16:52 , "counting through hexadecimal values" really ! Hex values starts from 0 and ends at F ur display is only showing BCD values , i. .e 0 to 9.
@hansraborar53484 жыл бұрын
How about make seven segment clock coding train #big fan
@NunoRVOliveira5 жыл бұрын
Does anyone know why do I get "Script error. (: line 0)" when I try to run the script from the link in the description?
@ReneBroekhoven5 жыл бұрын
Had the same. Seems to be error in de on-line editor. Use your own html and js files en run on a little server; it worked for me !
@PoeheeHeLul6 жыл бұрын
Gifted. So jealous.
@FunkL0chx35 жыл бұрын
im not a programmer, but is that the right way to do it? :D
@Rik0346 жыл бұрын
You look like Gideon Goddard from Mr. Robot lol
@kim157426 жыл бұрын
Oh god, JS is not a good language after having used Julia, but oh well. All webdev is in JS
@practicaluseof6 жыл бұрын
Incrível
@ajreukgjdi94 Жыл бұрын
No, I don't wanna complain about your coding abilities... I wanna complain about the entire intro WITH THE MOUSE RIGHT ON TOP OF THE DEMONSTRATION. My mind does not have the fortitude to ignore it. Nor the discipline to pay attention to anything else
@TheCodingTrain Жыл бұрын
This is very fair feedback! Hopefully it's not as prevalent in my other videos.
@ajreukgjdi94 Жыл бұрын
@@TheCodingTrain lol, of the comments I left, this was not the one I expected to see a reply. I hope my all caps wasn't taken too seriously.
@andreariboni42426 жыл бұрын
Lol I've coded something similar in processing this summer
@realsaburu5 жыл бұрын
Name of this Programming LANGUAGE ?
@TheCodingTrain5 жыл бұрын
This video uses JavaScript with the p5.js library, for more: p5js.org.
@vincentcleaver19256 жыл бұрын
ya lost me on the bits
@TheCodingTrain6 жыл бұрын
Yeah, when I watched it back I noticed that the explanation of bit shifting and masking was inadequate. I would l like to make a short video that just explains that aspect later this week.
@MyurrDurr6 жыл бұрын
yes please :D
@ismetbeyazpnar26156 жыл бұрын
i did this in processing 3 i didnt know that hexadecimal codes so ; int[] one = {0,0,1,0,0,1,0}; int[] two = {1,0,1,1,1,0,1}; int[] three = {1,0,1,1,0,1,1}; int[] four = {0,1,1,1,0,1,0}; int[] five = {1,1,0,1,0,1,1}; int[] six = {1,1,0,1,1,1,1}; int[] seven = {1,0,1,0,0,1,0}; int[] eight = {1,1,1,1,1,1,1}; int[] nine = {1,1,1,1,0,1,1}; And lots of if(blabla) the top is 0, top left cross is 1 top right cross is 2 ..... i love coding because there are too many way to do same thing. (this way may be a little longer but its working :D)
@Swiftytheturtle6 жыл бұрын
Made a clock with this. github.com/SwiftyTurtle/7SegmentDisplay_Clock Thanks for what you do! I learned a lot from you. Greetings from Germany!
@TheCodingTrain6 жыл бұрын
Please submit here! Do you have GitHub pages enabled? github.com/CodingTrain/website/wiki/Community-Contributions-Guide
@Swiftytheturtle6 жыл бұрын
Ok, will do that! I do now ;D
@RealTheCrasher86 жыл бұрын
Why are your recomended videos almost the same as mine :O
@letsgocamping886 жыл бұрын
TheGuru54585 mine too. I don’t give a shit about your damn amazon returns box or how you traded a paper clip for a house! I just want to see hard coded rectangles! OK!
@kenhaley46 жыл бұрын
OK, you inspired me. Here's a digital clock using the idea in this video... editor.p5js.org/Khaley4/sketches/By3E58MsX I drew elongated hexagons for the segments to look more realistic, and I used rotate and translate to position and orient the segment, so I only need to actually draw it once (in drawSegment()).
@TheCodingTrain6 жыл бұрын
Wow! Nice work! Please submit a link to the coding train website if you like! github.com/CodingTrain/website/wiki/Community-Contributions-Guide
@kenhaley46 жыл бұрын
I'll do that when I get a chance.
@christernilsson16 жыл бұрын
Where is abcdef?
@easternteasers11276 жыл бұрын
Pls make JavaScript tutorial
@JohnPaulBuce2 жыл бұрын
hardcoding gang
@tranquillityEnthusiast6 жыл бұрын
Sir can you hv to start tutorial on building a great front end with bootstrap??...it's necessary...
@duongaoquang33296 жыл бұрын
Tetris game plz
@fasayakoulouna89874 жыл бұрын
Hi From Algeria,Jijel City.Your work Interrest me more because I'm Looking for methods to describe me The Celest Mechanic under javascript or java.H've find in videos more than things that H've Imagined.thankh you from Jijel.excuse my language.
@pies7006 жыл бұрын
Try this without frameRate(1);
@jjrubes18805 жыл бұрын
hmm... is that an xkcd comic I spot in your downloads? Perhaps this one: xkcd.com/1975/ ?
@doxanthropos6 жыл бұрын
As always fun to watch and to follow along. I upgraded mine to being a clock: doxanthropos.github.io/sketchbook/2018101701/
@TheCodingTrain6 жыл бұрын
Nice work! You can submit a link to the coding train website if you like! github.com/CodingTrain/website/wiki/Community-Contributions-Guide
@doxanthropos6 жыл бұрын
Thank you! Did that.
@arnavgarg68026 жыл бұрын
Hi
@bl4ckscor36 жыл бұрын
Made a version where each segment is an object which you can click on to change whether it's on or off. Additionally you can press any numpad number and instantly change to that :) github.com/bl4ckscor3/ProcessingPlayground/blob/master/SevenSegmentDisplay/
@TheCodingTrain6 жыл бұрын
Awesome! You can submit a link to the coding train website if you like. github.com/CodingTrain/website/wiki/Community-Contributions-Guide Since it's not p5.js maybe include a screenshot or GIF of it running?