• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 00:29
CET 06:29
KST 14:29
  • 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 - Playoffs Preview0RSL 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
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband
Tourneys
StarCraft Evolution League (SC Evo Biweekly) RSL Offline Finals Info - Dec 13 and 14! RSL Offline FInals Sea Duckling Open (Global, Bronze-Diamond) $5,000+ WardiTV 2025 Championship
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
BW General Discussion Which season is the best in ASL? Data analysis on 70 million replays BGH Auto Balance -> http://bghmmr.eu/ [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[BSL21] RO16 Group D - Sunday 21:00 CET [BSL21] RO16 Group A - Saturday 21:00 CET [Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
ZeroSpace Megathread Stormgate/Frost Giant Megathread Nintendo Switch Thread The Perfect Game Path of Exile
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
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
James Bond movies ranking - pa…
Topin
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1717 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
Replay Cast
00:00
WardiTV Mondays #62
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 196
trigger 57
SortOf 27
StarCraft: Brood War
Stork 457
Tasteless 175
Shine 147
Bale 38
NaDa 32
Icarus 7
Dota 2
NeuroSwarm121
League of Legends
JimRising 676
Other Games
summit1g11954
shahzam473
WinterStarcraft424
C9.Mang0360
ViBE170
Mew2King88
Organizations
Other Games
gamesdonequick962
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• Hupsaiya 106
• Berry_CruncH68
• practicex 27
• sooper7s
• intothetv
• Kozan
• AfreecaTV YouTube
• IndyKCrew
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• RayReign 15
• Azhi_Dahaki12
• Diggity5
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Lourlo1192
Upcoming Events
The PondCast
4h 31m
OSC
10h 31m
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
18h 31m
Korean StarCraft League
1d 21h
CranKy Ducklings
2 days
WardiTV 2025
2 days
SC Evo League
2 days
BSL 21
2 days
Sziky vs OyAji
Gypsy vs eOnzErG
OSC
2 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
3 days
[ Show More ]
WardiTV 2025
3 days
OSC
3 days
BSL 21
3 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
4 days
Wardi Open
4 days
StarCraft2.fi
4 days
Monday Night Weeklies
4 days
Replay Cast
4 days
WardiTV 2025
5 days
StarCraft2.fi
5 days
PiGosaur Monday
5 days
StarCraft2.fi
6 days
Tenacious Turtle Tussle
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
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

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 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.