• Gunslinger (unregistered) in reply to Web Development Expert
    Web Development Expert:
    Brian is TRWTF. You can't solve this solution with CSS. If you do, anyone using IE6 is SOL. I have solved a similar problem with a small, ActiveX control. Works every time.

    Anyone using IE6 is already SOL, so who cares.

  • Anon (unregistered) in reply to Hater of the Right
    Hater of the Right:
    Anon:
    Hater of the Right:
    Timothy???? Matthew???? WTF is up with all the Biblical names?!?!?!?
    Is this any different from a right-winger complaining about middle-eastern or African names?
    Let me guess...your kids would be named Easter Bunny, Santa Claus, and Tooth Fairy?

    So you're offended by people being named after fictional characters? I don't understand. What about "Muhammad"?

    You hate anything that is a symbol of The Right so much that you lash out at (even subtle) instance of those symbols. I didn't even occur to me - and I'm sure most every one else - that Matthew and Timothy are specifically biblical names because there are real people with those names all over the place.

    The terrible irony is that it is being reactionary toward symbolic gestures (like not saying "Under God", or foreign names making them feel alienated) that pisses off rightists no much. And now you're doing the same thing...

    Hmmm...

    What's it like to become what you hate?

    Reactionary? Check. Exclusionary? Check. Overly-emotional about symbolic issues? Check. Judgmental? Check. Stereotyping? Check.

  • Unsupported global dynamic element (unregistered) in reply to JB
    JB:
    tclsh> puts [time {
        for {set color 100000} {$color < 101000} {incr color} {
            exec "C:\\Program Files\\ImageMagick-6.7.0-Q16\\convert.exe" blank.png -fill "#${color}" -draw "circle 10,10 1,10" ${color}.png
        }
    } 1]
    25121743 microseconds per iteration
    

    Sounds like 5 days work using ImageMagick.

    I just wrote a quick and dirty Java app that creates about 200 40x40 PNGs per second. That'd take a bit under a day.

  • (cs) in reply to Unsupported global dynamic element
    Unsupported global dynamic element:
    I just wrote a quick and dirty Java app that creates about 200 40x40 PNGs per second. That'd take a bit under a day.
    If you're doing it right, your limiting factor is how fast you can write the files to the disk. The problem isn't even how long it takes to write that much data per se, but rather how long it takes to properly commit all that metadata (filenames, directory entries, etc.)
  • (cs) in reply to Web Development Expert
    Web Development Expert:
    Brian is TRWTF. You can't solve this solution with CSS. If you do, anyone using IE6 is SOL. I have solved a similar problem with a small, ActiveX control. Works every time.

    Anyone still using IE6 was SOL way before this.

  • Not a dev (unregistered)

    It amazes me that, in 2011, some people are So. Easily. Trolled. Absolutely amazing.

    On an unrelated note, can someone generate a bmp with all 16M colors? I just, you know, wanna see what it looks like.

  • nB (unregistered) in reply to Warren
    Warren:
    I call shenanigans. Would anyone even do this for money (by hand - we'd all write a program assuming we could), let alone for free?
    I don't know about you, but we pay our interns.
  • Lacrymology (unregistered)

    no way this took him a weekend! You can pull this out with PIL in under 10 minutes!

  • amet (unregistered) in reply to dgvid
    dgvid:
    Bad move, Timmy. You could have simply generated a single JPG (a PNG would have better) with 16,777,216 evenly spaced circles, then used the width, height, and background-position properties to the display the correct one. Get to work calculating those offsets, Timmy!

    I'm sure it could be done with one image that has a transparent circle. Then that image would be displayed over a box which bg color is set using CSS.

  • Ross (unregistered)

    What's with the people suggesting you make an image the same color as the background along with a transparent circle in the middle, then setting the background color in css? That's god awful. That's like the WinForms way of faking transparency. Instead of actually showing what's behind an object, you're just trying to fake that you know what's behind an object.

  • Larry (unregistered) in reply to JB
    JB:
    tclsh> puts [time {
        for {set color 100000} {$color < 101000} {incr color} {
            exec "C:\\Program Files\\ImageMagick-6.7.0-Q16\\convert.exe" blank.png -fill "#${color}" -draw "circle 10,10 1,10" ${color}.png
        }
    } 1]
    25121743 microseconds per iteration
    
    Sounds like 5 days work using ImageMagick.
    Well, there's your problem. Try a real computer.
  • Roman (unregistered)

    TDWTF needs better captcha - too many spammy comments. :P

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    anonymous_coward:
    The intern shows great potential!

    As what, a door jam?

    ITYM "jamb."

  • Brad (unregistered) in reply to Larry
    Larry:
    JB:
    tclsh> puts [time {
        for {set color 100000} {$color < 101000} {incr color} {
            exec "C:\\Program Files\\ImageMagick-6.7.0-Q16\\convert.exe" blank.png -fill "#${color}" -draw "circle 10,10 1,10" ${color}.png
        }
    } 1]
    25121743 microseconds per iteration
    
    Sounds like 5 days work using ImageMagick.
    Well, there's your problem. Try a real computer.

    Should have used a mac.

  • (cs) in reply to TheClassic
    TheClassic:
    Are there always comments in the html?
    When Remy Porter is the story editor.
    MK:
    I've never spotted the cornify() js in the stories before - it is truly awesome but made my colleagues notice my browsing, so I'll avoid clicking around to activate them in future!
    Another Remy Porter feature.
  • Grassfire (unregistered) in reply to FragFrog
    FragFrog:
    kktkkr:
    If not (pesky management issues) you can stick with divs. Just make 1 for each pixel, and position them manually with code.
    While I'm almost entirely sure you're joking here, please, for the sake of all Timmy's out there, add warnings next time!

    I have seen scripts that actually do that. Well, eventually.

    Because everyone knows you make a big square DIV in the middle, then smaller rectangles on the sides, etc, then 1 pixel DIVs to fill in the gaps until you have a screen-ready approximation of a perfect circle.

  • oheso (unregistered)

    I'm really surprised no one has pointed out that you could make a png with a transparent circle in the center and dynamically set the background color ...

  • Anonymous Coward (unregistered)

    The real WTF is computers.

  • Anonyman (unregistered) in reply to Anonymous Coward
    Anonymous Coward:
    The real WTF is computers.
    TRWTF is turing machines.
  • Dave (unregistered) in reply to snoofle
    snoofle:
    BTW: who said the files were generated in a single thread of a single task? For all you know, Timmy may have recognized that it would take too long, so he launched multiple copies of his script on different machines to produce subsets of the total.

    Actually the reason why it took him so long was because he was designing custom FPGA-based hardware to do all the rendering for the 16M images.

  • Cheong (unregistered)

    If people want some backward compatibility with browsers that don't support SVG or don't want plugin, he could have created a GIF with solid background plus a circular transparent area in the center. Now place that in a DIV or TD element and then setting the background color will do.

  • amet (unregistered) in reply to Ross
    Ross:
    What's with the people suggesting you make an image the same color as the background along with a transparent circle in the middle, then setting the background color in css? That's god awful. That's like the WinForms way of faking transparency. Instead of actually showing what's behind an object, you're just trying to fake that you know what's behind an object.

    Perhaps that isn't ideally elegant, but it sure as hell is infinitely better then what Timmy had.

  • amet (unregistered) in reply to amet
    amet:
    Ross:
    What's with the people suggesting you make an image the same color as the background along with a transparent circle in the middle, then setting the background color in css? That's god awful. That's like the WinForms way of faking transparency. Instead of actually showing what's behind an object, you're just trying to fake that you know what's behind an object.

    Perhaps that isn't ideally elegant, but it sure as hell is infinitely better then what Timmy had.

    Pardon me - indefinitely :)

  • amet (unregistered) in reply to amet
    amet:
    amet:
    Ross:
    What's with the people suggesting you make an image the same color as the background along with a transparent circle in the middle, then setting the background color in css? That's god awful. That's like the WinForms way of faking transparency. Instead of actually showing what's behind an object, you're just trying to fake that you know what's behind an object.

    Perhaps that isn't ideally elegant, but it sure as hell is infinitely better then what Timmy had.

    Pardon me - indefinitely :)

    And - although off-topic - Alex is still an arrogant fuck.

  • Meneth (unregistered) in reply to dgvid

    Wouldn't work; the image would be too big to either be generated, transferred or loaded.

    What amazes me is how Dropbox actually managed to display a directory with 16 million files inside. My computer starts chugging with only a few thousand files per directory.

  • Marius (unregistered)

    Funny thing is...even if 16m pictures were acceptable solution, if he used JPG then the colors wouldn't be right, because JPG uses YUV 4:2:0 or 4:2:2 to save colors and YUV can't represent the whole RGB24.

  • Jesper (unregistered)

    Oh, this is going to be interesting when everybody starts to use 30-bit (3 x 10 instead of 3 x 8 bits) color. Then Timmy is going to have to generate 1,073,741,824 JPGs. He'll need a box full of harddisks just to store all his color swatches.

  • Pluis (unregistered)

    I wonder how much space all those images would take up.

  • Adam (unregistered)

    Ummm, Timmy, we need to add an alpha channel, you okay with that?

  • John Druger (unregistered) in reply to unprovoked
    unprovoked:
    Web Development Expert:
    Brian is TRWTF. You can't solve this solution with CSS. If you do, anyone using IE6 is SOL. I have solved a similar problem with a small, ActiveX control. Works every time.

    Anyone still using IE6 was SOL way before this.

    I am posting this comment on a company-provided laptop running IE6. How does your foot taste?

    CAPTCHA: damnum -- damnum, that was a fine beat-down!

  • Larry (unregistered) in reply to Larry
    Larry:
    JB:
    tclsh> puts [time {
        for {set color 100000} {$color < 101000} {incr color} {
            exec "C:\\Program Files\\ImageMagick-6.7.0-Q16\\convert.exe" blank.png -fill "#${color}" -draw "circle 10,10 1,10" ${color}.png
        }
    } 1]
    25121743 microseconds per iteration
    
    Sounds like 5 days work using ImageMagick.
    Well, there's your problem. Try a real computer.
    TRWTF is multiple people posting as "Larry."
  • Nagesh (unregistered) in reply to Scarlet Manuka
    Scarlet Manuka:
    TheClassic:
    Are there always comments in the html?
    When Remy Porter is the story editor.
    MK:
    I've never spotted the cornify() js in the stories before - it is truly awesome but made my colleagues notice my browsing, so I'll avoid clicking around to activate them in future!
    Another Remy Porter feature.
    You're name is making Nagesh burning in the sensation!
  • Remy Fiction Hater (unregistered) in reply to Meneth
    Meneth:
    Wouldn't work; the image would be too big to either be generated, transferred or loaded.

    What amazes me is how Dropbox actually managed to display a directory with 16 million files inside. My computer starts chugging with only a few thousand files per directory.

    It's already well-established that this story was embellished by the ****-master. It's pretty sad when the articles are worse than most of the troll attempts.

  • Non-A (unregistered) in reply to Anonyman
    Anonyman:
    Anonymous Coward:
    The real WTF is computers.
    TRWTF is turing machines.
    TRWTF are abacuses.
  • Fill-in-the-Blank (unregistered) in reply to Remy Fiction Hater
    Remy Fiction Hater:
    Meneth:
    Wouldn't work; the image would be too big to either be generated, transferred or loaded.

    What amazes me is how Dropbox actually managed to display a directory with 16 million files inside. My computer starts chugging with only a few thousand files per directory.

    It's already well-established that this story was embellished by the ****-master. It's pretty sad when the articles are worse than most of the troll attempts.
    Corn?

  • incassum (unregistered) in reply to Nagesh
    Nagesh:
    You're name is making Nagesh burning in the sensation!
    What happened to the real Nagesh? He hasn't posted in over two weeks? I miss his fake Indian perspectives on stuff.
  • Web Development Expert (unregistered) in reply to oheso
    oheso:
    I'm really surprised no one has pointed out that you could make a png with a transparent circle in the center and dynamically set the background color ...

    That'll never work between browsers. The most cross-platform and functional approach is clearly to design the widget in Flash.

  • Jodrell (unregistered) in reply to dgvid

    better to use a bitmap for faster processing

  • Accalia.de.Elementia (unregistered) in reply to dkf
    dkf:
    Unsupported global dynamic element:
    I just wrote a quick and dirty Java app that creates about 200 40x40 PNGs per second. That'd take a bit under a day.
    If you're doing it right, your limiting factor is how fast you can write the files to the disk. The problem isn't even how long it takes to write that much data per se, but rather how long it takes to properly commit all that metadata (filenames, directory entries, etc.)

    or if you use bash scripting like JB did most of your time is actually spent forking the half dozen or so sub shells required for each iteration of the loop.

    That's why the java app is so much faster, no need to spawn new processes.

  • Bart (unregistered)

    Timmaaaah! Lol how you can have a problem and find a completely ridiculous solution that raises another problem, and another one, and actually sets you back a couple of days. And then someone comes with a simple 5 min solution to the problem. Been there. Next time, ask someone for help. Timmay's lesson for the day.

  • Nagesh (unregistered) in reply to incassum
    incassum:
    Nagesh:
    You're name is making Nagesh burning in the sensation!
    What happened to the real Nagesh? He hasn't posted in over two weeks? I miss his fake Indian perspectives on stuff.
    Real Nagesh is being me, matterhorn. I am only Indian and not being fake one. Forgeting of pasword can hapen to anyone.
  • kastein (unregistered) in reply to Klimax
    Klimax:
    TRWTF is not knowing about js libraries which can do vector graphics using VML/SVG depending upon browser.(and efficiently)

    CAPTCHA:i am retarded and think captcha jokes are still funny. Welcome to 2007

    read my mind... between the wingdings/webdings suggestion, the transparent PNG w/ DIV bgcolor set suggestion, and this, I think there are enough options. Whoever said they use an activex control for this should be smacked though, activex is the devil.

  • boog (unregistered) in reply to Nagesh
    Nagesh:
    incassum:
    Nagesh:
    You're name is making Nagesh burning in the sensation!
    What happened to the real Nagesh? He hasn't posted in over two weeks? I miss his fake Indian perspectives on stuff.
    Real Nagesh is being me, matterhorn. I am only Indian and not being fake one. Forgeting of pasword can hapen to anyone.
    Who cares?
  • (cs) in reply to drusi
    drusi:
    So what would be the Right Thing in this situation, anyway?

    My instinct is to make a square GIF consisting of a transparent-color circle on a white background, and then set the background color to the hex code. But I'm the sort of programmer who reads TDWTF to reassure himself that "at least I'm not this guy," so...

    Draw it programmatically (or if you're doing it now, you can use CSS3 - but that's only recently become an option).

  • (cs)

    The solution that occured to me was to do something like [image] and generate the image at runtime.

  • (cs) in reply to boog
    boog (functioning clone):
    Nagesh:
    incassum:
    Nagesh:
    You're name is making Nagesh burning in the sensation!
    What happened to the real Nagesh? He hasn't posted in over two weeks? I miss his fake Indian perspectives on stuff.
    Real Nagesh is being me, matterhorn. I am only Indian and not being fake one. Forgeting of pasword can hapen to anyone.
    Who cares?
    Well said. I knew donating that hair sample for cloning research wouldn't be a total loss.

    Ahh, delegation. Life is good.

  • (cs) in reply to incassum
    incassum:
    Nagesh:
    You're name is making Nagesh burning in the sensation!
    What happened to the real Nagesh? He hasn't posted in over two weeks? I miss his fake Indian perspectives on stuff.
    I'm guessing school's out for the summer, so he probably doesn't have access to the computer labs any more.
  • NotJon (unregistered) in reply to dgvid

    I would have said something like... The swatch is too small, make it larger. or Make the swatch a triangle.

  • JB (unregistered) in reply to Larry

    Here I am using TCL, and people go after the operating system???

  • JB (unregistered) in reply to Brad
    Brad:
    Larry:
    JB:
    tclsh> puts [time {
        for {set color 100000} {$color < 101000} {incr color} {
            exec "C:\\Program Files\\ImageMagick-6.7.0-Q16\\convert.exe" blank.png -fill "#${color}" -draw "circle 10,10 1,10" ${color}.png
        }
    } 1]
    25121743 microseconds per iteration
    
    Sounds like 5 days work using ImageMagick.
    Well, there's your problem. Try a real computer.

    Should have used a mac.

    How about making fun of me because I don't know how to quote?

Leave a comment on “Twenty-Four Bits Per Intern”

Log In or post as a guest

Replying to comment #:

« Return to Article