742 reputation
212
bio website scriptin.github.io
location Russia, Krasnodar
age 26
visits member for 1 year, 9 months
seen Jun 15 at 16:01

I am a web-developer:

  • PHP: Yii, Kohana, Drupal, Symfony
  • Scala and Ruby for personal projects
  • Passionate about FP, especially Haskell
  • Some basic Emacs hacking
  • MySQL, some T-SQL
  • JavaScript, JQuery, <canvas>, SVG
  • TDD/BDD with PHPUnit and Behat
  • HTML/CSS
  • Bash

Mar
15
comment Create a loop that visits every link on a site
Just found Anemone in slightly related question... Wait, it's your question... Yor're doing it right! =)
Mar
15
answered Create a loop that visits every link on a site
Feb
17
answered Are HSQLDB unit tests an anti pattern?
Feb
7
comment How to combine Google Analytics with Relational Database
@user1684645 "calculate correlations" is a vague description. As for identification - if you set an email var in GA, isn't it enough to identify a user?
Feb
7
answered How to combine Google Analytics with Relational Database
Feb
4
comment Share data layer for outsourcing project
@John If they're in a hurry and they hire you as additional manpower - yes, it's a case of Brooks's law. The point is: adding manpower to a project slows down the process (during the "ramp up" period, which may span past the deadline). Of course, if you just can't do some part of the job (e.g. your team has no frontend developer), then there is no other choice.
Feb
4
comment Share data layer for outsourcing project
"we have to outsource some of the work in order to complete it in time" - do you know about Brooks's law? It is not on topic of your question, but I have a strong negative experience of outsourcing in such situations.
Feb
4
answered Front controller in PHP
Feb
4
answered What design route should I take?
Jan
28
comment Is it a bad idea to return different data types from a single function in a dynamically typed language?
Also, if you return null on error, please please please make that clear in a docblock (e.g. @return boolean|null), so if I come across your code some day I wouldn't have to check function/method body.
Jan
28
comment Is it a bad idea to return different data types from a single function in a dynamically typed language?
I prefer to have an exception instead of null, because (a) it fails loudly, so it's more likely to be fixed on development/testing phase, (b) it is easy to handle, because I can catch all rare/unexpected exceptions once for my whole application (in my front controller) and just log it (I usually send emails to dev team), so it can be fixed later. And I actually hate that standard PHP library mostly uses "return null" approach - it really just makes PHP code more error-prone, unless you check everything with isset(), which is just too much burden.
Dec
7
awarded  Yearling
Apr
23
comment Generating random math expression
Generally, this algorithm is incapable to generate something that looks like ( expr1 ) op ( expr2 ), where expr1 and expr2 are not trivial (i.e. consist of more than just one number).
Apr
23
comment Generating random math expression
@rdurand @dan1111 I've tried the script. The issue of big left subtree is fixed, but generated tree is still very imbalanced. This picture shows what I mean. This may not be considered a problem, but it leads to situation where subexpressions like (A + B) * (C + D) are never presented in generated expressions, and there are also a lot of nested parens.
Apr
23
comment Generating random math expression
This algorithm seems to always generate imbalanced trees: left branch is deep, while the right one is just a single number. There would be too much opening parans in the beggining of each expression, and the order of operations is always left to right.
Apr
12
answered Keeping test and release version numbers in sync
Mar
11
awarded  Informed
Mar
10
comment Is a “build” assembly?
en.wikipedia.org/wiki/Build_automation
Mar
10
comment Storing in-text metadata in a discrete data structure
Yes, that could mess with an offset and that issue can be solved in a rich text editor with "virtual" end-of-note marker, which acts exactly like start marker, except it cannot be edited explicitly (it's just there to mark an end-of-note, shifting along with the edited text) and it is not saved with the text. You just insert it while editing and then drop it when saving. Generally, I think there might be even more problems with both start and end markers then with just only one of them, but of course I may be wrong.
Mar
10
answered Storing in-text metadata in a discrete data structure