• 10 Software Project Quality Factors

    Code review Code review for every change that is introduced into the codebase should be a core principle followed by us all. Version control It doesn’t matter which VCS you use but every project should be under version control. Development Environment Every repository should contain a readme with one command...

  • The Law Of Demeter

    The law of demeter states a module should not know about the innards of the objects it manipulates. More precisely, the LoD states that a method m of class C should only call methods of: C An object created by m An object passed as a argument to m An...

  • Starting a Django Project and App

    Create project environment Python’s venv module allows creation of lightweight virtual environments. These are isolated working copies of Python which allow you to work on a specific project without affecting others. We start by creating a venv using the following command. python3 -m venv [environment-name] Activate virtual environment We can...

  • OWASP Security Top 10

    10. Unvalidated Redirects and Forwards The result of accepting untrusted input. An example could be a phishing scam using an unvalidated url to redirect to a malicious website example.com/login.php?redirect=malicious.example.com. 9. Insufficient Transport Layer Security Use up to date TLS. 8. Cross Site Request Forgery (CSRF) You’re logged into PayPal. Another...

  • Java Collections Overview

    The Java collections framework is a set of implementations of common data structures. A collection is an object that can hold references to other objects. Set List Map HashSet ArrayList HashMap LinkedHashSet LinkedList LinkedHashMap TreeSet Vector HashTable     TreeMap ArrayList Allows duplicates ordered by index. Offers consistent time for...

  • SOLID Principles

    Single Responsibility Methods, classes, modules etc should have only one reason to change. They should have one Responsibility and that should be entirely encapsulated in the class. Open/Closed Code should be open for extension but closed for modification. It should be easy to change the functionality of a class without...

  • Encapsulation in Object Oriented Programming

    Encapsulation is an Object Oriented Programming concept that binds together data and functions that manipulate that data to keep it safe from outside interference from client code. Information Hiding Information or data hiding is an important concept in Encapsulation. It’s often interpreted as being about hiding fields and using getters...

  • Useful but rarely used bash commands

    This is a list of bash commands I’ve found really useful but have only needed rarely so I’m recording these here for future reference.   Search and replace over multiple files find . -type f -exec sed -i ‘s/old/new/g’ {} \; Tidy / format XML file tidy -xml -i -o...