본문 바로가기

Programming

IntelliJ 를 사용하는 이유와 유용한 팁 모음 (14 버전 기준) 예전에 발표 자료를 만들어 둔 것인데 다른 분들에게도 유용할 거 같아서 공유 합니다. 더보기
unit test 가 아닌 것들 unit test 를 작성할 시 참고할 만하여 정리한다. unit test 가 아닌 것들은 아래와 같다. 이러한 테스트 들은 Integration 테스트를 통하거나, mock 을 이용하여 테스트 하는 것이 바람직하다. 데이터 베이스와 통신하는 것네트워크를 통해 테스트파일 시스템을 건드리는 것다른 unit test 와 동시에 실행이 되지 않는 것들실행 하기 위해서 특정한 환경변수를 건드려야 하는 경우 더보기
Scala 병렬 계산을 위한 Blitz library Scala 로 병렬 프로그래밍을 하고자 할때, primitive 값들 위주의 parallel operation 을 진행하고자 한다면, scala blitz library 를 사용하는 것이 훨씬 빠르다. import scala.collection.par._ import scala.collection.par.Scheduler.Implicits.global object Blitz extends App { val array = (0 until 100000).toArray // JVM JIT optimization 을 고려하여 충분히 해당 expression 들을 수행한뒤(1000번) body 를 수행 val seqtime = warmedTimed(1000) { array.reduce(_ + _) } val pa.. 더보기
Scala Palallelizable Collection scala collection 에서 병렬화가 가능한 것들이 있는데, Array, ArrayBuffer, mutable HashMap, HashSet, Range, Vector 가 있다. 이 것들은 단순히 par 함수를 호출함으로서 parallel collection 으로 변환 가능한데, 각각의 element 들의 복사가 이루어지지 않아서 속도가 빠르다. val arr = Array(1,2,3) val parArr = arr.par 더보기
IntelliJ tomcat 구동시 유의사항 IntelliJ 로 Web application 을 구동하는 경우에 war: exploded 혹은 war 로 deploy 를 하게 된다. 보통 web application 을 개발할 시 maven 을 사용하게 되는데, IntelliJ 에서 제공하는 Make 는 library dependency 를 잘 고려하 여 컴파일을 하지만, tomcat 을 이용하여 deploy 할 경우, dependency 들을 잘 반영하여 war packaging 을 하지 못한다.그리하여 maven pom.xml 파일에 library 들을 잘 명시하더라도 막상 해당 web application 을 구동하면 NoClassFound Exception 이 발생한다.이를 방지하고자 maven 으로 package 혹은 compile 을 이.. 더보기
Linux cron vs Spring cron Linux cron 을 설정하는 것은 아래와 같다.# minute hour day month week 하지만 Spring 에서 @Scheduled annotation 을 사용하여 cron 을 설정하는 것은 아래와 같다.# second minute hour day month week 차이점은 Spring 에서 cron 은 초 단위로 cron 이 진행된다. 더보기
slick maven setting I have been working on developing Database CRUD application in Scala nowadays. As you know, writing CRUD application in Java or Scala is very tedious and needs a lot of boilerplate codes.So before knowing Slick, I have to implement all the DB connection and CRUD codes manually. But, I come to know there is a convenient component called 'Slick' which does such jobs. So I chose Slick for my DB app.. 더보기
scala download Scala 2.10.3 download http://www.scala-lang.org/download/2.10.3.html You can find scala compiler and libraries and documentation. 더보기
Setting up logback in Java and Scala project Logback is promising log library I think, So in this time, I am going to set up logback in Java and Scala project using maven. Setting up logback is quite straitforward and simple. At first, you have to download maven dependencies.Things to remember you have to, org.slf4j library and ch.qos.logback libraries version should match each other. Otherwise, you have error message during executing prog.. 더보기
Using markdown in GNU Emacs 24.3 on MacOSX Using markdown is little bit difficult. For easy use and future reference, I am writing this article. 1. Visit below site and look around and get some useful tips.http://www.emacswiki.org/emacs/MarkdownMode 2. emacs markdown mode is now currently managed on below site. Visit and download markdown-mode.elhttp://jblevins.org/projects/markdown-mode/ And place markdown-mode.el to ~/.emacs.d/lisp, if.. 더보기