There is a thin line between genius and madness ... and you are exactly on that line ... Engineer Man is an under rated term for you .... By the way Happy Christmas 🎄 ( only tree I could produce here 😀)
@@joaofreire8804 You're one of those guys who gets all pissy whenever someone thinks someone else is smart, aren't you? When people think of the words "intelligent" or "genius", etc, you want everyone to think of your amazing, unmatched intellectual abilities
Spending the day at home alone on Christmas. This is a nice little project to keep my mind busy. Appreciate all the cool stuff you share with us. Have a Merry Christmas mate. 🤓
I often suffer from impostor syndrome as a noob trying to building my own RU-vid channel. Watching your videos prior to releasing my own video is not a good idea. You are amazing.
Thanks for the kind words. You should watch my earlier videos. They're really bad. Your content will evolve over time, but you have to upload to get it moving.
@@NetSkillNavigator I don't know what you mean by "lol. sure." I would be surprised if someone expected that I had memorized a random escape sequence to turn a character red on the console. It's really a pretty crummy interview question, the more I think about it. Not to be a Scrooge.
@@jeffreygordon7194 No interviewer is going to be dumb enough to expect the a candidate to know things like that. What they probably meant is that they would want pseudo code or mostly working code. They wouldn't even need to have colored text, they can also just change the letter from a capital to a lowercase and it would be the same thing.
For Windows users on Windows 8.1 or lower. A solution to the colour problem in command prompt. Link: www.codeproject.com/Articles/17033/Add-Colors-to-Batch-Files This contains a file called cecho.exe which allows text in a batch file to become coloured but there is a way to make cmd use it without it needing to be a batch file. First, download the exe file which is in a zip file. Then, place it in a folder and copy the path of the folder. To do that go on windows explorer, and look at the address bar on top and copy the path. E.G. of a path: C:/Users/{user_name}/documents/cecho-master (I called the folder where I placed cecho.exe as cecho-master). Secondly, go to window explorer, then right-click on My PC or This PC then go to Properties. Then go to advance system settings and then environment variables. Thirdly, press on the PATH variable and press "Edit....". Next you want to add the line of your path to the beginning of the PATH variable and then a semicolon like this: C:/Users/{user_name}/documents/cecho-master; This will make CMD understand cecho by looking into that folder for the executable file called cecho.exe. Lastly, to test this work do the following: cecho {0C}This line is red{#} in CMD. Copy the text and paste into CMD. If this works then the line should be red in CMD! Happy Holidays! And problem please leave a reply below. Thank you for reading! Edit: Also works for Windows 10 users if you are wondering
If you're having trouble with the "circle" character showing up incorrectly, run *sudo apt-get install ttf-ancient-fonts* I'm running a new install of Linux Mint and had to run this to get the proper characters.
Probably the first of your videos that I followed along with, made a nice lil tree XD I had to change my terminal colors though, it's green by default so the green lights didn't "blink"
Awesome, i maded a Christmas tree for last Christmas with bash script, i didn't know about the formatting, in windows you can use the color=0c, so i have to make different trees and looping through each of them, Thanks for the great idea😘😘♥️ And btw, HAPPY NEW YEAR
*On Christmas Eve* Engineer-man : I have to buy a new tree decoration for Christmas Also him : F it I'll Build one myself. Me : He doesn't even know we exist. He's like some kind of a superhero on this computer.
I thought about doing this. There's really no reason you couldn't do one thread per light. Instead of passing a color and list of indexes, just loop over every index and pass a color and one index.
I took Engineer Man's wonderfully short Python version and rewrite it in the new Beads language, which is general purpose graphical interactive language. The two programs couldn't be more different, it is very instructive to compare the same program done in two different languages. See github.com/magicmouse/beads-examples/blob/master/Example%20-%20Xmas%20Tree/docs/comparison_with_python.md for the comparison
Oh no! Something in the lights fn makes spyder go nuts. The print check just prior to writing the colored_ dot fn worked, after I moved the tree down a couple of lines. Then I got list printouts for all color positions. But after writing the two fns, windows keep popping up in an infinite loop. I will work the problem, maybe learn something. 🤔 I added the mutex, but getting an exception that mutex has no attribute acquire. So I will research threading. Maybe next Christmas I will get it to work. 🤪
Really appreciate your efforts of making coding simple and fun. Happy Christmas man. please create a playlist for using/building python scripts as in line commands for Linux. To understand what I mean please refer to : www.linuxjournal.com/content/python-scripts-replacement-bash-utility-scripts
I think this is probably a cleanest explanation of multi threading ,lock and very clean pythonic code. I would really like to watch more informative and fun little videos 🥰 much love and merry Christmas...
Arson! Glad to see you adding to your videos. I'll have to watch it a couple times before I grok it. Instead of "on-off": a color-grey, I'll try random color-black.
why using a function to return a string from a string input and not just using a dictionary with dict['color'] that contains the right escaped sequence?
I know nothing about coding and programming. You are an inspiration. Just done with your python for beginner tutorial, thanks for sharing. Now i'm hooked and i want to know more. I might be old enough to start, but i hope i can come up with something. Merry Christmas.
I haven't wanted learn Python but this video makes reconsider my thoughts. Btw, you should use 'elif' in almost all of your conditions, otherwise you'd be executing unnecesary tests, shouldn't you?
Hey Enigneer man, how come you are using an f-string literal without any {} in the strings of the colored_dot function? I tried it that way and I got a syntax error and without the f-string literal it worked fine. Just curious why that is, thanks.
That function was originally more generic (it took the string to colorized as an input). I later removed that and I forgot to remove the f since I no longer needed it.
Since I am afk at the moment I am wondering if colour codes do work in win10 terminals nowadays?! Tried it few years ago but did mit succeed. Merry Christmas to all of you!
The Windows command prompt doesn't natively support ANSI codes (I don't know about Windows 10, but I doubt it's changed). In the old days, one option was to run command.com instead of cmd.exe and load the nansi.sys device-driver, but that hasn't been an option for a long time (especially on 64-bit systems). The new Windows terminal supports emojis and stuff, but I don't know (and doubt) it supports old ANSI codes. :-\
Which ide or which code editor you use to do all these coding stuff in python? pls answer l am really wanting to know Happy Christmas from my side to everyone seeing this comment
Thanks for this. I would like to know how you changed the two yellows in the arguments ... at the same time. To me, it seems to cut coding time in half. I guess that is a programmers mystery that only time will reveal to me. Alas.
In short, it's to guarantee that a re-render of the tree immediately follows a clear screen. Without a mutex, it could (and did) do Thread 1 clear, Thread 2 clear, Thread 1 render, Thread 2 render, which put two consecutive trees on the screen and make it flicker.
Thanks. I feel like I'm doing ok. I'm sure I could clickbait my way to tons of subscribers, but, that's letting down my audience, so I'm not doing that.
That would be tricky. I would probably use a symbol like "RG" for replace green and then when I run through to find all the indexes, I'd store both the index and the custom character.
@@EngineerMan that sounds like a challenge i'm wiling to undertake. I just started a Computer Science course at University this year and your videos are super interesting. Thank you.
I replied above with an explanation of the video, please feel free to read and comment about it. If you don't find it let me know and I'll paste my answer here.
I'm currently doing a course on concurrency in Python (threading, asyncio etc.) and this was perfect practice to play with some of what we learned. If anyone's interested, I ended up making my own variation of this where I color the tree leaves and trunk, do random selection of the colored lights, and get rid of that locking problem (I think) by using asyncio: gist.github.com/vindard/733edd22a2e626e2117f944224f5e2e2 Fun stuff, thanks EngineerMan!
I mean certainly I compose my programs ahead of time, then I rewrite it line by line and explain what I'm doing. What are you suggesting I do differently?
I think that by reading the code you're about to write is leaving a feeling that you don't know what you're doing. I certainly can see that people can learn something from your videos but if I was in their shoes, learning to code, I most likely would skip your channel for that reason.
@@Marius-ir1qn So let me get this straight... You, a person who is hypothetically learning code, would skip a channel. A channel that you feel it seems people are learning code from, you would skip it for a reason that has nothing to do with learning code...
Do you want him to waste time by either making a mistake and correcting it or forgetting something. Does that add reality to the video. I think it just adds wasted time.
If you know the topic you are yet to talk about then you should probably be fine explaining what you're doing without making any mistakes. No hate towards him, but I personally don't like people who try to teach others something they don't seem to fully understand.