Go to Post and Bob's your uncle. - Joe Johnson [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 25-05-2010, 08:52
rhoads2234's Avatar
rhoads2234 rhoads2234 is offline
Registered User
AKA: Erin
FRC #2234
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: PA
Posts: 80
rhoads2234 will become famous soon enough
Re: New Programming Manual

I'm using Word 2007, but Delphi doesn't accept the .docx file extension.
I'll post it in a pdf once I finish making some corrections I caught. (maybe 20 minutes?)
__________________
ALWAYS a mechanical problem!
Reply With Quote
  #17   Spotlight this post!  
Unread 25-05-2010, 09:31
rhoads2234's Avatar
rhoads2234 rhoads2234 is offline
Registered User
AKA: Erin
FRC #2234
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: PA
Posts: 80
rhoads2234 will become famous soon enough
Re: New Programming Manual

So I explained a couple of things better, changed to a table of contents and fixed the tabbing and colors that got messed up.

I've included both a .pdf and .doc version of the manual. They *should* be the same....
Attached Files
File Type: doc ManualBasicsv4.doc (2.31 MB, 25 views)
File Type: pdf ManualBasicsv4.pdf (938.9 KB, 68 views)
__________________
ALWAYS a mechanical problem!
Reply With Quote
  #18   Spotlight this post!  
Unread 26-05-2010, 08:56
rhoads2234's Avatar
rhoads2234 rhoads2234 is offline
Registered User
AKA: Erin
FRC #2234
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: PA
Posts: 80
rhoads2234 will become famous soon enough
Re: New Programming Manual

There were a couple "reference cannot be found." I fixed that (I hope) and added in a section on Versioning.
Attached Files
File Type: doc ManualBasicsv5.doc (2.30 MB, 30 views)
File Type: pdf ManualBasicsv5.pdf (961.2 KB, 31 views)
__________________
ALWAYS a mechanical problem!
Reply With Quote
  #19   Spotlight this post!  
Unread 26-05-2010, 19:08
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: New Programming Manual

if you are using word 07, please use ODT. Some people disable .doc file parsing to save about 30 MB of memory per session (on average).
Reply With Quote
  #20   Spotlight this post!  
Unread 27-05-2010, 11:16
rhoads2234's Avatar
rhoads2234 rhoads2234 is offline
Registered User
AKA: Erin
FRC #2234
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: PA
Posts: 80
rhoads2234 will become famous soon enough
Re: New Programming Manual

I've rearranged some of the sections, and added one on a Timeline and another on Competition tidbits.

EDIT: I still haven't been able to find the option to save as ODT. I hope that everyone can at least read the pdf.
Attached Files
File Type: pdf ManualBasicsv6.pdf (1.34 MB, 31 views)
File Type: doc ManualBasicsv6.doc (2.33 MB, 40 views)
__________________
ALWAYS a mechanical problem!

Last edited by rhoads2234 : 27-05-2010 at 11:18. Reason: I forgot something
Reply With Quote
  #21   Spotlight this post!  
Unread 01-06-2010, 09:39
rhoads2234's Avatar
rhoads2234 rhoads2234 is offline
Registered User
AKA: Erin
FRC #2234
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: PA
Posts: 80
rhoads2234 will become famous soon enough
Re: New Programming Manual

I've added definitions of Autonomus and Operator Control.

PLEASE COMMENT ON ANYTHING! I really would love feedback!

EDIT: this one doesn't have the updated table of contents. See the next post for the one with updated Table of Contents.
Attached Files
File Type: pdf ManualBasicsv7.pdf (1.05 MB, 22 views)
File Type: doc ManualBasicsv7.doc (2.33 MB, 15 views)
__________________
ALWAYS a mechanical problem!

Last edited by rhoads2234 : 01-06-2010 at 11:18.
Reply With Quote
  #22   Spotlight this post!  
Unread 01-06-2010, 10:16
rhoads2234's Avatar
rhoads2234 rhoads2234 is offline
Registered User
AKA: Erin
FRC #2234
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: PA
Posts: 80
rhoads2234 will become famous soon enough
Re: New Programming Manual

Sorry, I forgot to update the table of Contents. Here it is with the updated table of contents.
Attached Files
File Type: pdf ManualBasicsv8.pdf (1.05 MB, 39 views)
File Type: doc ManualBasicsv8.doc (2.35 MB, 18 views)
__________________
ALWAYS a mechanical problem!
Reply With Quote
  #23   Spotlight this post!  
Unread 02-06-2010, 08:12
rhoads2234's Avatar
rhoads2234 rhoads2234 is offline
Registered User
AKA: Erin
FRC #2234
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: PA
Posts: 80
rhoads2234 will become famous soon enough
Re: New Programming Manual

Just so everyone knows, this manual will be going up on 2234's website (www.episcopalacademy.org/robotics) over the summer. We about to remake the entire school website, so this will be added in the revision.
__________________
ALWAYS a mechanical problem!
Reply With Quote
  #24   Spotlight this post!  
Unread 02-06-2010, 09:12
rhoads2234's Avatar
rhoads2234 rhoads2234 is offline
Registered User
AKA: Erin
FRC #2234
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: PA
Posts: 80
rhoads2234 will become famous soon enough
Re: New Programming Manual

Some small stuff managed to slip through my fingers, those have been edited....
Attached Files
File Type: pdf ManualBasicsv9.pdf (1.05 MB, 239 views)
File Type: doc ManualBasicsv9.doc (2.35 MB, 104 views)
__________________
ALWAYS a mechanical problem!
Reply With Quote
  #25   Spotlight this post!  
Unread 02-06-2010, 09:30
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,080
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: New Programming Manual

I just took a read through your latest version - this is a very useful document so far! What is perhaps most useful is that it is being written from the point of view of a student who has learned in a hands-on way, rather than by a professional programmer. The different perspective will definitely help it to be more accessible to many.

Keep it up!
Reply With Quote
  #26   Spotlight this post!  
Unread 02-06-2010, 10:47
rhoads2234's Avatar
rhoads2234 rhoads2234 is offline
Registered User
AKA: Erin
FRC #2234
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: PA
Posts: 80
rhoads2234 will become famous soon enough
Re: New Programming Manual

Thanks Jared!
__________________
ALWAYS a mechanical problem!
Reply With Quote
  #27   Spotlight this post!  
Unread 19-07-2010, 03:49
spartango spartango is offline
Registered User
FRC #0192 (GRT)
Team Role: Alumni
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Palo Alto, CA
Posts: 43
spartango is an unknown quantity at this point
Re: New Programming Manual

Hey a heads up:
http://livemyst.comli.com/wpilibj/doc/index.html
==> We need a new host for the javadocs, these are actually *prerelease* documents that are now way out of date. Sure for 95% of things people will be fine, but this is suboptimal still. Can you point users in the direction of local copies of the javadocs for squawk & wpilib? they are in the sdk folders.
Reply With Quote
  #28   Spotlight this post!  
Unread 25-07-2010, 22:34
LukeS LukeS is offline
4272 mentor, 1024 alumnus
AKA: Luke Shumaker
FRC #4272
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Indianapolis, IN
Posts: 60
LukeS is an unknown quantity at this point
Re: New Programming Manual

Versioning:
Our team used
projectname-yyyy.MM.dd.hh.mm (description)
The autosorting still keeps them in the right order, you get a summery of the changes, and can have multiple projects in the same directory.
Also, if we are working in the same directory as the backups, we use the version `wch' to mean the working copy. This still works, since `w' will autosort to after anything you would put in for yyyy, so it is ``more recent'' than any of your backups.

Of course, we didn't use that much this year, since we used an actual versioning system. We use Mercurial, since it seamed easiest to set up on Windows. You will need to install it separately from here (if you're using a package manager, use that instead). I've already made a post on Mercurial (http://www.chiefdelphi.com/forums/sh...d.php?t=83588).
Quote:
Originally Posted by LukeS View Post
Also, since Windows and *NIX newlines are different, Netbeans automatically does this, so you end up having to make an empty commit with the message ``convert to UNIX newlines, ignore...''
I later realized, that even though Netbeans makes you do this, Mercurial normalizes all newlines in the archive anyway, and rejects the commit as an empty commit. Also, newer versions of Netbeans do not have this problem.

In order to clone between computers with Mercurial, you need SSH. Most of the time, we would just clone to a USB drive (using above naming convention for the clone). However, especially if several developers are working at the same time, cloning is very nice. Though it we never found a `great' solution, using Cygwin to install openSSH on Windows machines seems to be the best option. Don't use the stripped down ssh-only cygwin program.

Formatting:
Brackets
While I respect your code formatting choices, every programmer I have talked to generally agree that not giving braces their own line improves readability and economy of space
Code:
if (condition) {
    ...
} else {
    ...
}
...
Although, many C programmers make an exception for functions, and give the brackets their own line. This is because it's what's in K&R C.

Tabs
Also, all of our programmers agree that it makes editing code way easier if you use tabs instead of multiple spaces. This can be adjusted in Netbeans by going to Tools/Options/Editor/Formatting. Uncheck ``Expand tabs to spaces'' and adjust the first to numbers to 4 (or, both to 8, if you prefer. I use 4 in OO languages, 8 otherwise).

Netbeans shortcuts
Also, it should probably be noted that in Netbeans, if you highlight several lines of code, you can hit <tab> to shift them to the right, and <shift>+<tab> to shift them to the left, instead of clicking the buttons.

Javadocs:
Instead of giving users a link to a web page with the WPILibJ javadocs, you should give them the location on their computer, since at competitions they probably won't have Internet, and it might change with an update.
on Windows:
%USER_ROOT%/sunspotfrcsdk/doc/javadoc/index.html
on *NIX:
$HOME/sunspotfrcsdk/doc/javadoc/index.html

Also, you should talk to them about writing javadocs for their own code, if you have a complex robot (or, at least complex code), this is a life-saver. It also makes it way easier for a new programmer to wrap his head around your code-base.

Misc:
Correction: You note that in the default code, they use `m_' for ``robot parts''. Actually they use it for anything that will likely be changed frequently (likely the `m' is for `mutable'). For example, the the active buffer in the network code in WPILibJ is m_buffer (or something like that).
Typo: in ``COOLEST THING I SAW'' (which is *very* cool), the sample code you give will not work, you use
Code:
m_ pot* instead of
m_pot*
when getting the different pots from the drive station.
Suggestion: It may be educational for programmers to peak at the WPILibJ source code. It is installed at `sunspotfrcsdk/lib/WPILibJ/' (same sunspotfrcsdk folder as the javadocs, see above)

Last edited by LukeS : 25-07-2010 at 22:42. Reason: add formatting to headers, improve readability
Reply With Quote
  #29   Spotlight this post!  
Unread 08-08-2010, 14:24
spartango spartango is offline
Registered User
FRC #0192 (GRT)
Team Role: Alumni
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Palo Alto, CA
Posts: 43
spartango is an unknown quantity at this point
Re: New Programming Manual

FYI--
Code:
if (condition) {
    ...
} else {
    ...
}
is actually the prescribed formatting style laid out in the official conventions

Also,
I'm not sure I would point students in the direction of the WPILib src, just because its more of a port of a C++ library than a really well done java framework, and so isnt exactly a model for development.
Reply With Quote
  #30   Spotlight this post!  
Unread 09-08-2010, 21:30
LukeS LukeS is offline
4272 mentor, 1024 alumnus
AKA: Luke Shumaker
FRC #4272
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Indianapolis, IN
Posts: 60
LukeS is an unknown quantity at this point
Re: New Programming Manual

Quote:
Originally Posted by spartango View Post
FYI--
Code:
if (condition) {
    ...
} else {
    ...
}
is actually the prescribed formatting style laid out in the official conventions
Indeed. However, there are a few items in that document that I strongly disagree with (mainly indentation, and secondly, commenting).

Quote:
Originally Posted by spartango View Post
Also,
I'm not sure I would point students in the direction of the WPILib src, just because its more of a port of a C++ library than a really well done java framework, and so isnt exactly a model for development.
Even so, it is something that they will be interacting with regularly. At some point, to properly understand something you must ditch the documentation, and just look at what the code is doing.
Reply With Quote
Reply


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
Changes in the New Revision of the Control System Manual mcf747 General Forum 2 07-12-2008 22:10
Completely new to programming robots... Comatose Programming 4 19-09-2008 19:22
The complete FIRST Programming manual project David55 Programming 3 02-07-2006 21:38
Is there a manual for the new default code somwhere? Anton Programming 1 16-01-2005 16:34
New programming resource rbayer Programming 0 03-12-2002 00:14


All times are GMT -5. The time now is 12:57.

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