• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 23:07
CET 05:07
KST 13:07
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets0$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)12Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns7[BSL21] Non-Korean Championship - Starts Jan 103SC2 All-Star Invitational: Jan 17-1822
StarCraft 2
General
Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns Spontaneous hotkey change zerg Chinese SC2 server to reopen; live all-star event in Hangzhou SC2 All-Star Invitational: Jan 17-18
Tourneys
$25,000 Streamerzone StarCraft Pro Series announced $21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) WardiTV Winter Cup WardiTV Mondays SC2 AI Tournament 2026
Strategy
Simple Questions Simple Answers
Custom Maps
Map Editor closed ?
External Content
Mutation # 508 Violent Night Mutation # 507 Well Trained Mutation # 506 Warp Zone Mutation # 505 Rise From Ashes
Brood War
General
Potential ASL qualifier breakthroughs? BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion StarCraft & BroodWar Campaign Speedrun Quest Data analysis on 70 million replays
Tourneys
[Megathread] Daily Proleagues [BSL21] Grand Finals - Sunday 21:00 CET [BSL21] Non-Korean Championship - Starts Jan 10 SLON Grand Finals – Season 2
Strategy
Game Theory for Starcraft Simple Questions, Simple Answers Current Meta [G] How to get started on ladder as a new Z player
Other Games
General Games
Beyond All Reason Nintendo Switch Thread Awesome Games Done Quick 2026! Mechabellum Stormgate/Frost Giant Megathread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread European Politico-economics QA Mega-thread Things Aren’t Peaceful in Palestine Trading/Investing Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List TL+ Announced
Blogs
My 2025 Magic: The Gathering…
DARKING
Physical Exercise (HIIT) Bef…
TrAiDoS
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1220 users

The Big Programming Thread - Page 60

Forum Index > General Forum
Post a Reply
Prev 1 58 59 60 61 62 1032 Next
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
Profile Joined April 2011
73 Posts
June 14 2011 13:30 GMT
#1181
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.
Depression is what you get for leading a repetitive life.
catamorphist
Profile Joined May 2010
United States297 Posts
June 14 2011 13:33 GMT
#1182
The standard way is use your best judgement.
http://us.battle.net/sc2/en/profile/281144/1/catamorphist/
One Student
Profile Joined April 2011
73 Posts
June 14 2011 13:43 GMT
#1183
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?
Depression is what you get for leading a repetitive life.
wO-ZiGouNeT
Profile Joined January 2011
United Kingdom21 Posts
June 14 2011 13:47 GMT
#1184
That really would depend on what you are working on, sometimes extensive documentation is needed often times it isn't it really depends on the complexity of the project you are working on (and mostly the standards of whoever you are writing the code for some companies require a massive documentation effort and some have none ...).
ddengster
Profile Blog Joined January 2009
Singapore129 Posts
June 14 2011 13:53 GMT
#1185
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.
Check out NEO Impossible Bosses, RTS-MOBA boss rush at http://neoimpossiblebosses.coder-ddeng.com
catamorphist
Profile Joined May 2010
United States297 Posts
June 14 2011 14:04 GMT
#1186
On June 14 2011 22:53 ddengster wrote:
Show nested quote +
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.


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.
http://us.battle.net/sc2/en/profile/281144/1/catamorphist/
One Student
Profile Joined April 2011
73 Posts
June 14 2011 23:53 GMT
#1187
Thanks for the replies guys. Things are more clear now. ;]
Depression is what you get for leading a repetitive life.
kingcoyote
Profile Blog Joined May 2010
United States546 Posts
June 14 2011 23:59 GMT
#1188
I agree with the Doxygen comment. It's a really good system that is used by a lot of different languages. At the very least, it's a good starting point to flesh out a robust API. You basically just put a specially formatted comment block before each function / class, and doxygen will handle the rest.
AkaHenchway
Profile Joined October 2010
United States41 Posts
June 16 2011 02:12 GMT
#1189
Thanks for the replies yea the error was in how I saved/named the file.
Fuck the Bullshit
AoN.DimSum
Profile Blog Joined September 2008
United States2983 Posts
Last Edited: 2011-06-16 02:40:43
June 16 2011 02:39 GMT
#1190
Hey guys I have a question. Currently I am interested in android app development. My app idea is to locate a person's location, and then it will give the results of the closest gyms around. Also I need to set up a database for the list of gyms. Would I need to set up a web server first to accomplish this? I am trying to learn php so I can figure this out, unless there is a better way.

I am trying to learn a lot, so any tips on java or android development would be appreciated.
by my idol krokkis : "U better hope Finland wont have WCG next year and that I wont gain shitloads of skill, cause then I will wash ur mouth with soap, little man."
Craton
Profile Blog Joined December 2009
United States17274 Posts
Last Edited: 2011-06-16 07:04:53
June 16 2011 07:01 GMT
#1191
You'd either include a database of gym locations with the app itself, or you'd have it call out to a web service that would do the querying and return a result set.

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.

twitch.tv/cratonz
VIB
Profile Blog Joined November 2007
Brazil3567 Posts
June 16 2011 07:11 GMT
#1192
Yea android can do that with just it's own database. You don't need a web service at all, unless you wanna update your current database. So to do what you want you would just have your own database of gyms in a database and compare that to the gps location. Alternatively, instead of using your own database. You could use the Maps API to make your app search for gyms on google maps. So you don't even need to make your own database nor your own web service.

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.
Great people talk about ideas. Average people talk about things. Small people talk about other people.
AoN.DimSum
Profile Blog Joined September 2008
United States2983 Posts
June 18 2011 05:32 GMT
#1193
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.
by my idol krokkis : "U better hope Finland wont have WCG next year and that I wont gain shitloads of skill, cause then I will wash ur mouth with soap, little man."
Vinski
Profile Joined November 2010
505 Posts
June 18 2011 23:09 GMT
#1194
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
"Sound is in a bad marriage, instead of divorcing her and keeping half your shit, he just committed suicide"
Frigo
Profile Joined August 2009
Hungary1023 Posts
Last Edited: 2011-06-18 23:40:47
June 18 2011 23:33 GMT
#1195
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
http://www.fimfiction.net/user/Treasure_Chest
Natsumar
Profile Joined March 2011
United States91 Posts
June 18 2011 23:35 GMT
#1196
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?
Woah guys, this is where it gets tricky. Because right now we're behind in every conceivable aspect [...] The only thing we're not behind in is micro. Right? We got tons of that shit.
inkblot
Profile Joined December 2004
United States1250 Posts
June 19 2011 00:38 GMT
#1197
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
Profile Blog Joined April 2009
United States2130 Posts
June 19 2011 12:06 GMT
#1198
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
I (λ (foo) (and (<3 foo) ( T_T foo) (RAGE foo) )) Starcraft
AkaHenchway
Profile Joined October 2010
United States41 Posts
Last Edited: 2011-06-20 01:32:32
June 20 2011 01:29 GMT
#1199
Hey guys this is not so much a programming question as it is a math question. For the life of me right now I can think how to set up the correct equation I need.
+ 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.
Fuck the Bullshit
Frigo
Profile Joined August 2009
Hungary1023 Posts
June 20 2011 03:06 GMT
#1200
You have to subtract the days already counted in the years.
int daysleft = (int)(minutes / 1440) - years * 365;
http://www.fimfiction.net/user/Treasure_Chest
Prev 1 58 59 60 61 62 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 7h 53m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
White-Ra 356
RuFF_SC2 248
WinterStarcraft242
StarCraft: Brood War
Shuttle 107
ZergMaN 75
GoRush 38
Noble 16
Icarus 7
Dota 2
NeuroSwarm139
LuMiX1
League of Legends
JimRising 798
C9.Mang0588
Counter-Strike
summit1g7850
m0e_tv373
minikerr20
Super Smash Bros
hungrybox686
Mew2King20
Other Games
tarik_tv6126
Sick239
Maynarde155
Livibee37
ZombieGrub36
Liquid`Ken8
Models1
Organizations
Other Games
gamesdonequick2948
StarCraft: Brood War
UltimateBattle 102
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki29
• RayReign 23
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota22249
League of Legends
• Rush553
• Lourlo517
Upcoming Events
WardiTV Invitational
7h 53m
PiGosaur Cup
20h 53m
WardiTV Invitational
1d 7h
The PondCast
2 days
OSC
2 days
OSC
3 days
All Star Teams
3 days
INnoVation vs soO
sOs vs Scarlett
uThermal 2v2 Circuit
4 days
All Star Teams
4 days
MMA vs DongRaeGu
Rogue vs Oliveira
Sparkling Tuna Cup
5 days
[ Show More ]
OSC
5 days
Replay Cast
6 days
Wardi Open
6 days
Liquipedia Results

Completed

Proleague 2026-01-12
Big Gabe Cup #3
NA Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
BSL 21 Non-Korean Championship
CSL 2025 WINTER (S19)
OSC Championship Season 13
Underdog Cup #3
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025

Upcoming

Escore Tournament S1: W4
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Rongyi Cup S3
Thunderfire SC2 All-star 2025
Nations Cup 2026
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.