<?xml version="1.0" encoding="UTF-8" ?>
<feed xml:lang="ja" xmlns="http://www.w3.org/2005/Atom">
	<generator uri="http://nucleuscms.org/" version="Nucleus CMS v3.31SP1-kes">Nucleus CMS v3.31SP1-kes</generator>

	<id>http://fireball.loafer.jp/kes/</id>
	<link rel="self" type="application/atom+xml" href="http://fireball.loafer.jp/kes/atom.xml" />
	<link rel="related" type="text/html" href="http://fireball.loafer.jp/" />
	<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/" />

	<rights>© 2008 Project Loafer/Project Fireball and all blog writers.</rights>

	<title>Entering Passive Mode</title>
	<subtitle>やる気のない受け身なブログ。実験場。</subtitle>

	<updated>2009-04-24T02:24:49+09:00</updated>
	<entry>
		<author>
			<name>kes</name>
			<uri>http://loafer.jp</uri>
		</author>
		<category term="Life" scheme="http://fireball.loafer.jp/kes/life/" />
		<content type="html">
<![CDATA[
<p>
最近、優先順位について悩んでいる。
</p>
<p>
家事、仕事、人付き合い、趣味、情報収集、気晴らし、スポーツ、勉強、研究、教育。<br />
一週間、何に何時間使ったか調べてみると、最近酷く偏ってきていることが分かった。
</p>
<p>
人に聞いたり任せる事が苦手なタイプなので、<br />
気になったことは自分でやり、調べる性格。<br />
昔はそれで良かったのだが、年齢と共に、頭の回転も落ちてきてるのだろうか、<br />
同じような事をやるにしても、勉強や研究に使う時間は長くなってきている。
</p>
<p>
どうも最近は、「成すべき事が多すぎて、生活時間内で完遂できない」のではないか？<br />
時間が足らないということは、何かが切り捨てられているのだ。<br />
</p>
<p>
明らかに、タダでさえ低い優先順位の日記更新は切り捨てられているし、<br />
趣味に割く時間もどんどん削られている。<br />
5 年前は余裕を持って生活していたはずなのだが。<br />
その頃の基準が今の俺に通用しないのか？<br />
</p>
<p>
健康や生活に影響が出ているわけではないので、大きな問題ではないはずだが、<br />
何か、第六感が、このままでは危ないと告げている。
</p>
<p>
さて、この状況を如何に打開すべきか。<br />
こんなことを考えているだけでも余計な時間を使うことになるんだが。
</p>
<p>
うーむ。
</p>
]]>
		</content>
		<id>http://fireball.loafer.jp/kes/article_617.html</id>
		<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/article_617.html" />
		<published>2009-04-24T02:24:49+09:00</published>
		<title type="html"><![CDATA[優先順位]]></title>
		<updated>2009-04-24T02:24:49+09:00</updated>
	</entry>
	<entry>
		<author>
			<name>kes</name>
			<uri>http://loafer.jp</uri>
		</author>
		<category term="VBA, VB Classic" scheme="http://fireball.loafer.jp/kes/vba/" />
		<content type="html">
<![CDATA[
<p>
では、続き。
</p>
<p>
<dfn>InputBox</dfn> 関数のマニュアルのミスとは、キャンセルされた場合に返す値である。
</p>
<p>
実際には、<dfn>InputBox</dfn> 関数でキャンセルすると、長さ 0 の文字列 (<code>""</code>) ではなく、<dfn>vbNullString</dfn> が返る。
この、<dfn>vbNullString</dfn> は、<code>""</code> とは異なる値である。
</p>
<p>
<dfn>InputBox</dfn> 関数で OK を押した場合、テキストボックスの内容が戻り値となる。
テキストボックスが空の場合は <code>""</code> が返るので、キャンセルの <dfn>vbNullString</dfn> と区別することができる。
</p>
<p>
ただ、1 つ大きな問題がある。
<dfn>vbNullString</dfn> と <code>""</code> をどうやって区別すれば良いのか。
</p>
<ul>
<li><code>vbNullString = ""</code> は <dfn>True</dfn></li>
<li><code>StrComp(vbNullString, "")</code> は 0</li>
<li><code>Len(vbNullString)</code> も <code>Len("")</code> は 0</li>
</ul>
<p>
困ったことに、VBA の一般的な方法では、上記を区別するのは困難なので、特別な方法を使う必要がある。
</p>
<a href="http://fireball.loafer.jp/kes/vba-nullstring-vs-emptystring.html">続きを読む</a>
]]>
		</content>
		<id>http://fireball.loafer.jp/kes/vba-nullstring-vs-emptystring.html</id>
		<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/vba-nullstring-vs-emptystring.html" />
		<published>2009-03-17T00:25:41+09:00</published>
		<title type="html"><![CDATA[vbNullString と 空文字列 ""]]></title>
		<updated>2009-03-17T00:25:41+09:00</updated>
	</entry>
	<entry>
		<author>
			<name>kes</name>
			<uri>http://loafer.jp</uri>
		</author>
		<category term="VBA, VB Classic" scheme="http://fireball.loafer.jp/kes/vba/" />
		<content type="html">
<![CDATA[
<p>
VB(A) の中でも、不思議な仕様なのが InputBox 関数だ。
</p>
<p>
この関数は、一行入力のテキストボックスを持つダイアログボックスを表示し、
利用者に適当なテキストの入力を促す。
見た目が質素なので、その用途は微妙だが、
フォームをいちいち作るのが面倒な時に使うこともある。
</p>
<p>
ダイアログボックスには、OK だけでなくキャンセルボタンもあるので、
利用者はキャンセルを選んで、処理を中止することもできる。
ということは、この関数は入力されたテキストだけでなく、
キャンセルされたかどうかの情報も返さなければならない。
<p>
さて、この関数の戻り値は、String 型である。
他の引数には値を呼び出し側に返すものはなく、
エラーを使ってキャンセルを表す感じでもない。
つまり、戻り値のみで対応しないといけないのだ。
</p>
<p>
どうなっているのか。
</p><a href="http://fireball.loafer.jp/kes/vba-inputbox.html">続きを読む</a>
]]>
		</content>
		<id>http://fireball.loafer.jp/kes/vba-inputbox.html</id>
		<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/vba-inputbox.html" />
		<published>2009-03-15T01:51:21+09:00</published>
		<title type="html"><![CDATA[InputBox 関数の戻り値]]></title>
		<updated>2009-03-15T01:51:21+09:00</updated>
	</entry>
	<entry>
		<author>
			<name>kes</name>
			<uri>http://loafer.jp</uri>
		</author>
		<category term="VBA, VB Classic" scheme="http://fireball.loafer.jp/kes/vba/" />
		<content type="html">
<![CDATA[
<p>
私にとって、Excel は紙のようなものである。
</p>
<p>
紙には、制限なく素早く自由に文字が書ける強みがあり、Excel には、自由にデータを移動、コピーできる強みがある。
</p>
<p>
考え事をするときは白紙と方眼紙とペンが手放せないのだが、紙に好きに書いて色々考え、頭の整理がついた後は、Excel を起動して区分・分類する癖がある。
</p>
<p>
Excel は表計算ソフトなので、計算用なイメージがあるが、そういった使い方ではなく、単なるメモ用として使っている。
</p>
<p>
それだけなら、別に Excel でなく、メモ帳や付箋ソフトでも良いんじゃないのと思うだろうが、私は VB プログラマなので、Excel に附属している VBA という環境が魅力なのである。
</p>
<p>
Excel をはじめとする Office ソフトには、古くから VBA と呼ばれるプログラミング環境がある。VBA は VB 系の中でも異例で、Office と共に 15 年も生き続けている長寿の言語である。
</p>
<p>
VBA では、アプリケーションの操作を自動化することができる程度にとどまらず、VB 言語を使って、自由にプログラムを書くことができる。
</p>
<p>
プログラムは Excel のデータと一緒にファイルに保管されるため、持ち運びも非常に楽である。Excel の普及率は結構高いので、人に渡す時もあまり苦労せずに済む。
</p>
<p>
そのため、小さな業務の効率化のために、Excel は欠かせないツールとなっている。
</p>
]]>
		</content>
		<id>http://fireball.loafer.jp/kes/vba-paper-and-excel.html</id>
		<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/vba-paper-and-excel.html" />
		<published>2009-03-13T00:06:35+09:00</published>
		<title type="html"><![CDATA[紙と Excel と VBA]]></title>
		<updated>2009-03-13T00:06:35+09:00</updated>
	</entry>
	<entry>
		<author>
			<name>kes</name>
			<uri>http://loafer.jp</uri>
		</author>
		<category term="VBA, VB Classic" scheme="http://fireball.loafer.jp/kes/vba/" />
		<content type="html">
<![CDATA[
<p>
Windows も 7 が出るとか言ってる時代なのに、
未だに Visual Basic 6 の案件があったりする。
それも、スタンドアロンのアプリケーションで。
</p>
<p>
Excel や Word などの Office 製品のマクロでは、
まだ Visual Basic for Application (VBA) が現役なので、
Visual Basic Classic が廃れたかというとそうではないのだが。
</p>
<p>
VB2 から入った私には付き合いの長い言語であり、愛着もある。
</p>
<p>
業務の関係もあるので、しばらくはぽつぽつ VB の話をしようかな。
</p>
]]>
		</content>
		<id>http://fireball.loafer.jp/kes/vba-still-active-vb6.html</id>
		<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/vba-still-active-vb6.html" />
		<published>2009-03-09T22:52:17+09:00</published>
		<title type="html"><![CDATA[未だに Visual Basic 6]]></title>
		<updated>2009-03-09T22:52:17+09:00</updated>
	</entry>
	<entry>
		<author>
			<name>kes</name>
			<uri>http://loafer.jp</uri>
		</author>
		<category term="Life" scheme="http://fireball.loafer.jp/kes/life/" />
		<content type="html">
<![CDATA[
<p>
青天の霹靂。
</p>
<p>
東梅田のぼてがなくなってました。
</p>
<p>
結構ダメージ。
<p>

]]>
		</content>
		<id>http://fireball.loafer.jp/kes/article.html</id>
		<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/article.html" />
		<published>2008-11-14T10:40:19+09:00</published>
		<title type="html"><![CDATA[ぼて閉鎖]]></title>
		<updated>2008-11-14T10:40:19+09:00</updated>
	</entry>
	<entry>
		<author>
			<name>kes</name>
			<uri>http://loafer.jp</uri>
		</author>
		<category term="JavaScript" scheme="http://fireball.loafer.jp/kes/ecmascript/" />
		<content type="html">
<![CDATA[
<pre class="prettyprint">
function foo() {
	;
}

var obj = new Object();
obj.foo = foo;

var x = foo();
var y = new foo();
var z = obj.foo();
</pre>
<p>
関数オブジェクトには 3 つの用途があることが分かった。
</p>
<ul>
<li>関数</li>
<li>コンストラクタ</li>
<li>メソッド</li>
</ul>
<p>
他の言語では、これらは独立していることが多いが、<br />
JavaScript では、全て関数オブジェクトを利用する。<br />
これらを区別するのは、その呼び出し方法である。
</p><a href="http://fireball.loafer.jp/kes/js-invocation.html">続きを読む</a>
]]>
		</content>
		<id>http://fireball.loafer.jp/kes/js-invocation.html</id>
		<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/js-invocation.html" />
		<published>2008-11-09T17:40:36+09:00</published>
		<title type="html"><![CDATA[関数オブジェクトの呼び出し]]></title>
		<updated>2008-11-09T17:40:36+09:00</updated>
	</entry>
	<entry>
		<author>
			<name>kes</name>
			<uri>http://loafer.jp</uri>
		</author>
		<category term="JavaScript" scheme="http://fireball.loafer.jp/kes/ecmascript/" />
		<content type="html">
<![CDATA[
<pre class="prettyprint">
function getThisValue() {
	return this.value;
}
function setThisValue(value) {
	this.value = value;
}

function Foo() {
	this.value = 0;
	this.getValue = getThisValue;
	this.setValue = setThisValue;
}

var foo = new Foo();
foo.setValue(3 * 5);
alert(foo.getValue()); // 15
</pre>
<p>
JavaScript では、メソッドもまた関数オブジェクトである。
</p>
<p>
JavaScript においては、メソッドはプロパティの一種であり、<br />
オブジェクトのプロパティに関数オブジェクトを代入すると、<br />
それはメソッドとして呼び出せるようになる。
</p>
<a href="http://fireball.loafer.jp/kes/js-function-as-method.html">続きを読む</a>
]]>
		</content>
		<id>http://fireball.loafer.jp/kes/js-function-as-method.html</id>
		<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/js-function-as-method.html" />
		<published>2008-09-07T19:16:56+09:00</published>
		<title type="html"><![CDATA[メソッドとしての関数オブジェクト]]></title>
		<updated>2008-09-07T19:16:56+09:00</updated>
	</entry>
	<entry>
		<author>
			<name>kes</name>
			<uri>http://loafer.jp</uri>
		</author>
		<category term="JavaScript" scheme="http://fireball.loafer.jp/kes/ecmascript/" />
		<content type="html">
<![CDATA[
<pre class="prettyprint">
function Foo(x, y) {
	this.value = x * y;
}

var foo = new Foo(3, 5);
alert(foo.value); // 15
alert(typeof foo); // object
</pre>
<p>
new 演算子で関数オブジェクトを呼び出す事で、<br />
他のプログラミング言語同様、<br />
オブジェクトを生成することができる。
</p>
<a href="http://fireball.loafer.jp/kes/js-function-as-constructor.html">続きを読む</a>
]]>
		</content>
		<id>http://fireball.loafer.jp/kes/js-function-as-constructor.html</id>
		<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/js-function-as-constructor.html" />
		<published>2008-08-18T19:27:18+09:00</published>
		<title type="html"><![CDATA[コンストラクタとしての関数オブジェクト]]></title>
		<updated>2008-08-18T19:27:18+09:00</updated>
	</entry>
	<entry>
		<author>
			<name>kes</name>
			<uri>http://loafer.jp</uri>
		</author>
		<category term="JavaScript" scheme="http://fireball.loafer.jp/kes/ecmascript/" />
		<content type="html">
<![CDATA[
<pre class="prettyprint">
foo = new Object(); foo.property = 12345;
bar = new Function("x, y", "return x * y;");
baz = new Array(123, "abc", null);
qux = new String("String object");
quux = new Boolean(true);
corge = new Number(12345);
grault = new Date();
garply = new RegExp("\\d+");
waldo = new Error("No way.");
</pre>
<p>
プリミティブ値はリテラル記法で表現したが、<br />
オブジェクトは主に <dfn>new </dfn> 演算子を使って生成する。
</p>
<p>
<dfn>Function</dfn> オブジェクトに関しては、<br />
<dfn>function</dfn> キーワードを使って作成するのが普通だが、<br />
他と同様、<dfn>new</dfn> 演算子で作成することも可能だ。
</p>
<p>
JavaScript でのオブジェクト生成構文は、<br />
Java や C++ に近くなるように設計されている。
</p>
<p>
ただ、JavaScript ではその文の意味合いが大きく異なる。
</p>
<a href="http://fireball.loafer.jp/kes/js-object-instantiation.html">続きを読む</a>
]]>
		</content>
		<id>http://fireball.loafer.jp/kes/js-object-instantiation.html</id>
		<link rel="alternate" type="text/html" href="http://fireball.loafer.jp/kes/js-object-instantiation.html" />
		<published>2008-08-04T20:04:01+09:00</published>
		<title type="html"><![CDATA[オブジェクトの生成]]></title>
		<updated>2008-08-04T20:04:01+09:00</updated>
	</entry>

</feed>