Daily Highlight
No Result
View All Result
  • Social Issues
  • MOVIE
  • TV
  • CELEB
  • ENTERTAINMENT
  • MCU
  • DISNEY
  • About US
Daily Highlight
No Result
View All Result

Computer Science Student Beats Professor’s 13-Line Record With Zero Lines, Then Professor Suddenly Changes the Rules

by Leona Pham
August 25, 2026
in Social Issues

Some professors love challenging students to think outside the box, right up until somebody ventures much farther outside it than expected.

When an assignment rewards creativity and explicitly encourages every trick imaginable, the cleverest solution may look nothing like the one the instructor had in mind.

One computer science student encountered exactly that situation in a 2009 hardware course taught by a former AMD engineer.

The professor had spent years boasting that nobody had completed his famous memory-testing assignment in fewer than 13 lines of assembly code.

Determined to break the record, the student studied how the processor handled instructions and noticed a loophole hidden inside the assignment rules.

The resulting program technically contained zero counted lines of code and initially left the professor admitting defeat.

Scroll down to see how the trick worked and why the rules mysteriously changed afterward.

A computer science student finds a loophole to beat his professor’s legendary coding challenge with zero lines

Computer Science Student Beats Professor’s 13-Line Record With Zero Lines, Then Professor Suddenly Changes the Rules
not the actual photo

'Least lines of code contest? okay!?'

I was taking a computer science class on computer hardware organization,

taught by a professor who used to work on the AMD chip architecture. He

was a tenured professor, set in his old ways, and felt a bit entitled because

of his past career prestige. Even in 2009, he demanded that \all\ coding

assignments are turned in on 3.5 inch floppy drives. You really had to

scrounge to find an old working floppy drive, even in 2009. He was very

strict and by the book on his policies.

Our professor had been teasing us with an upcoming assignment, saying

that there had been a multi-year contest to see who could write the

assignment program in the least lines of code possible. Historically, the

brightest and smartest student he ever taught accomplished the

assignment in 13 lines of code. Typically, students needed about 100 lines

of assembly code, and the best can usually do it in about 30 lines of code. I

\had\ to win, for bragging rights and all.

We got to writing programs in 6800 assembly code. I had already turned in

a few assignments and gotten the hang of assembly, and spent a bit of

extra time really getting to understand how programs really work under the hood.

So, every program has "registers" which are working blocks of very small

memory on the processor, usually storing a single value. There's also a

"program counter", which is responsible for executing the next instruction

in memory. A program counter doesn't always read instructions in

sequential order, it might bounce around in memory as you call different

functions. I discovered that when we wrote our programs in assembly, they

get converted into binary code, and then the binary code is what gets

executed by the program counter. The program counter was a special

register which could be manipulated to point at a different block of

memory to execute next. Interesting.

What was even more interesting is that the computer didn't care where the

byte data was stored. It just blindly ran whatever byte data you gave it,

without checking whether it was valid memory space for executable

instructions or even if it was a valid instruction. On normal operating

systems, memory gets divided into several regions: stack memory, heap

memory, and instruction space. If you try to run instruction code in heap or

stack memory, usually your operating system pukes and rejects it. But... not

in 6800 assembly. This was a very interesting finding for me.

Finally, the day of the infamous assignment arrives. We are supposed to

write a memory tester. Basically, you have a big block of memory filled with

garbage, you write all zeros to the memory in one pass, verify the memory

values are all zero, then write all ones, verify they're all ones, and if all

memory values are verified, the memory is considered "good" and the

assignment is complete. The professor specifically said, "There is no

cheating here, get creative, use whatever trick in the book you can

imagine." Okay, challenge accepted! I pride myself on thinking far more

creatively than my peers, I have a hacker mindset. No rules? Perfect. He's going to regret that.

Even more interesting were the few rules the professor gave: Precisely

what did not count as a line of code. Three lines did not count: "Start, End,

and DCB." DCB stands for "Declare Constant Block", which just means you

can store some constant values in memory, such as the digits of PI, a few

words, or whatever data you wanted. I immediately saw how I could hack his assignment.

"Does anyone have any questions?" he asked the class. I had a question, but

if I asked it, I would give away the hack and the professor would revise the

rules. So, I kept my mouth shut.

"Good. In all the classes I have taught, the record has been 13 lines of code.

I expect the best of you to get this in about 30 lines of code." He had been

telling this same story for years, to all the classes he taught. Now, it's time

for me to update his story.

So, I wrote my application in about 20-25 lines of assembly code. I spent

many hours shaving off instructions, trying to be as clever as I could. It was

already pretty impressive. But now it was time to "hack" his assignment.

When you write assembly code, it gets converted into constant byte data.

Remember the 'declare constant block' which doesn't count? What if I

just... copy/paste my compiled byte code and put it into the DCB? And then

I put the DCB as the first instruction that gets run? So, I did. And it worked!

The program counter started at the first byte in memory, didn't care that

instruction code was in stack memory, and it just executed it. My whole

assignment was just an unreadable block of byte code pasted into a DCB

and it worked perfectly. Zero lines of code.

I announced on our student message board that I had broken the record

for least lines of code. I had accomplished the impossible, by completing

the assignment in zero lines of code. Other students were astounded and

in disbelief, guessing at how I could have done this. I told them that once

the assignment due date had passed, I would reveal my secret.

We turned in our assignments. No late turn ins, as per professors policy. All

floppy disks had been placed. Finally, the professor asked me to explain

how I had done it. I was a bit sleep deprived (having been awake until 5am), so I wasn't super coherent.

"I took my program and wrote it as small as I could, then I took the

resulting binary and converted it into a DCB, set that as the first block of

data, and the program ran flawlessly." (to paraphrase). "Wait, you can't do

that! That's cheating!" the professor replied in shock. I was ready for this reaction.

Nope, you specifically said that there were no rules and that DCB did not

count as a line of code. So I hacked your assignment on a technicality and

accomplished it in zero lines of code!" I said triumphantly.

I got 'em. The professor couldn't refute me and had to admit that what I

did was clever and he'd have to think about it, and acknowledged I had won his contest.

A week later, he announces to the class that he was riding his bike home

from work, thinking about what I did and he was revoking my 'victory' by

changing the rules of the assignment. Therefore, my entry was 'invalid'. I

was too sleep deprived and unprepared to argue, I didn't care anymore, I

won his silly little game and he's just a sore loser for changing the rules

post-hoc after the game is over. He can't take that away from me. Even if I

counted my actual lines of code, I still outperformed all of my peers.

Few academic victories feel better than discovering that the person who challenged everyone to “get creative” did not anticipate just how literally one student would take those words.

This student was not merely trying to finish an assembly-language assignment.

He had been handed a long-running intellectual contest, told that 13 lines was the legendary record, and explicitly encouraged to use any trick imaginable.

Finding a way to produce a functioning submission that technically contained zero counted lines therefore felt like solving the puzzle hidden underneath the stated puzzle.

Psychologically, the disagreement comes from two definitions of success.

The professor apparently intended students to optimize an assembly program while remaining within an unstated convention about what constituted legitimate code.

The student instead examined the written constraints themselves.

Because DCB declarations explicitly did not count, he encoded the program’s machine instructions as data and exploited the execution model to run them.

When the professor later called this cheating, the student understandably saw moving goalposts rather than clarification.

There is a fresh perspective here, though: the professor’s eventual rule change actually validates part of the student’s achievement.

In engineering and computer science, finding an unintended edge case is valuable information.

A specification that permits an undesirable result is incomplete.

The student’s solution did not merely optimize the program; it effectively performed an adversarial test of the assignment specification.

The student solved the assignment that was specified, while the professor believed he should have solved the assignment that was intended.

Changing the rules for future classes would have been completely reasonable.

Retroactively erasing the achievement is harder to defend after explicitly declaring that virtually any trick was acceptable.

A better teaching response might have been: “You found a loophole. You win this version; nobody gets to use it next year.”

And perhaps that is the most fitting outcome anyway. The student wanted to update the professor’s story.

He succeeded, even if the new story became the reason the rules had to change.

Take a look at the comments from fellow users:

These Redditors criticized professors for changing rules after students had already won fairly

taker223 − \ he was riding his bike home from work, thinking about what I

did and he was revoking my 'victory' by changing the rules of the

assignment. Therefore, my entry was 'invalid'. This clearly violates the core principle of retroactivity by law.

In my country this is protected by constitution (a law cannot have

retroactive effect if it worsens the person's situation, however it can have

retroactive effect if it does improve a person's situation)

WonderWheeler − He changed his rules after the contest, riding home on a effing bike. You won by the stated rules.

Cilreve − I love it when professors change the rules after the assignment is

complete. In one of my engineering classes, machine design, we had a class

project/competition where we had to make a paper shredder (tissue

paper). The group who made the best paper shredder (the one that

shredded the most paper in a minute) would get bonus points toward their grades.

The rules were we could only use your standard take-out bamboo

chopsticks, hot glue, plastic straws, and regular cotton sewing thread.

Beyond that, the rules specifically said that the machine must be more

chopstick than anything else, we had to hand crank it, and there were some

other rules about total dimensions, where the crank needed to be, and some other stuff. Simple rules, right?

Apparently not. The hardest part of the whole thing was making the

driveline. My team and I tried making gears to turn the "shredder", but they

were just too clunky and imprecise. No matter what we did, we just

couldn't make the gears mesh properly. They just kept binding and slipping and skipping.

So, I came up with the idea of making a sheave and belt system. I did that

by making a bunch of X's out of 1" long pieces of chopstick, laying them

arrayed about a circle, and filling the "hub" with hot glue.

This ended up creating a "V" shape where the "belt" (thread) would sit, and

the harder you turned the sheave, the more the belt dug into the "V"

nearly eliminating all slip. It was amazing. We could create some pretty

crazy torque, and that's exactly what was needed to shred the paper.

Come presentation/test time, our shredder outperformed all the other

group's shredders by a significant margin. The professor said it was one of

the best designs he had seen in the 10 or so years he'd been doing the

paper shredder challenge. We were thrilled.

That was until one of the other groups (the group that got second to us)

loudly complained that the sheaves we had made were more hot glue than

chopstick and thus were illegal per the rules.

I argued that the rules (literally) said the whole machine had to be more

chopstick than glue, not each individual part, and we had much more

chopstick than glue as a whole. Furthermore, I argued that I could have

easily filled in the hubs with pieces of chopstick and used much less glue,

but I hadn't because the rules didn't forbid it.

Unfortunately, the professor sided with them and amended the rule right

there. He said the "intent" of the rule was that each individual part must be

more chopstick than glue and our machine was disqualified. I was pissed,

and I let the professor know it, too, by pulling out paper with the rules on it

and showing it to him right there. He didn't care.

I ended up going to his office and talking to him about it. I was on pretty

good terms with the professor, so I thought I could talk him out of his

decision. I didn't need the bonus points since I was carrying an A in the

class, but one of my classmates was on the edge and really needed the points.

Also, I'm competitive as f__k lol Apparently, the group that got second to

us had showed him a kind of wheel they wanted to use that was almost

entirely hot glue, and he had told them they couldn't use that and told

them each part had to be more chopsticks than glue. So, he had to hold us to the same standard as them.

I, of course, told him that he should have announced it to the whole class,

then, and I'd have updated the sheaves to comply with the updated rules.

Thankfully he agreed with me and took ownership of his mistake. He ended

up giving us the bonus points we should have gotten which was just enough to get my groupmate a passing grade.

This group felt the student deserved the victory and hoped the professor did not punish them afterward

Aggressive-Fig-8734 − Was the prof petty enough to have you to redo the

assignment? I hope you at least got a good grade out of it

neonnaps − What a tool. He could have let you have your deserved win and

change the rules for next year. This was just petty. I don't understand how

teachers can be like that. Don't they see that if a student you taught,

outperformence you, it means you did a great job teaching?

These Redditors focused on the technical loophole that allowed executable code to hide inside supposedly excluded lines

minju9 − That's a lot of words to say you compiled assembly into something else and pasted it in.

EV-CPO − \ Precisely what did not count as a line of code. Three lines did

not count: "Start, End, and DCB. " DCB stands for "Declare Constant

Block",  I get "start" and "end" not counting, but why was this a rule? It

seems pretty obvious that you could stuff executable code in there, it's

kinda surprising nobody else thought of this, it's not such an obscure vector.

The professor invited creativity, declared that DCB didn’t count, and said there was effectively no cheating, so the student treated the assignment like the hardware itself: follow the literal rules, not their intended meaning.

Zero lines may have violated the spirit of the contest, but changing the rules afterward also makes that original victory difficult to erase.

At minimum, it demonstrated exactly the kind of low-level understanding the course was supposed to teach.

Do you think the professor was right to revoke the record, or was he simply outsmarted by his own rules?

WHAT DO YOU THINK OF THIS STORY?

WHAT DO YOU THINK OF THIS STORY?

OP Is Not The AH (NTA) 1/1 votes | 100%
OP Is Definitely The AH (YTA) 0/1 votes | 0%
No One Is The AH Here (NAH) 0/1 votes | 0%
Everybody Sucks Here (ESH) 0/1 votes | 0%
Need More INFO (INFO) 0/1 votes | 0%

Leona Pham

Leona Pham

Hi, I'm Leona. I'm a writer for Daily Highlight and have had my work published in a variety of other media outlets. I'm also a New York-based author, and am always interested in new opportunities to share my work with the world. When I'm not writing, I enjoy spending time with my family and friends. Thanks for reading!

Related Posts

Single Mother Who Endured Family Cruelty During Hardship Now Faces Financial Plea From Her Brother
Social Issues

Single Mother Who Endured Family Cruelty During Hardship Now Faces Financial Plea From Her Brother

4 months ago
She Realized Her Friend Had Been Using Her as an ATM — And Things Exploded
Social Issues

She Realized Her Friend Had Been Using Her as an ATM — And Things Exploded

3 months ago
Mother Tells Daughter To Move Out After Getting Pregnant Again
Social Issues

Mother Tells Daughter To Move Out After Getting Pregnant Again

4 months ago
Twin Wears Glam Dress And Makes Cruel Speech At Sister’s Engagement—Bride Explodes And Bans Her From The Wedding
Social Issues

Twin Wears Glam Dress And Makes Cruel Speech At Sister’s Engagement—Bride Explodes And Bans Her From The Wedding

1 year ago
Traumatized Wife Sneaks Kids To Meet Dying Abusive Parents Behind Husband’s Back, His Reaction Shocks Her In Return
Social Issues

Traumatized Wife Sneaks Kids To Meet Dying Abusive Parents Behind Husband’s Back, His Reaction Shocks Her In Return

9 months ago
Dad Accuses Ex-Wife Of “Flaunting Wealth” After Their Kids Cry Over A Disney Cruise
Social Issues

Dad Accuses Ex-Wife Of “Flaunting Wealth” After Their Kids Cry Over A Disney Cruise

9 months ago

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

POST

Email me new posts

Email me new comments

Save my name, email, and website in this browser for the next time I comment.




  • Trending
  • Comments
  • Latest
“Your Daughter or My Son?” – She Chose to Protect Her Child and Kicked Them Out

“Your Daughter or My Son?” – She Chose to Protect Her Child and Kicked Them Out

August 4, 2025
Teen Refused To Give His Cousin A Free Honeymoon After She Didn’t Invite Him To Her Wedding

Teen Refused To Give His Cousin A Free Honeymoon After She Didn’t Invite Him To Her Wedding

August 11, 2025
Brother’s Wife Stole Their Baby Name – So Parents Secretly Swapped It and Left Her Furious

Brother’s Wife Stole Their Baby Name – So Parents Secretly Swapped It and Left Her Furious

September 12, 2025
Roommates Boldly Try To Evict Woman, Discover Too Late It’s Actually Her Home All Along

Roommates Boldly Try To Evict Woman, Discover Too Late It’s Actually Her Home All Along

December 9, 2025
‘All The Queen’s Men’ Is Getting The Second Season On BET+

‘All The Queen’s Men’ Is Getting The Second Season On BET+

2
Wife Threatens Divorce After Husband Ignores Daughter Over Misophonia And College Prep

Wife Threatens Divorce After Husband Ignores Daughter Over Misophonia And College Prep

2
Dad Sells His Teen Son’s Christmas PS4 To “Protect His Grades,” Brother Explodes And Family Turns Against Him

Dad Sells His Teen Son’s Christmas PS4 To “Protect His Grades,” Brother Explodes And Family Turns Against Him

1
Graduating 22-Year-Old Bans Sister’s Shady Fiancé From Graduation Party, Due To Alarming Reasons

Graduating 22-Year-Old Bans Sister’s Shady Fiancé From Graduation Party, Due To Alarming Reasons

1
Dad Refuses To Let Ex Homeschool Their Son After Years Of Stable Public School

Dad Refuses To Let Ex Homeschool Their Son After Years Of Stable Public School

August 24, 2026
Grandchild Finds Mystery Basement Switch, Then A Neighbor’s Garden Gnome Starts Glowing

Grandchild Finds Mystery Basement Switch, Then A Neighbor’s Garden Gnome Starts Glowing

August 24, 2026
Neighbor Sends “Demand Letter” Ordering Homeowner To Restore A View He Never Owned

Neighbor Sends “Demand Letter” Ordering Homeowner To Restore A View He Never Owned

August 24, 2026
Neighbor Tears Up Man’s Yard To Widen Driveway, So Homeowner Finally Gets An Attorney

Neighbor Tears Up Man’s Yard To Widen Driveway, So Homeowner Finally Gets An Attorney

August 24, 2026

Recent Posts

Dad Refuses To Let Ex Homeschool Their Son After Years Of Stable Public School

Dad Refuses To Let Ex Homeschool Their Son After Years Of Stable Public School

August 24, 2026
Grandchild Finds Mystery Basement Switch, Then A Neighbor’s Garden Gnome Starts Glowing

Grandchild Finds Mystery Basement Switch, Then A Neighbor’s Garden Gnome Starts Glowing

August 24, 2026
Neighbor Sends “Demand Letter” Ordering Homeowner To Restore A View He Never Owned

Neighbor Sends “Demand Letter” Ordering Homeowner To Restore A View He Never Owned

August 24, 2026
Neighbor Tears Up Man’s Yard To Widen Driveway, So Homeowner Finally Gets An Attorney

Neighbor Tears Up Man’s Yard To Widen Driveway, So Homeowner Finally Gets An Attorney

August 24, 2026

Browse by Category

  • Blog
  • CELEB
  • Comics
  • DC
  • DISNEY
  • ENTERTAINMENT
  • Illustrations
  • Lifestyle
  • MCU
  • MOVIE
  • News
  • NFL
  • Social Issues
  • Sport
  • Star Wars
  • TV

Follow Us

  • About US
  • Contact US
  • Privacy Policy
  • Terms of Service
  • Syndication
  • DMCA
  • Sitemap

© 2024 DAILYHIGHLIGHT.COM

No Result
View All Result
  • Social Issues
  • MOVIE
  • TV
  • CELEB
  • ENTERTAINMENT
  • MCU
  • DISNEY
  • About US

© 2024 DAILYHIGHLIGHT.COM