Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Tuhin PaulRank #7 · 71.9K reputationPosted Sep 10, 2025, 7:14 AM EDT
Traditional Programming
How it works:
You (the programmer) define explicit rules (logic, formulas, if/else, algorithms).
The computer applies those rules to input data → produces output.
Program (Rules) + Data → Output
if temperature > 100: print("Fever") else: print("Normal")The computer just follows your instructions exactly.
Machine Learning (ML)
How it works:
You don’t write explicit rules. Instead:
You give the computer data (examples).
You give it the correct answers (labels).
The computer (the ML algorithm) learns the rules by itself by finding patterns in the data.
Data + Output (Examples) → Program (Model)
You provide:
Patient data (age, temperature, symptoms).
Labels (fever = yes/no).
The ML model learns patterns (like “if temp > 100 and cough present, then fever likely”) without you coding those conditions manually.
Then, for new data, it predicts whether the patient has fever.
Tuhin PaulRank #7 · 71.9K reputationPosted Sep 10, 2025, 7:15 AM EDT
Biggest difference is:
Programming = humans write rules.
ML = computer learns rules from data.
Niharika GuptaDevSocial team65.6K reputationPosted Sep 11, 2025, 1:59 AM EDT
Machine Learning (ML) is different from traditional programming in how solutions are created.
In traditional programming, a developer writes explicit rules (input + program → output). For example, you tell the program exactly what to do step by step.
In machine learning, you give the computer data and examples, and the system learns patterns on its own (input + output → program/model). Instead of hardcoding rules, ML algorithms find the logic themselves.
Example:
Traditional programming: Write code to detect spam by manually checking keywords.
Machine learning: Train a model with thousands of emails labeled “spam” or “not spam,” and the model learns the rules automatically.
Traditional programming is rule-based, while ML is data-driven and adaptive.