Go to Post Oh, and your t-square and pencil can't crash, unlike your laptop :D - scottydoh [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
View Poll Results: Who uses white space?
Yes, i make it so people can read my code 39 69.64%
Yes, i make it so i think that others can resd it 7 12.50%
No, only I can read my code 3 5.36%
I think that only i can read my code 3 5.36%
I don't understand the question. 4 7.14%
Voters: 56. You may not vote on this poll

Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-03-2009, 23:20
cooldude8181's Avatar
cooldude8181 cooldude8181 is offline
Registered User
AKA: Charlie Davies
FRC #1245 (Shazbots)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2009
Location: Colorado
Posts: 39
cooldude8181 is an unknown quantity at this point
"White space"

Who uses white space???

(if you don't know what that is, it is like making your programs easy to read)
  #2   Spotlight this post!  
Unread 17-03-2009, 23:23
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,054
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: "White space"

Why wouldn't you use white space?
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #3   Spotlight this post!  
Unread 17-03-2009, 23:31
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,562
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: "White space"

I use it so I can read my code.
  #4   Spotlight this post!  
Unread 17-03-2009, 23:33
R.C.'s Avatar
R.C. R.C. is offline
2017... Oooh Kill em, Swerve!
AKA: Owner, WestCoast Products
FRC #1323 (MadTown Robotics)
Team Role: Engineer
 
Join Date: Feb 2008
Rookie Year: 2006
Location: Madera, CA
Posts: 2,179
R.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond repute
Re: "White space"

Quote:
Originally Posted by virtuald View Post
Why wouldn't you use white space?
You would be surprised, some people just don't like to organize their code after its written.
__________________
R.C.
Owner, WestCoast Products || Twitter
MadTown Robotics Team 1323
  #5   Spotlight this post!  
Unread 17-03-2009, 23:36
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,054
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: "White space"

Quote:
Originally Posted by rc_cola1323 View Post
You would be surprised, some people just don't like to organize their code after its written.
I know that some people don't use whitespace, I'm just questioning why one would want to do so (ie, it seems like the OP is trying to make a case for not using whitespace). As Joe pointed out, using whitespace makes your code easier for you (and everyone else) to read.

Generally, the argument is for how much whitespace is enough, and usually boils down to personal opinion. Personally, I like white space.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #6   Spotlight this post!  
Unread 17-03-2009, 23:47
ChuckDickerson's Avatar
ChuckDickerson ChuckDickerson is offline
Mentor / Bayou & CMP Division LRI
FRC #0456 (Siege Robotics)
Team Role: Mentor
 
Join Date: May 2004
Rookie Year: 2004
Location: Vicksburg, MS
Posts: 877
ChuckDickerson has a reputation beyond reputeChuckDickerson has a reputation beyond reputeChuckDickerson has a reputation beyond reputeChuckDickerson has a reputation beyond reputeChuckDickerson has a reputation beyond reputeChuckDickerson has a reputation beyond reputeChuckDickerson has a reputation beyond reputeChuckDickerson has a reputation beyond reputeChuckDickerson has a reputation beyond reputeChuckDickerson has a reputation beyond reputeChuckDickerson has a reputation beyond repute
Re: "White space"

Quote:
Originally Posted by virtuald View Post
Why wouldn't you use white space?
It adds too much weight to the robot. Each space = ~0.0001327 oz. Tabs are either 4 or 8 times that depending on your editor settings. Count up all the white space in your code sometime and calculate how much weight it adds.


  #7   Spotlight this post!  
Unread 17-03-2009, 23:52
R.C.'s Avatar
R.C. R.C. is offline
2017... Oooh Kill em, Swerve!
AKA: Owner, WestCoast Products
FRC #1323 (MadTown Robotics)
Team Role: Engineer
 
Join Date: Feb 2008
Rookie Year: 2006
Location: Madera, CA
Posts: 2,179
R.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond reputeR.C. has a reputation beyond repute
Re: "White space"

Quote:
Originally Posted by virtuald View Post
I know that some people don't use whitespace, I'm just questioning why one would want to do so (ie, it seems like the OP is trying to make a case for not using whitespace). As Joe pointed out, using whitespace makes your code easier for you (and everyone else) to read.

Generally, the argument is for how much whitespace is enough, and usually boils down to personal opinion. Personally, I like white space.
Oh, don't get me wrong I totally agree with you. But some people are lazy and tend not to use whitespace. Using whitspace makes code easier to read and it allows for easy editing. Comments are another big issue that some people do not use (cough our programmer sometimes).
__________________
R.C.
Owner, WestCoast Products || Twitter
MadTown Robotics Team 1323
  #8   Spotlight this post!  
Unread 18-03-2009, 00:02
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: "White space"

Did anyone else think of the programming language whitespace?

After writing a bit in Python, I more fully appreciate proper formatting for code. Programming is codified communication, with the machine and with the human. I don't over kill on it in other languages, but I do try to maintain some semblance of order, even if I'm just writing a short script to check my calculations.
  #9   Spotlight this post!  
Unread 18-03-2009, 02:16
Cow Bell Solo's Avatar
Cow Bell Solo Cow Bell Solo is offline
No Stolte No
AKA: Chris
FRC #2194 (Fondy Fire)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Minnesota
Posts: 381
Cow Bell Solo is a jewel in the roughCow Bell Solo is a jewel in the roughCow Bell Solo is a jewel in the roughCow Bell Solo is a jewel in the rough
Send a message via AIM to Cow Bell Solo Send a message via MSN to Cow Bell Solo Send a message via Yahoo to Cow Bell Solo
Re: "White space"

I like to use white space, especially since I'm not the only one working or reading the code. Also my dad is a software engineer, and he has shared with me when he looks at code that a group is working on and they don't comment or orginize their code. Especially when others have to understand and read the code.
__________________
Who let the Blue Smoke Out
Team 2194 Mentor - 2012-Present - http://fondyfire.com
Team 2207 Alumni - http://whitebearlakerobotics.com
Iowa FIRST LEGO League Planning Team Member - 2010-Present - http://www.isek.iastate.edu/fll
FIRST LEGO League volunteer - 2008-Present

2008: MN Regional Quarterfinalists, Website Excellence
2009: MN North Star Quarterfinalists, recognized for safety, Website Excellence
  #10   Spotlight this post!  
Unread 18-03-2009, 07:38
swamp_child's Avatar
swamp_child swamp_child is offline
Registered User
AKA: Cody
FRC #0179 (Children Of The Swamp)
Team Role: College Student
 
Join Date: Dec 2005
Rookie Year: 2005
Location: riveria beach
Posts: 100
swamp_child is a name known to allswamp_child is a name known to allswamp_child is a name known to allswamp_child is a name known to allswamp_child is a name known to allswamp_child is a name known to all
Re: "White space"

Quote:
Originally Posted by DeepWater View Post
It adds too much weight to the robot. Each space = ~0.0001327 oz. Tabs are either 4 or 8 times that depending on your editor settings. Count up all the white space in your code sometime and calculate how much weight it adds.


for the same reason we usually don't use comments.
__________________
2009 Florida Champions thanks to 233 and 1649!
2008 UCF finalists thanks to 69 and 342
2007 world Finalist, thanks to 233 and 71, we love you guys
2007 Archemedies undefeated champions, thanks to 233 and 71
2007 UCF finalists thanks to 1902 108 and 386

  #11   Spotlight this post!  
Unread 18-03-2009, 07:47
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: "White space"

I love whitespace! If the OP is trying to argue against it, he's in for a surprise if he ever gets a programming job. Even if you can read non-whitespaced code, nobody else can.

Some kids I've mentored in the past didn't use tabs at all, and it was painful to look at. It was impossible to tell, at a glance, when functions started, the scope of loops, etc. It was all either memorization or bracket-counting.
  #12   Spotlight this post!  
Unread 18-03-2009, 09:21
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: "White space"

This year I found the majority of compilation errors that I helped my students fix were due to mismatched braces (usually with inconsistent indention). Whitespace is good, especially if you want quick help.

Helpful Windriver tip: Select your code and press Ctrl-I to auto indent your code
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"
  #13   Spotlight this post!  
Unread 18-03-2009, 13:35
Mr. Freeman Mr. Freeman is offline
Put better title here.
AKA: Kellan
no team (CSM Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Colorado
Posts: 198
Mr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to beholdMr. Freeman is a splendid one to behold
Re: "White space"

Quote:
Originally Posted by virtuald View Post
I know that some people don't use whitespace
There are people that write their programs on a single line?
__________________
"Time is an illusion, lunchtime doubly so."
-Douglas Adams
“Why is it that I can walk into Wal-Mart and buy boxes of bullets and black powder, but I can’t buy potassium perchlorate to do science because it can also be used to make explosives?”
-Theodore Gray
  #14   Spotlight this post!  
Unread 18-03-2009, 14:06
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: "White space"

I use it as much as possible.
I tend to follow the statement I believe Alan Anderson made: "Software is documentation that compiles into code". I my have mis-quoted that, but you get the idea.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
  #15   Spotlight this post!  
Unread 18-03-2009, 14:18
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: "White space"

Quote:
Originally Posted by DeepWater View Post
It adds too much weight to the robot. Each space = ~0.0001327 oz. Tabs are either 4 or 8 times that depending on your editor settings. Count up all the white space in your code sometime and calculate how much weight it adds.


I sincerely hope you're joking. Extra code doesn't add any weight.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Championship Event - Where the "Random" Match Sorting Really "Shines" Travis Hoffman Championship Event 57 19-04-2007 08:06
New NEMO White Papers! "Creating a Killer Packet" and "25 Ways to Sponsor" Jessica Boucher Team Organization 0 10-08-2005 10:55
Team 1126 "Crazy Wheels" white paper Alex Cormier Technical Discussion 1 25-10-2004 15:54
"Thunderbirds" Vs. "Team America" Which one will rule the box office? Elgin Clock Chit-Chat 3 07-09-2004 19:53
Transcript: "The Space Shuttle Columbia Accident: What's Next?" DanL General Forum 2 03-03-2003 21:35


All times are GMT -5. The time now is 02:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi