• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 21:41
CET 03:41
KST 11:41
  • 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
RSL Offline Finals Info - Dec 13 and 14! RSL Offline FInals Sea Duckling Open (Global, Bronze-Diamond) $5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest
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
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-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: 1964 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
Poland17496 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
Replay Cast
00:00
WardiTV Mondays #62
CranKy Ducklings151
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nathanias 254
elazer 117
CosmosSc2 56
StarCraft: Brood War
Artosis 735
Larva 185
Bale 79
Noble 15
Dota 2
monkeys_forever866
NeuroSwarm81
League of Legends
JimRising 481
C9.Mang0332
Other Games
summit1g14249
tarik_tv5330
Day[9].tv801
shahzam592
Maynarde119
Mew2King82
ViBE56
ToD40
Organizations
Other Games
gamesdonequick998
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Hupsaiya 76
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• RayReign 31
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Doublelift4700
Other Games
• imaqtpie1230
• Day9tv801
Upcoming Events
The PondCast
7h 19m
OSC
13h 19m
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
21h 19m
Korean StarCraft League
2 days
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...

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 © 2025 TLnet. All Rights Reserved.