Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Developers Blues

Developers Blues

Scheduled Pinned Locked Moved The Lounge
graphicsadobelinuxquestion
27 Posts 10 Posters 46 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    Haha! :laugh: The code was ambigious (I have seen things like this on BrainBench, esp. the core Java and C#). The poety is a rendition of Trish Yerwood's 'Bartender Blues'. Guess I just go with the absolute of 'Let the compiler sort it out'.

    R Offline
    R Offline
    Rob Graham
    wrote on last edited by
    #17

    TheArchitectualizer wrote:

    f 'Let the compiler sort it out'.

    So you've discovered a compiler with working intention prediction? There is no excuse for writing ambiguous code. Maintainers should be permitted to poke the original author of crap like this with sharp sticks. In a month you wont remember what it was that you really meant. What happens when the vendor decides the compiler implementation was non-standard/wrong and changes how this compiles in a new version?

    L 1 Reply Last reply
    0
    • R Rob Graham

      TheArchitectualizer wrote:

      f 'Let the compiler sort it out'.

      So you've discovered a compiler with working intention prediction? There is no excuse for writing ambiguous code. Maintainers should be permitted to poke the original author of crap like this with sharp sticks. In a month you wont remember what it was that you really meant. What happens when the vendor decides the compiler implementation was non-standard/wrong and changes how this compiles in a new version?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #18

      I read study the language specification first all the way down to the op code and JIT. I don't write code the specification doesn't impliment.

      1 Reply Last reply
      0
      • L Lost User

        Awww! My eyes! My eyes! My brain! I'm meeeeltiiiiing... Too much geekyness? :-D When you write a poem about something (or even copy-paste it from somewhere else), you just gotta know you're a fanatic of the subject in the poem, which in this case is also called "a geek". Ever played Portal, BTW? At the end there's a really neat song about a geeky female computer that does science and experiments on people. Your poem sort of reminded me of that. C'mon! Don't tell me you don't know what I'm talking about. :laugh: Another thought: maybe you should stick to poetry. :doh: (byte)a = b << 8; sort of makes sense for me, in case you wanted a quick way to divide b by 2^8, and if b were not a char, OR if you wanted to get bits 7-15 of an x-bit variable, where x is a power of 2 greater than 16. Sorry to say this, but you're just a geek on this one. (i.e., as advertised on TV)

        modified on Monday, July 6, 2009 10:01 AM

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #19

        Hmm, what is 'a' and 'b'? My point, bit shifting is not an everyday OO operation in C#. If you need fast code, use C or ASM.

        E L 2 Replies Last reply
        0
        • P PIEBALDconsult

          Other than the ability to briefly explain an "incorrect" answer, I had no opportunity to discuss the problems with the test with the recruiter.

          M Offline
          M Offline
          Member 1709723
          wrote on last edited by
          #20

          yeah, right, like that would have made a difference most i know would be like talking to a rock- i said most! not all - i do know a handful of decent ones

          icalburner

          L 1 Reply Last reply
          0
          • M Member 1709723

            yeah, right, like that would have made a difference most i know would be like talking to a rock- i said most! not all - i do know a handful of decent ones

            icalburner

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #21

            Haha! :laugh: My college optics professor told us one day: 'I can teach optics to a rock...' He is a master at realy dry humor. It's not logical, stack overflow!

            1 Reply Last reply
            0
            • L Lost User

              Hmm, what is 'a' and 'b'? My point, bit shifting is not an everyday OO operation in C#. If you need fast code, use C or ASM.

              E Offline
              E Offline
              Eric J
              wrote on last edited by
              #22

              It must be nice to only work with highly abstracted data types. You clearly don't do any bit bashing, unlike many of us (it is not restricted to low-level programming). I do it fairly often in my code, so maybe I'm doing something wrong.

              L 1 Reply Last reply
              0
              • E Eric J

                It must be nice to only work with highly abstracted data types. You clearly don't do any bit bashing, unlike many of us (it is not restricted to low-level programming). I do it fairly often in my code, so maybe I'm doing something wrong.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #23

                Donno! :confused: Mostly write bus apps. Can't do anything interesting there. In my free time, which I have lots of these days, I research what I consider low level stuff. Most primitave code I worked on was some geo spatial stuff, but I used Lab View Math Lab and other mathematical packages...

                modified on Monday, July 6, 2009 3:50 PM

                1 Reply Last reply
                0
                • L Lost User

                  Just to prove the point I took the free C# BB test. Test: C# Date: 05-Jul-2009 Score: 2.56 Weights: 100% C# Elapsed time: 27 min 40 sec C# Score: 2.56 Percentile: Scored higher than 27% of previous examinees Demonstrates a solid understanding of core concepts within this topic. Appears capable of working on most projects in this area with moderate assistance. May require some initial assistance with advanced concepts, however. Strong Areas Value and Reference Types Weak Areas Grammar Developing Data Consumers and Services Methods Properties, Indexers, and Fields I failed! Min passing 2.76. Here are some of the tings I'm talking about: if (a > b) c = 'a'; else { if (b == d) c = 'e'; else c = 'b'; } a) c = (b = d) ? 'e' : ((a > b) ? 'a' : 'b'); b) c = (b == d) ? 'e' : (a > b) ? 'a' : 'b'; c) c = (a > b) ? 'a' : (b = d) ? 'e' : 'b'; d) c = (a > b) ? 'a' : (b == d) ? 'e' : 'b'; e) c = (a > b) ? 'a' : ((b = d) ? 'e' : 'b'); ...and... public void A() { byte a, b, c; a = 255; b = 122; c = (byte)(a & b); } ...and... 'Which one of the following compilers' flag turns on run-time integer range checking? '

                  J Offline
                  J Offline
                  Jonas Hammarberg
                  wrote on last edited by
                  #24

                  While I was hanging out at getafreelancer.com these gigs "Create a automatic test for subject such and such" frequently turned up... Lowest bider was _always_ selected -- which maybe could explain the (sub)quality of these tests... Cheers /Jonas

                  1 Reply Last reply
                  0
                  • L Lost User

                    Hmm, what is 'a' and 'b'? My point, bit shifting is not an everyday OO operation in C#. If you need fast code, use C or ASM.

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #25

                    TheArchitectualizer wrote:

                    Hmm, what is 'a' and 'b'?

                    ; I'll need more of the code to figure that out. However, I can tell you that if b is not declared as something larger than char, then all this code does is put 0 in a. :|

                    TheArchitectualizer wrote:

                    If you need fast code, use C or ASM.

                    I do. :P

                    1 Reply Last reply
                    0
                    • L Lost User

                      Just to prove the point I took the free C# BB test. Test: C# Date: 05-Jul-2009 Score: 2.56 Weights: 100% C# Elapsed time: 27 min 40 sec C# Score: 2.56 Percentile: Scored higher than 27% of previous examinees Demonstrates a solid understanding of core concepts within this topic. Appears capable of working on most projects in this area with moderate assistance. May require some initial assistance with advanced concepts, however. Strong Areas Value and Reference Types Weak Areas Grammar Developing Data Consumers and Services Methods Properties, Indexers, and Fields I failed! Min passing 2.76. Here are some of the tings I'm talking about: if (a > b) c = 'a'; else { if (b == d) c = 'e'; else c = 'b'; } a) c = (b = d) ? 'e' : ((a > b) ? 'a' : 'b'); b) c = (b == d) ? 'e' : (a > b) ? 'a' : 'b'; c) c = (a > b) ? 'a' : (b = d) ? 'e' : 'b'; d) c = (a > b) ? 'a' : (b == d) ? 'e' : 'b'; e) c = (a > b) ? 'a' : ((b = d) ? 'e' : 'b'); ...and... public void A() { byte a, b, c; a = 255; b = 122; c = (byte)(a & b); } ...and... 'Which one of the following compilers' flag turns on run-time integer range checking? '

                      E Offline
                      E Offline
                      E Anderson
                      wrote on last edited by
                      #26

                      TheArchitectualizer wrote:

                      Just to prove the point I took the free C# BB test.

                      Y'all have me curious - what is the link to that site? Are you referring to the C# test available at Brainbench or some other site?

                      L 1 Reply Last reply
                      0
                      • E E Anderson

                        TheArchitectualizer wrote:

                        Just to prove the point I took the free C# BB test.

                        Y'all have me curious - what is the link to that site? Are you referring to the C# test available at Brainbench or some other site?

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #27

                        Yup!

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups