西维蜀黍

【Software Testing】Difference between Verification and Validation

Most people think verification and validation are exactly the same thing, but only different words. However, these two is not the same thing. I would like discuss both of them, especially the distinction between them.

Difference between Verification and Validation

  • Verification [Process-related]: a static practice of checking documents, design code and program

  • validation [Product-related]: a dynamic practice of validating and testing the actual product

    • validation will be done by testing
  ...


【Engineering】Data flow and Control flow

Background

A workflow can described from the control and data perspecitve respectively.

Data Flow and Control Flow

There are two types of messages: control messages and data messages, distinguished by their use at the recipients of the messages.

  • Control messages are mostly short messages that trigger state changes at the receiving services
  • Data messages are mostly large data packets that are given to the receiving services for processing.
  ...


【IoT】MQTT Protocol

Basic Idea

MQTT (Message Queuing Telemetry Transport) is a lightweight publish-subscribe-based messaging protocol.

MQTT vs HTTP

The publish/subscribe architecture which is used in MQTT is in contrast to HTTP with its request/response paradigm.

The difference to HTTP is that a client doesn’t have to pull the information it needs, but the broker pushes the information to the client, in the case there is something new. Therefore each MQTT client has a permanently open TCP connection to the broker. If this connection is interrupted by any circumstances, the MQTT broker can buffer all messages and send them to the client when it is back online.

  ...


【IoT】Node.js MQTT Demo

Setup MQTT Server

If you want to run your own MQTT broker (MQTT Server), you can use Mosquitto or Mosca, and launch it.

Take mosca as an example:

  ...


【Software Testing】Software Testing

Software Testing

A test case is a repeatable execution situation of a software system that produces recordable outcomes. A test is a particular attempt of a test case:

  • the outcomes may be expected
    • specified in advance, e.g., we expect passing 1+1 to a calculator to return 2
    • generally boolean outcoms (pass or fail)
  • the outcomes may be measurement results
    • e.g., we want to find the time it takes to compute 1+1
  • the outcomes should testify to some software quality
    • e.g., correctness, but also efficiency, usability, etc
  ...


【Engineering】Software Quality

Defect

A defect in a software system is a quality level that is not acceptable.

Quality levels need to be elicited and negotiated.

  ...


【OOP】Kind of Relations in OOP

  1. Is A (Inheritence)
  2. Has A (Composition)
  3. Works With (Collaboration)

Is A (Inheritence)

In object-oriented programming, the concept of IS-A is a totally based on Inheritance, which can be of two types Class Inheritance or Interface Inheritance.

It is just like saying “A is a B type of thing”. For example, Apple is a Fruit, Car is a Vehicle, etc. Inheritance is uni-directional. For example, House is a Building. But Building is not a House.

It is a key point to note that you can easily identify an IS-A relationship. Wherever you see an extends keyword or implements keyword in a class declaration, then this class is said to have IS-A relationship.

  ...


【Database】Relationship between Tables

Relationship

One-to-one relationship

In a one-to-one relationship, one record in a table is associated with one and only one record in another table. For example, in a school database, each student has only one student ID, and each student ID is assigned to only one person.

  ...


【XML】XML Schema

A Reference to an XML Schema

This XML document has a reference to an XML Schema:

<?xml version="1.0"?>

<note
xmlns="https://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.w3schools.com/xml/note.xsd">
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>
  ...


【XQuery】Learning XQuery

XQuery is About Querying XML

XQuery is a language for finding and extracting elements and attributes from XML documents.

Here is an example of what XQuery could solve:

“Select all CD records with a price less than $10 from the CD collection stored in cd_catalog.xml”

XQuery for XML is like SQL for databases.

  ...