So any sites you guys can recommend on documentation standards and what not would be much appreciated.
The Big Programming Thread - Page 60
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
One Student
73 Posts
So any sites you guys can recommend on documentation standards and what not would be much appreciated. | ||
catamorphist
United States297 Posts
| ||
One Student
73 Posts
On June 14 2011 22:33 catamorphist wrote: The standard way is use your best judgement. I don't understand your statement. What does documentation have to do with judgement? Care to elaborate? | ||
wO-ZiGouNeT
United Kingdom21 Posts
| ||
ddengster
Singapore129 Posts
On June 14 2011 22:33 catamorphist wrote: The standard way is use your best judgement. Oh really? It's fine if you're working solo, but when you work in larger team you'll want a good standard way of documentation or you'll face a variety of annoying styles For starters, put a comment block, followed by a description, then list the parameters down and describe each of them. Finally, add in the return value and describe it. At the end of the day, another guy should be able to read these descriptions and understand how to use your function Example: /*******************************/ This function does something ParamA - Parameter a description ParamB - Parameter b description Return - An integer containing the result /*******************************/ If you're looking for good documentation software, try doxygen. It's the god of all documentation software, and is able to generate useful compiled html help files, though your documentation of course has to comply with doxygen's standards. | ||
catamorphist
United States297 Posts
On June 14 2011 22:53 ddengster wrote: Oh really? It's fine if you're working solo, but when you work in larger team you'll want a good standard way of documentation or you'll face a variety of annoying styles For starters, put a comment block, followed by a description, then list the parameters down and describe each of them. Finally, add in the return value and describe it. At the end of the day, another guy should be able to read these descriptions and understand how to use your function Example: /*******************************/ This function does something ParamA - Parameter a description ParamB - Parameter b description Return - An integer containing the result /*******************************/ If you're looking for good documentation software, try doxygen. It's the god of all documentation software, and is able to generate useful compiled html help files, though your documentation of course has to comply with doxygen's standards. Sure, but the original asker isn't working with a team and doesn't have a standard coming down from high. What does documentation have to do with judgement? Care to elaborate? Is something confusing, surprising, or especially important? If so, spend extra words documenting it. Your judgement is what determines what is worth documenting and how to explain it clearly. | ||
One Student
73 Posts
| ||
kingcoyote
United States546 Posts
| ||
AkaHenchway
United States41 Posts
| ||
AoN.DimSum
United States2983 Posts
I am trying to learn a lot, so any tips on java or android development would be appreciated. | ||
Craton
United States17233 Posts
The database would have all of the gym information, including their gps coordinates. I'm not really sure what the most efficient way would be to query the data and then compute which is closest -- probably something along the lines of pulling all the gyms which match a certain range of long and lat coordinates (+/- a certain amount from your current long/lat), then compute distance of each from you, then sort it. I don't work with Android specifically, so I'm not sure on what it can do with databases on the phone itself. | ||
VIB
Brazil3567 Posts
Learning android is very easy. The amount of stuff they put to help you learn is awesome. Start at this point: http://developer.android.com/resources/tutorials/hello-world.html Then go through the other harder tutorials. Then look at the app fundamentals http://developer.android.com/guide/topics/fundamentals.html Then toy around with the open source samples on the SDK (there's tons of them). And watch some of the videos on the dev site. There's some great videos about good practices for beginners there. | ||
AoN.DimSum
United States2983 Posts
I found really good tutorial videos! http://www.youtube.com/user/CornboyzAndroid I am learning a lot, thank you. | ||
Vinski
505 Posts
On June 18 2011 14:32 AoN.DimSum wrote: thank you guys, I appreciate the advice! I found really good tutorial videos! http://www.youtube.com/user/CornboyzAndroid I am learning a lot, thank you. Thanks for the reference to this channel I was having trouble finding good video guides :D | ||
Frigo
Hungary1023 Posts
On June 14 2011 22:30 One Student wrote: Hey guys I wanted to brush up on the standard way of documenting code. I've been doing it my own way up till now and thought it would be best if I switched early. So any sites you guys can recommend on documentation standards and what not would be much appreciated. Use a standard syntax for documentation like javadoc or doxygen. Document everything immediately except truly trivial things, with a general outline and usage of the class or function and whatever you deem important about it at the time of coding. Include references to any source material you used, for example, a link to Wikipedia or some paper describing an algorithm, it helps a lot. It might be useful if not overkill to document design decisions as why a class or function is the way it is, or describing alternatives and advantages or disadvantages of each. Just make sure you (or someone else) can understand your code with minimal effort a few months later. A friend's advice from a few months ago when I asked a similar question: Nam3l3ss says (18:32): rule of thumb is as follows well hmm subjective a bit, but everything that breaks class boundaries is to be documented IMMEDIATELY everything thats not 100% oop must be documented immediately Nam3l3ss says (18:33): patterns must be documented immediately Werepistike says (18:33): friend functions and classes as well ? Nam3l3ss says (18:33): yes reverse pathways must be documented and referred to eg. control inversions or aggregate relationships there are many cases Nam3l3ss says (18:34): in general, document everything thats not 100% natural eg. trivial get set, or functions which do what their names suggest are not a priority BUT if the function alters state of an object and is called externally it must be documented | ||
Natsumar
United States91 Posts
Since I've never taken an actual programming class and have only been casually messing around with Visual Basic (trust me, I know), I know all of nothing about actual programming, I was wondering where I could read up this summer about some general concepts of programming and maybe some introduction to Java specifically? | ||
inkblot
United States1250 Posts
On June 19 2011 08:35 Natsumar wrote: Hey guys, I'm going to start college this fall and I'm planning on majoring in Computer Sciences. I've already enrolled, but when I talked to my advisor she said my first actual class in the major, Fundamentals of Software Design, uses a lot of Java, is very fast paced, and can sometimes jump around, assuming you already know the basics of programming. Since I've never taken an actual programming class and have only been casually messing around with Visual Basic (trust me, I know), I know all of nothing about actual programming, I was wondering where I could read up this summer about some general concepts of programming and maybe some introduction to Java specifically? Some universities have good CS lectures online. Here's a Stanford introductory CS lecture series using Java for example: CS106A. IIRC you can find the class website for this course with most/all of the resources you might need to go through the course as if you were a student. | ||
mmp
United States2130 Posts
On June 19 2011 08:35 Natsumar wrote: Hey guys, I'm going to start college this fall and I'm planning on majoring in Computer Sciences. I've already enrolled, but when I talked to my advisor she said my first actual class in the major, Fundamentals of Software Design, uses a lot of Java, is very fast paced, and can sometimes jump around, assuming you already know the basics of programming. Since I've never taken an actual programming class and have only been casually messing around with Visual Basic (trust me, I know), I know all of nothing about actual programming, I was wondering where I could read up this summer about some general concepts of programming and maybe some introduction to Java specifically? A software engineering class is not a class about programming in any particular language. It's about designing software systems that operate in a sane and predictable manner, as well as avoiding and debugging common pitfalls. The skills learned will ideally be applicable to many other languages. The course will probably give you a week to pick up the language used (Java is popular in some top universities, but is no less significant than C++ (or even C# in some industries) as a core language for the curriculum). Know everything on this page by the first lecture and you should be up to speed. http://download.oracle.com/javase/tutorial/java/index.html | ||
AkaHenchway
United States41 Posts
+ Show Spoiler + import java.util.Scanner; public class minuteconversion{ public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print(" Enter the number of minutes: "); double minutes = input.nextDouble(); int years = (int)(minutes / 525600); // And here is where I go full retard on math int daysleft = (int)(minutes / 1440); System.out.println(" "+ minutes + " minutes is approximately " + years + " years and " + daysleft + " days left "); } } The program I am writing is for a Java class. Goal of the program is to convert minutes to years and display the approximate number of days left. I just for the life of me cannot think of what equation I need to get it to display the number of days left.....Currently the program displays the years correctly (as a whole number), but then when it displays the number of days, it displays over 1 year of days left....I.E when I enter 535600 I get 371 days left.......probably painfully obvious and easy equation....but as I said I'm currently been drawing a blank for about the past 45 minutes. + Show Spoiler + Thanks guys! Also if you could leave a explanation for why you do the math a certain way that would be helpful as I am semi math retarded. | ||
Frigo
Hungary1023 Posts
int daysleft = (int)(minutes / 1440) - years * 365; | ||
| ||