AI, Me, & Fog

Past 5 months of my working on LibreOffice codebase

Devansh Varshney

10/26/20257 min read

Past 5 months of my working on the complex code base of LibreOffice has given me lot of interesting insights about my own challenge of scattered and fuzzy thoughts which I have been trying to align since 2022. This post is about how I navigated the challenges and the use of LLMs.

In universe everything is in between the duality which is any entity lies in-between and can have some dipole movement in the either side but not entirely as binary.

Same goes with the our thought process from predictable procedure step thinking(deterministic) to more of fuzzy probabilistic thinking.

Similar to CPU vs GPU which is processing information in a sequential manner vs parallel.

And I always have my dipole moment towards the probabilistic parallel thinking.

The perk of this is when I was in Fourth standard I saw the pattern that if there is a major incident published in news paper(as I used to read it entirely) the stock market went either up or down and why the cricket match is despite being LIVE have a sunny day but the outside of my house is night.

My school throughout has been interesting from being named Internet as I not only have all the information but can predict which teacher is going to be where then scoring perfect full marks in Science, Social-Science, and Hindi and then just somehow managing above average marks in mathematics and English.

But in university I was solving the ODE and PDE's as if they are some basic addition quickest in my class.
The point is anything which is complex I started to enjoy and found ease of doing it. Regarding following the directions I have always been the student from school to my college who always got identified as an separate entity from entire class. During college in my Quants lecture the teacher specifically asked everyone to not to solve the last question which was related to concept/method which he hasn't taught to which I went on solving and solved it with a minor error in last part of answer.

But the downside is I cannot to really do basic or simple tasks I still cannot pay in cash at a shop thanks to digital payment I can now. I always give whatever amount I have to the person and just let them take whatever they like and just give me if there is any above amount. I still cannot manage a wallet :( everything scattered in pockets.

Sound counter intuitive but this is how I've been and then I decided to do something about it and I organized my room and I started writing about myself I put lot of blockers in my devices even to ctrl+t in web browser so that I do not open next 100 tabs just about an random thought which I got. Still I have all my notifications disabled and alarm at each hour so that I am aware of the time.

Maybe this might be an interesting read how I connect unrelated things in general -

https://docs.google.com/document/d/1kwZEY4KT-eDlELRsduAuB7IX94qenEHMyE6LA5l45eU/edit?usp=sharing

One thing I know about programming is it is deterministic and you have to define each step and hence I started working with LibreOffice codebase in the starting of 2024 I found that this is a big challenge for me to break complex things in step wise manner.
I can now tell with 100% sureity first Tomaž and now my mentors Jonathan, Hossein, and Prof. Lima has witnessed this problem of mine with breaking down complex things in small manageable blocks and managing my time which is still a thing which I have to work on.

My first version of proposal which I sent to Hossein was just information dense which after his feedback I de-cluttered it made it manageable same goes with my weekly mails and my final report too.

I already have got a feedback from my friends as they all get overwhelmed by the amount of information I sent to them even if I open Instagram or YouTube in my phone my 6 to 8 hrs are just gone and Instagram flagging my account as a bot because my frequency of interaction with content is so high and I have to appeal to not to ban. Hence, I still keep these uninstalled.

I think this tweet from Gill explains it well https://x.com/BasedBeffJezos/status/1929106448648130970

Just like Digital payments the availability of LLMs has helped me a lot to organize and synthesis this fuzzy thoughts of mine. The biggest thing which they have solved for me is for the first time I was able to apply and complete the Income Tax application with the help of ChatGPT. These tasks which are simple for others but for me are almost impossible. hadn't have these apps I still prefer to be taken by authorities which seems simpler to me.

Besides these challenges I have been on Amitriptyline since 2023 and with every visit to my Doctor just increase the dose and whenever I try to discuss about not being able to work and mental confusion he just says just go and sleep. I also have stopped driving as last year I ran in accident because of this with major rupture in leg but frankly no fracture and then missing the second weekly meeting.

Now in these circumstances tool like LLMs help me to synthesis my understanding of a concept and the use case which I prefer using is differential diagnosis by Dr. House and his team and this is actually a good use case I came-up with as this give a lot of counter examples which I cannot think of. But these LLMs are similar to a digital DAW for text, code, ideas, and workflows with no intelligence.

Here came my complexity devouring brain when I got really stuck with main thread and my thought was if Main thread is blocked then why not put the UNO APIs fetching to some other thread and it validated the idea yeah that seems like a fair logical solution to a problem where I am stuck and I found some examples of it in codebase like Configuration Manager WriteThread and CSV/XML data fetching.

This worked and I then started making more changes in the same patch detouring from my own plan of breaking patches in manageable entity. Till here from my perspective things are functional with a weak UI foundation which evolved into a hydra I think if I had asked my mentors that I'm stuck with main thread and what are the ways of solving it or maybe if I have asked the LLM it self how and what are the ways to resolve this situation instead of going with the very first thought of mine of a separate thread things would have been different.

Then again with the IDE crash I looked at the code and saw it is SYNCHRONOUS and since UNO API fetching is taking time so it must be a race condition and I should make it ASYNCHRON since there was a comment which shows a history of problem with the IDE's parent UI hence the solution must be making this launch Asynchronous.

And then I went on fixing it and created a patch to get this async so that I can work ahead as I have already wasted almost 3 weeks on this. While getting this done quickly I was also working past my sleeping time and my friend Rohan was also at the call and he was constantly reminding me to go to sleep because I wasn't focused. As a habit of mine to give as much as information as I want I synthesized all my understanding and started to give as much information as I could which made the entire review process difficult and confusing.

I last month I noticed that in my previous year GSoC proposal I wrote the year as 2023 instead of 2024.

Did people liked my writing?
I would say no specially in the code review. In code review what I learned is you have to be really precise and provide as much information as possible using less word possible.

While planning for this year's LibreOffice conference I think I could not have been able to do it if Karthik was not there. It took me 5 trials to correctly fill the visa application that too when I was using Karthik's application as reference.

During Hackfest me and Rohan had brawl about something which I have no memory of and hence as an learning post conference and also to meet the new deadlines I started taking my meds little later so that I can be a bit more attentive in meetings and being able to work a little longer with less brain fog.

Did the project move faster or slower while I was using AI?

Here I would say more on slower side. With these new tools I now can understand/research a concept in a way I want but yes Stack Overflow is still needs a visit :) but slower because of my mistake of not looking for other paths when I am stuck at one. I opted for a path which sounded cool and which seem like to solve all of short term problems.

Which patches needed more revisions?

It was the making IDE launch asynchronously as I got an assurance by the comment for a bug related where the BASIC Macros UI was remaining in front of the IDE launch. And then the other patch where I went with the background thread approach and then to make things more complex I looked for can we do caching or not as this will reduce the time to open the IDE.

Did I ever lose time because AI gave me poor advice, or because it suggested an invalid solution for a problem?

I think this one is on me entirely as what I have learnt is these Language Models are just simple fuzzy search tools which can rearrange information according to your question. To my surprise when I saw people were complaining about the replacement of GPT4o with GPT5 with #keep4o running allover internet as the new model was not affirming to what users want to listen.

I have been writing this page since yesterday and the effect of working late and delaying my meds now showing the effect and now I will take couple days of rest to reset and complete the remaining work :)


and Yes I also started looking for a good OCR solution for LibreOffice and also for Indian languages as during Conference Alain Romedenne said why not I am focused for Indian languages also. As Tesseract and other OCR solutions are not good(at least for compute restrain devices) and cant retain structure and often mistakes 0 with o.

Now I am using these two tools to their full extent to understand latest VLMs/OCRs working

https://deepwiki.com/PaddlePaddle/PaddleOCR

https://deepwiki.com/deepseek-ai/DeepSeek-OCR

and

https://www.alphaxiv.org/

to understand the implementations and the inner workings of these OCRs and planning to make a synthesized tool which is using best from all and specially the ensemble voting for -

self.confusable_pairs = { 'devanagari': [('ड', 'ढ'), ('ई', 'इ'), ('ण', 'न')], 'latin': [('0', 'O'), ('1', 'l'), ('5', 'S')] }

Now we have more small OCR models which can be fine-tuned and quantized for our specific use cases.

The reason is this will not just help to extract text from an image/pdf but also retaining the structure and being able to transform or translate in the LibreOffice itself could be really useful for users.