It “funny” how your mind can trick you into making you believe that things are too difficult for you to understand. I’m a self-thought coder, assembly language looked very intimidating to me. But, it’s actually easy to understand. The hard part is that it’s tedious and very easy to make mistakes. Those errors can take you a while to figure out the issue. Most often than not, the issue is something really simple and stupid. You would think that assembly is the lower level for programming, but nope. You need an assembler to convert the assembly text to machine code. My mind was again thinking that it’s something too difficult and I was looking at it as a black box. I was wrong, it’s actually very easy to understand the conversion process. The difficult part is to read and understand the documentation for the different computer hardware that you want to support. Assuming that you have documentation, and the documentation is correct. Of course, you shouldn’t bet on that. It’s also a tedious work to map the values in the documentation into the code that you are writing, you will be hoping that you don’t introduce any typos, copy-paste mistakes, or any other silly errors. I’m oversimplification a lot here, it gets a lot more complicated when performance is taken into consideration. But for learning, do small things, make them work right away, even if they are ugly and slow.
Juan Carlos Aguilar’s Post
More Relevant Posts
-
"Why does my program skip reading I and N letters?" Source: https://lnkd.in/gzqDQ3ep Why is my C program skipping 'I' and 'N' letters when reading input characters with scanf? #CProgramming #BugFixing Hi there! Are you struggling with a strange behavior in your C program where it skips 'I' and 'N' letters when reading input characters with scanf? Let's dive into what could be causing this bug and how to fix it. Program Behavior: 1. The program asks for user input of a capital letter. 2. When you input 'A', it prints 'A'. However, 'I' and 'N' are skipped on subsequent inputs. 3. Entering 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' skips 'I' and 'N'. Possible Causes and Solutions: 1. Variable Initialization: Check if variables A and C are properly initialized. 2. Data Type Mismatch: Ensure the correct data type is used for input. 3. Input Buffer Issue: Clear input buffer after reading characters to avoid unexpected behavior. 4. Check for Newline Character: Consider any hidden newline characters causing the issue. Your programming journey may have bumps, but troubleshooting this bug will sharpen your skills and knowledge. Keep coding and debugging with curiosity! Cheers!
To view or add a comment, sign in
-
Did you know that almost every programming language uses a clever optimization technique called "S𝐡𝐨𝐫𝐭 C𝐢𝐫𝐜𝐮𝐢𝐭𝐢𝐧𝐠" ? It's a smart way to make our code run faster and more efficiently. I use this technique in my daily coding work as well. 𝗨𝗻𝗱𝗲𝗿𝘀𝘁𝗮𝗻𝗱𝗶𝗻𝗴 𝗦𝗵𝗼𝗿𝘁 𝗖𝗶𝗿𝗰𝘂𝗶𝘁𝗶𝗻𝗴 𝗧𝗲𝗰𝗵𝗻𝗶𝗾𝘂𝗲: > In programming, the boolean logic operators `&&` (𝗔𝗡𝗗) and `||` (𝗢𝗥) can save computing power by skipping unnecessary evaluations. For instance, consider the expression `𝘁𝗿𝘂𝗲 || 𝗳𝗮𝗹𝘀𝗲`. Our computer will evaluates this statement piece by piece: It first checks the first part 𝘁𝗿𝘂𝗲 then the second part `||` (𝗢𝗥) and finally the last section 𝗳𝗮𝗹𝘀𝗲. Here's where it gets clever: the computer short-circuits the evaluation. It knows that `𝘁𝗿𝘂𝗲 || 𝗮𝗻𝘆𝘁𝗵𝗶𝗻𝗴` is always 𝘁𝗿𝘂𝗲, so it skips evaluating the third part since the result is already determined. This efficiency extends to `&&` as well. For example, if the computer encounters `𝗳𝗮𝗹𝘀𝗲 && 𝗮𝗻𝘆𝘁𝗵𝗶𝗻𝗴`, it skips evaluating the third part because it already knows the answer is 𝗳𝗮𝗹𝘀𝗲. > Let's see some 𝗖++ examples for better understanding 𝘀𝗵𝗼𝗿𝘁-𝗰𝗶𝗿𝗰𝘂𝗶𝘁𝗶𝗻𝗴: 𝗘𝘅𝗮𝗺𝗽𝗹𝗲 𝟬𝟭: --------------------- // 𝘂𝘀𝗶𝗻𝗴 𝗶𝗳-𝗲𝗹𝘀𝗲 if (output) { result = output; } else { result = nullptr; } // 𝘂𝘀𝗶𝗻𝗴 𝘀𝗵𝗼𝗿𝘁 𝗰𝗶𝗿𝗰𝘂𝗶𝘁𝗶𝗻𝗴 result = output || nullptr; 𝗘𝘅𝗮𝗺𝗽𝗹𝗲 𝟬𝟮: --------------------- // 𝘂𝘀𝗶𝗻𝗴 𝗶𝗳-𝗲𝗹𝘀𝗲 if (userLoggedin) { loginStatus = token; } else { loginStatus = "Failed"; } // 𝘂𝘀𝗶𝗻𝗴 𝘀𝗵𝗼𝗿𝘁 𝗰𝗶𝗿𝗰𝘂𝗶𝘁𝗶𝗻𝗴 loginStatus = userLoggedin && token; ⚡ Using 𝘀𝗵𝗼𝗿𝘁-𝗰𝗶𝗿𝗰𝘂𝗶𝘁𝗶𝗻𝗴 allows you to write more efficient and faster code, optimizing your programs for performance by avoiding unnecessary branching and potentially redundant evaluations. #Like & #Share if you found this insightful! #HappyCoding! #SoftwareEngineering - post: #13
To view or add a comment, sign in
-
Top Voice in Technological Innovation | Software Engineer 3 @ eBay | Founder @TheConsciousMotivationProject, DramaBubbleReview | BITS Pilani Alumna | Follow for Visual Strategic Insights & Global Innovations 🌐
Programming is not about typing, it's about thinking. - Rich Hickey How many times have you found yourself stuck behind the screen looking for that one little bug that's ruining everything? 🤔 And you've probably checked and rechecked your code only to realize that it wasn't a typo, but a logical error. There lies the essence of programming - critical thinking. We’re not just typing code into a computer; we’re fundamentally solving problems, and problem-solving requires critical thinking. Instead of rushing to write lines of code, stop! Think! What problem are you trying to solve? How should you structure your code to create an efficient solution? Remember, a good programmer is also a great thinker. Coding is merely the tool we use to express those ideas. Let's focus on improving our problem-solving skills rather than increasing our typing speed. The quality of your code will thank you! What are some ways you hone your critical thinking skills in your programming or software engineering practice?
To view or add a comment, sign in
-
When designing, developing Mobile applications remember, "A reverse Engineer, Ultimately, Always wins."🤞🏾 And don't believe anyone but who says "It's NEVER Easy." Reverse Engineering will need you to dig deep, Analyze Processes, Code and usually, manually for hours or even days. You won't avoid learning Assembler/bytecode Language...
To view or add a comment, sign in
-
I've always remembered the acronym K.I.S.S. as "Keep It Simple Stupid." To me, it means that if I don't keep things simple, then I'm being stupid. However, when I reinterpret it as "Keep It Stupidly Simple," the fundamental understanding shifts. This principle no longer concerns just the nature of my work, but its purpose. This doesn't just apply to programming but also to communication. Keeping things stupidly simple has nothing to do with one's intelligence. Instead, it ensures that one's code and/or idea can be consumed easily by someone else or even by my future self. What do you think?
To view or add a comment, sign in
-
In programming, cognitive complexity measures how difficult code is to understand. It focuses on the mental effort required to comprehend code. High cognitive complexity makes code harder to maintain, debug, and extend.
To view or add a comment, sign in
-
Designated Initializers provide an intuitive way of initializing aggregate types in C. It’s almost hard to believe they’re a part of the C language spec. I wrote an article describing them. Read it here: https://lnkd.in/gyRTHSYd #cprogramming #clanguage
To view or add a comment, sign in
-
I have taken up a 30-day DSA challenge. Please help me in being consistent throughout. The problem I took today was Search in 2D Matrix: https://lnkd.in/g4zKrHDD Video Solution: https://lnkd.in/gGnRec3q #Day13 #dailycoding #dailychallenge #dailylearning #DSA #LearnInPublic #leetcode #SoftwareEngineering
Almost there... just a few more seconds!
codingninjas.com
To view or add a comment, sign in
-
Teaching professional at FAETEC RJ > Wellness, peace & prosperity > geocities.ws/brunotsouza/ > PORTFOLiO > (SAP) ERP | Cloud computing | Data analysis | Free BSD | GNU Linux | Cybersecurity | Accounting | FiNANCE
》High level x low level (programming) code, "Ai" simulation ... # 1/2 Do you listen to me? Absolutely! I'm here and ready to chat. What's on your mind? There is a website named Compiler Explorer, have you ever heard anything about it? Yes, I'm familiar with Compiler Explorer. It's a web-based interactive compiler that allows you to see the assembly output of your code for different compilers. What would you like to know about it? I'm not very used to assembly language. Would you help me if I want so? Of course! I can help you understand assembly language. What specific questions do you have or what do you need assistance with? For example, the MOV instruction, M-O-V. What is it? Certainly! The MOV instruction in assembly language is used to move data from one location to another. It stands for "move." For instance, MOV AX, BX means move the content of register BX into register AX. What else would you like to know about assembly language? And when I need to manipulate data directly... To manipulate data directly in assembly, you'd typically use instructions like ADD (addition), SUB (subtraction), MUL (multiply), DIV (divide), and others. These instructions allow you to perform operations on data stored in registers or memory locations. What specific manipulation are you looking to achieve? Are you talking about basic logical and arithmetic operations? Exactly! In assembly, basic logical and arithmetic operations involve instructions like ADD (addition), SUB (subtraction), AND (bitwise AND), OR (bitwise OR), XOR (bitwise XOR), and more. These instructions help manipulate data at a low level. Anything specific you'd like to delve into? A basic example specifying memory addresses for summing two values. (continues)
To view or add a comment, sign in
-
Multiple models/abstractions/schemas that share 90% of logic and structure are much cheaper to design/develop/deploy/maintain than if you consolidate them into one model that serves all those functions. Your CS degree set you up for failure right from the start. Disk is cheap. Copy paste is cheap. Yet you'll toil for the rest of your career circling the top of this one local maxima to consolidate relentlessly, feeding the companies that make the tools to fight a worthless battle, building fragile systems. Theory and practice are worlds apart in programming.
To view or add a comment, sign in
-
Senior Engineering Manager at Square
1moI agree with all of this - assembly feels scary to learn when you first approach it. But I personally found it really fun to code in once I got over that initial hump! It's a good learning experience to be in charge of the flow control with jumps and their conditionals, and it was also the first time that the concept of allocating variables to the heap fully clicked for me. It also made me better appreciate the features that come out of the box with higher-level languages. I'm curious - are you learning assembly for a particular project?