11t

gears, code, shoots

First Bit of Objective-C

I think I know very basics of Objective-C for objective way.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using namespace Cedar::Matchers;
using namespace Cedar::Doubles;

@interface Greeter : NSObject
- (id)initWithName:(NSString *)name;
- (NSString *)sayHello;
@property (copy) NSString *name;
@property (assign) NSString *helloWord;
@end

@interface Greeter ()
- (void)setWord;
@end

@implementation Greeter
- (id)initWithName:(NSString *)name {
  self = [super init];
  self.name = name;
  return self;
}

- (NSString *)sayHello {
  [self setWord];
  return self.helloWord;
}

- (void)setWord {
  NSMutableString *word = [NSMutableString stringWithString:@"hello"];
  if (self.name != nil) {
    [word appendString:@", "];
    [word appendString:self.name];
  } else {
    [word appendString:@" !"];
  }
  self.helloWord = word;
}
@end

SPEC_BEGIN(Sandbox)

describe (@"Greeter", ^{
  it (@"can be initialized with name", ^{
    Greeter *man = [[Greeter alloc] initWithName:@"shin1ohno"];
    man.name should equal(@"shin1ohno");
    [man sayHello] should equal(@"hello, shin1ohno");
  });

  it (@"says hello", ^{
    Greeter *man = [[Greeter alloc] init];
    [man sayHello] should equal(@"hello !");
  });
});

SPEC_END

Calendar Gem

I recently create a gem called event_cal.

as of today, the gem has been downloaded over 1,500 times. amazing.

Objective-C for RSpec Guy

RSpec helps me a lot when coding ruby. so, I want a BDD environment like RSpec for Objective-C, too.

I’m now trying Cedar made by Pivotal Labs a creator of Jasmine.

here’s first few commands to introduce Cedar.

1
2
3
git clone git://github.com/pivotal/cedar.git
cd cedar
./installCodeSnippetsAndTemplates

as prompted, restart Xcode and you are ready to use new code snippets and templates. the templates are available under the Cedar section in XCode new file wizard.

OK, let’s start creating Objective-C app.

Being an Engineer

I’ve been working as an engineer at cookpad for few month.

yes an engineer. some of you may be surprised. I write codes every day

here’s what I learned

  • simple: remove function and change your business process. don’t implement new functions without removing exsting one. don’t solve problem with new functions. adding many functions or changing uis makes your product confusing in many case
  • be trackable: always be trackable. most of us don’t have excellent sense for build product like steve jobs. track everything and keep making your product better. don’t discuss without/before tracking. that’s waste of your time.
  • just plan-ship-track: don’t waste your time. just ship and see what people do or say. but have some time for planning before implement something. that makes your product simpler and trackable

these are very basic things that I said to my staff many times as an manager. but I know I don’t understand single one of them now. writing code and shipping product makes things clear.

really fun to me.

anyway, always think of these 3 things above and change the way you use your time.

New Bike Frame

got new frame ‘look 695 SR’. yay !

  • pros
    • very very stiff and respond well
    • comfortable: fits very well and absorbs road noise
    • light enough: 6.4kg with pedal and water bottle
  • cons
    • crank is very stiff and light but cause gear noise when change gears to outer-low position
    • crank arm can’t be no shorter than 170mm
    • long head tube

great frame to ride, great frame to stare…

new bicycle frame by Ohno Shin'ichi (shin1ohno)) on 500px.com
new bicycle frame by Ohno Shin’ichi

Mirrorless Camera

my wife bought a mirrorless camera ‘olympus e-pm1’.

here’s a comparison between 3 cameras

  • canon s95: compact camera
  • canon 10d: old dslr
  • e-pm1: brand new camera

first of all, e-pm1 shots very well. hight iso speed is great for shooting an animal and dark situation

Looking for a New Frame

i’m looking for a new bycicle frame.

  • what i want:
    • head tube is no longer than 120mm
    • looks nice in smallest size, like 47/48cm
    • weights no more than 1kg

here’s the candidates.

  • look
    • 695: proprietary chain sets and tall head tube sucks
    • 595: looking good but a little bit old
    • 586: looking good but 595 looks better
  • cervelo
    • R5: hmm… 48cm frame looks ugry
    • S5: rides very well but 48cm frame looks ugry
    • R3sl: no stock
    • S3: no stock
  • cannondale
    • super six evo: super light and rides very well, but very high price point
  • bmc
    • tmr01: delivery starts next year
    • slr01: hmm…