DEV Community

What is the Most Difficult Thing You Ever Had to Code?

Anita Olsen on June 10, 2025

I believe the most difficult thing I ever had to code was my web page. Not so much the one I have now but the layout I originally intended for it. ...
Collapse
 
ben profile image
Ben Halpern

The content of the question reminds me of when we used to use images to create rounded corners on websites before CSS3.

The crazy thing is how obsessed we were with bizarre page layouts that necessitated these hacks. People had fewer tools and also designed crazier websites. They were always difficult.

But the real answer to the question for me are any times when the code needs to be in tight coordination with deployment as to not break anything. Meaning caches or data typically. Those are the toughest challenges I have to deal with.

Collapse
 
phalkmin profile image
Paulo Henrique

Deploying without breaking prod is a skill that you only acquire after messing up

Collapse
 
arison99 profile image
Arison99

I have worked on an exam monitoring system using websockets for webrtc and malpractice alerts in real time. Another project was when i had to use mqtt to connect to an embedded device & provide real time monitoring with AI predictions served from a pipeline for 3 models via websockets in React, i had to also include real time messages via websockets with in app caching for chats. I'm currently building a web based 3d model editor.

Collapse
 
ravavyr profile image
Ravavyr

Like everything we do... it just takes practice.
If you've built one website a year... you're not gonna get good at it.
You need to pump out multiple layouts and multi-templated sites that are responsive if you hope to get good at doing responsive frontend development.
There are very few devs who are really good at that.

A LOT of devs can build some fancy thing on desktop, but then can't make it responsive.
And plenty of devs can do responsive, but can't handle complex animations, or code them in a way that lasts for a few years and doesn't break due to updates in the libraries and scripts they use.

Nothing we do is hard. It just takes time to learn. And once you learn it, you won't why it was ever hard... if only someone had given you the steps to properly do it.

That being said, the most difficult things i've had to code.
Not sure, I've built custom calculators, built design tools, built image manipulation tools, built a social network, built a gaming site, built a site crawler, built my own caching stuff.
Some of it was hard at the time, but only because it required effort. Once i found the solution, looking back, it wasn't hard to do.

Knowing is half the battle

Collapse
 
mileswk profile image
MilesWK

I decided to make a project called "can I lick it." It is basically where you can enter the name, number, or symbol of an element on the periodic table, and then it would tell you if it is safe to lick, as well as some information about it. Right now, I am around 60 elements in. Rather than just using an API for the data, I decided to put all of it in JSON. I have taken a break as this has been a long boring process, but I feel to deep to stop.

Collapse
 
sazardev profile image
Sazardev

Recently in my job, the most difficult thing I had to do it's manage a background process to download invoices, extract the data, and show to user in real time the extracted data, and then he can replace some data, and if he send the changes, now in real time everyone can see the changes of that invoice and then in background again process every relation with that invoice and change it. (Everything was using WebSockets & Channels in Go)

Collapse
 
dance_nguyen profile image
Dan N

Honestly, one of my old school assignments comes to mind; we had to implement tcp communication with c++(I started on that first minute but still only barely finished in time before it was due)
My answer these days would be front end related stuff since there's so many quirks and unexpected things happening

Collapse
 
phalkmin profile image
Paulo Henrique

Anything visual is hard for me. I can't "create" layouts in my mind, just ideas, concepts, raw text. And that is though, because I really need a new portfolio site and I spend hours thinking just on content and not on how to make it stunning.

Collapse
 
jade_bennett_cf8e5b842d83 profile image
Jade Bennett

I am working at India based top metaverse development company, coding has become part of my life and I love to face the challenges which helps me in improving my coding skills.As per my point of view challenges may come in code but you have to take in positive way also.

Collapse
 
bertrand2808 profile image
Bertrand2808

For me, it was for a hackathon. I'd sprained my wrist at the gym so I had to make up the hackathon on my own (instead of being 15). I had to implement the whole thing in a docker network, I'd never touched nginx before and damn it was temperamental, I was always having problems with CORS or docker, it was hellish. In the end, I still managed to do it, but I spent a good 20 hours more than I should have.

Collapse
 
codebucks profile image
CodeBucks • Edited

I had to use trigonometry in order to create a perfect 3d carousel using Three.js with Next.js as a framework. It is a interactive carousel where lots of images made a shape of ring and you can move it through mouse pointer and scroll. Never thought I'll apply trigonometry in web development😝, still it was great experience.

Collapse
 
kurealnum profile image
Oscar

It's something that I'm working on at the moment actually: a torrenting library w/ async/parallel computing (not sure what to call it :p) in Rust. What's challenging about it isn't the async or parallel stuff -- there's plenty of documentation out there for that, and after a while, it's (kinda) standard. The hard part is the severe lack of documentation for anything BitTorrent related. I've been working off of enhancement proposals and godawful source code for the last 3 months now (please document your code! and please don't make 25 different repos for tools that could be contained in a single repo!). Even then, the stuff for Bittorrent could be worse, but the stuff for WebTorrent couldn't.

Collapse
 
meenakshi052003 profile image
Meenakshi Agarwal

Nice question—it really made me think. I recalled a time when I was developing a microservice using Java Spring Boot. I found it challenging to create singleton objects using Spring's annotations. Initially, I had to resort to writing my own singleton classes to achieve the desired behavior.

Collapse
 
stevsharp profile image
Spyros Ponaris

Nice question! For me, it’s mostly been CSS. Styling complex layouts or making designs pixel-perfect across all browsers can be really challenging.

Collapse
 
umaid777 profile image
Umaid Hashmi

My first FAST API structure damnn

Collapse
 
anitaolsen profile image
Anita Olsen • Edited

Oh man!

Collapse
 
officialphaqwasi profile image
Isaac Klutse

AI has been a bit of help to me but, I won't brag

Collapse
 
dotallio profile image
Dotallio

Getting a complex dynamic form system to look good on every device nearly broke me, honestly UI stuff is always the hardest part for me too.

Did you ever try using CSS grids for your layout?

Collapse
 
pengeszikra profile image
Peter Vivo

Maybe this game: dev.to/pengeszikra/javascript-grea...
Because this use a single JS function to able use JSX without framework. Have a reactive state handling system which is don't belong to view. Power of that state handling system is show the card game part which can controlled by player or code also - easy switch. Contain a CSS 3D system. Contain a real time markdown view webComponent including some basic syntax highlight for code block. Whole app compiled less than 200k. Responsive and run on any device.
Have own sci-fi world and created a AI short movie of the contact the flogons and humans. Protagonist is a fictive punk-metal singer, she have 13 tracks on my youtube channel.

Collapse
 
ben profile image
Ben Halpern

That is pretty awesome

Collapse
 
elfreda profile image
Elfreda

Admittedly, my worst nightmare was building a real-time collaborative doc editor with conflict resolution — hours debugging edge cases 😅.
These days I’d probably lean on an AI assistant to brainstorm solutions faster.
Recently used one that explains complex algorithms in simple terms (like OT vs CRDT tradeoffs), which saved me from reinventing the wheel. Game-changer for solo devs!

Collapse
 
lizardkinglk profile image
lizardkinglk

As a beginner, there are so many from leetcode, advent of code and passion projects.
So my next passion project could be the most difficult thing. 😅

Collapse
 
sgchris profile image
Gregory Chris

Plan and design the software you develop, so that it will be future proof.,
Every time a new ask is added, and it requires refactors at some extent.

Collapse
 
nathan_tarbert profile image
Nathan Tarbert

been messing with layouts forever too, never really feels done tbh. you think it’s just stubbornness that keeps us pushing or is it wanting it to look a certain way

Collapse
 
anitaolsen profile image
Anita Olsen

Aha. Well, to me it is that I want it to look a certain way.

Some comments have been hidden by the post's author - find out more