Showing posts with label Funny. Show all posts
Showing posts with label Funny. Show all posts

Saturday, June 6, 2015

Humorous Software Licence Agreement #2


See also: Humorous Software Licence Agreement #1
Please note: I do not know what kind of legal protection against liability this licence will actually afford you. Please confer with an actual lawyer before attempting to use this in any legal capacity.




Software Usage License Agreement
Copyright (C) [copyright holders]
All rights reserved.

 * WITH NO GUARANTEES OF ANY KIND
THIS SOFTWARE IS PROVIDED:
 * AS-IS
 * NOT AS IT IS'NT
 * WITH NO WARRANTY OF ANY KIND
 * WITH NO PROMISES OF ANY KIND
 * WITH NO ASSURANCES OF ANY KIND
 * WITH A YAHOO TOOLBAR ATTACHED IF YOU DOWNLOADED IT FROM CNET

THIS INCLUDES, BUT IS NOT LIMITED TO:
 * WARRANTIES OF MERCHANTABILITY
 * GUARANTEE OF FITNESS FOR A PARTICULAR PURPOSE
 * ASSURANCES THAT IT WORKS, OR EVER WORKED, OR MIGHT WORK ANYTIME IN THE FUTURE
 * ASSURANCES THAT IT WILL NOT CAUSE YOU PSYCHOLOGICAL TRAUMA OR MENTAL HARM
 * PROMISES THAT IT WILL NOT CAUSE YOU TOTAL FINANCIAL RUIN
 * PROMISES THAT IT WILL NOT CAUSE YOU BODILY HARM OR PERSONAL INJURY
 * PROMISES THAT IT WILL NOT CAUSE YOUR SERVERS TO IGNITE IN FLAME
 * ASSURANCES THAT IT WILL NOT END THE HUMAN RACE
 * ASSURANCES THAT IT WILL NOT ANNIHILATE SPACE-TIME, AND THEREFORE EXISTENCE ITSELF
 * ASSURANCES THAT THESE WORDS ACTUALLY EXIST AND ARE NOT, IN FACT, AN ILLUSION
 
THEREFORE ANY PARTY THAT CHOOSES TO USE THIS SOFTWARE DOES SO AT THEIR OWN RISK AND
THEREFORE ASSUMES ANY RISK THAT IS DIRECTLY RELATED TO, CAUSED BY, OR ASSOCIATED WITH THE POSSESSION, READING, UNDERSTANDING, PRINTING, BURNING, USE OF, OR INTERACTION WITH THIS SOFTWARE
THEREFORE IT IS OF THE OPINION OF THE COPYRIGHT HOLDER/AUTHOR THAT THE SOFTWARE SHOULD NOT USED, BY ANYONE, FOR ANY PURPOSE, BUT DO NOT FORBID IT, AND FURTHERMORE, GRANT IT

It is hereby granted, to you, the rights to view it, use it, copy it, modify it, publish it, distribute it, sub-license it, or sell it for any purpose you see fit, subject to the following conditions:
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the software.

UNDER NO CIRCUMSTANCES AND IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT, COURSE OF BUSINESS, LATE-NIGHT DRUNKEN PRANKS, OR ACT OF,
OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

Want to read more? I wrote a Humorous Software Licence Agreement #1 post with a similar-themed software licence.

Saturday, April 18, 2015

Hindenbugs, Heisenbugs and other types of software bugs




Different Types of Software Bugs


    Sorry, I haven't gotten around to creating a new post in close to a month (yikes!). I have just been super busy at work and have been trying to complete about 3 out of several not-quite-finished personal projects that I will be releasing on GitHub and blogging about

Heisenbug--
    1) A software bug that disappears or alters its behavior by the action of attempting to debug it.
    Possible sources: The effect of debuggers on the run-time code or JIT can be one source. Another might arise because of process scheduling or threading and race conditions. Or both, as stepping through the code with a debugger will affect the timing of threads.
    Derivation: Werner Heisenberg and his Uncertainty Principle.


Mandelbug--
    1) A bug whose causes are so complex it defies repair, or makes its behavior appear chaotic or even non-deterministic. Other symptoms include core dumps that, when viewed in an editor, form complex but repeating patterns or designs of characters and symbols.
    Possible sources: Operating system environment or configuration, the presence or absence of file system objects, time or scheduling-dependent code. Also, a very complicated state machine esp. one with more than one variable that hold state information and where transitions may not exists for every possible permutation of one state to another.
    Derivation: Benoît Mandelbrot and his research in fractal geometry.


Schrödinbug--
    1) A bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.
    Possible sources: A combination of naughty coding practices such as coding by coincidence and something else that allows for unexpected behavior such as a the effect of custom configurations or compiler optimizations, code obfuscation, or the JIT or on code. Also, a dependency on some arcane piece of technology that no one truly understands or employment of a black-box system or library, or some ancient, dinosaur system with a highly specific configuration that is so fragile that no-one dares update it because said updates could likely or is known to break functionality and where even a reboot is considered hairy.
    Derivation: Named for Erwin Schrödinger and his thought experiment.


Bohrbug--
    1) In contrast to the Heisenbug, the Bohrbug, is a "good, solid bug", easy to hunt down, or easily predicted from the description, esp. when a bug is the result of a classical programming mistake, or 'a rookie move'.
    Possible sources: Failing to initialize a variable or class to anything other than null, failure to RTFM, misuse of pointers or general abuse of memory, not coding defensively, coding by coincidence or not truly understanding how (or why) your code works.
    Derivation: Named after the physicist Niels Bohr and his rather simple atomic model.


Hindenbug--
    1) A bug with catastrophic consequences, esp. one that actually causes the server to burst into bright, hot flames.
    Possible sources: Code that dynamically builds and executes SQL scripts, esp. scripts that make use of the DELETE FROM command, code that is self modifying or replicates, or code that controls large machines or a physical system such as pumps, belts, cooling systems, aggregate pulverizer, fans, or any sort of thing with large, rotating blades. Also, any software that controls, monitors, tests, or is in any way whatsoever, wired up to a tactical nuclear defense system. In fact, lets just include anything with 'nuclear' or 'pulverize' in the name.
    Derivation: Refers to the Hindenburg disaster. The Hindenburg Blimp was, in turn, named after Paul von Hindenburg, the then-president of Germany from 1925->1934.



    Kishor S. Trivedi has a great talk/slideshow about Software Faults, Failures and Their Mitigations. He posits that it is not realistic to write software that is 100% bug free, or have 100% up-time. He displays the downtime in terms of minutes per year (MPY?) of several reliable corporations to support his claims, and it is true that as far as I am aware,there have not been any software ever written that did not have some downtime, even NASA.
    However, Trivedi shares a quote by one E. W. Dijkstra: "Testing shows the presence, not the absence, of bugs". Aww, logic. Now that's something I can get behind. Indeed; It is impossible to provably show that any software (of sufficient complexity) is absolutely error-free.
    Following this, he suggests we should not strive for the virtually impossible task building fault-free software, but rather aim to build instead fault-tolerant software.



Software Faults -> Software Errors -> Software Failures

Software Faults lead to Software Errors that lead to Software Failures.

Trivedi defines faults, errors and failures:
      -Software Failure occurs when the delivered service no longer complies with the desired output.
      -Software Error is that part of the system state which is liable to lead to subsequent failure.
      -Software Fault is adjudged or hypothesized cause of an error.Faults are the cause of errors that may lead to failures



    So, how does one test their tactical nuclear defense system code? VERY carefully, and it probably wouldn't hurt to comment out the Launch() method as well.

Wednesday, December 10, 2014

Humorous and unhelpful Exception Class hierarchy



This post covers some of the lesser-known exception classes that exist. It is okay if you have never heard of these exception classes before... in fact, if you haven’t, that is probably a very, very good thing...





WTFException
The exception that is thrown when the code has encountered a genuine ‘WTF’ moment. This is usually only reserved for areas of the code that should never be reached, or indicates a state/condition that is either invalid, unexpected, or simply illogical. It can also be thrown to indicate that the developer has no idea why something is not working, and is at his wits end, or optionally at the end of some code that the developer was absolutely certain would never work.

See Also: CodeUnreachableException, ThisShouldNeverHappenException, and SpaceTimeException.


class WTFException : Exception
{
    public WTFException()
        : base() { }
    
    public WTFException(string message, params object[] messageParams)
        : base(string.Format(message, messageParams)) { }
    
    public WTFException(string message, Exception innerException)
        : base(message, innerException) { }
}




SpaceTimeException
The exception that is thrown when there is a serious problem with the fabric of space/time. Typically, the error message property will be empty or missing, as the actual even that caused this exception to be thrown has not yet occurred in the same timeline that your applications exists in. No attempt should be made to retrieve the InnerException object, as a black hole could result that would be almost certain to annihilate your code base, or possibly all of humanity. The only thing we can be certain of, however, is that your boss will be very cross with you and you will most likely get fired.


class SpaceTimeException : Exception
{
    public SpaceTimeException()
        : base() { }

    public SpaceTimeException(string message, Exception innerException)
        : base(message, innerException) { }
}




ArgumentInvalidException
You argument is invalid. You are wrong, your reasoning makes no logical sense, and you probably failed debate class in school. Even if your argument has some semblance of being based in logic or reality, you cannot argue with the compiler, there is no point, so quit trying.


class ArgumentInvalidException : Exception
{
    public ArgumentInvalidException()
        : base() { }

    public ArgumentInvalidException(string message, Exception innerException)
        : base(message, innerException) { }   
}





CodeUnreachableExeception

This exception is thrown when the assembly executes a block of code that is unreachable. This exception should never get thrown, and is, by definition, impossible. Catching this exception is like catching a leprechaun, and should it ever happen, the CLR will ask you for three wishes.


class CodeUnreachableExeception : Exception
{
    public CodeUnreachableExeception()
        : base() { }

    public CodeUnreachableExeception(string message, Exception innerException)
        : base(message, innerException) { }
}




OutOfCoffeeExecption
This exception is thrown when a developer has ran out of coffee or sufficient motivation to complete the function or feature. The exception is thrown at the exact line that the developer got up for a coffee break and never returned.


class OutOfCoffeeExecption : Exception
{
    public OutOfCoffeeExecption()
        : base() { }

    public OutOfCoffeeExecption(string message, Exception innerException)
        : base(message, innerException) { }
}




UnknownException
This exception is not thrown because a parameter or method specified is unknown, but rather that the implementing developer did not have the knowledge to implement the feature or method you just called, and threw this exception instead as quick and dirty solution.


class UnknownException : Exception
{
    public UnknownException()
        : base() { }

    public UnknownException(string message, Exception innerException)
        : base(message, innerException) { }
}




ThisIsNotTheExceptionYouAreLookingForException
What? Oh this? Oh, this was not meant for you. Now move along...


class ThisIsNotTheExceptionYouAreLookingForException : Exception
{
    /* Move along... */
}



Wednesday, July 31, 2013

Humorous Software License Agreement

Software Usage License Agreement
Copyright (C) [year] [copyright holders]

This software, it's code, or any fan fiction resulting from its enormous popularity, is provided "AS IS". That means that the software included with with this license is provided without warranty, regardless of any previous verbal contract you may have swindled out of the author with your fast words on the phone...
To the maximum extent permitted by law, the author of this software disclaims all liability for any damages, lost profits, lost socks, lost puppies, hair loss, or architectural fanaticism and cults that may occur as a result of using this software. Under no circumstances shall the author of this software, nor his pet cat 'Mr.Whiskers', be held legally, financially or morally liable for any claim of damages or liability resulting from the use of, abstinence from, ritualistic worshiping of, or illegal pirating of this software. This includes, but is not limited to, lost profits, stolen data, bankruptcy, autonomous homicidal cyborgs or man-eating miniature pony attacks.
Use at your own risk! This software comes with no guarantees of fitness for any purpose, so do not use it for the back-end of your fortune 500 business without at least hiring me first.

Sunday, July 21, 2013

C# developer humor - Chuck Norris.

These jokes were inspired by this link. I have modified them a bit to apply to the C or C# language.



  • Chuck Nor­ris can make a class that is both abstract and constant.
  • Chuck Nor­ris seri­al­izes objects straight into human skulls.
  • Chuck Nor­ris doesn’t deploy web appli­ca­tions, he round­house kicks them into the server.
  • Chuck Nor­ris always uses his own design pat­terns, and his favorite is the Round­house Kick.
  • Chuck Nor­ris always programs using unsafe code.
  • Chuck Nor­ris only enumerates roundhouse kicks to the face.
  • Chuck Nor­ris demon­strated the mean­ing of float.PositiveInfinity by count­ing to it, twice.
  • A lock statement doesn’t pro­tect against Chuck Nor­ris, if he wants the object, he takes it.
  • Chuck Nor­ris doesn’t use VisualStudio, he codes .NET by using a hex edi­tor on the MSIL.
  • When some­one attempts to use one of Chuck Nor­ris’ dep­re­cated meth­ods, they auto­mat­i­cally get a round­house kick to the face at com­pile time.
  • Chuck Nor­ris never has a bug in his code, without exception!
  • Chuck Nor­ris doesn’t write code. He stares at a com­puter screen until he gets the progam he wants.
  • Code runs faster when Chuck Nor­ris watches it.
  • Chuck Nor­ris meth­ods don't catch excep­tions because no one has the guts to throw any at them.
  • Chuck Nor­ris will cast a value to any type, just by star­ing at it.
  • If you catch { } a Chuc­kNor­ri­sEx­cep­tion, you’ll prob­a­bly die.
  • Chuck Norris’s code can round­house kick all other classes' privates.
  • C#'s vis­i­bil­ity lev­els are pub­lic, private, pro­tected, and “pro­tected by Chuck Nor­ris”. Don’t try to access a field with this last modifier!
  • Chuck Nor­ris can divide by 0!
  • The garbage col­lec­tor only runs on Chuck Nor­ris code to col­lect the bodies.
  • Chuck Nor­ris can exe­cute 64bit length instruc­tions in a 32bit CPU.
  • To Chuck Nor­ris, all other classes are IDisposable.
  • Chuck Nor­ris can do mul­ti­ple inher­i­tance in C#.
  • MSBuild never throws excep­tions to Chuck Nor­ris, not any­more. 753 killed Microsoft engi­neers is enough.
  • Chuck Nor­ris doesn’t need unit tests, because his code always work. ALWAYS.
  • Chuck Nor­ris has been coding in gener­ics since 1.1.
  • Chuck Nor­ris’ classes can’t be decom­piled... don’t bother trying.

Here are some originals:
  • If you try derive from a Chuck Norris Interface, you'll only get an IRoundhouseKick in-the-face.
  • Chuck Nor­ris can serialize a dictionary to XML without implementing IXMLSerializable.
  • Chuck Norris can decompile your assembly by only reading the MSIL.