Recommended Posts

Posted
9 minutes ago, anatess2 said:

11667978_1611424485800447_407066884_n.jp

 

I used to think the right-hand example was somehow more elegant, but over time I have developed a pronounced bias for the left-hand example.

Posted
15 minutes ago, Vort said:

I used to think the right-hand example was somehow more elegant, but over time I have developed a pronounced bias for the left-hand example.

I may have to debit you a respect-point for such obviously flawed thinking.  Sigh.

(Although they both have the indentation wrong.)

Posted
1 minute ago, zil said:

I may have to debit you a respect-point for such obviously flawed thinking.  Sigh.

Anyone who gets to know me sufficiently well debits me all sorts of respect points. I'm used to it.

Posted
34 minutes ago, Vort said:

I used to think the right-hand example was somehow more elegant, but over time I have developed a pronounced bias for the left-hand example.

Personally I prefer K&R style (right side) because it is the way I have always done it, however, Allman style (left side), is arguably the more readable.  That said, consistency is more important than chosen style.  Anyway, I don't program for a living, so my opinion only matters for the projects I work on!

Posted (edited)
3 hours ago, anatess2 said:

11667978_1611424485800447_407066884_n.jp

You're right.  I am not a programmer and I have no idea what you're saying.  i only learned four languages about 30 years ago (one was 40 years ago).  And one of them was assembly language that I never used except in that one class.

Edited by Guest
Posted
44 minutes ago, Carborendum said:

You're right.  I am not a programmer and I have no idea what you're saying.  i only learned four languages about 30 years ago (one was 40 years ago).  And one of them was assembly language that I never used except in that one class.

While both are syntactically correct, the left one is organizationally erroneous.

Posted

I'm a historian.  I'm also old. 

This old Historian who barely can use a computer correctly to connect to this forum has NO idea about why the jokes in this thread are funny.

But historically, that's probably par for the course.

Oh...but I did find this entertaining...

 

Posted
13 hours ago, zil said:

OK, now we need a "groooaaannn" reaction icon.

At least you understood it.  I had to explain it to my kids.  I guess I need to go over more chemistry with the family.

Posted

A few years ago online I saw this code... I can't find it now but as best I recall it went like this (with a couple mods of my own):

public abstract class OneRing implements Invisibility{

public void ruleThemAll(){}

public void findThem(){}

public void bringThemAll(boolean isInDarkness){

  if(isInDarkness){

      bindThem();

  }

  }

private void bindThem(){}

@Override

public void makeInvisible(){}

}

  • 1 month later...
Posted

Once I saw this guy on a bridge about to jump. I said, "Don't do it!" He said, "Nobody loves me." I said, "God loves you. Do you believe in God?"

He said, "Yes." I said, "Are you a Christian or a Jew?" He said, "A Christian." I said, "Me, too! Protestant or Catholic?" He said, "Protestant." I said, "Me, too! What franchise?" He said, "Baptist." I said, "Me, too! Northern Baptist or Southern Baptist?" He said, "Northern Baptist." I said, "Me, too! Northern Conservative Baptist or Northern Liberal Baptist?"

He said, "Northern Conservative Baptist." I said, "Me, too! Northern Conservative Baptist Great Lakes Region, or Northern Conservative Baptist Eastern Region?" He said, "Northern Conservative Baptist Great Lakes Region." I said, "Me, too!"

Northern Conservative†Baptist Great Lakes Region Council of 1879, or Northern Conservative Baptist Great Lakes Region Council of 1912?" He said, "Northern Conservative Baptist Great Lakes Region Council of 1912." I said, "Die, heretic!" And I pushed him over.

Posted
On 5/23/2018 at 10:11 PM, anatess2 said:

11667978_1611424485800447_407066884_n.jp

 

I'm definitely the first type. Also I like while statements to be on their own line, below the closing } of the block. Also I hate the way the new MS Visual Studio inserts spaces for you. I like to decide myself where spaces go. For comments I vastly prefer // to /* ... */. (I only ever use the latter to "comment out" code blocks temporarily.) I dislike the way most C++ textbooks tell you to give main() an integer return value, and include a totally pointless return 0; at the last line. (I daresay a dozen people will give me twenty good reasons why this is done, but none of you are going to persuade me to give up using void main();) 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...