Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
SOFTWARE
DEVELOPMENT
FUNDAMENTALS
by: A.J. Grandeza, Co-founder Lean Agenda
Topics
1. About Lean Agenda
2. About the Speaker
3. Expectations
4. Core Programming – the basics
5. Object Oriented Princ...
The Lean Agenda
• A branch of Lean Consulting PH
• We aim to narrow the gap between school knowledge and industry
expectat...
About Me
• Graduate of Ateneo de Davao, Computer Science 2012
• Over 5 years of software engineering experience, .NET and ...
What to expect
• Programming Language: C#
• Only fundamentals will be discussed
• Not your typical what-is-a and this-is-a...
What I except from you
• Your attention
• Questions!
• You have at least little knowledge on programming
 Because we won’...
Core Programming – the basics
• What is a variable?
 Holds a value temporarily in a computer memory
• What is a constant?...
Core Programming – Data types
Why is it important to know the data type?
In simple terms…
Variable – is the container
Data type – is the type of container
Do you want to put cookies in a tumbler?...
Well, technically...
• Using the correct data type will save space – in memory, only use what you
need
 You don’t need to...
Double vs Float vs Decimal
• Precision is the main difference
• Float: 7 digits
• Double: 15-16 digits
 Both are floating...
Core Programming – Data structures
• Arrays
• Dictionaries
Arrays
• A collection of variables
• C# arrays are zero indexed
Dictionaries
• A collection of objects that are accessed by using a key
• Use dictionary if your indexes have a special me...
Core Programming - Decision Making
• If, if-else, if-else-if VS Switch
• Switch is faster (a little)
 However, this is ju...
Core Programming - Repetition
• For
• While
• Do while
When to use for loop?
• you can run a statement or a block of statements repeatedly until a specified
expression evaluates...
When to use while?
• executes a statement or a block of statements until a specified expression
evaluates to false.
• When...
When to use do-while
• Almost the same with while BUT is executed one time before the conditional
expression is evaluated
...
Core Programming – Exception Handling
• What is an exception?
 An exception is a problem that arises during the execution...
Core Programming – Exception Handling
• A try-catch structure doesn’t prevent the exception from being thrown, it
simply g...
Object Oriented - Principles
• What is OOP?
 Is a programming paradigm based on objects
• Is it useful? Why?
 Code reusa...
Classes
• Can be reused
• It’s like a blueprint
• Includes attributes and behaviour
Abstraction
• Exposing essential feature
• Hides irrelevant detail
• Process of identifying common patterns that have syst...
Encapsulation
• Hide implementation details
• Creates a black box
• Behaviour can be exposed through interfaces
• Data mem...
Inheritance
• Data & behaviour taken from another class
• Concept of super and sub class
• Provides base functionality for...
Polymorphism
• Poly = multiple
• Morph = to change
• Polymorphism = multiple forms or changes
• Behaviour change
• Virtual...
Abstract Class VS Interfaces
• Abstract class
 Cannot be instantiated
 Must be inherited from
 May be fully implemented...
Abstract Class VS Interfaces
• Interface
 Totally abstract set of members
 No implementation, contains only signatures
...
S.O.L.I.D. Principles
• What is S.O.L.I.D. ?
• Basic principles which help you create good software architecture
• Acronym...
Single Responsibility Principle
• A class should have one responsibility only
• Separation of concern
• A class is not a s...
Open Closed Principle
• Should be open for extension but closed for modification
• Demo
Liskov Substitution Principle
• objects in a program should be replaceable with instances of their subtypes
without alteri...
Interface Segregation Principle
• many client-specific interfaces are better than one general-purpose interface
• Demo
Dependency Inversion Principle
• Depend on abstractions, not on concretions
• Demo
What to expect in the real world
• “If you think teachers are tough, wait till you get a boss” – Bill Gates
• Do not expec...
What to learn & how to improve
• If you’re a beginner, master one programming language
• After, strategically choose anoth...
Any questions?
• “ Any fool can write code that a
computer can understand. Good
programmers write code that humans
can understand. ” - Ma...
References
• http://stackoverflow.com/questions/618535/difference-between-decimal-float-and-double-in-net
• https://msdn.m...
Upcoming SlideShare
Loading in …5
×

Software development fundamentals

365 views

Published on

Lean Agenda's Software Development Fundamentals

Demo source codes can be found here
https://github.com/grandezaaj/SDF

Published in: Software
  • Be the first to comment

  • Be the first to like this

Software development fundamentals

  1. 1. SOFTWARE DEVELOPMENT FUNDAMENTALS by: A.J. Grandeza, Co-founder Lean Agenda
  2. 2. Topics 1. About Lean Agenda 2. About the Speaker 3. Expectations 4. Core Programming – the basics 5. Object Oriented Principles – the essentials 6. S.O.L.I.D. Principles 7. Industry needs and expectations AND TIPS!
  3. 3. The Lean Agenda • A branch of Lean Consulting PH • We aim to narrow the gap between school knowledge and industry expectations • Prepare and educate people on the 21st century skills
  4. 4. About Me • Graduate of Ateneo de Davao, Computer Science 2012 • Over 5 years of software engineering experience, .NET and AngularJS • Co-founder/CTO of T.H.E. Patrons (ex-CTO) • Co-founder of Lean Consulting, Lean Agenda • Microsoft Technology Associate • I LIKE TO LEARN!
  5. 5. What to expect • Programming Language: C# • Only fundamentals will be discussed • Not your typical what-is-a and this-is-a discussion • Feel free to ask • Feel free to correct the speaker • Feel free to add • Learn something new!
  6. 6. What I except from you • Your attention • Questions! • You have at least little knowledge on programming  Because we won’t just be discussing definitions  We will have a why-when type of discussion
  7. 7. Core Programming – the basics • What is a variable?  Holds a value temporarily in a computer memory • What is a constant?  Same as variable BUT cannot be changed on runtime or during program execution • What is a data type?  Classification of the type of a data – Integer, Boolean
  8. 8. Core Programming – Data types
  9. 9. Why is it important to know the data type?
  10. 10. In simple terms… Variable – is the container Data type – is the type of container Do you want to put cookies in a tumbler? No!
  11. 11. Well, technically... • Using the correct data type will save space – in memory, only use what you need  You don’t need to use int for “Age”. Nobody gets 2,147,483,647 years old • Because you won’t be able to multiply a string… 2 * “2” • It is an implementation detail
  12. 12. Double vs Float vs Decimal • Precision is the main difference • Float: 7 digits • Double: 15-16 digits  Both are floating binary point types  Faster than decimal • Decimal: 28-29 digits  Floating decimal point types  Mainly used in financial solutions  Slower than the other 2
  13. 13. Core Programming – Data structures • Arrays • Dictionaries
  14. 14. Arrays • A collection of variables • C# arrays are zero indexed
  15. 15. Dictionaries • A collection of objects that are accessed by using a key • Use dictionary if your indexes have a special meaning besides just positional placement
  16. 16. Core Programming - Decision Making • If, if-else, if-else-if VS Switch • Switch is faster (a little)  However, this is just a micro-optimization • Switch is more readable • Use switch if you have many items, if-else if fewer
  17. 17. Core Programming - Repetition • For • While • Do while
  18. 18. When to use for loop? • you can run a statement or a block of statements repeatedly until a specified expression evaluates to false • Useful for arrays • When the number of times is known before hand • Example: Displaying all data in a list
  19. 19. When to use while? • executes a statement or a block of statements until a specified expression evaluates to false. • When the number of times is NOT known before hand • Example: when your program is waiting for a form to be completed, it will not save the form
  20. 20. When to use do-while • Almost the same with while BUT is executed one time before the conditional expression is evaluated • When the number of times is NOT known before hand AND you want to make sure it will be executed at least once • Example: Display a question, and if the answer is correct move on to the next question.
  21. 21. Core Programming – Exception Handling • What is an exception?  An exception is a problem that arises during the execution of a program. • Try  identifies a block of code for which particular exceptions is activated • Catch  the place in a program where you want to handle the problem • Finally  is used to execute a given set of statements, whether an exception is thrown or not thrown • Throw  is used to signal the occurrence of an anomalous situation (exception) during the program execution
  22. 22. Core Programming – Exception Handling • A try-catch structure doesn’t prevent the exception from being thrown, it simply gives the developer a chance to keep the program from crashing. • When to use?  When you are trying to do something that may not work • When not to use?  To hide problems happening in your code • Demo
  23. 23. Object Oriented - Principles • What is OOP?  Is a programming paradigm based on objects • Is it useful? Why?  Code reusability  Provides clear modular structure for programs  Software components can be easily adapted and modified • What are its disadvantages?  Over complication  Complexity in understanding “established” code – especially for beginners  Prone to code spaghetti
  24. 24. Classes • Can be reused • It’s like a blueprint • Includes attributes and behaviour
  25. 25. Abstraction • Exposing essential feature • Hides irrelevant detail • Process of identifying common patterns that have systematic variations
  26. 26. Encapsulation • Hide implementation details • Creates a black box • Behaviour can be exposed through interfaces • Data members cannot be directly changed • Encapsulation is implemented by using access specifiers  Private  Public  Protected  Internal  Protected Internal
  27. 27. Inheritance • Data & behaviour taken from another class • Concept of super and sub class • Provides base functionality for similar objects • Allows for code re-use • Use the “is-a” test if it’s appropriate to use
  28. 28. Polymorphism • Poly = multiple • Morph = to change • Polymorphism = multiple forms or changes • Behaviour change • Virtual methods and overriding
  29. 29. Abstract Class VS Interfaces • Abstract class  Cannot be instantiated  Must be inherited from  May be fully implemented, partially implemented or not implemented at all • Why do we need abstract classes?  To provide some sort of default functionality  Affects all derived classes if there are changes on the base class
  30. 30. Abstract Class VS Interfaces • Interface  Totally abstract set of members  No implementation, contains only signatures  Represents a contract  In real world, a medium to interact with something • Why do we need Interfaces?  Multiple inheritance support  Used in service contracts  Loose coupling  Modularity
  31. 31. S.O.L.I.D. Principles • What is S.O.L.I.D. ? • Basic principles which help you create good software architecture • Acronym for  Single Responsibility Principle  Open Closed Principle  Liskov Substitution Principle  Interface Segregation Principle  Dependency Inversion Principle
  32. 32. Single Responsibility Principle • A class should have one responsibility only • Separation of concern • A class is not a swiss knife • Demo
  33. 33. Open Closed Principle • Should be open for extension but closed for modification • Demo
  34. 34. Liskov Substitution Principle • objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program • Demo
  35. 35. Interface Segregation Principle • many client-specific interfaces are better than one general-purpose interface • Demo
  36. 36. Dependency Inversion Principle • Depend on abstractions, not on concretions • Demo
  37. 37. What to expect in the real world • “If you think teachers are tough, wait till you get a boss” – Bill Gates • Do not expect any training • Be ready to read, read and read • If you get bored easily on tedious work, programming is for you!
  38. 38. What to learn & how to improve • If you’re a beginner, master one programming language • After, strategically choose another language • Master SQL. Everything is all about data. • Learn Version Control, it’ll save a lot of time and plus points on applying for work! • Constantly challenge yourself • Join GitHub, StackOverflow • Don’t be lazy, always follow best practices until it becomes a habit • Constantly learn new things • Always ask why
  39. 39. Any questions?
  40. 40. • “ Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ” - Martin Fowler
  41. 41. References • http://stackoverflow.com/questions/618535/difference-between-decimal-float-and-double-in-net • https://msdn.microsoft.com/en-us/library/cs7y5x0x%28v=vs.90%29.aspx • http://csharpindepth.com/Articles/General/FloatingPoint.aspx • https://msdn.microsoft.com/en-us/library/aa288453(v=vs.71).aspx • http://programmers.stackexchange.com/questions/139052/dictionary-vs-list • https://msdn.microsoft.com/en-us/library/ch45axte.aspx • http://wiki.tcl.tk/13398 • https://standardofnorms.wordpress.com/2012/09/02/4-pillars-of-object-oriented-programming/ • http://www.c-sharpcorner.com/UploadFile/d0e913/abstract-class-interface-two-villains-of-every-interview/ • http://www.c-sharpcorner.com/UploadFile/d0e913/abstract-class-interface-two-villains-of-every-interview756/ • http://www.c-sharpcorner.com/UploadFile/yusufkaratoprak/difference-between-loose-coupling-and-tight-coupling/ • http://www.codeproject.com/Articles/703634/SOLID-architecture-principles-using-simple-Csharp

×