• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 13:15
CET 19:15
KST 03:15
  • 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 Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation12Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview [TLMC] Fall/Winter 2025 Ladder Map Rotation TL.net Map Contest #21: Winners
Tourneys
RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle What happened to TvZ on Retro? SnOw's ASL S20 Finals Review BW General Discussion Brood War web app to calculate unit interactions
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
PvZ map balance Current Meta Simple Questions, Simple Answers How to stay on top of macro?
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread Clair Obscur - Expedition 33 Beyond All Reason
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread Artificial Intelligence Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2038 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 States17265 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
IPSL
17:00
Ro16 Group D
ZZZero vs rasowy
Napoleon vs KameZerg
Liquipedia
PSISTORM Gaming Misc
15:55
FSL teamleague CNvsASH, ASHvRR
Freeedom33
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Railgan 184
IndyStarCraft 110
BRAT_OK 47
MindelVK 29
EmSc Tv 13
StarCraft: Brood War
Britney 25290
Calm 2532
Shuttle 775
Stork 341
firebathero 288
Dewaltoss 113
Barracks 68
Mong 61
Rock 43
Shine 18
Dota 2
Gorgc5830
qojqva1713
Dendi963
Counter-Strike
ScreaM1084
byalli378
Heroes of the Storm
Khaldor535
Liquid`Hasu237
Other Games
Beastyqt573
DeMusliM291
Hui .222
Fuzer 215
Lowko213
Trikslyr46
CadenZie18
Organizations
Dota 2
PGL Dota 2 - Main Stream8971
Other Games
EGCTV625
gamesdonequick359
StarCraft 2
angryscii 24
EmSc Tv 13
EmSc2Tv 13
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 22 non-featured ]
StarCraft 2
• HappyZerGling 71
• HeavenSC 61
• printf 5
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• Kozan
• IndyKCrew
StarCraft: Brood War
• Airneanach42
• HerbMon 6
• Michael_bg 3
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 2455
• WagamamaTV359
• Ler79
League of Legends
• Nemesis2825
Other Games
• imaqtpie1125
• Shiphtur313
Upcoming Events
OSC
45m
davetesta15
BSL 21
1h 45m
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
15h 45m
RSL Revival
15h 45m
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
17h 45m
Cure vs herO
Reynor vs TBD
WardiTV Korean Royale
17h 45m
BSL 21
1d 1h
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
1d 1h
Dewalt vs WolFix
eOnzErG vs Bonyth
Replay Cast
1d 4h
Wardi Open
1d 17h
[ Show More ]
Monday Night Weeklies
1d 22h
WardiTV Korean Royale
2 days
BSL: GosuLeague
3 days
The PondCast
3 days
Replay Cast
4 days
RSL Revival
4 days
BSL: GosuLeague
5 days
RSL Revival
5 days
WardiTV Korean Royale
5 days
RSL Revival
6 days
WardiTV Korean Royale
6 days
IPSL
6 days
Julia vs Artosis
JDConan vs DragOn
Liquipedia Results

Completed

Proleague 2025-11-14
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
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 © 2025 TLnet. All Rights Reserved.