|
I didn't say there was anything wrong with using a program to format reams of legacy code. He never mentioned legacy code so I attempted a somewhat amusing response, albeit you can use your brain to decide how to format your own code.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
C'mon guys, you are missing the point!!
What are you looking for? something free or paid?
have you tried www.narrange.net/[^]
|
|
|
|
|
Link fail!
Keep Clam And Proofread
--
√(-1) 23 ∑ π...
And it was delicious.
|
|
|
|
|
Lol, I've got no idea of what happened..... I may have written something wrong.. Well, here it goes again, but copied and pasted this time..
http://www.narrange.net/[^]
|
|
|
|
|
Why would you even wanto to beautify legacy code?
It's legacy code. Leave it be, or rewrite it.
I don't beautify code. Code does not have to be beautifull. It has to work, and has to be readable. Make up and earrings will not make your code better. It will just distract you, and fool you into thinking it's perfect, untill it opens "it's" mouth and all that comes out is crap.
Focus on better code, make it readable, add comments when needed. And structure it in the way you think it makes it easier to read and follow the logic behind it, but do it yourself and don't rely on tools.
Who knows, maybe you'll catch a bug or two, or even identify flaws in the logic side.
|
|
|
|
|
You don't know what a code beautifier is or what it does, do you?
That's fine, of course.
Moving on...
|
|
|
|
|
Yes I do.
Which is why I say that you should not rely on those.
When you don't have a code beautifier on hand, and not even able to get one, what are you gonna do?
|
|
|
|
|
This is insane.
I no longer recognize CP.
|
|
|
|
|
Crying when people don't agree with you won't win you any points.
|
|
|
|
|
What disagreement? You are delusional.
I am just looking for a tool and two fools are going on on tangents no one gives a crap about.
|
|
|
|
|
CP has gone down the drain.
Let me rephrase.
A question for those of you that actually know what a code beautifier is (and does) and can't be bothered to waste time digging themselves into a hole pretending to be "smart", what do you guys use for C#? I would like to do better than AStyle/Uncrustify.
Thank you in advance.
|
|
|
|
|
Franc Morales wrote: A question for those of you that actually know what a code beautifier is (and does) and can't be bothered to waste time digging themselves into a hole pretending to be "smart", what do you guys use for C#? I would like to do better than AStyle/Uncrustify.
I have no idea as I don't code in C# or much at all really now. But Paulo Kunzel a couple of replies up pointed you to http://www.narrange.net/[^], he just messed up his link.
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
Thank you both.
EDIT: Too simple a tool.
|
|
|
|
|
Check everything inside Tools->Options->Text Editor->C#->Formatting->General (at least for VS2010, VS2012 could be a little different, I have not tried), Open the file, click Ctrl-A, Ctrl-K and Ctrl F, then it formats the code in a nice way. However you have to open the code files to do it. I am not sure is this what you actually wanted though ...
|
|
|
|
|
Yes, the built-in beautifier has improved somewhat but I'm afraid it is still not flexible enough.
Thank you, though.
|
|
|
|
|
I had to stop using such lovely tools because ...
everyone here has their own preferred style
and so Source Code Comparisons noted almost every line as a change.
If you find a tool that prettifies C# on user preferences, but manages to avoid the issue with source control code comparisons - let me know!
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
A workaround it to keep two user preferences, one shared by everyone and one for yourself. Use the first one before a commit or a diff.
Beautifiers save so many keystrokes that it is plain evil to have to give them up...
|
|
|
|
|
Yeah - in another work environment I'd insist on that - here it's all too hard!
We get some devs just manually going through code changing the bracketing to their preference.
I suggested automating the build process on check in and was met with such negativity I've pretty much given up suggesting any improvements in process.
Sorry - feeling particularly cynical today!
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
Well, it depends really.
Tools like never really work in every case. It really depends on case to case.
Sometimes it's nice to have it separated, makes it more readable.
Sometimes you have some inline stuff, thaat if you separated in the same way would just confuse you.
|
|
|
|
|
We are pushing out a new release.
Since we have launched the product, there was one design decision, which was affecting the performance. But it required quite a bit changes and a lot of testing, so I was keep delaying it (for 6 months). Today I decided to take a look at the issue and plan if we could work on it, while we prepare for the next release, so that we could save time and do the testing along with the new release.
I have estimated 6 Days of work on the issue when I logged it. But today I fixed it in 7 hours, in a much better way than previously documented. (Now we can even scale-down the azure instance and save some money.)
|
|
|
|
|
Congratulations, Dave !
Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview
|
|
|
|
|
Good job!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
If you're not in competition with us: Hey, great job!
If you are: I hope it crashes and burns, you cocky sod!
Well, 'slife, innit?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
In both the cases, Thank you!
|
|
|
|