Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Fundamentals for Self-Taught Programmers

You're reading from   Fundamentals for Self-Taught Programmers Embark on your software engineering journey without exhaustive courses and bulky tutorials

Arrow left icon
Product type Paperback
Published in Apr 2023
Publisher Packt
ISBN-13 9781801812115
Length 254 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jasmine Greenaway Jasmine Greenaway
Author Profile Icon Jasmine Greenaway
Jasmine Greenaway
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1: Software Engineering Basics
2. Chapter 1: Defining Software Engineering FREE CHAPTER 3. Chapter 2: The Software Engineering Life Cycle 4. Chapter 3: Roles in Software Engineering 5. Part 2: Introduction to Programming
6. Chapter 4: Programming Languages and Introduction to C# 7. Chapter 5: Writing Your First C# Program 8. Chapter 6: Data Types in C# 9. Chapter 7: Flow Control in C# 10. Chapter 8: Introduction to Data Structures, Algorithms, and Pseudocode 11. Chapter 9: Applying Algorithms in C# 12. Chapter 10: Object-Oriented Programming 13. Part 3: Software Engineering – the Profession
14. Chapter 11: Stories from Prominent Job Roles in Software Development 15. Chapter 12: Coding Best Practices 16. Chapter 13: Tips and Tricks to Kickstart Your Software Engineering Career 17. Assessments 18. Index 19. Other Books You May Enjoy

Following syntax consistency guidelines

While syntax is something that we can’t avoid in any language, there are options for organizing it so that it’s much clearer to understand. As code bases get more complex and go through multiple changes, such as refactors or more features, understanding how they all work can get more complex. Just like naming, following a consistent layout for syntax can make complex code easier to read and maintain.

Organizing lines of code

You have most likely learned that every C# statement needs to end in a semicolon, or else it will not execute. However, did you know that you can have two statements on one line, like in the following example?

int myFirstNumber; int mySecondNumber;

This is valid syntax in C#, because the two statements are separated by a semicolon, but is it clear? Someone could certainly miss that there are two variables here. It’s best to put all complete statements, which are lines that end with a semicolon...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image