- Readability
- Time complexity
- Space complexity
- Reusability
- Code coverage for deployment
Author: David Raleche
Twitter : https://twitter.com/DavidRaleche
Newsletter : Subscribe here
Store : https://david.raleche.com/shop
How to onboard a developer in your team ?
Onboarding tools
1 – Assist them in having their work environment ready
#1 – create a company email for new employee
#2 – Provide a GIT repository account
#3 – provide local development environment – Sandboxes account
#4 – provide Jira Account / access
#5 – provide Confluence account
#6 – provide VPN access
#7 – provide Chat/Slack access
2- Guideline Programming
3 – Recommendation for integrating developers in the group
* pull request / code review against programming guideline
* write functional test on the latest/pending release
* write documentation phpdocs / swagger / add documentation
4 – Programming guideline

Principles are guiding this methodology
- Readability
- Quality Assurance
- Logic
- Reusable code
Readability
PSR-2 code styling
Function no longer than 50 lines
PHP doc Block
TypeHint your functions
More information:
For better code readability we suggest PSR-2 code styling to be applied. We consider a function bigger than 25 lines is not an efficient function. For engaging this methodology we recommend 50 lines maximum per function. DocBloc are essentials. Swagger in a case of API writing is essential to be present.
A developer should be able to explain his work easily and quickly and should use materials to do so
Quality Insurance
No PHP error message
No PHP Warning messages
No PHP Notices
No hardcore credentials
Unit Testing
Details:
When executing the code we expect the quality assurance team to verify that no PHP errors, warnings, notices are produced. We also expect the QA team to go throughout the code to verify that no hardcore credentials are present within the code. Unit Test writing should be edited by QA team preferably
Logic
DRY (do not repeat yourself)
KISS (Keep it Stupid Simple)
SOLID principles
Reusable Code
Use PHP throw exception
Use Object oriented techniques
Use static function
Use PHP throw exception
Use Object oriented techniques
Use static function
Add the following your PHP too get rid of PHP notices, warnings
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
SWAN Profile
Smart
Work hard
Ambitious
Friendly
How to run a PHP interview in 30 min ?
GENERAL
Do you know what we are doing ?
Why are you leaving your current job ?
Are you looking for long term, short term role ?
What are you looking for to do in your next job ?
– technology ?
– role ?
Tell us about your latest project ?
Tell us about your experience of working in a group?
Could you tell us about a difficult project you had to resolve ?
Could you describe a time when you disagreed with your manager on how to accomplish something ?
Do you prefer working on your own or in a team ?
If you could change one thing about your personality, what would it be and why ?
PHP
What IDE are you using for programming ?
What command do you use to find out the php version ?
What is the purpose of @ in PHP ?
Can you list different types of error in PHP ?
What is composer ?
What is type hinting ?
Can you list a PHP convention standard
What is an interface in PHP
What is the latest version released PHP ?
LOGIC
How would you handle PHP upgrade ?
What steps would you take before creating an api ?
ARCHITECTURE
API can you list different api protocols ?
SQL
What SQL client are you using ?
What keyword do you use to analyze a query ?
EXPLAIN
How many types of normalization exists ?
What is MYSQL comment for creating a new record ?
JAVASCRIPT
What is nodeJS ?
Have you used any JS framework ?
What is hoisting variable ?
What are the different types of Javascript variables ?
UNIX
What is the Pipe command pipe doing in UNIX ?
What is VI ?
What is NGINX ?
FINAL
What are your hobbies outside of work ?
How to Fibonacci iteratively ?
Using Iteration
public static int fibonacciLoop(int nthNumber) {
//use loop
int previouspreviousNumber, previousNumber = 0, currentNumber = 1;
for (int i = 1; i < nthNumber ; i++) {
previouspreviousNumber = previousNumber;
previousNumber = currentNumber;
currentNumber = previouspreviousNumber + previousNumber;
}
return currentNumber;
}
- Recursion [fibonacci]
- Recursion Memoization [fibonacci]
- Recursion Iteratively
- Binary search
- Depth Search First
- Breadth First Search
- Quick Sort
- Merge Sort
- Window Sliding
- merge interval
Find basic algorithms in the link here
https://github.com/davidraleche/Basic-Algorythm
DFS – Depth First Search
<?php
class Node{
public $children = array();
public $name = '';
public function __construct(string $nameNode){
$this->name = $nameNode;
}
public function isLinked(Node $node):bool{
foreach($this->children as $c){
if($c->name === $node->name){
return true;
}
}
return false;
}
public function linkTo(Node $node):Node{
//Todo verify if already linked
$this->children[] = $node;
return $node;
}
public function notVisitedArray(array $visitedArray):array{
$notVisited = array();
foreach($this->children as $c){
if(!in_array($c->name,$visitedArray)){
$notVisited[] = $c;
}
}
return $notVisited;
}
}
$node1 = new Node('1');
$node2 = new Node('2');
$node3 = new Node('3');
$node4 = new Node('4');
$node1->linkTo($node2);
$node1->linkTo($node3);
$node3->linkTo($node4);
//print_r($node1);
//$r = $node1->notVisitedArray(array('1'));
// print_r($r);
//var_dump($node1);
dfs($node1);
function dfs(Node $node,
string $path = '',
array $visited = array()): void{
$visited[] = $node->name;
$notVisited = $node->notVisitedArray($visited);
if(sizeOf($notVisited) === 0){
echo 'path: '.$path.'->'."$node->name"."\n\r";
return ;
}
foreach($notVisited as $key => $n){
dfs($n, $path.'->'.$node->name, $visited);
}
}
BFS – Breadth First Search
<?php
$graph = [
'A' => ['B', 'C'],
'B' => ['A', 'D'],
'D' => ['B'],
'C' => ['A',],
];
//bfs($graph, 'A', 'D'); // true
//bfs($graph, 'A', 'G'); // false
print_r(bfs_path($graph, 'A', 'D')); // ['A', 'B', 'D']
function bfs_path($graph, $start, $end) {
$queue = new SplQueue();
# Enqueue the path
$queue->enqueue([$start]);
$visited = [$start];
while ($queue->count() > 0) {
$path = $queue->dequeue();
# Get the last node on the path
# so we can check if we're at the end
$node = $path[sizeof($path) - 1];
if ($node === $end) {
return $path;
}
foreach ($graph[$node] as $neighbour) {
if (!in_array($neighbour, $visited)) {
$visited[] = $neighbour;
# Build new path appending the neighbour then and enqueue it
$new_path = $path;
$new_path[] = $neighbour;
$queue->enqueue($new_path);
}
};
}
return false;
}
How to renew PAF of a NCOA ?
When hitting the following endpoint https://ws.satorisoftware.com/Architect/US/Move/MoveService.asmx?wsdl
If you have the following error :
</SOAP-ENV:Envelope>HTTP/1.1 500 Internal Server Error <faultstring>Error 0x800404B4: Your Processing Acknowledgement Form (PAF) expired on 09/11/2021. You must file a new form with your NcoaLink vendor before processing can continue.</faultstring>
please do the following
If you look in C:\Program Files (x86)\Satori Software\BCC Architect\Developer Center (United States)\Sample Code\move\NETClasses\csharp\Move_CSharp\bin\Release If you click on Run Move Update, the Move Agent Wizard will pop up, and here is where you can renew your PAF.

Create/Update endpoint in a restful api
The PUT API methodology should be appropriate for an upsert
According to the HTTP specification:
The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server. If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new resource by the requesting user agent, the origin server can create the resource with that URI.
I therefore think that the use of PUT for an insert or update is perfectly legitimate, provided that in both cases the URI is known in advance. If you’re using the key as part of the URI (as k1 in http://www.somewhere.com/resources/k1) this should be the case. To be ideally RESTful, however, a GET to the same URL should also allow you to download the resource.

I am looking for a new addition in my frontend team ! Please send your resume to [email protected]
Work
- Great work ethic
- collaboration spirit
- Understand the customer’s challenge
- Develop user facing features
- Build readable,reusable, optimal code and libraries
- Optimize the application for speed and capability
- Assist in troubleshooting software issues
- Participate in production releases
- Keep up to date with industry standards
- Agile Team Practices
Skills
- 5+ years HTML5/CSS3/Javascript (ES5/ES6). Expert proficiency in the latest specifications of each.
- 3+ years React.js1+ years
- SQL (MySQL or PostgreSQL)
- Experience with building and maintaining RESTful APIs
Bonus point
- Basic understanding of server-side CSS pre-processing platforms, such as LESS and SASS
- Proficient understanding of client-side scripting and JavaScript frameworks
- UI frameworks (Bootstrap, Foundation)
- Experience with Git, Jenkins,
- JiraPHP experience
- Linux Experience (ubuntu, centos)
Well let’s start by having them
#1 – writing functional test. They should be able to write functional test that can cover the knowledge transfer explained
#2 – Writing phpdoccs to document the code. They could as well document existing swagger documentation via phpdocs with Zircote for API platform
https://github.com/zircote/swagger-php
#3 – Initiate their work through a git pull request
this will trigger a code Review policy
