• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:17
CET 13:17
KST 21:17
  • 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
ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
BGE Stara Zagora 2026 cancelled3Blizzard Classic Cup - Tastosis announced as captains12Weekly Cups (March 2-8): ByuN overcomes PvT block4GSL CK - New online series18BSL Season 224
StarCraft 2
General
BGE Stara Zagora 2026 announced ByuL: The Forgotten Master of ZvT Terran AddOns placement BGE Stara Zagora 2026 cancelled Blizzard Classic Cup - Tastosis announced as captains
Tourneys
[GSL CK] Team Maru vs. Team herO WardiTV Team League Season 10 Master Swan Open (Global Bronze-Master 2) RSL Season 4 announced for March-April Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 516 Specter of Death Mutation # 515 Together Forever Mutation # 514 Ulnar New Year
Brood War
General
ASL21 General Discussion BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion Gypsy to Korea Are you ready for ASL 21? Hype VIDEO
Tourneys
[Megathread] Daily Proleagues [BSL22] Open Qualifiers & Ladder Tours IPSL Spring 2026 is here! ASL Season 21 Qualifiers March 7-8
Strategy
Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates Zealot bombing is no longer popular?
Other Games
General Games
Nintendo Switch Thread PC Games Sales Thread Path of Exile No Man's Sky (PS4 and PC) Stormgate/Frost Giant Megathread
Dota 2
Official 'what is Dota anymore' discussion The Story of Wings Gaming
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
Five o'clock TL Mafia Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Mexico's Drug War NASA and the Private Sector Things Aren’t Peaceful in Palestine
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Movie Discussion! [Req][Books] Good Fantasy/SciFi books [Manga] One Piece
Sports
Formula 1 Discussion 2024 - 2026 Football Thread General nutrition recommendations Cricket [SPORT] TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Gaming-Related Deaths
TrAiDoS
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2241 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
Next event in 11h 43m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 351
Lowko313
StarCraft: Brood War
Britney 47841
BeSt 687
Mini 575
EffOrt 513
actioN 440
Rush 383
Soma 257
Light 247
ZerO 229
Stork 165
[ Show more ]
Leta 86
Mind 55
IntoTheRainbow 53
ToSsGirL 52
Sea.KH 46
Pusan 38
Backho 34
[sc1f]eonzerg 31
Nal_rA 30
sorry 30
ajuk12(nOOB) 16
zelot 12
Bale 12
JulyZerg 5
Dota 2
canceldota38
Counter-Strike
fl0m1350
olofmeister1288
zeus253
edward67
markeloff13
Heroes of the Storm
Khaldor162
Other Games
singsing1639
B2W.Neo1329
shoxiejesuss409
crisheroes291
Hui .112
Fuzer 96
ZerO(Twitch)7
Organizations
Dota 2
PGL Dota 2 - Main Stream17382
Other Games
gamesdonequick857
StarCraft: Brood War
lovetv 21
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 12 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos1733
• TFBlade664
Upcoming Events
Replay Cast
11h 43m
CranKy Ducklings
21h 43m
RSL Revival
21h 43m
MaxPax vs Rogue
Clem vs Bunny
WardiTV Team League
23h 43m
uThermal 2v2 Circuit
1d 4h
Patches Events
1d 4h
BSL
1d 7h
Sparkling Tuna Cup
1d 21h
RSL Revival
1d 21h
ByuN vs SHIN
Maru vs Krystianer
WardiTV Team League
1d 23h
[ Show More ]
BSL
2 days
Replay Cast
2 days
Replay Cast
2 days
Wardi Open
2 days
Monday Night Weeklies
3 days
WardiTV Team League
3 days
GSL
4 days
The PondCast
5 days
WardiTV Team League
5 days
Replay Cast
6 days
WardiTV Team League
6 days
Liquipedia Results

Completed

Proleague 2026-03-12
WardiTV Winter 2026
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
BSL Season 22
RSL Revival: Season 4
Nations Cup 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

CSL Elite League 2026
ASL Season 21
Acropolis #4 - TS6
2026 Changsha Offline CUP
Acropolis #4
IPSL Spring 2026
CSLAN 4
HSC XXIX
uThermal 2v2 2026 Main Event
NationLESS Cup
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 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.