Skip to content

Instantly share code, notes, and snippets.

View tmitz's full-sized avatar

tmitz tmitz

View GitHub Profile
@sunaot
sunaot / exception.md
Created August 2, 2013 09:13
例外設計の話

例外設計の話。

こんな指針がいいのかなー 2013 夏 ver.

例外の目的とは?

.NET の「例外のデザインのガイドライン」にもこう書いてある。

@shinyaohira
shinyaohira / App States and Multitasking.md
Last active October 5, 2023 07:57
アプリケーションの状態とマルチタスキング

全体的に簡略化し、必要と思われる部分を抜粋しました。

  • Not running

    アプリは起動されていないか、実行されていたけれどもシステムによって終了されています。

  • Inactive

@sunaot
sunaot / if.md
Last active October 2, 2019 15:15
条件分岐とのつきあい方

条件分岐とのつきあい方

プログラムが複雑になる一番の理由は条件分岐 (if 文など) です。

条件分岐がなければ、一本道で読み下していけばいいのでバグが入り込む余地は大変少なくなります。

ということで、

  • 条件分岐を書かなくていいように書く
  • 条件分岐を書くなら、わかりやすく局所化して書く
@ryansobol
ryansobol / gist:5252653
Last active November 4, 2025 18:51
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@mattn
mattn / dash.vim
Last active December 13, 2015 21:09
function! s:dash(...)
let word = len(a:000) == 0 ? input('Dash search: ') : a:1
call system(printf("open dash://'%s'", word))
endfunction
command! -nargs=? Dash call <SID>dash(<f-args>)
@kazuho
kazuho / gist:4122754
Created November 21, 2012 03:00
The "queue_stats()" function, introduced in Q4M 0.9.7
How it looks like
==================================
mysql> select queue_stats('t');
+------------------------------------------------------------------------------------------------------------------------------+
| queue_stats('t') |
+------------------------------------------------------------------------------------------------------------------------------+
| rows_written: 0
rows_removed: 0
wait_immediate: 0
@hayajo
hayajo / changelog_en.md
Last active April 1, 2025 14:37
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@ritou
ritou / gist:3149557
Created July 20, 2012 08:21
OpenID Connect Session Management Demo