スティーブジョブスに俺はなる!!

毎日全力を出し切り、自分史上最高を出し続けたい!

資本金は1億円以下が有利という罠

www.nikkei.com

資本金1億円だと中小企業と認定されるため税制上の優遇措置を受けられるらしい。要は資本金を1億円以上にしないほうが良いという事なのだろう。

サービス開発TIPS

www.loftwork.jp

良い会社組織を造る方法:「スタッフのモチベーションを上げる」

日経 Associe、星野リゾート社長のインタビュー記事が出ていた。

 

Q.数々の経営難ホテルを再生した秘訣とは?

A.再生をさせる順番がある。

1.スタッフのモチベーションを上げる。

具体的にはスタッフにとって「良いニュース」(待遇改善、組織のフラット化)から始める。

コストカットなどの「悪いニュース」を最初に出すとモチベーションが下がる。

2.コンセプト作り

スタッフの「こういうサービスをお客様に提供したい」という自発的なモチベーションを活かし、スタッフを主体にコンセプトを作る。

 

Q.社内の情報共有を阻害する要因は?

A.情報の行き来が悪い組織文化

組織がフラットでないと情報が隠される傾向にある。そうすると、裏で愚痴を言うようになる。裏で愚痴を言っても、意思決定者がいないので解決しない。愚痴が溜まって辞めて行く。退職の一番の理由は「一身上の都合」ではなく「業務上の都合」である。

 

Q.成果を上げるコツは?

A.時間は有限なので「やらないことを決める」

・必要でない会食はしない

・自分が出たくない会議には出ない

など、自分の予定を見て楽しい物が並んでいると結果的にパフォーマンスが上がる

 

「やらなければいけない」と思っている事に対して本当にそうなのか疑ってみる事が重要。

 

もっと詳しいインタビューは日経Associe 2015年1月号に載っています。

日経ビジネス Associe (アソシエ) 2015年 01月号

日経ビジネス Associe (アソシエ) 2015年 01月号

  • 作者: 日経ビジネスアソシエ
  • 出版社/メーカー: 日経BP社
  • 発売日: 2014/12/10
  • メディア: 雑誌
 

 

えっ、サービスクラス作るの?・・・・

Grails Quartz Plugin のインストール〜設定まで - SpaceNetの開発ログ

 

順調にJobを作れるかと思いきや、最悪や・・・

Job内でコントローラーを実行する事が推奨されてないらしい。。。

Grails Invoke a controller method from a scheduled job - Stack Overflow

 

出来るには出来るらしいが・・・

you can call new MyController().method(), but no beans will be injected into controller by default.

 

 

今までサービス一切使わずにコントローラーに書き込んできた。

この際、全部サービスに書き込むか・・・・

 

また余計な作業が増えたorz

 

 

[Grails]Serviceを使ってみる - Qiita

Groovy - [Grails]servicesで直接SQLを実行する方法 - Qiita

 

Grails Quartz Plugin のインストール〜設定まで

Grails Plugin: Quartz plugin for Grails

build.gradleに追加

compile 'org.grails.plugins:quartz:1.0.2'

 

コンパイルしてインストール

[local] % gradle grails-compile

 

Jobクラス作成

[local] % gradle grails-create-job -PgrailsArgs="MyJob"

 

とりあえず、Jobクラスの中身はこんな感じにしておく

class MyJob {

    static triggers = {

      //simple repeatInterval: 5000l // execute job once in 5 seconds

cron name: 'myTrigger', cronExpression: "10 * * * * ?"

    }

def group="MyGroup"

def description = "Example job with Simple Trigger"

 

    def execute() {

print "Job run!"

        // execute job

    }

}

 

設定ファイル作成

[local] % gradle grails-install-quartz-config

 

 

homebrewをMacにインストールする。

homebrewを入れる

※すぐ終わると思ったが、なんか面倒くさいことになった・・・

 

ますは、Command Line tool for Xcodeのインストール

[local] $ xcode-select --install

 

[local] % ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
[local] % rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
zsh: /usr/local/bin/brew: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin: no such file or directory
[local] % ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You have not agreed to the Xcode license.
Before running the installer again please agree to the license by opening
Xcode.app or running:
sudo xcodebuild -license

[local] % sudo xcodebuild -license

WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:パスワード入力


You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'

Enterボタン押下

(中略)

EA1187
8/14/2014


By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree

You can view the license agreements in Xcode's About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf

[local] % ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/lib/pkgconfig

Press RETURN to continue or any other key to abort

RETURN押下

==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/lib/pkgconfig
Password:パスワード入力

==> /usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 3560, done.
remote: Compressing objects: 100% (3408/3408), done.
remote: Total 3560 (delta 35), reused 1474 (delta 19), pack-reused 0
Receiving objects: 100% (3560/3560), 2.70 MiB | 672.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.
From https://github.com/Homebrew/homebrew
* [new branch] master -> origin/master
Checking out files: 100% (3562/3562), done.
HEAD is now at 6a58bd1 afl-fuzz: update 1.77b bottle.
==> Installation successful!
==> Next steps
Run `brew help` to get started
[local] % brew -v
Homebrew 0.9.5