- JSONLint
- This tool validates that JSON data is valid or not.
- It does not deal with JSON schema.
- JSON Schema Lint
- This tool validates
- JSON schema is valid
- JSON data is valid
- JSON data is valid against JSON schema
Slowing down is exactly what is needed to go fast! The careful, thoughtful and verified work leads to higher quality.
– James Grenning, "Test Driven Development for Embedded C"
Jan 19, 2014
JSON Lint - validation tool for JSON
There are several validation tools for JSON. These tools help you to write and test JSON data or schema.
Jan 12, 2014
INSERT VS COPY: The fastest way to do a bulk insert into PostgreSQL
It takes time to populate lots of data in database by many "INSERT" statements. The official PostgreSQL documentation mentions the topic.
PostgreSQL 9.3.2 Documentation Chapter 14. Performance Tips 14.4. Populating a Database
The chapter shows many options, but I am paying attention to first two.
PostgreSQL commits each statement automatically. That means if you run an INSERT statement, it runs like this for each statement:
It is redundant. In this case, it becomes faster if you use autocommit like this:
PostgreSQL does not commit the statements between BEGIN and END.
COPY is also to use populate data, but the different point is that COPY does not offer autocommit. It means that PostgreSQL commit after all data is populated on a database.
Please refer to the document about how to use COPY statement.
PostgreSQL 9.3.2 Documentation Chapter 14. Performance Tips 14.4. Populating a Database
The chapter shows many options, but I am paying attention to first two.
Disable autocommit
PostgreSQL commits each statement automatically. That means if you run an INSERT statement, it runs like this for each statement:
- Open a transaction
- Insert data
- Close the transaction
It is redundant. In this case, it becomes faster if you use autocommit like this:
BEGIN; -- the beginning of the transaction
INSERT xxxx
INSERT xxxx
END; -- the end of the transaction
PostgreSQL does not commit the statements between BEGIN and END.
COPY
COPY is also to use populate data, but the different point is that COPY does not offer autocommit. It means that PostgreSQL commit after all data is populated on a database.
Please refer to the document about how to use COPY statement.
Auto increment primary key in PostgreSQL
If you want to increment primary key automatically in Postgres, "serial" is a good option.
- PostgreSQL 9.3.2 Documentation Chapter 8. Data Types 8.1.4. Serial Types
- Stackoverflow - Set auto increment primary key in Postgresql
Please that you do not need to specify a primary key to insert data to your database.
Dec 15, 2013
How to fix an error "Unable to find a $JAVA_HOME at “/usr”, continuing with system-provided Java"
Somehow, I have got this error whenever I run Java command:
Unable to find a $JAVA_HOME at “/usr”, continuing with system-provided Java
$java -version
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
I found the same error as my case at the stackoverflow.
This happens when $JAVA_HOME is not set correctly. In my case, the following works form me.
export JAVA_HOME="$(/usr/libexec/java_home)"
My environment is as follows:
- OS X 10.9
- Java 1.7.0_25 (installed by brew)
Sep 12, 2013
Install R with homebrew under Montain Lion (Mac OS X 10.8.X)
You need to install gfortran before R.
$ brew install gfortranYou might find that you don't have XQuartx. Please download and install it at https://xquartz.macosforge.org.
$ brew install R
Unsatisfied dependency: XQuartz
Homebrew does not package XQuartz. Installers may be found at:
https://xquartz.macosforge.org
Error: An unsatisfied requirement failed this build.
After you install XQuartz, you can install R like this:
$ brew install R
Sep 7, 2013
Ant 1.8 "warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds"
I installed Ant 1.8 and build Java applications with Ant. Then, I found the following message:
http://ant.1045680.n5.nabble.com/warning-includeantruntime-was-not-set-td2639463.html
There were incompatible change on Ant version 1.8. So, you may find the same message if you build old ant file with Ant 1.8.
Please just add includeantruntime="false" to javac task.
warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable buildsYou can find a good explanation of this warning with following link:
http://ant.1045680.n5.nabble.com/warning-includeantruntime-was-not-set-td2639463.html
There were incompatible change on Ant version 1.8. So, you may find the same message if you build old ant file with Ant 1.8.
Please just add includeantruntime="false" to javac task.
Jun 2, 2013
How I did interpretration for TDD workshop by James Grenning at #agilejapan
I did interpretation for TDD workshop by James Grenning, the author of "Test Driven Development for Embedded C" at Agile Japan 2013 on May 24th. This was first time for me to be interpreter at a conference.
I think you think that step 3, automatic language exchange, is interpretation but I have to do more because we want to avoid loosing original speaker's intention and to tell it people in an easy-to-understand way.
(1) I had enought time to aquire specialized knowledge for target area
Thank you Akiyuki-san, supervisor for translation. We did translation of material and interpretation at workshop. He gave me lots of advice. I could do it because he helped me.
Thanks you James. My interpretation was not like professional interpreter. James helped me : ) I have to say thank him for his open mind for my proposal.
If I will have next chance for interpretation, I will do better. I have confidence now :)
This time was good lesson for me. I summarized my experience so that this entry also become good lesson for some other people.
Why did I become one of interpreters for the workshop?
Let me tell you about history that I became interpreter fot the workshop.
I am an organizer of study group for "Test Driven Development for Embedded C" in Tokyo, Japan and I also was a reviewer for Japanese translation of the book. When translation was going to an end, I proposed to Akiyuki Takoshima, a supervisor for translation, that we invited James to Japan for publication party for translation. We thought Agile Japan was the best for it because it was planed to held after publication and organizers of Agile Japan usually invite keynote speaker from foreign country, mostly US.
I expected that it would be difficult negotiation but the answer from Kenji Hiranabe, one of organizers, was very good. He said "Oh, that's nice idea. I have wanted to invite him to discuss about importance of quality in agile software development". Then Agile Japan organizer started negotiation and I and Akiyuki started preparetion for TDD workshop.
Basics of technical interpretation
Next, I want to tell you about technical interpretation.
You may think interpretation is just word exchange of different languages. I think real interpretation is more than that. In my opinion, we do interpretation as follows:
Maybe this is almost same as what non-native English speaker do when they talk in English...
- Understand what speaker said
- Understand its intention and digest result of step 1
- If we don't understand its intention, we have to ask speaker
- Just exchange result of step 2 from original language to target language
- Change result of step 3 in natural and simplified expression and talk to other people
- We do step 3 and step 4 at a time
To do this, we need both language skill and specialized knowledge for target area because we have different terminology each area. If we don't care about that, attendee don't understand what speaker say.
For example, in the case of translation, we often found that reviewers on amazon.co.jp write comment for translation of technical book that quality of translation is very bad.This is because there are problems on either step above.
- Problem on step 1: translator don't understand original text
- Problem on step 2: translator don't have enough knowledge for target area
- Problem on step 3: translator don't improve quality of translation
Then what do interpreter do during workshop?
It depends on workshop. I basically think that interpreter there are two tasks.
- Tell trainer's explanation to attendee
- Help question and answer
No big deal. That's it.
Tell trainer's explanation to attendee
For this, interpreter see trainer carefully and waits good time to interpret. Then good time come, interpreter tells it to attendee. Trainer sometimes tell us about timing for interpretation but he/she usually want to focus on what he/she say and attendee's reaction . So interpreter should manipulate timing.
Help question and answer
For this, it is easy. We just hear question from attendee, check its intention and tell it to trainer. When trainer answer then we do opposite.
What do interpreter should prepare?
(1) acquisition of specialized knowledge for target area
As I wrote above, we need specialized knowledge for target area to interpret. we have to read whole workshop material. We also should read trainer's blog, interview article or movie to understand content of workshop, trainer's way of speaking/pronunciation.. If we do, we can understand what trainer say easily.
(2) Practice of interpretation
I think shadowing is easy and best for practice of interpretation. There are good books for interpretation. If you are interesting in practice, please refer the books.
Retrospective for this time
Keep(Good point, what I want to continue)
(1) I had enought time to aquire specialized knowledge for target area
Before workshop, I held study group, wrote interview article, reviewed translation of the book and translated workshop material. I knew everything. No worries about that :)
(2) I had meeting with trainer twice before workshop
I had meeting with trainer 1 week before and 2 hour before workshop. I could solve our question such as timing for Q&A, laptop for demo, etc.
(3) I could do interpretation without any eye contact
In this time, interpreter manipluated timing for interpretation so that trainer can focus on what he/she say. We sometimes made mistakes but we did good job in general.
Problem
(1) We translated workshop material then trainer couldn't read it
In this time, we are not professional interpreter. So we thought we should show Japanese translation of workshop material so that attendees can understand it easily. But trainer couldn't read it and sometimes didn't know what to speak next. This is not big problem because he had original version of material and we can tell. But this was not good for trainer's cognitive load.
(2) We couldn't interpret jokes
Trainer often said jokes because he want attendees to be relaxed. But joke is difficult to interpret. Sorry James :(
Try(What to improve)
(1) Keep original text on material and add Japanese subtitle
This is good for both of trainer and attendee. Kenji Hiranabe, interpreter of keynote, did this.
(2) Interpret jokes
We need sens of humor? ummm :(
In the End
Thank you Agile Japan organizer for giving me a chance to interpret. It was very good lesson for both of TDD and interpretation. This chance must improve my interpretation skill. It was good experience for my life :)Thank you Akiyuki-san, supervisor for translation. We did translation of material and interpretation at workshop. He gave me lots of advice. I could do it because he helped me.
Thanks you James. My interpretation was not like professional interpreter. James helped me : ) I have to say thank him for his open mind for my proposal.
If I will have next chance for interpretation, I will do better. I have confidence now :)
Subscribe to:
Posts (Atom)