Author Topic: QB64 REPORT S02E05: Coding Styles  (Read 1584 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Forum Resident
  • Posts: 5947
  • B+ Knot again!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #15 on: December 01, 2020, 11:19:51 AM »
Combining comments made here in Discussion Program and an old, old comment I read about using all CAP's for CONSTants, I am trying a new system of Capital letter start of all Globals or SHARED variables that I always have declared at start after CONSTs and TYPEs. That and I took to heart the comment of overuse? of just a couple of letters for variable names. Now I will try to at least be more descriptive with Global SHARED constants and variables but in little SUBs and FUNCTIONs or even that Main, I don't see it as necessary. It should be obvious in the context.

A little defensive: surely you guys know x, y, z for position coordinates w, h for width and height, maybe too r, c are short for row and column, mx, my, mb are mouse updates...

Now I can clearly see what variables are coming from 'nowhere' (the beginning of the program declared Globals) and know what they are from CAPs and better description.

Word Search Puzzle Builder is my first program with that style purposely imposed: https://www.qb64.org/forum/index.php?topic=3311.0

So if it reads better than my usual, it's from your influence here :)

Yes I agree that code should read as well as program functions, they could likely contribute to each other specially psychically for human creators. 

So Zack is Spriggsy, Dave is Cobalt and Bill looks a little like my room mate from college the semester I had my best GPA and who was a physics major also. I pictured Bill with Black hair, about every Bill I ever knew had Black hair, funny how wrong our imagination can be.
« Last Edit: December 01, 2020, 11:37:22 AM by bplus »

Offline Pete

  • Forum Resident
  • Posts: 2410
  • Cuz I sez so, varmint!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #16 on: December 01, 2020, 01:42:36 PM »
Quote
...Dave is Cobalt...

This is why they don't let me participate in these reports. If Cobalt logged on, all he'd get from me is "Dave's not here, man."

Pete


Offline FellippeHeitor

  • QB64 Developer
  • Forum Resident
  • Posts: 2712
  • LET IT = BE
    • QB64.org
Re: QB64 REPORT S02E05: Coding Styles
« Reply #17 on: December 01, 2020, 01:47:09 PM »
I definitely think we should all arrange to meet online any day. Several mysterious faces would show up and it'd be awesome! Let's do it before Christmas comes!

Offline Pete

  • Forum Resident
  • Posts: 2410
  • Cuz I sez so, varmint!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #18 on: December 01, 2020, 01:48:47 PM »
Dave's not here, man.

Offline FellippeHeitor

  • QB64 Developer
  • Forum Resident
  • Posts: 2712
  • LET IT = BE
    • QB64.org
Re: QB64 REPORT S02E05: Coding Styles
« Reply #19 on: December 01, 2020, 01:49:08 PM »
@bplus Looking forward to the final version!

Offline Pete

  • Forum Resident
  • Posts: 2410
  • Cuz I sez so, varmint!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #20 on: December 01, 2020, 01:49:37 PM »
Dave's not here, man.

Offline FellippeHeitor

  • QB64 Developer
  • Forum Resident
  • Posts: 2712
  • LET IT = BE
    • QB64.org
Re: QB64 REPORT S02E05: Coding Styles
« Reply #21 on: December 01, 2020, 01:50:31 PM »

Offline bplus

  • Forum Resident
  • Posts: 5947
  • B+ Knot again!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #22 on: December 01, 2020, 02:05:47 PM »
+ ahhh that's where that  started. :) I could here the voice but not place the face or context.

Is Dave going to get a new nickname? ;-))

Offline Pete

  • Forum Resident
  • Posts: 2410
  • Cuz I sez so, varmint!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #23 on: December 01, 2020, 02:06:43 PM »
Dave's not here, man.

Offline Petr

  • Forum Resident
  • Posts: 1540
  • The best code is the DNA of the hops.
Re: QB64 REPORT S02E05: Coding Styles
« Reply #24 on: December 01, 2020, 02:38:19 PM »
Fellippe wrote:

Quote
I definitely think we should all arrange to meet online any day. Several mysterious faces would show up and it'd be awesome! Let's do it before Christmas comes!

You know, I'd love to talk to you. But I'm not capable of that. Without the captions in your video, I'd vaguely know what we're talking about. I don't speak spoken English at all. I am still a child from communism, I learned Russian .... and then German. Finally, I try to communicate in English. Life is just as special, it's never the way one imagines it. Frankly, my inability to speak English annoys me terribly.

Offline Pete

  • Forum Resident
  • Posts: 2410
  • Cuz I sez so, varmint!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #25 on: December 01, 2020, 03:18:28 PM »
Let me help...

Step 1) Buy a SCREEN 0 tee-shirt from QB64.org.

Step 2) Log on to the report channel.

Step 3) Point to "SCREEN 0" lettering on your tee-shirt throughout the entire discussion.

That's just good YouTube.

SCREEN 0, it's the only English anyone should ever need.

Pete

Offline Cobalt

  • Forum Resident
  • Posts: 708
  • At 60 I become highly radioactive!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #26 on: December 01, 2020, 03:37:10 PM »
This is why they don't let me participate in these reports. If Cobalt logged on, all he'd get from me is "Dave's not here, man."

Pete

Dont you mean,

"I'm sorry Dave, I'm afraid I can't do that."
Granted after becoming radioactive I only have a half-life!

Offline Pete

  • Forum Resident
  • Posts: 2410
  • Cuz I sez so, varmint!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #27 on: December 01, 2020, 04:04:36 PM »
Dave's not here, man.

Offline Cobalt

  • Forum Resident
  • Posts: 708
  • At 60 I become highly radioactive!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #28 on: December 01, 2020, 04:59:01 PM »
Do I still come off as Monotonous?

I may just not be a public speaker, I guess.

Maybe next time I'll try to use a slight Scottish\Irish accent, makes my daughters laugh and giggle when I read to them that way.


Just like Pete when he thinks about Clippy!
Granted after becoming radioactive I only have a half-life!

Offline bplus

  • Forum Resident
  • Posts: 5947
  • B+ Knot again!
Re: QB64 REPORT S02E05: Coding Styles
« Reply #29 on: December 01, 2020, 06:40:05 PM »
Hi Cobalt,

Don't worry, easier said than done I know. If you really want to be a public speaker or just be better there are things you can do.
#1 that comes to my mind is having talking points you eager to share.