Defensive programming
Organizing straight-line code
Using Conditionals
Controlling Loops
Unusual Control Structures
Table-Driven Methods
General Control Issues
Layout and Style
Code Tuning Strategies
This document provides an introduction to verification and the Universal Verification Methodology (UVM). It discusses different types of verification including simulation, functional coverage, and code coverage. It describes how simulators work and their limitations in approximating physical hardware. It also covers topics like event-driven simulation, cycle-based simulation, co-simulation, and different types of coverage metrics used to ensure a design is fully tested.
Finding Bugs Faster with Assertion Based Verification (ABV)DVClub
1) Assertion-based verification introduces assertions into a design to improve observability and controllability during simulation and formal analysis.
2) Assertions define expected behavior and can detect errors by monitoring signals within a design.
3) An assertion-based verification methodology leverages assertions throughout the verification flow from module to system level using various tools like simulation, formal analysis, and acceleration for improved productivity, quality, and reduced verification time.
This document discusses formal verification in VLSI systems. It begins by explaining that formal verification uses mathematical proofs to show a system works as intended, as an alternative to testing which is limited and costly for large VLSI designs. It then covers various techniques in formal verification including Kripke structures to model systems, temporal logic to specify properties, and model checking to automatically verify properties by exhaustive search. The document provides examples and discusses the challenges of state explosion in formal verification.
This document provides an introduction and overview of ASIC functional verification. It is intended for both beginner and intermediate verification engineers who want to learn the full functional verification flow and write testbenches. The document contains many examples of SystemVerilog constructs with detailed explanations to help readers explore and learn different aspects of the language. It also provides links to additional tutorials on specific verification topics and methodologies. Experienced engineers can use it as a reference to experiment with examples of different SystemVerilog features. The document is intended to be updated continuously as the author gains more experience with verification.
This document discusses software integration, which involves combining separate software components into a single system. There are two main approaches to integration - phased integration, where components are integrated in large phases after individual development, and incremental integration, where small functional parts are integrated frequently. Incremental integration provides benefits like easier defect location and earlier working software. Specific incremental strategies discussed include top-down, bottom-up, sandwich, risk-oriented, and feature-oriented integration. The document recommends performing a "daily build and smoke test" where the integrated software is compiled and tested each day to catch errors early.
The document discusses techniques for defensive programming, including checking for invalid inputs, using assertions to validate assumptions, handling errors gracefully, and using exceptions to pass errors to calling code. It recommends barricading programs to contain damage from errors, using assertions inside barricades and error handling outside, and determining what defensive checks to leave in production code based on importance and impact.
This document discusses guidelines for writing high quality code. It covers several topics:
1. What is high quality code and code quality, focusing on aspects like understandability, maintainability, and self-documenting code.
2. Examples of good and bad practices for variables and statements based on Code Complete 2nd edition. This includes guidelines for naming, initializing variables, avoiding magic numbers and literals.
3. Examples of self-documenting code through style, commenting conventions, and ensuring the code explains itself without additional comments.
4. An overview of how to create high quality code, including following best practices for variables, statements, and self-documenting code. The discussion also covers software construction activities
This document provides an introduction to verification and the Universal Verification Methodology (UVM). It discusses different types of verification including simulation, functional coverage, and code coverage. It describes how simulators work and their limitations in approximating physical hardware. It also covers topics like event-driven simulation, cycle-based simulation, co-simulation, and different types of coverage metrics used to ensure a design is fully tested.
Finding Bugs Faster with Assertion Based Verification (ABV)DVClub
1) Assertion-based verification introduces assertions into a design to improve observability and controllability during simulation and formal analysis.
2) Assertions define expected behavior and can detect errors by monitoring signals within a design.
3) An assertion-based verification methodology leverages assertions throughout the verification flow from module to system level using various tools like simulation, formal analysis, and acceleration for improved productivity, quality, and reduced verification time.
This document discusses formal verification in VLSI systems. It begins by explaining that formal verification uses mathematical proofs to show a system works as intended, as an alternative to testing which is limited and costly for large VLSI designs. It then covers various techniques in formal verification including Kripke structures to model systems, temporal logic to specify properties, and model checking to automatically verify properties by exhaustive search. The document provides examples and discusses the challenges of state explosion in formal verification.
This document provides an introduction and overview of ASIC functional verification. It is intended for both beginner and intermediate verification engineers who want to learn the full functional verification flow and write testbenches. The document contains many examples of SystemVerilog constructs with detailed explanations to help readers explore and learn different aspects of the language. It also provides links to additional tutorials on specific verification topics and methodologies. Experienced engineers can use it as a reference to experiment with examples of different SystemVerilog features. The document is intended to be updated continuously as the author gains more experience with verification.
This document discusses software integration, which involves combining separate software components into a single system. There are two main approaches to integration - phased integration, where components are integrated in large phases after individual development, and incremental integration, where small functional parts are integrated frequently. Incremental integration provides benefits like easier defect location and earlier working software. Specific incremental strategies discussed include top-down, bottom-up, sandwich, risk-oriented, and feature-oriented integration. The document recommends performing a "daily build and smoke test" where the integrated software is compiled and tested each day to catch errors early.
The document discusses techniques for defensive programming, including checking for invalid inputs, using assertions to validate assumptions, handling errors gracefully, and using exceptions to pass errors to calling code. It recommends barricading programs to contain damage from errors, using assertions inside barricades and error handling outside, and determining what defensive checks to leave in production code based on importance and impact.
This document discusses guidelines for writing high quality code. It covers several topics:
1. What is high quality code and code quality, focusing on aspects like understandability, maintainability, and self-documenting code.
2. Examples of good and bad practices for variables and statements based on Code Complete 2nd edition. This includes guidelines for naming, initializing variables, avoiding magic numbers and literals.
3. Examples of self-documenting code through style, commenting conventions, and ensuring the code explains itself without additional comments.
4. An overview of how to create high quality code, including following best practices for variables, statements, and self-documenting code. The discussion also covers software construction activities
The document discusses techniques for organizing code structures like straight line code and conditionals to improve readability and maintainability. It covers organizing straight line code by making dependencies obvious, keeping related statements together, and grouping related blocks. For conditionals, it recommends writing nominal cases first, simplifying complex tests, putting common cases first, and ensuring all cases are covered.
The document discusses best practices for naming variables. It recommends initializing variables as they are declared, giving variables descriptive names to indicate their purpose, and adopting naming conventions to make code more consistent and readable for multiple programmers. Standardized prefixes and abbreviations can make long names more compact while retaining clarity. Overall, the goal is to use variable names that are meaningful, unambiguous, and help convey the essential logic of the code at a glance.
This document discusses software design in construction. It defines design as linking requirements to coding and debugging. It describes design as a "wicked" and sloppy process involving trade-offs. Good design depends on concepts like managing complexity, desirable characteristics, and multiple levels of design. Effective heuristics for design include identifying real-world objects, forming consistent abstractions, encapsulating details, using inheritance, and information hiding. Design practices that can be used include iteration, dividing problems, and experimental prototyping.
This document discusses code-tuning techniques to improve performance without major refactoring. It describes techniques for optimizing logic, loops, data transformations, expressions, routines, and recoding performance-critical sections in assembler. Specific techniques covered include short-circuit evaluation, ordering tests by frequency, substituting table lookups, unswitching loops, jamming loops, loop unrolling, minimizing work inside loops, and rewriting routines inline. The goal is to make small, targeted changes to improve efficiency rather than large-scale redesigns.
This document discusses software design in construction. It defines design as linking requirements to coding and debugging. It describes design as a "wicked" and sloppy process involving trade-offs. Good design depends on concepts like managing complexity, desirable design characteristics, and different design levels. Effective design heuristics include finding real-world objects, forming consistent abstractions, encapsulating details, using inheritance, and information hiding. Design practices that can be used include iteration, dividing problems, and experimental prototyping.
Pragmatic Programmer
Estimating (提升专业素养)
DRY rule - Repeat or Reuse (提炼经验)
Control Structures & Complexity (简洁就是美)
Table Driven (善于运用算法)
Design for CHANGE (完善设计、争取主动)
Refactoring (追求卓越,勇于改进)
Automation (一切都要自动化)
Resource
Who is working for you (找个巨人的肩膀)
Accessories for you
Process and Methods
Process enhances confidence
Thought Disorder(最容易欺骗的人是自己)
Conceptual Blockbusting
Career anchors
How to define the VALUE (价值不等式)
Professionalism
The document discusses a presentation about version control systems and intellectual property rights using Git as an example. It provides an overview of Git basics, comparing its snapshot-based model to Subversion's patch-based approach. It demonstrates how Git stores project files and changes as snapshots at different commit points, allowing access to previous versions.
The document discusses strategies for code tuning to improve performance. It covers identifying areas of inefficiency through profiling, focusing on "hot spots" that consume the most runtime. Common sources of inefficiency include input/output, paging, system calls and interpreted languages. The document recommends an iterative process of measurement, optimization of hot spots, and remeasurement to evaluate improvements. It also cautions that code tuning should only be done after establishing correctness, quality and design to avoid detracting from the primary goals of development.
This document discusses guidelines for writing high quality code, including definitions of code quality, examples of good and bad practices for variables and statements, and recommendations on code construction. It focuses on concepts from the book "Code Complete" such as self-documenting code, managing complexity, information hiding, and creating high-level abstractions through classes and routines. The presentation provides many examples and recommendations for writing understandable, maintainable and flexible code.
Tout comme on fait attention au style d'écriture utilisé lorsque l'on rédige un livre, en plus d'appliquer les règles d'orthographe et de grammaire, il faut également appliquer des règles stylistiques lorsqu'on rédige du code.
Cette conférence présente plusieurs aspects à prendre en compte pour rédiger du code de qualité, allant de la structure globale d'un programme à la mise en page de son code, en passant par les noms des variables.
This document discusses various techniques for tuning code performance, including logical approaches like short-circuit evaluation and lookup tables, loop tuning techniques like unswitching and jamming, transforming data to use fewer arrays or integers instead of floats, tuning expressions through algebraic identities and compile-time initialization, and other techniques like inlining, buffer I/O, and handling special cases separately. It emphasizes that tuning code can improve or reduce performance depending on the situation and that measurement is needed to evaluate effects.
The document discusses the steps for creating classes and routines in programming. It describes creating an initial design for the class or routine using pseudocode. The key steps are to design the routine, code it, check the code, clean up leftover issues, and repeat the process as needed. Pseudocode uses English-like statements to precisely describe operations at a level of intent that is easily translatable to code.
The document outlines the research methodology process which consists of 11 steps: 1) formulating the research problem, 2) conducting an extensive literature review, 3) developing a working hypothesis, 4) preparing the research design, 5) determining the sample design, 6) collecting the data, 7) executing the project, 8) analyzing the data, 9) hypothesis testing, 10) drawing generalizations and interpretations, and 11) preparing the report. It also discusses key aspects of each step such as different research objectives, types of research, and components of a good research project.
Integration strategies best practices- Mulesoft meetup April 2018Rohan Rasane
The document discusses best practices for integration strategies including using an integration platform, designing integrations, and implementing resiliency patterns. It recommends having an integration platform to provide features like batch processing, loose coupling, reuse, governance, and security. When designing integrations, questions about data, users, transactions, orchestrations, and future needs should be considered. Common resiliency patterns discussed are timeouts, circuit breakers, bulkheads, retries, and idempotency.
Performance tuning Grails Applications GR8Conf US 2014Lari Hotari
The document discusses performance tuning for Grails applications. It covers optimizing for latency, throughput, and quality of operations. Key aspects discussed include Amdahl's law, Little's law, profiling tools, common pitfalls, and recommendations for improving performance like eliminating blocking and focusing on feedback cycles. Specific techniques mentioned include optimizing SQL queries, reducing regular expressions, improving caching, and using thread dumps to diagnose production issues.
The document discusses performance tuning for Grails applications. It outlines that performance aspects include latency, throughput, and quality of operations. Performance tuning optimizes costs and ensures systems meet requirements under high load. Amdahl's law states that parallelization cannot speed up non-parallelizable tasks. The document recommends measuring and profiling, making single changes in iterations, and setting up feedback cycles for development and production environments. Common pitfalls in profiling Grails applications are also discussed.
This document provides an introduction to C++ programming including problem solving skills, software evolution, procedural and object oriented programming concepts, basic C++ programs, operators, header files, conditional statements, loops, functions, pointers, structures and arrays. It discusses topics such as analyzing problems, planning algorithms, coding solutions, evaluating results, procedural and object oriented paradigms, inheritance, polymorphism, flowcharts, basic syntax examples, and more. Various examples are provided to illustrate key concepts in C++.
This document provides tips and tricks for debugging Arbortext applications. It discusses challenges like debugging components with multiple interfaces and custom code. It recommends using messages like response() and eval to monitor state, and debugging tools like the Java console. It also suggests adding debug messages programmatically, using binary search, and getting a second set of eyes to help find bugs. Maintaining backups and good documentation are emphasized.
Abstract
More and more the world runs on software, furthermore software is increasingly controlling devices in the real world. Software failures can now have a greater impact than just loss of data, physical damage and injury are now concerns. While many high reliability specifications exist, such as MISRA and DO-178B, they can be too “heavy” for many projects and are typically domain specific (automotive and airborne systems respectively) and are not used.
This presentation explores various software techniques that can be used to harden a software system and make it more reliable. The presentation also covers key questions to be answered when developing software that interacts with the real world.
Specifically we will be looking at cases where the software needs to be more reliable than “average” but does not justify investment in a formal specification such as MISRA or DO-178B.
Bio
Lloyd Moore is the founder and owner of CyberData Corporation, which provides consulting services in the robotics, machine vision and industrial automation fields. Lloyd has worked in software industry for 25 years. His formal training in biological-based artificial intelligence, electronics, and psychology. Lloyd is also currently the president of the Northwest C++ User’s Group and an organizer of the Seattle Robotics Society Robothon event.
Software coding & testing, software engineeringRupesh Vaishnav
Coding Standard and coding Guidelines, Code Review, Software Documentation, Testing Strategies, Testing Techniques and Test Case, Test Suites Design, Testing Conventional
Applications, Testing Object Oriented Applications, Testing Web and Mobile Applications, Testing Tools (Win runner, Load runner).
The document discusses techniques for organizing code structures like straight line code and conditionals to improve readability and maintainability. It covers organizing straight line code by making dependencies obvious, keeping related statements together, and grouping related blocks. For conditionals, it recommends writing nominal cases first, simplifying complex tests, putting common cases first, and ensuring all cases are covered.
The document discusses best practices for naming variables. It recommends initializing variables as they are declared, giving variables descriptive names to indicate their purpose, and adopting naming conventions to make code more consistent and readable for multiple programmers. Standardized prefixes and abbreviations can make long names more compact while retaining clarity. Overall, the goal is to use variable names that are meaningful, unambiguous, and help convey the essential logic of the code at a glance.
This document discusses software design in construction. It defines design as linking requirements to coding and debugging. It describes design as a "wicked" and sloppy process involving trade-offs. Good design depends on concepts like managing complexity, desirable characteristics, and multiple levels of design. Effective heuristics for design include identifying real-world objects, forming consistent abstractions, encapsulating details, using inheritance, and information hiding. Design practices that can be used include iteration, dividing problems, and experimental prototyping.
This document discusses code-tuning techniques to improve performance without major refactoring. It describes techniques for optimizing logic, loops, data transformations, expressions, routines, and recoding performance-critical sections in assembler. Specific techniques covered include short-circuit evaluation, ordering tests by frequency, substituting table lookups, unswitching loops, jamming loops, loop unrolling, minimizing work inside loops, and rewriting routines inline. The goal is to make small, targeted changes to improve efficiency rather than large-scale redesigns.
This document discusses software design in construction. It defines design as linking requirements to coding and debugging. It describes design as a "wicked" and sloppy process involving trade-offs. Good design depends on concepts like managing complexity, desirable design characteristics, and different design levels. Effective design heuristics include finding real-world objects, forming consistent abstractions, encapsulating details, using inheritance, and information hiding. Design practices that can be used include iteration, dividing problems, and experimental prototyping.
Pragmatic Programmer
Estimating (提升专业素养)
DRY rule - Repeat or Reuse (提炼经验)
Control Structures & Complexity (简洁就是美)
Table Driven (善于运用算法)
Design for CHANGE (完善设计、争取主动)
Refactoring (追求卓越,勇于改进)
Automation (一切都要自动化)
Resource
Who is working for you (找个巨人的肩膀)
Accessories for you
Process and Methods
Process enhances confidence
Thought Disorder(最容易欺骗的人是自己)
Conceptual Blockbusting
Career anchors
How to define the VALUE (价值不等式)
Professionalism
The document discusses a presentation about version control systems and intellectual property rights using Git as an example. It provides an overview of Git basics, comparing its snapshot-based model to Subversion's patch-based approach. It demonstrates how Git stores project files and changes as snapshots at different commit points, allowing access to previous versions.
The document discusses strategies for code tuning to improve performance. It covers identifying areas of inefficiency through profiling, focusing on "hot spots" that consume the most runtime. Common sources of inefficiency include input/output, paging, system calls and interpreted languages. The document recommends an iterative process of measurement, optimization of hot spots, and remeasurement to evaluate improvements. It also cautions that code tuning should only be done after establishing correctness, quality and design to avoid detracting from the primary goals of development.
This document discusses guidelines for writing high quality code, including definitions of code quality, examples of good and bad practices for variables and statements, and recommendations on code construction. It focuses on concepts from the book "Code Complete" such as self-documenting code, managing complexity, information hiding, and creating high-level abstractions through classes and routines. The presentation provides many examples and recommendations for writing understandable, maintainable and flexible code.
Tout comme on fait attention au style d'écriture utilisé lorsque l'on rédige un livre, en plus d'appliquer les règles d'orthographe et de grammaire, il faut également appliquer des règles stylistiques lorsqu'on rédige du code.
Cette conférence présente plusieurs aspects à prendre en compte pour rédiger du code de qualité, allant de la structure globale d'un programme à la mise en page de son code, en passant par les noms des variables.
This document discusses various techniques for tuning code performance, including logical approaches like short-circuit evaluation and lookup tables, loop tuning techniques like unswitching and jamming, transforming data to use fewer arrays or integers instead of floats, tuning expressions through algebraic identities and compile-time initialization, and other techniques like inlining, buffer I/O, and handling special cases separately. It emphasizes that tuning code can improve or reduce performance depending on the situation and that measurement is needed to evaluate effects.
The document discusses the steps for creating classes and routines in programming. It describes creating an initial design for the class or routine using pseudocode. The key steps are to design the routine, code it, check the code, clean up leftover issues, and repeat the process as needed. Pseudocode uses English-like statements to precisely describe operations at a level of intent that is easily translatable to code.
The document outlines the research methodology process which consists of 11 steps: 1) formulating the research problem, 2) conducting an extensive literature review, 3) developing a working hypothesis, 4) preparing the research design, 5) determining the sample design, 6) collecting the data, 7) executing the project, 8) analyzing the data, 9) hypothesis testing, 10) drawing generalizations and interpretations, and 11) preparing the report. It also discusses key aspects of each step such as different research objectives, types of research, and components of a good research project.
Integration strategies best practices- Mulesoft meetup April 2018Rohan Rasane
The document discusses best practices for integration strategies including using an integration platform, designing integrations, and implementing resiliency patterns. It recommends having an integration platform to provide features like batch processing, loose coupling, reuse, governance, and security. When designing integrations, questions about data, users, transactions, orchestrations, and future needs should be considered. Common resiliency patterns discussed are timeouts, circuit breakers, bulkheads, retries, and idempotency.
Performance tuning Grails Applications GR8Conf US 2014Lari Hotari
The document discusses performance tuning for Grails applications. It covers optimizing for latency, throughput, and quality of operations. Key aspects discussed include Amdahl's law, Little's law, profiling tools, common pitfalls, and recommendations for improving performance like eliminating blocking and focusing on feedback cycles. Specific techniques mentioned include optimizing SQL queries, reducing regular expressions, improving caching, and using thread dumps to diagnose production issues.
The document discusses performance tuning for Grails applications. It outlines that performance aspects include latency, throughput, and quality of operations. Performance tuning optimizes costs and ensures systems meet requirements under high load. Amdahl's law states that parallelization cannot speed up non-parallelizable tasks. The document recommends measuring and profiling, making single changes in iterations, and setting up feedback cycles for development and production environments. Common pitfalls in profiling Grails applications are also discussed.
This document provides an introduction to C++ programming including problem solving skills, software evolution, procedural and object oriented programming concepts, basic C++ programs, operators, header files, conditional statements, loops, functions, pointers, structures and arrays. It discusses topics such as analyzing problems, planning algorithms, coding solutions, evaluating results, procedural and object oriented paradigms, inheritance, polymorphism, flowcharts, basic syntax examples, and more. Various examples are provided to illustrate key concepts in C++.
This document provides tips and tricks for debugging Arbortext applications. It discusses challenges like debugging components with multiple interfaces and custom code. It recommends using messages like response() and eval to monitor state, and debugging tools like the Java console. It also suggests adding debug messages programmatically, using binary search, and getting a second set of eyes to help find bugs. Maintaining backups and good documentation are emphasized.
Abstract
More and more the world runs on software, furthermore software is increasingly controlling devices in the real world. Software failures can now have a greater impact than just loss of data, physical damage and injury are now concerns. While many high reliability specifications exist, such as MISRA and DO-178B, they can be too “heavy” for many projects and are typically domain specific (automotive and airborne systems respectively) and are not used.
This presentation explores various software techniques that can be used to harden a software system and make it more reliable. The presentation also covers key questions to be answered when developing software that interacts with the real world.
Specifically we will be looking at cases where the software needs to be more reliable than “average” but does not justify investment in a formal specification such as MISRA or DO-178B.
Bio
Lloyd Moore is the founder and owner of CyberData Corporation, which provides consulting services in the robotics, machine vision and industrial automation fields. Lloyd has worked in software industry for 25 years. His formal training in biological-based artificial intelligence, electronics, and psychology. Lloyd is also currently the president of the Northwest C++ User’s Group and an organizer of the Seattle Robotics Society Robothon event.
Software coding & testing, software engineeringRupesh Vaishnav
Coding Standard and coding Guidelines, Code Review, Software Documentation, Testing Strategies, Testing Techniques and Test Case, Test Suites Design, Testing Conventional
Applications, Testing Object Oriented Applications, Testing Web and Mobile Applications, Testing Tools (Win runner, Load runner).
The View - Lotusscript coding best practicesBill Buchan
This document discusses best practices for LotusScript coding. It covers topics like code structure, using short logical functions, defensive programming, variable naming conventions, and ensuring variables only exist as long as needed. The goal is to write code that is maintainable, reusable, and robust. Testing practices like test-driven development and separating development, testing, and production environments are also recommended to improve quality.
This document summarizes key principles for writing clean code as outlined in the book "Clean Code" by Robert C. Martin. It discusses ideas like writing code that is easy to read and understand through use of meaningful names, small functions that do one thing well, and avoiding duplication. It also covers principles for object-oriented design like encapsulation, organization for change, and separation of concerns. Testing philosophies like test-driven development and ensuring tests are fast, independent, repeatable, self-validating, and timely are also emphasized. The overall message is that writing clean code requires attention to structure, naming, formatting and testing to produce software that is simple, well-organized and a pleasure to maintain.
Computational thinking involves breaking down complex problems into smaller, more manageable parts through decomposition. It utilizes concepts like pattern recognition, abstraction, algorithms, and evaluation. The key aspects of computational thinking are decomposing problems, recognizing patterns within data, abstracting away unnecessary details, designing algorithms to describe solutions, and evaluating whether the solution meets the problem's requirements.
Grails has great performance characteristics but as with all full stack frameworks, attention must be paid to optimize performance. In this talk Lari will discuss common missteps that can easily be avoided and share tips and tricks which help profile and tune Grails applications.
Reading Notes : the practice of programmingJuggernaut Liu
This document summarizes a study group sharing on programming best practices. It discusses topics like style, design, interfaces, debugging, testing, performance, portability, and notation. The speaker, Juggernaut Liu, has 6 years of C# experience and focuses on ideas like using descriptive variable names, commenting code, designing for interfaces to hide implementations, and writing portable code to improve maintainability. Examples are provided throughout to illustrate techniques for writing clean, efficient code.
This document provides an overview of 30 tips for optimizing LotusScript development. It begins with introductions and outlines, then groups the tips into three sections: Theory, Practice, and Advanced. The Theory section covers 10 fundamental tips regarding best practices like using Option Declare, version control, application lifecycles, code structure, testing, and error handling. The Practice section presents 10 tips that should be implemented regularly, such as defensive coding, extending arrays, logging, and using NotesDateTime. The Advanced section introduces more complex topics like custom classes and binding. The goal is to help LotusScript developers improve code quality, maintainability, and performance.
New language runtimes appear all the time, but most of them die young. Failure can be attributed to different reasons, but an important factor is that lack of support can limit the community’s and industry’s willingness to adopt the new language.
Quicker development and improved serviceability allows emerging languages to overcome this obstacle. By building on the proven technology available in Eclipse OMR, language developers can get more than performance and stability; you also get tools that help you quickly debug your language runtime, allowing you to provide competitive serviceability.
From this presentation, you will learn how to enable Eclipse OMR’s mature debugging features in your language runtime, and also how Eclipse OMR can assist with development and debugging.
This document discusses Spring AOP (Aspect Oriented Programming) and provides examples of how to implement cross-cutting concerns in a Spring application. It defines key AOP concepts like advice, aspect, pointcut, and joint point. It also describes the different types of AOP advices in Spring like before, after returning, after throwing and around advices. The document compares Spring AOP to AspectJ and provides code samples and use cases of implementing AOP.
Scripting experts from Inductive Automation cover general best practices that will help you add flexibility and customization to HMI, SCADA, IIoT, and other industrial applications. Some specific tips about using scripting in the Ignition platform will be included as well.
In this webinar, learn more about:
• Common scripting pitfalls and how to avoid them
• The best programming languages to use
• Things to consider before using scripting
• How scripting environments work
• Scripting timesavers
• And more
Clean Code in Test Automation Differentiating Between the Good and the BadKnoldus Inc.
This session focuses on the principles of writing clean, maintainable, and efficient code in the context of test automation. The session will highlight the characteristics that distinguish good test automation code from bad, ultimately leading to more reliable and scalable testing frameworks.
Scripting experts from Inductive Automation cover general best practices that will help you add flexibility and customization to HMI, SCADA, IIoT, and other industrial applications. Some specific tips about using scripting in the Ignition platform will be included as well.
In this webinar, learn more about:
• Common scripting pitfalls and how to avoid them
• The best programming languages to use
• Things to consider before using scripting
• How scripting environments work
• Scripting timesavers
• And more
This document discusses two small designs in WebKit: the opaque pointer pattern and private data class pattern. It explains the benefits of using these patterns, such as hiding implementation details, reducing coupling, and allowing separate evolution of interfaces and implementations. It also compares opaque pointers and pimpl, noting that pimpl provides more pure encapsulation and minimizes coupling. Overall it promotes learning design patterns and idioms through small examples.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
Infrastructure Challenges in Scaling RAG with Custom AI modelsZilliz
Building Retrieval-Augmented Generation (RAG) systems with open-source and custom AI models is a complex task. This talk explores the challenges in productionizing RAG systems, including retrieval performance, response synthesis, and evaluation. We’ll discuss how to leverage open-source models like text embeddings, language models, and custom fine-tuned models to enhance RAG performance. Additionally, we’ll cover how BentoML can help orchestrate and scale these AI components efficiently, ensuring seamless deployment and management of RAG systems in the cloud.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
5. Defensive programming
• Protect your program from invalid inputs
– Common Sense
• Garbage in, garbage out
– Let the user beware
• Good program won’t put out garbage.
– Garbage in, nothing out
– Garbage in, error message out
– No garbage allowed in
• During construction, protecting yourself against the small stuff matters more than you
might think. ( 魔鬼就在细节之中 !)
• General ways
– Check the values of all data from external source
• Check all data falls within the allowable range for I/O operation and data transfer
between routines.
– Check the value of all routine input parameters
– Decide how to handle bad inputs
• Error handling
• Assertion
• Exception
6. Several reasons to enhance error handling
• Overall thinking
– To enhance your capability on question analysis.
– To enhance your capability on design.
– To enhance your coding skill.
• Find earlier, fix earlier
– To reduce potential issues.
– To reduce bug fixing efforts.
7. Error handling
• To handle errors that you do expect to occur!
– Return a neutral value
– Substitute the next piece of valid data
– Return the same answer as the previous time
– Substitute the closest legal value
– Log a warning message to a file
– Return an error code
– Call an error processing routine/object
– Display an error message wherever the error is encountered
– Handle the error in whatever way works best locally
• Not good design.
– Shutdown
8. Assertion
• 同 << 程序员修练之道 >> 之断言式编程
• Common Sense
– Use assertion to handle errors that should never occur.
– Easy for parameters checking.
• Sample in Objective-C
If that error should never occur, use assertion to define it. If it happens, crash early!If that error should never occur, use assertion to define it. If it happens, crash early!
10. Practice
• Below function:
/*!
@brief Description:
Buffer handling function.
@param pBuffer The target buffer to be processed.
@param action Action type of processing, that includes COPY,SAVE and REMOVE.
@param pFileName The target file name include full path for SAVE action.
*/
OSErr HandleTheBuffer(BYTE *pBuffer, ACTION action, BYTE *pFileName)
• ACTION is a enumerate, includes:
BUFFER_ACTION_COPY
BUFFER_ACTION_SAVE
BUFFER_ACTION_REMOVE
• Question:
– How to check every parameters?
11. Exception handling
• Basic structure
try
{
包含可能抛出异常的语句;
throw 错误 的对象
}
catch( 类型名 [ 形参名 ]) // 捕获特定类型的异常
{
}
catch( 类型名 [ 形参名 ]) // 捕获特定类型的异常
{
}
catch(...) // 三个点则表示捕获所有类型的异常
{
}
• Common Sense
– Throw an exception only for conditions that are truly exceptional.
• Similar with Assertion
– Don’t use an exception to pass the buck
• To handle the error condition locally if it is possible.
– Avoid throwing exceptions in constructors and destructors unless you
catch them in the same place.
– Consider building a centralized exception reporter.
19. Statements that must be in specific order
• Organize code so that dependencies are obvious.
• Name routines so that dependencies are obvious.
• Use routine parameters to make dependencies
obvious.
• Document unclear dependencies with comments.
• Check dependencies by assertion or error
handling code
20. Organize code
///Initialize members and start calculation
Revenue.ComputeMarketingExpense();
Revenue.ComputeSalesExpense();
Revenue.ComputeTravelExpense();
Revenue.ComputePersonnelExpense();
Revenue.DisplayExpenseSummary();
///Initialize members
Revenue.InitializeExpenseData();
///Start calculation
Revenue.ComputeMarketingExpense();
Revenue.ComputeSalesExpense();
Revenue.ComputeTravelExpense();
Revenue.ComputePersonnelExpense();
Revenue.DisplayExpenseSummary();
21. Name Routines
• Below routine will initialize member data also:
– ComputeMarketingExpense()
If change the name as below:
– ComputeMarketingExpenseAndInitializeMemberData()
Name is correct, but the routine is terrible.
23. Check dependencies
• To add one flag to indicate one specified
condition.
• Then check the flag is correct before take next
action.
• Risk: It may bring new issue!
24. Statements whose order doesn’t matter
• Making code read from Top to Bottom
– Terrible example:
• travelData.ComputeQuarterly();
• salesData.ComputeQuarterly();
• marketingData.ComputeQuarterly();
• travelData.ComputeAnnual();
• salesData.ComputeAnnual();
• marketingData.ComputeAnnual();
• salesData.Print();
• marketingData.Print();
• travelData.Print();
– Good example:
• travelData.ComputeQuarterly();
• travelData.ComputeAnnual();
• travelData.Print();
• salesData.ComputeQuarterly();
• salesData.ComputeAnnual();
• salesData.Print();
25. Statements whose order doesn’t matter
• Grouping related statements
– Closing principle
– If each statements in block has strong
dependencies, and they are independent with
other parts, grouping them in new routine will be
better.
27. Common Sense
• Principle of coding
– Correct
– Simple and Clear
– Easy for modification
• 深棋手 力之迷资 记忆
28. Plain if-then statements
• Write the nominal path through the code first; then write the
unusual cases.
• Make sure that you branch correctly on equality.
– To avoid off-by-one error.
• Put the normal case after the if rather than after the else
• Follow the if clause with a meaningful statement
– if ( condition )
– ;
– else
– {
• DoSomething();
– }
• Consider the else clause
– According GM’s survey(1976), 5 to 8 percent of if statements need else statement.
– Why you ignore the else? That needs explanation.
• Check for reversal of the if and else clauses
31. Chains of if-then-else statements
• Simplify complicated tests with boolean
function calls
• Put the most common cases first
• Make sure that all cases are covered
32. case Statements
• Choosing the most effective ordering of cases
– Order cases alphabetically or numerically
• Equally important
– Put the normal case first
– Order cases by frequency
33. Tips
• Keep the actions of each case simple
– Call routines as needed.
• Don’t make up phony variables in order to be
able to use the case statement.
• Use the default clause only to detect
legitimate defaults
• Use the default clause to detect errors
35. Selecting the kind of loop
• Need a loop that executes a specified number
of times
– To use a for loop
– If change the index value of a for loop force it to
terminate, use a while loop instead.
• Else to use a while loop.
• Reference:
– Write Solid Cod, Maguire, 1993
36. Controlling the loop
• Major principles
– 简化循环体相关连的因素(所引用的变量或数
据),判断或结束条件一定要简单。
– 循环也是另类的子程序,可以视其为 Black box.
• Entering the Loop
– Put initialization code directly before the loop
– Use while ( true ) for infinite loops
– Don’t use a for loop when a while loop is more
appropriate
38. Processing the middle of the loop
• Use { and } to enclose the statements in a loop
• Avoid empty loops
• Keep loop-housekeeping chores at either the beginning or the
end of the loop
• Make each loop perform only one function
– 可以做,但不代表 做。正 的代 不代表是好的代应该 确 码 码 !
39. Exiting the loop
• Existing loops early
– According to an article in Software Engineering Notes, the software error that
7 brought down the New York City phone systems for 9 hours on January 15,
8 1990 was due to an extra break statement (SEN 1990)
break 的分散代表逻辑上的分散,会带来维护上的风险!大量的 return 出现在函
数体,多个深层嵌套,变量中途转为它用,多处理重复功能相近的代码,都预示
者开发者的逻辑可能已经出现问题!
40. Checking endpoints
• Willingness to perform this kind of check is a key
difference between efficient and inefficient
programmers.
• How to check
– Hand calculations
– Mental simulations
– Calculate by Excel
• What are benefits?
– You understand how your code works rather than
guessing about it!
41. How long should a loop be
• Make your loops short enough to view all at
once.
• Limit nesting to three levels
• Move loop innards of long loops into routines
• Make long loops especially clear.
– Single exit.
45. Multiple returns from a routine
• Constructed programming
– Single entering and single exit
• Use a return when it enhances readability
• Use guard clauses (early returns or exits) to
simplify complex error processing
• Minimize the number of returns in each
routine
47. Recursion
• Recursion is not the best solution, it is an
iteration algorithm only.
• Tips
– Make sure the recursion stops
– Use safety counters to prevent infinite recursion
– Limit recursion to one routine
– Keep an eye on the stack
– Don’t use recursion for factorials or Fibonacci
numbers
49. Summary
• Follow control structures was a good idea:
– Unrestricted use of gotos
– Ability to compute a goto target dynamically, and jump to the
computed location
– Ability to use goto to jump from the middle of one routine into the
middle of another routine
– Ability to call a routine with a line number or label that allowed
execution to begin somewhere in the middle of the routine
– Ability to have the program generate code on the fly, then execute
the code it just wrote
• The field of software development has advanced largely through
restricting what programmers can do with their code.
50. Reference
• “Go To Statement Considered Harmful”
<<Communications of the ACM>> 11, no.3
Mar,1968 (P147-148)
Dijkstra, Edsger
52. General considerations
• Advantage:
– Simplify codes and enhance the performance
– Enhance the system customization capability.
• Weakness:
– Not everyone know it well, it may bring extra
efforts.
• Virtually anything you can select with logic
statements, you can select with tables
instead.
55. Example
static unsigned int chooseDPI(unsigned int
original_dpi, int datatype)
{
int i, d, diff, k;
static Support_Mode support_mode[] = {
{4, 0}, //support two modes
{150, 2},
{300, 3}, //300DPI with color and gray
{600, 3}, //600DPI with color and gray
{1200, 2}
};
diff = -1;
k = 1;
for (i = 1; i <= support_mode[0].dpi; ++i)
{
if (support_mode[i].support_mode & datatype)
{
d = abs(support_mode[i].dpi - original_dpi);
if (diff == -1)
{
diff = d;
k = i;
}
else
{
if (d <= diff)
{
diff = d;
k = i;
}
else
break;
}
}
}
return support_mode[k].dpi;
}
59. Forming Boolean Expressions Positively
• Not a few people don’t have not any trouble understanding a non-short
string of non-positives.
• Apply DeMorgan’s Theorems to simplify boolean tests with negatives
– if ( !displayOK || !printerOK )
– if( !( displayOK && printerOK ))
60. Using Parentheses to clarify boolean expressions
• if ( a<b == c == d)
• if ( (a<b) == ( c==d ) )
61. Common problems with Boolean Expressions
• Put constants on the left side of comparisons
• Consider creating preprocessor macro
substitutions for &&, and == (but only as a last
resort)
62. Taming dangerously deep nesting
• Factor deeply nested code into its own routine
• Use a more object-oriented approach
– Factory design model
• Summary:
• More generally, complicated code is a sign
that you don’t understand your program well
enough to make it simple.
63. Control Structure and Complexity
• The control flow is at least one of the largest
contributors to complexity, if not the largest.
• HP apply McCabe’s complexity metric, that is
helpful to improve coding quality.
• General guideline for reducing complexity
– Improve your own mental juggling abilities
– You can decrease the complexity of your programs
and the amount of concentration required to
understand them.
64. How to measure complexity
• Techniques for counting the decision points in a routine
– Start with 1 for the straight pat through the routine
– Add 1 for each of the following keywords, or their
equivalents: if while repeat for and or
– Add 1 for each case in a case statement
• Exercise
– if ( ( (status = Success ) and done) or
( not done and ( numLines >= maxLines ) ) ) then …
66. Attention to detail
• 代 是供人 的码 阅读
– The smaller part of the job of programming is writing
a program so that the computer can read it; the larger
part is writing it so that other humans can read it.
• Objectives of good layout
– Accurately represent the logical structure of the code.
– Consistently represent the logical structure of the
code
– Improve readability
– Withstand modifications
67. Major concepts
• Using only one statement per line
• Indent a comment with its corresponding
code
• Use blank lines to separate parts of a routine
• Use blank lines between paragraphs
• One class in one file