Page 1 of 1
Code Beautifer Resources
Posted: Fri Sep 08, 2006 10:59 pm
by alex.barylski
http://www.prettyprinter.de/index.php
http://en.wikipedia.org/wiki/Prettyprint - Haven't tried any but it's lengthly
It's not perfect, but it's online which is nice...
I would hate to download an application for such un-essential task, but yet, so frequently we as developers are forced to either manually reformat the code to our own standards or run a beautifer...
Personally I could never be bothered to install YAA (Yet Another Application) for such a one off task, but online resources...now that makes sense...
Anyone know of any others for our supporting languages???
HTML/Javascript/PHP/CSS I think would be a good general coverage. Maybe SQL too.
I figure if we can all pool our resources, and build a list of online beautifers...we could make this a sticky as I'm sure you've all encountered this problem as well...
Maybe even post a downloadable version, but make sure it's quality, otherwise...there is no point
Your turn...go out there and google for web based beautifers and post those links here...
Cheers

Posted: Sat Sep 09, 2006 12:38 am
by Todd_Z
Gave it a little test whirl, not so impressed. For example, that "beautifier" would turn
into a multilined madness
Posted: Sat Sep 09, 2006 2:21 am
by alex.barylski
I never claimed they were perfect did I?
Besides it's experiemental...which is fine...cause even a little automation in beuatifying source code is a big help...
They are not easy to write...you should try it...it's quite a programming challenge

Posted: Sat Sep 09, 2006 4:17 am
by onion2k
That'd be handy for some of my old sites. Is there a one I can run against a batch of files (like.. 500 files..)?
Posted: Sat Sep 09, 2006 11:19 am
by MrPotatoes
no doubt. hell, if there is a desktop version (faster and better IMO) that would be great.
shoot, i'm thinking of making one sometime next week on my off time

Posted: Sat Sep 09, 2006 12:24 pm
by alex.barylski
The only problem I see with using a dekstop version...
You'd be more likely to have to beautifier run on production code...if there is a bug...which is possible considering most desktop apps are done in C++ which is likely to yeild more buggy code, depending on the developer, compiler, IDE, etc...
You'd be screwed if it chewed your source and you had no backups...
By virtue of the fact it's more difficult to develope desktop applications...it would also likely be less flexible...
Server Side is the way to go IMHO

Posted: Sat Sep 09, 2006 1:15 pm
by MrPotatoes
wtf are you talking about? are you serious?
if you don't understand to have a backup of your work you shouldn't be working professionaly. period.
REGARDLESS of serverside or desktop there will always be bugs. how many times has PHPBB2 needed to be security fixed? that isn't a bug it's a feature?
C++ more buggy code? this completely dumbfounded me. you HAVE to be kidding. sorry man but i'd hate to flame but that comment is completely asinine. it's like saying that reading books is more prone to paper cuts so have a bok read to you
Posted: Sat Sep 09, 2006 2:10 pm
by pedrotuga
i remember visualstudio had a keyboard shortcut to auto-indent the code back when i used it.
but this things... i don't know... the time when its more necessary to have the code beautifier is when you are actually writing it... if you dont have it correctly idented then... i don't know.
I guess its not a critical tool, i took at my code and it need no identation.
Posted: Sat Sep 09, 2006 2:19 pm
by alex.barylski
MrPotatoes wrote:wtf are you talking about? are you serious?
if you don't understand to have a backup of your work you shouldn't be working professionaly. period.
REGARDLESS of serverside or desktop there will always be bugs. how many times has PHPBB2 needed to be security fixed? that isn't a bug it's a feature?
C++ more buggy code? this completely dumbfounded me. you HAVE to be kidding. sorry man but i'd hate to flame but that comment is completely asinine. it's like saying that reading books is more prone to paper cuts so have a bok read to you
a. Your right...I've been at this longer than you've been alive...I'm ready for retirement I think

I retract that comment incase your like 50 or something
I was simply hinting at the fact that as developers, like in any profession, we sometimes become complacent with unlimited undo's and if by chance you beautified an entire source tree (with buggy software) and *forgot* to backup...you'd have a very frustrated few moments...
REGARDLESS of serverside or desktop there will always be bugs. how many times has PHPBB2 needed to be security fixed? that isn't a bug it's a feature
My software never has bugs in it

I'm perfect
C++ more buggy code? this completely dumbfounded me. you HAVE to be kidding. sorry man but i'd hate to flame but that comment is completely asinine. it's like saying that reading books is more prone to paper cuts so have a bok read to you
C++ the language itself is *not* the culprit...but the developers themselves.
I've programmed in C++ for over 10 years...in almost every GUI library available today...I've stared at probably hundreds of thousands of lines of source code and played with even more. I've seen more buggy software in C++ by it's complicated nature and more house work being required.
The language is not what is buggy...in fact it's probably the most stable well known, well understood language both in terms of expressing oneself and in terms of compiler design. It's complicated to program in and is common knowledge to most professional C++ developers they will likely encounter bugs in even small source code bases (depending on their origin and maturity of course).
Like Murphy's Law suggests:
"If anything can go wrong it will"
So I'm afraid...my friend...with complexity, comes more complexity...I think your to accustomed to PHP handling the dirty work for you....
Cheers

Posted: Sat Sep 09, 2006 2:47 pm
by MrPotatoes
as long as we are at terms. you sounded like serverside is better than C++ or compiled languages
phew, i was questioning your sanity there for a min
Posted: Sat Sep 09, 2006 3:26 pm
by alex.barylski
IMHO there is no better language...I can program software in many...and I am slightly biased in favour towards C++ but I love PHP too.
Considering the circumstances...I would *personally* choose a web based solution is all I was saying
Cheers
