<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Tewha.net</title>
    <link>https://tewha.net/tags/tips/</link>
    <description>Recent content on Tewha.net</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 07 Aug 2011 14:00:00 +0000</lastBuildDate>
    <atom:link href="https://tewha.net/tags/tips/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to reset Wii to lower resolution</title>
      <link>https://tewha.net/2011/08/how-to-reset-wii-to-lower-resolution/</link>
      <pubDate>Sun, 07 Aug 2011 14:00:00 +0000</pubDate>
      <guid>https://tewha.net/2011/08/how-to-reset-wii-to-lower-resolution/</guid>
      <description>&lt;p&gt;So you’ve set your Wii to 480p, then moved it back to a TV that supports only 480i. How do you fix it?&lt;/p&gt;
&lt;p&gt;I searched for this for a while and found a few wrong and complicated answers.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>So you’ve set your Wii to 480p, then moved it back to a TV that supports only 480i. How do you fix it?</p>
<p>I searched for this for a while and found a few wrong and complicated answers.</p>
<p>One way is to use the composite cable instead of the component cable. Your Wii came with a composite cable, and if you’re only using 480i the component cable does nothing extra for you anyway.</p>
<p>But what if you can’t find the composite cable? This was the case for me, after my move. The answer is ridiculously simple:</p>
<ol>
<li>Unplug the component cable on the Wii end.</li>
<li>If the Wii is already on, press the Reset button. If it was off, turn it on.</li>
<li>Wait a couple seconds. The Wii will notice there’s no component cable plugged in, and switch to 480i mode.</li>
<li>Plug the component cable back into the Wii.</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>Flux adjusts your monitor’s color temperature</title>
      <link>https://tewha.net/2010/12/flux-adjusts-your-monitors-color-temperature/</link>
      <pubDate>Sat, 04 Dec 2010 16:00:00 +0000</pubDate>
      <guid>https://tewha.net/2010/12/flux-adjusts-your-monitors-color-temperature/</guid>
      <description>&lt;p&gt;Install &lt;a href=&#34;http://www.stereopsis.com/flux&#34;&gt;Flux&lt;/a&gt; right now.&lt;/p&gt;
&lt;p&gt;What does it do? Well, at sunset it adjusts the color temperature of your monitor to make it warmer and less glaring. At sunrise, it adjusts it back.&lt;/p&gt;
&lt;p&gt;I installed it yesterday afternoon; yesterday and today at sunset, it automatically adjusted my monitor’s color temperature. The difference on the eyes is nothing short of amazing. And if you need to do some accurate color work, it has a menu that lets you turn it off for an hour.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Install <a href="http://www.stereopsis.com/flux">Flux</a> right now.</p>
<p>What does it do? Well, at sunset it adjusts the color temperature of your monitor to make it warmer and less glaring. At sunrise, it adjusts it back.</p>
<p>I installed it yesterday afternoon; yesterday and today at sunset, it automatically adjusted my monitor’s color temperature. The difference on the eyes is nothing short of amazing. And if you need to do some accurate color work, it has a menu that lets you turn it off for an hour.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Xcode tip: Renaming files shared by projects</title>
      <link>https://tewha.net/2010/12/xcode-tip-renaming-files-shared-by-projects/</link>
      <pubDate>Sat, 04 Dec 2010 16:00:00 +0000</pubDate>
      <guid>https://tewha.net/2010/12/xcode-tip-renaming-files-shared-by-projects/</guid>
      <description>&lt;p&gt;What if you want to rename a file that’s used in multiple Xcode projects? Well, previously I’d rename the file in one project, then open each project in series and correct broken references. But I discovered today that this is unnecessary. If you open all of your projects first, Xcode will fix the references across &lt;strong&gt;all&lt;/strong&gt; of your open projects as you rename files in &lt;strong&gt;any&lt;/strong&gt; of the projects.&lt;/p&gt;
&lt;p&gt;For all I know, this has always been a feature of Xcode. But I’ve never noticed it before. So for this stunning display of common sense: Well done, Apple!&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>What if you want to rename a file that’s used in multiple Xcode projects? Well, previously I’d rename the file in one project, then open each project in series and correct broken references. But I discovered today that this is unnecessary. If you open all of your projects first, Xcode will fix the references across <strong>all</strong> of your open projects as you rename files in <strong>any</strong> of the projects.</p>
<p>For all I know, this has always been a feature of Xcode. But I’ve never noticed it before. So for this stunning display of common sense: Well done, Apple!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Better Xcode warnings through .xcconfig files</title>
      <link>https://tewha.net/2010/11/better-xcode-warnings-through-xcconfig-files/</link>
      <pubDate>Sat, 27 Nov 2010 16:00:00 +0000</pubDate>
      <guid>https://tewha.net/2010/11/better-xcode-warnings-through-xcconfig-files/</guid>
      <description>&lt;p&gt;Peter Hosey &lt;a href=&#34;http://boredzo.org/blog/archives/2009-11-07/warnings&#34;&gt;posted a list of warnings he turns on&lt;/a&gt;. Here’s the warnings I turn on. It’s mostly the same list.&lt;/p&gt;
&lt;p&gt;Rather than set these per project, I have a .xcconfig file I add to my project. I then base each build configuration off this file. Changing the .xcconfig file changes all projects based on it (though with the current Xcode, it’s sometimes necessary to reload the project to get the settings to take).&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Peter Hosey <a href="http://boredzo.org/blog/archives/2009-11-07/warnings">posted a list of warnings he turns on</a>. Here’s the warnings I turn on. It’s mostly the same list.</p>
<p>Rather than set these per project, I have a .xcconfig file I add to my project. I then base each build configuration off this file. Changing the .xcconfig file changes all projects based on it (though with the current Xcode, it’s sometimes necessary to reload the project to get the settings to take).</p>
<p>//
//  MoreWarnings.xcconfig
//
//  Created by Steven Fisher:
//      <a href="http://tewha.net/2010/11/xcode-warnings/">http://tewha.net/2010/11/xcode-warnings/</a>
//  See also:
//      <a href="http://boredzo.org/blog/archives/2009-11-07/warnings">http://boredzo.org/blog/archives/2009-11-07/warnings</a>
//</p>
<pre><code>GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
GCC_WARN_SHADOW = YES
GCC_WARN_64_TO_32_BIT_CONVERSION = YES
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
GCC_WARN_ABOUT_RETURN_TYPE = YES
GCC_WARN_MISSING_PARENTHESES = YES
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
GCC_WARN_ABOUT_MISSING_NEWLINE = YES
GCC_WARN_SIGN_COMPARE = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_VALUE = YES
GCC_WARN_UNUSED_VARIABLE = YES
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
GCC_TREAT_WARNINGS_AS_ERRORS = YES
RUN_CLANG_STATIC_ANALYZER = YES
</code></pre>
<p>Peter wrote a great explanation of why you’d want most of these warnings, which I’m not going to attempt. I’ve added some C++ warnings, too. They don’t do anything with clang 1.6, but might be useful in the future.</p>
<p>A few notes:</p>
<ul>
<li>Like Peter, I don’t turn on <code>GCC_WARN_UNUSED_PARAMETER</code>. Although you can add <code>__unused</code> to each parameter to disable the warning, doing so breaks Xcode’s code formatting. I use code formatting constantly, so anything that breaks it isn’t acceptable.</li>
<li>The warnings that were the most painful to turn on were <code>GCC_WARN_64_TO_32_BIT_CONVERSION</code> and <code>GCC_WARN_SIGN_COMPARE</code>. If you use <code>int</code> and <code>NSInteger</code> interchangeably, you’re going to have a tough time with these. (I don’t, but some of the internal libraries I use do.) These are also some of the more dangerous warnings to fix; if you’ve got automated tests, you should run them after every few corrections.</li>
<li><code>RUN_CLANG_STATIC_ANALYZER</code> will roughly double (or more) the time your project takes to compile. I consider this a good trade: I rarely trigger a static analyzer warning now, but when I do I want to fix it.</li>
<li>Also note the <code>GCC_TREAT_WARNINGS_AS_ERRORS</code>. If you are applying these to an existing project, you may start with hundreds of warnings. You’ll probably want to start with this set to <code>NO</code> and change it to <code>YES</code> after you’ve fixed the warnings.</li>
<li>Remember, too, that this changes the <strong>defaults</strong> for settings. You can still specify different settings in the build configuration! If the static analyzer is taking too long to run in one project, just turn it off in that one project but leave the .xcconfig file alone!</li>
</ul>]]></content:encoded>
    </item>
  </channel>
</rss>
