Skip to content

Instantly share code, notes, and snippets.

View ikesyo's full-sized avatar
🏠
Working from home

IKEDA Sho ikesyo

🏠
Working from home
View GitHub Profile
@kishikawakatsumi
kishikawakatsumi / Rakefile
Last active August 29, 2015 13:56
Rakefile for testing, building and uploading to Testflight/Crittercism
require "rubygems/version"
require "rake/clean"
require "date"
require 'time'
require "json"
require "open3"
# Application info
APP_NAME = "Ubiregi2"
SDK = "iphoneos"
@norio-nomura
norio-nomura / PerformanceTests.swift
Last active August 29, 2015 14:21
Test recursion on Himotoki
import Foundation
import XCTest
import Himotoki
class PerformanceTests: XCTestCase {
func testRecursion() {
let JSON = deepNestedJSON(0)
self.measureBlock {
var t: Test? = decode(JSON!)
@esehara
esehara / code_review.md
Last active August 29, 2015 14:24
【pplogより再掲】 コードレビューについて (元: 仕事の無能感について)

仕事をやっていると、「レビューがなかなか通らない」とか「自分が担当した部分で不具合が発生している」とか、あるいは「見返すと自分の書いたコードが要領を得ない」ということがあり、これらの指摘自体は、コードの質を担保する上で大切なことなのだが、しかしこれが続くと、だいたい自尊心みたいなのが削られていって『向いていなんじゃないか』とか『足を引っ張っているのではないか』とか、そういった自己否定的な意識につながっていくことに気がついいた。

不具合とか、あるいは再レビューがない方が良いのは、これはその通りであるので事実だが、問題は、コードレビューは人格否定ではないにしろ、それが続くとなると自分の能力に疑いを持ち始めるという、そういう構造的な問題なのだと思う。なので、これをうまく払拭する必要があるわけで、これ自体は結構大きなテーマなので、ある程度固まったらブログに書くかもしれない。

それはともかくとして、そういった側面とは別に、自分自身が「どうやって自尊心を保つか」ということは必要になるとは思うので:

  1. 自分が過去にマージリクエストやコミット数を数えて「なかなか貢献しているじゃないの」というのを思い出す(今確認したら案外貢献していた)
  2. 他人のミスを直した部分を確認して「俺もなかなか治しているし、お互い様だなー」という気持ちを取り戻す
  3. たまには趣味のブログでも書いて「こういうことを考えられているのだから、まだまだ磨耗していないな」ということを確認する
  4. 趣味プロジェクトを始めてみる
@mcmire
mcmire / current_controller_and_action.rb
Created December 31, 2010 08:54
Hacking Padrino to store current "controller" and "action"
# Put this in lib/current_controller_and_action.rb
module Padrino
module Rendering
module InstanceMethods
private
# Override render to store the current template being rendered so we can refer to it in the view
# This works with Padrino >= 0.9.10
def render(engine, data=nil, options={}, locals={}, &block)
# If engine is a hash then render data converted to json
@jonsterling
jonsterling / .gitignore
Created May 14, 2011 22:57
The Type Class Idiom in Haskell, Scala, C++, and Objective-C
*.class
*.swp
@cqa02303
cqa02303 / gist:1193858
Created September 5, 2011 01:28
dispatch_syncに絶望してこんな事をしている
__block dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
dispatch_async(queue, ^{
// hogehoge
// ここに処理を書く
//
dispatch_semaphore_signal(semaphore);
});
dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
dispatch_release(semaphore);
@novi
novi / gist:1486278
Created December 16, 2011 14:37
オレオレUIViewControllerコーディングガイドライン
#import <Foundation/Foundation.h>
@interface UILabel (ktlib)
- (void) fitSizeOfFont:(UIFont *)font;
@end
@Irio
Irio / PropositionListActivity.java
Created July 24, 2012 01:08
Android - How to move ActionBar.Tab's icon as your needs (example using ActionBarSherlock)
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.Tab;
import com.actionbarsherlock.app.SherlockActivity;
import android.os.Bundle;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.Menu;
@tomohisa
tomohisa / ViewController.m
Created July 25, 2012 01:09
Add ChildViewController Help Method.
#pragma mark - help functions
-(void) addChildViewControllerWithIdentifier:(NSString*)identifier inArea:(CGRect)rect closeOtherChildView:(BOOL)isClose toView:(UIView*) toView{
if (isClose) {
for (UIViewController* vc in self.childViewControllers) {
[vc.view removeFromSuperview];
[vc removeFromParentViewController];
}
}