Seva Lapsha at Work & around

Software Architect, Project Lead

Serenity Night

with one comment

Roofs of the houses shake under the load of the days,
Empyrean shepherd depastures the clouds.
City spreads fire in the night with buckshot of flames,
But night is intense, its power is hard.

To those, who are going to sleep,
The wish of sweet dreams.
Tranquility night.
To those, who are going to sleep,
The wish of quiet peace.
Serenity night.

I waited for it, and here, this season has come,
Those who stayed silent, abandoned to stay.
Those who have nothing to wait, are saddling the ride,
No overtake, no more overtake.

To those, who are going to sleep,
The wish of sweet dreams.
Tranquility night.
To those, who are going to sleep,
The wish of quiet peace.
Serenity night.

The neighbors are coming, imagined the clop of the hoofs,
It can’t let them sleep, harassing their dreams.
Those who have nothing to wait are hitting the route.
Those who are saved, those are redeemed.

To those, who are going to sleep,
The wish of sweet dreams.
Tranquility night.
To those, who are going to sleep,
The wish of quiet peace.
Serenity night.

Written by Seva

2014-02-26 (February 26) at 03:28:51

Posted in leisure, past, thought

Simplicity versus Stupidity

with 2 comments

Similar to the Einstein’s simplicity razor -

Everything should be as simple as it can be, but not simpler.

I came up with a stupidity razor -

Always think as much as you can, but not more than enough.

Written by Seva

2013-10-02 (October 2) at 10:29:12

Posted in thought

Tagged with , , , ,

Opinion and Self

leave a comment »

Sometimes in the internet people ask general questions of comparison, e.g. “What is the best something – one thing or another thing?”.

Sometimes the responder tends to play an all knowing guru and tries to give a general and wide range covering answer. Even start their story with “there is no best”.

Read the rest of this entry »

Written by Seva

2013-06-23 (June 23) at 09:07:55

Posted in thought

Le

leave a comment »

Few months ago I suddenly noticed that many popular brands have -le suffix in their names. Beatles, Deep Purple, Oracle, Apple, Google… Any more examples?

Written by Seva

2013-06-14 (June 14) at 10:30:43

Posted in future, leisure, past, thought

Zend Framework View Script Recursion

leave a comment »

We know that in Zend Framework View Scripts it’s possible  to run in a recursion using a View Helper – either Partial, or Action, or a custom one.

However all of these become a certain execution overhead in case we need just a simple one-time tree traversal. Also for readability purpose, it would be nice to have the recursion defined inline.

Luckily, since PHP 5.3 we can use self referencing closures to define the behavior within the script:


<?php
$showTree = function(array $entities) use(&$showTree) {?>
 <?if(!$entities) return?>
 <ul>
 <?foreach($entities as $entity):?>
 <li><?=$entity->getName()?></li>
 <?=$showTree($entity->getChildren())?>
 <?endforeach?>
 </ul>
<?}
?>
<?=$showTree($this->entities)?>

Written by Seva

2013-04-03 (April 3) at 11:37:04

Making Collective Decisions

with one comment

While preparing to shrink up and replace my single role of Lead Software Architect with a Software Architecture team -

Decision Making

Making architectural decisions might seem easy and fun, but can have multiple consequences which can affect state and integrity of the software, the architecture team, the R&D teams and the whole company. We aim to make the decisions in the most responsible manner with taking all the relevant factors in consideration. Sometimes we do consult wide community of developers and PMs in early stages, sometimes we do that on later stages, but what’s very important, we never attempt to dictate our decision without majority consensus.

The common flow of taking a decision is the following (CRAFT):
  1. Collect information about the subject from provided private and public sources. If necessary, use in-company resources reuse their existing experience.
  2. Research the gathered information and prepare a draft of architectural opinion with a list of alternative solutions and their advantages and disadvantages.
  3. Acknowledge the opinion of all the interested parties. Accept and react on all the provided input.
  4. Finalize the decision and make it effective. Make sure it’s acknowledged, accepted and adopted by all the relevant parties.
  5. Track the execution of the decision. Learn from the experience, reopen the flow if necessary.

Written by Seva

2011-12-13 (December 13) at 10:49:28

Simple No-Framework Object Oriented Multi-Layer MVC Application Example

with one comment

Recently I’ve created the subj. It’s a memory game, written in pure PHP/HTML, called “PHP Memory”.

What was important for me to demonstrate is the next principles:

  1. Even if you don’t use a framework, you should write modular code with appropriate architecture.
  2. Despite that, the application design and code should match its required functionality with no overhead of unneeded patterns and abstraction or preparations for future enhancements, unless they’re planned.
  3. Nevertheless, the code should be readable and maintainable.
  4. The bottom line is – developing a framework versus developing an application are completely different tasks. The strategy and tactics should vary very much. Of course, developers should learn from the frameworks source code, since they accumulate collective experience of great coders, but the ideas implemented in frameworks sometimes not required or even harmful while developing an application.
The demo and source code can be found here.

Written by Seva

2011-08-30 (August 30) at 01:59:26

Follow

Get every new post delivered to your Inbox.

Join 602 other followers