|
virang_21 wrote: Where in real world application am I going to use this ? Your question, young Padawan, tells me that close to the hardware you programmed have not yet. Look at a processor's instruction set you must and such logical instructions find you will. Learn to use them and address calculations and bit masking you fear must not.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
I once was asked in an interview to write a simple function, and later the interviewer asked me about two features he said he hadn't previously seen at all: one was 'Yoda conditions' and the other was designing the loop in such a way that the end condition was a comparison to 0.
The latter was based on the knowledge that in assembler, comparisons to 0 are typically slightly faster than comparisons to a constant. The former was to make the compiler shout out in case of an accidental typo (writing '=' rather than '==').
After a couple of days, I was told to be overqualified for the job
Nowadays, I'd do neither: the first is sufficiently covered by compiler warnings, the second is a kind of optimzation that a good compiler can usually do just as well, and often better. Moreover, not having to care about either makes it easier to write clean, readable code, and that is the most important thing in the long run.
I'm telling this because these kind of optimizations I used are just as obsolete nowadays as bit-twiddling, unless you really, really need to optimze your performance, and know for a fact (i. e. you have actually measured) that the compiler doesn't already optimize the code sufficiently. In C++ you can use bitfields; I am not sufficiently familar with C# to know what can be used here to provide a reasonably high-level API.
But, even if you do need bit manipulations, within a given project those should be encapsulated in just a handful of functions that take at most an hour or two to implement and test - so it's still entirely senseless to test a candidate on that kind of know-how
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Stefan_Lang wrote: But, even if you do need bit manipulations, within a given project those should be encapsulated in just a handful of functions that take at most an hour or two to implement and test - so it's still entirely senseless to test a candidate on that kind of know-how
No. Please spread them out as redundantly as possible, and don't use any enumerations. Use magic numbers and obfuscate the lines in as many different ways as you can think of.
Stefan_Lang wrote: After a couple of days, I was told to be overqualified for the job Happened to me too, but the interview was about using stacks. I think the interview was over when I told him that I learned on a microprocessor that could have 15 stack pointers at the same time if needed. The one remaining register would have to be the program counter.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
We seem to enjoy reducing our individuality down to an abstract number that we can then use to simultaneously stroke our ego and feel inferior in a pointless comparison with other abstract numbers.
And of course, the bean counters love their pigeon holes in which to categorize us to determine our salaries, title, benefits, and work.
Marc
|
|
|
|
|
With this level of English and deep meaning you can easily write a novel or two.
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
That abstract number is our salary, and - at least in western cultures - we never really talk about that lest we feel inferior
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
That's one of those question that make it clear that the recruiter (or whoever is interested in your score) has no idea what to ask so he makes up artificial challenges. It doesn't matter at all if you can clearly predict the outcome of code that wouldn't pass a code review.
|
|
|
|
|
This question tests your ability to use the bit-manipulation operators. You would use such code when writing comms protocols or device drivers, and lots of other places. If you haven't seen code that does a lot of bit manipulation, maybe your experience, and thus your mastery of C#, isn't as great as you thought it was.
|
|
|
|
|
Even if the future task of an applicant was to write device drivers, writing and testing the handful of bit-encoding and -decoding functions that are truly required shouldn't take more than 5% of the total time, more likely less than 1%.
It would be more useful (and more objective) to test the applicant's typing speed than that!
P.S.: and if that company has any significant fraction of development in the area of device drivers, they should already have a ready to use library for the encoding and decoding, and thus no need for any developer who knows her way around bit manipulations
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
I'm sure this question was less than 5% of the coding test, and less than 1% of the interview, so it might even have been an appropriate question by this measure.
Coding questions don't measure ability very well, but they do quickly exclude a particular kind of poseur, who can't code a lick. It felt very strange to me when I discovered that people who know absolutely nothing about programming apply for programming jobs, but it has happened to me.
It's also a problem that there aren't any measures that are better than coding questions. There aren't any tests of developer skill that can be successfully applied in a short interview.
|
|
|
|
|
I never found 'code this' type of tasks to be very useful in an interview, since there's simply not enough time for a task that would tell you something useful about the applicant's real coding skills.
However, analyzing a given piece of code can be quite good, since you can hide some subtleties and special techniques that you care about in the code and then wait to see what the applicant can find out about it.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
If you are writing a general ledger then no, it's not that relevant other than demonstrating a basic knowledge of boolean algebra and numerical anaysis (i.e. truncation and how it affects accuracy). If the job was embedded, especially bare iron, it's a core competency and if you missed it you better go back to selling shoes on a website.
Any time you interface to a foreign app or device it's quite likely you'll come across situations like that. Even if it's C#, when you build that production line tester that interfaces to scales, spectrometers and time of flight sensors you'll have to know boolean operations.
And if you don't understand boolean operations, how do you build SQL queries or LINQ statements?????
|
|
|
|
|
JackPeacock wrote: If the job was embedded
I've done my share of embedded coding, and never had any need to use bit manipulation functions. Those were encapsulated in the low level actuator and sensor drivers. And that was just a fraction of the code. Yes, in a team of ~10 devs, one engineer (not a CS guy) worked on that level. But most of his time was spent adjusting the timings, or fixing the functionality that wasn't quite working the way it was intended (or simply on higher level stuff), not fiddling with bits. Once the bit-manipulating code was in place, it hardly got changed anymore.
What I'm saying is that even where you really need these operations, they only take up a very limited fraction of the total development work! I don't really see how it could ever be so important to make it a criterion for an applicant.
JackPeacock wrote: And if you don't understand boolean operations, how do you build SQL queries or LINQ statements?????
Well, first of all you need to understand that bit operations go quite a way beyond simple boolean logic in the same way that evaluating exponentials manually goes way beyond simple addition: You can develop the understanding of one from the other - but that doesn't mean it's the same level of knowledge.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Best east west deli stews an antelope. (10)
modified 23-Nov-16 4:26am.
|
|
|
|
|
Wildebeest (anagram of best + e(ast) + w(est) + deli leading to a creature often found on the plains of Torbay).
Slogans aren't solutions.
|
|
|
|
|
Indeed it is!
Your turn tomorrow.
modified 23-Nov-16 5:27am.
|
|
|
|
|
Every 6 months or so, one fine day when I wake up from my sleep, I find some segments of my memory erased or bugged like bad sectors. For example, All of a sudden I find it hard to recollect specific passwords/Pins for some accounts precisely. It doesn't go blank, but it gets distorted with the bunch of password-mixes I use. And some good (Non-native lang) words that were in usage very well, goes blurred out. I think hard to recollect it while speaking.
I seem to get alright in couple of days, but I do manually restore the forgotten bits.
Should I be worried? I'm worried in deed, as I get to see a lot of threatening words like Dementia , Alzheimer & so many things.
(And no it's not a hangover. It doesn't usually happen after a booze).
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
an occasional black out is normal I think (although it should restore itself rather quickly) , if it happens regularly you might want to see a doctor and get rid of the doubt.
|
|
|
|
|
I can't answer if that is normal, but that happens to me too. Can be just tiredness, or simply that in our own experience we are exceending our short term memory so each day something gets "swapped out".
DURA LEX, SED LEX
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
I don't know. As a matter of fact, I can't even remember what you asked for.
|
|
|
|
|
It is normal. Information overflow leads to overwriting less needed informations. The brain has limited size in short term and medium term capacity.
The art is to utilize the long term brain, because it is only uses around 10%.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
A C Doyle got it right when he stated, by Sherlock Holmes words, that the brain isn't illimitate but it's like a repository. A well organized repository where useless information are weeded out and the useful ones are well sorted is an efficient brain.
Then I still hold fast to bits and scraps of old equipment I had 20+ years ago in my storage closet because "you might never know", so I know the theory but can't apply it to myself
DURA LEX, SED LEX
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
modified 23-Nov-16 5:07am.
|
|
|
|
|
I have amazing amounts of useless information in my brain, how do I debug that weeding algorithm?
|
|
|
|
|
Weeding in?
AFAIK smoking pot destroys long and short temr memory, and the orietnation sense. That's one of the reasons I never smoked. I'm already a klutz.
DURA LEX, SED LEX
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
|