• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Most requested stuff on Google Moderator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Most requested stuff on Google Moderator


  • Subject: Re: Most requested stuff on Google Moderator
  • From: Farrukh Ijaz <email@hidden>
  • Date: Wed, 28 Mar 2012 11:55:27 +0300


On 2012-03-28, at 11:23 AM, David Avendasora wrote:


On Mar 28, 2012, at 3:31 PM, Farrukh Ijaz wrote:

return contentDisposition != null && (contentDisposition.indexOf("inline") > -1 || contentDisposition.indexOf("attachment") > -1);

Seriously, who can read that and make sense of it immediately?!

This is programmers shorthand. They master it with time. If you find these statements somewhere in the code, consider that piece of code been written by an experienced programmer which is less likely to have bugs. This is style is still not difficult than what you can find in a TopCoder algorithm which contains is full of boolean and bit manipulation operators.

I have to  _vehemently_  disagree. One way many people learn how to be good coders it by looking at other people's code and being able to see what it does. Not only that, but the assumption that it's less likely to have bugs because it is obtuse?! Are you serious?

You've the freedom agree or disagree but not _vehemently_. Everyone should respect other's opinion and so do I with respectfully. One must learn the language syntax. Why should I use such a verbosity in code when it's already easy to understand.

int max = (x > y) ? x : y;

is much better in readability than:

int max = 0;

if (x > y) {
max = x;
} else {
max = y;
}


This is one of the most elitist things I've heard said on the WO-dev list.

If this is so bad practice then why Project Coin introduces Strings in switches, developer can still do if-elseif-elseif-elseif...else coding. This is in fact elite coding style :) Following is excerpt for String.java

public boolean equalsIgnoreCase(String s)
    {
        return this != s ? s != null && s.count == count && regionMatches(true, 0, s, 0, count) : true;
    }

We really shouldn't go into coding convention domain. I respect everyone's style and we should try to learn the best practices. Trust me verbosity is good for examples but in practice, we should compact our code as much as we can.

Thanks,

Farrukh


Dave

—————————————————————————————
WebObjects - so easy that even Dave Avendasora can do it!™
—————————————————————————————
David Avendasora
Senior Software Abuser
Kaiten, Inc.





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Most requested stuff on Google Moderator
      • From: Paul Hoadley <email@hidden>
References: 
 >Most requested stuff on Google Moderator (From: Pascal Robert <email@hidden>)
 >Re: Most requested stuff on Google Moderator (From: Pascal Robert <email@hidden>)
 >Re: Most requested stuff on Google Moderator (From: Mike Schrag <email@hidden>)
 >Re: Most requested stuff on Google Moderator (From: Pascal Robert <email@hidden>)
 >Re: Most requested stuff on Google Moderator (From: Ted Archibald <email@hidden>)
 >Re: Most requested stuff on Google Moderator (From: Paul Hoadley <email@hidden>)
 >Re: Most requested stuff on Google Moderator (From: ISHIMOTO Ken <email@hidden>)
 >Re: Most requested stuff on Google Moderator (From: Johann Werner <email@hidden>)
 >Re: Most requested stuff on Google Moderator (From: David Avendasora <email@hidden>)
 >Re: Most requested stuff on Google Moderator (From: Farrukh Ijaz <email@hidden>)
 >Re: Most requested stuff on Google Moderator (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: EODataSource
  • Next by Date: Re: Most requested stuff on Google Moderator
  • Previous by thread: Re: Most requested stuff on Google Moderator
  • Next by thread: Re: Most requested stuff on Google Moderator
  • Index(es):
    • Date
    • Thread