Async for loops in Python
16:36
Modern Python logging
21:32
3 ай бұрын
Cloud Imports in Python
5:15
4 ай бұрын
Bloom Filters
11:31
5 ай бұрын
Actually, you CAN divide by zero.
3:52
Python 3.12 is HERE!
12:37
6 ай бұрын
Lambda in a Loop is a Code Smell
8:20
Don't make this big O mistake!
3:46
Python's ternary operator
2:59
Жыл бұрын
21 MORE nooby Python habits
9:55
Жыл бұрын
str vs bytes in Python
8:35
Жыл бұрын
Пікірлер
@brianegendorf2023
@brianegendorf2023 18 сағат бұрын
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.
@hari1111
@hari1111 23 сағат бұрын
Is it too late #PyCharm 🤣
@FUSusanWonk
@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
@MikeprodOfficial Күн бұрын
Just discovering this, I learnt a lot from your concise video. @mCoding What about using loguru instead of the default logging ?
@davethesid8960
@davethesid8960 Күн бұрын
What about the Riemann sphere?
@christopheroverbeck3662
@christopheroverbeck3662 Күн бұрын
How do we feel about sqlite logs?
@Lucashallal
@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
@alexguyer2264
@alexguyer2264 2 күн бұрын
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.
@techinfoforet
@techinfoforet 2 күн бұрын
#pycharm
@y2ksw1
@y2ksw1 2 күн бұрын
I encountered almost none of these problems in my 40+ years career. Maybe my coworkers were professionals 😅
@klaotische5701
@klaotische5701 2 күн бұрын
So it's basically auto reference for all the function call?
@KRISHNU10
@KRISHNU10 2 күн бұрын
Enumerate and Enumerate-Zip are the best things I learnt today
@captaingabi
@captaingabi 2 күн бұрын
be very carefull with caching function results, if they access external data, e.g. doing an http request, or an SQL database access...
@YourMom-rg5jk
@YourMom-rg5jk 2 күн бұрын
Habit 1: Using C++. C is the way baby!
@antroplegia915
@antroplegia915 2 күн бұрын
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
@MagnusPicard
@MagnusPicard 3 күн бұрын
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
@ThisShitWontWor
@ThisShitWontWor 3 күн бұрын
I hate people who use using namespace it make the code unreadable for others on medium/big projects
@vincentkubala5180
@vincentkubala5180 3 күн бұрын
I'm just vibing to this and studying time series 🎶
@mCoding
@mCoding 3 күн бұрын
True combo 👌
@SamuelLarkin
@SamuelLarkin 4 күн бұрын
Shouldn't the equation be N*(N+1)//2 ?
@mCoding
@mCoding 3 күн бұрын
Close but no! kzfaq.info/get/bejne/eLKSaLVqtrHGhqc.html
@carmelo5991
@carmelo5991 4 күн бұрын
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
@mCoding
@mCoding 4 күн бұрын
That's growth! Keep going!
@MarekKnapek
@MarekKnapek 4 күн бұрын
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.
@quillaja
@quillaja 4 күн бұрын
god that's so much easier than what i've been doing writing all the coordination junk around queue
@macbird-lt8de
@macbird-lt8de 4 күн бұрын
THANK YOU!!!!!!!!!!!!!!!!
@avengeranubis
@avengeranubis 5 күн бұрын
Bro actually cooked
@dflolcool4180
@dflolcool4180 6 күн бұрын
As a beginner I’m so confused 💀💀💀
@bblaze34
@bblaze34 6 күн бұрын
Python (snake clone): Made using python XD
@defaultusername1145
@defaultusername1145 6 күн бұрын
Just saying Chris probably less than 10% of people you respond to understand a word you are saying
@Chris-5318
@Chris-5318 6 күн бұрын
I'm sure it's less than that.
@aaronfelipeascencio7421
@aaronfelipeascencio7421 6 күн бұрын
#pycharm
@jullien191
@jullien191 7 күн бұрын
Muy bien amigo! Qué es tu opinion de JavaScript y Rust?
@yash1152
@yash1152 7 күн бұрын
4:50 > `types.SimpleNamespace` where's typing information here?
@yash1152
@yash1152 7 күн бұрын
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 :)
@dorithegreat6155
@dorithegreat6155 7 күн бұрын
This is why i hate c++, it's a needlessly complicated language built on weird tricks
@ThatJay283
@ThatJay283 7 күн бұрын
8:56 is the guard even needed here? nothing bad would even happen if the guard is omitted
@ThatJay283
@ThatJay283 7 күн бұрын
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
@ThatJay283
@ThatJay283 7 күн бұрын
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
@ThatJay283
@ThatJay283 7 күн бұрын
i honestly just treat all the new c++ stuff as a suggestion. just use what works well and be consistent :)
@ThatJay283
@ThatJay283 7 күн бұрын
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_boy4277
@coding_learning_boy4277 7 күн бұрын
#pycharm
@Trokumukum
@Trokumukum 7 күн бұрын
Yeah… I am sure u aren’t late.
@lin1987www
@lin1987www 7 күн бұрын
5:18 Should mark triangle_n with constexpr too
@hiraksarma3068
@hiraksarma3068 7 күн бұрын
Superb 👍this is pure value addtion, class apart from N numbers of videos showing ABC of Python endlessly.
@user-qz1ok3ic2s
@user-qz1ok3ic2s 8 күн бұрын
how can i understand pthon the way you do?
@sashareinhard6645
@sashareinhard6645 8 күн бұрын
i like returning error codes instead of output for some calculation. that way we dont need exceptions for simple things
@annieshedden1245
@annieshedden1245 8 күн бұрын
logging has to be the least pythonic, most java-infected thing ever...
@whamer100
@whamer100 9 күн бұрын
this is my exact reaction to seeing this CVE. i was like "isnt this just, expected behavior?" lmao
@hlubradio2318
@hlubradio2318 9 күн бұрын
Nice
@zayshairjourney5499
@zayshairjourney5499 9 күн бұрын
I HATE C++ ☠️
@hlubradio2318
@hlubradio2318 9 күн бұрын
Too deep for me now
@SiddharthGawande-bd8do
@SiddharthGawande-bd8do 10 күн бұрын
u sound like fireship
@Omnicypher001
@Omnicypher001 10 күн бұрын
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.
@vasudevmenon2496
@vasudevmenon2496 10 күн бұрын
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