thedoubleeguy
thedoubleeguy
  • Видео 18
  • Просмотров 45 067
Merge-Sort Python vs. C
#python #cprogramming #mergesort
In this video, I create a classic recursive merge sort algorithm using both the C and python programming languages. I first record the amount of time it takes to create the algorithm, and then I run each program to see how fast they can completely sort 10 million random numbers in a list. The merge sort implemented in python is quite simple. The C merge sort algorithm is a little more complicated due to the manual memory management aspect of the language. Always try and keep your code memory safe, I use malloc() here but remember that malloc() is a linear allocator prone to memory fragmentation. I use it as a general allocator here for this simple program ...
Просмотров: 75

Видео

What is a Variadic Function?
Просмотров 13019 часов назад
#cprogramming #functions #code In this video, I briefly talk about variadic functions and code an example mini_printf() function in order to explain the concept. I use the stdarg.h library and the built-in macros from it to create my function. I briefly review some of the potential dangers and memory pitfalls of variadic functions at the end of the video. I hope you enjoy this simple example an...
Solve ANY CIRCUIT w/ these 4 Techniques
Просмотров 45414 дней назад
In this video, I'm going to explain resistors in series, resistors in parallel, ohms law, and Kirchoff's voltage and current laws. I will then take a look at a more complicated resistor network example and break down the circuit step by step so you can have a deep intuition for KVL, KCL, and other fundamental circuit laws. Keep in mind, this video is quite fast, so feel free to pause the video ...
C Pointers in 3 MINUTES
Просмотров 11 тыс.21 день назад
#codingtutorial #coding #pointers In this video, I introduce users to computer memory and how an int *ptr is set equal to the memory address of an integer. If you don't understand what a pointer is, this is a perfect start for you. Keep in mind, I do not go over most of the applications for pointers, this video was created so new C Programmers understand the basic syntax for pointers, how to in...
Pointers to a FUNCTION?
Просмотров 571Месяц назад
#computerscience #pointers #cprogramming In this video, I go over the basic syntax of function pointers in C. I also show an example in vscode to demonstrate the versatility of function pointers. The example given is a very simple calculator program that allows you to add and subtract doubles using the command line. This is by no means a robust program meant to catch every error that the user p...
Structs in C
Просмотров 593Месяц назад
#struct #computerscience #cprogramming In this video I go over the basics of structs from initialization to value modification by pointer. This video is meant to be a super quick introduction and recap for the basic syntax and uses of structs. I hope you enjoy the quick coding animations that show how to initialize, access, and modify the values of member variables in structs in C. 00:00 Introd...
Intro to Complex Numbers for EE
Просмотров 3,8 тыс.2 месяца назад
#complexnumbers #electricalengineering #math In this video, I first give an introduction to complex numbers and how they can be represented using complex exponentials, trigonometry, and more. I then use these principles to build a foundation for complex representations of voltage, current, and resistance. This video is meant to give a base level understanding on the importance of complex number...
Common Source Amplifier MOSFET (LTspice)
Просмотров 8762 месяца назад
In this video, I use LTspice to simulate a common source amplifier. Using an NMOS MOSFET, I explain the key equations needed to understand and set up appropriate resistance values for a desired gain. This is not a small signal model demonstration, however, the equations used are directly derived from a small signal model. This is a very simple example, I use a MOSFET that has no lambda value, t...
Become a Malloc() Pro
Просмотров 17 тыс.2 месяца назад
#dynamicmemoryallocation #malloc In this video, I go over 3 situations where I would use malloc(), calloc(), and realloc(). I also briefly explain the importance of free(). *IMPORTANT NOTE* In modern C and according to much of the current C Coding standards, malloc() is not casted because the void pointer is automatically promoted to any other pointer type without that cast. This is a required ...
Intro to ESP32s3 (STARTER PROJECT BLINK LED)
Просмотров 1,4 тыс.2 месяца назад
#esp32s3 #embeddedprogramming #microcontroller In this video I quickly go over the specs of an ESP32 and show the code and circuitry behind a blinking LED project. This is meant to show the cool capabilities of the ESP32 microcontroller and spark your interest for ESP32 devices. 00:00 Settings Disclaimer 00:10 ESP32 Intro 00:59 Coding 02:12 Circuitry 02:33 Compiling and Building
Why C Pointers?
Просмотров 4,8 тыс.3 месяца назад
#pointer #cprogramming In this video, I go over what a pointer is and some of their basic uses. I use real coded examples to explain not only the basics but also some of the more advanced principles behind pointers. 00:00 Intro 00:39 Basic Syntax 01:35 Pointers w/ Functions 02:38 Increment Example 03:20 Struct Example 04:02 Malloc() and Scanf() 05:09 Array Example 05:41 Outro
Euler Identity PROOF w/ Taylor Series
Просмотров 1,3 тыс.3 месяца назад
#math #euleridentity #taylorseries In this fully animated explanation video, I use the taylor series expansion for sin(x), cos(x), and e^x in order to prove euler's identity. I also give a very brief overview for some of its functionality in the world of engineering and math. 00:00 Introduction 00:16 Taylor Series 01:16 Maclaurin Graphs 02:24 Exponential Series 02:38 The Proof 03:34 Euler Ident...
C BASICS in 6 Minutes
Просмотров 1,7 тыс.3 месяца назад
In this video, I very briefly go over the basics of the C programming language. I talk about C operators, structs, loops, switch statements, pointers, functions, declaring variables, and much more. 00:00 Intro 00:17 Data Types 00:30 Declaring Variables 00:48 Header Files 01:09 Main 01:18 printf() 01:31 scanf() 01:43 C Operators 02:41 If and Else 03:06 Switch 03:37 While Loops 03:56 For Loops 04...
Active Band Pass Filter (LTspice)
Просмотров 7133 месяца назад
In this video, I create an active band pass filter using an op amp and other discrete components. I explain the bode plot and use formulas to come up with the specific resistor and capacitor values for our desired cutoff frequencies.
Non-Inverting Op Amp (LTspice)
Просмотров 4304 месяца назад
In this video, I use LTspice to simulate the gain of a non-inverting op amp. I design the circuit to not only power the op amp, but also give me the desired gain and peak to peak amplitude on my output pin.
Ideal Inverting OP-AMP EXPLAINED
Просмотров 1734 месяца назад
Ideal Inverting OP-AMP EXPLAINED
RLC Circuit ODE EXPLAINED
Просмотров 3494 месяца назад
RLC Circuit ODE EXPLAINED
Line Integral (x and y)
Просмотров 2137 месяцев назад
Line Integral (x and y)

Комментарии

  • @hi_arav
    @hi_arav День назад

    Excellent video! Keep it up ^_^

  • @RamonSociety7878
    @RamonSociety7878 День назад

    Solo C win no word

  • @МухиддинМахмудов-б5щ

    I love gen Z 😂

  • @meppledude6874
    @meppledude6874 8 дней назад

    What took me weeks to realize, and so simply explained here

  • @baracapy-q9l
    @baracapy-q9l 8 дней назад

    first comment ^^ , thank you bro

  • @loupsjardim
    @loupsjardim 11 дней назад

    great stuffff

  • @47AndyT
    @47AndyT 12 дней назад

    I wonder where you were when I took Circuit Analysis I?😊

  • @rodcosta290
    @rodcosta290 13 дней назад

    this is great, i dont even need to learn this, but it was quick so i couldnt miss this haha. thank you, now i can reverse engineer gtavi 🗿

  • @5DPixel
    @5DPixel 13 дней назад

    Already knew this but just clicked on it because why not, can you do qwords and dwords

  • @bayroot7385
    @bayroot7385 13 дней назад

    Dude you're the best, your videos are easy to watch, captivating and examples are very depictive, thank you!

  • @mcswizz9609
    @mcswizz9609 13 дней назад

    Dang this was such a clean explanation 🙏🔥

  • @amazingcaio4803
    @amazingcaio4803 14 дней назад

    FYI, 'A' is an int, not a char in C (yeah, it's confusing).

  • @lucidwavez6346
    @lucidwavez6346 14 дней назад

    We need the subway surfers gameplay 😂

  • @DerekitoCorpcito
    @DerekitoCorpcito 15 дней назад

    Para las personas que no hablan Inglés se entiende! Gracias bro

    • @thedoubleeguy
      @thedoubleeguy 15 дней назад

      @@DerekitoCorpcito me alegra compa, fíjate hablo español y tal vez hago una seria pa mis amigos latinos

  • @see4yourself735
    @see4yourself735 15 дней назад

    Wheres the subway surfers second video in the corner?

  • @KrymmyOZY
    @KrymmyOZY 15 дней назад

    I not understand, send in TikTok format

  • @LowPeak
    @LowPeak 15 дней назад

    well I knew before video how to use pointers... But actually I dont know why would I wanna do that... and dont tell me to have more effective code

  • @OptimusPrime-tb8tw
    @OptimusPrime-tb8tw 15 дней назад

    I bet 96 percent are not gen Z

  • @lolcat69
    @lolcat69 15 дней назад

    why pointers are so complicated? they are just a variable, that stores an address to something, and by derreferencing, you get the value at that memory location.... I used to use only high level languages before I maried with my current wife ( C ), and it was a really simple concept the whole pointers stuff lol

    • @youarethecssformyhtml
      @youarethecssformyhtml 13 дней назад

      Yeah this subject is overcomplicated for no reason. Pointers are a bit confused but not so complicated or even complicated. Just a bit confusing at first.

  • @IvanRodriguez-vu8yv
    @IvanRodriguez-vu8yv 16 дней назад

    When used in a declaration, the * symbol is not an operator at all. It doesn’t “act on” anything.

  • @VideosViraisVirais-dc7nx
    @VideosViraisVirais-dc7nx 16 дней назад

    Hmm // declaration String place = "HOUSE"; int *ptr = &place; // Output println("%d*, ptr); // Glossary int = data type name, ptr = identifiers * = pointer symbol & = get address value of variable %d = specifier format

  • @0xkrypton
    @0xkrypton 16 дней назад

    Do you have a discord? If not create one i will help you and your community.

  • @PMWoahE
    @PMWoahE 16 дней назад

    Understandable, thanks

  • @stavros222
    @stavros222 16 дней назад

    I clicked only to see if he used any funny language

    • @alfiegordon9013
      @alfiegordon9013 14 дней назад

      "you see when the address and desired content of a pointer becomes desynced, that's not very skibidi"

  • @kamhawy
    @kamhawy 16 дней назад

    Awesome 😎 Well executed & beautifully represented.

  • @luca4464
    @luca4464 17 дней назад

    I feel offended by the thumbnail , but thank you

  • @taufiqurrahmansagafkelrey2833
    @taufiqurrahmansagafkelrey2833 18 дней назад

    the "for genz" bought me

  • @amirdashti5761
    @amirdashti5761 18 дней назад

    I never understood why should a pointer exist

  • @rch5395
    @rch5395 18 дней назад

    Imagine using a text editor instead of IDE

  • @slava6105
    @slava6105 18 дней назад

    Array to pointer decay and pointer arithmetic not covered. I am disappointed.

  • @OceJlot
    @OceJlot 18 дней назад

    Actually, pointers are pretty easy, but I got confused once when I was working with an array and tried to get its sizeof. Then I passed it to a function (so into another scope), and when I got its sizeof there, it was already equal to the size of a pointer instead of the size of the array. This is because your array is actually just a pointer to its first element. Why was it working correctly in the main scope then? Compiler black-box magic 😅

    • @dawae5447
      @dawae5447 18 дней назад

      When you declare an array, you set a size for it, so its scope knows its size. When you pass it to a function, the function only receives a pointer, and no information of the memory it has reserved

    • @OceJlot
      @OceJlot 18 дней назад

      ​@@dawae5447 It's not actually the scope that knows the actual size. It's the compiler that replaces sizeof with this value at compile time. Correct me if I'm wrong

  • @iCrimzon
    @iCrimzon 18 дней назад

    This is not for Gen Z, let me do it in fortnite terms, think of 1, 2, 3, 4, 5 as memory address, if you get the chug jug and put it in 1, then by pressing your 1 key, youre retrieving the value of memory address 1 which is the chug jug

    • @GameDevGeeks
      @GameDevGeeks 16 дней назад

      I'm gen z and never played or watched fortnite, no hate to those who do it's just not my thing (I think the art style is ugly).

    • @JorgePires7-7-7
      @JorgePires7-7-7 16 дней назад

      ​@@GameDevGeeksrelax bro no one is judging you lol

    • @west_prime
      @west_prime 14 дней назад

      ​@@JorgePires7-7-7 no one is chug-jugging you 😅

    • @AmyLoidDisease
      @AmyLoidDisease 10 дней назад

      on skibidi that was a dub slime

  • @rubynaxela8524
    @rubynaxela8524 19 дней назад

    I think one of the problems with learning about pointers is the fact that many people declare them in this "int *ptr" style. And by "many" I mean "most", unfortunately. This style makes you think "What's so special about this int variable? Why is there a star attached to its name? It's so random and confusing!". This also clashes with the dereference operator, where you also have to put an asterisk in front of the name. The same syntactic structure for two completely different things! Once I learned the pointers myself, I immediately started declaring them in the "int* ptr" style. This makes so much more sense. You can clearly see that "int*" is just a data type like any other and not some arcane magic int that behaves completely differently. The same goes for C++'s reference types. And yes, I'm well aware that declaring multiple pointer variables in one statement is problematic with this approach, because you have to put an asterisk in front of each name anyway, otherwise the unpreceded ones will just be variables of the base type, but I blame the design of C for that, and there's nothing we can do about it. You can declare each pointer in a new line if you like. Personally, I do it like this: "int* x, * y, * z". (yes, I'm using a weird * symbol, to prevent RUclips from bolding my text)

    • @thedoubleeguy
      @thedoubleeguy 19 дней назад

      There are a lot of small details in the C language that can be totally convoluted. I agree with your approach, and I get where you're coming from

    • @delq
      @delq 17 дней назад

      you are totally right, int* and int are separate types to begin with and i have always wondered why people put the asterisk on the variable name, i guess it allows them to know that it is a pointer to a another variable type but they should really just use a craftier name that highlights that information in the naming itself.

  • @mister_calm
    @mister_calm 20 дней назад

    I really like such short and informative videos.keep making them bro🫡

  • @closeen8574
    @closeen8574 20 дней назад

    what about double pointers?

  • @robbiek5oh
    @robbiek5oh 20 дней назад

    its more helpful to explain the benefits of pointers (aka the "why") before explaining how to use them.....

    • @ismotheis
      @ismotheis 20 дней назад

      Yeah, and perhaps even, maybe especially the dangers of misusing them.

    • @rubynaxela8524
      @rubynaxela8524 19 дней назад

      Imagine you have an object (let's take a classic and overused example: a "person" struct). Now, imagine you also have two functions in your code, that both accept a "person" struct as an argument: one for displaying the person's full name & age, and another for asking the user to type those details and modifying the struct. Now, the important thing here is that both functions will receive a copy of the person's data. So, the first function will work perfectly fine, but the second one will only modify its own copy of the data (received as the argument), but not the original source. When you pass a pointer to the modifying function though, you tell it exactly where your original "person" struct is, allowing it to change it directly.

  • @UsernameDoesntCare
    @UsernameDoesntCare 21 день назад

    Bruh this aint for Gen Z, a minute is unbearable, I could be playing Fortnite right now or doomscrolling 💀

    • @thedoubleeguy
      @thedoubleeguy 21 день назад

      This had me cracking up😅

    • @katarsisAX
      @katarsisAX 17 дней назад

      People exaggerate it so much. Its easy

  • @DARKSTAR96
    @DARKSTAR96 21 день назад

    Be honest with yourself, most Gen Z people can't code.

    • @zedsanimations2242
      @zedsanimations2242 21 день назад

      You do realize gen Z stretches pretty far right? There are plenty of great gen Z coders

    • @alwayslg
      @alwayslg 21 день назад

      speak for yourself buddy

    • @zedsanimations2242
      @zedsanimations2242 21 день назад

      @@alwayslg considering I'm part of gen Z and I'm an embedded developer I think I'm doing pretty good

    • @ismotheis
      @ismotheis 20 дней назад

      tbh they like Rust and other things more. They don't quite get the charm of being able to shoot yourself in the foot if you want or even on accident. C isn't just the mother language, it's mother nature itself.

    • @zedsanimations2242
      @zedsanimations2242 20 дней назад

      @@ismotheis i think alot of the love is mostly the idea it it is "memory safe". but writing memory safe code isnt that hard if you have a rough idea of how the underlying hardware works

  • @AudisioOficiaI
    @AudisioOficiaI 22 дня назад

    pointers is just to not copy a variable and change it value from a function

    • @NerdZEY
      @NerdZEY 18 дней назад

      From anywhere acctually

  • @angelozilian7359
    @angelozilian7359 22 дня назад

    "for Gen Z" 😅

  • @baracapy-q9l
    @baracapy-q9l 22 дня назад

    Please talk about recursion, variadic function, linked list ...

    • @x-zotic_minded
      @x-zotic_minded 22 дня назад

      Variadic functions? Like those: myprintf(const char *str, ...); kinda thing? That's a must have on this channel

  • @baracapy-q9l
    @baracapy-q9l 22 дня назад

    First ❤️ keep going

  • @x-zotic_minded
    @x-zotic_minded 24 дня назад

    I hope this channel is not solely focused on embedded systems and their programming process. Waiting for you to drop the GUI in C vid. 😊😅

    • @thedoubleeguy
      @thedoubleeguy 22 дня назад

      Getting to it my friend, this isn't my full-time job so give me a few weeks😉😅

  • @Ctrl_Alt_Elite
    @Ctrl_Alt_Elite Месяц назад

    Might be a noob Q but... when pointing to the functions why is '&' not needed to reference it?

    • @thedoubleeguy
      @thedoubleeguy Месяц назад

      This is a great question and I remember being confused about this as well. Think of this in the context of an array. The name of an array (arr) is a pointer to the 0th index of the array (&arr[0]). Similarly, the name of a function (myFunc) is a pointer to the functions entry point (&myFunc). In both cases, the names act as implicit pointers or they "decay" to pointers. Keep in mind that for an array we have a contiguous block of memory whereas a function name represents the entry point to executable code in memory. Although slightly different, I do make this comparison because they act fairly similarly. I hope this explanation helped!

    • @x-zotic_minded
      @x-zotic_minded 24 дня назад

      TL;DR: the name of any array such as arr is itself a pointer, which points to the first element or 0th index and Same is the case with functions.

  • @miguevr7852
    @miguevr7852 Месяц назад

    Just change ps1 next time so that no blur si needed

  • @pietraderdetective8953
    @pietraderdetective8953 Месяц назад

    I always love a good C video! However you can make the video even better by adhering to modern C standard instead of classic C. For example there's a comment about using fgets and sscanf instead of just scanf (considered to be dangerous function according to modern C standard). C11 is considered to be the point where plenty of safer C functions were introduced. Writing C is like sex: do it safely and responsibly.

  • @Carl_jonhson_1111
    @Carl_jonhson_1111 Месяц назад

    Instead of those long hours video lectures, these kind of (to the point) videos are best

  • @anon_y_mousse
    @anon_y_mousse Месяц назад

    I still wish they'd just update the standard and make struct define the type the way C++ does. It would break a lot of code, but I consider those bits that would break to be poorly written and I don't care if they break. Programmers should have been typedef'ing anonymous structs anyway because the alternative sucks.

  • @duarteribeiro1520
    @duarteribeiro1520 Месяц назад

    2:48 freaky

  • @Blingsss
    @Blingsss Месяц назад

    I remember when I first encountered complex numbers in my electrical engineering courses. They seemed so abstract, and I couldn’t quite grasp how they applied to real world scenarios like AC circuits. But once I got a tutor on SolutionInn to help me out, everything clicked. This video sums up the importance of complex numbers in EE really well and makes it easier to visualize how they’re used in voltage, current, and impedance.