I look at it totally differently, and more easily than you. Dividing by 0 means, you aren't doing anything to anything. If you divide 20 by 0...you have 20, because you never divided 20 by anything. If you have 20 and multiply it by 0, you have 20, because you aren't doing anything to it. But here is an important distinction. I am saying. "if you have". If you multiply 20 by 0, you get 0.. But if you have 20 of something that you multiply by zero, you have 20. In math, it is assumed that a number starts with an empty "zero space". When you multiply two number, say 2 and 3....you really multiply (0+1+1) * (0+1+1+1)= 1+1+1+1+1+1= 6. This is mostly thought of this way because of calculators and computers. But when you "have" something, you don't need to bother with the 0+whaever number thing. You have 20. If you divide 20 by zero. You STILL have 20.
@hari111123 сағат бұрын
Is it too late #PyCharm 🤣
@FUSusanWonkКүн бұрын
Watching this video feels more like "31 reasons why you should use Rust instead". C++ has way too many "historical burdens" at this point that all the rules with "modern C++" only makes it worse.
@MikeprodOfficialКүн бұрын
Just discovering this, I learnt a lot from your concise video. @mCoding What about using loguru instead of the default logging ?
@davethesid8960Күн бұрын
What about the Riemann sphere?
@christopheroverbeck3662Күн бұрын
How do we feel about sqlite logs?
@LucashallalКүн бұрын
2:47 wait can you do that “ij-entry” thing and have it store the actual values of i and j? I had no idea
@alexguyer22642 күн бұрын
Great video! I have a couple critiques. #10: Even if the string literal outlives its scope, I wouldn't generally recommend writing an interface that implies returning a pointer to a local. As a consumer of this function, its interface alone is enough to make me at least suspicious about whether it invokes undefined behavior. Coupled with your points on RAII, I might also wonder who owns the character array, given that this function is returning a raw ("non-owning") pointer. If you find yourself writing a function that returns a constant expression, just define the constant expression directly---their lifetimes are not dependent on some blackbox implementation, and the ownership is clearly global and not my problem. #12: You don't need to define a dedicated structure type just to group some data. This is exactly what std::pair and std::tuple are for. As #11 discusses, they can also be used with structured bindings. If you want it to have a nicer name, use a typedef.
@techinfoforet2 күн бұрын
#pycharm
@y2ksw12 күн бұрын
I encountered almost none of these problems in my 40+ years career. Maybe my coworkers were professionals 😅
@klaotische57012 күн бұрын
So it's basically auto reference for all the function call?
@KRISHNU102 күн бұрын
Enumerate and Enumerate-Zip are the best things I learnt today
@captaingabi2 күн бұрын
be very carefull with caching function results, if they access external data, e.g. doing an http request, or an SQL database access...
@YourMom-rg5jk2 күн бұрын
Habit 1: Using C++. C is the way baby!
@antroplegia9152 күн бұрын
You know, this is rather a controversial and complex topic to talk about, since there isn't just a real answer to it. If we do "Any number ÷ 0" some people would say that it is 0, since 0 is just 0, but why would the answer be 0 and not undefined or the actual number. And some people say the actual number since 0 is just 0 I actually stood up for the actual number since dividing by 0 is also 0 (yes I also get it, but the answer shouldn't be 0). But it made me wonder what the actual answer would it be, so most people would see it as undefined, since there isn't really an answer that makes sense. That's why it's made Undefined in order to avoid contradictions
@MagnusPicard3 күн бұрын
wow this is insane. i checked it on my old computer here which needs 48seconds to calculate the first 40 Fib.# with the decorator i can calculate up to 20000 fib.# in only 27 seconds. more and int to string conversation is not working anymore ;) Thanks for this tip
@ThisShitWontWor3 күн бұрын
I hate people who use using namespace it make the code unreadable for others on medium/big projects
@vincentkubala51803 күн бұрын
I'm just vibing to this and studying time series 🎶
@mCoding3 күн бұрын
True combo 👌
@SamuelLarkin4 күн бұрын
Shouldn't the equation be N*(N+1)//2 ?
@mCoding3 күн бұрын
Close but no! kzfaq.info/get/bejne/eLKSaLVqtrHGhqc.html
@carmelo59914 күн бұрын
I remember watching this video months ago and not undersating it, now I understand and it helped me with a bug in the mistake 15
@mCoding4 күн бұрын
That's growth! Keep going!
@MarekKnapek4 күн бұрын
This behavior / issue has been with us (and properly documented) for ages. But. Somebody piled bunch of abstractions on top of it, and in meantime, forgot how the bottom layers actually worked.
@quillaja4 күн бұрын
god that's so much easier than what i've been doing writing all the coordination junk around queue
@macbird-lt8de4 күн бұрын
THANK YOU!!!!!!!!!!!!!!!!
@avengeranubis5 күн бұрын
Bro actually cooked
@dflolcool41806 күн бұрын
As a beginner I’m so confused 💀💀💀
@bblaze346 күн бұрын
Python (snake clone): Made using python XD
@defaultusername11456 күн бұрын
Just saying Chris probably less than 10% of people you respond to understand a word you are saying
@Chris-53186 күн бұрын
I'm sure it's less than that.
@aaronfelipeascencio74216 күн бұрын
#pycharm
@jullien1917 күн бұрын
Muy bien amigo! Qué es tu opinion de JavaScript y Rust?
@yash11527 күн бұрын
4:50 > `types.SimpleNamespace` where's typing information here?
@yash11527 күн бұрын
3:03 _"if u want the exact same thing as a collections.namedtuple, but also with type hints, then u should use typing.NamedTuple"_ awesomeeeeee :)
@dorithegreat61557 күн бұрын
This is why i hate c++, it's a needlessly complicated language built on weird tricks
@ThatJay2837 күн бұрын
8:56 is the guard even needed here? nothing bad would even happen if the guard is omitted
@ThatJay2837 күн бұрын
7:20 i use lots of this sort of thing for my opengl project where i have a glGen*(1, &...); call followed by a glDelete*(1, &...); in the destructor
@ThatJay2837 күн бұрын
3:20 constructing one yourself vs using std::make_unique are the same, but std::make_unique does have the advantage of being less verbose
@ThatJay2837 күн бұрын
i honestly just treat all the new c++ stuff as a suggestion. just use what works well and be consistent :)
@ThatJay2837 күн бұрын
i got 7 :DD 2. i do use std::endl sometimes, but this is just due it essentially being the same as "<< ' ' << std::flush". this is actually intentional 3. i use loops like this generally, unless i actually need to use an iterator. imo, this is just a matter of preference. it is also visually much clearer on what is actually happening 4. with this, i feel it is also just a matter of preference 5. same with this. also, a template in this case just duplicates the function every time the std::array has a different size, which feels very inefficient. C style arrays and std::array arrays just have different functions. also, there is std::size for finding the size of C style arrays. 11. i knew this existed with for loops. thanks! i will definitely use these more. 12. i do this too sometimes. i feel this is definitely just preference. 24. i do this sometimes too. i also feel it is just preference, because they both do exactly the same thing. also, it is sometimes useful to copy the raw pointer before chucking it into a unique ptr, which you can't do with std::make_unique alone. for example: `equipment.push_back(monitor_cctv = new Monitor::CCTV());`
@coding_learning_boy42777 күн бұрын
#pycharm
@Trokumukum7 күн бұрын
Yeah… I am sure u aren’t late.
@lin1987www7 күн бұрын
5:18 Should mark triangle_n with constexpr too
@hiraksarma30687 күн бұрын
Superb 👍this is pure value addtion, class apart from N numbers of videos showing ABC of Python endlessly.
@user-qz1ok3ic2s8 күн бұрын
how can i understand pthon the way you do?
@sashareinhard66458 күн бұрын
i like returning error codes instead of output for some calculation. that way we dont need exceptions for simple things
@annieshedden12458 күн бұрын
logging has to be the least pythonic, most java-infected thing ever...
@whamer1009 күн бұрын
this is my exact reaction to seeing this CVE. i was like "isnt this just, expected behavior?" lmao
@hlubradio23189 күн бұрын
Nice
@zayshairjourney54999 күн бұрын
I HATE C++ ☠️
@hlubradio23189 күн бұрын
Too deep for me now
@SiddharthGawande-bd8do10 күн бұрын
u sound like fireship
@Omnicypher00110 күн бұрын
game dev pros rewrite STD algorithms all the time, because STD can be slow and opens you to security threats that you don't have control over. also, Unique pointers and shared pointers, aren't the fastest or cheapest way to handle memory. And in some cases, magic numbers make the code more readable. Reinterpreting bytes is not undefined, if both types are well defined. The standard Array actually increases the chances of a typo, since its the same problem with more typing and weirder syntax. C style for loops are better than range based, they don't overcomplicate the syntax of the language, so they are more readable. Structured bindings have an ugly, confusing syntax, that harms the readability of the language. Iterators suck, indexed for loops are always better. C is better than C++, Vtables are a waste of memory, and harmful to security, OOP code thrashes the cache, inheritance is garbage, use components and an entity component system with data oriented design, if you want fast simulations. Also, you can get rid of ALL these pointers and ALL of these memory issues, if you just pool your data in arrays at the start, never creating or destroying data during the simulation, just recycling resources efficiently.
@vasudevmenon249610 күн бұрын
I used a mix of print and logging in my application just to take quick look of what happened at a glance. Wasn't aware of json lines and queue handler. I had switched from standard json library to orjson to get considerable speedup when handling mixture of celery task uuid, objects, dates in different formats etc. Thanks for sharing