I have recently upgraded one of work project to PHP 7. What a bliss… Just by upgrading we have managed to reduce response time for Symfony based API from 100ms to 75ms (25% boost). (Note: responsibility of the decreased timing might also be from some updated libraries and drivers)
I have also managed to upgrade the present blog to the new PHP version and a similar improvement was observed.

Other major improvements from my perspective:

  • Strong type return methods (this can help increase the code quality and will help resolve some bugs in some early stages). I was a bit disappointed that overloading is still not available.
  • Syntax errors are now catchable

Cache Bundle for Symfony

Have you ever felt that your classes are burdened with caching logic instead of proper logic? I know you did, and so did I. In an effort to improve readability and quality of the code, me and my colleagues at eMAG have developed internally a library that will remove all the extra logic for caching from method body.

And after some time we have decided to open source it, so that others can also use it and help develop it.

The library is available on github: . Also there is available also a small use guide.


wakup tool v2

Today i’ve worked hard to make some changes to “wakeup tool” and so it came v2.

Changes that worth mentioning:

  • New layout based on bootstrap. It’s responsive now ūüôā
  • Grouped hosts by type (Linux, Windows, Webserver). Each with it’s own verification procedure
  • Changed WOL mechanism in order to remove dependencies on some installed¬†binaries.
  • Changed autodiscovery mechanism. Now it will check if host alive trough checking ports 3389,22,80. Again removed dependencies on external binaries.
  • Changed log in mechanism to sfDoctrineGuard in order to allow future features that require permissions. If you require integration with Active Directory have a look here.

You can have a look yourself at:

Why Scala is not so cool

A friend of mine is currently attending a Scala course on courseraand she showed me one of her issues searching for an advice. Unfortunately for her after 5 minutes i was leaving the desk as i was unable to come up with any idea.

Based on this experience i tried to have a look at Scala docummentation, so i’ve started with introduction¬†and first thing i’ve seen was that is Java based. Considering my previous experience with a programming language writen over Java, Coldfusion(a huge resource consumer), this wasn’t the best “nice to meet you” conversation. Basically Scala is compiling your code into Java binary compatible file.

Scala programs run on the Java VM, are byte code compatible with Java

A plus was the fact that major companies were already using Scala.

For example, at¬†Twitter, the social networking service, Robey Pointer moved their core message queue from Ruby to Scala. This change was driven by the company’s¬†need to reliably scale their operation to meet fast growing Tweet rates, already reaching¬†5000 per minute during the Obama Inauguration. Robeys thinking behind the¬†Twitter Kestrel project¬†is explained in the developers¬†live journal. His concise¬†1500 lines of Scala code¬†can be seen as he has generously made them available as an open source project.

So far introduction hasn’t brought very much confidence in continuing, so i asked my friend to give me some key points that would represent the an advantage of using it in a real case. First and only point(due to lack of time) mentioned was a better stack management while using¬†recursive functions.¬†At this point i said that all recursive methods can be implemented also iterative in order to avoid stack problems while using large volumes of data. On the other hand this¬†may raise complexity of the code.

This conversation¬†being¬†over i’ve came back to Scala site¬†searching for some code examples. Look what i found:

Any method which takes a single parameter can be used as an infix operator in Scala. Here is the definition of classMyBool which defines three methods and, or, and negate.

class MyBool(x: Boolean) {
  def and(that: MyBool): MyBool = if (x) that else this
  def or(that: MyBool): MyBool = if (x) this else that
  def negate: MyBool = new MyBool(!x)
def not(x: MyBool) = x negate; // semicolon required here
def xor(x: MyBool, y: MyBool) = (x or y) and not(x and y)

Why a programming language requires such a feature? Why don’t they like obj.method(param) ?

Adobe WebUp #9

This time, it was quite short (19:45 – 21:10) with only 2 presentation, both directly related to some cool js libraries.

First presentation was kept by a student(Andrei Oprea), that is an intern at Adobe RO. He presented an online version of tool that resembles with PowerPoint –¬†
This tool is based on a node.js server with front-end developed using less, jQuery, bootstrap and require.js. About jQuery, less and bootstrap i heard also before, but require.js was the new stuff.

What’s require.js? It’s a¬†dependency¬†management library, that can help you a lot in terms of¬†concurrency¬†issues at load(we all had this problem at least once).

Continue reading Adobe WebUp #9

HTTPS has problems

It seems like nothing is secure those days. I found a post about possible security issues with HTTPS on Firefox and Chrome. The issues is realted to some features enabled by default in those browsers(TLS compression or SPDY) that would allow access to cookies from https sites. In the latest versions of Firefox and Chrome those features were disabled, so update as soon as possible.

Surprising¬†for me it’s that this happends to Firefox and Chrome and not to Internet Explorer, but it seems like the fact that they don’t implement all the new cool stuff saved them.

Also as webmaster you can protect your users by disabling those features in your webserver.

wakeup tool

Today was the first expose to public of ¬†the wakeup tool. It’s available on github here¬†

The tool is designed for companies that want to reduce the amount of power consumer by the computers while employees are not using them, but also offer possibility during VPN connections to access the machines.

It requires wake-on-lan to be enabled from bios and, for the auto-discovery functionality, it requires that computer would have Windows Shares enabled( it uses netbios scans ). Also computer may be added manually to the list.

Currently documentation and interface are still in work, but the core functionality is working.