tag:blogger.com,1999:blog-4073584026239112200.post1059309209862143948..comments2023-09-29T16:39:50.116+02:00Comments on from old school to new frontier: How to format your Delphi-Sourcecode!delphiprofihttp://www.blogger.com/profile/09517751070144650172noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-4073584026239112200.post-41878411608342423232023-01-29T05:47:42.949+01:002023-01-29T05:47:42.949+01:00Love it. I think the obvious answer to "why&q...Love it. I think the obvious answer to "why" is that structurally formatted code is peaceful to read and deal with. Other code looks like a road crash to me. <br /><br />I'll never understand why other people seem to be happy not drawing out the symmetries that are hidden in code written like ...<br /> FWhatever:string;<br /> FCount:Integer; <br /> function GetWhatever:String;<br /> procedure SetWhatever(const AValue:string);<br />At least the IDE can sometimes line up the colons, I suppose. <br /><br />I guess "normal" formatting might be a side effect of time pressures<br />But yes, I want alignment and symmetry as much as possible. pmcgeehttps://www.blogger.com/profile/08105299318785784208noreply@blogger.comtag:blogger.com,1999:blog-4073584026239112200.post-51827935307274424512022-05-23T18:40:30.285+02:002022-05-23T18:40:30.285+02:00tldr;
b) I dislike your code formatting, please st...tldr;<br />b) I dislike your code formatting, please stay with the Borland way ;-)<br />Dennishttps://www.blogger.com/profile/05785254684036078497noreply@blogger.comtag:blogger.com,1999:blog-4073584026239112200.post-50264563304275170142022-05-23T17:45:34.808+02:002022-05-23T17:45:34.808+02:00Leave a comment means:
a.) I like you code format...Leave a comment means: <br />a.) I like you code formatting...Please provide a full list...<br />b.) I dislike you code formatting. I stay with the Borland way...<br /><br />Btw. I have no fear to leave other opinion on my blog, but I've established my coding style and improved it,<br />and I'm doing this for 40 years now... <br />If you like my FDK or my D.MVVM you can just press CRTL-D to reformat it if you have bought it.delphiprofihttps://www.blogger.com/profile/09517751070144650172noreply@blogger.comtag:blogger.com,1999:blog-4073584026239112200.post-24193177400324703692022-05-23T11:17:35.329+02:002022-05-23T11:17:35.329+02:00I really think you are a great Delphi programmer o...I really think you are a great Delphi programmer overall - I read about your FDK/other projects all the time and often said to me, hey that sounds cool, let's see how he is solving some problems there - but as soon as I saw some of your code, I immediately closed the project, just because it is hard to read *for any other than yourself*. Of course you don't have to care about others while coding your own projects, but if they have a hard time reading your code, they may just go away instead of bringing a project further along. And no, I'm used to the official Delphi code style and your code is NOT readable to me, despite your spacing effort - it's just does not "fit".<br /><br />Sure, UCSD and all other variants didn't had a specific style (what you've learned in a course or in a book was sometimes totally different styled in another book). But this is not UCSD here, it's Embarcadero Delphi. And they DO have a code style. I may sound very harsh - and I appreciate publishing my comment after all ;-) but you totally sound like some of my collegues that despite having the Embarcdero style guide set in stone with all of our projects (with 2 small changes), they always argue about their superior reading code style, which is a nightmare for all others. <br />And you're quite right with "Well-formatted source code becomes more and more important for me the older I get" - you began to realize while reading your old cumbersome formatted code - which is now hard to read even for you - that a consistent code style helps a lot. Yes, but no, don't create a new cumbersome code style, which isn't well readable in some years by yourself as well...<br /><br />You see this is a very controversy topic here, as one styling is better readable to one and another is better readable to another one. There won't be a formatting that is suitable to all coders, but fortunately there is an offical one, so there shouldn't be no need to create a completely new one.<br /><br />Btw: "Be my guest and please leave a comment" and "My time is too valuable to get into a discussion here" does not really belong together, isn't it?<br />Dennishttps://www.blogger.com/profile/05785254684036078497noreply@blogger.comtag:blogger.com,1999:blog-4073584026239112200.post-29400300595019416542022-05-23T09:54:50.482+02:002022-05-23T09:54:50.482+02:00Thank you for your blunt opinion. Source code, jus...Thank you for your blunt opinion. Source code, just like language development, is constantly changing. Many UCSD Pascal programmers have turned over in their graves because variable declarations or procedures suddenly appear in the middle of the code. The same applies to the source code formatting. Fortunately I don't care if someone doesn't like my formatting. Many of my rules make sure that I can read my code faster and better, even if I look at a method again after 5 years... My time is too valuable to get into a discussion here... I do it the way I want. delphiprofihttps://www.blogger.com/profile/09517751070144650172noreply@blogger.comtag:blogger.com,1999:blog-4073584026239112200.post-78466461320895233102022-05-22T15:24:04.353+02:002022-05-22T15:24:04.353+02:00Oh behave. Nearly ALL of your formatting makes me ...Oh behave. Nearly ALL of your formatting makes me sick. Of course "you have a reason" for doing something different than the rest. Why can't you stick to the "official" source code formatting done be Borland/CodeGear/Embarcadero? I ALWAYS have to argue with some collegues about "their superior" code format style - what you don't understand is that some other who needs to read your code loses a lot of time "reformatting" your code (even it's done only inside their brain). That's totally wasted time just because you think your style is super cool.<br />And of course you don't even stick to your own rules in the code above (which makes me even more sick), like, is there a space before a ":" and an opening "(" or not... see: "Whatever(Display:string)" and "( Const aLogFilename : String )"<br /><br />Your incoherent code style is just disgusting. The main rule while working in a team is to stick to ONE code formatting guide (which clearly states your a lone warrior). And in order to avoid loooong discussions why this or that is better, why not just use the official one. Which helps even yourself reading the official VCL code! Incoherent source code formatting is one of the big Delphi fails for beginners, just take a look at StackOverflow or somewhere - you'll find 1000 different styles, which really doesn't help beginners at all writing clean code right from the start.<br />Sorry to be that rude, but it's an ongoing everyday struggle with different delphi developers. Please just stick with the official code style, else the others can't easily read your code. And I'm quite sure you'll get used to that in a short amount of time (as everybody does) and then it feels the same way natural than your now own code style.<br />(That's one thing I like about Python: if you don't stick to a coherent indentation your code does not run).<br />In the interest of all sane Delphi developers, please don't create any more "superior" code formatting style guide, thanks.Dennishttps://www.blogger.com/profile/05785254684036078497noreply@blogger.com