May 21 2016, 22:41

A fascinating phenomenon right from your backyard, yet to find a scientific explanation.

https://www.google.com/search?q=Crown+shyness&safe=off&espv=2&biw=1280&bih=637&source=lnms&tbm=isch&sa=X&ved=0ahUKEwji7faq0uzMAhXk6oMKHTuPAB4Q_AUIBigB

A bit in the journal Science – http://www.sciencemag.org/news/2000/08/breeze-keeps-trees-apart

May 21 2016, 19:54

Watched two Disney movies at the cinema: Jungle Book and Zootopia. I highly recommend both, especially The Jungle Book—it’s superbly made. In Zootopia, there is a great scene about the DMV, which is the American equivalent of the traffic police. The Jungle Book prompted me to watch Behind the scenes on YouTube afterwards. The Jungle Book is definitely a must-see in theaters.

May 20 2016, 10:29

On one of my projects, there is an internal messaging system between clients. It is important to note that 1) it is strictly internal communication with no external access 2) not everyone can communicate with everyone – there needs to be control over the accessible contact policies. Does anyone know if there are any global market services offering a ready-to-use integrated solution as a cloud service with an API for developers, including support and guarantees? Google does not fit because it is web-mail, which allows too much freedom for the specific task described above, and it cannot be limited.

May 18 2016, 23:05

To IT folks: Another very handy service for automatic online sequence diagram drawing

The idea is the same – you input a “program”, you get a picture. It’s very convenient if you need to send someone a diagram in an email and drawing in something like Visio is either too lazy or not worth the time spent.

I recently wrote about another excellent service, Nomnoml — similar concept, but for class diagram drawing. https://www.facebook.com/raufaliev/posts/10154057979627368

There’s also http://plantuml.com/

And there’s also http://yuml.me/

And there’s also http://graphviz.org/ and http://knsv.github.io/mermaid/ – the plus with these is that it’s a program that runs on your computer. Here’s someone I’ll feed a script of 3500 lines, since the web tools can’t handle it

http://websequencediagrams.com/

May 18 2016, 10:16

A brief update since the last post. I learn a ton of new stuff every day.

Some recent examples:

– Got a deep understanding of hybris Order Management System and Fulfillment, especially with the 6th version released in May, where they revamped a lot.

– Delved into hybris New Promotion Engine, which came out in May. I created a Proof Of Concept for something not included “out of the box” – messages on product pages like “Add this item to your cart and get a 10% discount on your total cart value.” This involved Java Drools. Also, conducted some basic load testing.

– Also on the new promotions engine, I created a Proof of Concept for implementing several non-standard promotions, which are challenging due to architectural constraints in hybris 6.

– Developed a Proof of Concept for what’s not available out of the box in hybris – displaying products and content pages (e.g., news) in a single search result list with filtering (e.g., by topic). This involves Apache SOLR.

– Had time to understand and then get disappointed with Powershell and nomnoml. I used it to create a quick and dirty XML parser to visualize several thousand types from hybris as a beautiful and huge ER-diagram of relationships.

– Prepared and delivered a detailed presentation to my colleagues about the data storage system in hybris (that’s ORM, cache) and page assembly system (things like MVC, JSP, filters). This was part of an internal conference.

– Created a Proof of Concept implementation of OKTA.com (a Single Sign On service-provider) with hybris. Externally, it looks like this: a customer logs in via OKTA, and is automatically logged in on several hybris sites. Essentially, it’s typical SSO, pretty standard, but since it’s not included “out of the box” in hybris, it was interesting to delve deeper into the SAML protocol and external SSO services.

– Got around to understanding Mockito, which I hadn’t managed before.

Well, that’s just in-between routine work with documents and various schemes.

Of course, I’m not sharing the results here; they are strictly for the company and clients.

May 16 2016, 23:23

IT folks: I’ve read with interest about the DjVu format – often used for distributing books, scores, manuscripts. It turns out that the compression mechanism used there is 20-100 times better than the familiar JPEG and GIF – up to 15Kb per page. I know how these two formats work internally, but I became curious about how to squeeze almost two orders of magnitude more out of them.

It turns out, the whole trick is that the image is divided into three layers, which are compressed differently – foreground, background, and a black-and-white (one-bit) mask. The mask is saved at the resolution of the original file; it contains the image of the text and other clear details. The resolution of the background, which retains illustrations and page texture, is typically lowered to save space. The foreground contains the color information about the mask; its resolution is usually reduced even more. Then, the background and foreground are compressed using wavelet transformation, while the mask uses the JB2 algorithm.

Wavelet transformation, in a nutshell, involves dividing the image into high-frequency and low-frequency areas, which can be compressed better individually since they have lower entropy. High frequencies are contrast-rich patches where brightness changes abruptly, and low frequencies are smooth areas where brightness changes gradually. To put it very simply, it’s like taking the derivative of the image multiple times, which expresses smooth structures with fewer bits. JPEG works in a similar way, only it uses a different smoothing algorithm (DCT) and operates with 8×8 blocks, which is absent in wavelets.

A distinctive feature of the JB2 algorithm is that it looks for repeating symbols on the page and saves their image just once – i.e., it clusters the picture into similar areas. For example, all the letters ‘a’ printed in the same font of the same size could serve as examples of such clusters. Slightly different letters ‘a’, for example with distortions from scanning or printed in another font, would fall into different clusters. As a result, a dictionary is created, where frequently occurring identical letters are combined. Then the location of each letter is saved, resulting in a very compact format. Overall, it is similar to JBIG2, of which there is much more information available online. In multi-page documents, every few consecutive pages use a common “dictionary” of images.

Quite an interesting area, computer graphics. I was once passionate about it.