Skip to content
Home/United Kingdom/Dunfermline
Dunfermline, Fife

Coding classes in Dunfermline

What are the best coding classes in Dunfermline?

Fife, the council area that includes Dunfermline, had about 370,400 usual residents at Scotland's 2022 census, rounded to the nearest hundred by National Records of Scotland. Andrew Carnegie wrote that he was born in Dunfermline on 25 November 1835, in a house at the corner of Moodie Street and Priory Lane. Dunfermline learners aged six to sixty-seven meet our teachers in India in live video lessons, one to one or in a class of five to ten at the same stage, at times fitted around Scottish school days and working hours. The first lesson is free; after that a group place costs USD 100 a month and one-to-one teaching USD 150 a month.

Before his fortune, Andrew Carnegie was a telegraph messenger, and in his autobiography he describes learning to take a message by ear. A telegraph line could garble a message; so can any cable or radio link today. Our Dunfermline project sends Carnegie's entire autobiography, 669,829 characters, through a simulated line that flips one bit in every hundred at random. Sent plainly, 51,518 characters arrive wrong. Wrapped in a Hamming code, which adds three check bits to every four and can find and fix any single flipped bit, only 2,682 do. Teenagers build the code, run the line and check every result against the formula that predicts it.

Facts last verified 23 September 2026. Teaching is online; no Dunfermline branch is claimed.

Course picks for Dunfermline

Four courses for Carnegie's birthplace

Start from what the learner already enjoys and choose the nearest course. Every one begins with a free live lesson, and booking it asks for no payment details.

Browse the course atlas for more than one hundred options and use the coding roadmap to check prerequisites.

The four we are known for

Python, AI, vibe coding and agentic coding

These run underneath everything above. Every one is live and online, placed by ability rather than by age, and the first class is free.

Dunfermline today

A city within a closely settled Fife

Scotland's Census 2022 first results from National Records of Scotland, which publishes figures for council areas rounded to the nearest hundred. Dunfermline sits within Fife.

Fife and Scotland, Scotland's Census 2022 (rounded) and 2011
AreaUsual residents, 2022Usual residents, 2011Residents per square kilometre, 2022
Fife370,400365,198279.5
Scotland5,436,6005,295,40369.8

Households

Fife had about 169,600 households with at least one usual resident in 2022, against 160,952 at the 2011 census.

Children and older residents

In Fife, 15.6% of residents were aged 0 to 14 and 21.6% were 65 or over, against 15.3% and 20.1% across Scotland.

Closely settled

At 279.5 residents per square kilometre, Fife is far more densely settled than Scotland as a whole, which averages 69.8.

Because National Records of Scotland rounds every 2022 figure separately to the nearest hundred, the parts may not add exactly to the totals, and we quote each as published. Our Dunfermline classes draw on the city and the Fife villages around it. A Brucefield eight-year-old making a first game, an S4 pupil from Townhill working towards National 5 Computing Science and a Crossford adult learning Python for a new role could each join a different class, placed by level.

Carnegie's town

A weaver's son, an abbey and a birthplace museum

From Andrew Carnegie's own autobiography, and from Historic Environment Scotland's listing records.

25 November 1835

Carnegie writes that he was born in the attic of a small one-storey house at the corner of Moodie Street and Priory Lane, that his father was a damask weaver, and that Dunfermline had long been noted as the centre of Scotland's damask trade.

1818 to 1821

Historic Environment Scotland dates the New Abbey Parish Church at Dunfermline Abbey to William Burn in these years, with alterations in 1905; its tower balustrade spells out the words KING ROBERT THE BRUCE in stone.

25 June 1925

The Andrew Carnegie Birthplace Memorial carries an inscription recording that the first sod was turned on this date by his daughter, Margaret Carnegie Miller, and that the building was the gift of his wife, Louise Whitfield Carnegie.

Historic Environment Scotland lists the Abbey church and the nave at Category A, and the birthplace memorial at 2-4 Moodie Street and 5 Priory Lane at Category B, recording that the properties passed to the Carnegie Dunfermline Trustees in 1910 and that a lintel is inscribed with the years 1835 to 1919. It also lists a statue of Carnegie and the Louise Carnegie Memorial Gateway in Pittencrieff Park. We have no connection with Historic Environment Scotland, the Abbey or the Carnegie trusts, and the history here is taken from their published records and from Carnegie's own words.

Where the text comes from

Project Gutenberg publishes the Autobiography of Andrew Carnegie as a free ebook, number 17976. We use the body of the book, 117,001 words and 669,829 characters, exactly as published.

Signature project

Could Carnegie's story survive a noisy line?

A Hamming code sends every four data bits with three extra check bits, each checking a different overlapping group. If one bit flips on the way, the pattern of failed checks, called the syndrome, points to exactly which bit it was, and the receiver flips it back.

Characters of Carnegie's autobiography (669,829 in all) that arrive wrong, when each bit is flipped at random with the stated chance
Chance a bit flipsSent plainlyHamming code (75% more bits)Every bit sent three times (200% more bits)
1 in 1,0005,223329
1 in 10051,5182,6821,616
1 in 20224,37558,26637,687

1. Text to bits

Turn every character of the book into eight bits, 5,358,632 bits in all, and split each character into two halves of four bits.

2. Add the checks

Give each half three parity bits, so every group of four becomes a codeword of seven. On arrival, recompute the checks; a mismatch names the bit to flip back.

3. Compare with theory

A plain character fails if any of its eight bits flips; a Hamming codeword fails only if two or more of its seven do. At 1 in 100 the formulas predict 7.73% and about 0.41% of characters wrong; the simulation gives 7.69% and 0.40%.

Why not just send everything three times?

Repetition works: send each bit three times and take the majority, and at 1 in 100 only 1,616 characters arrive wrong. But it triples the message, 16,075,896 bits instead of 5,358,632. The Hamming code sends 9,377,606 bits, 75% more rather than 200% more, and still cuts the errors from 51,518 to 2,682. It is not the strongest protection here, but it buys most of the benefit for far less extra traffic, which is the trade-off every error-correcting code has to strike.

The last row shows the limit. When one bit in twenty flips, two errors in the same seven-bit codeword become common, and a Hamming code, built to fix one, gets them wrong: 58,266 characters still arrive damaged. Every code is designed for a certain level of noise, and choosing the right one means measuring the line first. That, rather than any single number, is the engineering lesson.

Error-correcting codes

Five checks before trusting a code

Learned on Carnegie's autobiography, then used for QR codes, memory chips, satellite links, file storage and any message that has to arrive intact.

Decisions behind the Dunfermline telegraph simulation
QuestionFor the Carnegie textWhat goes wrong if you skip it
Does the code fix every single error?All seven single-bit flips tested by syndromeA mis-wired check bit that fixes the wrong bit
Does the simulation match the maths?Every result compared with its formulaA bug that looks like a result
How much extra does it cost?75% more bits for Hamming, 200% for repetitionProtection bought at any price
What noise is it built for?Tested at 1 in 1,000, 1 in 100 and 1 in 20A code used beyond the noise it can handle
Is the randomness repeatable?A fixed seed, so every run gives the same countsResults nobody else can reproduce

The second row carries the project. At every noise level the simulated counts sit close to what probability predicts, and where they differ slightly, as at 1 in 1,000 with 32 Hamming errors against about 28 expected, the gap is the ordinary wobble of a random experiment of this size. A simulation that disagreed badly with its own theory would point to a bug, not a discovery.

Younger learners

Sending secret messages with a parity rule, and catching the one card a friend secretly turned over.

Teenagers

Binary, parity, matrices and the Hamming (7,4) code in Python, with a simulated noisy line and probability checks.

Adults

How storage, networks and QR codes survive errors, and how to weigh protection against extra cost.

We have no connection with Project Gutenberg, Historic Environment Scotland, National Records of Scotland or Fife Council. The book, listing records and census tables are published openly; the encoding, simulated noise and counts on this page are our own work.

Learning ladder

From secret messages to Hamming codes

Think of the ages as rough bands; the free lesson places each learner properly.

Ages 6 to 10

Codes and signals

Secret-message games and simple signals between sprites in block code.

Scratch Coding for KidsCoding for Kids
Ages 11 to 13

Binary and parity

Turning letters into bits in Python and adding a parity bit to catch a single mistake.

Python and AI for KidsMaths Through Coding
Ages 14 to 18

Codes that correct

Hamming codes, syndromes, simulation and probability, checked against exact formulas.

Problem Solving for TeensPython for Teens
Ages 18 to 67

Reliable data

Error detection and correction in networks, storage and file formats, and the cost of each safeguard.

Data Structures & Algorithms CoursePython Masterclass
Coding and AI

AI moves enormous amounts of data. Why should a Dunfermline teenager learn how a single bit is saved?

Because every model, file and message depends on data arriving exactly as sent, and the tricks that guarantee it are simple enough to build by hand.

Data moving between machines is protected by error-correcting codes of this general kind, adding check bits so that damage can be found and repaired. A learner who has flipped bits in Carnegie's book and watched three check bits repair them understands something most users of technology never see.

The project also teaches a habit AI rarely models: compare every experimental result with a theoretical prediction. When the simulation says 0.40% and the formula says about 0.41%, you can trust both. When they disagree, you have found a bug, and finding it is the valuable part.

So a Dunfermline teenager should keep learning to code in 2026, in the town where Carnegie was born in 1835: machines send the data, but people design the codes that keep it whole. The longer argument is in why coding is worth learning in 2026.

Delivery

Abbey Parks, Headwell or Crossford, all in one class

Dunfermline's learners live across the city and in the Fife villages around it. Online, every one of them is equally close to the lesson.

City and villages

A learner in Garvock Hill and another in Cairneyhill can share a class without anyone taking a bus.

Scottish stages

P1 to P7, S1 to S6, then National 5, Higher and Advanced Higher: our levels use the names Scottish schools use, and every lesson is taught in English.

The free lesson

The learner builds something real in the first session, and the teacher then suggests a level, a course and a weekly time. No card is ever needed.

Classes by level

Five to ten learners at one stage, from Dunfermline, the rest of the UK and abroad, so every level has good times to choose from.

Two lessons a week

Two fixed lessons weekly, around eight a month, with school holidays and exam leave agreed with the teacher well ahead.

Evening in India

India keeps one time all year, so a 5 pm class in Fife starts at 21:30 for our teachers during British Summer Time and 22:30 in winter.

Across Fife

Learners in Rosyth, Limekilns, Kingseat or Halbeath join exactly the same classes, since every lesson is online and classes are grouped by level.

Fees

Dunfermline lesson fees

A free first lesson, then one fee each month.

First classUSD 0

A complete lesson without charge, ending with a suggested level, course and weekly time.

Group tuitionUSD 100

About eight live lessons a month in a class of five to ten learners at one stage.

Private tuitionUSD 150

About eight live lessons a month, with a teacher for your learner alone.

Families in Bellyeoman or Townhill pay in US dollars, like every family outside India, and our site shows no pound prices. No charge is made until after the free lesson, once a course and weekly time are agreed with us; the pricing page explains pauses, missed lessons and changes between group and one-to-one teaching.

Reviews

Six family reviews from Google, word for word

Rated 4.9 across 547 Google reviews. These are real reviews, reproduced as written.

★★★★★

"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."

Ria Mukherjee

Parent

★★★★★

"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."

Samriddha Mondal

Student

★★★★★

"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."

Vansh Agarwal

Student

★★★★★

"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."

Sonam Oswal

Parent of Dhairya

★★★★★

"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."

Sonu Goyal

Parent

★★★★★

"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."

Ritu Kedia

Parent

Free placement class

Book a free lesson for a Dunfermline learner

The first lesson fits the learner: a secret-message parity game for a young child, a short Python program that turns a name into binary for a beginner, or Carnegie's autobiography and a Hamming code for a teenager ready for real engineering.

+44

FAQ

Dunfermline coding class questions

What Dunfermline families most often ask us.

How many people live in Fife?

Scotland's Census 2022 counted about 370,400 usual residents in Fife, the council area that includes Dunfermline, rounded to the nearest hundred, against 365,198 in 2011. National Records of Scotland publishes these first results for council areas.

How does Fife compare with Scotland?

Fife is far more densely settled, at 279.5 residents per square kilometre against 69.8 for Scotland, and 21.6% of its residents were 65 or over in 2022, against 20.1% across Scotland.

What is a Hamming code?

A way of adding check bits to data so that a single flipped bit can be found and corrected. The (7,4) version sends every four data bits as seven, and the pattern of failed checks points to the bit that went wrong.

How much does a Hamming code help?

Sending Carnegie's autobiography through a line that flips one bit in a hundred, 51,518 of its 669,829 characters arrive wrong when sent plainly, and 2,682 with a Hamming code, at the cost of 75% more bits.

Where does the text come from?

From Project Gutenberg's free ebook of the Autobiography of Andrew Carnegie, number 17976. We are not connected with Project Gutenberg.

Where was Andrew Carnegie born?

In his autobiography Carnegie writes that he was born in Dunfermline on 25 November 1835, in the attic of a small house at the corner of Moodie Street and Priory Lane. Historic Environment Scotland lists the birthplace memorial there at Category B.

When do Dunfermline lessons run?

Dunfermline families usually choose a time after school, on a weekday evening or at the weekend, and we settle it in the free lesson. Our teachers in India are four and a half hours ahead of Scotland in British Summer Time and five and a half hours ahead in winter.

Is there a Dunfermline centre?

No. We have no centre in Dunfermline or anywhere else in the UK, as every lesson is live online. Learners need a computer with sound and a steady connection, and our phone number is Indian.

What do Dunfermline lessons cost?

The first lesson is free. After it, a group place costs USD 100 a month for two live lessons a week, about eight a month, with five to ten learners, and one-to-one teaching on the same timetable costs USD 150 a month. Nothing is charged until the course, format and time are agreed.

How are learners grouped?

By level, pace and goals rather than age or where they live, with five to ten learners at the same stage. If no group fits the learner's week, we offer one-to-one lessons.

Explore Scotland and the UK

Scotland and beyond

Across the Forth, the Edinburgh page works out why summer nights there never go properly dark, and up the coast Dundee tests weather forecasts against plain baselines. The Scotland guide covers the Curriculum for Excellence, with exam support on the National 5 and Higher Computing Science pages, and every other city is linked from the UK coding page.

Free Dunfermline classCall +91 91233 66161

Keep exploring Modern Age Coders

Coding classes in nearby cities

Learn more

Free resources

From the blog

Start here