Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 565149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:50:29+00:00 2026-05-13T12:50:29+00:00

Contrary to the popular code-golf challenges which demonstrate the genius of many regulars here,

  • 0

Contrary to the popular code-golf challenges which demonstrate the genius of many regulars here, I’d like to see that genius illustrated in an antithetical fashion.

The challenge is to successfully perform “Hello World” with special focus on over-complicating matters. Not verbosity, not obscurity, just pure sloppiness/over-complication.

Think of The Daily WTF as inspiration.

function mb2($o){return (int)($o*2);}
$alphabet = str_split("abcdefghijklmnopqrstuvwxyz");
$alphabet[] = " ";
$output = "";
for ($i = 0; $i <= 10; $i++)
  switch (mb2($i*.5)) {
    case  0: $output = $output . $alphabet[07]; break;
    case  1: $output = $output . $alphabet[04]; break;
    case  2: $output = $output . $alphabet[11]; break;
    case  3: $output = $output . $alphabet[11]; break;
    case  4: $output = $output . $alphabet[14]; break;
    case  5: $output = $output . array_pop($alphabet); break;
    case  6: $output = $output . $alphabet[22]; break;
    case  7: $output = $output . $alphabet[14]; break;
    case  8: $output = $output . $alphabet[17]; break;
    case  9: $output = $output . $alphabet[11]; break;
    case 10: $output = $output . $alphabet[03]; break;
  }

print $output; // hello world
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:50:29+00:00Added an answer on May 13, 2026 at 12:50 pm

    You asked for it. Python:

    # Copyright (c) 1999 - 2010
    # Large Company, Inc. ("THE COMPANY")
    # 
    # Redistribution and use in source and binary forms, with or without 
    # modification, are permitted provided that the following conditions are 
    # met: 
    # 
    # 1. Redistributions of source code must retain the above copyright 
    #    notice, this list of conditions and the following disclaimer.
    # 2. Redistributions in binary form must reproduce the above copyright 
    #    notice, this list of conditions and the following disclaimer in the 
    #    documentation and/or other materials provided with the distribution. 
    # 
    # THIS SOFTWARE IS PROVIDED BY THE COMPANY AND CONTRIBUTORS "AS IS" AND 
    # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
    # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COMPANY OR CONTRIBUTORS BE 
    # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
    # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
    # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
    # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
    # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
    # THE POSSIBILITY OF SUCH DAMAGE. 
    
    """This program outputs an enthusiastic "Hello World" in english.
    """
    
    # FIXME: Where are the unit tests for this? QA called and says we
    # can't ship this without tests. Also, while writing documentation
    # may be boring, you can't expect everyone to understand all this!
    # Go ahead and write some docstrings! -- O.D. 2004/7/22
    
    class Expression(object):
        def get_value(self, **kwargs):
            """get_value returns the value of this Expression.
    
            Any keyword arguments that the method receives should
            be passed on to the get_value methods of possibly called
            subexpressions, even if this method does not handle
            them.
    
            This method must be reimplemented by the subclass."""
    
            raise NotImplementedError
    
    class Word(Expression):
        def __init__(self, value):
            self.value = value
    
        def get_value(self, **kwargs):
            return self.value
    
    class Sentence(Expression):
        def __init__(self, expressions, punctuation = "."):
            self.expressions = list(expressions)
            self.punctuation = punctuation
    
        def get_value(self, separator = " ", **kwargs):
             mainpart = separator.join(
                        subexpression.get_value(separator = separator, **kwargs)
                        for subexpression in self.expressions
                        )
    
             if len(mainpart) > 0:
                 capitalized = mainpart[0].upper() + mainpart[1:]
             else:
                 capitalized = ""
    
             # FIXME: We're hardcoding "" here. Should we be prepared for
             # languages that require a separator before the punctuation mark?
             # NB: A workaround for now would be adding an empty word
             return "".join((capitalized, self.punctuation))
    
    class Hello(Word):
    
        # FIXME: We should be prepared for languages where "hello" is
        # represented by more than one word.
        hello_by_language = {"en": "hello", "de": "hallo"}
    
        def __init__(self, language = "en"):
            super(Hello, self).__init__(self.hello_by_language[language])
    
    class World(Word):
    
        # FIXME: We should be prepared for languages where "world" is
        # represented by more than one word.
        world_by_language = {"en": "world", "de": "Welt"}
    
        def __init__(self, language = "en"):
            super(World, self).__init__(self.world_by_language[language])
    
    class HelloWorld(Sentence):
        def __init__(self, punctuation, language):
            hello = Hello(language)
            world = World(language)
            super(HelloWorld, self).__init__([hello, world], punctuation)
    
    class EnthusiasticHelloWorld(HelloWorld):
        def __init__(self, language):
    
            # FIXME: We should be prepared for languages where enthusiasm
            # is not expressed with an exclamation mark.
            super(EnthusiasticHelloWorld, self).__init__("!", language)
    
    def main():
        english_enthusiastic_hello_world = EnthusiasticHelloWorld("en")
        print english_enthusiastic_hello_world.get_value()
    
    if __name__ == "__main__":
        main()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.