"I am not afraid of a person who knows 10000 kicks. But I am afraid of a person who knows one kick but practices it for 10000 times." - Bruce Lee
- Introduction to Computer Programming
- Object Oriented Programming
- Algorithms
- Data Structures
- Design patterns
- SOLID
- ADO .NET
- Git Simple Pull Request
- Computational Methods
- Misc
- To Do List
- Notes
- Assignments 1 (Read input from keyboard, casting variables, elementary loops)
- Assignments 2 (Proper input verification, conditional statements [if, switch, ternary operator], sorting network)
- Assignments 3 (Enums, string to enum parse, menu using enum, switch statement, stringbuilder, random)
- Assignments 4 (Arrays, bubble sort, sieve of eratosthenes, tic-tac-toe console game)
- Assignments 5 (Structs, reccursive functions, tic-tac-toc class segragation)
- Assignments 5 Library (Creating of class libraries, make reference to them in entry point project and execute)
- Assignments 6 (Writing to files, reading from files, nested loops, date-time, creating folders, value tuples)
- Assignments 7 (NUnit tests [exception test], documentation, custom exceptions)
Refer to https://kolosovpetro.github.io/cs/oop/
- OOP1 (Encapsulation, getters, setters, access modifiers)
- OOP2 (Constructors, constructor flow, this reference)
- OOP3 (Inheritance, overriding, base keyword, polymorphism, upcast)
- Lecture: https://kolosovpetro.github.io/cs/oop/OOP_CS_03.pdf
- Tasks: https://kolosovpetro.github.io/cs/oop/exercises/Task3.pdf
- Polymorphism types: Ad-Hoc (overload of methods), Parametrical (Generics), Subtype polymorphism (Upcast, downcast)
- OOP4 (Interfaces, implementations)
- Project (Hospital management application, WinForms). Contains all OOP techniques + binary serialization in use
- Aggregation vs Composition. Definitions and comparisons.
- Operator overriding
- Converters (Downcast)
Refer to https://kolosovpetro.github.io/cs/data_structures_and_algorithms/
- Search Algorithms (and their benchmark measurement)
- Linear Searches
- Binary Search
- Sort Algorithms
- Bubble sort O(n^2)
- Cocktail sort (Buble 2 pass sort) O(n^2)
- Counting sort O(n+k), k = non negative terms count
- Insertion sort O(n)
- Merge sort O(n*log(n))
- Quick sort O(log(n))
- Selection sort O(n^2)
- Coin Change Problem (Intro to Dynamic programming)
- RPN Calculator (postfix calculator based on stack data structure)
-
Implemented data structures are
- Dictionary
- Graph
- Heap
- LinkedList
- Queue
- Stack
- Tree
- Weighted Graph
- Binary Search Tree (in progress. See good visualization: http://btv.melezinek.cz/binary-search-tree.html)
- Generic List (in progress)
-
To be implemented in future
- Priority Queue
-
What's used
- NUnit UnitTest Framework
- Generics
- Indexers
- IEnumerable interface implementation
Refer to website: https://refactoring.guru/design-patterns
- Creational
- Factory Method (Extends functionality of program)
- Abstract Factory
- Builder (Avoiding huge number of parameters withing object's consturctor. Combination of parameters.)
- Prototype (Deepcopy of class)
- Structural
- Decorator (Combines required functionalities)
- Bridge
- Behavioral
- Observer (Defines interaction between two or more classes)
- Strategy (Extends functionality of program)
A set of principles recommended to follow in order to maintain business applications. Contains examples of both convinient and unconviniet examples
- Single Responsibility Principle -
Do one thing, but do it best - Open-Closed Principle -
App. should be open for extension, but closed for modification. Usually, solved by patternStrategy - Liskov Substitution Principle -
Proper abstractization, where all subclasses correctly implements methods from base class - Interface Segregation Principle -
Clients should not be forced to depend upon interfaces that they do not use. - Dependency Inversion Principle
High-level modules should not depend on low-level modules. Both should depend on abstractions.Abstractions should not depend on details. Details should depend on abstractions.
Work in PostgreSQL data base through ADO .NET
Refer to https://kolosovpetro.github.io/cs/data_bases_2/01_NpgSQL.pdf
Notes
- Query which reterns data:
ExecuteReader() - DML DDL :
ExecuteNonQuery() - SQL injection protect:
Parameters.AddWithValue("param", var); - While using
Parametersdo not use place variable between'', eg dont do'@var'
Example of simple pull request and other related activities.
Contains
- Simple pull request guide
- How to untrack files from gitignore (apply gitignore file)
- How to keep forked repo up to date with remote
Visit: https://github.com/kolosovpetro/Computer-Science/tree/develop/Simple%20Pull%20Request
- Numerical Sys. Converter (Pure example how to break all SOLID rules in 1 class, DO NOT WRITE CODE THIS WAY)
- System of Linear Equations Solver
- Polynomial Interpolation (Vandermonde method)
- Discrete Integration (Simpson's, Trapezoidal methods)
- Monte Carlo Method (Estimation on the plan finishing time)
Other projects.
- Database Control Panel. Simple winforms app in order to perform SQL queries on PostgreSQL Database. Not protected from SQL injections.
- LINQ. A set of custom methods in order to operate over IEnumerable collections.
- Unite all Data Structures under single library
- Write documentation and comments for Design Patterns
- For all design patterns generate class diagrams
- Write various extensions for IEnumerable, structs, classes
- Add README files to various projects
- Praparation to MS Exam 70-483: https://habr.com/ru/post/245067/
- Complete
C#guide: https://metanit.com/sharp/
-
Values vs Reference type: In oder to modify reference type (e.g
class) via method it is enought tostatic void Modify(int[] a) { a[0] = 5; }However, in case of value types (e.g
structs) method variable should be supplies withrefkeyword in order to modify entire variablestatic void Modify(ref int a) { a = 5; } -
In order to work with class library, all its classes must have acessor
public. E.gpublic class1 { }. -
Constant fields
constarestaticand cannot be acessed usingthisreference. -
Single responsibility principlecan be threaten as partial case ofInterface segragation principle, where current class implements only one interface. -
In case of useage of
Inherritanceit is essentially important to followLiskov Substitution Principlein abstract design.