If you use CoderPad, and the C (or C++) compilers in particular, you might want to be aware of a compile-time option they use that could affect how your programs run. The gcc compiler is invoked with the -fsanitize=address argument, which can cause heap buffer overflow problems with programs that would otherwise run properly without it, such as the following:
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// To execute C, please define "int main()"
int main() {
uint16_t *p, *ibp;
srand(time(NULL));
// causes heap buffer overflows with gcc -fsanitize=address option
// ibp = (uint16_t *)calloc(8, sizeof(uint16_t));
ibp = (uint16_t *)calloc(16, sizeof(uint16_t));
if (ibp == NULL)
exit(1);
for (p = ibp; p != ibp + 8 * sizeof(uint16_t); p += sizeof(uint16_t)) {
*p = (rand() % 256) << 8 | (rand() % 256);
}
for (p = ibp; p != ibp + 8 * sizeof(uint16_t); p += sizeof(uint16_t)) {
printf("%hu\n", *p);
}
free(ibp);
return 0;
}
Execution with the commented assignment to ibp uncommented (ie. halving the allocated memory):
( Read more...Collapse )
- Current Mood:
busy
I'm back, for now. (I have been posting to FB, LinkedIn, Quora, and Medium.)
Recently, while reading Quora, I happened upon a post suggesting books to use for learning CS (and other related topics) on one's own. The author, the late Prof. Anany Levitin, has written two books on algorithms (one cowritten with his wife). From looking at some sample text via Amazon, they cover some of the "problem solving" aspects of algorithms that I have written about in the past. IMO, these books could serve some people as supplemental material to textbooks such as CLRS, which is more oriented towards (formal) algorithm analysis than design.
( Read more...Collapse )- Current Mood:
tired
I had an onsite interview at Ciena a couple of weeks ago for a Senior Systems Test position. Long story short — I didn't get the job. I think they were looking for a person with more experience automating the user experience of routers, whereas most of my experience was automating router operations.
Anyway, one good thing came of this. As I was going through my interview "debriefing" — making notes about what I was asked, how I answered it, and things I could have done better, I found a mistake in the BGP-4 RFC. I submitted an errata report for it, which will hopefully be helpful to people who use it.
- Current Mood:
okay
I took a test from 7-9am this morning from ProtonMail, a secure email provider based in Geneva, Switzerland, that has an office in SF. The test was sent to me by email, and I had two hours to complete it. ProtonMail required me to take the test during their business hours, so I either had to be up at dawn to take it or stay up really late. Either way, I knew I would be tired, so I decided the best thing to do would be to take the test first thing in the morning.
The test had several logic puzzles and some other questions. I have not focused on those types of questions lately, because tech companies are more likely to ask algorithms and systems related questions. Even if I had prepared more for those types of questions, I still might have struggled with them, because I don't do well on those types of questions after just waking up. So basically, it's the same old story -- I wish I had done better.
- Current Mood:
tired
I had an interview loop yesterday at the IBM Silicon Valley Lab facility with several people from the Cloud Network Services group. Four engineers plus the engineering manager interviewed me. I thought my overall performance was so-so -- I could have done worse, but could have done better. Some of the programming questions I was asked were similar or the same to questions asked some time ago on HackerRank, but I was a little slower at the interview, so I either wasn't able to complete them or made small mistakes. There were also questions I was asked about past projects that I didn't remember very well. The air conditioning in the building made me feel very cold, enough to put my jacket on, and impeded my ability to answer questions. I also started feeling tired after about an hour and a half of the loop. Perhaps the height of the loop was explaining to one of the team members how Relative Placement works.
Unfortunately, I was turned down. I am disappointed, but not discouraged. Hopefully, I will do better on my next interview loop (well enough to get some kind of offer). Perhaps if I have some time, I will make some general remarks about my experiences with tech interviews over the last couple of years. (If you read my posts on FB or Quora, you probably have an idea of what I'm going to write.)
- Current Mood:
disappointed
I had an interview with Netsia last Friday afternoon for a Senior Network Operations Engineer position. I wasn't offered the position, but I don't feel discouraged. One of the people interviewing me felt that I would be a good candidate for contract software development work, and that they would consider me if they have any. I felt pretty good overall about the interview, because I felt like I represented myself.
- Current Mood:
optimistic
In general, I have felt more in control of these interviews than others I've had (and written about here) in the past. Hopefully, that is a sign of better things to come.
- Current Mood:
hopeful
As always, we'll see what happens. I think I could have done better. Everything I was asked is something I have been familiar with (at least) at one time – it's just that I didn't remember some things.
- Current Mood:
disappointed
- Current Mood:
annoyed
So here is the dilemma. Would it be better to answer truthfully, indicating that you did not read the document (if you could not access it)? Would it be better to indicate that you did read the document, even though you did not, because you attempted to access it? Or is there some other alternative, but you pay an "opportunity cost" for choosing it (namely the time spent on it)?
I decided to use the "attach" feature Taleo provides to attach a note indicating that I did attempt to access the document, but DNS queries failed (using two different ISPs) for the domain name in the URL. My reasoning was that this is something Taleo (or Dell) may be doing to filter candidates – at the very least, catching those people who were not honest about not reading the document (if they could not access it). It could also serve as a filter for those people who, rather than giving up on a problem, investigate it and attempt to find out what is wrong. Arguably, this is part of the skill set for the position I applied for.
As always, we'll see how it goes. But it did occur to me that this might be a sly way of filtering candidates.
- Current Mood:
curious
Comments
How was the next interview?