Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   New Programming Manual (http://www.chiefdelphi.com/forums/showthread.php?t=85836)

rhoads2234 25-05-2010 08:52

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?)

rhoads2234 25-05-2010 09:31

Re: New Programming Manual
 
2 Attachment(s)
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....

rhoads2234 26-05-2010 08:56

Re: New Programming Manual
 
2 Attachment(s)
There were a couple "reference cannot be found." I fixed that (I hope) and added in a section on Versioning.

Robototes2412 26-05-2010 19:08

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).

rhoads2234 27-05-2010 11:16

Re: New Programming Manual
 
2 Attachment(s)
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.

rhoads2234 01-06-2010 09:39

Re: New Programming Manual
 
2 Attachment(s)
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.

rhoads2234 01-06-2010 10:16

Re: New Programming Manual
 
2 Attachment(s)
Sorry, I forgot to update the table of Contents. Here it is with the updated table of contents.

rhoads2234 02-06-2010 08:12

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.

rhoads2234 02-06-2010 09:12

Re: New Programming Manual
 
2 Attachment(s)
Some small stuff managed to slip through my fingers, those have been edited....

Jared Russell 02-06-2010 09:30

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!

rhoads2234 02-06-2010 10:47

Re: New Programming Manual
 
Thanks Jared!

spartango 19-07-2010 03:49

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.

LukeS 25-07-2010 22:34

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 (Post 941967)
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)

spartango 08-08-2010 14:24

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.

LukeS 09-08-2010 21:30

Re: New Programming Manual
 
Quote:

Originally Posted by spartango (Post 971171)
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 (Post 971171)
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.


All times are GMT -5. The time now is 10:29.

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