Urnik – varno programiranje – odmor – napredno razhroščevanje Cilj: v prvem delu vsakomur dati vsaj eno dobro.

Slides:



Advertisements
Similar presentations
Jim McKeeth | Podcast at Delphi.org
Advertisements

The eCos real-time operating system an open source tool to create embedded kernels and applications.
Software Engineering and Design Principles Chapter 1.
Review Amit Shabtay. March 3rd, 2004 Object Oriented Design Course 2 Review What have we done during the course? Where to learn more? What is for the.
OOP #10: Correctness Fritz Henglein. Wrap-up: Types A type is a collection of objects with common behavior (operations and properties). (Abstract) types.
Review David Rabinowitz. March 3rd, 2004 Object Oriented Design Course 2 Review What have we done during the course? Which topics we have not discussed?
Adding Contracts to Ada Ehud Lamm Adding Design By Contract to Ada.
CZ Biz. Auto. System & Test-Driven Development Teoman Soygul (Sept 24, 2012).
Computer Science 340 Software Design & Testing Design By Contract.
Miha Pihler MCSA, MCSE, MCT, CISSP, Microsoft MVP
1 Software Construction and Evolution - CSSE 375 Exception Handling – Logging & Special Situations Steve Chenoweth Office: Moench Room F220 Phone: (812)
Debugging. 2 © 2003, Espirity Inc. Module Road Map 1.Eclipse Debugging  Debug Perspective  Debug Session  Breakpoint  Debug Views  Breakpoint Types.
Introduction to SOLID Principles. Background Dependency Inversion Principle Single Responsibility Principle Open/Closed Principle Liskov Substitution.
The benefits of SOLID in software development Ruben Agudo Santos (GS-AIS-HR)
Refactoring for Testability (or how I learned to stop worrying and love failing tests) Presented by Aaron Evans.
Pre- and postconditions, Using assertions and exceptions 1 Pre- and postconditions Using assertions and exceptions.
Uvod v C# Drugi del. Dedovanje Sintaksa Prirejanje in preverjanje tipov.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 11 – gdb and Debugging.
Five design principles
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 What we'll cover here l Using the debugger: Starting the debugger Setting.
PRINCIPLES OF OBJECT ORIENTED DESIGN S.O.L.I.D. S.O.L.I.D Principles What is SOLID?  Acrostic of 5 Principles:  The Single Responsibility Principle.
SOLID Design Principles
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
BASICS OF CODE DESIGN.  Modular  Reusable  Easy to Read  Maintainable  Testable  Easy to Change  Easy to Understand THE GOAL.
Design by Contract. The Goal Ensure the correctness of our software (correctness) Recover when it is not correct anyway (robustness) Correctness: Assertions.
Microsoft Advertising 16:9 Template Light Use the slides below to start the design of your presentation. Additional slides layouts (title slides, tile.
Beginning Software Craftsmanship Brendan Enrick Steve Smith
Design I. Properties of good design Minimize complexity Maintainable Loose coupling Extensibility Reusability High fan in Low to medium fan out Portability.
Debugging using By: Samuel Ashby. What is debugging?  A bug is an error in either a program or the hardware itself.  Debugging is first locating and.
Implementation Topics Describe –Characteristics of good implementations –Best practices to achieve them Understand role of comments Learn debugging techniques.
Mantas Radzevičius ifm-2/2
CSE 374 Programming Concepts & Tools
CSE687 - Object Oriented Design class notes Survey of the C++ Programming Language Jim Fawcett Spring 2004.
Debugging CMSC 202.
CSE 143 Error Handling [Section 2.8] 3/30/98 CSE 143.
object oriented Principles of software design
Defensive Programming for Better Future
Contest strategy.
Debugging Techniques.
Unleash the power of Delphi debugger
How to be a Good Developer
Levels of Software Assurance in SPARK
Uvod v Python
Defensive Programming for Better Future
Grafični vmesnik - GUI Izdelava obrazca: lastnosti, odzivne metode
Embarcadero Akademija 2017: RAD Studio in Linux
Software Engineering in the Academy
Advanced Debugging in Delphi
Urnik – zahteve, namestitev, NextGen Delphi, FM3, prilagodljivo oblikovanje, tipkovnica, sporočila, deljenje podatkov, zvok in slika
11/29/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Ugani število Napišimo program, ki si “izmisli” naključno število, potem pa nas v zanki sprašuje, katero je izmišljeno število. Če število uganemo, nas.
Urnik – Unit testing, TDD DUnit, DUnit2, DUnitX, TestInsight – odmor – Unit testing v resničnem svetu, mocking.
in osnove programa Microsoft Access
Informacijska varnost v Oracle okolju
Defining and Calling a Macro
Semantics In Text: Chapter 3.
Introduction to Testing and Maintainable code
GNU DEBUGGER TOOL. What is the GDB ? GNU Debugger It Works for several languages – including C/C++ [Assembly, Fortran,Go,Objective-C,Pascal]
  30 A 30 B 30 C 30 D 30 E 77 TOTALS ORIGINAL COUNT CURRENT COUNT
Divisors , factors and Multiples
A (partial) blueprint for dealing with change
European conference.
Object Oriented Design & Analysis
Dependency Inversion principle
Some principles for object oriented design
Programming Languages 2nd edition Tucker and Noonan
Music and Audio Computing I A
ERROR HANDLING AND DEBUGGING
Unit Testing.
Design Contracts and Errors A Software Development Strategy
Presentation transcript:

Urnik 09.00 – 10.30 varno programiranje 10.30 – 11.00 odmor 11.00 – 12.30 napredno razhroščevanje Cilj: v prvem delu vsakomur dati vsaj eno dobro idejo, v drugem delu vsakemu pokazati vsaj nekaj novega.

Varno programiranje

Varno programiranje Razumljiva koda Kvalitetna koda Kratke metode, jasen namen, (samo)dokumentiranost, lokalnost podatkov, dobra imena Kvalitetna koda DRY, SOLID Preverjanje rezultatov (sistemskih funkcij) Misel na prihodnost („future-proofing“) Design by Contract

Slaba koda Dobra koda

Preglednost Pomožne spremenljivke Enumeratorji Orodja za refaktorizacijo Enumeratorji

Preverjanje vhodnih podatkov Statične shrambe podatkov Statična polja GetMem Move

Enumerirani tipi Case <enum> … else If <num> … else For … Low() to High()

Preverjanje rezultatov funkcij Sistemski klici!

Ustvari/uniči Create/Destroy GetMem/FreeMem Lock/Unlock Acquire/Release Try/finally

Izjeme  Sporočanje izjemnih primerov  Sporočanje pričakovanega rezultata Ni očitno, katere izjeme lahko pričakujemo  try … except end On Error Resume Next

Exception Loggers EurekaLog madExcept JclDebug

Design by Contract Preconditions Postconditions Invariante Testiramo na začetku metode Postconditions Testiramo na koncu metode Invariante Assert / raise

Pozor, nevarnost! Goto With

Metodologije DRY SOLID Don‘t Repeat Yourself Single responsibility principle Open/closed principle Liskov substitution principle Interface segregation principle Dependency inversion principle

Statična analiza FixInsight

Napredno razhroščevanje

Nastavitve Project, Options Tools, Options Delphi Compiler, Compiling Optimization Stack frames Debug information Use debug .dcu‘s Tools, Options Debugger Options General Event log

Lastnosti prekinitev Enabled Condition Pass count Thread

Stranski učinki Izpis informacij Izpis sklada izvajanja

Skupine prekinitev Vklop/izklop Ročno Kot stranski učinek

Izjeme Lokalno Globalno Stranski učinek prekinitev Tools, Options Debugger Options, Embarcadero Debuggers, Language Exceptions

Strojno podprte prekinitve Naslovne Izvajanje vrstice Podatkovne Zapisovanje podatkov Omejeno število Onemogočene ob vsakem začetku

Majhni triki Premikanje točke izvajanja Prekinitve na skladu izvajanja Vrnitev iz metode

Prikaz podatkov Oblikovanje v oknu Evaluate/Modify Organiziranje v skupine

Optimizator je lahko v napoto DontOptimize

Vprašanja?