Programming & Data: interview questions and learning guide
JavaScript, SQL, APIs, Git and testing
Practise Programming & Data on Padimachi
What you will learn
JavaScript basics
A Swiss-army knife for the web: it runs in browsers and on servers.
JavaScript makes web pages interactive and also runs server code. Variables hold values, functions package logic, and arrays and objects store collections. Asynchronous code lets slow tasks run without freezing the page.
Interview tip: Use const by default, let when a value changes, and avoid var.
SQL & Databases
A spreadsheet that can answer questions across millions of rows.
A relational database stores data in tables of rows and columns. SQL reads and changes it: SELECT reads, INSERT adds, UPDATE changes and DELETE removes. JOIN combines tables and an index makes searches faster.
Interview tip: Always filter with WHERE before you UPDATE or DELETE.
APIs & HTTP
A waiter between the kitchen and your table.
An API is a contract that lets one program ask another for data or actions. Requests go to an endpoint with a method such as GET or POST, and the response carries a status code and usually JSON.
Interview tip: Name the method, the endpoint and the status code when you explain an API call.
Git & Version Control
A time machine for your project that also lets a team work in parallel.
Git records every change as a commit so you can go back and compare. Branches let people work separately, and a pull request lets others review before the work is merged.
Interview tip: Write commit messages that say why, not just what.
Testing & QA
A safety net that catches problems before customers do.
Testing checks that software does what it should. Unit tests check small parts, integration tests check parts together, and regression tests make sure old features still work. Good bug reports let anyone reproduce the problem.
Interview tip: A good bug report has steps, expected result, actual result and evidence.
Python basics
Python is like plain English with strict punctuation: easy to read, easy to start.
Python is a general purpose language used for scripts, web apps, data work and automation. You write code without type declarations, and indentation decides which lines belong together. Core types are numbers, strings, lists, tuples, dictionaries and sets. You control flow with if, for and while, and you reuse code with functions and modules. Most jobs also expect you to read files, handle errors and install packages.
Interview tip: Be ready to explain the difference between a list and a tuple, and to write a small loop live without an editor.
Data structures and algorithms
Choosing a data structure is like choosing a container: a shelf, a stack of plates or a queue at a counter.
Data structures decide how data is stored, and algorithms are the steps that work on it. Arrays give fast access by position, linked lists give easy insertion, stacks and queues control order, and hash tables give fast lookup by key. Trees and graphs model hierarchies and networks. Big O notation describes how running time grows as input grows. Interviews test whether you can pick the right structure and explain its cost.
Interview tip: Always state time and space complexity out loud after you write a solution.
Object-oriented programming
A class is a blueprint for a house, and each object is a house built from it.
Object-oriented programming organises code around objects that hold data and behaviour together. A class defines the fields and methods, and an object is one instance of it. The four pillars are encapsulation, abstraction, inheritance and polymorphism. Good design keeps classes small, hides internal details and prefers composition when inheritance gets messy. The same ideas appear in Java, C sharp, Python and many other languages.
Interview tip: Give one real example for each of the four pillars instead of reciting definitions.
Async JavaScript and the DOM
A restaurant waiter takes your order and serves others while the kitchen cooks, instead of standing and waiting.
JavaScript runs one task at a time, but it never blocks if you use asynchronous code. A callback, a promise or async and await lets a slow task such as a network call finish later. The event loop picks finished tasks and runs them when the main thread is free. The DOM is the live tree of page elements, and you select, change and listen to it from code. Together these give pages that update without reloading.
Interview tip: Know the order in which a promise callback and a setTimeout callback run, because interviewers love that puzzle.
Backend and database design
A backend is the kitchen of a restaurant: customers never see it, but every dish depends on it.
A backend receives requests, checks who is asking, runs business rules, talks to a database and returns a response. Good database design starts with entities and relationships, then normalisation removes repeated data by splitting tables. You choose keys, indexes and constraints to keep data correct and fast. Around this sit authentication, validation, logging and caching. Clean layers, such as routes, services and data access, keep the code testable.
Interview tip: When asked to design a schema, draw entities first, then keys, then ask which queries must be fast.
Linux and command line
The command line is a direct phone line to the computer, with no menus in between.
Most servers run Linux, so developers and support engineers use the terminal daily. You move around with cd and ls, read files with cat and less, and search with grep and find. File permissions control who can read, write or run a file. Pipes connect small commands into powerful chains, and shell scripts automate repeated jobs. Remote work uses ssh, and cron schedules tasks.
Interview tip: Practise explaining chmod 755 in words, because permission questions come up in almost every Linux interview.
Interview questions and sample answers
GET reads data and has no body; POST creates data and sends a body. GET is safe to repeat while POST usually is not.
Gather logs, steps and environment details, form hypotheses, test them one by one and add monitoring.
== compares after type conversion; === compares value and type with no conversion. Prefer === to avoid surprises like 0 == '' being true.
var is function scoped and hoisted; let and const are block scoped. const cannot be reassigned, though an object it holds can change. Use const by default.
A REST API exposes resources over HTTP. GET reads, POST creates, PUT or PATCH updates, DELETE removes. Responses use status codes such as 200, 201, 400, 404 and 500.
INNER JOIN returns only rows that match in both tables. LEFT JOIN returns every row from the left table and fills missing right-side values with NULL.
Git tracks changes in code. For a conflict, open the marked files, choose or combine the correct lines, remove the markers, stage the file and commit.
A list is mutable and a tuple is immutable. Tuples are slightly faster and can be dictionary keys; lists suit data that changes.
An index speeds up reads on a column by keeping a sorted structure. It slows inserts and updates and uses space, so index only columns used in filters and joins.
Binary search takes O(log n) because each step halves the range. Unsorted data needs a linear O(n) scan.
A function that remembers variables from the scope where it was created, even after that outer function has finished.
A style for web APIs that uses HTTP methods like GET, POST, PUT and DELETE on resources identified by URLs, usually returning JSON.
Git is version control. It tracks changes, lets many people work on branches and merge safely, and lets you go back to an earlier version.
A way to describe how the running time or memory of an algorithm grows with input size, for example O(n) linear or O(log n) logarithmic.
A process has its own memory. Threads live inside a process and share its memory, so they are lighter but need care to avoid conflicts.
Reproduce it, read the error, print or log values, use a debugger, narrow down to the smallest failing case, fix and add a test.
Padimachi is free. Content is general learning material, not a promise of a job. Privacy