Setup Tips for Your Next Programming Project

Поделиться
HTML-код
  • Опубликовано: 16 янв 2025

Комментарии • 129

  • @dkbikerides6123
    @dkbikerides6123 3 года назад +57

    Dang dude, I work as a software engineer writing fpga NIC drivers in C and I gotta say your content is legit. I have not seen any other content like yours, keep it up!

  • @mimmyjau
    @mimmyjau 3 года назад +39

    love these videos. advice is gold.
    0:59 Don't jump straight into coding
    4:04 Tip: Do the hardest things first
    4:39 1) Create a git repo (or any version control)
    5:24 2) Setup build system (e.g. makefile)
    6:05 Example makefile
    8:54 Why a build system is important
    10:32 Automate anything repetitive
    My own requests / suggestions / ideas for videos:
    - How do you organize header files / source code when working on medium to larger projects?
    - What is your philosophy around commenting your code?
    - How do you think about having the "right" data structure for a project?
    - How do you write tests for projects?
    - How do you "jump into" a larger code base and start to slowly understand / contribute code?
    - What are common anti-patterns you see in C that students (or those new to C) often make?
    - What are some best practices for working in a team (e.g. how long do you struggle with a problem before asking for help, how do you ask for help, etc.)?
    - Things we can easily implement to make our C code more secure?
    Thanks!

    • @JacobSorber
      @JacobSorber  3 года назад +13

      Great suggestions. Thanks! I'll add them to the list and see what I can do.

    • @dontaskme1625
      @dontaskme1625 3 года назад +2

      @@JacobSorber please put the timestamps in the description for chapter makers :)

    • @goutgueule9197
      @goutgueule9197 2 года назад

      4:04 What if you’re french ?

  • @EidosGaming
    @EidosGaming 3 года назад +22

    I saw this video after taking a few days setting up CMake, git, all the dependencies before writing anything. Kinda reassuring :D

    • @JacobSorber
      @JacobSorber  3 года назад +4

      Glad I could reassure you. Your project setup will get quicker over time.

    • @EidosGaming
      @EidosGaming 3 года назад +1

      @artsi0m ; actually I find that cmake is not that bad, meson is a bit painful on windows and most IDEs

  • @mockingbird3809
    @mockingbird3809 3 года назад +24

    I would love to see a video on malloc and free implementation in future :)

    • @JacobSorber
      @JacobSorber  3 года назад +9

      Ok. I'll see what I can do. I'll have to be a little careful, since that's something I do as an assignment/project in my operating systems class. But, I'll see what I can do without giving them too much help. 🤔

    • @albertoheras7684
      @albertoheras7684 3 года назад

      YES!

  • @cernejr
    @cernejr 3 года назад +26

    Related: Directory structure. Separate dirs for debug and release builds. I have worked on years-old production code lacking these - very painful and inefficient.

    • @glowiever
      @glowiever 3 года назад

      I just copy msvc dir structure

    • @JacobSorber
      @JacobSorber  3 года назад +5

      Agreed. I guess I need a follow on video that provides a few more steps. Thanks!

    • @cernejr
      @cernejr 3 года назад +2

      @@JacobSorber If you do, please mention cmake.

  • @tiltedfate9188
    @tiltedfate9188 3 года назад +4

    Just want to say thank you for making these videos! They’re much appreciated :)

  • @mikelong3444
    @mikelong3444 3 года назад +1

    This information is GOLD. Thanks for sharing your advice with the world and the ones of us whom care.

  • @papasmurf9146
    @papasmurf9146 3 года назад +1

    As a developer for longer than I care to admit, I completely agree. I also carry around a Perl script (which predates cmake) that creates the Makefile for me from a directory full of source code. I also carry around a unit-test framework to formalize the unit-test which is probably the best way to ferret out bugs long term (with a Perl scrip that takes a .h file and generates a unit-test skeleton .h/.cpp files)

  • @dynpallomah
    @dynpallomah 2 года назад +1

    i always write shell script to build & test stuff cuz i dont wanna learn make lol. i use './b' for building and './c' for testing, and for building + testing it's './bc'. the thing is that u just use whatever ur most comfortable with

  • @EmbeddedHackster
    @EmbeddedHackster 3 года назад +5

    I wish there was more people like you doing this kind of videos, helped me a lot as an emb dev.
    I got a question, tho: as most (if not all) the IDEs I've used make and compile your files automatically, what are the advantages of doing it manually? I've personally never had any problems with the automatic approach for my projects (adding 10+ custom drivers/files and counting), but I'm still curious about this method.
    Again, thank you for your good work and keep it up!

    • @anon_y_mousse
      @anon_y_mousse 2 года назад +1

      If you don't use an IDE you'll need to know how, and if you change IDE's you may have to reconfigure things and knowing how it's done at a basic level can make it easier to finagle IDE settings.

  • @tordjarv3802
    @tordjarv3802 3 года назад +1

    I have a tip: I reasently created a set of functions in my .zshrc that allows me to automatically create new projects, or jump in to an existing one. The function that creates a new project initializes git, copies an appropriate makefile (I have one per programming language that I want to use) creates a README file and forces me to write an initial commit message. This saves me a ton of time when I want to start a new project and allows me to standardize things.

    • @JacobSorber
      @JacobSorber  3 года назад +1

      Cool. Thanks. I do things like this for managing my courses. It's amazing how much time it can save.

  • @CodingNuggets
    @CodingNuggets 3 года назад +2

    Super tips. For anyone starting out, this is a great way to begin. I highly suggest you listen if you are a beginner. See you soon!

  • @aabdev
    @aabdev 3 года назад +1

    Dear Jacob Sorber,
    I would add some extra steps:
    a) Write unit tests just inside the code. Use Test Driven Development (TDD).
    b) Install locally Jenkins build server and maintain "on the float" different builds simultaneously
    c) For MCU project implement Bash-like UART console to launch unit tests, diagnostic and manual device control
    d) Implement bootloader for MCU device
    Regards,
    AB

  • @eddydecolombia
    @eddydecolombia 3 года назад

    This video will change many lives. Thank You for the quality. 👏 . Remember to commit often!! REmember to Remember

  • @anon_y_mousse
    @anon_y_mousse 2 года назад

    This is great advice. Something that everyone should learn starting out.

  • @benprishtina153
    @benprishtina153 10 месяцев назад

    right on, I endorse this, however I do those things in opposite order:
    1. set up build environment
    2. set up repository

  • @francomontenegro
    @francomontenegro 3 года назад +1

    Jacob your videos are awesome, thank you so much! Please do find some time to talk about building a custom allocator, that would be very interesting

  • @AceAufWand
    @AceAufWand 3 года назад +1

    Another useful think when starting a new project, make test.

  • @blazkowicz666
    @blazkowicz666 3 года назад +1

    I'm currently a Python dev coming into a complex C/C++ project. I have taken many C++ classes back in college, however, none of them prepared me to handle this project like your videos did. It's still hard going, but this made the experience a little less painful

    • @JacobSorber
      @JacobSorber  3 года назад +1

      Thanks for letting me know. I'm glad they've been helpful.

  • @prakhargupta2960
    @prakhargupta2960 3 года назад

    I love these videos as a student

  • @TheCocoaDaddy
    @TheCocoaDaddy 3 года назад +1

    Awesome video. I wish I had seen this when I was in school. lol I remember completing an assignment, printing out the hard copy source listing to turn in, and after I had the hard copy, I DELETED the source files. Fortunately, I didn't need to make any changes because if I did, I would have needed to re-type EVERYTHING from the printed copy. lol *sigh* Thanks for posting this very valuable advice!!!!!

  • @jacobkoziej
    @jacobkoziej 3 года назад +4

    Hi Dr. Sorber I was wondering if you could consider making a future video about more advanced Makefiles? In a recent project I was attempting to create separate src and obj directories but I couldn't figure out how to write the proper make rules. I desperately tried looking through make's documentation, RUclips, and other sites to no avail so I ended up with a less than ideal solution where I run a mv command to move my objects to my obj directory.

    • @nunyobiznez875
      @nunyobiznez875 3 года назад +2

      I think it would be great if he did an advanced make video. In the mean time however, I'm not sure which documentation you've already checked, but if you aren't already aware, "info make" will provide much more detailed documentation for make than the man page does, and it should provide detailed examples for what it sounds like you are trying to achieve. You might check there if you haven't already. The GNU website also has a lot of documentation as well, though there you have to hunt for it. Also, both No Starch Press and O'Reilly have entire books dedicated just for make, which are both great resources for learning make as well. I seem to recall one of them was free from the publisher, and I believe it's the one from O'Reilly, but don't quote me on that.
      But if I am correctly understanding what you are trying to achieve, it sounds like you probably just need to include the folder in the name ./src/source.c and ./obj/foo, or use ../obj/foo if you are trying to use the makefile from src. You can also use multiple makefiles, one in each directory, called from a main makefile and there are detailed examples for that in the make info page, for that as well, if that's what you're trying to do.

    • @jacobkoziej
      @jacobkoziej 3 года назад +2

      @@nunyobiznez875 wow I did not expect a response like this but thank you so much! But to answer your question I read through the man page and skimmed through the online manual, unfortunately I couldn't understand, but maybe I will now? Nonetheless, thank you so much for pointing me towards some resources! I really appreciate it :)

    • @nunyobiznez875
      @nunyobiznez875 3 года назад +2

      @@jacobkoziej Glad to help, and yes, I think you'll find the info page much more helpful than the man page. Also, it is the O'Reilly book that's free. It's called Managing Projects with GNU Make. It's under the GNU free documentation license and is available to read on the oreilly website, though you may need to google it, as it's hard to find there. They want to sell you the paper copy lol.

  • @EnkoVlog
    @EnkoVlog 3 года назад

    There are plugging (C/C++) for VSC that allows to build and debug.

  • @pasettodavide
    @pasettodavide 3 года назад

    Nice tips! That's why Cargo is so awesome

    • @pierreabbat6157
      @pierreabbat6157 3 года назад

      What happens when the crates the cargo is packed in get rusty?

  • @BluesManPeich
    @BluesManPeich 2 года назад

    8:40 That's exactly what I keep telling myself.

  • @nicopad2260
    @nicopad2260 3 года назад

    you just gave me motivation to finish my project off, thanks

    • @JacobSorber
      @JacobSorber  3 года назад +1

      Glad to hear it! Good luck.

  • @dymastro788
    @dymastro788 3 года назад

    Great video!

    • @JacobSorber
      @JacobSorber  3 года назад

      Thanks. Glad you enjoyed it.

  • @PflanzenChirurg
    @PflanzenChirurg 3 года назад +2

    I NEVER ATTEMPTED TO LEARN MAKE ^^ Visual Studio just does everything for me xD my make is pressing F5. Mental Energy is limited thats for sure Mark Twain is right

    • @alefratat4018
      @alefratat4018 2 года назад

      Until the day you need to develop on a Linux platform ;)

  • @jenselstner5527
    @jenselstner5527 2 года назад

    All your videos an especially this one, told me to start with make files. And as you said it, it makes your life much easier. ;o)

  • @shekharmaela2308
    @shekharmaela2308 3 года назад

    I like your longer vids keep em coming

    • @JacobSorber
      @JacobSorber  3 года назад

      Me too. They take longer to edit, which is a problem, but I like being able to dig a bit deeper.

  • @kosodrzewinka
    @kosodrzewinka Год назад

    Would be cool to see more on integration between Makefiles and VSCode :)

  • @wChris_
    @wChris_ 3 года назад +2

    you should add 'clean' and 'submit' to .PHONY so they get automatically created even if there is a file called 'clean' or 'submit'

    • @Vaaaaadim
      @Vaaaaadim 3 года назад +1

      I had no idea that's what .PHONY was for, thanks for the tip

  • @sailendragautam3736
    @sailendragautam3736 Год назад

    Really great video to level up but sir it wluld have been better if you could explain it in short the setup of the makefile as it isn't able to recognise the path and the keyword

  • @pierreabbat6157
    @pierreabbat6157 3 года назад +3

    For C++ projects, I use CMake with an out-of-source build (source is in ~/src/foo/, binary is in ~/build/foo/bar where bar is the build type).
    How do you set up a Haskell project?

    • @anon_y_mousse
      @anon_y_mousse 2 года назад

      There's nothing to prevent you from doing that with `make`. Both the out-of-source build and using Haskell. Give it a try by adding to the Makefile, have it `mkdir build` and add build/ before the output "file name".

  • @zorochii
    @zorochii 3 года назад

    Do you have videos about different build systems/configurations/generators and their strengths? Things like meson, cmake, ninja, etc.

  • @wilfreddv
    @wilfreddv 3 года назад +6

    Pro tip: eat the frog first and make a utility that creates your makefile, folder structure and version control for you.

    • @JacobSorber
      @JacobSorber  3 года назад +4

      Definitely. Great tip. Or just make a template empty project and copy it over. You can usually make one that will work with minor tweaks for most small-to-medium sized projects.

    • @maskettaman1488
      @maskettaman1488 3 года назад +3

      Or use a proper IDE like everyone else

    • @frozentomatoman3422
      @frozentomatoman3422 3 года назад +1

      @@maskettaman1488 fuck IDEs. I would like to build stuff and control on my own

    • @snacksy7754
      @snacksy7754 3 года назад +3

      @@maskettaman1488 They didn't like what he had to say, because he spoke the truth.

  • @nekoill
    @nekoill 3 года назад

    Wait, the mistakes you mention are actually common? Damn, I guess I chose really decent workshops and courses then, because I was taught to do things (almost?) exactly the way you teach. Even when I was still using Windows, I cd'd into my projects folder, created a folder for a new project, set up a repository and run my code editor from that folder, and then when I got tired of coding I'd add changes, commit and push them to the respective repo. I honestly thought that was how everyone does this.

  • @rafaelcoelho5226
    @rafaelcoelho5226 3 года назад

    Good tips

  • @lucasgasparino6141
    @lucasgasparino6141 2 года назад

    Little personal experience: I started a project a year ago that was supposed to be a pet project... The original cmake system I designed was very shoddy. Ling story short, had to spend the last 2 weeks revising the thing to make it compatible with multiple external libraries and languages (Fortran and c++). Now the whole thing is a template in a git repo that 8 just reuse every time I start a new project :) incidentally, mind doing a series on CMake? The documentation is confusing AF, but I think it's a great solution for gigantic and complex projects.

  • @PSNGuyWithHair102
    @PSNGuyWithHair102 3 года назад +5

    I would LOVE. a video on how to make your own malloc and free PLEASE PLEASE PLEASE

    • @glowiever
      @glowiever 3 года назад +1

      the game programming gems book has one chapter about it, forgot which series. it's a must in console game programming.

    • @JacobSorber
      @JacobSorber  3 года назад +2

      Ok. Thanks. I'll see what I can do.

    • @srijanpaul
      @srijanpaul 3 года назад +1

      +1, would love it. Thought it would probably be a 2-3 part video.

    • @johnkeubler2927
      @johnkeubler2927 3 года назад

      i am writing my own operating system and i would need to know how to do this too.

  • @EnkoVlog
    @EnkoVlog 3 года назад

    Thanks for great video!
    Are you goin to make a video how to use cmake, google test?

  • @TheKelor
    @TheKelor 3 года назад

    To summarise... "eat frogs" 🐸
    Joke aside, that was really good advices.

  • @rtzstvn
    @rtzstvn 3 года назад

    my junior design project desperately needed a git repo but i just didn’t have the experience that i have now. it would have saved me a ton of time with getting features done.
    i knew about git repos and i tried to set one up.
    but after i was like what now lol

  • @xmoex6393
    @xmoex6393 3 года назад

    I agree with your advice but I wouldn't bother to write the makefiles myself and use CMake instead. I can understand how it makes sense do know how it is done for educational purposes but I really like to rely on CMake doing the job better than me for production environments.

    • @xmoex6393
      @xmoex6393 3 года назад

      and: out of source builds!

  • @eruptic6503
    @eruptic6503 3 года назад

    Rumour has it that Jacob's daughter's first words said were Hello World.

  • @Jumaax
    @Jumaax 3 года назад

    I’m coding a queue system simulation and I kinda struggle to understand it because there are too many information about it and it’s really vague to me would you please give some tips, make a video or direct me in a certain website. I would really appreciate that. Thanks in advance

  • @whosgonnacarrythelogsndboats
    @whosgonnacarrythelogsndboats 3 года назад +2

    Can you please make a video on clang Vs gcc? This has been bugging me for a while!!!👐👐

    • @JacobSorber
      @JacobSorber  3 года назад +3

      I talked a little bit about it in my recent "Answering your Questions" video. Didn't go super deep, though. Let me know if you want a deeper more nuanced comparison.

  • @cozycactus
    @cozycactus 2 года назад

    Cmake + Ninja = ❤️

  • @airjuri
    @airjuri 3 года назад

    Heh, nowadays i use git for everything straight from the start. Even on my C64 assembler projects :D

  • @wumi2419
    @wumi2419 3 года назад

    Make part reminded me: Which compiler flags are important during compiling .o file and which are used only by linker (obviously all the -l are linker-specific, but i had questions about -g, -W... etc). I was able to find an answer, but not as fast as i'd like and i might have missed something (it all led to compiler manual, in which flags are separated by sections and stage on which certain flags are used is unclear). Also, is it harmful to have more flags than you need (when you have less flags, code won't compile, but do redundant flags change something).

  • @chrono393
    @chrono393 3 года назад

    Hey where can I buy that shirt?

    • @JacobSorber
      @JacobSorber  3 года назад +1

      teespring.com/stores/jacob-sorbers-store

  • @activelivingchallenger4298
    @activelivingchallenger4298 3 года назад

    Pen and paper so i know where I'm going and what states I need.

  • @messengerofiexist2139
    @messengerofiexist2139 3 года назад

    Do you take bad stackexchange code examples and show how to debug the errors and warnings?
    As a beginner I expect code examples to function and not provide errors or warnings, something I can extend the functionality of. Building on a foundation that someone else has laid is difficult when you can’t identify when the foundation is in need of repairs first.
    Can you walk through some internet code examples and show how you would diagnose them?
    I was looking at Programming ascii art in C, I don’t understand the errors and warnings clang is raising.

    • @JacobSorber
      @JacobSorber  3 года назад

      Maybe. Do you mind pointing me at the particular resource you had difficulty with?

    • @messengerofiexist2139
      @messengerofiexist2139 3 года назад

      @@JacobSorber stackoverflow.com/a/8587004
      I am looking for a code I can play in. Something that has a basic structure I can alter attributes of while the foundation remains.
      The code this person contributed is full of errors and incomplete, so is nonfunctional.

  • @faranahmadk7401
    @faranahmadk7401 3 года назад

    heavy guy.

  • @frozentomatoman3422
    @frozentomatoman3422 3 года назад

    Proud to be the 128th like.
    2 to the power of 6.

  • @MineKaikks
    @MineKaikks 3 года назад

    Hey Matthew, can you make a vídeo about starting with basics arduino?
    I have a project in my list that is build a bluetooth rgb light that i can control with my phone, but i really dont know how to even start, any advice? :)

    • @JacobSorber
      @JacobSorber  3 года назад +1

      Not sure who Matthew is, but you could check out my embedded systems videos and see if they help. And, of course, let me know what specific topics you think I'm missing.

  • @JaycenGiga
    @JaycenGiga 3 года назад +1

    I use Rust for my everyday coding, which comes with a build system and version control from the get-go. Why am I even watching this?

    • @diarmaidmac2149
      @diarmaidmac2149 3 года назад

      Yes, Rust and Cargo are amazing. I thought I loved C++ until I discovered Rust. Now, I would only touch C++ as a last resort.

    • @johnkeubler2927
      @johnkeubler2927 3 года назад

      Yes but some people still like to use C and C++ for fun and it is best for writing operating systems.

    • @JaycenGiga
      @JaycenGiga 3 года назад

      @@johnkeubler2927 Sure, if they like to use them, they are free to do it. But I think that Rust is a good contender for operating systems. Actually, there already *is* an OS, completely written in Rust. Thing is, that (according to Microsoft) about 70 % of all bugs arise due to memory issues of one form or another. And that is something that simply cannot happen in safe Rust. I don't want to start a religious war, C and C++ are definitely still useful, but Rust is catching up very quickly.

    • @johnkeubler2927
      @johnkeubler2927 3 года назад

      Yes I have seen the articles on os development with rust and it looks pretty cool. The os probably would be better if written in rust. How about Googles Go programming language?? It seems pretty cool too.

    • @JaycenGiga
      @JaycenGiga 3 года назад

      @@johnkeubler2927 I haven't really used Go, but to my understanding, it has quite a large runtime and is garbage collected. So it is probably not so good for an OS, even though it's neat for other systems programming cases due to the strong parallelization.

  • @jonconigliaro1
    @jonconigliaro1 3 года назад

    Why do people run code through a terminal? Like in visual studios all i need to do is hit run, but Ive seen many people on youtube using a terminal?

    • @johngibson4874
      @johngibson4874 3 года назад +1

      Some programmers dont rely as much on IDEs like visual studio. Preferring instead to use the terminal and a text editor.
      In this video, he actually is using an IDE (VSCode I think) with an embedded terminal.
      It is just a matter of what is comfortable and fast for you.

    • @JacobSorber
      @JacobSorber  3 года назад +1

      I've talked a bit about this in some of my older videos. In short, I think it's a good thing for beginning programmers to understand what they're actually doing when compiling and linking and debugging - IDEs often hide a lot of that from you, and when you're just getting started that can lead to significant problems in your understanding. Once you know what you're doing, I think it becomes more a matter of preference.

  • @ycombinator765
    @ycombinator765 2 года назад

    my 2023 resolution!

  • @paullemmermann5993
    @paullemmermann5993 3 года назад +2

    struct idea *from_dr_sorber = rethink(how_you_start_projects);

  • @johnkeubler5586
    @johnkeubler5586 3 года назад

    Why did this code fail?? I tried this same code on my phone with Online Compiler using only 1 C file, no linking, etc. and I got the same error. It happens at *p = 45;

    • @petertolgyesi6125
      @petertolgyesi6125 3 года назад

      Because the malloc function was not implemented so it tries to write 45 to an unallocated page, most likely the NULL address.

    • @johnkeubler5586
      @johnkeubler5586 3 года назад

      Once I thought about it I came to the same conclusion. He still should of mentioned why it failed.

    • @messiweltmeista
      @messiweltmeista 3 года назад

      He is assigning the value 45 to an unallocated memory address (NULL in this case)

  • @md.al-aminpatwoary3984
    @md.al-aminpatwoary3984 2 года назад

    Hey Jacob Sorber,
    Would you please create a discord server?

  • @stomah9832
    @stomah9832 3 года назад

    someone should create a project manager that does all these things automatically

  • @baruchben-david4196
    @baruchben-david4196 3 года назад

    Eat a live frog in the morning, and nothing worse will happen to you for the rest of the day... or to the frog...

  • @tanmaydeshpande
    @tanmaydeshpande 3 года назад

    Me who codes in python and just makes cli apps: 😔

    • @tanmaydeshpande
      @tanmaydeshpande 3 года назад

      @artsi0m ; just fine! I made a terminal function to create a new venv with my preferred choice of python version

  • @johnkeubler5586
    @johnkeubler5586 3 года назад

    Actually I thought about it and came to the same conclusion. To make it work for testing purposes without any real code, i got this to work.
    // global variable.
    int a = 2;
    // function.
    void *malloc2 (size_t size) {
    return &a;
    // return NULL;
    }
    // main.
    int main() {
    // sizeof(*p)
    int *p = malloc2(sizeof *p);
    // int *p = NULL;
    // p = malloc2(sizeof *p);
    printf("%p
    ", p);
    printf("%d
    ", *p);
    *p = 45;
    printf("%p
    ", p);
    printf("%d
    ", *p);
    return 0;
    }
    // prints out.
    0x601030
    2
    0x601030
    45
    you can't use malloc() , free() because they are already built-in functions and you get warnings and wierd behavior.

  • @HimanshuSharma-sd5gk
    @HimanshuSharma-sd5gk 3 года назад

    Plz plz answer this question sir..
    For passing multidimentional array to function how valid is to use
    void function(int x, int y, int array[x][y]);
    This worked fine on my system.
    I am himanshu sharma from india

  • @thedoublehelix5661
    @thedoublehelix5661 3 года назад

    lol I thought this was obvious

    • @JacobSorber
      @JacobSorber  3 года назад

      Many things are obvious once you understand them.

  • @MichaelGarcia-tb6pm
    @MichaelGarcia-tb6pm 3 года назад +1

    first haha

  • @zxuiji
    @zxuiji 2 года назад

    paused at 10:32 because that "%.o" is bugging me, that's a REALLY bad thing to do, can't tell you how many times I've done that and regretted it later after spending hours trying to find out why make is trying to compile my makefiles into objects too only to then finally remember "oh right, make adds makefiles into goals against all that is sane" at which point I have to go change my "%.o: %" to "%.c.o: %.c" && "%.cpp.o: %.cpp" all because make recognises "%.o" as special goal instead of just matching it the dependencies given to it, it does not give a flying toss if that will f**k with your output and give you a false negative

  • @AnuAnu-gy9df
    @AnuAnu-gy9df 3 года назад

    love these videos. advice is gold.
    0:59 Don't jump straight into coding
    4:04 Tip: Do the hardest things first
    4:39 1) Create a git repo (or any version control)
    5:24 2) Setup build system (e.g. makefile)
    6:05 Example makefile
    8:54 Why a build system is important
    10:32 Automate anything repetitive
    My own requests / suggestions / ideas for videos:
    - How do you organize header files / source code when working on medium to larger projects?
    - What is your philosophy around commenting your code?
    - How do you think about having the "right" data structure for a project?
    - How do you write tests for projects?
    - How do you "jump into" a larger code base and start to slowly understand / contribute code?
    - What are common anti-patterns you see in C that students (or those new to C) often make?
    - What are some best practices for working in a team (e.g. how long do you struggle with a problem before asking for help, how do you ask for help, etc.)?
    - Things we can easily implement to make our C code more secure?