Uncategorized

Anthony’s

…fish grotto on the bay in San Diego is very good. They also do seafood.

Richard Stallman

Saw RMS at Canterbury University today. He has an interesting point of view, very liberal, but also a point of view that is based on old technology. He said that sites like Google Docs are a problem as you are running a program on their machine, a program that you don’t have control over.

Zen of website maintenance

A certain website had a few vuneribilities including XSS and leaking passwords. The fixes were: The <script> tag was turned on for pending users. Configure off.  All other users get their tags filtered against a safe list The superuser always skips the filter and sees all tags.

Fun and games with Python vs C

I’m using Python to test the code generated by a C compiler. Many of the tests are along the lines of: a = 5 b = 10 result = run_c_code_for_add_in_emulator(a, b) assert result == a + b This works fine except when dividing integers with rounding.

Big Mac Calories

Why does a NZ Big Mac have 464 calories, a UK one 495, and a US one 540? It might be differences in weight but it’s hard to tell.

Seen on reddit

A man goes to his doctor and tells him, “I’ve had the song ‘What’s New Pussycat’ stuck in my head for weeks, and it’s driving me crazy.” The doctor says, “Well, I think you may have Tom Jones disease.

Moving to Dreamhost

Thought I’d move from Rimu Hosting to Dreamhost. The VPS we’re on is just too slow and anything that brings the load down is good. I can’t move the secure sites as Dreamhost doesn’t provide any type of SSL, even a self signed cert from the wrong address, without switching to a static IP and handing over $50 US a year.

Comparing integers

Notes for next time: You can check if the unsigned integer ‘a’ is greater than ‘b’ by adding the ones complement of ‘b’ to ‘a’ and testing carry. A twos complement subtraction doesn’t work as a > 0 is always false.

Test after move

All relocated and imported. Now does posting work?

Engines for metaphilter++

Django looks quite decent. Python (not PHP – good), built in basic admin, built in basic user accounts, and the template system is directly applicable to metaphilter. I’ll give it a try using sqlite 3.