PHP: Array vs ArrayObject benchmarking

Some measurements on Arrays vs ArrayObjects found among gist users. Just going to bring it here, in case gist dissappears. # php -v PHP 5.3.6 (cli) (built: Mar 17 2011 20:58:15) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies # echo '<?php $s = array(); for($x=0;$x<1000;$x++){ $s[] = array("name"=>"Adam","age"=>35); }; echo memory_get_peak_usage(); ' | php 655040 # echo '<?php $s = array(); for($x=0;$x<1000;$x++){ $o = new ArrayObject; $o->name = "Adam"; $o->age = 35; $s[] = $o;} echo memory_get_peak_usage(); ' | php 887984 # time echo '<?...

November 16, 2016 · 2 min · anvyst

Qobo: first month benchmark

It’s been already one month since I moved to Qobo Ltd, as a backend developer, so it’s about time to do some benchmarks on the work done. Open-Source The level of open source involvement of Qobo is enormous. All the projects I’ve been involved in before were always about open-source: it was either based on open-source, or using open-source solutions into some extend. Every time it ends up locking down the solutions for indoor use....

November 15, 2016 · 2 min · anvyst

Yarn: package manager for JS modules

Yarn kitty rocks! Yarn is a package manager for your code. It allows you to use and share code with other developers from around the world. Yarn does this quickly, securely, and reliably so you don’t ever have to worry. Yarn allows you to use other developers’ solutions to different problems, making it easier for you to develop your software. If you have problems, you can report issues or contribute back, and when the problem is fixed, you can use Yarn to keep it all up to date....

November 12, 2016 · 1 min · anvyst

From hardware to software: key points

Absolutely great article by Seth Godin on hardware/software perspectives. Looking at the giants, like Apple. Here are some of points from the article: Software can change faster than hardware, which means that in changing markets, bet on software. * It’s tempting to treat the user interface as a piece of fashion, some bling, a sort of jewelry. It’s not. It’s the way your user controls the tool you build. Change it when it stops working, not when you’re bored with it....

November 5, 2016 · 1 min · anvyst

Base32 advantages over Base64

I stumbled upon these little facts, why engineers chose Base32 over Base64 for shared secret key: The resulting character set is all one case, beneficial when using a case-insensitive filesystem, spoken language, or human memory. The Base32 result can be used as a file name because it can not possibly contain the '/' symbol, which is the Unix path separator. To avoid similar-looking pairs of different symbols they picked an alphabet , so the strings can be accurately transcribed by hand....

October 29, 2016 · 1 min · anvyst

World's Best Hikes: 20 Hikers' Dream Trails - National Geographic

National Geography publishes world’s best 20 hikes: France, Italy, Switzerland. Definitely the places to visit for hiking.

October 27, 2016 · 1 min · anvyst

HipChat 4 for Fedora

For some weird reason, HipChat (v4) wasn’t introduced in the downloads page of the official site. It has only .deb package, but there’s a link in JIRA ticket with the rpm sources: [atlassian-artifactory] name=Atlassian-artifactory baseurl=http://atlassian.artifactoryonline.com/atlassian/hipchat-yum-client enabled=1 gpgcheck=0

October 27, 2016 · 1 min · anvyst

Database design: when in doubt - use meta tables

It’s becoming quiet intriguing when you work with the 3rd party closed-source projects. You can see how the project was maturing, and how things were changing on the fly. Especially when you have to plug in some extra logic on top of it, and the code is obfuscated, so the only way how to find all ins and outs - check the database schema. Certain systems force to develop evil workarounds to coupe with bad design practices, whether it’s code or database wise....

September 22, 2016 · 2 min · anvyst

Twitter as communication tool for botnets

ESET researchers discovered an Android backdoor Trojan controlled by tweets. Detected by ESET as Android/Twitoor, it’s the first malicious app using Twitter instead of a traditional command-and-control (C&C) server. After launch, the Trojan hides its presence on the system and checks the defined Twitter account in regular intervals for commands. Based on received commands, it can either download malicious apps or change the C&C Twitter account to another one....

August 26, 2016 · 2 min · anvyst

JavaScript function call vs arrow functions

Greate quote from Agile Software Craftmanship describing some of the short-cuts in programming languages. Classical example - function call versus arrow functions. “…the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code.Because this ratio is so high, we want the reading of code to be easy even if it makes the writing harder....

August 24, 2016 · 1 min · anvyst