|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tim Nikias wrote:
>
> Heh, that reminds me... Some guy actually wrote code like this:
>
Somehow those variables remind me of what I've decided I'll do at work
some day, when I'll have a place where it fits:
if (!successful) {
try_harder();
}
> Regards,
> Tim
--
Eero "Aero" Ahonen
http://www.zbxt.net
aer### [at] removethiszbxtnetinvalid
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp <war### [at] tagpovrayorg> wrote:
> Gail Shaw <initialsurname@sentech sa dot com> wrote:
> > Whereas I find the first far too spread out to be able to read easily
>
> Compactness does not imply readability. On the contrary.
>
> --
> - Warp
IBELIEV
ETHATIN
THISCAS
EIAMCOM
PELLEDT
OAGREEW
ITHYOU!
BEST
REGA
RDSM
IKEC
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> Compactness does not imply readability. On the contrary.
I'd say that there is only a fairly weak correlation (positive or
negative) between compactness and readability.
x = 2*y*y*y - 3*a*b
is much more readable than
t1 = y*y
t2 = y*t1
t3 = 2*t2
t4 = a*b
t5 = 3*t4
t6 = t3-t5
despite being much more compact. Counter-examples in the opposite
direction are not hard to find either.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Invisible wrote:
> is much more readable than
>
> t1 = y*y
> t2 = y*t1
> t3 = 2*t2
> t4 = a*b
> t5 = 3*t4
> t6 = t3-t5
>
> despite being much more compact. Counter-examples in the opposite
> direction are not hard to find either.
Hey ... that looks familiar.
... I think someone here used to write code exactly like that! 0.o
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Stephen wrote:
> On Fri, 27 Jun 2008 01:26:58 +0300, Eero Ahonen
> <aer### [at] removethiszbxtnetinvalid> wrote:
>
>> Warp wrote:
>>> I disagree.
>>>
>> Good, 'cause you're wrong.
>
> I can't help but agree with you.
I disagree.
Everyone's wrong!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Eero Ahonen wrote:
> Tim Nikias wrote:
>>
>> Heh, that reminds me... Some guy actually wrote code like this:
>>
>
> Somehow those variables remind me of what I've decided I'll do at work
> some day, when I'll have a place where it fits:
>
> if (!successful) {
> try_harder();
> }
>
>> Regards,
>> Tim
>
>
try
{
AcheiveYourGoals();
}
catch(DidntSucceedException ex)
{
TryAgain();
}
:p
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
stbenge wrote:
> If I worked for an organization, I would definitely change my style. Of
> course if I were programming for a living, I would probably go to school
> where they would teach me how to write code that people could decipher :)
Write code that others can decipher? Why would you do a thing like that? ;)
Everyone knows that if you code for a living, you code for job
security... you wouldn't want the janitor to take your job, would you? :D
(Of course, I'm joking .... it doesn't work well in a team environment
to code for job security)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Halbert wrote:
> How about Microsoft's engineers starting the whole Hungarian Notation
> convention with Windows programing. (like lpstrFilePath or iRecursion, etc.)
> There seems to be no set standard to it. While the intention is good, a
> beginner may have wonder why some variables have names like lpszDemung or
> lpfnCBack.
There seems to be two standards, one which describes type: lpszString
and one that defines function (sort of): instead of iOptions, it's fOptions.
You don't know how many times I've looked at a function signature, and
seen fSomething on something that should receive bits and wondered why
the hell they want a float, only to look a bit to the left and see that
it is indeed an integer.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Raiford wrote:
> try
> {
> AcheiveYourGoals();
> }
> catch(DidntSucceedException ex)
> {
> TryAgain();
> }
try
{
AchieveYourGoals();
}
catch (Failure e)
{
CallAirStrike();
}
// With appologies for Murphy...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Raiford wrote:
>
> try
> {
> AcheiveYourGoals();
> }
> catch(DidntSucceedException ex)
> {
> TryAgain();
> }
>
> :p
Would be great, too :). The thing about my code is that at work we have
this department-wide habit that if someone says "this doesn't work" or
"I can't do this" oslt, the first answer is usually "try harder".
--
Eero "Aero" Ahonen
http://www.zbxt.net
aer### [at] removethiszbxtnetinvalid
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |