記事メモ

Your code should be as boring as possible

コードはなるべくつまらない方がいい? 細かいことを意識せず仕様だけ意識してコード書いてる時って結構生産性が高かったりするんだけどそういう方向の記事だろうか(読んでない

The 5 types of programmers

5種類のプログラマがいるよ、と。問題箇所だけ直して「動くからいいじゃん!」みたいな奴とか頭でっかちで全然コード書かないプログラマとか、いるでしょ?

How should I get started with programming? Which language should I learn first?

How should I get started with programming? Which language should I learn first?
不定期・てきとう和訳シリーズ。中途半端だけどうp
なんか我ながら日本語がアレな気がする

How should I get started with programming? Which language should I learn first?
どうやってプログラミングを始めるべき?そしてどんな言語を学ぶべき?

I get these questions frequently. 
Keep in mind that I only “got started” programming once, and that was a very long time ago during which I was primarily thinking about which girls I liked (since I was 13 years old). 
But here’s how I think it works, especially for adults coming to programming for the first time:

The best way to get started is to rethink the question to be more pragmatic:
最適な答えをさがすため、実用的に考えなおしてみよう

最初に何をする?

What do you want to make first?
最初に何をする?

Be specific. 
The answer isn’t “iPhone apps” or “websites”. 
An iPhone app or a website to do what, exactly?


If you don’t have a specific idea that you’re motivated to create, you’ll have a very hard time getting started and plowing through the hard parts. 
And there will certainly be hard parts: you’ll get frustrated, go to Google, find some guidance, bang against it for a while, then finally get it working and experience immense satisfaction for as long as you can go before hitting the next wall of frustration. 
Fortunately, as you get more experienced, you’ll hit those walls less frequently.

If you have a specific idea, the goal of achieving it and the incremental progress along the way will motivate you to keep going. 
If you don’t, every little frustration will be an excuse to give up.

Once you have that specific idea, the other questions become much easier to answer:
どの言語を学ぶべきか?
 Which language should I learn first? 
 The most platform-native, modern, commonly used language for the kind of thing you want to make. 
 If it’s an iOS or Mac app, use Objective-C. 
 If it’s a web app, use Python with the Django framework, or Ruby with the Rails framework. 
 If it’s a Windows app, use C#.
 どの言語を学ぶべきか? 
 あなたの作りたい物のための、沢山のプラットフォームネイティブであり、モダンでよく使われている言語があります
 iOS又はMac用のアプリならばObjective-Cを使いましょう
 Webアプリならば、Python+Django 又は Ruby+Railsを使いましょう
 WindowsアプリならC#を使いましょう

 No language is “too hard” for first-timers. 
 Programming is naturally complex and unforgiving, and that’s going to be intimidating at first. 
 You’ll face the same challenges as a new programmer in any language.
 初心者にとって「超難しい!」言語なんてないよ!
 プログラミングってのは生まれながらに複雑で容赦がない、そしてそれが最初に君を恐れさせる
 君はどれの言語でも、新人プログラマとしていくつかの課題に直面するだろう
どうやって始めようか?
 How should I get started? 
 Search Google for a basic tutorial or find an entry-level book on how to make the kind of thing you want to make in your chosen language. 
 Do a few tutorial projects, learn how to modify them to get a bit more comfortable with the language, then start your own project and deal with each wall as you hit it.
 どうやって始めようか?
 選んだ言語について、Googleでチュートリアルを探す、それか初心者向けの本を探して買おう
 いくつかのチュートリアルを行い、それらを解いて言語に対する安心を得たら、
 あなたのプロジェクトを開始してそれぞれの壁に対処しましょう
If you find that you truly enjoy programming, you’re very lucky: it’s a highly fulfilling hobby and can become a lucrative career if you want it to be.

Good luck.

x64での開発について

最近たまにやるようになっているので、メモ

というのもこんな糞なC言語のソースがあったんですよ

void Foo(struct Hoge hoge) /* x64環境だと呼び出し時stack overflow */
{
}
int main()
{
 const size_t a = sizeof(Hoge); /* だいたい20k */
}

とりあえずhogeをポインタにして動いた
まあそんだけです

VC2010がとまってくれない件

  • ある条件(ホントにわからない)で、ブレークにとまらない現象が起こる。
  • そして該当箇所には「元のソースとコンパイルしたasmが違うから止まれん」的な文字列が出ている。リビルドしても変わらん。なんでだろう
  • ツール>オプション>デバッグ>全般>元のコードと完全に〜」のチェックを外すとちゃんと止まるようになります。
  • でもこれがデフォルトでオンってことはちゃんとひっかからないのはバグなんじゃないの?と思いたくなるよねっていう
  • とりあえずOFF固定で問題ないと思います。なんか癪だけど

最近読んだ記事まとめ

ガジェット的な

FPS的な

ネタ的な

なんか日記を書くと当たるそうなので

書いておきます
MacBook Air 11インチ欲しい!
Mac持ってないからなー。当たったらXcode買ってあいほんアプリとか作るおしごとを勝手にやろうかなと思いますね

いまさらの2010まとめ(雑記)

個人的には勉強会元年といった感じ
8月頃のわんくま横浜に行ってから、勉強会にちょこちょこ顔をだしました

色々なとこに顔を出して、今のままだと腐るなーって感じを持った
12月頃には会社の微妙さも手伝ってより転職傾向に傾く感じに
それにあたって、先立ってアウトプットを作ろうとかそういうことをずっともやもや考えていたり

転職は小さいベンチャーみたいなとこがいいなと思うなあ、とこういった記事を読んで漠然と思うようになりました。


我ながら「本気だす」感がまったくありませんのでそういう意識改革もちょっと必要かなと思う
さてはてどうしましょっかね

2011目標

  • なんか勉強会とかで喋る
  • 転職をする

大きく2つ。だけどブレイクダウンすると沢山。こんな感じでいきましょう