Filter by the role you are applying for, open a question, and practise explaining the answer out loud. Mark it practised when you can.
Why they ask this: Checks you can choose the right layout tool instead of fighting CSS.
Answer
/* Flexbox: navbar */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
/* Grid: responsive cards */
.cardsWhy they ask this: Most users in Nepal browse on mobile phones, so responsive design is a must-have skill.
Answer
<meta name="viewport" content="width=device-width, initial-scale=1">.min-width media queries for larger ones.fr and minmax()) and relative units (%, rem, vw) instead of fixed pixel widths.img { max-width: 100%; height: auto; }, and use srcset for different image sizes..grid { display: grid; gap: 1rem; }
@media (min-width: 768px) {
.grid {
Why they ask this: Every team project uses migrations; this checks you can work safely with a shared database schema.
Answer
Why they ask this: A common online-test question that checks you understand how GROUP BY queries run.
Answer
Why they ask this: Every developer calls or builds APIs; correct method use is a basic expectation.
Answer
Why they ask this: Correct status codes make APIs predictable for frontend and mobile developers.
Answer
Why they ask this: Most backend roles in Nepal build JSON APIs for web and mobile clients.
Answer
Why they ask this: Choosing where to store tokens and preferences affects both security and user experience.
Answer
Why they ask this: A basic Git question that shows whether you understand remote-tracking branches.
Answer
Why they ask this: Conflicts happen weekly in team projects; interviewers want to see you stay calm and methodical.
Answer
Why they ask this: Your GitHub history is often the first code a Nepali recruiter or tech lead looks at.
Answer
They work well together, for example a Grid page layout with Flexbox inside each card.
Migrations are version control for the database schema. Each migration is a PHP class with an up() method that makes a change and a down() method that reverses it.
Schema::create('jobs', function (Blueprint $table) {
$table->id();
$table->foreignId('company_id')->constrained()->cascadeOnDelete();
$table->string('title');
$table->unsignedInteger('salary_min')->nullable();
$table->timestamps();
});Useful commands: php artisan make:migration, migrate, migrate:rollback, migrate:status.
Why they are useful:
php artisan migrate.Never edit a migration that has already run in production. Create a new one instead.
NULL, and a table has only one (it can span several columns, a composite key).ON DELETE CASCADE or SET NULL to decide what happens when the parent row is deleted.email. A table can have many. In MySQL and PostgreSQL a unique column can hold several NULLs.CREATE TABLE jobs (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
company_id BIGINT NOT NULL,
slug VARCHAR(255) NOT NULL UNIQUE,
FOREIGN KEY (company_id) REFERENCES companies(id) ON DELETE CASCADE
);WHERE filters rows before grouping. It cannot use aggregate functions.HAVING filters groups after GROUP BY. It can use aggregates such as COUNT and AVG.-- Companies in Kathmandu with more than 5 open jobs
SELECT company_id, COUNT(*) AS open_jobs
FROM jobs
WHERE status = 'open' AND city = 'Kathmandu' -- row filter
GROUP BY company_id
HAVING COUNT(*) > 5; -- group filterThe logical order is FROM → WHERE → GROUP BY → HAVING → SELECT → ORDER BY → LIMIT. Filter in WHERE whenever you can, because it reduces the rows that need grouping.
| Method | Use | Safe | Idempotent |
|---|---|---|---|
GET | read a resource | yes | yes |
POST | create a resource or trigger an action | no | no |
PUT | replace a resource completely | no | yes |
PATCH | update part of a resource | no | not guaranteed |
DELETE | remove a resource | no | yes |
POST /orders calls can create two orders, while PUT /users/5 with the same body twice gives the same result.This matters for retries: clients and proxies can safely retry idempotent requests after a network error. For payments, use an idempotency key to make POST safe to retry.
200 OK, 201 Created (after a POST that creates something), 204 No Content (success with no body).301 Moved Permanently, 302 Found, 304 Not Modified (use the cached copy).400 Bad Request: malformed request.401 Unauthorized: not authenticated (no token or a bad token).403 Forbidden: authenticated but not allowed.404 Not Found.409 Conflict: for example a duplicate email.422 Unprocessable Content: validation errors (Laravel's default).429 Too Many Requests: rate limited.500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable.A frequent interview trap is the difference between 401 and 403.
REST (Representational State Transfer) is an architectural style for APIs built on HTTP. Key ideas:
/jobs, /jobs/42, /companies/7/jobs.GET /jobs lists, POST /jobs creates, PATCH /jobs/42 updates, DELETE /jobs/42 deletes.Content-Type.Good practice: version the API (/api/v1), paginate lists, use plural nouns and avoid verbs in URLs (POST /jobs/42/applications, not /applyJob).
| Cookies | localStorage | sessionStorage | |
|---|---|---|---|
| Size | about 4 KB each | about 5 MB | about 5 MB |
| Sent to the server automatically | yes, with every matching request | no | no |
| Lifetime | until Expires/Max-Age, or the session | until cleared | until the tab closes |
| Readable by JavaScript | unless HttpOnly | yes | yes |
Security notes:
HttpOnly, Secure, SameSite cookies where possible, so an XSS attack cannot read them.localStorage can be stolen by any script running on the page.localStorage for non-sensitive preferences such as the theme or a saved filter.git fetch downloads new commits and branches from the remote and updates the remote-tracking branches (origin/main). It does not change your working files or your current branch.git pull is git fetch followed by a merge (or a rebase, with git pull --rebase) into your current branch.git fetch origin
git log --oneline main..origin/main # see what is new before merging
git pull --rebase origin main # fetch and replay your commits on topFetching first is safer when you want to review incoming changes before integrating them.
A conflict happens when two branches change the same lines of a file (or one deletes a file the other edits), so Git cannot combine them automatically.
git status to see the conflicted files.<<<<<<< HEAD
const API_URL = '/api/v1';
=======
const API_URL = '/api/v2';
>>>>>>> feature/new-apigit add <file>, then git commit (for a merge) or git rebase --continue (for a rebase).To give up and start again, use git merge --abort or git rebase --abort. VS Code's merge editor makes the "accept current / incoming / both" choice easier.
Good commits:
Add password reset email. Add a body explaining why when it is not obvious.feat: add job filters, fix: handle empty salary, docs: update README..env), node_modules or vendor. Use .gitignore.A simple branching workflow (GitHub flow):
main always deployable.feature/job-search, fix/login-redirect.Larger teams may add a develop branch or release branches (Git Flow), but GitHub flow is enough for most projects.