• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Lines of code written by HAB this week ....

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Lines of code written by HAB this week ....

    1.

    It was a long line involving c# generics, predicates, 'n' stuff.

    Add I did write a unit test; which it passed.

    I was a bit 'tom' for the first half of the week and then I had to do some research on a related subject.

    It's a good job I don't have to cut code for a living.
    How did this happen? Who's to blame? Well certainly there are those more responsible than others, and they will be held accountable, but again truth be told, if you're looking for the guilty, you need only look into a mirror.

    Follow me on Twitter - LinkedIn Profile - The HAB blog - New Blog: Mad Cameron
    Xeno points: +5 - Asperger rating: 36 - Paranoid Schizophrenic rating: 44%

    "We hang the petty thieves and appoint the great ones to high office" - Aesop

    #2
    Originally posted by HairyArsedBloke View Post
    1.

    It was a long line involving c# generics, predicates, 'n' stuff.

    Add I did write a unit test; which it passed.

    I was a bit 'tom' for the first half of the week and then I had to do some research on a related subject.

    It's a good job I don't have to cut code for a living.
    Post it then!

    You've come right out the other side of the forest of irony and ended up in the desert of wrong.

    Comment


      #3
      OK.

      Code:
                  return _series.Keys.ToList<DateTime>().FindIndex(delegate(DateTime t) { return (t == dateTime); });
      Just remember - I'm not much of a programmer anymore.

      This stuff doesn't have to be 'good' just come out with the right numbers.
      How did this happen? Who's to blame? Well certainly there are those more responsible than others, and they will be held accountable, but again truth be told, if you're looking for the guilty, you need only look into a mirror.

      Follow me on Twitter - LinkedIn Profile - The HAB blog - New Blog: Mad Cameron
      Xeno points: +5 - Asperger rating: 36 - Paranoid Schizophrenic rating: 44%

      "We hang the petty thieves and appoint the great ones to high office" - Aesop

      Comment


        #4
        Originally posted by HairyArsedBloke View Post
        Just remember - I'm not much of a programmer anymore.
        Sod that. If you got a days pay for one (shortish) line of code then I'm well impressed.

        Reminds me of the old yarn about a structural engineer.

        The client (Wimpey I think) came to this freelance engineer and asked him how they could reenforce a road bridge to take bigger lorries.

        The engineer concluded that one h-section girder would need to be added to each section of the bridge.

        The additional bracing girder would be indicated by exactly one line on the master drawing.

        The engineer's invoice for the work was £12,501.25

        The bridge contractor queried the invoice and asked for a cost breakdown.

        The consulting engineer replied: -

        - To adding a line to master drawing: £1.25
        - For knowing where to add the line: £12,500.00
        Last edited by bogeyman; 12 June 2009, 18:48.

        You've come right out the other side of the forest of irony and ended up in the desert of wrong.

        Comment


          #5
          Originally posted by bogeyman View Post
          Sod that. If you got a days pay for one (shortish) line of code then I'm well impressed.
          I wish

          It's the sum total of the progress towards a new product I'm working on. No revenue from it yet.
          How did this happen? Who's to blame? Well certainly there are those more responsible than others, and they will be held accountable, but again truth be told, if you're looking for the guilty, you need only look into a mirror.

          Follow me on Twitter - LinkedIn Profile - The HAB blog - New Blog: Mad Cameron
          Xeno points: +5 - Asperger rating: 36 - Paranoid Schizophrenic rating: 44%

          "We hang the petty thieves and appoint the great ones to high office" - Aesop

          Comment


            #6
            Originally posted by HairyArsedBloke View Post
            OK.

            Code:
                        return _series.Keys.ToList<DateTime>().FindIndex(delegate(DateTime t) { return (t == dateTime); });
            Just remember - I'm not much of a programmer anymore.

            This stuff doesn't have to be 'good' just come out with the right numbers.
            I would have split it up a bit for readability, and also to do a check that the ToList returns something.

            good days effort though

            Comment


              #7
              Well done on your productivity. It's been really tough for me the last threee weeks doing nothing but looking mad busy
              Public Service Posting by the BBC - Bloggs Bulls**t Corp.
              Officially CUK certified - Thick as f**k.

              Comment


                #8
                I was tom first two days of the week. Spent the next three days trying to work out why a variable wasn't being return up the call stack and managing idiots in Bangalore.

                Still haven't fixed the bug. Still looking after idiots in Bangalore.
                ‎"See, you think I give a tulip. Wrong. In fact, while you talk, I'm thinking; How can I give less of a tulip? That's why I look interested."

                Comment


                  #9
                  I'm a developer and I have written absolutely no code in the last week whatsoever. I did write an email though, if that counts, but it wasn't very long.

                  Had a good lunch today though.
                  Cats are evil.

                  Comment


                    #10
                    Originally posted by HairyArsedBloke View Post
                    OK.

                    Code:
                                return _series.Keys.ToList<DateTime>().FindIndex(delegate(DateTime t) { return (t == dateTime); });
                    Just remember - I'm not much of a programmer anymore.

                    This stuff doesn't have to be 'good' just come out with the right numbers.
                    No no no no no! (at least with my development manager hat on)

                    That leads to unmaintainable code, which is very expensive. Clear code is easier to debug, fix and enhance.

                    Of course with my contractor coder hat on, good code is not good as it doesn't lead to rework. So forget what I just said.
                    Down with racism. Long live miscegenation!

                    Comment

                    Working...
                    X