• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 07:26
CEST 13:26
KST 20:26
  • 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
[ASL22] Ro16 Preview: Rough Waters10[ASL22] Ro24 Preview: Siren's Call8[ASL22] Ro24 Preview: Summer's End9Serral wins HomeStory Cup 2915Serral wins Maestros of the Game 244
Community News
StarCraft open world shooter announced at BlizzCon60Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism10Official StarCraft website teases new content ahead of BlizzCon?168Stellar Fest TWO the Moon (Dec 16-20)9Weekly Cups (August 24-30): Patches' balance mod takes over3
StarCraft 2
General
StarCraft open world shooter announced at BlizzCon How do you feel about the StarCraft shooter announcement at BlizzCon 2026? Balance hotfix patch 5.0.16b (July 16) Team Liquid Map Contest #22: Results and Winners Weekly Cups (Aug 30-Sep 7): herO thrives amid growing schism
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament RSL goes to London! 2026 Offline Finals Nov 21-22 KSL Week #92 IntoTheTV X SOOP SC2 League : Weekly & Monthly 2026 GSTL Announcement
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
Mutation # 542 The Ascended Mutation # 541 Binary Choice The PondCast: SC2 News & Results Mutation # 540 Dodge This
Brood War
General
Official StarCraft website teases new content ahead of BlizzCon? BGH Auto Balance -> http://bghmmr.eu/ Broodwar Prediction Market Practice Partners (Official) [D] Brainstorming a balance patch for Brood war
Tourneys
[ASL22] Ro16 Group B [ASL22] Ro16 Group A Escore Tournament - Season 3 Small VOD Thread 2.0
Strategy
Replay Review Process - What do you do? Simple Questions, Simple Answers Odyssey Mineral Stack Saturation Game Theory for Starcraft
Other Games
General Games
Nintendo Switch Thread Diablo IV EVE Corporation [Maplestory Hardcore] Let's Play~!! General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
[TL LoL EUW IHs] Teemo shall perish 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
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Trading/Investing Thread UK Politics Mega-thread Russo-Ukrainian War Thread
Fan Clubs
MarineLorD Fan Club The Creator Fan Club The ShoWTimE Fan Club
Media & Entertainment
Diablo Animated Series on Netflix Movie Discussion!
Sports
Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Northern Ireland Global Starcraft
Blogs
Virtual Romance, Real-Life C…
TrAiDoS
Regacy Esports:Our Goa…
regacyesports
Dreaming of BW patches (mod…
c3rberUs
LOCKPICKING NOOB
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 6649 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
WardiTV Invitational
11:00
Pre Blizzcon Cup
ByuN vs Percival
Cure vs Classic
WardiTV381
Liquipedia
Sparkling Tuna Cup
10:00
Weekly #146
SHIN vs GeraldLIVE!
herO vs TBD
CranKy Ducklings113
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Rex 98
MindelVK 33
StarCraft: Brood War
Britney 25492
Calm 9717
PianO 3868
Jaedong 2327
Pusan 615
firebathero 444
Larva 340
Hyun 274
Mini 185
Last 132
[ Show more ]
ZerO 79
Sharp 57
Mong 56
Killer 51
HiyA 41
Aegong 40
Shinee 35
sSak 34
Trap 27
Sea.KH 22
Shine 22
Hm[arnc] 20
NaDa 17
SilentControl 12
Rock 11
ajuk12(nOOB) 11
JulyZerg 10
NotJumperer 6
Dota 2
ODPixel545
Fuzer 183
Counter-Strike
x6flipin440
zeus358
edward345
Other Games
summit1g16132
Pyrionflax267
DeMusliM126
KnowMe93
ZerO(Twitch)6
Organizations
StarCraft 2
IntoTheiNu 689
Other Games
BasetradeTV214
StarCraft: Brood War
UltimateBattle 23
lovetv 8
[ Show 13 non-featured ]
StarCraft 2
• StrangeGG 96
• CranKy Ducklings SOOP22
• Adnapsc2 12
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos2092
Other Games
• WagamamaTV279
Upcoming Events
Shopify Rebellion Sundays
3h 34m
Spirit vs Mixu
Clem vs TBD
RSL Revival
4h 34m
Serral vs Rogue
BlizzCon
7h 4m
IdrA vs MC
Afreeca Starleague
22h 34m
Light vs JyJ
Soulkey vs hero
WardiTV Weekly
23h 34m
Monday Night Weeklies
1d 4h
Afreeca Starleague
1d 22h
Snow vs Shinee
Shine vs EffOrt
GSL
1d 23h
PiGosaur Cup
2 days
The PondCast
2 days
[ Show More ]
Kung Fu Cup
2 days
Replay Cast
3 days
KCM Race Survival
3 days
IntoTheTV X SOOP
3 days
Replay Cast
4 days
IntoTheTV X SOOP
4 days
Replay Cast
5 days
GSL
5 days
Replay Cast
6 days
GSL
6 days
Liquipedia Results

Completed

Acropolis #5 - TRS
PiG Sty Festival 8.0
Big Dog Cup 2026 Div 1

Ongoing

KCM Race Survival 2026 Season 3
K-JUNGMAN
ASL Season 22
Super Anchor Qualifying S3
CSL 2026 AUTUMN (S22)
Acropolis #5
Blizzard Classic Cup 2026
Blizzard Classic Cup 2026
RSL Revival: Season 6
Calamity Invitational
FISSURE Playground #3
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026

Upcoming

Acropolis #5 - GSA
Acropolis #5 - GSB
Acropolis #5 - GSC
SC4ALL II: Brood War
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
PGL Major Singapore 2026
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
Stake Ranked Episode 5
PGL Masters Bucharest 2026
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 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.