• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 10:57
CEST 16:57
KST 23:57
  • 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
Serral wins HomeStory Cup 2914Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
IntoTheTV X SOOP SC2 League : Weekly & Monthly4Clem: "I don't have that much hope in Blizzard"2ZeroSpace Early Access is Now Live!24Weekly Cups (July 13-19): Terran & Protoss rise; Zerg falters2Balance hotfix patch 5.0.16b (July 16)90
StarCraft 2
General
Reynor: GSL Loss Wasn't About Preparation Format Balance hotfix patch 5.0.16b (July 16) How would you feel about frequent/monthly balance patches for SC2? Clem: "I don't have that much hope in Blizzard" Weekly Cups (July 13-19): Terran & Protoss rise; Zerg falters
Tourneys
IntoTheTV X SOOP SC2 League : Weekly & Monthly INu's Battles#18 - Cure, herO, Rogue & ByuN RSL Revival: Season 6 - Qualifiers and Main Event Master Swan Open (Global Bronze-Master 2) WardiTV Summer Cup 2026
Strategy
[G] Having the right mentality to improve
Custom Maps
[M] (2) Industrial Park New Map Maker - Looking for Advice - Love or Hate
External Content
Mutation # 535 Assembly of Vengeance The PondCast: SC2 News & Results Mutation # 534 Burning Evacuation Mutation # 533 Die Together
Brood War
General
ASL22 General Discussion BW General Discussion How Famous was FlaSh before his Debut? Animated Gateway BGH Auto Balance -> http://bghmmr.eu/
Tourneys
Escore Tournament - Season 3 Small VOD Thread 2.0 [Megathread] Daily Proleagues [IPSL] Spring 2026 Grand Finals - This Weekend!
Strategy
Simple Questions, Simple Answers PvT advise for noobs Fighting Spirit mining rates Creating a full chart of Zerg builds
Other Games
General Games
Path of Exile ZeroSpace Early Access is Now Live! General RTS Discussion Thread Nintendo Switch Thread Diablo IV
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread TL Mafia Power Rank NeO.D_StephenKing vs This Guy From 1 Million Dance Vanilla Mini Mafia
Community
General
Artificial Intelligence Thread US Politics Mega-thread Russo-Ukrainian War Thread How to buy a book - shipping from Korea to Europe The Games Industry And ATVI
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Anime Discussion Thread Series you have seen recently... Movie Discussion! [Req][Books] Good Fantasy/SciFi books
Sports
TeamLiquid Health and Fitness Initiative For 2023 2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 McBoner: A hockey love story
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Simple Questions Simple Answers FPS when play League Of Legend on laptop
TL Community
Northern Ireland Global Starcraft The Automated Ban List
Blogs
How Games can Help with Majo…
TrAiDoS
Hello guys!
LIN1s
ASL S22 English Commentary…
namkraft
Poker (part 2)
Nebuchad
An Exploration of th…
waywardstrategy
Customize Sidebar...

Website Feedback

Closed Threads



Active: 3366 users

The Big Programming Thread - Page 504

Forum Index > General Forum
Post a Reply
Prev 1 502 503 504 505 506 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.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
July 27 2014 07:27 GMT
#10061
The IOI sample questions are also really interestingly hard.
There is no one like you in the universe.
Shenghi
Profile Joined August 2010
167 Posts
Last Edited: 2014-07-27 08:01:42
July 27 2014 08:01 GMT
#10062
On July 27 2014 14:56 raNazUra wrote:
Question: Do you guys have any recommendations for coding competition websites? I realize a lot of people don't really care about them, so this may be a miss, but I've done the Google Code Jam for the last few years and really enjoyed it as for-fun algorithms puzzles, but it only rolls around once a year.


The following list is not exhaustive by a long shot, but ought to get you started.

For competitions on a regular basis:
  • Topcoder
  • Codeforces
  • Codechef


For practice:
  • Topcoder (Old matches)
  • Codeforces (Old matches)
  • Codechef (Old matches)
  • Usaco training pages
  • SPOJ
  • UVa online judge
People are not born stupid, they choose to be stupid. If you made that choice, please change your mind.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2014-07-27 08:14:29
July 27 2014 08:13 GMT
#10063
--- Nuked ---
CatNzHat
Profile Blog Joined February 2011
United States1599 Posts
July 27 2014 09:31 GMT
#10064
On July 27 2014 12:27 obesechicken13 wrote:
Say you're making a forum:
Should you use the user's id or username to match their post details? One of my groupmembers linked two tables with username and I feel like there's something wrong with this but can't say why. I tried googling but that didn't return the right results.

Table1 Users
ID username
1 Blisse
2 icystorage
5 obesechicken13
7 RoyGBiv_13

Table Posts
ID User_ID Thread Post
1 1 Big%20Programming%20Thread blah%20blah%20blah
2 1 ...
3 2 ...
4 5 ...

Or
ID Username Thread Post
1 Blisse Big%20Programming%20Thread blah%20blah%20blah
2 Blisse ...
3 icystorage ...
4 obesechicken13 ...

?

I guess it'd be faster to use user_id but I don't think that'd be noticeable for a small project. And when a user changes their username, the posts would all have to change too.


Don't denormalize the username to the post, or don't let them change their username.
Indexing by an INT id is faster than a TEXT username, and in most cases page render time is not going to be bottlenecked by having an extra join in your query. If it becomes a problem you can address it then.
Morphage
Profile Joined September 2011
France492 Posts
July 27 2014 09:59 GMT
#10065
On July 27 2014 17:13 Nesserev wrote:
Show nested quote +
On July 27 2014 17:01 Shenghi wrote:
+ Show Spoiler +
On July 27 2014 14:56 raNazUra wrote:
Question: Do you guys have any recommendations for coding competition websites? I realize a lot of people don't really care about them, so this may be a miss, but I've done the Google Code Jam for the last few years and really enjoyed it as for-fun algorithms puzzles, but it only rolls around once a year.


The following list is not exhaustive by a long shot, but ought to get you started.

For competitions on a regular basis:
  • Topcoder
  • Codeforces
  • Codechef


For practice:
  • Topcoder (Old matches)
  • Codeforces (Old matches)
  • Codechef (Old matches)
  • Usaco training pages
  • SPOJ
  • UVa online judge


Ty for this post <3 Gonna have a lot of fun with this


There's also CodeEval and HackerRank.
HaRuHi
Profile Blog Joined November 2010
1220 Posts
July 27 2014 10:42 GMT
#10066
Why is "std::cin >> int input_value;" illegal by c++11 standards?
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2014-07-27 11:00:27
July 27 2014 10:59 GMT
#10067
Does that even compile on any version of C++? You can't make a declaration inline like that.
There is no one like you in the universe.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2014-07-27 11:08:15
July 27 2014 11:01 GMT
#10068
--- Nuked ---
HaRuHi
Profile Blog Joined November 2010
1220 Posts
Last Edited: 2014-07-27 11:03:24
July 27 2014 11:03 GMT
#10069
I know it doesn't compile, but the book wants to know why it is illigal, and I don't see why it should be.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2014-07-27 11:24:52
July 27 2014 11:10 GMT
#10070
Ah, no clue then but my gut says invalid syntax. Ostream operator is expecting an object not a type. (wait that's how a runtime error would be phrased)
There is no one like you in the universe.
HaRuHi
Profile Blog Joined November 2010
1220 Posts
July 27 2014 11:22 GMT
#10071
On July 27 2014 20:01 Nesserev wrote:
Nope, just tested it... it doesn't compile with any version. The reason is probably, because it isn't parsed correctly by the compiler, which is a good thing lol... and if it does, you should report it to the author of the compiler. I was surprised at first, because you made it sound like it was possible in 'normal' C++.

Besides, it's really bad, ugly code; where did you get the idea from that this should be possible??


^^, sorry, didn't want to imply that it should be possible on any standard. This beautiful piece of code is right out of the most recent edition of the primer, but they changed the chapter that introduces variables and they don't explain why this should be illigal, but still ask for it. Think I just gonna read a chapter about variables online somewhere^^.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
July 27 2014 11:27 GMT
#10072
Might boil down to some shenanigans like "a variable declaration is not an rvalue". Not sure if that is even accurate, I haven't dealt with the topic in a while.
If you have a good reason to disagree with the above, please tell me. Thank you.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
July 27 2014 11:36 GMT
#10073
--- Nuked ---
HaRuHi
Profile Blog Joined November 2010
1220 Posts
July 27 2014 11:51 GMT
#10074
The Fith Edition of The C++ Primer by Stanley B. Lippman, Josee Lajoie and Barbara E. Moo.
http://dl.e-book-free.com/2013/07/c_primer_5th_edition.pdf It is question (a) on Page 75.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
July 28 2014 01:41 GMT
#10075
On July 27 2014 18:31 CatNzHat wrote:
Show nested quote +
On July 27 2014 12:27 obesechicken13 wrote:
Say you're making a forum:
Should you use the user's id or username to match their post details? One of my groupmembers linked two tables with username and I feel like there's something wrong with this but can't say why. I tried googling but that didn't return the right results.

Table1 Users
ID username
1 Blisse
2 icystorage
5 obesechicken13
7 RoyGBiv_13

Table Posts
ID User_ID Thread Post
1 1 Big%20Programming%20Thread blah%20blah%20blah
2 1 ...
3 2 ...
4 5 ...

Or
ID Username Thread Post
1 Blisse Big%20Programming%20Thread blah%20blah%20blah
2 Blisse ...
3 icystorage ...
4 obesechicken13 ...

?

I guess it'd be faster to use user_id but I don't think that'd be noticeable for a small project. And when a user changes their username, the posts would all have to change too.


Don't denormalize the username to the post, or don't let them change their username.
Indexing by an INT id is faster than a TEXT username, and in most cases page render time is not going to be bottlenecked by having an extra join in your query. If it becomes a problem you can address it then.

I'd call it denormalization but it wasn't long enough to be normalized in the first place lol. Kk thanks.

I didn't notice the cheeky change to Blisse's threads too
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2014-07-28 14:49:30
July 28 2014 14:18 GMT
#10076
Thanks for recommending the Clean Code book to me in the past. It's really worth reading it. If there are more "must read" books, please let me know. I also plan to read Code Complete in the future.

On July 26 2014 04:49 spinesheath wrote:
It really doesn't matter a whole lot what language you learn. Your focus is what matters, and your focus certainly shouldn't be on language-specific stuff.

C# isn't going to go away for the next couple of years, so it's as good of a starting point as any language.
Learning functional languages like haskell and scala is a good investment into the future. Functional programming is on the rise for very solid reasons. Multithreaded environments being the major one.

Generally, languages are volatile and you might want to switch to a completely new language a year or two down the road. Especially now that commonplace large scale multithreading is on the horizon, which few current languages are particluarly good at.


I don't know about functional programming but there is this Actor Model theory that helps concurrent programming, which I have studied at university. However, I don't know how viable it is in practice.
aksfjh
Profile Joined November 2010
United States4853 Posts
July 28 2014 15:59 GMT
#10077
Need some help deciphering undocumented text. Doing some work creating a code base off of an XML document, and there's an attribute, "op," (short for operation) that has values like:
  • eq: equals
  • pm: pattern match
  • ge: greater or equal
  • le: less or equal


there's another value, "pn," that I'm not sure of. I have an initial guess, but wanted some consensus on the subject before moving forward.

Examples:

<ecl:line-selection dt="xs:string" op="pn" value="dtsession\*saverTimeout:\s+10\s*$"/>
<ecl:line-selection dt="xs:string" op="pn" value="sys.resources:dtsession\*lockTimeout:\s+10\s*$"/>
<ecl:line-selection op="pn" value="........w."/>


Also, if anybody has knowledge of any documentation on ecl (Embedded Check Language), it would be greatly appreciated. My initial Google searches didn't yield any good results.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2014-07-28 16:59:45
July 28 2014 16:56 GMT
#10078
On July 28 2014 23:18 darkness wrote:
Thanks for recommending the Clean Code book to me in the past. It's really worth reading it. If there are more "must read" books, please let me know. I also plan to read Code Complete in the future.

Show nested quote +
On July 26 2014 04:49 spinesheath wrote:
It really doesn't matter a whole lot what language you learn. Your focus is what matters, and your focus certainly shouldn't be on language-specific stuff.

C# isn't going to go away for the next couple of years, so it's as good of a starting point as any language.
Learning functional languages like haskell and scala is a good investment into the future. Functional programming is on the rise for very solid reasons. Multithreaded environments being the major one.

Generally, languages are volatile and you might want to switch to a completely new language a year or two down the road. Especially now that commonplace large scale multithreading is on the horizon, which few current languages are particluarly good at.


I don't know about functional programming but there is this Actor Model theory that helps concurrent programming, which I have studied at university. However, I don't know how viable it is in practice.

The nice thing about (pure) functional programming is that it deals with one of the most problematic issue in concurrent programming by definition. Immutability is awesome, and even though I don't really do functional programming I do try to take advantage of immutability wherever I can.
And I do plan to get more into functional programming in the not-to-far-away future.

I'd put TDD by example on the must read list.
If you have a good reason to disagree with the above, please tell me. Thank you.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
July 28 2014 17:10 GMT
#10079
--- Nuked ---
falconfan02
Profile Blog Joined April 2011
United States231 Posts
July 28 2014 17:49 GMT
#10080
So after two semesters of Java I'm looking to get into android development a bit during the couple weeks I have off. However, I'm not sure what IDE I should be using these projects. I see IntelliJ IDEA often recommended, but I have the most experience in Eclipse, and the new Android Studio looks intriguing as well. What would you guys recommend? Does it really even matter which one I go with?
Prev 1 502 503 504 505 506 1032 Next
Please log in or register to reply.
Live Events Refresh
Escore
10:00
Season 3 Week 4
escodisco1627
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ByuN 393
IndyStarCraft 128
ProTech77
RushiSC 29
StarCraft: Brood War
Hyuk 3125
Mini 914
Horang2 779
EffOrt 744
Soulkey 452
firebathero 351
Snow 187
actioN 186
hero 159
ggaemo 150
[ Show more ]
JYJ 114
Rush 84
Sharp 69
Hyun 54
Mind 51
Free 44
910 43
Hm[arnc] 41
Aegong 38
Bale 35
soO 35
Barracks 33
Sexy 28
scan(afreeca) 18
Yoon 15
NaDa 14
Shine 12
zelot 12
Rock 12
IntoTheRainbow 12
ajuk12(nOOB) 5
Dota 2
qojqva1287
syndereN344
XcaliburYe49
League of Legends
KnowMe38
Counter-Strike
fl0m3831
Other Games
FrodaN2310
singsing1895
hiko969
B2W.Neo922
Lowko469
Mlord464
crisheroes338
DeMusliM242
TKL 232
Hui .223
ToD171
Liquid`VortiX147
XaKoH 103
Rex91
CosmosSc2 81
QueenE74
C9.Mang069
Trikslyr10
Organizations
StarCraft 2
IntoTheiNu 903
Other Games
WardiTV802
StarCraft 2
angryscii 19
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 15 non-featured ]
StarCraft 2
• StrangeGG 22
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV389
League of Legends
• Nemesis1850
• Jankos1743
• TFBlade622
Upcoming Events
Big Brain Bouts
1h 3m
Soulspirit vs goblin
TriGGeR vs Bunny
OSC
7h 3m
Korean StarCraft League
12h 3m
Afreeca Starleague
13h 3m
RSL Revival
18h 3m
Serral vs SHIN
herO vs Solar
Online Event
1d
Replay Cast
1d 9h
RSL Revival
1d 18h
Clem vs ByuN
Rogue vs Lambo
OSC
1d 21h
WardiTV Weekly
2 days
[ Show More ]
Sparkling Tuna Cup
3 days
INu's Battles
3 days
Cure vs herO
ByuN vs Rogue
PiGosaur Cup
4 days
The PondCast
4 days
Kung Fu Cup
4 days
Patches Events
5 days
Replay Cast
5 days
CrankTV Team League
5 days
Replay Cast
6 days
CrankTV Team League
6 days
Liquipedia Results

Completed

Proleague 2026-07-22
HSC XXIX
Eternal Conflict S2 E3

Ongoing

CSL 2026 Summer (S21)
KCM Race Survival 2026 Season 3
Escore Tournament S3: W4
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026

Upcoming

ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
ASL Season 22: Qualifier #1
ASL Season 22: Qualifier #2
CSLAN 4
ASL Season 22
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
ESL Pro League Season 24
Stake Ranked Episode 4
Logitech G Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 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.