|
Put a sock in it!
It was broke, so I fixed it.
|
|
|
|
|
You can actually also wash your socks, you do not need to buy new ones every time.
|
|
|
|
|
Darn it!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I did an IKM assessment for C# and some of the questions are so odd it makes one wonder does it really gauge one's ability to code ?
You are given a program and 5 outputs and you have to choose right one. One of the question was what is the value of x after running this code ?
int x=0x0000FFFF;
x=x>>4;
x=x<<4;
x=x|0x0000000F;
x=x^0x55555555;
Where in real world application am I going to use this ?
I scored 76 out of 100. Last time I took .NET 4.5 test I scored 88. How does it help someone understand my ability to write code for actual application ?
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
In a lot of communication protocols. My Modbus class is basically composed of these, as all the classes that dialog with hardware - I had to write the driver for a I/O board with variable configurations that had to interface with a single falt array of values and these operations are the norm.
Non-standard checksums are so standard (pun intended) that it is fairly common having to write code like this... preparing data for SIMD processing also may involve maskings and shifts, as the normalization of data from analog or digital transducers. Many transducers have offsets to be weeded out as fast as possible, others are scrambled in strange ways (as first 4 bit of first channel, first four of second channel, fuirst foru of nth channel ... second four bits of first channel and so on) so to have a flat model you may need to perform these kind of operations.
Not the usual Web UI or accounting program of course.
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
|
|
|
|
|
Somebody who is good in bit-shifting isnt long-term qualified for the stupidity and annoyance C# and XAML.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
If you were a woman I'd asked you out after this.
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
|
|
|
|
|
den2k88 wrote: If you were a woman
How do you know she is not? Never trust a user name.
... such stuff as dreams are made on
|
|
|
|
|
It's a conditional tense so it is still open to debate. Conditionals are quite tough in every language so I may have used not the most proper grammatical form
That, and "on the Internet nobody knows you're a dog".
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
|
|
|
|
|
|
|
Don't see what XAML has to do with it. I write C# to interface with hardware, do a lot of bit manipulation, and I've never used XAML in my life.
|
|
|
|
|
Who tests the testers?
There are two really easy ways to find out whether or not someone can code - either look at their code and/or talk to them about code.
Tests like this are really silly as you might do stuff like this all the time (unlikely as it is that you'd do it in C#) or it's going to be totally alien to you.
Slogans aren't solutions.
|
|
|
|
|
This is basic programming stuff. They want to see if you can do the math.
Do you know what the answer is?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I could see at a glance that it wasn't 42, so I lost interest.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
There are probably about 1,431,677,610 things I can think of that are more basic than that!
Slogans aren't solutions.
|
|
|
|
|
I know it is shifting value and what the flags are but in a limited time test I am not going to do a math on paper just to answer one correct answer and leave the rest of questions which has higher penalty if not completed.
After coming home I did it first just to make sure what I selected was OK.
Home | .NET Fiddle[^]
I am happy that I passed the test but hard to tell if one really know all the concepts just by looking at score.
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
John Simmons / outlaw programmer wrote: Do you know what the answer is? Yes.
How did that code pass our code-review?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Indeed. Lines 2-4 are obsolete. How inefficient!
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)
|
|
|
|
|
John Simmons / outlaw programmer wrote: This is basic programming stuff. Only for those who have a notion what the processor actually does.
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.
|
|
|
|
|
Which is basic knowledge for us old guys.
I haven't personally seen any (production) .Net code that uses shift left/right, but its use was somewhat frequent in some unmanaged C++ code I've been involved with.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Just read and convert the input from some binary file format and then press it into .Net structs/object. As soon as you leave the beaten path of serializing/deserializing from and to XML, you will have to do a good share of bit twisting.
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 had to use bit shifts when I built an email processor to manually decode Base64 to regular binary. The non-programmers gave me puzzled looks when I described it as bit-twiddeling.
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
I've seen lots of bitshifting in c#. Very common in image processing.
|
|
|
|
|
For what it's worth, I've got some production C# code that handles TCP/IP communications that uses << and >> on occasion for endian-ness conversions, bit field extraction, and so on.
Software Zen: delete this;
|
|
|
|