You know what time is it?
It's rant time!
Aren't you happy?
Previously: my main project is on hold because reasons, I was sent to another team to help them finalize their software, one month before the deadline.
This new project holds together a bunch of huge ass databases one of the major Italian banks, allowing their people to do stuff with an astounding amounts of different kind of documents, each of an unbelievable amount of different data.
For dumb reasons, we're developing on a virtual machine on the client's dev server, struggling to even move the mouse over there, because of the dozens of proxies and shitty connection we have in our office.
Don't know why, but when my team planned the application, decided that the best way to approach the differences between the various documents types and subtypes was to disregard the hierarchy (and relative inherited fields, that repeats everywhere) and instead to create a distinct view for each document subtype (only one controller, though), naming them with the overdescriptive name of "document1", "document2" and so on, up to almost 100.
Each view have a dozen sections, some shared, some other "personal" (which usually mean there are a couple of fields that are different per parent-type).
Debugging this mess is basically impossible, as the work involved to get on screen the precise document you want requires way, way more effort then just sending the client a mail saying everything works ok enough.
But today I'm not complaining about this.
Oh no.
Thing is, each document needs to be exported to PDF.
I can instantly figure out an easy approach: take the data obtained in the aforementioned controller, pass it through some random PDF Java library, and print it howewer I need, following the pattern already employed in the front-end views, but much simpler, without all the HTML and whatnot.
Instead, they decided to follow the hardest, longest and most frustrating path ever conceived.
Build the templates in ODT via OpenOffice and feed them to the ODT-PDF converter Java library, which builds the PDF and replace the variables in the template with whatever data it gets.
We're talking about almost 100 different .odt, manually written following a mapping excel sheet provided by the client, that gives us the field labels and approximately what variable they're bound to.
Then, we have to send the ODT to the server (fastest way we figured out: use the draft system in our mailboxes, open in our computers and on the server), download it in the Eclipse workspace, refresh the folder, republish the project, reload the browser to gain new login credentials, send a request via Postman that saves the PDF somehwere on the server.
If there are formatting errors in the ODT (and there are, inevitably, because any word processor will fill its pages with invisible trash code), we'll have to go uncompress it, open the content.xml, indent it and try to find the culprit character in 100K lines files; then we have to hope we wrote all the variables names correctly, but there at least the server console accurately logs the error. If something went wrong, though, we are back to square one.
Finally, we can compare the PDF with its website page, to check if they show the exact same data everywhere.
Whenever the client remembers to add or remove a field from the PDF, or we notice they made some errors in the mappings, everything starts over again.
For pretty much every single ODT, because more often than not, the errors focus on shared fields.
On top of this, one hour ago I discovered that a whole bunch of documents showed different data between PDF and site, and it turned out it was the back-end's fault.
I immediately notified the back-end people.
What's the point of keep writing this fucking ODTs if when testing them I can't possibly know it the errors are my fault or theirs.
Also, what's the point of everything, if the clients explicitly told us that the current PDFs are too long, so we'll have to trim them down eventually.
But the team leader is firm: I have to keep writing as many templates as I can.
Now this thing is quickly sending me straight back to depression (long story, not the time nor the place), but my position here is too unstable - and I need this money - to actually and properly fuck them off, and I'm scared shitless I'll end up having an outburst with someone here (something I used to have in the past, but stopped having many years ago), screwing everything up.