I think it’s time to move my blog from wordpress.com to my own site. This disappearing content in code blocks is getting old. Can’t post a post I wrote. Project for the week.
problem posts page 22
Testing the Monty Hall problem
I have always had trouble understanding and even believing the proposition of the Monty Hall problem. It feels like it is proposing that the probability of past events affect the probability of future events, like suggesting that a coin landing on heads will be more likely to land on tails the next time. Rather, it’s about the information provided by the circumstances. I still don’t intuitively understand it, but at least I have now verified for myself that the proposed probability approximates outcomes. I have created a PHP simulation of the game and script to iterate it numerous times.
The code allows testing other numbers of doors and number of doors for the host to reveal. Increasing the numbers shows increasing odds. Even if Monty opens less than all but the remaining door (obviously requires more than three total doors), it still increases odds by switching.
Continue reading post "Testing the Monty Hall problem"CSS3: Text Rotation Rendering Problems
As mentioned in another post on css rotation, I had some issues with rotating text. On the Amy’s Shoes site, now live [no longer our design], I use transform:rotate();
for CSS3 capable browsers and the matrix filter for IE to rotate various elements.
In IE, I had noticed that the text was somewhat blurry when rotated, especially for smaller font-sizes. I hadn’t noticed, though, that the rotated text also rendered poorly in Firefox for Windows and Safari for Windows. They render the text with messed up kerning and letter positioning, so that it can become illegible on smaller text and even have overlapping letters. Not in Opera in Chrome, just those browsers. I test Firefox and Safari on Mac only, since rendering of most things is exactly the same. Evidently not the case with rotated font rendering though, and I will have to keep this in mind and test the new CSS3 features more thoroughly.
Because of this issue, I made my first ever style sheet targeting an entire operating system (Windows), since the rotation was not working on so many Windows browsers. The stylesheet simply removes the rotation on the main body text and repositions things slightly so that the layout still works. We were considering doing image replacement for the menu and button text on Windows as well, but haven’t gone that far yet, as the larger text doesn’t look nearly as bad. The rendering is also slightly messed up on Firefox for Mac, but not too bad to use.
We’re not sure why the rendering is so bad on those Windows browsers. For IE, it is likely the way it handles the matrix filter. For Safari and Firefox, it may have something to do with the way Windows deals with fonts compared to how Mac does. Maybe Chrome and Opera somehow bypass the rendering issue. I don’t know what’s up, but this and the other issues mentioned in the previous article suggest that, unfortunately, rotation of text is still not to the point where it can be indiscriminately used, and is best used in a way where the unrotated version still works fine, because that will need to be done for some browsers.
iBook Audio Issue
After running the utility Onyx on my computer to both clean it up a bit and change some settings, I suddenly found my computer having some troubles. Dialog boxes would just beachball shortly after appearing, and the applications that created them would have to be force quit. After trying to change my volume, I noticed that something was wrong with my audio, so I turned off the text-to-speech I had set up for dialog boxes. After this, the beachball problem stopped.
But I had no audio at all. On further investigation, I noticed the OS was not recognizing any audio devices, input or output. I found a forum thread discussing this issue. I couldn’t find the cause, but I did find a solution. I simply had to download Quicktime from Apple and reinstall it over my current install. Since then, I have full audio and no problems with it, and no unusual beachballing.
I’m not sure what happened that caused this problem, but it might have been related to the permissions check Onyx does on loading. I hope to avoid it in the future. I will be more careful using Onyx in the future anyway.
Disappearing iPhoto Library
Today, I noticed a strange thing while doing a bit of filesystem cleanup: Â My entire iPhoto library, containing 8000+ images, had somehow turned into a 300k alias file pointing to nothing. Â Concerned, I looked elsewhere to make sure I hadn’t just stored it in a different location for organization purposes and the alias had broken. Â I hadn’t. Â Then I remembered earlier today noticing that my hard drive seemed significantly roomier than normal. Â I had just emptied the trash a couple days ago (usually don’t empty often, just in case), but there shouldn’t have been anything nearly that big in there.
Luckily, I use Apple’s Time Machine for backup, plus my own other methods. Â In Time Machine, I went back about two weeks before the actual library was there. Â Restored it of course.
I have no idea what happened there. Â I hadn’t used iPhoto or been reorganizing anything around that area for a full month. Â If I had somehow accidentally created an alias in the folder, there would be no reason it wouldn’t perform he normal action of appending alias to the name.
Continue reading post "Disappearing iPhoto Library"WordPress: Comment Approval Email Address
[Update 6/11/2009] See comments for resolution of this issue.[/update]
Had a weird problem that might point to a weird semi-bug of WordPress.
I just recently received an email asking me to approve a comment on the Stearns site. I haven’t touched the admin part of the site in two months. We had set them up to need to approve every comment, and to have WordPress email the administrator whenever a comment was submitted. When I left I had made sure the address in the >Settings>General pane was set to one of the Stearns people, and it still is. This is the address I thought would receive the comment approval mailings.
I went looking for information on where the address for comment approval mailings is pulled from. According to this thread, the mailings are sent to the address of the “admin” account. I had deleted the “admin” account for security purposes (getting rid of a known user name) and may have transferred that account’s posts to mine. Or maybe it’s because my ID is the next closest to zero. So my account may be considered the “admin” account now.
The other possibility that I thought of is that the mailings get sent to the post author. I’m set as the author of the post the test comment was set to and a number of others. I would have to change them all over to one of the Stearns people if this were the case.
Choosing the easier solution first, I changed the email address of my account to that of one of the Stearns people (modified with the “+” syntax to avoid duplication). I did a test comment on the same post as the previous one was sent to and did not receive an email, so the suspicion of that thread may be correct (have to verify with the Stearns people).
I think that is a silly place to pull the address from if true. It would certainly make sense to have this settable and not tied to one particular account. The comment moderator might not necessarily be the “admin” user, as with Stearns. It doesn’t seem to be unreasonable to have the comment approval mailings sent to the same person who receives mailings about user registrations (the one on the “General” tab). Or, to be a bit more fancy, either have a separate address or user set for comment moderation on the >Settings>Discussions pane.
I’ll update this post if I find out more.
[Update: 6/10/2010] At this point I am thinking that the author of the post receives the comment approval emails, as it would certainly make the most sense. For the Samba Soccer Club site I did a while back, I received a comment approval message for a post I wrote as myself rather than admin. I do have the lowest current ID, so that can’t be ruled out, but it really doesn’t make any sense for that to be how it works. I’ve realized that my changes on Stearns shouldn’t tell anything, because the lowest user id and post author are both the same for the relevant posts.[/update]
Stearns: Internet Explorer workarounds
We’ve had to do a bit of work to get our site working properly in IE, mostly version 6. I’ve recently started using a conditional stylesheet just for IE6 on my own site, like:
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url')?>/styleIE6.css" />
<![endif]-->
and we did the same for Stearns.
Box Model
One issue we dealt with for IE6 in the conditional stylesheet was box model issues. IE6 handles margins, padding, and borders differently than other browsers, so we compensated for this in some places. One big issue was with our floated columns: The third would float below the second on some wide pages.
Continue reading post "Stearns: Internet Explorer workarounds"iTunes CDDB info for the Yars
In January, my former band The Yars released their first full album (they were all shorts or live while I was there). I’ve had a copy of it since then, but haven’t imported it. I had heard the songs tons of times as Dwight was working on them, so was certainly burned out on them. I also don’t entirely like the sound direction the songs have taken, and it’s a little weird listening to another drummer play them. And it wasn’t in the iTunes store, so they had no CDDB data. I wanted to wait for that. So I never got around to importing it.
Today I decided to. It’s been in the iTunes store and other venues for months now. But still, there was no CDDB in the Gracenote database that iTunes uses. I could go to the store and see all the track info, but there was no way to get it to the album. But I found this article describing how you can copy store songs to a playlist, then use one of Doug’s scripts to copy them to another set of songs. So I went to the iTunes store to copy them to a playlist. Unfortunately, the new fancy iTunes song playlist doesn’t allow this to happen. The songs are like HTML elements on a page. And I had planned to boycott getting new versions of iTunes because they had cut off support for third party access. But just recently I think the very features that were now causing me trouble, plus the full new version number, had enticed me. I found the “Column Browser”, which does have a Cocoa style list of the songs, but I searched every possible genre with no luck at finding the Yars.
Continue reading post "iTunes CDDB info for the Yars"wORDprESS Capitalization
Hmm, an interesting discovery I just made:
wOrDpress seems to change the capitalization of all instances of its own name, ie “woRdpreSS”, within the title and content of posts. Since URLs can be case sensitive, this caused a problem for one of the links I had on a previous post. It was changing the lowercase “p” to uppercase “P”. To solute the problem, I used the HTML escape sequence “p” in place of that “p”, and the link works just fine. I’ll have to watch for that next time.
[Update] Interestingly, the capitalization wasn’t changed on this post at all, but it was on the other. I’m not sure why.[/update]