Spring Security caching issue

I just did some awesome optimizations for AgroGo. One of them was related to a strange behavior in Spring Security. By default, anything that's protected by Spring Security is sent to the browser with the  "Cache-Control: no-cache, no-store, max-age=0" header parameter causing the browser to reload all files on every request. This is bad for various reasons … Continue reading Spring Security caching issue

Ten Programming Commandments

1. Thou shalt write correct and maintainable code. When writing code your priority should be to write correct and maintainable code. If your code is not according to the specifications it is useless. Also, your code must be easily understandable by other programmers, must follow coding conventions. Code must be structured in such a manner that … Continue reading Ten Programming Commandments

C++: Using Smart Pointers with Arrays

The modern C++ standard libraries, includes smart pointers, which are used to help ensure that programs are free of memory and resource leaks and are exception-safe. All good and sweet, but these structures have a dark little secret. You may ask yourself how do smart pointers choose between delete and delete[] when deleting the managed … Continue reading C++: Using Smart Pointers with Arrays

Programming Tips: Avoid NULL values

One way to make your code simpler and avoid potential bugs is by avoiding NULL values when possible. Usually you won't have a significant performance overhead doing this.  By not returning null values you eliminate null pointer exceptions and also you simplify your code by eliminating the null checks. Example 1 Simplify your code by … Continue reading Programming Tips: Avoid NULL values