• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 07:30
CEST 13:30
KST 20:30
  • 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
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun13[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists22[ASL21] Ro16 Preview Pt1: Fresh Flow9
Community News
RSL Revival: Season 5 - Qualifiers and Main Event8Code S Season 1 (2026) - RO12 Results02026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced92026 GSL Tour plans announced15
StarCraft 2
General
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun Code S Season 1 (2026) - RO12 Results Team Liquid Map Contest #22 - The Finalists Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool MaNa leaves Team Liquid
Tourneys
RSL Revival: Season 5 - Qualifiers and Main Event GSL Code S Season 1 (2026) SC2 INu's Battles#15 <BO.9 2Matches> WardiTV Spring Cup SEL Masters #6 - Solar vs Classic (SC: Evo)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base Mutation # 521 Memorable Boss
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ ASL21 General Discussion Why there arent any 256x256 pro maps? [BSL22] RO16 Group B - Saturday 21:00 CEST BW General Discussion
Tourneys
[Megathread] Daily Proleagues [ASL21] Ro8 Day 2 Escore Tournament StarCraft Season 2 [BSL22] RO16 Group Stage - 02 - 10 May
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Stormgate/Frost Giant Megathread Dawn of War IV Nintendo Switch Thread Daigo vs Menard Best of 10 Diablo IV
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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 TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread Russo-Ukrainian War Thread 3D technology/software discussion Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Formula 1 Discussion
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
ramps on octagon
StaticNine
Sexual Health Of Gamers
TrAiDoS
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2128 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 States17281 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
RSL Revival
10:00
Season 5: Group B
Solar vs herOLIVE!
TriGGeR vs NightMare
Tasteless628
IntoTheiNu 380
Ryung 321
IndyStarCraft 236
Rex106
3DClanTV 96
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Tasteless 628
Ryung 321
IndyStarCraft 236
Rex 106
StarCraft: Brood War
Britney 50069
Horang2 1506
Shuttle 561
Soma 351
Rush 343
Hyuk 319
EffOrt 301
firebathero 197
Last 192
Leta 179
[ Show more ]
Killer 169
ggaemo 152
ToSsGirL 103
Pusan 85
Hm[arnc] 77
PianO 77
Sharp 60
[sc1f]eonzerg 49
Sacsri 41
NaDa 33
IntoTheRainbow 21
Barracks 17
JulyZerg 17
Shine 13
yabsab 13
GoRush 10
Noble 9
Dota 2
XaKoH 796
XcaliburYe287
monkeys_forever192
Counter-Strike
zeus1275
edward126
Other Games
singsing2042
B2W.Neo1253
Liquid`RaSZi692
DeMusliM358
TKL 131
Livibee90
ArmadaUGS53
MindelVK18
Organizations
Other Games
BasetradeTV533
Dota 2
PGL Dota 2 - Main Stream61
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 12 non-featured ]
StarCraft 2
• LUISG 4
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos1693
Upcoming Events
uThermal 2v2 Circuit
2h 31m
BSL
7h 31m
IPSL
7h 31m
eOnzErG vs TBD
G5 vs Nesh
Patches Events
12h 31m
Replay Cast
21h 31m
Wardi Open
22h 31m
Afreeca Starleague
22h 31m
Jaedong vs Light
Monday Night Weeklies
1d 4h
Replay Cast
1d 12h
Sparkling Tuna Cup
1d 22h
[ Show More ]
Afreeca Starleague
1d 22h
Snow vs Flash
WardiTV Invitational
1d 23h
GSL
2 days
Classic vs Cure
Maru vs Rogue
GSL
3 days
SHIN vs Zoun
ByuN vs herO
OSC
3 days
OSC
4 days
Replay Cast
4 days
Escore
4 days
The PondCast
4 days
WardiTV Invitational
4 days
Replay Cast
5 days
CranKy Ducklings
5 days
RSL Revival
5 days
SHIN vs Bunny
ByuN vs Shameless
WardiTV Invitational
5 days
BSL
6 days
Replay Cast
6 days
Sparkling Tuna Cup
6 days
RSL Revival
6 days
Cure vs Zoun
Clem vs Lambo
WardiTV Invitational
6 days
Liquipedia Results

Completed

Escore Tournament S2: W5
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
KK 2v2 League Season 1
Acropolis #4
SCTL 2026 Spring
RSL Revival: Season 5
2026 GSL S1
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

Escore Tournament S2: W6
BSL 22 Non-Korean Championship
Escore Tournament S2: W7
Escore Tournament S2: W8
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 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.