|
KaiserSchnitzel posted:Also, I got a write-up from HR because I said "ten little indians." While that is a bit harsh, it does have some p unsavoury associations you know - https://en.wikipedia.org/wiki/Ten_Little_Indians 'It is generally thought that this song was adapted, possibly by Frank J. Green in 1869, as "Ten Little Niggers", though it is possible that the influence was the other way round, with "Ten Little Niggers" being a close reflection of the text that became "Ten Little Indians". Either way, "Ten Little Niggers" became a standard of the blackface minstrel shows.[2] It was sung by Christy's Minstrels and became widely known in Europe, where it was used by Agatha Christie in her novel of the same name. ' The Agatha Christie thing is what first came to my mind.
|
# ¿ Mar 15, 2016 12:36 |
|
|
# ¿ May 9, 2024 23:55 |
|
Pixelboy posted:You probably dodged something awful. Have a beer, and move on. Don't worry about it. This. If nothing else a CEO who would be that flat-out rude to a job applicant is likely to be the sort of sociopathic CEO who would happily gently caress you over as an employee. I've worked for people like that and it's hell.
|
# ¿ Mar 24, 2016 13:23 |
|
Sex Bumbo posted:Back in the dark ages of DirectX, where to be fair everything was extremely lovely but DirectX was definitely no exception. I'm shocked, shocked I tell you that he had a bad divorce. (Genuinely shocked he found someone to marry in the first place, tho)
|
# ¿ Apr 19, 2016 11:48 |
|
Space Whale posted:Lack of feedback is a lurking, sneaky horrorshow from the interview-ee side. Why modulus? In C its just for(count=1; count<1000;count +=2) { sum += count; } or similar...
|
# ¿ Jun 11, 2016 14:35 |
|
Also, and this is a small thing, but I assume C# has the usual logic operators, in which case '(foo & 0x1) == 1' is probably better than foo % 2. I mean, a decent compiler should optimise the latter to the former anyway, but at the hardware level modulus is either a lot slower than an and (on x86 for instance) or not even in the ISA (for ARM).
|
# ¿ Jun 13, 2016 15:23 |
|
I did say it was a small thing! Maybe it's because I tend to do low-level stuff a lot but the bit-twiddling approach looks better to me. I certainly wouldn't hold it against a candidate if they did the modulus version.
|
# ¿ Jun 13, 2016 20:22 |
|
b0lt posted:Aside from not working for negative values, yeah, this works. POPCNT in SSE4, VCNT in NEON, through whatever intrinsic your compiler supports or inline assembler. (I wouldnt have known the instruction name without looking it up but I knew it existed).
|
# ¿ Jun 19, 2016 12:22 |
|
Walh Hara posted:That actually doesn't surprise me, because I've never learned about bitwise operators at all in my studies. Java, Haskell, Graph theory, advanced algorithmic datastructures, data analsysis, bio-informatics, etc, where all considered more important than bitwise operators by my university. Then your course sucked. They are the L in ALU. Bitwise instructions are one of the few fundamental things a CPU is for. Im amazed you can go to uni for comp sci and not be given a basic course in how a CPU actually works. Edit: you saw this guy was talking about senior-level coding positions, right? These are definitely guys who should know this stuff. feedmegin fucked around with this message at 13:34 on Jun 19, 2016 |
# ¿ Jun 19, 2016 13:16 |
|
ultrafilter posted:If none of the senior level developers you're interviewing are familiar with a topic, then you have to examine the possibility that it's just not that important in practice. Just like senior level developers in C-like languages being able to write fizz buzz is unimportant, right? Im sorry but this isn't obscure or anything, it's a basic part of the language.
|
# ¿ Jun 19, 2016 16:44 |
|
Centripetal Horse posted:I'm not an optimization expert, but the only obvious improvement I see is to get rid or reduce the iterations of the loop. My other thought if popcnt etc aren't available would be to do something like e.g. if (x & 0xffff0000 == 0) { // don't bother counting the top 16 bits), which is pretty much what you're talking about here. Assuming you have some knowledge of how big the number can be and how likely it is to be small/large.
|
# ¿ Jun 20, 2016 11:19 |
|
MrMoo posted:Similarly there is still quite a consistent hatred of std::string due to memory usage, the Qt project I believe has written their own versions of a lot of containers to reduce memory usage in KDE. Qt has had its own containers since the year dot (well, like 1995) because it ran and still runs on a lot of platforms, with a lot of compilers, some of which that far back were ropey at handling templates at all (hello gcc 2.8) let alone having the STL even available let alone bug-free. And now they're used all over the libraries, why rip them out and put STL ones in its place, forcing everyone porting to a new version of Qt to do the same? Also, QString has been since Qt 3? I think, specifically 'a bunch of Unicode codepoints' rather than std::string's 'a bunch of bytes', which is handy and important when you're a library that's strong on internationalisation cross-platform.
|
# ¿ Jul 19, 2016 12:57 |
|
|
# ¿ May 9, 2024 23:55 |
|
hobbesmaster posted:Unions are also classes if we're talking about C++ trivia. At a language implementation level they're quite similar; it's just that the offset from the memory address of the variable for all their members is 0 and the size is the largest size of any given member rather than the sum of the sizes of the members (modulo alignment adjustments).
|
# ¿ Aug 24, 2016 14:14 |