• Nakilon (unregistered)

    Forgot source ..) http://pastebin.com/ZMSsu1wD

  • partyharder (unregistered)

    So, it doesn't work if you make one move and then double click the '(double click me)'

    just sayin'...

  • (cs) in reply to eVil
    eVil:
    schmitter:
    By law, every installer should include a game.

    Most of them do. Its called "Guess how long it takes for the bar to go from empty to full".

    This game becomes similar to the halting problem when installing anything enterprisey.

    It is also quite unrelated to the game of "Guess how long it takes for the software to install". I've seen installers that finished with the bar less than half full, or filled it in a few minutes and then took forever while the full bar was hovering there.

    Some coders will spot this problem and resort to the "99%" trick, which works like this:

    > 0%
    0:05 ===================> 50%
    0:10 ==============================> 75%
    0:15 ====================================> 87%
    0:20 =======================================> 93%
    0:25 =========================================> 96%
    0:30 ===========================================> 98%
    0:35 ============================================> 99%
    
    [hours later]
    
    7:13:23 ============================================> 99%
    
  • Robert (unregistered)

    Here my brute force solution. It always finds a solution (if there is one otherwise an exception is raised) on any given 5x5 field (any number of moves). Solution is probably not optimal. Performance is not optimal. But doing it with Linq was fun.

    public class LinqSolver
    {
        private static int[] _pows = Enumerable.Range(1, 25).
            Select(i => (int)Math.Pow(2, i)).ToArray();
    
        public static IEnumerable<int> Solve(bool[] input)
        {
            //find any solution
            return Enumerable.Range(0, (int)Math.Pow(2, 26)).
                Select(n => Enumerable.Range(0, 25).
                    Select((m, i) => (n & _pows[i]) == _pows[i] ? i : -1).
                    Where(i => i >= 0).ToArray()).
                    FirstOrDefault(c => c.
                        Aggregate(input, (a, r) => a.
                            Select((b, i) => (i == r || 
                                (i == r - 1 && r % 5 > 0) || 
                                (i == r + 1 && r % 5 < 4) || 
                                i == r - 5 || i == r + 5) ? !b : b).ToArray()).
                    Count(f => !f) == 25
            );
        }
    }
    
  • David (unregistered)

    One of the greatest features of Lycoris Desktop Linux was that the installer would let you play Solitaire while you waited. That was about five or six years ago now, and I've never seen another operating system or Linux distribution do that since.

  • Rob (unregistered)

    As I am a mathematician, the method that's most fun for me is the efficient one based on linear algebra.

    Algorithm ripped off from this paper, which I found on wikipedia: http://www.ripon.edu/academics/macs/summation/2010/articles/M.%20Madsen%20-%20Lights%20Out.pdf . Variable names chosen to match the paper.

    Written in Sage (an extension of Python for mathematicians). Could be modified to pure python easily by adding the appropriate matrix routines.

    Confirmed to work in over 1 test cases!

    http://pastebin.com/LjHJk2r7

  • (cs) in reply to eVil

    I always enjoy the jokes that are included in the EULA.

  • (cs) in reply to Ken B.
    Ken B.:
    Is it me, or does the ToggleLight() function not toggle the button you clicked?
    It also doesn't toggle the ones below and to the left of it.

    "!=" != "=!"

    CAPTCHA: Oh wait, I don't have a CAPTCHA because I'm logged in.

  • patents.. (unregistered)

    The reason why all installers don't have minigames in them is because of patents.

    Yes, some bastard went and patented it.

    Thus, no minigames for you.

  • (cs)

    TRWTF is the short attention span of contemporary users so they have to be given some dickwit "game" to play while waiting. Fer cry sake go and do something useful with your time.

    Pff, complaining about time being wasted and posting comments on trwtf. Soz.

  • Rob (unregistered) in reply to Rob
    Rob:
    Confirmed to work in over 1 test cases!

    http://pastebin.com/LjHJk2r7

    Simplified version that works with any sized array and is guaranteed to return the smallest possible solution.

    http://pastebin.com/6Mp5T12X

  • Peter Gordon (unregistered) in reply to mcv
    mcv:
    More importantly, so many games nowadays take ages to start up. I wouldn't mind all the loading screens and diversionary movies to be replaced with cool little logical games like these.

    Oh.. i'm suddenly reminded of Invade-a-Load on the C64. "Just when you thought it was safe to make a cup of tea.. its... INVADE-A-LOAD".

    It had a great Rob Hubbard soundtrack as well.

  • xunisys (unregistered) in reply to boog
    boog:
    Mitochondria:
    Has zuensis changed his name to zuensys to fool akismet?
    Hanlon's razor; more likely he forgot how to spell it.
    Both wrong, I changed the spelling after boog bragged that he could block my posts with a greasemonkey script, thus revealing that he could ignore me and how to circumvent his ignoring me. Since the script probably wasn't written to detect sexual perversion, I'm guessing it would filter out by name.
  • REAL Lawyer (unregistered)

    To: Anonymous Morons on TDWTF Forumns From: REAL Lawyer Subject: Patent Notions Date: 14 Jul 2011

    To all the MORONS who insist that installers cannot have games on them:

    No such patent exists, nor is it legally feasible to apply for one.

    Please stop pounding the drum of idiocy.

  • boog (unregistered) in reply to xunisys
    xunisys:
    boog:
    Mitochondria:
    Has zuensis changed his name to zuensys to fool akismet?
    Hanlon's razor; more likely he forgot how to spell it.
    Both wrong, I changed the spelling after boog bragged that he could block my posts with a greasemonkey script, thus revealing that he could ignore me and how to circumvent his ignoring me. Since the script probably wasn't written to detect sexual perversion, I'm guessing it would filter out by name.
    Yeah, boog and frits are real tools.

    What's really nice is my fake Nagesh post got deleted, but nobody bothers deleting you're possibly-illegal posts.

  • LOL (unregistered)

    Sweet!!!!! Alex brags of patent infringement on one of the most-read tech blogs in the world!!!

  • Peter Gordon (unregistered) in reply to REAL Lawyer

    @REAL Lawyer

    This is true, but interestingly, Namco have a patent on offering a game to play while a main game loads from optical media.

    I'm guessing the "optical media" part is due to prior art for other media, such as INVADE-A-LOAD. Seems stupid to me that they'd get a patent at all, since the media source is kind of irrelevent.

    Note that all the "facts" from this are from the Wikipedia Invade-A-Load page, and i'm too lazy to do any research to see if its actually true.

  • eVil (unregistered) in reply to Mason Wheeler
    Mason Wheeler:
    Jay:
    Mason Wheeler:
    eVil:
    schmitter:
    By law, every installer should include a game.

    Most of them do. Its called "Guess how long it takes for the bar to go from empty to full".

    This game becomes similar to the halting problem when installing anything enterprisey.

    Argh! I'm so sick of people invoking the Halting Problem when talking about progress bars. The Halting Problem only applies to Turing-complete systems that are capable of getting into an infinite loop. An installer, or anything else that you would (reasonably) want to use a progress bar for, is by definition a linear task that always halts, either by completing, being canceled, or aborting on an error. Invoking the Halting Problem here is just technobabble, usually used to try to hand-wave the fact that whoever wrote the progress code is incompetent.

    Please take a valium and call me after you've Googled the word "joke".

    You may claim this one's a joke. Maybe it was even intended as one. But I've seen way too many times where people say--completely serious--that you can't create an accurate progress bar because of the Halting Problem.

    Just to be clear, it was intented as a joke.

  • boog (unregistered) in reply to LOL
    LOL:
    snip...one of the most-read tech blogs in the world!!!
    That's incredibly unlikely.
  • xunisys (unregistered) in reply to REAL Lawyer
    PEEL Lawyer:
    To: Anonymous Mormons on TDWTF Forums From: REAL Foyer Subject: Patient Lotions Date: 15 Jul 2011

    To all the MORMONS who insist that Istanbul whores cannot have germs on them:

    No such license exists, nor is it legally feasible to apply love cream to one.

    Please stop pounding the bum of ecstasy.

  • Akers (unregistered) in reply to eVil
    eVil:
    Mason Wheeler:
    Jay:
    Mason Wheeler:
    eVil:
    schmitter:
    By law, every installer should include a game.

    Most of them do. Its called "Guess how long it takes for the bar to go from empty to full".

    This game becomes similar to the halting problem when installing anything enterprisey.

    Argh! I'm so sick of people invoking the Halting Problem when talking about progress bars. The Halting Problem only applies to Turing-complete systems that are capable of getting into an infinite loop. An installer, or anything else that you would (reasonably) want to use a progress bar for, is by definition a linear task that always halts, either by completing, being canceled, or aborting on an error. Invoking the Halting Problem here is just technobabble, usually used to try to hand-wave the fact that whoever wrote the progress code is incompetent.

    Please take a valium and call me after you've Googled the word "joke".

    You may claim this one's a joke. Maybe it was even intended as one. But I've seen way too many times where people say--completely serious--that you can't create an accurate progress bar because of the Halting Problem.

    Just to be clear, you are a huge jackass.

    Fixed

  • xunisys (unregistered) in reply to boog
    nice piece of boogy:
    Yeah, booty and flits are real cool.

    What's really nice is my self-shagging-pole got confiscated, but nobody bothers deleting you're incredibly-arousing personal anecdotes.

  • :( (unregistered)

    Welcome to The Daily Where's the Funny?

  • (cs) in reply to Customer Support
    Customer Support:
    Captcha: Genitus - A disease my customers defiantly don't have
    You're customers are defiant about not having genitus?
  • :) (unregistered) in reply to :(
    :(:
    Welcome to The Daily Where's the Funny?
    Welcome to The Daily Queer my Fanny!
  • No Windoze! (unregistered) in reply to SG_01
    SG_01:
    Visual Studio 2008 Professional or better.

    Emacs, then?

  • (cs) in reply to meh
    A 4x4 board with exactly one square "on" is never solvable.
    My solution program on random square 4x4 says it's solvable only in 6% cases.

    1 in 16, to be exact.

    By symmetry, wouldn't the number of solvable cases be a multiple of 4?

  • meh (unregistered) in reply to BentFranklin
    BentFranklin:
    By symmetry, wouldn't the number of solvable cases be a multiple of 4?
    There's also a rotational symmetry, so 8.
  • Patrick (unregistered) in reply to Maurits
    Maurits:
    Patrick:
    A cleaner way to toggle a bool, especially an array with arithmetic in its indexer, is
    LIGHT_ARY[index + GRID_SIZE] ^= true

    Is ^ defined for bools?

    Xor is a binary operator, that most certainly includes bool.
  • (cs) in reply to meh
    meh:
    BentFranklin:
    By symmetry, wouldn't the number of solvable cases be a multiple of 4?
    There's also a rotational symmetry, so 8.

    Only corners --> 4 Only centers --> 4 Only edges --> 8

    Plus various combinations.

  • :) (unregistered) in reply to BentFranklin
    Gent Bent:

    Only homos 8=====D~~~ 4-some Only bi's 8=====D~~~ 4-some Only trannys 8=====D~~~ 8-some

    Plus various combinations.

  • minime (unregistered) in reply to Mason Wheeler

    Dear aspi. I see that you have never written an enterprisy installer yourself. It often happens that check for if something is in a certain condition, then do this, later check back. This can easily get you into an endless loop when you are not careful and change things forth and back, because you have a queue of things to be done and one item adds to the queue, and another one adds that one. Or you could be waiting for some file operation that is blocked indefinetly by the OS for whatever reason. While I wonder if you suffer from facilisis, I have to admit that I am so sick of people that never think fully through some problem and just quickly think they can rant over someone, just because something never happened or occured to them.

  • (cs) in reply to boog
    boog (unregistered):
    xunisys:
    Both wrong, I changed the spelling after boog bragged that he could block my posts with a greasemonkey script, thus revealing that he could ignore me and how to circumvent his ignoring me. Since the script probably wasn't written to detect sexual perversion, I'm guessing it would filter out by name.
    Yeah, boog and frits are real tools.
    Yes, real tools, as opposed to cheap replicas like yourself.

    As for xunisys' comment above; I'm sorry, but it seems my filters still managed to block your post*. Perhaps my methods were more creative than your keen intellect could surmise?

    • I only saw your comment because fake boog quoted it; I've already updated my greasemonkey scripts to handle this circumvention. Ahh, sweet silence!
  • GameDevSam (unregistered)

    The game I used to play with installers was putting my mouse inside the unfilled portion of the box while the blue bar crept ever toward it and pretend my cursor was running from a flood.

    I guess that's why I became a game programmer (although I work sixty hour weeks, not eighty)

  • boogerboy (unregistered) in reply to boog
    boog:
    boog (unregistered):
    xunisys:
    Both wrong, I changed the spelling after boog bragged that he could block my posts with a greasemonkey script, thus revealing that he could ignore me and how to circumvent his ignoring me. Since the script probably wasn't written to detect sexual perversion, I'm guessing it would filter out by name.
    Yeah, boog and frits are real tools.
    Yes, real tools, as opposed to cheap replicas like yourself.

    As for xunisys' comment above; I'm sorry, but it seems my filters still managed to block your post*. Perhaps my methods were more creative than your keen intellect could surmise?

    • I only saw your comment because fake boog quoted it; I've already updated my greasemonkey scripts to handle this circumvention. Ahh, sweet release!

    I love how you claim to not be able to hear me despite there being no way to prove it.

    Anyway, is this some sort of challenge?

  • (cs) in reply to REAL Lawyer
    REAL Lawyer:
    No such patent exists
    Then I guess that this must be merely a figment of someone's deranged imagination, yes?
  • Rob (unregistered) in reply to Nakilon
    Nakilon:
    My solution program on random square 4x4 says it's solvable only in 6% cases. 5x5 - 25% 2x2, 3x3, 6x6, 7x7, 8x8 seem to be solvable always. If you have the same results, maybe we solved it right or made the same mistake ,.)

    For n=4, the solvable boards correspond to a 12 dimensional (12 = the rank of the matrix A from the article I posted) subspace of a 16 (=4^2) dimensional vector space over Z/2Z. The subspace has 2^12 elements, and the full space has 2^16, so 2^12/2^16 = 6.25% will be solvable.

    For n=5, the rank is 23, and the proportion is 2^23/2^25 = 25%

    For 6,7,8, the matrix has full rank, so all boards are solvable

    For 9, the matrix has rank 73, so less than 1% will be solvable

    Full rank: 1, 2, 3, 6, 7, 8, 10, 12, 13, 14, 15, 18, 20 Not full rank: 4, 5, 9, 11, 16, 17, 19

    If there's a pattern there, I don't see it right off.

  • Rob (unregistered) in reply to Rob

    Always solvable: 1, 2, 3, 6, 7, 8, 10, 12, 13, 15, 18, 20, 21, 22, 25, 26, 27, 28, 31, 36, 37, 38, 40, 42, 43, 45, 46, 48, 51, 52, 55, 56, 57, 58, 60

    Not always solvable: 4, 5, 9, 11, 14, 16, 17, 19, 23, 24, 29, 30, 32, 33, 34, 35, 39, 41, 44, 47, 49, 50, 53, 54, 59

    (14 was on the wrong list in my last post)

  • style police (unregistered) in reply to eVil

    I like it how you save space by abbreviating words from being 10 characters long to 8 characters long.

    Not only do you save 2 bytes of storage per variable name, you also annoy the hell out of anyone reading your code. Do tell me how LIGHTS_ARY is better LIGHTS_ARRAY or even LIGHTS - as it is obvious from the index accessor that it is indeed an array. You save negligible amount of screen space and ruin readability as a tradeoff..

    Style can be a WTF too.

  • eVil (unregistered) in reply to DaveK

    That patent is rather unfortunate much like most software patents.

    I have a feeling it would be unenforcable anyway, as you can demonstrate that products described by that patent were already being sold by other companies years before the patent was published, therefore prior-art had definately and provably been established.

    In quite a few countries, certainly Britain, such a patent would be unenforcable, as software can only be patented if it provides a non-obvious technical solution to a technical problem... people being bored whilst waiting for a game to load is not a technical problem, therefore by solving that problem you haven't come up with a patentable invention. The US may take a different view (in fact i'm almost certain that it does).

    My view, is that this "invention" is basically no different from including a piece of paper with step-by-step instructions on how to twiddle your thumbs, which would definately not be patentable (although the instructions would be covered by copyright).

  • Jon (unregistered) in reply to Joe

    Ahh, I see you're familiar with Websphere...

  • Jon (unregistered) in reply to DaveK
    DaveK:
    REAL Lawyer:
    No such patent exists
    Then I guess that this must be merely a figment of someone's deranged imagination, yes?
    Since it includes utter shit like this:

    "execution means for running said main game using said program code means loaded by said loading means and executing predetermined processing of reading and running of said game in accordance with said auxiliary program code means, wherein said execution means first performs said predetermined processing in accordance with said auxiliary program code means while displaying said game image on said monitor, and said loading means loads said main-game program code means for said main game in parallel with said predetermined processing, and after said predetermined processing in accordance with said auxiliary program code means has ended, said execution means then runs said main game while displaying a main-game image on said monitor, using said main-game program code means for said main game that was loaded by said loading means."

    Then yes, I'd say it is the product of a deranged mind.

  • (cs) in reply to The Enterpriser
    The Enterpriser:
    C-Octothorpe:
    trtrwtf:
    Steeldragon:
    C-Octothorpe:
    schmitter:
    By law, every installer should include a game.
    My favourite installer game is "Did I crash or am I still installing". I find that SQL Server 2008 and VS2005 installers are the best at this game.

    another such one is the bootable usb installer for ubuntu. it stalls multiple times for up to an hour, and you can't quit out of it.

    My Windows machine (work machine, they make me use it...) is sort of like this, except with starting up, not with installing anything. The worst is that after it starts up, it still decides to hang periodically when doing something complex, like, say, loading a web page or something.

    One thing I noticed with Ubuntu was that when it finally loaded, it was done; that's it, you can use it... Windows fucking lies to you. It gives you control (well, the cursor works, right) to do whatever, but it's still loading crap in the background for another minute (or 10 depending on machine, setup, etc.). Just let me know when you're really done. Don't give me a really slow and unresponsive UI and pretend to be done when you're not...

    /rant

    Yet at the same time, if the situation was reversed you would be banging on about how great Ubuntu is how it let you get control of each item as it became available, whereas Windows treated you like a baby and only let you do things once it was ALL setup, even though some things were ready much earlier.

    QFT, This comment should be blue.

  • (cs) in reply to amischiefr
    amischiefr:
    QFT, This comment should be blue.
    You're knee-jerk reaction time is amazing... Take a second look at the comment you quoted, then at the one following that one. Here, I'll even give you a link to the response. I'm a Windows fan bashing Windows; whodathunkit?
  • (cs) in reply to amischiefr
    amischiefr:
    The Enterpriser:
    Yet at the same time, if the situation was reversed you would be banging on about how great Ubuntu is how it let you get control of each item as it became available, whereas Windows treated you like a baby and only let you do things once it was ALL setup, even though some things were ready much earlier.

    QFT, This comment should be blue.

    Because it is so relevant to the article, right?

  • (cs) in reply to eVil
    eVil:
    "Guess how long it takes for the bar to go from empty to full".

    Depends on if it's happy hour not, yes?

  • Peter Davis (unregistered) in reply to Nabhi Singh
    Nabhi Singh :
    hi all, can u plz email me the codes i am also working on a flashing light project game for my installed. i need php code as soon as possible my mail id is [email protected]

    Comic genius.

  • Tony (unregistered)

    Anyone remember 'Invaderload' on the old C64?....Some games that loaded via tape cassette, first loaded a spaceinvader minigame, which you could play, while the rest of the game loaded...

  • Design Pattern (unregistered) in reply to Tony
    Tony:
    Anyone remember 'Invaderload' on the old C64?
    Not you, obviously:
    Peter Gordon:
    Oh.. i'm suddenly reminded of Invade-a-Load on the C64. "Just when you thought it was safe to make a cup of tea.. its... INVADE-A-LOAD". It had a great Rob Hubbard soundtrack as well.

    Is Zunesys sick today? No comment about "Invade-a-Load"?

  • Nakul (unregistered) in reply to eVil

    i totally agree... especially MS products.. :D

Leave a comment on “Turning the Lights Out”

Log In or post as a guest

Replying to comment #:

« Return to Article