Code Beautifier for Progress 4GL

no7892142

New Member
No, it doesn't by itself. Things like proper indenting (and arguably capitalisation of keywords) also play a role.
However, in my opinion it surely plays a role in the process of code beautification, making source code a whole lot more readable at first glance.
And it's probably the part that's easiest to implement.
 

TomBascom

Curmudgeon
Capitalizing keywords is only slightly less of an affront to readability and beauty as hungarian notation. Not doing either is, by far, the easiest thing you can do to make your code better looking and more readable.
 

GregTomkins

Active Member
Whoa. Whoa. WHOA!
It's one thing to berate trivial details like version 9, .I's, DEF SHARED, GOTO (if only...), arrays, RAID 5, non-backups, non-source control, FIND FIRST, CAN-DO, dictionary validation, and USE-INDEX ...
But something truly important, like capitalization??!? That's a low blow ;)
 

RealHeavyDude

Well-Known Member
Frankly, I only started coding in lower case and using Java naming conventions ( camel case of variable and object names ) since I do some Java coding too and I don't want to change my coding style every now and then. Hence I don't like Progress to use the capitalization of the first letter of methods ( like many C# developers do ). But that is just a personal preference as I am more into Java than C#.

Nevertheless, most of colleagues are still upper casing ABL keywords. But it is not the casing which - in most cases - makes spaghetti code that is hardly readable. The upper/lower casing of ABL keywords is one of my least worries. I would be happy if I only had to deal with clean structured code that does contain meaningful comments.

Heavy Regards, RealHeavyDude.
 

no7892142

New Member
Capitalizing keywords is only slightly less of an affront to readability and beauty as hungarian notation. Not doing either is, by far, the easiest thing you can do to make your code better looking and more readable.
I put in the "arguably" in anticipation to your response anyway, heh.
But yeah, in the end, it's a matter of taste anyway. I usually prefer my keywords in capitals. Might subconsciously because I'm German and we like to at least start important words with capitals, who knows.
 

Cringer

ProgressTalk.com Moderator
Staff member
That's interesting - I lived in Germany for 6 years as a child and I much prefer capitalised keywords... Hmmmmmm
 

tamhas

ProgressTalk.com Sponsor
Well, I lived in Germany for several years as a child and don't suffer that perversion.

To me, capitalization is emphasis. Capitalizing keywords is putting the emphasis on the wrong words. Moreover, capitalized text is harder to read than mixed case text (science, not personal observation). To me, capitalized keywords are like someone who has never quite let go of tab cards.
 

Cringer

ProgressTalk.com Moderator
Staff member
Ah dang there goes that theory then... :)
I never used tab cards, so it can't be that...
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Luckily I'm not talented enough to have these aesthetic issues. ;) This is when my code is "beautiful":
Code:
┌──── Information ─────┐
│  Syntax is correct.  │
│ ──────────────────── │
│         <OK>         │
└──────────────────────┘
:D
 

PDECODE

Active Member
You can try freeware Piew editor for windows, it has these code "beautify" function:

- Code Beautifier - based on beauty.p (indent blocks)
- Remove comments
- Remove empty lines
- Auto case keywords - you can change capitalization on existing source! (not just by writing)
- Align DEFINE VARIABLE, FIELDS (place selected define section nice in "columns")
- Align ASSIGN statements (place "=" sign in one column for all selected expression)

(more about using in readme.txt)
 

Bernd Roeltgen

New Member
So I created a simple NPP syntax highlighter for Progress 4GL as I was unable to find anything already existing.
Even though this thread is years old, I thought I might as well share it, maybe it'll be of some use to someone else, too.
(Especially since the OEA, even though an amazing tool in itself, suffers from the usual Eclipse problems.)

Simply rename to .xml [as I can't upload those here] and import under "Language -> Define your language...".

Thank you, no7892142, absolutely perfect and absolutely easy to install!
I already tried several highlighter for the NPP, this is the first one that really works!
(other interested users: see [HASHTAG]#20[/HASHTAG])
 
Top