test

How to trigger WP-Cron from crontab in WordPress

WordPress cron is a process that runs each time a user visits a website. It triggers the tasks that are due to run and schedules the new ones. Wp-cron is an important feature to have. It publishes posts that are scheduled to be published at given times. It triggers important background events like check for updates, send planned emails and others.

Java quiz: Object Orientation

1. What is encapsulation:
a) the ability to make changes in your implementation without breaking the code of others
b) keep instance variables accessible foe everyone
c) create getters and setters rather then give direct access to instance variables

Java quiz: Declarations and Access

1. What is a Java program?
a) A collection of classes
b) A collection of objects talking to other objects by invoking each others methods
c) A template that describes the kinds of state and behavior that objects of its type support

2. Java components are:
a) types
b) classes
c) variables
d) objects
e) instances
f) methods

Sphere vs AABB collision detection test

As the sphere is being the simplest primitive there is, the test for Sphere and AABB intersection is easy. This solution works also for Sphere Cube intersection tests.

Performance testing in C++

While developing a message-driven system we’ve come to a problem of what type of object creation/destruction uses less system resources: stack or heap. And although you maybe know the answer it’s always interesting to measure to be sure. We’ve done it with the help of unit-testing.

Clean code

The book by Robert C. Martin “Clean Code” is a really very useful material for all programmers. You can disagree with him sometimes (as I do), but it still provides some useful notes that helped me to place my programmer experience and knowledge where they belong. Here I’ll provide some key notes that I did while reading the book and that I’d like to memorize.

Java test with JUnit

Software testing is a powerful tool when creating all types of applications. That’s why it is also so important to test it in details so that a chance of an unexpected fail is minimal. We say it so: all code you write must be tested with minimum 2 types of tests: positive and negative. A positive test is a test that verifies a correct functionality, a negative test verifies that a function will fail or throw an exception. Let’s see how it works.