 So, the question is, I mean, if you don't know, you are allowed to guess, right, this is a quiz. So, guess. What do you think a class called formula group context does? That's question number one. Question number two, this is from a commit, again, I had to make it a bit shorter. So, above is the complete commit log message. This is the one line. And it's quite a long commit, but the important part is it adds some class, and it's like, I don't know, each one of it is like 100 lines. And after some looking, which is also not mentioned, I find out it's a copied paste of another class, or it looks so. And as mentioned below, the commit itself adds exactly zero comments. Anywhere. So, why do you think the commit adds those two classes which seem to be copied and pasted? That was the second question. And the third one, that's a special one. That's easy. Okay. So, let's get results. Everyone who knows, who knows answer to this question. Okay. So, the answer is that this class is actually a cache. I have already added a comment, I mean, I've already made a commit which says, I think this is actually cache. Don't get confused by the name. But I think I spent at least one hour trying to figure it out. Because I mean, formula group context, like, that sounds big and important. They actually just caches the results in calc of value of each cell. So, the second one, how many do you know? I'm like, before I was raising the hand, I am the one who made this quiz. So, for the first question I actually knew here, I'm like half raising my hand. So, who knows? You do know. Okay. Tell us. I think, I also believe that the reason why this was added was because it says that it replaces one class with shared pointer, which means it changes ownership. And the SDR undo remove object, object deletes the object. So it's a complete copy paste, and then the delete is removed from it. And I spent, again, couple of hours trying to find out. So, yeah, and I think that I was reverted later again or something like that. This is also a real example. As I said, I spent a couple of hours on it. And this one, yeah, I know you do because I have it from you. So this is, no, no, is it special? But it was something else than special. Special. Yeah, this is from the old times when it was developed in Hamburg. So SPZ is, how is it, Spezial. And that is frame format. I actually remember this one from 2012 or 2013 when I was asking on IRC about some other class. I don't remember anymore what it was again. But absolutely nobody knew. I was like, Stefan Bergman, is it, oh, yeah, he didn't know, he didn't know, he didn't know, he didn't, nobody knew. But it was there everywhere. Anyway, so there was somebody who knew one, was there somebody else who knew at least one? Okay, I did, but I'm the author of the quiz, it doesn't quite count. And I also didn't score all three. Okay, so I actually started, I actually got this idea for the talk because I may have here quite a specific background which you others don't have. Before I started on LibreOffice, I worked on KDE, which is built on the Qtoolkit. And really if you ask pretty much anyone who has ever used Qtoolkit, they will tell, it's really, really easy to use. And when I then switch to LibreOffice, it was a little bit painful. I mean, I assume it was for everyone, but I got like a special load because I absolutely wasn't used. Like SW, SPZ, FRM, FNT, I would get probably shot for that if I try to commit that in KD code. So I just want to, like, and that's because for Qt, a readability and ease of use were actually one of the design goals. They actually, when they started, they wanted to sell the toolkit and they quite got to do the right idea. If it will be difficult to use, maybe nobody will want to use it. On the other hand, if you compare it with STL, they apparently didn't have this idea in my day, like wanting to make it standard and extensible and powerful and whatever, but make it easy. Well, developers are smart, right? We'll figure it out eventually, maybe. So like, just to give you some examples, so I suppose by now you have already figured out this one. So this is how you write it in Qt. You can pretty much read it, like, this is pretty much English. If my list contains 10, return my stack pop. Yeah, okay, the last ones, but that's basically English. You could probably show it, well, most of us are not English speakers here. If Michael Meeks was here, and he showed this to his mom, she would probably understand. I don't think she would get this. So like STL strings, I got this from Stack Overflow, I was googling for it. This is how with STL, you probably do case-insensitive string search. So this is how you do it with Qt. I especially noticed the very talkative Qt case-insensitive. Some of you may not like it because you would just like write true, right? This is too much to write. But this comes from times when Qt also used to have this true, but they decided to change it when they once got a bug report, they had a function called update, and then they got a bug report saying, if we call update, true, false, true, it doesn't work. But if you do true, false, false, or true, true, true, it works. And they were like, okay, so what does it mean if it's true? And even if you look at this, if it was true, is it true case-insensitive or case-sensitive? I will get back to this later. But, yeah, basically what the KDE experience taught me is that if you work with code, you actually read it many more times than you write it. Because basically, even if you write it, you first have to read it. So if you, like on the previous slide, if you optimize for writing, you are actually optimizing for the thing which you do less. So SPZ, yeah, whatever it was, that's just optimizing for something which actually doesn't pay back. And I think from, we are fortunately good at this from the open office times. And we could see in practice how much, how many trouble this can cause. And it actually really matters, but on the other hand, we also got from open office something else. We got the habit that this is just how it works. We continue to do this even by now. In the quiz, the SPZ whatever is old, but the other two commits, they are from 2015 and 2017, I believe. So we keep doing this as well. We haven't just inherited the code with poor setup, we have also inherited the mindset that it's just not worth it. And this can make a difference. Like for example, I mean it can even practically kill your project, maybe not liberal office. How many of you remember this, it was like 10 years ago, there was this very spectacular called Compass, you could like make the cube and so on. By the time I still worked on KDE, and I was actually incidentally the maintainer of the KDE window manager. And I was like, well, maybe it would be nice to add it in KDE because people were trying to use Compass with KDE, but it was really just focusing on the effects and pretty much the actual window management wasn't very good. So I was like, hmm, it's kind of a bit too hard. And then I like opened the Compass source code and I consider my, I mean, it made some, then I'm full of myself, but I actually consider myself intelligent and very good at reading source code of other people and I just couldn't figure it out. And as far as I know, nobody really could. There was like this battle community, but they were just writing new plugins basically. Nobody understood the core except for the one person who wrote it. Then fortunately somebody wrote a small compositing manager, so I was like, oh, so this is actually how it works. Okay, then I add in Quinn and I made the basic setup. I explained how it's done. Several other people jumped on the benagon and like half a year or a year later, nobody indicated land cared about Compass because why? It was difficult to extend. Nobody understood it. Quinn just worked and who still uses Compass today? Now, the original quiz may seem like I intend to bash LibreOffice, but actually we have already fixed quite a number of things. Like, there are some new people here, right? Grzegorz, when did you start with LibreOffice? Ah, 2017, lucky him. He doesn't remember, so brace yourself. This may be painful. So like, for example, when we forked the above is how we used strings. Like the below is how we do it now, the above is how we did it before. So we have already fixed this. Isn't it nice, like, even just look at it? I mean, eventually you will figure it out, it's just long, but imagine like full source scores of this, compared to this. We have also done other things. This is an example I got from Eclosh. You have, if you have the binary filters, they, for example, return of right streams. And sometimes maybe you find out that the number of rows is not sufficient. So you will change the type, but it's binary. So in the old kind, you just don't know what it actually writes. It's value. Is it integer? Is it double? We don't know. It just occasionally broke. So we have everything, and now the below one is obvious. It writes a double, right? It says so, write double. It writes a double. The above, it writes a value somehow. So we have fixed this. This was mentioned. Somebody mentioned this, I think, yesterday during lunch. Like, if you try to bisect old stuff, like from the four dot old times, it's actually painful, because half of the commits they don't build, because we were just randomly committing. And I mean, it was because it was difficult to check if it always builds because you just did a checkout, you build, you commit it, and then maybe it in the box complaint later. So we have fixed this. And beyond before mentioned, just add a unit test. That's a good way how to ensure things work. So we have improved many things. But see, the thing is, as I could show in the quiz before, we have improved some things, and others we have not. And I think the idea is the important difference is that, for example, right now, I mean, if you compare this, if you want to be lazy, you definitely will not write the first one, because it's just too much to write, too much to read. If you are lazy, you will go with the easy option. If you do this, yeah, well, it's a bit more writing, but the first one will no longer compile. So if you are lazy, you will actually write the one which works. Here, before it was difficult to check if something works on Windows, but right now, it's just easy. You just push it to get it, and it works. And yeah, unit tests. I mean, the old unit tests from the Open Office times. I have never understood how to use them. But when I started on writer, Candy or somebody told me, so this is how a unit test works. So I started, and I was like, OK, so if I want to do another unit test, I will do it like this, and I will just change it. And it was reasonably easy. And yeah, so basically, the things which change, they have changed because we have changed how we work with them, how we think about them. In many cases, we have just made it simpler to do it properly. And really, some of the broken examples, they were broken because in that case, it's still simple to do it the poor way. Like here, writing by line, it was one minute of work for me, and maybe two hours of work to find it out. If Kohi originally, after spending maybe hours trying to write this down, spent also one minute writing, this is just a cache. Then assuming I spent two hours on it, he would have made one hour and 59 minutes. And it's just counting me. Maybe there are other people looking at it. So this is the same. The commit.log message just says, replace a C-caption pointer with share pointer, and figure it out. If it one day breaks, I don't care, maybe, or I don't know. And just the commit.log message, or I mean, there could have been one doxygen line saying, this is pretty much a copy of paste of the other class, but I had to change it because I need to change the ownership. And I wouldn't need to spend so much time figuring it out. Imagine all the times you have wasted when you were trying to figure something out, and then the information was something which would fit in one line comment. And people generally don't want to do this because we are all lazy, right? So we do like, I'm too lazy to write this one line of code because it's one minute of work, and then we spend hours trying to find it out. Even ourselves, it has already happened to me that for some old comments of mine, I was like, who was the bloody idiot who wrote this? And then I actually digged, and I was like, yeah, OK. And so even I have wasted my own time. And now I don't have actually any specific proposal, but I would like if we continued with the idea of improving, not just the code, but also how we think about what's good because we now normally write unit tests. And I don't think anybody has ever been forced. It's just simpler that way. Well, sometimes we have been forced. If you remove the old stream operator, then you just have to use the new way. So basically, I would just like to finish with the question, like, how can we make it easier and not very expensive to set up because many of these things, unfortunately, there are investments which you initially invest the time and you will get the returns over time. But how can we make it easier to write the code properly? For example, I was thinking, yeah, if it's so common that people just push new classes and don't bother to write anything about it, how about maybe if there was, like, we have Jenkins for code, maybe there was something else which you would say like, you know, you added two new classes and you didn't say anything about it. Maybe you want to write an oxygen comment minus one. And this shouldn't really be difficult. But really, some of those are even just, like, the only work is here in your head. Like, the next time when you write a comment and you will be doing, like, completely re-implement everything, period. Maybe you want to add, like, I want to do this because. Because, I mean, it's good to know what the comment does. But anyone who, anyone, which may be even you, later you may want to find out why you had actually this really stupid idea to do it. Because they may be able to, it was not stupid. So, yeah, I actually don't have anything more. I just, I just, I mean, this is not just one thing. If I, right now, will tell you, you are all stupid. Write better comment messages. Yeah, maybe you will try for a week. Or maybe you will just, nah. So I don't think it really works to force people too much or just complain. But maybe, I mean, before Stefan was saying. So it's actually difficult to run, start with sanitizers. But he actually copy pasted all the instructions in the slides. So maybe he could have spent a minute copy pasting it also in some read me sanitizers. And a lot of time, safety in the future. You want people to use it, right? But right now it's difficult, sorry. Maybe you can make it easier. And maybe we can do other things easier. Anyway, so we have a few minutes. So if there are any questions, OK. We have some minus one if, for example, you don't have documentation. Then what this class will have as documentation is formula group context. Yeah, I know the one. That kind of also depends on the change how you think about it. If you still keep thinking that writing one line comments about what a class does is a stupid waste of time, then. Yeah, that's why it's minus one, not minus two. Yeah, that's why I said minus one. It's not meant to be really like enforcement. It's not meant to be like a reminder. Like maybe you are actually a good guy and you want to do it, and maybe you just didn't realize. But I mean, there should be balance. Like if you just go, yeah, do whatever you want, then nothing changes. Yeah, that's the advanced level, unfortunately. So what you might just get through your mindset is if you get to the idea, ah, this seems to be a cache. And there's no comment at all. And it took you 45 minutes to find that out. But just add a comment that says, hey, this might just be a cache of what price you're something. Which is still better than nothing. I'm listening. Yeah, so I don't know if you can read, but this is actually what I really added. That is very used by OpenSeer called three dots, I think. Because I think. I mean, over time, I'm already pretty sure that's what it is. But when I added it, I just wasn't quite sure. But yeah. Maybe the sixth time, like the person who edited the comment will advise that there are people who actually have a response. Yeah, that's actually why I said that it's about the mindset, like in the KD times, before there was any Jenkins or anything. People just were watching. It was even CVS at the time, just commit mails. And if somebody committed something in the libraries, which like this comment, there was like, you forgot the comment, fix it. And I mean, there should be a balance. If you are too nice about it, the person will just like, yeah, maybe one day. So that kind of depends on the style. Okay, so I have run out of time, too. So thank you for your attention. I hope this discussion will slowly but steadily continue over a long time, hopefully. And so thank you.