Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions Answers to technical questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Answers to Technical Questions

## 1. How long did you spend on the coding test? What would you add if you had more time?

I spent approximately a few hours working on the coding test, focusing mainly on implementing the core functionality and ensuring that the application works correctly.

If I had more time, I would improve the following areas:
- Refactor the code for better readability and maintainability
- Add proper error handling and validation
- Improve UI responsiveness and accessibility
- Optimize performance, especially for dynamic rendering and API calls
- Add unit and integration tests to ensure reliability
- Enhance mobile and cross-browser compatibility

---

## 2. How would you track down a performance issue in production? Have you ever had to do this?

To track down a performance issue in production, I would follow a structured approach:

1. **Identify the issue**
- Use monitoring tools (e.g., logs, APM tools like New Relic, Datadog, or application logs)
- Check metrics like response time, CPU usage, memory usage, and database latency

2. **Reproduce the issue**
- Try to replicate it in a staging environment using similar data and traffic patterns

3. **Analyze bottlenecks**
- Inspect slow API calls, database queries, or frontend rendering issues
- Use profiling tools (Chrome DevTools, backend profilers, query analyzers)

4. **Fix and validate**
- Optimize the problematic code/query
- Deploy fixes in a controlled manner and monitor impact

5. **Prevent recurrence**
- Add alerts, logging, and performance benchmarks

Yes, I have worked on debugging performance-related issues where I analyzed slow API responses and optimized database queries and frontend rendering logic to improve load times.

---

## 3. Please describe yourself using JSON

```json
{
"name": "Biken Singh",
"role": "Full Stack Developer",
"skills": [
"JavaScript",
"React",
"Node.js",
"PHP",
"MySQL",
"HTML",
"CSS"
],
"interests": [
"Web Development",
"Performance Optimization",
"UI/UX Design",
"Learning new technologies"
],
"strengths": [
"Problem solving",
"Clean code practices",
"Quick learner",
"Debugging and optimization"
],
"goals": "To become a highly skilled full stack engineer building scalable and efficient web applications"
}
27 changes: 27 additions & 0 deletions controllers/SliderController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
require_once "../models/Database.php";
require_once "../models/item.php";

class SliderController {

private $item;

public function __construct() {
$db = (new Database())->connect();
$this->item = new Item($db);
}

public function getData() {

$result = $this->item->getAll();

$data = [];

while ($row = $result->fetch_assoc()) {
$data[] = $row;
}

echo json_encode($data);
}
}
?>
73 changes: 73 additions & 0 deletions items.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 15, 2026 at 12:56 AM
-- Server version: 10.4.28-MariaDB
-- PHP Version: 8.2.4

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `wpoets_test`
--

-- --------------------------------------------------------

--
-- Table structure for table `items`
--

CREATE TABLE `items` (
`id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`description` text DEFAULT NULL,
`image` varchar(255) DEFAULT NULL,
`tab_name` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `items`
--

INSERT INTO `items` (`id`, `title`, `description`, `image`, `tab_name`) VALUES
(1, 'E-learning Solutions', 'Interactive learning platforms for education and training', 'public/images/DL-Learning.jpg', 'Learning'),
(2, 'Training Modules', 'Custom training modules for corporate learning', 'public/images/DL-Communication.jpg', 'Learning'),
(3, 'Software Development', 'End-to-end software solutions for enterprises', 'public/images/DL-Technology.jpg', 'Technology'),
(4, 'Cloud Services', 'Scalable cloud infrastructure and deployment services', 'public/images/DL-Technology.jpg', 'Technology'),
(7, 'Corporate Communication', 'Effective internal and external communication strategies', 'public/images/DL-Communication.jpg', 'Communication'),
(8, 'Digital Communication', 'Modern digital communication solutions for businesses', 'public/images/DL-Technology.jpg', 'Communication');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `items`
--
ALTER TABLE `items`
ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `items`
--
ALTER TABLE `items`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
27 changes: 27 additions & 0 deletions models/Database.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

class Database {

private $host = "localhost";
private $username = "root";
private $password = "";
private $dbname = "wpoets_test";

public $conn;

public function connect() {

$this->conn = new mysqli(
$this->host,
$this->username,
$this->password,
$this->dbname
);

if ($this->conn->connect_error) {
die("Database Connection Failed: " . $this->conn->connect_error);
}

return $this->conn;
}
}
19 changes: 19 additions & 0 deletions models/item.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

class Item {

private $conn;
private $table = "items";

public function __construct($db) {
$this->conn = $db;
}

public function getAll() {

$query = "SELECT * FROM " . $this->table;
$result = $this->conn->query($query);

return $result;
}
}
Loading