

isitchristmas.com source code on github - evdawg
http://github.com/isit/christmas/tree/master

======
amix
Even if it's a small project the code is mediocre at best. For example, isn't
there a library for PHP that handles internalization and why do
internalization in both JavaScript and PHP (and no is only internalized in the
JavaScript version...)

Lastly it's a really bad idea to determine language based on IP, a much safer
way is to use the browser's language (ACCEPT_LANGUAGE header).

------
snorkel
Here's the source code for IsTheYesNoSiteMemeOverplayed.com

    
    
       <html>
       <body>
       <h1> yes </h1>
       </body>
       </html>

------
patio11
On the one hand, I like to encourage programmers who bake in
internationalization, even in trivial projects.

On the other hand, I have dealt with far too many programmers who think
romanizing Japanese is an acceptable alternative because all dem squigglies
are hard.

This isn't a pedantic distinction: 'HAI' is not an acceptable localized
message. It's just not. It would be funny except it happens in systems that
got contracted out for six figures.

~~~
petercooper
Would katakana be accepted (as opposed to full kanji)? Can't speak for anyone
else, but as a non Japanese speaker, I find katakana a lot easier to work
with, but am unsure whether it looks amateurish to use it exclusively in
Japanese eyes.

~~~
litewulf
Why is Katakana easier to work with? I mean, usually my code is either
unicode-safe... or it isn't. I've never ran into "kind of unicode-safe as long
as the character doesn't have too many lines" ;)

~~~
petercooper
My knowledge of Japanese is poor, but I know the romanization of many of the
sounds used. For example, "kaze wo atsumete". If I type that on a Japanese
keyboard, I get the katakana to match. Working out what the equivalent kanji
are (if any in this case?) would be impossible to me.

------
blader
Does it scale dynamically via EC2? I need a version of this that runs on
BigTable in case I run in to scaling issues. Please help.

~~~
jmah
Does it solve the halting problem? I also need a version of this that tells me
how to optimally pack my presents in polynomial time.

------
est
LOL, this actually wrong pronunciation of Chinese PinYin. The right one is `Bú
Shì`. The explaination here:
[http://www.nciku.com/search/zh/detail/%E4%B8%8D%E6%98%AF/130...](http://www.nciku.com/search/zh/detail/%E4%B8%8D%E6%98%AF/1301254)

<http://github.com/isit/christmas/tree/master/iic.js>

132 "CN": "BÙ SHÌ", // China (Mandarin)

------
petercooper
Or, just for fun, in Sinatra - <http://sinatra.rubyforge.org/> :

    
    
      require 'sinatra'
      get '/' do
        %{<html><body>
           <h1>#{Time.now.mday == 25 && Time.now.month == 12 ? "YES" : "NO"}</h1>
          </body></html>}
      end
    

Sure, no internationalization or adaptation to local time, but I'd arrogantly
assume most Internet users can understand YES and NO as well as I understand
JA and NEIN or OUI and NON (apologies to speakers of non-Latin derived
languages.. :))

~~~
DougBTX
I'm never sure what to make of posts like this.

Sure, it is a short code snippet that works some of the time, but the original
was trying to solve a more difficult problem. This code doesn't even try.

What good is pretty code if it only runs on localhost?

Oh, and if you really do only care about localhost, there isn't much
difference between the Sinatra/Ruby code and PHP:

    
    
        <?php $date = getdate(); ?>
        <html><body>
            <h1><?php echo $date[mday] == 25 && $date[mon] == 12 ? "YES" : "NO" ?></h1>
        </body></html>

~~~
petercooper
If you stuck to just UTC, you could run it anywhere and it'd be logically
(though not pragmatically) correct.

In any case, I was being flippant because I thought the original was a joke of
sorts. It was amusingly overengineered, so I thought I'd go too far in the
opposite direction to play devil's advocate, as it were.

------
catch23
Why not just do a static version of the site for 364 days of the year and just
git push on the hour of xmas? It'd be good enough, infinitely more scalable,
and offers the benefit of looking into past revisions to find previous dates
xmas occurred on.

~~~
catch23
Or additionally, he could just shutdown the site on xmas day and post a
disclaimer for the other 364 days that the site has a 99.997% success rate.
(or a 0.003% failure rate)

~~~
ed
You're off by a few factors of 10

~~~
albertni
Yeah, even without doing the computation or just noting that 365 < 1000, it
would be pretty absurd to be able to do far better than any Amazon S3
guarantee (to give one example) while still being able to be "down" for an
entire day!

------
jamesjyu
Also, gotta love their handy RSS feed: <http://isitchristmas.com/rss.xml>

------
jackowayed
And the url is so not internationalized. Stuff like esnavidad.com should
redirect.

