about today's huge auto change

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: about today's huge auto change

Post by uwestoehr »

berniev wrote: Sun Sep 18, 2022 6:01 am I had just completed a curteous detailed response and this f'ing stoopid pos bbs demanded re-login before submitting and the reply was discarded.
To avoid that, bookmark this address:
https://forum.freecadweb.org/
and login there. Then you are directly in the forum.
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: about today's huge auto change

Post by openBrain »

berniev wrote: Sun Sep 18, 2022 9:51 am We spoke about this ages (Mar/Apr?) ago. The future is more privacy. How do we fix this? Kill/extend the timeout? Give me the keys?
Use Brave browser
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: about today's huge auto change

Post by uwestoehr »

berniev wrote: Sun Sep 18, 2022 6:01 am Anyhow, much to do. I propose:
- Permit auto on class var (from within the class) [existing practise]
- Permit auto loop on method return value (from within the same class) [existing practise]
- Require * in auto on pointer [clang-tidy default]
I agree with all of that. I was only wondering why we need to invest manpower to change existing definitions. There was no disadvantage as they were. The code was (maybe even better) readable as now.

Therefore I would like not to work on this kind of code beautification but to use our limited manpower (coding _and_ reviewing) on the many issues we have.
(Just two examples where code refactoring is needed:
- Part and PartDesign often has the same functionality but uses doubled code causing inconsistencies and lot of work when fixing issues.
- TechDraw has many dependencies that could be removed. As it is, on most code changes, TechDraw has to be recompiled while no other WB has this issue)

@berniev , I am happy you joined us and your work is great. Therefore please don't see this post as against your work. it is that we need manpower like yours to fix long-standing issues that cost us already much time. By working on e.g. my 2 examples, you would help FreeCAD a lot and save us in the long run many hours of spare time in the future since the code would be better maintainable
berniev
Posts: 247
Joined: Wed Apr 13, 2022 10:45 pm
Location: Oz

Re: about today's huge auto change

Post by berniev »

uwestoehr wrote: Sun Sep 18, 2022 10:51 am To avoid that, bookmark this address:
https://forum.freecadweb.org/
and login there. Then you are directly in the forum.
Really? I would never have thought of that!
But seriously, I think you do not understand the problem.
berniev
Posts: 247
Joined: Wed Apr 13, 2022 10:45 pm
Location: Oz

Re: about today's huge auto change

Post by berniev »

openBrain wrote: Sun Sep 18, 2022 10:56 am Use Brave browser
I like what Apple is doing. It is the way of the future. Keep messrs google and facebook out.
chrisb
Veteran
Posts: 53938
Joined: Tue Mar 17, 2015 9:14 am

Re: about today's huge auto change

Post by chrisb »

berniev wrote: Sun Sep 18, 2022 8:17 pm
openBrain wrote: Sun Sep 18, 2022 10:56 am Use Brave browser
I like what Apple is doing. It is the way of the future. Keep messrs google and facebook out.
... and have Apple in :lol: .
Brave doesn't seem to be connected with with one of the big companies.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
berniev
Posts: 247
Joined: Wed Apr 13, 2022 10:45 pm
Location: Oz

Re: about today's huge auto change

Post by berniev »

uwestoehr wrote: Sun Sep 18, 2022 10:59 am I was only wondering why we need to invest manpower to change existing definitions. There was no disadvantage as they were. The code was (maybe even better) readable as now.
Maybe to you the code is like a favourite old coat. Its is ugly and broken and certainly last century's fashion but you are very comfortable in it, even if you look like a tramp when you wear it.

I'm spending some time reading this code, or at least trying to.

I find myself muttering "you're kidding!", "why write stuff thats so hard to understand", "hasn't anyone thought to fix this", "why keep repeating the same thing over and over", "why not assign meaningful names", "why not name singular and plural appropriately", "why are these options laid out as code using many functions, when they are inherently data", "why keep using this horrible preprocessor stuff", "5000 line files, huh?", "a bit of refactoring would improve this", "spaghetti code - impossible to unit test (not functional test)", "so much inheritance, so little composition", "so many dependencies", "why is xyz defined again (and again, and again)", "why keep adding to this pile instead of fixing it", "so this is what legacy code looks like!", "it looks like they're scared to touch the old stuff, easier to just add new", "how can this be refactored when there's stuff buried in xml files?", "this is 2022", "C++20 soon. clang finally has modules", "why are some methods in the wrong class", "why not consistent format, can't they agree on anything", "are they still using VEDIT? If they used a proper IDE they'd be seeing the same zillion warnings as me", "a career c++ programmer said to me Warnings? Just ignore them. Now I know what he meant","modern language constructs are so much better than last century","was it really necessary to overload xyz so many different ways", "overloaded / to do string concat. WTF? Very hard to spot that one", "why wouldn't they tackle topo naming problem", "obviously never heard of Apple's famous goto fail", "maybe they got it the wrong way round and this should be a python program with C++ where speed critical", "but the comment says the opposite".

As every year goes by, as every piece of new functionality is added, it gets harder and harder to go back. The enormity of the task to catch up is breath-taking. Legacy code is not a career move for young programmers, so attracting good ones becomes problematic, as is reported here all the time. So it becomes chicken and egg.

I have no idea how Part, PartDesign or TechDraw work, why they are even necessary, or what it is exactly they do. All I wanted was a simple alternative to Sketchup after they went web. But I found FC gui to be crap and when I mentioned this was effectively told don't bother us, we like it as it is, or fix it yourself.

I'm steadily picking up C++ and enjoy refactoring so the simple, low-hanging fruit I've been doing is a perfect fit.

So here we are six months later. There have been tremendous steps taken to use clang-tidy and clang-format, and a steady stream of commits have ensued, and continue. I've contributed over 15000 changes, and am certainly not alone. Until now the process has been very efficient. Hopefully a global reformat is not too far off. Still some details of format and tidy need thrashing out, but not so many.

But, under a bit of pressure, its same old, same old. "I (or is that we) like it how it is". Perhaps we have a philosophical difference.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: about today's huge auto change

Post by uwestoehr »

berniev wrote: Sun Sep 18, 2022 8:16 pm Really? I would never have thought of that!
But seriously, I think you do not understand the problem.
What is the problem then?

For me the problem is that when I log in to
https://forum.freecad.org/

I have to enter my credential twice, only with login to
https://forum.freecadweb.org/
it works as it should.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: about today's huge auto change

Post by uwestoehr »

berniev wrote: Sun Sep 18, 2022 10:10 pm Maybe to you the code is like a favourite old coat. Its is ugly and broken and certainly last century's fashion but you are very comfortable in it, even if you look like a tramp when you wear it.
Ehm, no. Please re-read my post. Our code needs improvements in many areas.
My point was that we need manpower for that and since our manpower is limited we should not use it for beautifications and in my opinion the auto change was such a thing. It does not actually improve tghe readability, made the code faster or better readabyle, but it changes many files. I am currently responsible for the backports and fear merge conflicts and don't forget our goal for the next major release - toponaming. We will have to merge this beast one day and I fear us sitting there many hours to fix merge conflicts.
berniev wrote: Sun Sep 18, 2022 10:10 pm I have no idea how Part, PartDesign or TechDraw work, why they are even necessary, or what it is exactly they do. All I wanted was a simple alternative to Sketchup after they went web. But I found FC gui to be crap and when I mentioned this was effectively told don't bother us, we like it as it is, or fix it yourself.
Sorry, I cannot follow you. How can you judge the UI "crap" (I don't like words like this, given the countless hours many volunteers spent) without knowing what it is for? And how can you judge at all how good/bad code it by saying you don't know what it is for.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: about today's huge auto change

Post by wandererfan »

berniev wrote: Sun Sep 18, 2022 10:10 pm I find myself muttering "you're kidding!", "why write stuff thats so hard to understand", "hasn't anyone thought to fix this", ...
Ahh, memories. I said most of these things 40 years ago in my first job after university. A lot of the code I said it about is probably still running and still a mess. Such is the lot of a maintenance programmer.

I'm not a big fan of "format" changes because there is almost a certainty of introducing hard to find errors, and we don't have a big testing department to exercise the changed code and insure that everything still works. I'd rather see a checklist that says "if you touch code, make sure a, b and c are brought up to standards x though z". At least then you know that the beautified code has been tested. But if you are enjoying yourself, that's the important thing, so carry on.
berniev wrote:Legacy code is not a career move for young programmers
https://www.indeed.com/q-Mainframe-Lega ... b951aff5e0 :twisted:
Post Reply