I apologize if this has already been addressed in the mailing list or on the wiki, but what are some best practices when doing TDE/TQt development? I'm fairly new to programming, although I know enough to be dangerous with git and have a general understanding of programming concepts such as data types, OOP, etc. I haven't used C++ before but interested in learning.
What does your programming environment look like? Do you code in a VM or container so that you don't mess with your main system's configuration? What's your favorite editor or IDE? I'm curious what you're typical workflow looks like.
Thanks, Mike
On Monday 28 October 2024 05:43:46 Mike Smith via tde-devels wrote:
I apologize if this has already been addressed in the mailing list or on the wiki, but what are some best practices when doing TDE/TQt development?
I started my way with Qt 25 years ago (or so). First time I tried to understand mechanism of signal/slot. It took for about 2 or 4 weeks when I read the docs and the source code. After a month I started to write X11 applications using Qt (under FreeBSD).
I'm fairly new to programming, although I know enough to be dangerous with git and have a general understanding of programming concepts such as data types, OOP, etc. I haven't used C++ before but interested in learning.
What does your programming environment look like?
At this moment I use also FreeBSD as my working desktop to develop everything I need.
Do you code in a VM or container so that you don't mess with your main system's configuration?
Both. Some time ago I used illumos (dilos) but migrated to freebsd. Both systems can use VM and containers (zones, jail). I preferred illumos based systems and I have some plans to migrate from bsd to dilos again. The main cause is that ZFS is native on illumos. I want to be sure that my result of daily work will be saved in a snapshot. Also I share my projects directory as NFS to the LAN, on another host (or VM) I can test to compile (and to run) my project.
What's your favorite editor or IDE? I'm curious what you're typical workflow looks like.
I user pure kate editor with a list of files on the left side. Nothing else. The files usualy groupped by the logic until I finish some function of algorithm. To compile, to run and to debug the result I use a separated terminal (or more than one). Also I like when a system generates a core dump of the debugging process instead of a crash dialog (for TDE as example). That is because I can dig into the dump using gdb (or mdb).
But, again, It's my preferable workflow maybe because I'm too old for new modern visual tools (and that [censored] "AI").
On Monday 28 October 2024 03:16:02 Denis Kozadaev via tde-devels wrote:
I user pure kate editor with a list of files on the left side. Nothing else. The files usualy groupped by the logic until I finish some function of algorithm. To compile, to run and to debug the result I use a separated terminal (or more than one). Also I like when a system generates a core dump of the debugging process instead of a crash dialog (for TDE as example). That is because I can dig into the dump using gdb (or mdb).
Interesting, thank you!
On 2024/10/28 11:43 AM, Mike Smith via tde-devels wrote:
I apologize if this has already been addressed in the mailing list or on the wiki, but what are some best practices when doing TDE/TQt development? I'm fairly new to programming, although I know enough to be dangerous with git and have a general understanding of programming concepts such as data types, OOP, etc. I haven't used C++ before but interested in learning.
What does your programming environment look like? Do you code in a VM or container so that you don't mess with your main system's configuration? What's your favorite editor or IDE? I'm curious what you're typical workflow looks like.
Hi Mike,
TDE dev here. I use Debian testing and TDE PTB as base but you can use any distro you are familiar with, either in a VM or on a real computer. It depends on your level of knowledge/confidence but go with a VM if you don't want to risk breaking things while you are learning. As editor you can start with Kate, it's good enough at the beginning and that is how I started with TDE programming back in the days. But if you intend to become a serious dev long term, Kate will hold you back: it's interface is way too slow, same as many other editors that need a mouse to be used.
I use neovim from Konsole, a bunch of tools, a few plugins and a set of scripts/aliases. It has its steep learning curve, but once you learn to master it, you will be way way way way! more productive than in Kate.
As for learning, the best way is to read code and practice as much as you can. Start small, maybe some simple GUI changes like adding a config option for something and related logic. Then build over time and try to connect the dots between the different part of the DE.
There are mailing list and IRC chat rooms if you want to reach out to the devs, so don't be a stranger there :-)
TGW is the dev space, here is a brief user guide on how to use it: https://wiki.trinitydesktop.org/TDE_Gitea_Workspace
Cheers Michele
On Monday 28 October 2024 04:42:16 Michele Calgaro via tde-devels wrote:
Hi Mike,
TDE dev here. I use Debian testing and TDE PTB as base but you can use any distro you are familiar with, either in a VM or on a real computer. It depends on your level of knowledge/confidence but go with a VM if you don't want to risk breaking things while you are learning.
This is great insight - thank you! I might start with a VM or container just in case. I'm using Debian as well.
I use neovim from Konsole, a bunch of tools, a few plugins and a set of scripts/aliases. It has its steep learning curve, but once you learn to master it, you will be way way way way! more productive than in Kate.
Awesome! I use neovim as well so I guess I'll stick with that. What plugins do you use most?
As for learning, the best way is to read code and practice as much as you can. Start small, maybe some simple GUI changes like adding a config option for something and related logic. Then build over time and try to connect the dots between the different part of the DE.
That's a great tip. Is it worth also looking through Gitea issues or just try to scratch my own itch at this point?
There are mailing list and IRC chat rooms if you want to reach out to the devs, so don't be a stranger there :-)
Sounds good, I'll join and say hi!
Hi Mike
Awesome! I use neovim as well so I guess I'll stick with that. What plugins do you use most?
As tools I use ripgrep and fzf for effective fuzzy finding. As plugins, the most important ones I use are: - for LSP support and code completion: neovim/nvim-lspconfig, hrsh7th/nvim-cmp and a bunch of hrsh7th/cmp-* ones - fzf integration: junegunn/fzf, ibhagwan/fzf-lua (way better and faster than telescope for my use case) - for MRU: pbogut/fzf-mru.vim - for file navigation: nvim-tree - and a few classic Tim Pope's one: tpope/vim-abolish, tpope/vim-surround, tpope/vim-unimpaired, tpope/vim-fugitive, tpope/vim-repeat
I have a few more but the ones above are the key ones, especially the integration with fzf and ripgrep. I have yet to setup treesitter integration, it's one of the things I keep postponing. On top of that, I have a number of CLI command aliases and scripts that makes interaction with git and TGW and navigating the TDE code a breeze (fzf is once again a dark horse). You will develop your own as you go along, it's a never ending refining process :-) Instead of tmux, I have 2 groups of 10 konsole tabs on two desktops. Ctrl+n switch tab, Ctrl+Fn switch desktop, so changing workspace is again a breeze. Many of those tabs have specific usage, so everything I need is always under my finger. Lastly, I heavily remapped my keyboard, that gives extra speed, but I would say you don't need to bother with that at the beginning.
That's a great tip. Is it worth also looking through Gitea issues or just try to scratch my own itch at this point?
That is really subjective. Issues on TGW and bugs in the older bugzilla can inspire you to try something or provide some ideas, but also may get you lost in troubleshooting an issue which is not very clear. Personally I started with a small GUI enhancement that was important to me, that is middle click on a Kate tab bar button to close the file. So I would suggest you find something that bothers you (a bug, a missing feature...) and work on that. If it is something that you need, it will give you extra motivation when you will inevitably hit some obstacle along the way. Another little piece of advice: don't start with Konqueror. It is a huge beast, you would most likely get lost among all its internals. Start from smaller standalone applications, it will be a smoother experience. Kate is fairly big too, I started on the Kate tabbar plugin. Of course, YMMV depending on current experience and knowledge.
Hope it helps :-) Cheers Michele
On Monday 28 October 2024 11:50:27 Michele Calgaro via tde-devels wrote:
As tools I use ripgrep and fzf for effective fuzzy finding. As plugins, the most important ones I use are:
- for LSP support and code completion: neovim/nvim-lspconfig,
hrsh7th/nvim-cmp and a bunch of hrsh7th/cmp-* ones - fzf integration: junegunn/fzf, ibhagwan/fzf-lua (way better and faster than telescope for my use case) - for MRU: pbogut/fzf-mru.vim
- for file navigation: nvim-tree
- and a few classic Tim Pope's one: tpope/vim-abolish,
tpope/vim-surround, tpope/vim-unimpaired, tpope/vim-fugitive, tpope/vim-repeat
Awesome! I'll give those a try. Speaking of neovim/vim/vi - do you have an issue with Konsole where typing commands in command mode puts a "q" at the beginning of the command line? I can show a screenshot if that helps.
Instead of tmux, I have 2 groups of 10 konsole tabs on two desktops. Ctrl+n switch tab, Ctrl+Fn switch desktop, so changing workspace is again a breeze. Many of those tabs have specific usage, so everything I need is always under my finger.
This is a great tip! I like tmux but I could see it being more intuitive and quicker using Konsole.
That is really subjective. Issues on TGW and bugs in the older bugzilla can inspire you to try something or provide some ideas, but also may get you lost in troubleshooting an issue which is not very clear. Personally I started with a small GUI enhancement that was important to me, that is middle click on a Kate tab bar button to close the file. So I would suggest you find something that bothers you (a bug, a missing feature...) and work on that. If it is something that you need, it will give you extra motivation when you will inevitably hit some obstacle along the way.
Sounds good, I already have a couple of ideas in mind. I still want to learn more about C++ so I likely won't be submitting any PRs for a while. :-)
Another little piece of advice: don't start with Konqueror. It is a huge beast, you would most likely get lost among all its internals. Start from smaller standalone applications, it will be a smoother experience. Kate is fairly big too, I started on the Kate tabbar plugin. Of course, YMMV depending on current experience and knowledge.
Thanks so much for the tips and advice! I truly appreciate your time. By the way, until I get more familiar with developer stuff, let me know if there are other ways I can assist in the project. Happy to do more "chore" type of work if there is any. Stuff like bug triaging, wiki cleanup, site design (HTML/CSS) refinement, anything database (SQL) related, etc.
Thanks, Mike
Hi Mike,
Awesome! I'll give those a try. Speaking of neovim/vim/vi - do you have an issue with Konsole where typing commands in command mode puts a "q" at the beginning of the command line? I can show a screenshot if that helps.
I have seen this with vanilly neovim config, I get it every time I fire up a quick VM for testing. It's a matter of config, although I don't recall which option it is. Maybe a quick google search with give you the answer.
Sounds good, I already have a couple of ideas in mind. I still want to learn more about C++ so I likely won't be submitting any PRs for a while. :-)
No worries, when you are ready. Anyway we don't use a lot of C++, just the basic. I like to call it "C with classes" as it used to be called initially :-) A lot of modern stuff is not use. Btw, TDE use c++11 standard, so anything newer than that is not officially supported.
let me know if there are other ways I can assist in the project. Happy to do more "chore" type of work if there is any. Stuff like bug triaging, wiki cleanup, site design (HTML/CSS) refinement, anything database (SQL) related, etc.
Well, there are plenty of ways to help. - translations, but for this task users are probably already doing great thanks to TWTW - documentation updates: either for applications or website/wiki - there is a long standing task that was to get the wiki to use the same color theme as the main website. It is something that was left over when we redesigned the site about 10 years ago. Maybe you can exchange some ideas with E.Liddell, who did the original work.
Another good way to contribute "chore" tasks and at the same time get you familiar with the building process, is to hunt for warnings in building logs and fix them. We have quite a bit of them, many are probably simple to fix. This will give you a change to build packages, make small changes and get familiar with the overall dev process. Just an idea, in the end it is still a chore task, but it would help to provide cleaner code. Reach out on the dev IRC chat on libera, easier to discuss there I guess. The chat is logged, so you can leave comments and I can comment back later if I am not online.
Cheers Michele
On Tuesday 29 October 2024 10:32:34 Michele Calgaro via tde-devels wrote:
I have seen this with vanilly neovim config, I get it every time I fire up a quick VM for testing. It's a matter of config, although I don't recall which option it is. Maybe a quick google search with give you the answer.
It may be an issue with either Konsole itself of the term it's emulating? I installed LazyVim to test out a fancy config and it's still show q. However, if I install the kitty terminal it looks fine. I'll figure it out eventually. :-)
No worries, when you are ready. Anyway we don't use a lot of C++, just the basic. I like to call it "C with classes" as it used to be called initially :-) A lot of modern stuff is not use. Btw, TDE use c++11 standard, so anything newer than that is not officially supported.
Ah! Good to know...I'll stick to c++11 then.
there is a long standing task that was to get the wiki to use the same color theme as the main website. It is something that was left over when we redesigned the site about 10 years ago. Maybe you can exchange some ideas with E.Liddell, who did the original work.
Sounds good, I'll take a look and run it by them.
Another good way to contribute "chore" tasks and at the same time get you familiar with the building process, is to hunt for warnings in building logs and fix them. We have quite a bit of them, many are probably simple to fix. This will give you a change to build packages, make small changes and get familiar with the overall dev process. Just an idea, in the end it is still a chore task, but it would help to provide cleaner code.
Great idea! This sounds like something I might actually enjoy doing.
Reach out on the dev IRC chat on libera, easier to discuss there I guess. The chat is logged, so you can leave comments and I can comment back later if I am not online.
I'm already there, my username is m1k3. :-) See you around!
Mike Smith via tde-devels wrote:
OOP, etc. I haven't used C++ before but interested in learning.
I started with BASIC in 1984 and then had some C and Prolog in 1994. After this I found OOP from the concept side of things more logical and started learning OOO in PERL, PHP, C++.
What does your programming environment look like? Do you code in a VM or container so that you don't mess with your main system's configuration? What's your favorite editor or IDE? I'm curious what you're typical workflow looks like.
I am not a devoted developer, but rather enthusiast. However after TDE was born and KDeveloper did not improve much because of man power constraints, I found Eclipse (the C++ IDE) to be very powerful tool. It requires a bit of mem and cpu, but it has many useful plugins and additional tools that make development easy. For the dependencies (includes, libs) and the related syntax highlighting I setup the paths and export them. Then I import them into any TDE project I open. It supports collaboration in GIT. I'll end up here with the advertisement - if you are interested have a look into it. I prefer developing on my workstation, but compiling in chroot and testing in a VM. There are various reasons I do this, but in fact you can do everything in one VM, or perhaps mount a share with the code repository into the VM, so that you can recreate the VM without affecting the repo.
Many thanks to Michele for sharing and supporting in the beginning of my journey.
BR