October 21 2016, 00:20

Ha, great stories about bugs in Blitzkrieg. You can follow the link, or read here:

“…If you believe one widely circulated story, the F-16 fighter jets’ autopilot of the Israeli Air Force would malfunction when flying over the Dead Sea. The altitude of the aircraft at some point crossed the “sea level” mark, causing a division by zero and thus paralyzing the autopilot’s brain.

What to say, if Lockheed Martin can slip up like that, what about us, mere developers of toys?

From my experience, Blitzkrieg 2 from Nival Interactive was particularly fruitful with comedic bugs. For those unaware, it’s a strategy game themed around World War II. Quite funny even without the bugs. We had a strict German publisher, and Germans are particularly skittish about anything related to their Nazi past. Mentioning the Führer’s name was forbidden, as were words like “Nazi”, “fascist”, even our swastika was not real but stylized. And this was while having cutscenes between missions explaining historical events related to the gameplay. The result was a glamorous sort of warfare styled in the genteel era but with tanks and bombers, with no particular claims to historical accuracy. By the way, seeing the mess we were making, our military consultant asked to have his name removed from the credits 🙂

The V-2 rocket was a sort of German mega-firecracker. Germany harassed Great Britain with these at the end of the war, but without much success. This wonder weapon suffered from a slew of childhood diseases and was lucky if it could take off at all. Often it exploded right on the launch table, and if it did get off and flew towards England, that was a real success. The fuel, by the way, 3.5 tons of ethyl alcohol 🙂

Well, we also made this very rocket in Blitzkrieg. Like the Germans, we made it towards the end of the project and based it on an “airplane” object. But the programmers slacked a bit and didn’t remove some of the suspicious functionality for a ballistic missile. It turned out that if it started to rain or snow during its flight to the target, first, the rocket would say in a human voice “Fliege zuruck” (Ger. fly back), and secondly, it would turn around and fly back to the base. After all, the weather was not fit for flying.

And we also had a wonderful unit – a special forces squad. Our troops could gain experience during the mission, and with experience, they acquired interesting abilities. So, overly trained special forces could disguise themselves as enemy infantry. It was enough just to click on a squad of enemy soldiers, and our fighters would change into their uniforms. You could walk around the enemy base with impunity. Well, until the first shot, of course.

But, the trouble was that in Blitzkrieg, besides the actual infantry, there were various set dressing units, like cows, pigs, and dogs. It turned out that the special forces didn’t mind dressing up as Bobik dogs and pigs. Considering that the mechanism of this disguise glitched a bit and part of the squad could be dressed in one uniform, part in another, it was possible to create utterly insane units. For example, a squad made of dogs, pigs, and Panzergrenadiers. Given that the squad could be given various commands like “march,” “crawl,” etc., the player was given a unique opportunity to admire marching pigs. It actually looked terrible, as the skeleton of a pig does not match that of an infantryman and looks like a squad of pigs scooting on their butts. And this circus show could be stuffed into a trench. So there they sit, pigs and dogs in a trench, occasionally peeking out.

Speaking of pigs, by the way, there was another bug related to them that caused the game to crash. At one point, programmers tweaked something, and pigs no longer remained neutral but could belong to a player. You couldn’t control them, but formally they could be “ours” or “theirs.” So, seeing an enemy, the patriotic pig would seek to fight back and would search for a weapon, which of course it didn’t have. If I remember correctly, programmers fixed the bug by just providing the pig with a Luger pistol without bullets. Visually it was not apparent, but formally, now seeing an enemy, it reaches for the weapon, sees there are no bullets, and calms down.

Interestingly, unlike the pig, a dog can bite. And the number of bites it has, if I’m not mistaken, is limited to ten thousand. After that, Barbose runs out of “ammo,” and it becomes harmless. By the way, an interesting question, I haven’t checked, but would the supply truck, which delivers ammunition, bring bullets to the dog?”

October 19 2016, 20:55

Another experiment: using marked areas on Google Maps for various purposes in e-commerce: finding the optimal warehouse, searching for accessible stores for self-pickup or the best delivery service, and maybe even the very fact of being able to sell a product or service to a customer from this zone.

It works like this: the customer enters an address, and the system identifies it as one or more major zones. Different components of the system depend on these major zones, not on the minor components of the address such as the postal code.

At the same time, I got to grips with developing on Google AppEngine. The issue is that determining the polygon (zone) that includes a point on the map (where the customer is), for the situation of “many zones of complex shapes”, can potentially be a quite “heavy” computational task. If there’s a possibility, it’s better to handle it immediately on a cluster that can easily scale, and even better, do so autonomously. And this case is excellent for Google AppEngine, where Google DataStore is used to store polygon parameters, and Google Memcache for storing cache.

https://hybrismart.com/2016/10/19/geofencing-in-hybris-custom-shipping-zones/

October 18 2016, 14:59

At my home, I have three things that work SOMETIMES. These are the Lenovo X1 Carbon laptop, a Lexmark S600 printer, and a JBL Flip Bluetooth speaker. They all have one thing in common – they work whenever they feel like it. When they do work, they work wonderfully. But more often, they do not work. The laptop won’t turn on, the speaker produces no sound (neither through cable nor BT), and the printer doesn’t print (neither through cable nor Wi-Fi). It started with the speaker, followed by the laptop, then the printer joined in. And after this, try not to believe in real hardcore computer viruses 🙂

October 17 2016, 23:37

I read that our authorities are considering lowering the threshold for duty-free purchases from Western online stores from 1000 euros to just 22. They say it will kill online trading and all that.

It’s quite interesting that whenever there is talk of a new law, 9 out of 10 people from Russia, Ukraine, or Belarus will automatically think about how to circumvent this law. Under that topic, nearly all the comments are about this. Well, so as to “kind of legally”, of course. Or “slightly illegally”. Some just think about it, some will do something for themselves, and some even for others.

The typical American wouldn’t even think about circumventing the law. From school, they are taught to blindly follow the laws, no matter how (both of them) bad they may be. And if the law is truly stupid, an American would be outraged, but the thought “how to not follow it” just doesn’t come to them at all.

Partly for that reason, our engineering specialties are valued in the USA. Because we live our lives with cunning. Our traffic rules are among the best in the world, but on the road, most drive “by understanding” (in a good sense). Therefore, people in general are indifferent towards corruption. Of course, it’s possible to rant about it in the kitchen, but as for taking it to the square – no. That’s why scandals with American politicians are totally baffling in Russia.

October 17 2016, 14:49

A major update on the blog about Hybris. I managed to figure out and connect the latest version of Drools Fusion + Drools Server to hybris. This thing is correctly called Complex Event Processing. The point is that if you have a stream of any data for real-time processing, Drools Fusion allows you to do this quickly and flexibly. For example, in the case of e-commerce, there’s a lot of such data. The simplest of these are logs of page visits.

I recorded a demo that makes it clear how it works. Logs are uploaded somewhere into a storage, and from there they go to drools fusion for processing. Rules are written in drools language that extract some new knowledge from the logs. In my demo, it’s simply identifying whether a person is a photographer/not a photographer based on the pages they’ve visited. The result of the rules is returned back to hybris and can be used somehow there. Show a banner or reduce prices.

The main feature of all this is that it processes a stream of events in real-time. In my example, it is finding at least five pages of one thematic group within the last 30 seconds for one user.

The second important point is that the system is incredibly scalable, and it does not require additional hybris servers, which is common for built-in hybris personalization (thus seldom anyone uses it: it just costs extra money, and substantial ones only in licenses required for it to work at all). Here, servers are loaded, whose software costs nothing: it’s free. And in hybris, ready-made solutions are then pushed through, which just need to be visualized there.

http://hybrismart.com/2016/10/17/complex-realtime-event-processing-with-drools-fusion-integrating-with-hybris/