Wednesday, July 26, 2023

Source Control (Version Control) Overview

                             

Keywords: Source Control, Version Control, Source code, VCS, CVCS, DVCS, Tools

·       Source Control (or version control)

o   Source control (or version control) is the practice of tracking and managing changes to code

o   Source control management (SCM) systems provide a running history of code development and help to resolve conflicts when merging contributions from multiple sources.

o   Whether you are writing a simple application on your own or collaborating on a large software development project as part of a team, source control is a vital component of the development process

o   Source code management systems allow you to track your code change, see a revision history for your code, and revert to previous versions of a project when needed

o   With source code management systems, you can collaborate on code with your team, isolate your work until it is ready, and quickly trouble-shoot issues by identifying who made changes and what the changes were

o   Source code management systems help streamline the development process and provide a centralized source for all your code.

·       Types of Version Control Systems

o   Local Version Control System (VCSs):

ü  Many people’s version-control method of choice is to copy files into another directory (perhaps a time-stamped directory, if they’re clever). This approach is very common because it is so simple, but it is also incredibly error prone. It is easy to forget which directory you’re in and accidentally write to the wrong file or copy over files you don’t mean to.

ü  To deal with this issue, programmers long ago developed local VCSs that had a simple database that kept all the changes to files under revision control

o   Centralized Version Control Systems (CVCSs)

ü  The next major issue that people encounter is that they need to collaborate with developers on other systems. To deal with this problem, Centralized Version Control Systems (CVCSs) were developed

ü  These systems have a single server that contains all the versioned files, and a number of clients that check out files from that central place. For many years, this has been the standard for version control.

ü  This setup offers many advantages, especially over local VCSs. For example, everyone knows to a certain degree what everyone else on the project is doing.

ü  Administrators have fine-grained control over who can do what, and it’s far easier to administer a CVCS than it is to deal with local databases on every client

ü  However, this setup also has some serious downsides. The most obvious is the single point of failure that the centralized server represents. If that server goes down for an hour, then during that hour nobody can collaborate at all or save versioned changes to anything they’re working on.

ü  If the hard disk the central database is on becomes corrupted, and proper backups haven’t been kept, you lose absolutely everythingthe entire history of the project except whatever single snapshots people happen to have on their local machines.

ü  Local VCSs suffer from this same problemwhenever you have the entire history of the project in a single place, you risk losing everything.

o   Distributed Version Control Systems (DVCSs)

ü  In a DVCS clients don’t just check out the latest snapshot of the files; rather, they fully mirror the repository, including its full history. Thus, if any server dies, and these systems were collaborating via that server, any of the client repositories can be copied back up to the server to restore it. Every clone is really a full backup of all the data

ü  Furthermore, many of these systems deal pretty well with having several remote repositories they can work with, so you can collaborate with different groups of people in different ways simultaneously within the same project.

ü  This allows you to set up several types of workflows that aren’t possible in centralized systems, such as hierarchical models

·       Version Control Tools

ü  Local Version Control System: GNU RCS

ü  Centralized Version Control Systems: CVS, Microsoft TFVC, Subversion, Perforce and others

ü  Distributed Version Control Systems: Git, Mercurial, Darcs and others

ü  Version Control Hosting services: GitHub, Bitbucket, Azure Repos and others

Thursday, July 20, 2023

MTA Microsoft Technology Associate Certifications

MTA Exam 98-361: Software Development Fundamentals

  • Understand programming
  • Understand object-oriented programming
  • Understanding general software development
  • Understanding desktop applications
  • Understand web applications
  • Understanding databases

MTA Exam 98-364: Database Fundamentals
  • Understand core database concepts
  • Create Database Objects
  • Manipulate data
  • Understand data storage
  • Administer a database
  • Understand HTML Fundamentals
  • Understand CSS Fundamentals
  • Structure Documents Using HTML
  • Present Multimedia Using HTML
  • Style Web Pages Using CSS
  • Program with JavaScript Operators, Methods, and Keywords
  • Program with Variables, Data Types, and Functions
  • Implement and Analyze Decisions and Loops
  • Interact with the Document Object Model
  • Interact with HTML Forms
  • Manage the application life cycle
  • Build the user interface (UI) by using HTML5
  • Format the user interface by using Cascading Style Sheets (CSS)
  • Code by using JavaScript
MTA Exam 98-369: Cloud Fundamentals
  • Understand the cloud
  • Enable Microsoft cloud services
  • Administer Office 365 and Microsoft Intune
  • Use and configure Microsoft cloud services
  • Support cloud users
  • Understanding operating system configurations
  • Installing and upgrading client systems
  • Managing applications
  • Managing files and folders
  • Managing devices
  • Understanding operating system maintenance

Friday, July 7, 2023

Coding Overview

 

Keywords: Code, Program, Source code, Programmer, Language, Skills, Clean Code, Code review, Static Analysis, Control flow Analysis, Data flow Analysis, Cyclomatic complexity, Maintainability, Tools.

·       Coding

o   Coding is the process of building a computer program to accomplish a specific computing result or to perform a particular task.

o   This work involves writing, testing, debugging, and maintaining the source code of computer programs.

o   Computer coding works through a series of steps. Typically, computer programmers write instructions in a programming language such as Java or C#, which is then converted into a format that the computer can understand and execute.

o   Code is not written the same way typical human language is written. Instead, code can be written in various programming languages, each with its own set of rules and syntax.

o   Coding enables programmers to create computer software, applications, websites, and other digital tools that interact with data, execute algorithms, and perform automated tasks. Essentially, it's the language through which we communicate and instruct computers to perform functions and solve problems.

·       Code review and Clean code

o   Code review

ü  Analyze a section of code or pseudo-code used to identify Code problems, Checklists for code reviews are necessary

ü  Checklists used for code reviews could include the following items: Design, Meaningful Names, Variables, Functions, Comments, Source code structure, Arithmetic Operations, Loops and Branches, Objects, Classes, Data structures, Error Handling, Boundaries, Unit Tests, Concurrency, Refactoring, Defensive Programming and others.

o   Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability

o   Clean Code General rules:

ü  Follow standard conventions.

ü  Simpler is always better. Reduce complexity as much as possible.

ü  Leave the code cleaner than you find it.

ü  Always find root cause. Always look for the root cause of a problem.

·       Code Static Analysis

o   The objective of static analysis is to detect actual or potential defects in code to improve code maintainability, Static analysis includes Control Flow Analysis, Measure Complexity and Data flow analysis

o   Control Flow Analysis

ü  is a static technique where the steps followed through a program are analyzed through the use of a control flow graph

ü  There are a number of anomalies which can be found in a system using this technique, including loops that are badly designed (e.g., having multiple entry points or that do not terminate), ambiguous targets of function calls in certain languages, incorrect sequencing of operations, code that cannot be reached, uncalled functions, etc.

ü  Control flow analysis can be used to determine cyclomatic complexity. The cyclomatic complexity is a positive integer which represents the number of independent paths in a strongly connected graph

o   Cyclomatic complexity

ü  a metric used to indicate the complexity of a program, It is a quantitative measure of the number of linearly independent paths through a program's source code

ü  to define the cyclomatic complexity of a program is to look at its control-flow graph, a directed graph containing the basic blocks of the program, with an edge between two basic blocks if control may pass from the first to the second.

ü  The complexity M is then defined as: M = E – N + 2P , E = the number of edges of the graph, N = the number of nodes of the graph, P = the number of connected components.

o   Data flow Analysis

ü  covers a variety of techniques which gather information about the use of variables in the code.

ü  The lifecycle of each variable along a control flow path is investigated, (i.e., where it is declared, defined, used, and destroyed), since potential anomalies can be identified if these actions are used out of sequence

o   Improve the maintainability of code:

ü  Poorly written, uncommented, and unstructured code tends to be harder to maintain. It may require more effort for developers to locate and analyze defects in the code, and the modification of the code to correct a defect or add a feature is likely to result in further defects being introduced.

ü  Static analysis is used to verify compliance with coding standards and guidelines; where non-compliant code is identified; it can be updated to improve its maintainability.

ü  These standards and guidelines describe required coding and design practices such as conventions for naming, commenting, indentation and modularization.

ü  code modularization includes measures of coupling (the degree to which components rely on each other during execution) and cohesion (the degree to which a component is self-contained and focused on a single task)

ü  A system that has good maintainability is more likely to have a low measure of coupling and a high measure of cohesion

·       Coding Skills

o   Technical Skills include:

ü  Proficiency in Programming Languages

ü  Debugging Skills

ü  Understanding of Algorithms and Data Structures

ü  Mathematical and Logic Skills

o   Soft Skills include:

ü  Critical Thinking and Problem-Solving Abilities

ü  Attention to Detail and the Ability to Work with Precision

ü  A Willingness to Learn and Adapt to New Technologies

ü  Creativity

ü  Time Management and Organization

ü  Flexibility and Adaptability

·       Coding Tools:

o   Code Editors: Visual Studio Code, Sublime, Notepad++, Vim, Atom, Brackets, and others

o   Integrated Development Environment (IDE’S): MS Visual Studio, IntelliJ IDEA, NetBeans, Eclipse, Android Studio, PyCharm, and others

o   Programming Languages: C, Objective-C, C++, Java, Ruby, Python, C#, Go and Others

o   Static analysis tools: SonarQube, CodeQL , CodePeer, CodesScene, and others


References

https://www.springboard.com/blog/software-engineering/coding-skills/

https://en.wikipedia.org/wiki/Cyclomatic_complexity

Clean Code Book, Robert Martin

Code Complete Book, Steve McConnell