Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
craig939393256351dI spent a day and a half trying to write a heavily C# reflection based implementation of an XML binder. It takes your data object and using custom attributes in the XML template, populates the template. It handles nesting data structures, binding from dictionaries, enumerables. Any data structure really. There are extra problems that sometimes the data.tostring method creates an invalid formatted value so the template can also provide specific maps eg True to true.
It went shit. I had about half of it working and couldn't keep my head around it enough to keep modifying without breaking.
I gave up, threw it in the bin, switches to TDD. A day later o had a great clean implementation doing everything, and I was able to extend it with almost no effort.
Tldr; I didn't want to scrap it but I reckon I would still be working on it had I not gone TDD, I don't know why I didn't TDD to begin with...
hitko175251dI'll do you one better. You spent days, maybe weeks planning and writing a new functionality so that project owner could sell add-ons in the app. Then for the following two years it takes you twice as long to develop any new feature while preserving the add-on functionality. But not a single add-on is ever developed, and after all that time the owner decides to just throw the whole add-on functionality away. You have to remove it from every piece of code, leaving gaps like bleeding wounds on your codebase, knowing even after it heals it'll never fully work again.
Sometimes failing is the process to finding the right path.
My last company hired me to redesign their backend and create a system that solved their particular problem but that could scale to hundreds of thousands of simultaneous users (and still be extensible and maintainable for the rest of the team).
After maybe a month and a half of working on the existing codebase and with the team, one late night I made a breakthrough and came up with probably one of the best designs for a system to date. To this day, I still think the idea is a million dollar idea and would have certainly been a competitive piece of IP in the business process software market.
Instead of giving me a few months for R&D, I was instead hounded to death about weekly demos (which had to be flashy else I was scolded for "having nothing"), which always cost me a day or two per week to hack the code into some presentable state, and the PM forced me to make poor design decisions because he was wildly incompetant.
6 months later, nothing was finished, and I basically gave up.
(cont) I had been forced, slowly and piece by piece, bit by bit, to change the entire design because others in the company couldn't understand it.
It's not that I communicated it poorly. I wrote many documents explaining the design. I wrote technical documents and non-technical documents, presentations, detailed explanations for the lay-people (investors, CEO, etc.).
I ran the material by a few friends that I could trust to not leak the idea or whatever, to make sure that I was sane and that what I was communicating was understandable. It was, resoundingly, understandable even to the point of being insulting to the reader at times.
Because it couldn't be done "iteratively", and that the entire process couldn't be broken out into tickets like the PM wanted, and because it used e.g. Redis, which the PM didn't like because he "never saw the need", they nickel and dimed me into changing the entire design. Naturally, the end product was garbage and didn't work, so I was forced out.
I spent 6 months writing code that I knew would never run, knew would never work, and knew I never wanted to be attached to.
I knew the company would fail, knew all of the devs would leave, and knew that all of my time, energy, and patience were being wasted.
But I wrote the code anyway. It was excrutiating.
(And yes, pretty much the entire existing development team left, and when nothing was being shipped the PM got demoted a few times. I think the CEO learned his lesson about trusting exclusively the PM without being able to vet the PM's expertise, very little of which he possessed.)
BugsBuggy452950dMy code works.
Its a very good design, scalable both in terms of load, and adding features to the system.
But my life is still falling apart. What do you say to that?
gelosig550dMost coders feel the same