RE: Codebase: enough with the overkill on line returns

78 views
Skip to first unread message
Message has been deleted

Aaron Powell

unread,
May 28, 2012, 8:41:21 AM5/28/12
to funnel...@googlegroups.com

Oh wow you’re *totally* right, our code really should be rewritten to use minimal whitespace so that we can save space and meet your arbitrary requirements to how our code should be laid out. This excess use of whitespace really makes our code harder to read and in turn harder to maintain. I can’t believe we let it get this bad, it really must be the top problem to be solved in the project!

 

In case you haven’t realised I’m being sarcastic. I can think of much better uses of my time than spending it reformatting our code to meet someone else’s beliefs on what makes readable code, like watching cats be funny on youtube.

 

Aaron Powell
MVP - Internet Explorer (Development) | FunnelWeb Team Member


http://apowell.me | http://twitter.com/slace | Skype: aaron.l.powell | Github | BitBucket

 

From: funnel...@googlegroups.com [mailto:funnel...@googlegroups.com] On Behalf Of Dave Schinkel
Sent: Monday, 28 May 2012 2:28 PM
To: funnel...@googlegroups.com
Subject: Codebase: enough with the overkill on line returns

 

To me this is totally unecessary and even more unreadable.  Why put line returns on every single DOT or comma depending on what you're coding out.

            context.MapRoute(
                "Admin_Install",
                "admin/install/{action}",
                new {controller = "Install", action = "Index"}
                );

Then the page just gets more long and conveluted

            context.MapRoute(
                "Admin_Install",
                "admin/install/{action}",
                new {controller = "Install", action = "Index"}
                );
            context.MapRoute(
                "Admin_Install",
                "admin/install/{action}",
                new {controller = "Install", action = "Index"}
                );
            context.MapRoute(
                "Admin_Install",
                "admin/install/{action}",
                new {controller = "Install", action = "Index"}
                );
            context.MapRoute(
                "Admin_Install",
                "admin/install/{action}",
                new {controller = "Install", action = "Index"}
                );
            context.MapRoute(
                "Admin_Install",
                "admin/install/{action}",
                new {controller = "Install", action = "Index"}
                );

instead of

Seriously please just make it nice and readable and a hell of a lot shorter/compact code:

context.MapRoute( "Admin_Install", "admin/install/{action}", new {controller = "Install", action = "Index"});
context.MapRoute( "Admin_Install", "admin/install/{action}", new {controller = "Install", action = "Index"});
context.MapRoute( "Admin_Install", "admin/install/{action}", new {controller = "Install", action = "Index"});
context.MapRoute( "Admin_Install", "admin/install/{action}", new {controller = "Install", action = "Index"});
context.MapRoute( "Admin_Install", "admin/install/{action}", new {controller = "Install", action = "Index"});

I don't understand why some dev's style is to put a tone of line returns on everything or in the middle for example of a method param list when the list is not that long and you can turn wrapping on in VS, it just clutters the page and makes code longer.

There are time sit makes sense, these are not one of them.

Another example

            var serviceRoutesUrls = serviceRoutes
                .Select(serviceRoute => serviceRoute.Url.Replace("{*

pathInfo}", ""))
                .ToArray();

Seriously, why are there all these line returns?  This line is not that long.

var serviceRoutesUrls = serviceRoutes.Select(serviceRoute => serviceRoute.Url.Replace("{*pathInfo}", "")).ToArray();

There needs to be a code style standard doc or something for FunnelWeb for whoever is helping develop this project.  And too many line returns should be one you don't follow....use your judgement IMO and that does not mean default to line returns on everything...if this is the habit, get rid of it.  I know everyone has their style but this is extremely annoying and just weird IMO.

IMO..but I bet I'm not the only one who hates seeing lines like this with unnecessary returns like this.  Anyway that's my rant when popping open this code for the first time.

Jimmy P

unread,
May 28, 2012, 9:12:01 AM5/28/12
to funnel...@googlegroups.com
TLDR

Fabzter

unread,
May 28, 2012, 9:30:35 AM5/28/12
to funnel...@googlegroups.com
I think the sarcastic comment was unnecesary Aaron.

Krokonoster

unread,
May 28, 2012, 12:55:37 PM5/28/12
to funnel...@googlegroups.com
I had a cousin that could only read backwards.  So guess the "standard" way does not work for everyone.

Jonathan Chayce Dickinson

unread,
May 29, 2012, 11:26:40 AM5/29/12
to funnel...@googlegroups.com
I know in javascript you avoid newlines but in C# we generally don't except for some of the more esoteric coding standards There are several reasons for this I think it's mostly because a single newline is similar to a paragraph break in English it makes things easier to read Coding standards are however a religious topic and so we can't complain about how you feel about the code although it seems as though the original developer who is usually dictator for life as far as open source projects go likes the code in a more English-like format None-the-less you should be able to use something like NRefactory to fix up your local copy of the code http://wiki.sharpdevelop.net/NRefactory.ashx I don't think the response from Aaron was entirely out of place Fabzter It's all about being a Roman when in Rome On Mon, May 28, 2012 at 6:55 PM, Krokonoster <kroko...@gmail.com> wrote: I had a cousin that could only read backwards.  So guess the "standard" way does not work for everyone.

Message has been deleted

Ed Giardina

unread,
May 29, 2012, 12:44:13 PM5/29/12
to funnel...@googlegroups.com, funnel...@googlegroups.com
If you knew people would be pissed, why did you write the message? Open source software is a gift, IMHO. Totally unnecessary especially with all the code tools available for formatting.

Sent from my iPhone

On May 29, 2012, at 12:09 PM, Dave Schinkel <dsch...@gmail.com> wrote:

Just a pet peeve bro :P  I don't like messy code lets just say.  I can't fathom how developers read this shit when it's seperated on 4 - 10 lines for a  one line statement.

I knew someone would throw a fit with my post :P.
Message has been deleted

Fabzter

unread,
May 29, 2012, 1:58:26 PM5/29/12
to funnel...@googlegroups.com
He's trolling. Let's don't feed the troll. If he thinks carriage returns are so important he can fork it's own version without carriage returns. Oh the lovely open source software.

On Tue, May 29, 2012 at 12:52 PM, MIT560 <mit...@gmail.com> wrote:
Here is my 2 cents. http://www.codejourney.com/carriage-returns-in-csharp-a-happy-medium


On May 28, 5:41 am, Aaron Powell <m...@aaron-powell.com> wrote:
> Oh wow you’re *totally* right, our code really should be rewritten to use minimal whitespace so that we can save space and meet your arbitrary requirements to how our code should be laid out. This excess use of whitespace really makes our code harder to read and in turn harder to maintain. I can’t believe we let it get this bad, it really must be the top problem to be solved in the project!
>
> In case you haven’t realised I’m being sarcastic. I can think of much better uses of my time than spending it reformatting our code to meet someone else’s beliefs on what makes readable code, like watching cats be funny on youtube.
>
> Aaron Powell
> MVP - Internet Explorer (Development) | FunnelWeb Team Member<http://funnelweblog.com/>
>
> http://apowell.me<http://apowell.me/> |http://twitter.com/slace| Skype: aaron.l.powell | Github<http://github.com/aaronpowell/> | BitBucket<http://hg.apwll.me/>

Fabzter

unread,
May 29, 2012, 2:02:07 PM5/29/12
to funnel...@googlegroups.com
>My personal opinion is that A is more readable and flows more better on the page.
>and flows more better on the page.
>more better on the page.
>more better

Ok I stopped reading there. I think FunnelWeb is really concerned about really important issues, not the readability of your routing....

On Tue, May 29, 2012 at 12:52 PM, MIT560 <mit...@gmail.com> wrote:

On May 28, 5:41 am, Aaron Powell <m...@aaron-powell.com> wrote:
> Oh wow you’re *totally* right, our code really should be rewritten to use minimal whitespace so that we can save space and meet your arbitrary requirements to how our code should be laid out. This excess use of whitespace really makes our code harder to read and in turn harder to maintain. I can’t believe we let it get this bad, it really must be the top problem to be solved in the project!
>
> In case you haven’t realised I’m being sarcastic. I can think of much better uses of my time than spending it reformatting our code to meet someone else’s beliefs on what makes readable code, like watching cats be funny on youtube.
>
> Aaron Powell
> MVP - Internet Explorer (Development) | FunnelWeb Team Member<http://funnelweblog.com/>
>
> http://apowell.me<http://apowell.me/> |http://twitter.com/slace| Skype: aaron.l.powell | Github<http://github.com/aaronpowell/> | BitBucket<http://hg.apwll.me/>
>

MIT560

unread,
May 29, 2012, 2:11:18 PM5/29/12
to FunnelWeb Discussion
I agree with you. I did leave out where I had found the discussion as
I did not want to point the finger at this community or opensource
project. I have removed the post to not let the link persist.

My only wish was to have a discussion on Code not on funnelweb. I
should have been more forthcoming with what I was looking for in my
post here.

On May 29, 11:02 am, Fabzter <fabos...@gmail.com> wrote:
> >My personal opinion is that *A* is more readable and flows more better on
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages