DEV Community

Chaesang Jung
Chaesang Jung

Posted on • Originally published at ieumtech.net

Trade-off: The First Word I Was Told to Carry for Life

Before I understood what engineering was, a professor handed me a word to look up in a dictionary. I've been using it ever since.

A look back — long before any of the tools we argue about now.

Engineering, before I knew the word

In Korea, boys in middle school took a subject simply called "Technology," and high schools offered an elective called "Industrial Arts." Mine taught "Commerce" instead — so my entire pre-college image of engineering came down to a screwdriver, a few nails, and an AM radio kit I'd soldered together. No Lego that I can recall, but I remember playing with science kits, and blowing my allowance on Academy plastic models. The closest thing to "advanced study" was learning to read resistor values off their color bands — black, brown, red, orange, yellow, green, blue, violet, gray, white. That was the whole of my hardware education.

I walked into a computer engineering department without ever really asking myself what engineering was. What I noticed first, honestly, was the gender ratio: about one in ten classmates was a woman, which — after six years in all-boys middle and high schools — was its own small culture shock. Having women as classmates and seniors at all felt like news.

The first word

Our first major course was "Introduction to Computer Engineering," which in practice meant learning C. We could finally touch the machines at school; you did your homework in Turbo C and handed it in on a floppy.

I can't forget Professor Sang Lyul Min, one of the second class our department ever graduated. One day he said, "Let me give you a few fundamental words you'll need for the rest of your life." The first was trade-off. This was before the internet was something you could just search, so I went home and dug it out of a Korean–English dictionary, like a piece of slang I'd never heard.

From that one word I learned three things at once: that there's no free lunch; that this is exactly where engineering parts ways from science; and why the comparison with mathematics would keep coming back. The further I went into my career — and the more decisions I had to actually own — the more that word kept surfacing.

The word that kept coming back

It showed up in my algorithms course, the moment we started weighing time complexity against space complexity. It showed up again and again as I began reading papers, as a way of making sense of the world. If someone asked me today what engineering is — or made me pick a single word for it — I wouldn't hesitate.

I'd say: trade-off.


Adapted from my Korean essay on Brunch: brunch.co.kr/@chaesang/32

Top comments (13)

Collapse
 
algorhymer profile image
algorhymer

So... dev.to once again shadowdeleted my comment because of ???.

So TLDR:
You did not lose anything.
Solve the puzzle, the quirk is that the input is what I showed.
Normal FAANG/LeetCode way will not work.

Collapse
 
chaesang profile image
Chaesang Jung

Sorry for the slow reply — traveling these weeks, so updates are spotty.

And sorry your comment got eaten — for what it's worth, this thread got me actually doing AoC properly, and I'm enjoying it. The two cranes were a nice touch: same moves, different machine, different answer.

Since your monster only exists as a screenshot, I'm building my own generator at the same scale — six stacks, tens of thousands of crates, move counts like yours. Same shape, fully reproducible. Playing with the (large) test data by itself is annoying though.. :(

One thing before the numbers: if we're talking 'trade-off' in the narrow sense, I'd start by clarifying which one we're sacrificing first — e.g. time or space or even with some sort of clarifications ahead. Comparing apple to orange may not work though... Once LC style works, I'll playing with the numbers with my Macbook.

Collapse
 
algorhymer profile image
algorhymer

If you look at the input format closely...
The stacks are labeled with one digit '0' - '9'.
But if you consider the move command move 984234 from 5 to 4...
That is not bounded syntactically.
Now one could argue that: okay but let's say we change the input schema a bit, so the stacks can be labeled with long digit chains like 541943 too.

Okay. I get that.

My first point is:

  • S is the number of stacks
  • M is the max of all m, where m is a move m from x to y command
  • C is the number of commands

My second point is:
If you execute the commands, the problem statement guarantees that you'll not pop an empty stack for example.
Aka: The commands are valid.

My conjecture is that this might be a deeply misunderstood programming puzzle.
People are solving this in a good cop way.
I linked earlier a scene from Sicario's border ambush.
I think that scene offers a different perspective on this problem:
In this mission, you are not a good cop, not a lawful cop.
You are not here to be a DSA hero, or to make sure that the bad guys get design pattern treatment.
You are CIA, and you have a single mission: Get the solution.
US Congress does not care what you do and how you do it, as long as you get the solution.
You need to be really discrete.

Thread Thread
 
algorhymer profile image
algorhymer

Maybe my Sicario metaphor does not work...

Maybe.... maybe movie actress Clémence Poésy's performance here would work better?

Collapse
 
algorhymer profile image
algorhymer

Hi there Sir, are you interested in a little short programming puzzle challenge about tradeoffs?
I think it would be fun for you, but of course it might be not your cup of tea, or you might simply not have the time.

But I must ask: Would you like to hear a little programming puzzle about tradeoffs?

would-you-like-to-hear-my-tall-tale

Collapse
 
chaesang profile image
Chaesang Jung

Sure, I'd love to hear it — I'm curious. 😄

Collapse
 
algorhymer profile image
algorhymer

This challenge is not "Can you do it? Y/N"
With your resume that's not a question: You can do it.

Question is how you do it? And why the how?
It is: Advent of Code 2022 Day 05
I don't want to constrain your creativity, but one 'how' example:
Your language of choice for example.
Why that language? Did you choose it out of a technical reason?
Maybe you'll choose that language to tell about a cool anecdote?
Who knows?
Maybe it'll be about something that you personally hold dear or important or heck... maybe you just want to have some punk fun.

I want to be clear: Yes I know you can solve it.
But what if I wasn't a manager breathing down your neck about the end date?
Would you express something besides just giving out an answer?
Aka: How do you function, if I don't give a good prompt?
LLMs produce crazy things.
I believe humans - or at least some - perform better under freedom.
I cannot be sure, but I hope, there's a real difference between machine hallucination and human fantasy. I have no undeniable proof for that, but one must believe that we are - a tiny bit - more than mere machines.

And there'll be trade off:
If you choose to make a literal ascii Mona Lisa out of the source code, readability will be low.
But on the other hand it'll be modern art.
The rationality behind taking the tradeoff might be even more important than the trade off itself.

This is the 'challenge'.
You can still say no, if you think it is dumb, or you simply do not like it.

My personal interest in this question:
I have a how, and I want to see other people's how.

Thread Thread
 
chaesang profile image
Chaesang Jung

A few thoughts.

  • First — thanks for the nudge toward Advent of Code. I hadn't really gotten into it before, and it's a fun rabbit hole. Glad you pointed me there.
  • As for the "how" — honestly, mine might be a small letdown for the ASCII-Mona-Lisa hope, and that's kind of my answer.
  • When I talk through a problem like this, I reach for Python and just poke at it interactively. It's my thinking-out-loud language.
  • Code-as-art has never been a trade-off for me. The moment someone else has to read my code, readability isn't something I'd trade away — so I've honestly never even considered it. That's just not where my trade-offs live.
  • Where they do live: what do I give up to actually solve the problem? For most of my career it came down to the same triangle — money, execution time, memory. It's very hard to get all three.
  • Fun fact: for my Google interview I prepped three sessions on recursion. In the 15 years since, I haven't written a single line of it in real work.
  • And maybe that's the real reason I think this way: every line of code I write is left behind as debt.
Thread Thread
 
algorhymer profile image
algorhymer

I was consciously derailing you into hallucination, Jon.
I'm a naughty girl.

Small Hint:
AoC has input like move 2 from 5 to 4.
Consider my girly input:
input

Welcome to Juarez

Thread Thread
 
chaesang profile image
Chaesang Jung

Ha — you got me, and I love why. The word "crane" quietly capped my imagination at maybe ten crates. I pictured a physical machine, so "move 16172" was simply outside what I let myself imagine — crane, therefore real, therefore small. That was the trap.

That's about as human a way to lose as it gets: the word set the scale before I could. Well played. :)

Collapse
 
algorhymer profile image
algorhymer

Most insightful: your article caught the problem, and moved it to an Engineering level of discussion.
All in all: Big thanks!
I am really excited about those older memories you talked about!
School was such a cool thing for me as well, and education helped me discover not just science, and math, but also fun!

Some comments may only be visible to logged-in visitors. Sign in to view all comments.