• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 04:18
CET 10:18
KST 18:18
  • 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] Finals Preview: Sweet Victory!12[ASL22] Ro4 Preview: Mirror Mirror6[ASL22] Ro8 Preview: Within Reach5[ASL22] Ro8 Preview: In A Tizzy11[ASL22] Ro16 Preview: Holy Diver5
Community News
Weekly Cups (Oct 26 - Nov 1): MaxPax, herO, Solar win0Weekly Cups (October 19-25): Clem triples first in 5.0.175Evil Geniuses - shutting down22ISSL (IntoTheTV x SOOP SC2 League): Premier7Weekly Cups (October 12-18): 5.0.17 era begins1
StarCraft 2
General
Evil Geniuses - shutting down Weekly Cups (Oct 26 - Nov 1): MaxPax, herO, Solar win No more SC2 streamers on team liquid? How do you feel about the mass reverts in the 5.0.17 PTR? Behind the Blue - Team Liquid History Book
Tourneys
WardiTV Mondays ISSL (IntoTheTV x SOOP SC2 League): Premier Stellar Fest TWO the Moon (Dec 16-20) Sparkling Tuna Cup - Weekly Open Tournament RSL goes to London! 2026 Offline Finals Nov 21-22
Strategy
[H] ZvP Mid-Late Game: Stalkers Collossi HT
Custom Maps
[D] the control group Simple Questions/Answers [G] How to playtest arcade maps [A] Nemrods 1/4 players
External Content
Mutation # 550 Graveyard Shift The PondCast: SC2 News & Results Mutation # 549 Endless Sparkles Mutation # 548 Shining Bright
Brood War
General
Rollback Netcode in Brood War How SKT1 S-Tiers Felt To Be Swept By Flash Top Players of October 2026 (EBPD Rankings) BW General Discussion Sagi.gg Launcher Released
Tourneys
[$1250] International ShieldBattery League [Megathread] Daily Proleagues 2v2v2v2 Tournament Stage 1: Community Poll [IPSL] IPSL Winter 26-27 Ro24 is HERE!
Strategy
50,000-Word Terran Builds Memo 2026-10-22 Cliff Jump Revisited (1 in a 1000 strategy) Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Deus Ex 3!? Mobile Legends: Bang Bang Armies of Exigo - YesYes?
Dota 2
Dota 2 Champions League Season 3 Begins April 25!
League of Legends
[TL LoL EUW IHs] Teemo shall perish
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Men's Fashion Thread Things Aren’t Peaceful in Palestine The Chess Thread
Fan Clubs
Fan Club Resource Thread Reynor Fan Club The Flash Fan Club
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece
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
Recent Gifted Posts
Blogs
Why I built Repalyzer (1.1.…
BlueStar
Innovate or Game Over?
TrAiDoS
ShieldBattery on Mac
Kraekkling
[ASL22] Ro4 Day1 Ticket Giv…
bITt.mAN
Can Bots Beat Pros?? Starcr…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 12042 users

The Big Programming Thread - Page 489

Forum Index > General Forum
Post a Reply
Prev 1 487 488 489 490 491 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.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2014-06-07 12:13:32
June 07 2014 12:12 GMT
#9761
I have an interview on Thursday with a data company looking for someone to do QA/programming. The programming position requires C and I'm not confident in my abilities with it. I think this is technical but no coding is required.

How should I go about studying for it. I know databases and networking fairly well. I can review my notes for networking.
Even though I've used bash, I'm fairly bad at it and have to look up basic things. Like process management. The extent of my working knowledge is like listing file size in a directory using ls -l.
I'm not confident in parallel programming. I understand what it is but I don't think I've actually programmed with it specifically in mind.
I'm fairly confident in data structures but I suck at answering conceptual questions about them.

1. Common web technologies and protocols (http, dns, tcp/ip etc)
2) Linux
3) Databases
4) Parallel programming
5) Data structures

My current plan is to go through cracking the coding interview and read a few data structures problems.
What else do you advise I go through? Remember, I only have less than a week!
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.
Xyik
Profile Blog Joined November 2009
Canada728 Posts
June 07 2014 12:59 GMT
#9762
On June 07 2014 21:12 obesechicken13 wrote:
I have an interview on Thursday with a data company looking for someone to do QA/programming. The programming position requires C and I'm not confident in my abilities with it. I think this is technical but no coding is required.

How should I go about studying for it. I know databases and networking fairly well. I can review my notes for networking.
Even though I've used bash, I'm fairly bad at it and have to look up basic things. Like process management. The extent of my working knowledge is like listing file size in a directory using ls -l.
I'm not confident in parallel programming. I understand what it is but I don't think I've actually programmed with it specifically in mind.
I'm fairly confident in data structures but I suck at answering conceptual questions about them.

1. Common web technologies and protocols (http, dns, tcp/ip etc)
2) Linux
3) Databases
4) Parallel programming
5) Data structures

My current plan is to go through cracking the coding interview and read a few data structures problems.
What else do you advise I go through? Remember, I only have less than a week!


You might want to read up on mapreduce and make sure you know databases really well. If the position requires C and you're not confident in it I suggest you brush up on it. Any reason algorithms aren't on that list? If you're working with big data they will likely want to see that you're strong in algorithms I'd guess.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2014-06-07 13:16:53
June 07 2014 13:16 GMT
#9763
On June 07 2014 21:59 Xyik wrote:
Show nested quote +
On June 07 2014 21:12 obesechicken13 wrote:
I have an interview on Thursday with a data company looking for someone to do QA/programming. The programming position requires C and I'm not confident in my abilities with it. I think this is technical but no coding is required.

How should I go about studying for it. I know databases and networking fairly well. I can review my notes for networking.
Even though I've used bash, I'm fairly bad at it and have to look up basic things. Like process management. The extent of my working knowledge is like listing file size in a directory using ls -l.
I'm not confident in parallel programming. I understand what it is but I don't think I've actually programmed with it specifically in mind.
I'm fairly confident in data structures but I suck at answering conceptual questions about them.

1. Common web technologies and protocols (http, dns, tcp/ip etc)
2) Linux
3) Databases
4) Parallel programming
5) Data structures

My current plan is to go through cracking the coding interview and read a few data structures problems.
What else do you advise I go through? Remember, I only have less than a week!


You might want to read up on mapreduce and make sure you know databases really well. If the position requires C and you're not confident in it I suggest you brush up on it. Any reason algorithms aren't on that list? If you're working with big data they will likely want to see that you're strong in algorithms I'd guess.

I think algo's covered in data structures. It's hard to have an interview question with conceptual questions w/o algorithms.

Mapreduce is the thing hadoop uses? I'll reread it. Thanks.
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.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2014-06-07 13:40:56
June 07 2014 13:39 GMT
#9764
@obese
been reading advanced programming in the unix environment, re: linux / c.
i'm sure you can browse through the most relevant chapters in a couple of days.
conspired against by a confederacy of dunces.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
June 07 2014 13:43 GMT
#9765
On June 07 2014 22:39 nunez wrote:
@obese
been reading advanced programming in the unix environment, re: linux / c.
i'm sure you can browse through the most relevant chapters in a couple of days.

Thanks
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-06-10 12:01:11
June 10 2014 11:58 GMT
#9766
I'm currently reading 'Clean Code' (page 76/462), chapter "Command Query Separation". It says an add/set function shouldn't also return a boolean result. It should either do something or answer something but not both. Is this criticism towards Java's design of Collection#add?
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
June 10 2014 17:14 GMT
#9767
There is plenty of criticism on Java's classes in good books out there.
As always, it's a tradeoff. The boolean Add has probably a minor performance advantage, and for classes that are meant to be useful in as many circumstances as possible there is an argument to be made for offering the more performant option. A weak one though. Especially since it's Java.
Java's Add certainly isn't an argument against Command Query Separation.
If you have a good reason to disagree with the above, please tell me. Thank you.
Trasko
Profile Blog Joined July 2010
Sweden983 Posts
June 11 2014 09:13 GMT
#9768
Yeah... It's quite popular to make jabs at Java. Imo Java is a really nice and easy language to learn and it does what you want it to do. The Add boolean return type has it's benefits in certain situations.
The interesting thing about building data structures is that there are so many ways to do so. The people who made Java decided that this was the best way and of course others may disagree.
Jaedong <3
klo8
Profile Joined August 2010
Austria1960 Posts
Last Edited: 2014-06-11 21:17:19
June 11 2014 21:15 GMT
#9769
I've been coding in vanilla Java 6 for the last couple of weeks (an assignment for school requires me to use it) and the thing I've missed most are the Streams library (map, fold, scan etc. operations on Java collections) and immutable collections. I would also really love to see a "pure" keyword (or annotation) that says "this function/method doesn't modify outside state at all" or at least a C++-ish const keyword that says "this method doesn't modify this object". Other than that, with a good IDE (IntelliJ), Java is pretty okay. It gets a lot of hate for being verbose and I can see that, but it's a very easy language to read and you can get familiar with it fairly quickly. That said, I think C# is pretty much a cooler/more fun version of Java.
This post is clearly not a hurr, as you can see from the graph, the durr never intersects with the derp.
Manit0u
Profile Blog Joined August 2004
Poland17868 Posts
June 11 2014 21:51 GMT
#9770
On June 12 2014 06:15 klo8 wrote:
I've been coding in vanilla Java 6 for the last couple of weeks (an assignment for school requires me to use it) and the thing I've missed most are the Streams library (map, fold, scan etc. operations on Java collections) and immutable collections. I would also really love to see a "pure" keyword (or annotation) that says "this function/method doesn't modify outside state at all" or at least a C++-ish const keyword that says "this method doesn't modify this object". Other than that, with a good IDE (IntelliJ), Java is pretty okay. It gets a lot of hate for being verbose and I can see that, but it's a very easy language to read and you can get familiar with it fairly quickly. That said, I think C# is pretty much a cooler/more fun version of Java.


C# might be cooler but Java still beats it when it comes to developing under different platforms. Personally I hate to do any development on Windows because (for me) the system doesn't provide you with enough tools to work efficiently. Also, I hate to work in GUI, the most "graphical" thing I ever use is midnight commander.
Time is precious. Waste it wisely.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2014-06-11 22:16:12
June 11 2014 21:54 GMT
#9771
@klo8

#include<cassert>
#include<iostream>
using namespace std;

struct T{
int i{0};
void f1(){ i=1; }
void f0(T& v)const{
assert(&v==this);
v.f1();
}
};

int main(){
T v;
v.f0(v);
cout<<v.i<<endl;
}

output is 1. as you see the const member function might modify this object, but you can't call a non-const memfn on *this. ;>

started summer internship today, gonna have a nice, all-inclusive, camel-cased, auto-completed, object-oriented holiday from the horrors of gcc, gvim on visual studio 2013 island and hopefully get up to speed with spirit x3.

aaah, just let the IDE do all the heavy lifting as i lean back in this nice reclining chairFunctionNoStopUndo(int TheFirstArgumentToHowDoITurnThisOffMyFunctionCall, StopPleaseHeeeelpHelperClass TheSecondArgAaaughAaauughument);
conspired against by a confederacy of dunces.
mcc
Profile Joined October 2010
Czech Republic4646 Posts
June 11 2014 23:11 GMT
#9772
On June 12 2014 06:15 klo8 wrote:
I've been coding in vanilla Java 6 for the last couple of weeks (an assignment for school requires me to use it) and the thing I've missed most are the Streams library (map, fold, scan etc. operations on Java collections) and immutable collections. I would also really love to see a "pure" keyword (or annotation) that says "this function/method doesn't modify outside state at all" or at least a C++-ish const keyword that says "this method doesn't modify this object". Other than that, with a good IDE (IntelliJ), Java is pretty okay. It gets a lot of hate for being verbose and I can see that, but it's a very easy language to read and you can get familiar with it fairly quickly. That said, I think C# is pretty much a cooler/more fun version of Java.

With new Java it is getting close to C# as far as useful features go, so the difference is extremely minimal. Mostly comes down to personal aesthetic preference and possibly need for "multiplatformness". C# I think is slightly better designed language and has few features that Java could use.

As for your list , try D, cooler than both
mcc
Profile Joined October 2010
Czech Republic4646 Posts
Last Edited: 2014-06-11 23:15:46
June 11 2014 23:15 GMT
#9773
On June 12 2014 06:54 nunez wrote:
@klo8

#include<cassert>
#include<iostream>
using namespace std;

struct T{
int i{0};
void f1(){ i=1; }
void f0(T& v)const{
assert(&v==this);
v.f1();
}
};

int main(){
T v;
v.f0(v);
cout<<v.i<<endl;
}

output is 1. as you see the const member function might modify this object, but you can't call a non-const memfn on *this. ;>

started summer internship today, gonna have a nice, all-inclusive, camel-cased, auto-completed, object-oriented holiday from the horrors of gcc, gvim on visual studio 2013 island and hopefully get up to speed with spirit x3.

aaah, just let the IDE do all the heavy lifting as i lean back in this nice reclining chairFunctionNoStopUndo(int TheFirstArgumentToHowDoITurnThisOffMyFunctionCall, StopPleaseHeeeelpHelperClass TheSecondArgAaaughAaauughument);

The guarantee is of course not there, it is more like : If you do not do some things that are bad(tm) const will guarantee you what it says. And it is still useful I would argue.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2014-06-12 05:03:33
June 12 2014 05:03 GMT
#9774
the guarantee is there (as far as i know), but it's a bit weaker than wat klo8 seems to think.
it applies only to the impllied *this in the memfn and not this object.

i think it's very useful!
conspired against by a confederacy of dunces.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2014-06-12 09:19:49
June 12 2014 09:09 GMT
#9775
about the boolean thing, i like C#'s try syntax for fallible or timeout-able actions. but i think those are actions rather than simple method get/sets. i think if the get/set is fallible (and thus requires the bool return) then the concept of using get/set there would be wrong, but that could be the c# talking.

in other news, i wrote a generic jsonrpcstreamclient. it's a bit strange that the BlockingCollection.Take isn't an TakeAsync because it says it blocks if the collection is empty.. is that just a while loop?

edit: well, used ilspy and went through BlockingCollection > Take > TryTake > TryTakeWithNoValidation > Wait > WaitAsync, yup, it seems like it's just a Monitor implementation on top of a SemaphoreSlim, there's a


SpinWait spinWait = default(SpinWait);
while (this.m_currentCount == 0)
{
if (spinWait.NextSpinWillYield)
{
break;
}
spinWait.SpinOnce();
}


which is "spin-based" waiting... no clue what that means XD
There is no one like you in the universe.
mcc
Profile Joined October 2010
Czech Republic4646 Posts
June 12 2014 11:15 GMT
#9776
On June 12 2014 14:03 nunez wrote:
the guarantee is there (as far as i know), but it's a bit weaker than wat klo8 seems to think.
it applies only to the impllied *this in the memfn and not this object.

i think it's very useful!

As long as const does not prevent you from getting address of this in the body of the function I think the guarantee is not complete. But I think we actually agree
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2014-06-12 16:05:02
June 12 2014 14:58 GMT
#9777
aha, i'm sure there are tricks i am not aware of. and yes ofc we do.

btw, i'm saying the guarantee applies to, and is a property of *this and not this or the member function for that matter, a weaker guarantee than the other poster was saying.
conspired against by a confederacy of dunces.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
June 13 2014 22:45 GMT
#9778
What do you guys think of hybserv's (IRC service) code? I've noticed functions are extremely large, and that there is code duplication. Link: https://github.com/dkorunic/hybserv2/tree/master/src
clickrush
Profile Blog Joined May 2010
Switzerland3257 Posts
Last Edited: 2014-06-14 00:42:57
June 14 2014 00:42 GMT
#9779
the three best books about programming i've ever read are:

debugging
http://www.amazon.com/exec/obidos/ASIN/0814474578/debuggingrule-20

coders at work
http://www.amazon.com/Coders-Work-Reflections-Craft-Programming/dp/1430219483/ref=sr_1_1?s=books&ie=UTF8&qid=1402705983&sr=1-1&keywords=coders at work

and the mit licenced structure and interpretation of computer programs
http://mitpress.mit.edu/sicp/full-text/book/book.html

there are recordings of the original SCIP lecture on youtube.

SCIP is especially great because it teaches programming on a high level without being too language specific or religious. the book is full of great examples that make you think hard and it teaches generally applicable ways of thinking instead of "you have to do it this way". it was very eye opening and liberating for me to look at tools/languages and look at them in a general way of "what are the means of abstractions in this language" instead of "where are my classes/closures/interfaces/loops/patterns/put-in-your-fav-lang-feature-here".
oGsMC: Zealot defense, Stalker attack, Sentry forcefieldu forcefieldu, Marauder die die
mcc
Profile Joined October 2010
Czech Republic4646 Posts
June 14 2014 01:30 GMT
#9780
On June 14 2014 07:45 darkness wrote:
What do you guys think of hybserv's (IRC service) code? I've noticed functions are extremely large, and that there is code duplication. Link: https://github.com/dkorunic/hybserv2/tree/master/src

As far as function size goes, some can be refactored, but in general sometimes large body just makes most sense, because there is no logical grouping of statements that could make a meaningful method.

Did not look enough to notice if there is code duplication, but I was just thinking today when code duplication is correct and when it is evil(tm). Basically if the code in two places looks similar by accident, meaning that whatever those two pieces of code represent is in no way linked by specification and necessity, code duplication might be correct way to go. Because considering that the similarity is just an accident, it means that if you have the code only in one place and later there is a change request, it is nearly sure that the change request will be just for one of the scenarios and best case you will have to split the code again, but more likely someone will just change the whole merged function and thus break the second scenario without even noticing.

In short, in some (pretty rare) scenarios code duplication can be a correct way to go.
Prev 1 487 488 489 490 491 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 3h 42m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Rain 1933
BeSt 291
Jaedong 224
Hyuk 219
firebathero 201
Zeus 173
Leta 139
ToSsGirL 81
Snow 78
Mind 53
[ Show more ]
Killer 52
PianO 49
Creator 40
soO 35
sorry 32
Bale 30
Sharp 24
Noble 18
Stork 16
Rush 15
Hm[arnc] 12
ZerO 11
Terrorterran 8
Dota 2
ODPixel499
NeuroSwarm214
League of Legends
JimRising 484
Reynor86
Counter-Strike
fl0m4902
olofmeister1806
byalli331
Other Games
ceh9560
WinterStarcraft424
XaKoH 391
dupreeh151
crisheroes149
Mew2King91
Pyrionflax89
Sick86
ZerO(Twitch)4
Organizations
Other Games
gamesdonequick411
Counter-Strike
PGL319
[ Show 12 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Laughngamez YouTube
• Migwel
StarCraft: Brood War
• iopq 12
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota2388
League of Legends
• Stunt835
Upcoming Events
Patches Events
3h 42m
PiGosaur Cup
15h 42m
Kung Fu Cup
1d 1h
Replay Cast
1d 13h
The PondCast
2 days
KCM Race Survival
2 days
OSC
2 days
IntoTheTV X SOOP
4 days
Reynor vs Solar
ByuN vs SHIN
Clem vs MaxPax
herO vs Rogue
WardiTV Invitational
4 days
IPSL
4 days
WorsT vs nOmaD
Dewalt vs andersOn
[ Show More ]
IntoTheTV X SOOP
5 days
WardiTV Invitational
5 days
IPSL
5 days
Azhi_Dahaki vs ggnore13
Double vs WIZARD
Replay Cast
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-11-02
Blizzard Classic Cup 2026
HCC Season 3

Ongoing

Acropolis #5
KCM Race Survival 2026 Season 4
International ShieldBattery League
BSL Season 23
IPSL Winter 2026-27
Calamity Cup Div. A Season 8
IEM Beijing 2026
PGL Masters Bucharest 2026
Stake Ranked Episode 5
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
FISSURE Playground #3
BLAST Open Fall 2026
Esports World Cup 2026

Upcoming

1xBet Invitational
SC4ALL II: Brood War
BSL 23: Non-Korean Championship
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
BLAST Bounty Winter 2027
eXTREMESLAND 2026
PGL Major Singapore 2026
Stake Ranked Episode 6
BLAST Rivals 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...

Disclosure: This page contains affiliate marketing links that support TLnet.

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.