|
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. |
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!
|
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.
|
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.
|
@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.
|
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'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?
|
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.
|
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.
|
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.
|
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.
|
@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);
|
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
|
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.
|
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!
|
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
|
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
|
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.
|
|
|
|
|
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.
|
|
|
|
|
|