聞こえないJavaエンジニアが適当に書き連ねていく

つらつらとメモしたり日頃の溜まっている想いを吐き出す場所です。

#JavaDayTokyo 2018に参加した

JavaDayTokyo 2018に参加して今時のJavaについて触れてきた。

 

Javaのリリースのやり方が変わったり、Java EEEclipseに移管されてJakarta EEになった最初のJava Day Tokyoだったからか、それ系のセッションが非常に人気があって、立ち見も出ているほど。

Javaはオワコンとか言われてるけど、それでも#JavaDayTokyo がTwitterのトレンド入りする程なので、Javaはまだまだ終わらないぞという気持ちになれた。

 

その一方で、Javaは今までの進め方を見直して、色々と改善しているのにそれを使う我々がいつまでも旧態依然のやり方のまま、というのはよくないなと反省もした。

出来るところから少しずつ改善していかないと…って毎年この手のイベントに参加して思うのだけど、成果を挙げられていない自分に猛省する。

 

今回は手話通訳なし、ソロでの参加だったのでスライドとTwitter実況を頼りに内容を理解していました。Twitter実況して下さった皆様、ありがとうございます。

社会人17年目がスタート

2002年入社組なので、働き始めて17年目。

 

新卒入社してからずっと同じ会社で働き続けているので、ちょっと飽きも感じてはいるわけですが…

 

かといって、他のところで通用する技術を持っているわけでもないので、引き続き今のところで無駄な足掻きを続ける所存であります。

 

とりあえず、おっさんなりに今年度も何か1つ、技術を覚えたいものです。例え、その技術が2週くらい周回遅れだったとしても。

Java10での文字列結合のパフォーマンスを測定してみた #Java10

これは何?

2018/3/21にJava10が正式にリリースされました。
Java9での比較で使ったプログラムを使ってJava10でどうなったか確認してみます。

前提

これと同じプログラムを使ってテストしました。 qiita.com

Java9での比較結果はこちらです。

tadashi.hatenablog.com

githubのソースの場所はこちら。 github.com

jmhの起動方法などはこちらにまとめています。 https://github.com/suzukitadashi/jmhTest/blob/master/jmhTest/command.txt

テストした端末のスペックなどは以下の通りです。

  • Windows10 64bit
  • Intel(R) Core(TM) i7-2820QM CPU @ 2.30GHz
  • メモリは8GM

結果

細かいログなどは下記URL先のファイルを参照してください。

github.com

ここではグラフ化したものをまとめます。

f:id:su_zu_ki_1010:20180321203855p:plain

f:id:su_zu_ki_1010:20180321203934p:plain

f:id:su_zu_ki_1010:20180321204014p:plain

Java9の時と傾向は同じで、半角数字の時はJava8よりパフォーマンスがよくなっているのですが、それ以外の時はJava8の方がパフォーマンスがよいという結果が出ました…。
文字列結合のパフォーマンステストは難しいです…

Spring.ioで作成した #Kotlin + #Spring の雛形を動かそうとすると java.lang.ClassNotFoundException: kotlin.reflect.KotlinReflectionInternalError が出る対応

これは?

”Kotlin Webアプリケーション 新しいサーバサイドプログラミング” を写経しつつKotlinを勉強していて、はまったのと日本語の記事がヒットしなかったのでメモを兼ねて記録しておく。

前提

  • https://start.spring.io/ を用いて雛形を作成した。
  • Springのバージョンは書籍に合わせて1.5.10にした。

生成された build.gradle の内容

buildscript {
    ext {
        kotlinVersion = '1.2.20'
        springBootVersion = '1.5.10.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
        classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
    }
}

apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
    kotlinOptions {
        freeCompilerArgs = ["-Xjsr305=strict"]
        jvmTarget = "1.8"
    }
}
compileTestKotlin {
    kotlinOptions {
        freeCompilerArgs = ["-Xjsr305=strict"]
        jvmTarget = "1.8"
    }
}

repositories {
    mavenCentral()
}


dependencies {
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('com.fasterxml.jackson.module:jackson-module-kotlin')
    compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
    compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
    testCompile('org.springframework.boot:spring-boot-starter-test')
}

発生するエラー

java.lang.ClassNotFoundException: kotlin.reflect.KotlinReflectionInternalError というエラーが出てしまう。

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::       (v1.5.10.RELEASE)

2018-03-19 16:42:29.978  INFO 4460 --- [           main] com.example.demo.DemoApplicationKt       : No active profile set, falling back to default profiles: default
2018-03-19 16:42:30.228  INFO 4460 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@32cf48b7: startup date [Mon Mar 19 16:42:30 JST 2018]; root of context hierarchy
2018-03-19 16:42:36.081  INFO 4460 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2018-03-19 16:42:36.128  INFO 4460 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2018-03-19 16:42:36.128  INFO 4460 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.27
2018-03-19 16:42:36.520  INFO 4460 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2018-03-19 16:42:36.520  INFO 4460 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 6339 ms
2018-03-19 16:42:36.770 ERROR 4460 --- [ost-startStop-1] o.s.b.c.embedded.tomcat.TomcatStarter    : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.NoClassDefFoundError: kotlin/reflect/KotlinReflectionInternalError
2018-03-19 16:42:36.848  WARN 4460 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
2018-03-19 16:42:36.880  INFO 4460 --- [           main] utoConfigurationReportLoggingInitializer : 

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-03-19 16:42:36.911 ERROR 4460 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at com.example.demo.DemoApplicationKt.main(DemoApplication.kt:10) [classes/:na]
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:123) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:84) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:554) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:179) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    ... 8 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.NoClassDefFoundError: kotlin/reflect/KotlinReflectionInternalError
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:234) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:182) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:177) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:159) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:80) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getServletContextInitializerBeans(EmbeddedWebApplicationContext.java:241) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:228) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:89) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:213) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:55) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196) ~[tomcat-embed-core-8.5.27.jar:8.5.27]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.27.jar:8.5.27]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) ~[tomcat-embed-core-8.5.27.jar:8.5.27]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) ~[tomcat-embed-core-8.5.27.jar:8.5.27]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_152]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_152]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_152]
    at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_152]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.NoClassDefFoundError: kotlin/reflect/KotlinReflectionInternalError
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    ... 26 common frames omitted
Caused by: java.lang.NoClassDefFoundError: kotlin/reflect/KotlinReflectionInternalError
    at com.fasterxml.jackson.module.kotlin.KotlinModule.setupModule(KotlinModule.kt:44) ~[jackson-module-kotlin-2.8.10.jar:2.8.10]
    at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:747) ~[jackson-databind-2.8.10.jar:2.8.10]
    at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.registerWellKnownModulesIfAvailable(Jackson2ObjectMapperBuilder.java:776) ~[spring-web-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.configure(Jackson2ObjectMapperBuilder.java:607) ~[spring-web-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.build(Jackson2ObjectMapperBuilder.java:590) ~[spring-web-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.<init>(MappingJackson2HttpMessageConverter.java:57) ~[spring-web-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter.<init>(AllEncompassingFormHttpMessageConverter.java:66) ~[spring-web-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.web.filter.HttpPutFormContentFilter.<init>(HttpPutFormContentFilter.java:63) ~[spring-web-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.boot.web.filter.OrderedHttpPutFormContentFilter.<init>(OrderedHttpPutFormContentFilter.java:29) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration.httpPutFormContentFilter(WebMvcAutoConfiguration.java:149) ~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$$EnhancerBySpringCGLIB$$19331d3a.CGLIB$httpPutFormContentFilter$1(<generated>) ~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$$EnhancerBySpringCGLIB$$19331d3a$$FastClassBySpringCGLIB$$63a6f4c7.invoke(<generated>) ~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    at org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$$EnhancerBySpringCGLIB$$19331d3a.httpPutFormContentFilter(<generated>) ~[spring-boot-autoconfigure-1.5.10.RELEASE.jar:1.5.10.RELEASE]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_152]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_152]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_152]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_152]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]
    ... 27 common frames omitted
Caused by: java.lang.ClassNotFoundException: kotlin.reflect.KotlinReflectionInternalError
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_152]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_152]
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) ~[na:1.8.0_152]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_152]
    ... 47 common frames omitted


Process finished with exit code 1

対応

compile('com.fasterxml.jackson.module:jackson-module-kotlin') のままだと、2.8.10が選択されるので 2.9.4.1 を明示的に指定する。

buildscript {
    ext {
        kotlinVersion = '1.2.20'
        springBootVersion = '1.5.10.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
        classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
    }
}

apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
    kotlinOptions {
        freeCompilerArgs = ["-Xjsr305=strict"]
        jvmTarget = "1.8"
    }
}
compileTestKotlin {
    kotlinOptions {
        freeCompilerArgs = ["-Xjsr305=strict"]
        jvmTarget = "1.8"
    }
}

repositories {
    mavenCentral()
}


dependencies {
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('com.fasterxml.jackson.module:jackson-module-kotlin:2.9.4.1')
    compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}")
    compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
    testCompile('org.springframework.boot:spring-boot-starter-test')
}

以上でとりあえずエラーが出なくなった。

参考文献

www.itread01.com

新元号に備えて最低限、何をすべきなのか

先日、新元号の発表は2019年2月以降になる見込みとの報道があった。これに対する反応を見ると、システム対応時期が遅れるのが困る、という意見が多数を占めているように思う。

 

これについては、政府に対して言いたいことと、システム側に対して言いたいことがある。

 

まず、政府に対しては、新元号は漢字2文字なのか、それとも2文字ではない可能性もあるのか、をまず明確にして欲しいと思う。ここが現時点で出せる重要な要件定義。回答次第でシステム側が準備しないといけない範囲が決まるからである。

ここが明確にならないと、システム側が最も忌み嫌う、顧客の気持ちを推測して対応するということになってしまう。

 

システム側は、新元号が発表されるまで何もしないというのは愚の骨頂である。

元号を追加する対応は確かにやらないといけないが、ではどこを対応する必要があるのか?どんなテストが必要か?という下調べは現時点でも出来るはず。

和暦を使っているところを、これを機に西暦に変えるという方法も無くはないが、それに見合う費用対効果が得られるかどうかも含めて現在の仕様を把握することが大事。

どこをどう直すのか、全く情報無しで2019年2月まで座して待つのは1番の悪手だということを声を大にして言いたい。

2019年2月以降に慌てて対応して人件費が想定外で高くつくのと、今のうちに新元号対応は工数がこのくらいだから費用はいくらくらい、と見積もって予算を確保しておくのと、どちらがお互い幸せなのか?ということを考えた行動を取りたい。

 

 

 

『ろう者の祈り』を読んだ

朝日新聞出版から出ている、『ろう者の祈り』を読み終えた。

読む前は”ろう者の祈り”とはかなり主語がでかいなぁと思ってたのだけど、読み終えてみるとこのタイトルにした理由はわかる気がした。

 

自分は幸い、日本語の読み書きは小さい頃に厳しく躾けられたおかげでそれなりに支障なく出来ている(と思っているが、周りからの評価はわからない)が、読み書きが苦手なろう者も存在するのは事実。

でも、手話で話してみるとスムーズに会話が出来る。即ち、その人にとっては日本語は第一言語ではなく、自分の気持ちを素直に表せる言葉ではないと言うことになる。

そのような方々にとっては、手話が自分の気持ちを素直に表せる言語ということになる。

 

しかしながら、現在は手話ができる人だけが集まって働ける現場は数少ないので、大抵の人は手話が使えない現場で耐え忍び、働いている。

手話が使えないと言うだけで耐え忍んでいるのに、更に日本語がおかしいと言うだけで差別のような扱いを受け、精神が壊れてしまう人が少なからずいるのが事実。

現場によってどのようなフォローが得られるかは、職業にもよるので一概には言えないが、その人のニーズにあったフォローが受けられるようになって欲しいと思う。

 

全体的によい内容だったので、職場に聞こえない人がいる人には是非とも読んでいただき、ちょっとでもろう者が置かれている状態を考えるきっかけになればそれが一番著者にとって嬉しいことではなかろうか。

 

ただ、一点気になることがある。 

それは、ろう者イコール手話がわかる、と決めつけているような構成になっていること。

ろう者全員が手話がわかるわけではなく、むしろ、手話がわかるろう者の方が全体から見れば少ないと聞いたことがある。

即ち、大多数のろう者は手話もわからず、耳から日本語を聞くことも出来ず、筆談や口の動きのみでコミュニケーションを取っているということである。

そのような方々を全く取り上げていないのは片手落ちではなかろうか。

手話で話す人は全日本ろうあ連盟の傘下にある、地方団体に籍があるか、それ以外の何かのコミュニティに属しているので話を聞きやすい。しかしながら、手話を使わない人はそういったコミュニティに繋がりがないため、話を聞きにくいと言うこともあるだろうが、結果として益々当事者の話を聞けない悪循環に陥っているように見受けられる。

著者は色々悪評も聞くが、曲がりなりにも日本を代表する新聞社の方なので、どうにかしてそういった方々にも取材し、別の立場に置かれた人の祈りも文章にしていただきたい。

 

最後に、Twitterで検索した、他の方の書評へのリンクも載せておく。

 

ameblo.jp

note.mu

senaka-ponpon.blog.jp

 

このブログは本に登場するお方。

syuwakoushi.hatenablog.jp

 

 

 

三菱東京UFJ銀行のウイルス対策ソフトのお知らせを消すたった一つの方法

Moneytreeなどのツールを使っていると、銀行からの重要なお知らせが来ているために口座情報が取れなくてエラーになってイラッと来てしまうことがあります。

 

本当に重要なお知らせの時もあるので仕方ないのですが、三菱東京UFJ銀行の場合は大抵がウイルス対策ソフトのお知らせで、イライラ度がより上がってしまうという弊害があります。

 

しかし、5分ほどちょっと我慢してパソコンから作業するだけで、ウイルス対策ソフトのお知らせがぴたっと止まって、快適になりました。

私は2017年8月頃に作業してからお知らせメールがぴたっと止まっています。

(この時期にシステム改修があって、お知らせメールが止まっただけだったらこの記事の意味も無いけど…)

 

その作業は極めて簡単で、お知らせメールのリンク先から一度、ウイルス対策ソフトをダウンロードする、それだけです。

インストール作業もやるかどうかは個々の判断ですが…。

おそらく、ダウンロードリンクを踏んだ時にシステム内のフラグが切り替わって、メール送信対象から外れるのだと思います。

というか、それ以外に判断できる方法も無いですし。

 

なので、5分ほどの作業をするだけでイライラが消えるなら作業した方がかなりいいはずです。

 

本来は、ダウンロード画面でダウンロードしないし、もうこの類のお知らせメールは不要、と選択できた方が嬉しいんですけどね〜