This is why you are not confident in logic building

Chai aur Code
14 Jun 202407:15

Summary

TLDRThe video script discusses the importance of logic building in programming and the challenges faced when confidence is lacking. It emphasizes the need for a strong foundation in programming concepts and the practice of visualizing code execution mentally before running it. The speaker suggests that relying solely on output to understand code can hinder the development of logical building skills, advocating for a shift in mindset and a more proactive approach to coding that includes mental visualization and understanding of code flow.

Takeaways

  • 😀 The speaker is addressing an audience about a unique aspect of 'Tea and Code' and discusses the importance of confidence in logic building within programming.
  • 🤔 The audience might not be feeling the excitement of logic building, which the speaker attributes to various reasons including unclear foundations in programming.
  • 🏗️ There are many ways to practice and regions within logic building, and the speaker aims to discuss one such region to offer a new perspective.
  • 🎯 The speaker sets a target of 400 comments for engagement within 24 hours, indicating an interactive approach to the discussion.
  • 🛠️ Foundation clarity in programming is essential, and the lack of it can hinder the development of logical building skills.
  • 🔄 The concept of 'Dry Run' is introduced as a method to execute code mentally before running it, which is a challenging but effective practice.
  • 💡 The importance of visualizing the code's execution in one's mind before running it is emphasized for building strong logical understanding.
  • 📝 The speaker criticizes the common practice of relying solely on output to understand code behavior, suggesting it leads to weak logic building skills.
  • 🔍 Visualization of code execution, such as understanding loops and conditions without running the code, is crucial for advanced logic building.
  • 🚀 For large-scale applications, the speaker points out that it's not always possible to test every function or line of code immediately after writing, thus mental execution becomes vital.
  • 🧠 The speaker encourages a mindset change towards visualizing and predicting code behavior as a step towards enhanced logic building and confidence.

Q & A

  • What is the main topic discussed in the script?

    -The main topic discussed in the script is the concept of logic building in programming and the challenges faced by programmers in developing the ability to visualize and predict code execution without running it.

  • Why might a programmer struggle with logic building?

    -A programmer might struggle with logic building due to unclear foundations in programming, over-reliance on running code to see the output, and a lack of mental visualization of the code execution process.

  • What is the 'Dry Run' method mentioned in the script?

    -The 'Dry Run' method refers to the practice of mentally executing code to predict its output without actually running it, which helps in building logic and understanding the flow of the program.

  • What is the significance of not running the code output during pattern printing exercises?

    -The significance of not running the code output during pattern printing exercises is to encourage programmers to visualize the code execution in their mind, thus improving their logic building skills.

  • How can a programmer improve their logic building skills according to the script?

    -A programmer can improve their logic building skills by practicing mental execution of code, visualizing the flow and output before running it, and understanding the dependencies and functionalities within large applications.

  • What is the role of visualization in programming as discussed in the script?

    -Visualization plays a crucial role in programming as it helps programmers to predict the behavior of their code, understand complex logic, and build confidence in their coding abilities without needing to run the code repeatedly.

  • Why is it important for programmers to understand the logic behind loops and control structures?

    -Understanding the logic behind loops and control structures is important because it allows programmers to effectively predict how their code will execute, which is essential for debugging, optimizing performance, and building complex applications.

  • What is the relationship between logic building and the ability to debug code?

    -Logic building is closely related to the ability to debug code because it enables programmers to identify potential issues and understand the flow of execution, making it easier to pinpoint and fix bugs.

  • How does the script suggest changing the mindset of programmers who rely heavily on output to understand their code?

    -The script suggests that programmers should shift their mindset to visualize and mentally execute their code before running it, which can help them to better understand the logic and improve their programming skills.

  • What are some potential pitfalls of always running code to check its output?

    -Some potential pitfalls of always running code to check its output include a lack of deep understanding of the code's logic, difficulty in visualizing the execution flow, and an over-reliance on trial-and-error methods rather than logical reasoning.

  • How can the practice of 'Dry Run' be applied in real-world programming scenarios?

    -The practice of 'Dry Run' can be applied in real-world programming scenarios by mentally walking through the code execution, predicting the output, and considering the impact of various control structures and dependencies before actually running the code.

Outlines

00:00

🤔 Building Logic and Overcoming Challenges in Coding

The speaker discusses the challenges faced in the process of 'logic building' within coding. They mention that many people struggle with the concept of logic building and may not feel confident in their code's execution. The speaker suggests that a lack of foundational knowledge in programming can lead to such issues. They also touch upon the idea of 'dry run', emphasizing the importance of visualizing code execution in one's mind before running it, as a method to improve logic building skills. The paragraph emphasizes the need for a shift in mindset from relying solely on output to understand code behavior to visualizing and predicting outcomes mentally.

05:00

📚 Adapting Mindset for Effective Coding Practices

In this paragraph, the speaker continues the discussion on coding practices, emphasizing the need to adapt one's mindset when writing code. They suggest that instead of running the code after every few lines to check the output, programmers should attempt to visualize the entire process in their mind first. This approach can help in building confidence and improving logic construction within the code. The speaker also mentions that this method may not apply to everyone and that different perspectives and journeys in coding exist. They encourage sharing such experiences and insights, as it can be beneficial for others, and ends with a call to action for viewers to engage with the content by commenting and subscribing.

Mindmap

Keywords

💡Logic Building

Logic building refers to the process of developing problem-solving skills and the ability to construct coherent and efficient algorithms. In the video, the speaker discusses the lack of confidence in logic building among learners and emphasizes its importance in programming. For example, the speaker mentions various ways to practice logic building, such as through pattern printing and dry runs.

💡Dry Run

A dry run is a method where the code is mentally executed to predict its output without actually running it on a computer. The video highlights the significance of dry runs in understanding how code functions, which helps in visualizing loops and logic flow, thereby strengthening logic building skills.

💡Pattern Printing

Pattern printing involves creating specific patterns (like stars or numbers) using loops in programming. The video uses this as an example of an exercise that helps improve logic building, as it requires understanding and predicting the behavior of nested loops.

💡Visualization

Visualization in this context refers to the ability to mentally simulate the execution of code and foresee its output. The video stresses that being able to visualize the code's execution is crucial for building strong logical reasoning skills, especially before running the code.

💡Confidence

Confidence, as discussed in the video, pertains to the self-assurance in one's ability to write and understand code. The speaker addresses the lack of confidence in logic building and suggests that improving dry run skills and visualization can help build this confidence.

💡Programming Foundations

Programming foundations refer to the basic principles and knowledge required to understand and write code effectively. The video suggests that a weak foundation in programming can be a reason for poor logic building skills and highlights the need for a solid grasp of fundamentals.

💡Execution

Execution in programming refers to running the code to see the output. The speaker points out that overly relying on execution without prior visualization can hinder the development of logic building skills, as it prevents learners from fully understanding the code's logic.

💡Code Reading

Code reading involves analyzing and understanding the written code without running it. The video suggests that reading code and visualizing its execution in the mind is essential for improving logic building skills and understanding complex algorithms.

💡Large Scale Applications

Large scale applications are extensive software projects that often involve multiple dependencies and components. The video explains that in such projects, it's not always feasible to run the code frequently, thus emphasizing the need for strong logic building skills to predict code behavior.

💡Dependencies

Dependencies in programming refer to external libraries, modules, or other code that a program relies on to function. The video discusses how managing dependencies in large applications makes frequent execution impractical, highlighting the importance of being able to mentally execute code.

Highlights

Welcome and introduction to the unique topic of logic building in 'chai and code'.

The importance of confidence in logic building and the feeling that it is missing.

Various methods and practices of logic building.

The concept of 'dry run' as a method for building logic without executing code.

The challenge of visualizing code execution in one's mind before running it.

The common practice of running code to see the output as a learning method.

The downside of relying solely on output to understand code behavior.

The need for programmers to build logic in their minds for effective coding.

The impact of foundational knowledge in programming on logic building.

The role of visualization in understanding loops, variables, and their flow in code.

The importance of not just writing code but also understanding its logic and flow.

The challenge of testing code in large applications with dependencies.

The necessity of changing the mindset from always depending on output to understand code.

The comparison of programming to mathematics, where understanding the steps is crucial.

The suggestion to visualize the entire process in the mind before executing the code.

The idea that understanding code logic can increase confidence and help in building logic.

The encouragement to try visualizing code flow in the mind as a practice for better logic building.

The closing remarks, hoping the discussion was helpful and encouraging further exploration of the topic.

Transcripts

play00:00

हां जी कैसे हैं आप सभी स्वागत है आप सभी

play00:03

का चाय और कोड में हमारा एक अनोखा

play00:30

सर वो बात नहीं पता लग रही वो मजा नहीं आ

play00:32

रहा लॉजिक बिल्डिंग में कॉन्फिडेंस नहीं आ

play00:34

रहा तो लॉजिक बिल्डिंग के कई तरीके हैं और

play00:36

कई तरीकों से इसको प्रैक्टिस भी किया जाता

play00:38

है और उसके कई रीजन है कि आप शायद

play00:40

कॉन्फिडेंस फील नहीं कर रहे हैं लॉजिक

play00:42

बिल्डिंग के अंदर उसमें से एक रीजन मैं

play00:44

यहां पे डिस्कस करने वाला हूं छोटा सा ही

play00:46

है आपको बड़ा अच्छा लगेगा जान के और शायद

play00:48

आप जो सुनते आए होंगे उसको एक नए

play00:50

पर्सपेक्टिव से देखेंगे ज्यादा बड़ा कमेंट

play00:52

टारगेट भी नहीं है सिर्फ 400 कमेंट्स का

play00:55

टारगेट लेते हैं प्लीज कंप्लीट करवा

play00:56

दीजिएगा 24 आवर्स में और डिस्कस करते हैं

play00:59

अब कि लॉजिक बिल्डिंग क्यों नहीं आ पा रही

play01:01

देखिए लॉजिक बिल्डिंग क्यों नहीं हो पा

play01:03

रही इसके बहुत सारे रीजंस है कई बार

play01:05

प्रोग्रामिंग के फाउंडेशन क्लियर नहीं है

play01:07

कई बार फाउंडेशन क्लियर नहीं तो आपको लगता

play01:08

है डीएसए करने से लॉजिक बिल्डिंग होगी कई

play01:11

बार आपको लगता है लीड कोड करने से होगी

play01:13

सीपी करने से होगी प्रोजेक्ट बनाने से

play01:15

होगी जबकि ओबवियस सी बात है यह सब

play01:17

फैक्टर्स हैं उसके अंदर कि यह सब लॉजिक

play01:19

बिल्डिंग में हेल्प करते हैं लेकिन एक जो

play01:21

मेजर फैक्टर मुझे पर्सनली लगता है और मैं

play01:24

काफी टीचर्स को देखता हूं जो इस बात पे

play01:25

फोकस भी करते हैं ऐसा नहीं है कि वो बुरा

play01:27

कर रहे हैं वो फोकस करते हैं इस बात पे

play01:29

इसको को बोला जाता है ड्राई रन अब ये

play01:31

ड्राई जो है वो डोंट रिपीट योरसेल्फ नहीं

play01:34

है वो भी एक अच्छा मेथड है अच्छी मेथोड

play01:36

जीी है प्रोजेक्ट्स बिल्ड करने के लिए

play01:37

एप्लीकेशंस बिल्ड करने के लिए लेकिन यहां

play01:40

पे जो ड्रा रन की मैं बात कर रहा हूं वो

play01:42

सिंपल सी बात है कि आपने एक कोड लिखा और

play01:45

क्या वो कोड आपके माइंड के अंदर

play01:47

एग्जीक्यूट होके उसका आउटपुट आप ला सकते

play01:49

हो यह दिखने में बहुत आसान है लेकिन यह

play01:51

बहुत चैलेंजिंग टास्क है बताता हूं कैसे

play01:54

हम क्या है जिस एनवायरमेंट में कोड सीखते

play01:56

हैं वहां पे हमें कोड इसी तरह से सीखा

play01:58

जाता है कि हमेशा रन करो आउटपुट लाओ रन

play02:01

करो आउटपुट लाओ ये अच्छी बात है कोड रन

play02:03

होना भी चाहिए इसीलिए तो कोडिंग है वहां

play02:05

पे लेकिन कई बार क्या है कि यह जो रन करो

play02:08

आउटपुट लाओ रन करो आउटपुट लाओ इसका जो

play02:14

डायलमाइट्रिप

play02:19

में इसीलिए सबको जो पैटर्न प्रिंटिंग कराई

play02:22

जाती है जो ऑड इवन फाइंड कराया जाता है वो

play02:24

इसीलिए कराया जाता है ताकि कोड रन तो हो

play02:27

लेकिन रन होने से पहले ही आप जब कोड को

play02:30

देखें तो आप अपने माइंड में उसको

play02:31

एग्जीक्यूट कर पाए कि अच्छा यह लूप यहां

play02:33

से जा रहा है अच्छा थर्ड वेरिएबल थर्ड

play02:35

इंस्टेंस के अंदर यह काम होगा फोर्थ में

play02:37

होगा यह आना सबसे ज्यादा जरूरी है अभी आप

play02:41

देखिए अगर आप हमेशा इस बात पर डिपेंडेंट

play02:43

रहते हैं कि नहीं जब तक आउटपुट नहीं आता

play02:45

या मैं एग्जीक्यूट नहीं करके देखता मेरे

play02:47

को नहीं पता लगता कि कोड क्या कर रहा है

play02:49

तो आई थिंक आप फ्यूचर में भी लॉजिक

play02:51

बिल्डिंग के अंदर वीक ही रहने वाले हैं सो

play02:53

सॉरी कहने के लिए बट यह फैक्ट है एक कोडर

play02:57

एक प्रोग्रामर अगर अपने माइंड के अंदर उन

play02:59

लॉजिस को बिल्ड नहीं कर पा रहा है उसका

play03:01

मेन रीजन ये है कि उसका जो कोड लिखा है

play03:03

उसको वो माइंड के अंदर एग्जीक्यूट नहीं कर

play03:05

पा रहा है उसको बस वो आंख बंद करके अंदर

play03:07

तड़ा तड़ ततर लिखे जा रहा है ये ठीक बात

play03:09

नहीं है तो प्लीज इसको सुधारी जो स्पेशली

play03:12

आपको जो काम दिया जाता है कि पैटर्न

play03:14

प्रिंटिंग करिए उसमें मैंने देखा है जो

play03:16

लोग ज्यादा वीक रहते हैं पैटर्न प्रिंटिंग

play03:17

में वो इसीलिए वीक रहते हैं क्योंकि वो बस

play03:20

कोड लिख रहे हैं उनको बस एक एक्स लूप है

play03:23

एक वा लूप है एक आई लूप है एक जे लूप है

play03:25

उनको समझ ही नहीं आ रहा कि वो लूप कहां जा

play03:27

रहा है कौन सा लूप हमारा रो वाइज जा रहा

play03:29

है कौन सा लूप लेंथ वाइज जा रहा है ये सब

play03:32

नहीं उनको विजुलाइज हो रहा है और ये

play03:34

विजुलाइज कभी भी नहीं होगा अगर आप आउटपुट

play03:36

हिट कर देंगे हां जी ये एक फैक्ट बात है

play03:39

आपको शायद सुनने में अजीब सा लगे लेकिन

play03:41

स्पेशली जब आप पैटर्न प्रिंट कर रहे हैं

play03:42

मैट्रिक्स प्रिंटिंग स्टार पैटर्न

play03:44

प्रिंटिंग वहां पे आपका सबसे पहला गोल ये

play03:47

होना चाहिए कि आउटपुट रन नहीं करना है अगर

play03:50

बिना आउटपुट रन करें उस कोड को आप माइंड

play03:52

में अगर एग्जीक्यूट करके देख पा रहे हो कि

play03:54

अच्छा यहां पे यह कोड लिखा हुआ है तो इसका

play03:56

मतलब टॉप पे एक पूरी लाइन बनेगी सेकंड रो

play03:59

में एक कम बनेगा या फिर थर्ड में एक और कम

play04:00

फिर फाइनली एक ही स्टार बनेगा या फिर इसका

play04:02

अपोजिट होगा अगर यह विजुलाइज ब्रेन में

play04:05

नहीं हो पा रहा है तो आप लॉजिक बिल्डिंग

play04:07

में कभी भी आगे नहीं जा पाएंगे अच्छा एक

play04:09

और इसका फैक्ट बताता हूं कि ये क्यों

play04:11

जरूरी होता है देखिए कई बार जब आप बड़े

play04:13

लेवल पे एप्लीकेशंस बिल्ड करेंगे बड़ी हाई

play04:15

स्केल पे करेंगे वो कि ओबवियस सी बात आप

play04:17

करेंगे ही कहीं नहीं जाने वाले आप बिल्कुल

play04:18

करेंगे लेकिन उसके अंदर क्या होता है जब

play04:21

आपने एक कंट्रोलर लिखा एक फंक्शनैलिटी

play04:23

लिखी कई बार उस फंक्शनैलिटी को टेस्ट करना

play04:25

पॉसिबल ही नहीं होता है उस जगह पे कई बार

play04:28

वो फंक्शनैलिटी आगे जा के तीन-चार चीजों

play04:30

पे डिपेंड होती है तो हर बार कोड को लिखने

play04:33

के बाद उसको एग्जीक्यूट करा के दिखाओ उसको

play04:35

रन करा के दिखाओ यह पॉसिबल ही नहीं होता

play04:36

बड़ी एप्लीकेशंस में क्योंकि डिपेंडेंसीज

play04:38

है आपको हो सकता है उसके साथ में कुछ और

play04:40

कोड भी लिखना पड़े किसी और यूजर को उसका

play04:42

कोड लिखना पड़े या आपके फ्रेंड को लिखना

play04:44

पड़े कंपनी के अंदर तभी आप देख सकते हो कि

play04:46

मेरा कोड चल पा रहा है या नहीं चल पा रहा

play04:48

अब इसीलिए कई बार जब ट्यूटोरियल्स भी

play04:50

बनाते हैं तो कई लोग उस पॉइंट पे वो

play04:51

एग्जीक्यूट करके नहीं दिखाते हैं उसका

play04:53

रीजन यही है कि अभी एग्जीक्यूट करा मतलब

play04:55

पूरा कोड फटेगा गारंटीड है वहां पे एरर

play04:57

आएगा लेकिन एक पॉइंट पे जाने के बाद एक

play05:00

स्टेबलाइज होने के बाद ही आप उस प्रोजेक्ट

play05:02

को रन करके थोड़ा टेस्ट करके देख सकते हो

play05:04

हर एक 10 लाइन लिखने के बाद प्रोजेक्ट

play05:06

टेस्ट नहीं किया जा सकता यह फैक्ट है

play05:08

जिसने भी बड़ी एप्लीकेशंस बनाई उसको पता

play05:10

है यह बात कि हर एक फंक्शन लिखने के बाद

play05:12

हर एक 10 लाइन लिखने के बाद आप रन नहीं

play05:14

करवा सकते कोड को तो इस माइंडसेट को हमें

play05:17

थोड़ा सा बदलना पड़ेगा थोड़ा सा इस

play05:18

पर्सपेक्टिव से देखना पड़ेगा कि हमेशा कोड

play05:21

को लिखने के बाद आउटपुट ही डालना अगर इसी

play05:24

फेज में आप हो तो आप शायद कोड को रीड नहीं

play05:26

कर पा रहे हो अच्छे से उसका लॉजिक बिल्ड

play05:28

यहां पे नहीं कर पा रहे और जब तक यहां

play05:30

नहीं कर पा रहे हो तब तक वो जब क्योंकि

play05:32

देखिए कोड का क्या होता है यह मैथ्स की

play05:34

तरह होता है मैथ्स का आंसर एक बार पीछे

play05:36

देख लिया ना अब तो पता ही है आंसर क्या है

play05:38

एक बार किसी की में उठा के देख लिया कि

play05:39

अच्छा इस तरह से करते हैं फिर तो पता ही

play05:41

है लेकिन मैथ्स का मेन जो गोल था वो यही

play05:43

था कि थोड़ा सा ब्रेन को परेशान किया जाए

play05:45

आप खुद देखो करके कि ये स्टेप्स हो रहे

play05:47

हैं क्या प्रोग्रामिंग भी उसी तरह से है

play05:48

एक बार एग्जीक्यूट अगर आपका कोड हो गया ना

play05:50

आप उस कोड को दोबारा नहीं देखने वाले ये

play05:52

तो फैक्ट बात है लेकिन आपने एग्जीक्यूट ही

play05:54

नहीं करा और पहले प्रिडिक्ट करके देख रहे

play05:56

हो कि अच्छा इसका आउटपुट क्या आ सकता है

play05:58

और फिर वो आप आपको प्रेडिक्शन मैच करता है

play06:00

वो आपको कॉन्फिडेंस भी देगा वो आपसे लॉजिक

play06:03

बिल्डिंग भी करवाएगा लेकिन हर बार आंख बंद

play06:05

करके ऐसे एग्जीक्यूट एग्जीक्यूट

play06:06

एग्जीक्यूट करोगे नहीं पढ़ोगे उससे आगे अब

play06:08

यह जरूरी नहीं है कि ये जो बात मैंने बोली

play06:10

है 100% लागू हो हो सकता है आप इस बात से

play06:12

डिसएग्री करो करना भी चाहिए हो सकता है

play06:14

आपके लिए फिट ना बैठे हो सकता है हो सकता

play06:16

है कोई और टीचर जो पढ़ा रहा है उसके लिए

play06:18

फिट ना बैठे हो सकता है कोई बात नहीं सबके

play06:20

लिए अलग-अलग पर्सपेक्टिव है सबके लिए

play06:22

अलग-अलग जर्नी है कोडिंग की मुझे लगा कि

play06:25

यह वाली जर्नी और यह वाला इंसीडेंट आपके

play06:27

साथ शेयर करना चाहिए रॉ टॉक पे और ये जो

play06:29

रॉ चर्चाएं होती है आपको काफी पसंद भी आती

play06:31

है तो हो सकता है इस वीडियो से थोड़ी सी

play06:33

हेल्प मिली हो आपको और अब आप कोड लिखने के

play06:35

बाद थोड़ा सा विजुलाइज करने की कोशिश

play06:37

करेंगे ब्रेन में आप चाहे प्रोजेक्ट बना

play06:39

रहे हैं चाहे आप रजिस्टर कंट्रोलर लिख रहे

play06:41

हैं लॉगइन कंट्रोलर लिख रहे हैं या फिर आप

play06:43

बेसिक स्टैक का फंक्शन लिख रहे हैं लिंक

play06:45

लिस्ट लिख रहे हैं या फिर एक पैटर्न

play06:47

प्रिंट कर रहे हैं एग्जीक्यूट करने से

play06:49

पहले एक बार ब्रेन में पूरा लूप वगैरह सब

play06:51

प्रोसेस करके देखो कि अच्छा यहां पे इस

play06:53

तरह से हो रहा है ये हो रहा है इससे ही

play06:55

आपको आगे जाके हेल्प मिलेगी ठीक है तो बस

play06:57

इतना ही कहना था इस रॉ वीडियो के उम्मीद

play07:00

है आपको पसंद आया होगा पसंद आया है तो

play07:02

कमेंट टारगेट पूरा कर दीजिएगा और

play07:04

सब्सक्राइब नहीं किया तो कर देना नहीं करा

play07:06

तो कोई बात नहीं आगे कर देना कहीं नहीं जा

play07:08

रहे हम आप भी यहीं पर हो यहीं पर ही आओगे

play07:10

ठीक है चलिए जी मिलते हैं आपसे अगले ऐसे

play07:12

किसी वीडियो में

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
Programming LogicLearning StrategiesCode ExecutionEducational InsightsSkill DevelopmentMindset ShiftPractice TechniquesConcept VisualizationCoding ConfidenceTeaching Methods
هل تحتاج إلى تلخيص باللغة الإنجليزية؟