• 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!

.NET - In the Navy!

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

    .NET - In the Navy!

    As a Software Engineer working on an application that supports the timely delivery of essential opperational data for mission equipment onboard maritime platforms. The successful candidate will be involved in all aspects of the software development, including design, coding, unit testing and Integration testing. The specific skills required are C# (minimum of 2 years), .NET Development (minimum of 2 years) OOD, UML, minimum of 2 years and preferably using Rational products, software testing (minimum of 2 years on an MS Windows system). Also highly desirable: SQL Server Database Development and Integration, Visual Developer Studio, Rational Clearcase & Clearquest and COTS Integration.
    Location Portsmouth, Hampshire
    --------------

    Wahey!

    using (NuclearMissile tridentMissile = new NuclearMissile(MissileEnum.Trident))
    {
    tridentMissile.AimAt(baghdadCity);
    tridentMissile.Launch();
    }

    #2
    Originally posted by thunderlizard
    using (NuclearMissile tridentMissile = new NuclearMissile(MissileEnum.Trident))
    {
    tridentMissile.AimAt(baghdadCity);
    tridentMissile.Launch();
    }
    You do realise that your code will result in automatic disposal of object "tridentMissile" right after it was launched, which would presumably mean self-destruct or explosion right after it left its tube?

    Comment


      #3
      Oh dear...

      ..have they given up on using ADA then?

      Perhaps Eiffel[.Net]* might be an alternative?


      * Destruction by design

      Comment


        #4
        Hey there AtW, how you doing?

        That's a very literal interpretation. By the same argument you could say that my missile had no physical existence until I instantiated it in my code.

        All I meant was that once it's launched, my missile has no place taking up valuable memory that could be more profitably used to play my Dr Strangelove DVD.

        Anyway, I wasn't planning on calling the destructor right away. By the time the garbage collector gets round to it, the Trident should be past Magaluf at least.

        Comment


          #5
          Originally posted by thunderlizard
          Hey there AtW, how you doing?
          Very well thanks for asking!


          Originally posted by thunderlizard
          That's a very literal interpretation. By the same argument you could say that my missile had no physical existence until I instantiated it in my code.
          Nope - AFAIK "using" keyword can only be used on objects that implement IDisposable interface. As soon as object's live is over, which is end of scope for that var, a dispose code will be called - and how would missile implement it? The only logical explanation is that it will self destruct.

          Originally posted by thunderlizard
          Anyway, I wasn't planning on calling the destructor right away. By the time the garbage collector gets round to it, the Trident should be past Magaluf at least.
          Its not controlled by you - which is the point of "using" keyword, it effectively forced dispose call as soon as disposable object is left scope, the idea is to dispose of resources much quicker because stupid GC loves to keep objects around (if it detects lots of free memory in the system).

          I'd say your example backfire

          Comment


            #6
            You really are a humour tampon aren't you? I take it you're not a regular at the dinner parties of Notting Hill. Shan't bother in future.



            I still reckon it's not obligatory to actually blow things up after you've finished referring to them in code.

            Comment


              #7
              Originally posted by thunderlizard
              I still reckon it's not obligatory to actually blow things up after you've finished referring to them in code.
              Lets, see shall we:

              "The using statement defines a scope at the end of which an object will be disposed.

              using (expression | type identifier = initializer) statement

              where:

              expression
              An expression you want to call Dispose on upon exiting the using statement.

              Remarks

              You create an instance in a using statement to ensure that Dispose is called on the object when the using statement is exited. A using statement can be exited either when the end of the using statement is reached or if, for example, an exception is thrown and control leaves the statement block before the end of the statement.

              The object you instantiate must implement the System.IDisposable interface.
              "

              Source: http://msdn.microsoft.com/library/de...gdirective.asp

              Therefore, its clear that:

              a) NuclearMissile object will HAVE to implement IDisposable interface - otherwise it won't compile
              b) Dispose will be called on NuclearMissile object when using {} ends, this means it will be called right after Launch was received

              Conslution? A self-detonation (non nuclear) upon launch, since it will take far longer for actual physical Launch to happen than end of using {} it means that the thing will detonate immediately.

              Since its Navy/Trident context here it means it will be launched from a sub, most certainly underwater, thus self-detonation is highly likely to destroy submarine and result in 100+ people deaths.

              Am I ready to charge DimPrawn's rates for .NET consulting yet?

              Comment


                #8
                I know a navy that still uses COBOL on ships and submarines and a space agency that uses DB2 on interplanetary flights. The old ones still keep on working with no problems, give me that old fuddy.duddy stuff any day.
                Brexit is having a wee in the middle of the room at a house party because nobody is talking to you, and then complaining about the smell.

                Comment


                  #9
                  But if ATW wrote the code, the missile wouild have difficulty searching for the target, and would instead head for an unwanted alternative. Ah, but it would be a very fast missile. Very very fast.

                  Psst: Beaten that upstart Google yet?

                  Comment


                    #10
                    Originally posted by Fungus
                    But if ATW wrote the code, the missile wouild have difficulty searching for the target, and would instead head for an unwanted alternative. Ah, but it would be a very fast missile. Very very fast.
                    My work can be generally characterised as "fit for purpose". Thus if I worked on a nuclear missile I'd focus on (in this order of priority):

                    a) ensuring that it can only be launched by 200% authorised people

                    b) not blowing it up in the wrong place (ie during launch thus killing sub and potentially contaminating open water)

                    c) accurately reaching target - with some hard safeguards to prevent launching at targets that can't be possibly valid (ie London)

                    How fast the missile will run is out of programmers hands - its the job for missile engineers and it will be pretty much fixed constant.

                    Comment

                    Working...
                    X