Dan I've been watching your playlist on processing, and I just wanted to say I'm a big fan of your videos and teaching style. YOU ARE THE REASON I'm passing my intro to computer science class. I have now become an avid fan of yours, and will continue to promote your videos and content. Keep up being you, you have made learning this stuff for me fun!
@cringy7-year-old56 жыл бұрын
You’re so much better a coding than me that when you were failing at base conversions, something that’s pretty easy in my opinion, I laughed.
@chaitanyasingh86203 жыл бұрын
I was so absorbed in your video that I actually sat for like half an hour. BTW Amazing videos, love it.
@ivannhup85086 жыл бұрын
Base 8 is octal which is often used in representing access to files in read (r) , write (w)or execute (x) permission
@melongoggles83856 жыл бұрын
Honestly. My teacher taught me about binary, decimal and hexadecimal at school. But it was really boring to sit through. I got it in the end but after watching this video i wish my teacher was like you. I mean, lets be honest. This is a pretty boring subject to talk about... but you still somehow manage to make it into a fun and pleasing to watch video while also teaching people about this stuff. Thank you dan!
@ehawkins7306 жыл бұрын
I just completed my own "challenge" of making the Binary Clock based on your tutorial (in Swift)! Thank you for everything and your time exposing us to these techniques!
@TheCodingTrain6 жыл бұрын
Amazing! Did you share a link on the website? github.com/CodingTrain/website/wiki/Community-Contributions-Guide
@ehawkins7306 жыл бұрын
The Coding Train thank you for the comment and encouraging, sir! I posted on Twitter, but I will clean it up and add it to the Github! Thank you for everything!
@loyal07136 жыл бұрын
this.state = 1 - this.state Simple toggle between 1 and 0
@TheCodingTrain6 жыл бұрын
Indeed, thank you!!
@thetastefultoastie60776 жыл бұрын
You can also this.state ^= 1 to avoid writing the variable name twice
@Remls6 жыл бұрын
"to avoid writing the variable name twice" oh god the horror
@loyal07136 жыл бұрын
Can't say I knew about that notation, thanks
@thetastefultoastie60776 жыл бұрын
+Adam Raaif Nasheed not writing the variable twice makes the code more readable, less prone to error and easier to refactor. it's not a huge deal as most editors these days have tools/autocomplete that do these for you but IMHO it's still better
@GF3R6 жыл бұрын
Love your channel :D i work as a dev and from time to time we have kids, interested in computer science, at work. And I love using p5js and your fun ideas to give them a first insight into coding. Obviously i also recommend your channel to them ;)
@TheCodingTrain6 жыл бұрын
So nice, thank you!
@rpanda_old6 жыл бұрын
Brother you deserve more subscribers. Your channel is wonderful. Love from India😍
@aakashkumrawat35096 жыл бұрын
I am also from. #india
@TrebleWing5 жыл бұрын
Loving seeing the bitwise stuff honestly. I code assembly for the 6502 in my hobby time so binary and hex are kinda the only way to get anything done. lol
@ev4_gaming5 жыл бұрын
This is cool! i recently made a converter from any base to any other base on my TI-84
@Holobrine6 жыл бұрын
Hexadecimal conversion from binary is extremely easy and simple. 16 = 2^4, so every 4 bits corresponds to one hex digit, and which hex digit that is is simply the number in those 4 bits.
@justgame55086 жыл бұрын
You can tell most of the programmers who watch you work with high level/abstract programming languages, bitwise operations are used all the time in C and C++, especially if your working with hardware and communicating with individual registers/memory locations
@Laysyv6 жыл бұрын
Wow, I had this homework in highschool! :))
@shervilgupta926 жыл бұрын
Successfully completed it :D, thank you for the idea.
@jiminapemode58736 жыл бұрын
Watched this live.. going to watch it again anyway 😎 epic
@DigitalMonsters6 жыл бұрын
There's probably a hundred easier ways but this is what I scratched out anway. function bin_to_dec(binary) { if (binary.match(/[^0-1]/)) return undefined; return binary.split("").reverse().map(Number) .reduce((dec, bit, index) => dec += Math.pow(2, index) * bit, 0); }
@NerveClasp6 жыл бұрын
I get that this is for those, who only start learning JS, but wouldn't it be cool to introduce some of the ES6 syntax gradually? Otherwise we'll have a lot of new people, who speak Latin =) Here's my quick take on the function that would convert binary to decimal: `const binaryToDecimal = binaryString => binaryString.split('').reverse().reduce((sum, char, i) => sum + Math.pow(2, parseInt(char)), 0)`
@NerveClasp6 жыл бұрын
where `const binaryToDecimal = binaryString => ` is the same as ``` function binaryToDecimal( binaryString ) { return ... } ``` `binaryString.split('')` (those are two single quote marks in brakets) splits a string and makes an array aout of it, which allows us to use all the goodies like 'map', 'forEach', 'filter', 'reduce'.. reduce takes a function (a reducer) which in turn gets the accumulator as the first parameter, here I call it 'sum', second parameter is each element in an array one-by-one, optional `i` is the iterator from the for loop you've used. second reduce parameter is the initial value for the accumulator (`sum` in my case). Again, the reduce part can be rewritten as: ``` .reduce( function( sum, char, i ) { return sum + Math.pow(2, parseInt(char)); }, 0) ``` So instead of all those `function` and `return` and `for (i=0; i binaryString .split('') .reverse() .reduce((sum, char, i) => sum + Math.pow(2, parseInt(char)), 0)
@haripal369 Жыл бұрын
Call me back later when you come to office or exercise English page number 92 aur yah bhi theek hai to mere se baat kar rahi hai mujhe bhi participate kiya hai aur iska class nahi hai aap ka homework kara dena main bhi participate kiya hai aap ke sath se baat simriderde hai aur iska class work bhi nahi karungi aap sabhi ko Tulsi
@NerveClasp Жыл бұрын
@@haripal369 I believe I blocked your number
@NerveClasp Жыл бұрын
@@haripal369 waaaaaait, Prime, is that you?) I hope not, otherwise this would be the most pathetic comeback ever))
@vulturebeast6 жыл бұрын
Respect for you , you're my motivation bro literally love your work 💖
@clipsus_clips6 жыл бұрын
I was really waiting for the ternary operator :)
@landonanderson70156 жыл бұрын
Oh hi
@clipsus_clips6 жыл бұрын
Hello there
@canaDavid16 жыл бұрын
Trinary
@DJW4894 жыл бұрын
This guy is awesome
@twist846 жыл бұрын
Ayy I watched this live, twas fun.
@garrethutchington16633 жыл бұрын
Shouldn't you be multiplying by pow(2, bytes.length - 1 - i); the same index you use to retrieve the bit value?
@davidbale84956 жыл бұрын
8 bits = 1 byte. 4 bits = 1 nybble, 2 bits = $.25
@eris47346 жыл бұрын
2 bits =0.25 2 bitcoins = 3000 coin = 12000
@sitaramshramachetan54236 жыл бұрын
Hey can tell me how to code in java a program by which I am able to draw mathematical curves like you equals x square
@tcocaine6 жыл бұрын
Processing works, I'm sure Java also have official support for DirectX and/or OpenGL
@sitaramshramachetan54236 жыл бұрын
Thank you!
@eugenetswong2 жыл бұрын
Thanks!
@chavezraul68796 жыл бұрын
Guys, I love this channel, I respect and admire Daniel Shiffman and my passion is programming. I really hate to have to do this and is not my intention to do spam, but I really need help with a processing issue. When I try to add a library, a mode or a tool, I can't and a pink error windows message shows saying "Could not connect to the processing server". I've been looking for a solution to that problem, unsuccessfully. I hope to find an answer in this fabulous community, I'd really appreciate it. Thank you!
@TheCodingTrain6 жыл бұрын
Thanks for the question! This error would usually be because of an internet connectivity issue or firewall blocking Processing. Try asking at discourse.processing.org/ it's a better place for questions!
@chavezraul68796 жыл бұрын
@@TheCodingTrain Thank you very much! I finally got a solution. I deleted every single folder of processing files, uninstalling it completely and reinstalling it again. That finally worked. I had tried to reinstall it before, but didn't work, probably because I didn't uninstall it this deep. P.S.: You are my coding inspiration!
@Holobrine6 жыл бұрын
Never count to four in binary with your fingers.
@Xnoob5455 жыл бұрын
Because f😞k
@SimonTiger5 жыл бұрын
I mean, just count up to 1024 with your fingers: www.mathsisfun.com/numbers/binary-count-fingers.html
@MalakaiProgrammer6 жыл бұрын
I see James Veitch in your recommended :eyes: I like James Veitch :eyes:
@gldanoob36396 жыл бұрын
This is pretty easy to do. How about decimal to binary instead???
@deadxaim3 жыл бұрын
You're pretty great.
@koordszz4 жыл бұрын
I like the way this guy thinks. I'm a huuuge fan. PS: Shame on those you skips his ads.
@DowzerWTP726 жыл бұрын
var binaryString = "1001101"; var decimalInt = 0; for (var b=0; b
@zeref7836 жыл бұрын
Is parseInt working for hex(16)?
@noeldiaz13546 жыл бұрын
you should have a section in your website, where people can submit or link there p5 code, it will be cool to see what people do with this type of challenges
@TheCodingTrain6 жыл бұрын
I do! More info here: github.com/CodingTrain/website/wiki/Community-Contributions-Guide
@Engineer97366 жыл бұрын
128 64 32 16 8 4 2 1 On every spot where there is a 1, add this value to the total sum. Tada, stream not needed anymore 😏
@MrDevianceh6 жыл бұрын
var bintodec = str => !(str.match(/^[10]+$/g))?'not binary':str.split('').reverse().map(x=>Number(x)).map((a,b)=>!a?0:(b==0)?1:Array(b).fill(2).reduce((y,z)=>y*z)).reduce((q,e)=>q+e) not the pretties of one liners but i like it
@minijimi6 жыл бұрын
bin2dec(input){ let len = 7; let counter=0; let pos[]; let letter1; let letter2; let letter3; let letter4; let letter5; let letter6; let letter7; letter0=input[0]; letter1=input[1]; letter2=input[2]; letter3=input[3]; letter4=input[4]; letter5=input[5]; letter6=input[6]; letter7=input[7]; pos[0]=1; pos[1]=2; pos[2]=4; pos[3]=8; pos[4]=16; pos[5]=32; pos[6]=64; pos[7]=128; let currentChecker; let decimal; currentChecker=0; if(letter0=='1' && currentChecker==0 && currentChecker
@multiapples62156 жыл бұрын
minijimi You could probably condense that down to a few lines with some for loops “lööps”
@hingedelephant6 жыл бұрын
minijimi Python def bin2dec(numstr): decimal_value = 0 for i, v in enumerate(reversed(numstr)): decimal_value += (2 ** i) * int(v) return decimal_value
@Engineer97366 жыл бұрын
Php:
@Haha0076 жыл бұрын
Hmmm is this gonna be boring addition or some funky binary to bcd using double dabble? I think that would make a funny challenge. ;p
@antonf.92786 жыл бұрын
More and more youtubers find out about this feature
@hingedelephant6 жыл бұрын
Anton Funk And more and more KZbin viewers despise this feature.
@KnakuanaRka6 жыл бұрын
Dave Messer Yeah, what’s the point of it? All I see is it teasing you with notifications about it before it actually shows.
@ahmedbadal37956 жыл бұрын
you look awesome today
@hasancakir89326 жыл бұрын
coding challenge 119: back to the cs101 :)
@milestailsprower45552 жыл бұрын
Long PREMIERE EVER!
@niklaskoskinen1236 жыл бұрын
I think the title is a bit misleading. What you're doing here is most certainly not converting binary to decimal but rather only parsing binary strings to integers (which are still binary). The conversion only happens when the result is automaticlly converted to a decimal string for rendering. I was expecting a conversion from integer to binary coded decimal since that would've been more appropriate when working seven segment displays.
@TheCodingTrain6 жыл бұрын
Good point! The idea was to start here and eventually make it to explaining the conversion in the 7 segment display but I got sidetracked, oops. Thanks for the feedback.
@niklaskoskinen1236 жыл бұрын
@@TheCodingTrain Thanks for the response. Hope you get to doing the bcd conversion some time in the future.
@DowzerWTP726 жыл бұрын
#include #include using namespace std; string binaryString = "0110010"; int decimalOut = 0; int main() { for (int b=0; b
@alexsandergutierrezgoncalves6 жыл бұрын
Hello, I love your videos, I could make a video of raycast implementation in pure javascript.
@hingedelephant6 жыл бұрын
Another premiere? Another video in my feed I’m less likely to watch.
@TheCodingTrain6 жыл бұрын
Thanks for the feedback, this is the first time I'm trying premieres, I will see how it goes and evaluate if/when/how to use it in the future.
@KnakuanaRka6 жыл бұрын
It wouldn’t turn me away from watching it, but I do agree all it seems to do is tease us with notifications when we can’t actually watch it yet. What is the point?
@CaelVK6 жыл бұрын
please do things in processing again
@hirnlager6 жыл бұрын
/*hex to dec*/ 0xff/1 // 255
@kshetrasahu81514 жыл бұрын
I tied to solve #119 binary number into decimal please solve any one.......
@sql646 жыл бұрын
binary number / 5
@haripal369 Жыл бұрын
Hi. Sir
@I35UM6 жыл бұрын
Its the sum of each digit times the place. Elemantary.
@michaelscofield26526 жыл бұрын
Inefficient asf
@gurgelgurka14896 жыл бұрын
not first
@theukuleleist6 жыл бұрын
oh great more of this premiere crap getting sick of videos showing up that are not even watchable yet
@soensaid6 жыл бұрын
paul smith it’s not that deep
@TheCodingTrain6 жыл бұрын
Thanks for the feedback, this is the first time I'm trying premieres, I will see how it goes and evaluate if/when/how to use it in the future.
@Kersplat6 жыл бұрын
There's not a way for me to disable Premier Notification on my Android app, so I am not a fan of the notification feature. I do watch all of your videos, even live!
@hingedelephant6 жыл бұрын
The Coding Train So... what’s the verdict?
@truth8846 жыл бұрын
Dude
@zyada93346 жыл бұрын
Can you make half life 3 using any coding language ?