Jump to content

TheOnlyOne

Members
  • Content Count

    33
  • Joined

  • Last visited

Everything posted by TheOnlyOne

  1. TheOnlyOne

    Need a "Delphi programming guideline"

    Cannot be done. He owns the business/the program 🙂 He is not a bad guy. He just don't have any technical knowledge. I told him that the technical debt reached a maxim (cannot exist higher than that) but I had to explain him what is technical debt. I don't think he believed me. Last month we implemented no new feature. We only fixed bugs. I keep posting links to simple tech documentation for my Delphi colleagues. For my boss I linked to videos from https://www.youtube.com/@ContinuousDelivery channel (a great channel). I don't think anybody is clicking the links. 🙂
  2. TheOnlyOne

    Need a "Delphi programming guideline"

    We merge once at the end of the sprint (two weeks). Yes, merging is not easy. But not the formatting is making the merge difficult. It is the spaghetti code that makes it difficult. If you want to fix or implement something new, you do changes all over the place. All data is transported through strings - integers, booleans, everything is a string! In a way I admire the guy that created all this code, because the code somehow works (is true that we use try/except in hundreds of places (thousands?)) Even with this nightmarish code, I like the workplace because the work is not strenuous. I worked on hardware drivers for a million-dollar industrial robot - electronics and software combined. That was a fabulous work place, but the work was really, really intense. The payment here is not great, BUT I work from home, and I am happy that I am with my family and I don't have to drive 2h per day again. And as I said, all we do is convert back and forth integers to strings and strings to integers . What can be easier than that? The most complicated math I did for this project was to calculate a VAT - the program works with money. No advanced math, no micron-precision measurements, no worries that the robot crushes somebody's head. When I have the chance to write my own code in this project, it feels like holidays. Not when I have to fix their code.... On the other hand, I feel that this work makes me stupid. If I don't have advanced programming issues to solve, I decreased my daily Delphi reading quota. The job is easy, but might be detrimental for me on long term... Since I am still here in this job, probably I am getting old too . I like to think that this is not a work place but a relaxed hobby 🙂 I wrote the program from zero on my VERY personal time (a total of about 8 days) - all the backbone is there, main parts of the GUI also. 100% OOP (naturally). Searches in 0.1 million customers in 80 msec. The old program searches in 2000 customers in 4 seconds 🙂 (to get of sense what we have there). I can't convince my boss to switch to it. The old program had an exporter to export some financial info. There are about 10000 lines of code in there (all the math is done in the strings, literary). I did mine with 60 lines.🙂 As you see, in the old code is "special" like I have never seen before. There are many funny parts. If you are not a grumpy person, and you are predisposed to smile instead to grim... Life can be sweet even in projects like this.... ____________ Anyway, I diverge. I am interested to make my colleagues read some Delphi books. Since that won't happen (you know... the age) at least I need to find a way to cut down some of their most dangerous habits. This is why I am interested not in a code formatting style guide but in some clear definitions about what is allowed to do in Delphi (use try/finally don't use (abuse) try/except). Hopefully, I could convince my boss to put it in the DoD. But I don't want to start writing such document on my own time.
  3. Hi. This is the first time even when I use this lib. I have some kind of playlist of images in a TStringGrid. I want to generate the thumbnail for each visible row and show it. I want to do this only for the currently visible rows (10) not for the full list of rows/images (1000). This will create too much I/O activity. When the user scrolls the grid up/down, I want to generate the thumbnail for (now) current set of images/rows. So, obviously I have to somehow start 10 background tasks and when they are done, they have to return a bitmap back to the grid (VCL main thread). What would be the best approach for this? Which of the examples provided in the OTL comes closes to my need? Many many thanks.
×