December 11 2017, 00:58

To win an election, you don’t need a majority. It’s enough to have a carefully selected minority that influences groups of people, together forming a majority. The simplest and repeatedly tested method of influence is to ensure dependency on the aforementioned minority. From financial dependency to involvement in illegal activities. If people have something to lose, they are in the game. Even a slight dependency is enough to make the dependents vote in unison with the mentioned minority. And yes, it needs to be a pyramid, as the country is large. Such a scheme can only fail due to poor organization and/or insufficient resources to build an effective network of influence.

December 10 2017, 20:10

For friends about #hybris: Sharing useful Groovy scripts that I frequently use at work. Today I am sharing my script for creating a database query, where you only input the type, and it does everything else by itself: joins related tables, selects a list of attributes, etc. In Hybris, atop the database, there is a special ORM layer where the database table analog is “itemtype”. So, to extract all the useful data (for reconciliation purposes, for example), you need to write a bulky query. To make it easier to write, here I’ve drafted a little script that generates it. You can find usage examples via the link.

https://hybrismart.com/2017/12/08/useful-groovy-scripts-flexible-search-query-generator-for-any-type/

December 08 2017, 22:42

A very solidly crafted semi-documentary film about Heisenberg and his atomic theory. Along the way, there are some strange inaccuracies, like “Einstein received the Nobel Prize for the theory of relativity” (18:19). But overall, it’s very accessible even for younger schoolchildren, and very interesting. I do not highly recommend it if you are knowledgeable in the subject (it might be amusing at times), but it is perfect for children. However, for the uninitiated, the historical aspect can be intriguing; for me, there was almost 100% new information.

This is a series of six films. Probably all six are decent (haven’t watched the others).

https://www.youtube.com/watch?v=Qz8yCr8liM8

December 07 2017, 16:15

The neural network AlphaZero, owned by Goggle, after being fed only the rules, surpassed not only humans and their 1500 years of experience in chess but also all existing computer programs, including the strongest competitor, Stockfish, after playing against itself for 4 hours.

As one of the founders of DeepMind states, we had long reconciled with the fact that computers are stronger than us in chess, however, it was comforting that the programs which were beating us utilized human ingenuity and experience; now, this has changed.

https://www.chess.com/ru/news/view/alphazero-novyi-proiekt-google-ghromit-stockfish-v-matchie-iz-100-partii

December 05 2017, 01:43

Over the weekend, Liza and I visited Annapolis, to the US Naval Academy (USNA). The entrance is free for everyone, you only need to have an ID.

The most interesting part was visiting the academy buildings. Some places had signs saying “No visitors authorized beyond this point”. Of course, we followed the instructions and did not enter those areas. Generally, there was nothing of notable interest, such as the world’s largest dormitory 🙂 However, the main bulk of buildings were openly accessible, without any signs, doors open from all sides, and inside there was either nobody at all or just one person per floor. And it was interesting there.

In the Department of Weapons and Systems Engineering building, robots, torpedoes, and turbines were on display in the hallways, and the walls featured information about the department’s achievements or those of individual scientists, as well as announcements for students. All classrooms and some laboratories were also open. I tried not to enter the laboratories, but I would have loved to visit during class time!

The little yellow robot in the photo is Robogoat, here it is online: http://www.igvc.org/design/2015/8.pdf

And the black refrigerator is the Beer Launching Fridge. Here’s a video of it: https://www.youtube.com/watch?v=rygr0OUYRt8

The neighboring huge building was an indoor arena, surrounded by countless fields for various sports. They were particularly proud of their football team.

The campus area is one and a half square kilometers, slightly smaller than the Moscow State University area.

After such visits, you understand better how a university is structured. And despite the constant feeling of some post-apocalypse due to the complete absence of people in huge buildings, it creates quite a pleasant feeling and a decent idea of what it is like here on working days. If I had been a high school student, after such a “tour” I would have really wanted to study there.

December 04 2017, 01:32

for #hybris only: Published the second part of the groovy scripts for hybris. Introducing four scripts.

The first allows changing the logLevel for any class in the system on the fly. Hybris, since some version, stopped doing this for some unclear reason, and I am correcting the situation.

The second allows you to delve into the storefront context for beans there and, for example, print their list. You can then modify them or call their methods.

The third script demonstrates that you can run methods from controllers. Sometimes this is useful for debugging.

The fourth script exports all the URLs declared by RequestMapping for controllers. This is useful to understand what mappings are established in the system, for instance, for a superficial audit and understanding of what is exposed on the web.