We're going to carve away a high-performance service from a very simple node app. We'll do load testing to verify our bottleneck, create a protobuf file to clearly communicate the service boundary, and then integrate a golang server implemented with an RPC library called Twirp.

Throughout October 2017, we ran the first season of Productivity Quest — our Slack-based series of challenges tailored to improve the way we work. It turned out to be a huge success and kept the community wanting more. This year, we decided to take a different spin.

Reddcoin was designed to be a social currency to credit creators and others that might be losing to the ever-changing advertisement industry. We're going to see how to work with RDD coins in the sense of sending, managing, and maintaining these coins with Node.js and JavaScript.

Many articles have been written about refactoring. What I'm trying to do here is to bring to light real life's example of how together with my team we approached the problem and how do we plan to deal with it.

Tag Archives: php

Three days ago I decided to give you some motivation to start doing a code kata (see the Friday Dopamine Dump). Well, if you forgotten, haven’t got any time, had to do something more important and didn’t even try to try, then stop. No excuses! If you really want to do this – just start. Schedule one hour this week, cancel all meeting that time and say your wife that you need man’s time (she will understand, mine did).Continue reading

When we were in Madrid last year, a book was accompanied me – the new edition of Clean Code authored by Uncle Bob. He describes how the professional programmer acts, works, talks and develops himself. Robert C. Martin claims an example from his own life – a quick, 15 minutes, code kata done twice a day. I think this requires a lot of discipline which might be hard to achieve at the beginning, so I propose you to schedule one hour a week to learn something new. To help you I’d love to start the same. I hope to share my ideas, kata scenarios, links, tools, and the process with you and I hope you would do the same.Continue reading

This topic’s stayed in my mind for a while. Inspired by Joshua Thijssen’s presentation from PHP UK about (re)discovering the SPL in PHP, I decided to investigate this more carefully. I have to admit that took me some time to understand how the things work and how to not misunderstood the purposes of each iterator and because of lack of documentation it wasn’t that easy. I did a couple of mistakes and probably I will do more, but as Joshua said in his presentation:

The documentation of SPL is completely useless. What can we do? Blog about it!

So, brave yourself. Here my blogpost comes!

It seemed to be just another ordinary day at work but it wasn’t. Yesterday, our team faced two challenging problems, which had blocked programmers’ work in two projects for a few hours. Now we are aware of the fact that the troubles could be simply avoided. That’s why I would like to share our experience and present those tricky, time consuming issues.Continue reading

In XSolve each developer has 10% of his working time to create special projects and bring some innovative ideas into life. Most often we use that time to prepare open source bundles and you can find some of them at http://knpbundles.com/organization/xsolve-pl/profile . Please feel free to use them!

In this article I would like to present our brand new creation – Symfony2 Boostrap CRUD bundle and make it easy for you to implement it in your next assignment.Continue reading

Few days ago we released a first edition of xsolve-google-auth-bundle (you can fin it on GitHub) which is connecting google authorization and authentication with FOSUserBundle.

After installation you can define where users can sign in with google account and, if they do not exist in your database when new accounts would be created. Bundle allows to open an application for all users or only from specific domain.Continue reading

Last time I wrote an article about how to get last posts from facebook fan page to your website’s feed. Procedure of connecting website with facebook was little complicated and I tried to find one more way to handle this functionality, and really done this.

I have found new solution to provide this problem. Actually, Facebook shares a RSS feed from all available fanpages. Where did I found it? Of course, not in facebook developers page.Continue reading

Generally, while working with simple search engines programmers have to anticipate issues involving users’ typos and mistakes. In this article I would like to present, compare and contrast three main types of full text searching in MySQL database – LIKE, SOUNDEX and MATCH AGAINST as these methods are some of the most popular solutions as well as they are readable and easy to implement.

SOUNDEX

Soundex is a more advanced function to compare text – not only it matches strings but also guesses if there are any typos. Unfortunately, it doesn’t work with foreign characters (for example with Polish or Russian language).
Soundex function returns a soundex string from parameter and that means two strings that sound almost identical should have the same soundex.
Additionally all non-alphabetical characters in parameters are ignored and all international alphabetical characters outside the A-Z range are treated as vowels.

In example

SELECT title FROM posts WHERE title SOUNDS LIKE “Atricle”;
this statement should return a ‘title’ of an ‘Article’ if there is one at all.

Likewise:
SELECT title FROM posts WHERE SOUNDEX(title) = SOUNDEX(“Atricle”);

Symfony2 implementation

Unfortunately, Soundex isn’t supported by Doctrine2.2, however there is a simple method to implement a DQL function.

First of all, we have to create a DQL class with a new method which returns string to SQL.

MATCH AGAINST

MySQL performs full text search using match()…against() syntax. MATCH() takes a comma-separated list that indicates columns to be searched. AGAINST() takes a string to search for and an optional modifier that determines type of search to perform.
The search string must be a string value that is constant during query evaluation. This rules out, for example, a table column because it can be different for each row.

This syntax has three types of searches:

Boolean – interprets the search string using the rules of a special query language. The IN BOOLEAN MODE modifier specifies a boolean search.

Natural – interprets the search string as a phrase in natural human language (a phrase in free text). Full-text searches are natural language searches if no modifier is given.

Query expansion – is a modification of a natural language search. The search string is used to perform a natural language search. Then words from the most relevant rows returned by the search are added to the search string and the search is done again. The query returns the rows from the second search. The WITH QUERY EXPANSION modifier specifies a query expansion search.

In example

SELECT * FROM film_text WHERE MATCH (description) AGAINST (‘redeem’);

Symfony2 implementation

This case is similar to SOUNDEX method, but we will take a look at Jérémy Hubert‘s code from https://gist.github.com/1234419

We need to add a new function into config.yml file as in SOUNDEX example. After that we can use it in Symfony application: