PHPNews

Lazy Loading and Caching via Sticky Cactoos Primitives

Written by Yegor Bugayenko - Published on Yegor Bugayenko
Aggregated on Tuesday October 17, 2017 - Permalink

You obviously know what lazy loading is, right? And you no doubt know about caching . To my knowledge, there is no elegant way in Java to implement either of them. Here is what I found out for myself with the help of Cactoos primitives. Reality (2012) by Matteo Garrone Let's say we need an object that will encrypt some text. Speaking in a more object-oriented way, it will encapsulate the …

Continue reading »


Streams vs. Decorators

Written by Yegor Bugayenko - Published on Yegor Bugayenko
Aggregated on Tuesday October 10, 2017 - Permalink

The Streams API was introduced in Java 8, together with lambda expressions , just a few years ago. I, as a disciplined Java adept, tried to use this new feature in a few of my projects, for example here and here . I didn't really like it and went back to good old decorators. Moreover, I created Cactoos , a library of decorators, to replace Guava , which is not so good in so many places. …

Continue reading »


Java 9: The Good, The Bad, and Private Interface Methods

Written by Yegor Bugayenko - Published on Yegor Bugayenko
Aggregated on Tuesday October 3, 2017 - Permalink

Java 9 was released a few weeks ago. Check the release notes , they include many interesting features. However, I think that not everything is as good as Oracle and Java adepts seem to picture it . I see three trends in the Java world, which are good, bad, and ugly, respectively. Let's start with the good one. Birdman (2014) by Alejandro G. Iñárritu The Platform The first trend is an …

Continue reading »


ThreeCopies.com—Server-Side Data Backup Service

Written by Yegor Bugayenko - Published on Yegor Bugayenko
Aggregated on Tuesday September 26, 2017 - Permalink

I have a number of data resources which exist in one place only and which I don't really want to lose. For example, I have a hosted PHP website, and a MySQL database hosted at the same place. I also have a NoSQL database at Amazon DynamoDB, a PostgreSQL database at Heroku, and also... Well, there are many of them. How to back them up was always a question for me. The most straightforward …

Continue reading »


What Motivates Me as a Programmer

Written by Yegor Bugayenko - Published on Yegor Bugayenko
Aggregated on Tuesday September 19, 2017 - Permalink

I wrote a number of sarcastic articles about management and motivation, where some traditional and very popular practices were criticized. Now I've decided to think it all over and summarize what actually motivates me as a programmer when I'm working for someone else. Let's say you hire me tomorrow as a Java coder and ask "What do you want us to do for you so that you will be most productive?…

Continue reading »