NoArchive: /
Why does Google cache (or as some people say: plagiarise) stuff anyway? I don’t think I really want google to publish a copy of all the site content, especially if (as in the case of geospike) it is subject to change and removal, so NoArchive is a good directive to use in the robots.txt.
You can also prevent image searches and (for some reason) auto-translations. Snippets are another, but I suspect your ranking will really suffer if you don’t allow snippets.
XCode4: Running in Release
One decent feature about XCode4 is a more streamlined “scheme” approach, were rather than having to pick the environment, build type etc every time, there are targeted schemes like “Debug” and “Archive.
One thing I felt was missing however is the ability to install Release builds on my device. I would normally use the ‘Run’ tool to do this in XCode3, but that is now Debug-only in XCode4 (well, you can alter the scheme, but then you have to change it back, and it kinda defies the point). I use my own app a lot, and this can provide some valuable testing, however it’s important to also archive the DSYM files for symbolication of crashes.
One way is to archive, and sync to iTunes. I hate having to use iTunes more than needed, and this is a slow process. It does however archive the DSYM which is useful.
However, I am already archiving the dSYM automatically on all release builds (see this post).
The solution in XCode4 is to use the “Profile” option. It will build and install a normal Release build on your iPhone. With the auto-archive script (above), you still get the dSYM for crash symbolicating. One side-effect is it will launch a profiler, but this is no hassle, you can simply press ‘stop’. Hell of a lot easier and faster than exporting & syncing with iTunes anyway.
Checking out a git branch with an ambiguous name
So you have tags and branches with the same name in git. Possibly because you just ran svn2git on a massive repo. Normally you wouldn’t create this situation intentionally. Apparently you can use something like --prefix=svn/ to get around this problem when using git-svn, and possibly on import.
After the fact though, here are some tips. So you have a tag and a branch named my-ambiguous-name
git checkout my-ambiguous-name seems to preference the tag of that name. If you want the branch, here’s how to do it:
git checkout --track -b my-ambiguous-name_b origin/my-ambiguous-name
Notice that for the local name I affixed ‘_b’.
Then you can git pull, and git checkout my-ambiguous-name_b and it will work.
Beautiful Ruby
When coding, I often have the need for a statement along the lines of:
print (string_a != nil) ? string_a : string_b
i.e. print string_a unless it’s nil, then print string_b.
In ruby, I figured there must be a neater way, so I tried:
print string_a or string_b
and it worked. Wow. So neat. So awesome…! =D
