a path to frustration

or how i found new ways to hate myself

I enjoy very much coding. It doesn't matter if I'm creating apps or I'm just fixing bugs. I just enjoy it. A few weeks ago I got a gig. The client found me through HN's. The rapport was good that the client decided to continue. I was in need of money since I burnt out my savings recently and the current gigs weren't well paid. I didn't doubt so I took the job. Jeez, big mistake.

I got the permissions to see the repository at BitBucket (amazing that people use it. I dunno why my only two options are Gitlab or Github).

The first thing I noticed is that the backend was done on Rails. Rails 4.2.... what year is this, am I right? I tried to get the gems but it didn't work:

Unable to require openssl, install OpenSSL and rebuild ruby (preferred) 
or use non-HTTPS sources.

By Odin's Beard! I tried a few other ruby versions but then I got compatibility issues with other gems. Fortunately, it was 2021 and we had Docker. So, I prepared a Dockerfile and a docker-compose.yml and in a matter of minutes the application was running.

I tried to use it but of course I failed. There was no database. I requested a dump from the client and within days I got one. I made some changes to the docker-compose.yml file and I got the database restored.

The same day I was provided with some credentials to play around with the staging version they had. I saw the current stage of the application so everything I was requested to change clicked in my head.

At this point I was a little frustrated. I already burnt a few hours of the projected plan and I only got the app working. My way of working is work fast, deliver fast. Time is money so every minute I waste, it's a dollar the client needs to pay. It can always get worse, I thought.

So, I was ready to start make some changes. Then I checked the frontend. Angular. Mother of God! The last time I used Angular was in 2014. That was the year Malaysia Airlines Flight 370 disappeared.

Clearly I was quite rusty. It didn't help to relieve some stress. On the contrary, I almost decided to cancel the gig. It was only my daily 6km walk that allowed me to cool off a bit.

I got back. I was recharged and ready to start coding. To my luck, I just needed to replicate some behavior that some other developer already created. That was just like 10 mins of coding. I thought well I'll be finishing this quite fast. Around that time the client requested some updates. Stupid me said by tomorrow morning it will be done. The client was super happy and myself I started doubting, as per usual.

I noticed that I only need to make some changes to some SVGs, add a few more and so on. Yeah, this is pretty simple I said to myself. It was simple. You just need to change some coordinates. The SVG path was done already. How hard it can be?

Every time I did some changes I needed to refresh which it took a few seconds, docker was super slow. Also, I was not expert in SVG and on how to draw them. Some of the SVG needed scalation. The client's requests weren't that clear and there was some information missing. It was later provided by other developer.

A few days have passed since stupid me said "tomorrow morning". Gosh! What an idiot. The changes were projected to be done in 2 working days. It was already 2 weeks. My frustration was in another dimension. I felt shitty and I was only half way to deliver the changes.

Stupid Docker was still very bloody slow and myself was wondering: "How is it possible there are no web tools to do this!?". The stress level were so high that I was conviced that the equivalence in Watts was almost what you need to power a house in a 50ºC summer for at least 2 days, 4 hours, 33 minutes and 15 seconds.

To give an example, imagine this:

%some-fancy-DOM-element.with-classes { 
  data: 'vm.passedInData.immigration_egate1.value', 
  bg:"'M356.04,365.8h-17.67c-2.21,0-3.93-1.72-3.93-3.93v-17.67c0-2.21,1.72-3.93,3.93-3.93h17.67 c2.21,0,3.93,1.72,3.93,3.93v17.67C359.97,364.08,358.25,365.8,349.04,365.8z'", 
  fore:"'M355.72,363.5h-16.78c-1.18,0-2.13-0.95-2.13-2.13v-17.02c0-1.18,0.95-2.13,2.13-2.13h17.02 c1.18,0,2.13,0.95,2.13,2.13v17.02C358.09,363.56,358.14,363.5,355.72,363.5z'", 
  'on-icon' => "'M340.21,360.89c-4.17,0-7.61-3.44-7.61-7.61s3.44-7.61,7.61-7.61c4.17,0,7.61,3.44,7.61,7.61 C355.06,367.2,351.38,360.89,347.21,360.89z M347.21,357.63c-2.95,0-5.4,2.45-5.4,5.4c0,2.95,2.45,5.4,5.4,5.4s5.4-2.45,5.4-5.4 C352.85,350.09,350.4,347.63,347.21,347.63z'", 
  'off-icon' => "'M343.77,347.39l3.44,3.44l3.44-3.44c1.47-1.47,3.44,0.74,2.21,2.21l-3.44,3.44l3.44,3.44 c1.47,1.47-0.74,3.44-2.21,2.21l-3.44-3.44l-3.44,3.44c-1.47,1.47-3.44-0.74-2.21-2.21l3.44-3.44l-3.44-3.44 C340.33,348.12,342.3,346.16,343.77,347.39z'", 
  'svg-height' => 541.41, 
  'svg-width' => 1666.85

Something like that was rendered. I was modifying it in the browser using the Inspect which most of the time was super slow. Sometimes it crashed, god knows why.

In the frontend you can see small changes very indistinguishable and in terms of working hours it was just 4 hrs. I was clearly in pain. I hated myself more than usual. I wanted to quit software development. I felt so useless. But I continued. I told myself it will be over soon.

By the middle of the 3 week of working, I was done. I was done with the project but it was incomplete. I emailed the client explaining her how I failed in asking questions about the project. How I failed in underestimating the changes. And I also mentioned how this was not fulfilling for someone like me. All the actual code was just 10 lines of JS code. The rest of the hours was just tweaking SVG path coordinates.

One day later. They replied. And they were so nice. They understood. I did notice a few developers already touched the code (thank you git blame). It seems the project was dropped by few coders and I learned the hard way the why.

I was so frustrated that only after a few days of delivering the project I realized: dude, jQuery Draggable! You load the library in the browser. You move the SVG path to the actual location. Copy the values. And presto!

!EUREKA. It was too late. The stupid frustration made me a moron. Gosh.