• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 02:47
CEST 08:47
KST 15:47
  • 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
[ASL21] Ro4 Preview: On Course12Code S Season 1 - RO8 Preview7[ASL21] Ro8 Preview Pt2: Progenitors8Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun13[ASL21] Ro8 Preview Pt1: Inheritors16
Community News
Weekly Cups (May 4-10): Clem, MaxPax, herO win1Maestros of The Game 2 announcement and schedule !10Weekly Cups (April 27-May 4): Clem takes triple0RSL Revival: Season 5 - Qualifiers and Main Event12Code S Season 1 (2026) - RO12 Results1
StarCraft 2
General
MaNa leaves Team Liquid Weekly Cups (May 4-10): Clem, MaxPax, herO win Code S Season 1 - RO8 Preview Behind the Blue - Team Liquid History Book Weekly Cups (April 27-May 4): Clem takes triple
Tourneys
2026 GSL Season 2 Qualifiers Maestros of The Game 2 announcement and schedule ! SC2 INu's Battles#16 <BO.9> Master Swan Open (Global Bronze-Master 2) GSL Code S Season 1 (2026)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players
External Content
Mutation # 525 Wheel of Misfortune The PondCast: SC2 News & Results Mutation # 524 Death and Taxes Mutation # 523 Firewall
Brood War
General
BW General Discussion Pros React To: Leta vs Tulbo (ASL S21, Ro.8) ASL Tickets to Live Event Finals? [ASL21] Ro4 Preview: On Course Flashes ASL S21 Ro8 Review
Tourneys
[ASL21] Semifinals B [ASL21] Semifinals A [Megathread] Daily Proleagues [BSL22] RO16 Group Stage - 02 - 10 May
Strategy
[G] Hydra ZvZ: An Introduction Simple Questions, Simple Answers Fighting Spirit mining rates Muta micro map competition
Other Games
General Games
Stormgate/Frost Giant Megathread Warcraft III: The Frozen Throne PC Games Sales Thread Path of Exile Nintendo Switch Thread
Dota 2
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread UK Politics Mega-thread Russo-Ukrainian War Thread YouTube Thread European Politico-economics QA Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [Req][Books] Good Fantasy/SciFi books
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
How EEG Data Can Predict Gam…
TrAiDoS
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1515 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
Next event in 3h 14m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 128
ProTech123
StarCraft: Brood War
GuemChi 5580
PianO 542
HiyA 62
soO 53
yabsab 31
Shinee 29
NaDa 14
ZergMaN 12
Icarus 8
Bale 6
Dota 2
NeuroSwarm124
League of Legends
JimRising 729
Counter-Strike
Stewie2K836
Other Games
summit1g11637
C9.Mang0494
WinterStarcraft427
monkeys_forever408
XaKoH 190
ceh9161
Organizations
Counter-Strike
PGL22187
Other Games
gamesdonequick702
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 13 non-featured ]
StarCraft 2
• Berry_CruncH241
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1649
• Stunt474
Upcoming Events
CranKy Ducklings
3h 14m
Afreeca Starleague
3h 14m
Light vs Flash
INu's Battles
4h 14m
ByuN vs herO
PiGosaur Cup
17h 14m
Replay Cast
1d 2h
Replay Cast
1d 17h
The PondCast
2 days
OSC
2 days
Replay Cast
2 days
RSL Revival
3 days
[ Show More ]
OSC
3 days
Korean StarCraft League
3 days
RSL Revival
4 days
BSL
4 days
GSL
5 days
Cure vs herO
SHIN vs Maru
BSL
5 days
Replay Cast
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-05-11
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
KK 2v2 League Season 1
BSL 22 Non-Korean Championship
SCTL 2026 Spring
RSL Revival: Season 5
2026 GSL S1
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
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

Upcoming

Escore Tournament S2: W7
YSL S3
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
BLAST Bounty Summer 2026: Closed Qualifier
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 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.