TIL Emacs has code folding built in (of course it has!). Enable it with `hs-minor-mode` and toggle function, class or comment folding/unfolding with `hs-cycle`. There are many other commands to try too: `hs-hide-all`, `hd-show-all` and so on. Read more: https://lnkd.in/eR5dG7km #emacs #coding
🐉 Torstein Krause Johansen’s Post
More Relevant Posts
-
POST 2: First Linked List Problem Solved 🎯 DSA Progress | First Linked List Problem Solved Solved my first Linked List problem today. Key learnings: ✅ Traversing nodes carefully is important ✅ Handling null pointers avoids runtime errors ✅ Pointer updates must be done step by step Linked List problems require more attention to detail, but they improve logical clarity significantly. #DSA #LinkedList #ProblemSolving #DSAJourney #Coding
To view or add a comment, sign in
-
POST 2: First Stack Problem Solved 🎯 DSA Progress | First Stack Problem Solved Solved my first problem using the **Stack approach** today. Key learnings: ✅ Stack helps manage order efficiently ✅ Pushing and popping at the right time is crucial ✅ Visualizing the stack state avoids logical errors This problem helped me understand why Stack is preferred over brute force in many scenarios. #DSA #Stack #ProblemSolving #DSAJourney #Coding
To view or add a comment, sign in
-
In Go, you can read from files, network connections, HTTP request bodies, and even strings using the same code. The secret is io.Reader. The io.Reader interface describes where data comes from, not how it is stored. If a type knows how to provide bytes when asked, it implements io.Reader. Your function accepts io.Reader, and suddenly it works everywhere. This is interface-based design in action. Your code depends on behaviour, not concrete types. Read once, use everywhere. Follow me for more Go bytes #golang #golangtips #goprogramming #coding #softwaredevelopment
To view or add a comment, sign in
-
-
HTTP responses have headers, a status code, and a body. In Go, the order you write them matters. Set headers first with Header().Set, then call WriteHeader for the status, then write the body. WriteHeader sends the status and headers, so any header changes after that are ignored. The same applies if you write to the body before calling WriteHeader. The first write triggers an implicit 200, and the headers are sent. Get the order right and your response behaves correctly. This is how Go keeps response handling explicit. One sequence, clear control. Follow me for more Go bytes #golang #golangtips #goprogramming #coding #softwaredevelopment
To view or add a comment, sign in
-
-
*** Problem of the Day: Minimum Deletions to Make String Balanced One of the classic DP problems I recently solved. The goal Given a string containing only 'a' and 'b', remove the minimum number of characters so that all 'a's appear before all 'b's. 🔹 Approach I used (DP + Greedy logic): 1. Traverse the string recursively. 2. Keep track of 'b's seen so far (cntb). 3. For each character: 1. If 'a' appears after some 'b', delete it. 2. If 'b' appears before any 'b', either delete it or count it for future comparison. 4. Use memoization to avoid recomputation. Check out my solution here!👇 https://lnkd.in/gcVFdHei The solution essentially decides greedily whether to delete 'a' or 'b' at each step to minimize total deletions. A classic example where DP meets greedy thinking. #Coding #Programming #DataStructures #Algorithms #DynamicProgramming #DP #GreedyAlgorithms #ProblemSolving #LeetCode #CompetitiveProgramming #Tech #SoftwareEngineering #CodeDaily #LearningToCode #CodingChallenge #CodeOptimization #AlgorithmDesign #LinkedInLearning
To view or add a comment, sign in
-
-
You will see http.Error in a lot of Go HTTP code. It is worth knowing what it does under the hood. It is not magic. It uses the same response writer you already have: it calls WriteHeader to send the status code, then writes the message as the response body. So the client gets a normal HTTP response with an error status and a plain text message. Once you see that it is just those two steps, error responses make sense. Follow me for more Go bytes #golang #golangtips #goprogramming #coding #softwaredevelopment
To view or add a comment, sign in
-
-
#Day31 of #100DaysOfCode: #DSA: solve leetcode hard - Reverse Nodes In K-group approach: - find the left and right pointers for a group of size k - if there are lesser than k nodes then do not reverse - reverse the identified k-sized group - connect prevLeft->next to the new head (right) after reversal - move pointers forward and repeat for the next group - finally, return the new head (the right node from the first reversed group) Time Complexity: O(n) Space Complexity: O(1) #Coding #CodingJourney #Learning #DSA
To view or add a comment, sign in
-
-
🧵 Day 11/31: Isomorphic Strings Two strings are isomorphic if characters can be replaced to get the second string. Example: "egg" → "add" ✅ | "foo" → "bar" ❌ Solution: Maintain two arrays of size 256 to track last seen positions. If last seen positions don't match → not isomorphic. Time: O(n) | Space: O(1) Another one down! 💪 #geekstreak60 #npci #Coding #ProblemSolving #GeeksforGeeks @geeksforgeeks @NPCI_NPCI
To view or add a comment, sign in
-
-
I used to think "real coding" meant fighting with memory leaks and obscure compiler errors. 🥲 But the next generation of languages (Rust, Go, Zig) feels different. They focus on: ✅ Human-first syntax ✅ Speed without the headache ✅ Tools that catch errors before you run the code It’s less about fighting the machine and more about just… building. If you could wave a magic wand, what’s one thing you’d change about your current coding language? 👇 #Coding #Programming #Rustlang #Tech
To view or add a comment, sign in
-
-
Day 19 Of #100DaysOfCode: #DSA: Solve leetcode problem with Merge Intervals Pattern - Insert Intervals(medium 57) Approach: - Sort the array by start time - create a temp vector/array - now iterate over intervals and check for each interval if its start time is greater then the newInterval start time if it is then add newInterval into the temp else add curr interval - now merge the intervals that are stored in temp vector/array Time Complexity: O(n logn) Space Complexity: O(n) #Coding #LearnInPublic #CodingJourney
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development