Books for Today (Japanese Books on Software Engineering)

Stopped by at a books store and picked two books on software requirement engineering.

1. 「要求」の基本原則, 岡大勝/三宅和之 (Oka Hiromasa, Miyake Kazuyuki, The Fundamental Rules of Requirement Engineering), ISBN 978-4-7741-4018-6

2. 要求定義マニュアル, 神崎善司 (Zenji Kanzaki, Relationship Driven Requirement Analysis), ISBN 978-4-7980-2099-0

The first one is a short book and seems suitable to grasp some key ideas quickly (more for thinking tips?).

The other one seems more for step by step, hands on self-trainings.

So I'll try to finish the first one tonite and work on the other one the following week.


Tried Go Language on Snow Leopard

On my Macbook (Mac OS X 10.6) I installed the Go language.

Basically I just followed the instruction after I watched the video on the website:


Added the following environment variables to my .bashrc:
export GOROOT=$HOME/go
export GOARCH=386
export GOOS=darwin

Then sourced the .bashrc (just this time because I did't want to restart my shell):
$ . ~/.bashrc

Installed mercurial($ is my prompt):
$ sudo easy_install mercurial

I've already had python 2.5.4 installed.

Then I tried to checkout source code from the Go language reposository:
hg clone -r release https://go.googlecode.com/hg/ $GOROOT

But then I got some error which seemed to come from my locale setup. For now I added the following to my .bashrc (not sure if that's the best workaround but anyway...):
export LC_CTYPE=C

Sourced .bashrc again, then retried the hg command to checkout the code.
Now it worked!

I've already had the latest XCode installed on my Macbook, so I already have required tools to build Go environment. So I just typed did as follows to build the Go system:

$ cd $GOROOT/src
$ ./all.bash

Then after a few minutes I saw this after lines of build commands:

--- cd ../test
0 known bugs; 0 unexpected bugs

Which means Go's ready here!

So I write my first Go program hello.go:

package main

import "fmt"

func main() {
fmt.Printf("hello, 世界\n")
fmt.Printf("123456789 * 123456789 = %d\n", 123456789 * 123456789)

Attempted to compile:
$ 8g hello

Which tells me:
c0 a4
b3 a6
hello.go:6: illegal rune in string
hello.go:6: illegal rune in string
hello.go:7: syntax error near fmt

Hmmm, multibyte string seems to cause some errors. So for now I change them to simpler "world" for now...:

fmt.Printf("hello, world")

What about the syntax error thing at line 7? By taking a look at the tutorial, I could see that I probably need a semicolon at the end of the line if I put more than one statement in a function (might not be correct to say so... oh, now I found there's some description on semicolons in "Effective Go" page). Anyway if I put at the end of line 6, the syntax error at 7 is gone, but instead this error comes along:

hello.go:7: constant 15241578750190521 overflows int

Sure, it's more than int can handle... So I look for some piece of info on variable types... OK, so there's 64-bit int (described at Printing section of Effective Go at least, and feels like there must be somewhere else too). Now I modify my source code at line 7:

fmt.Printf("123456789 * 123456789 = %d\n", int64(123456789 * 123456789))

Then my source code compiles successfully!
$ 8g hello.go
$ 8l hello.8

So I run the linked binary (unless you specify with -o option your target will be named "8.out" with the 8l command):

$ ./8.out

hello, world
123456789 * 123456789 = 15241578750190521

Examined the result with the bc command (a calculator command usually installed on *nix based systems), and looks right.

So my first Go code worked (except for the multibyte string issue) and I can start playing with the language.


eclipsecoder exception

eclipsecoder plugin wasn't working with c++, so after searching for some info, I installed Mingw. Now it seems working but still an exception shows up.


Wi2 not as good as expected so far

So I tried Wi2 with a coupon code from Bic Camera. Although it says DOUTOR cafes are covered, there are actually few wi-fi enabled DOUTORs even in Tokyo. Very disappointing. Let's see if it gets any better... Besides, the Wi2 site says DOUTOR in Hakozaki has a wi-fi spot, but I haven't been able to confirm that. I just walked by and didn't bother walking in though. It might work inside.

Today's self-study: I reviewed how adjacency matrices can be represented, and some about Floyd algorithm for finding shortest paths.


Wi-Fi Spots in Tokyo, and Self-Study

Today I went to Bic Camera, which sells PCs, TV sets, etc. It's an electric appliance store. They have cameras too, as the name says so. Anyway I found this ad about wi-fi service at 380 yen per month. To me it's bettern than Yodobashi Camera's wi-fi plan (similar chain of stores). Bic Camera's plan covers JR stations and DOUTOR (cafe here like Starbucks) plus Yodobashi's area (so far as I understand). I'm going to give it a try and see if it's any better. You find a lot of DOUTORs in Tokyo, which is a good point (don't really care about how their latte tastes for now).
At Bic Camera I bought a portable heater from SANYO, which is rechargeable. Traditional, disposable ones are cheap and convenient, but if rechargeable ones work, I'm going to switch to them.

About my learning stuff...
Yesterday at a cafe, I read chapter 6 of "Programming Principles and Practice Using C++."
Up to chapter 5, I just skimmed through, as the contents seemed fairly basic. I might go back to exercises in those chapters later.
In chapter 6, creating a calculator program is given as a topic. Although it's still introductory chapter, several techniques like tokenizing and parsing are explained.
I brought my mac book (which I had repaired yesterday) and implemented a calculator program following the text, up to 6.3.1.
Today I got back to dynamic programming. I finished up studying binomial coefficients and its implementation, and started to work on Floyd's algorithm, to find shortest edges for any given pair of vertices in a graph.


Got Kindle

I received my Kindle today. Just needed to plug it for power supply, and it just works. Cool

There are two things I'm not used to it is the number of buttons. Lately I use iPhone a lot, so it feels like there are way too many hardware buttons on Kindle. The other thing is how you purchase a book on Kindle. It seems that your personal info is set up on your Kindle (on shipping?) and you don't have to type your password or anything. No warning about it on the screen. You can cancel your purchase if you accidentally buy a book, and the content will be removed later if you do so.

I should take a look at the cancellation policy in detail. I wonder if someone bought a book on my Kindle without intention, opened it, and cancellation would be valid or invalid.

I reviewed little basic about imaginary numbers. Tomorrow I need to spend much more time to study math for my exam this weekend.


Trigonometric Function

There was no morning study session today.

I woke up late and reviewed some theorems before I went to work...


It's getting colder, but hope the morning study thing continues. I need to wake up early regularly to work on many things.

My Kindle seems to have reached to Japan, so maybe tomorrow I can actually use it.


morning study session (Oct 27, 2009)

Today's M's turn to lead a study session, and it was about brainstorming how to explain poi to beginners. He plans to write an article on poi, so he's going to explain me about it as sort of a test case. No concrete outline yet.

Later on, I went to a cafe alone and studied elementary combinatorics, to get ready for an exam scheduled on coming Sunday. I probably need to review trigonometry and geometry.


morning study session (Oct 26, 2009)

It was my turn to organize the session today. My friend M didn't have much time, so it was a short one.

I explained to M how programming contests (coding) goes, and today I suggested him to solve a problem. I use the "Programming Challenges" book by Steven S. Skiena and Miguel A. Revilla (from Springer). I picked the problem "Minesweeper" from sect. 1.6.2 (PC/UVa IDs: 110102/10189). He works as a programmer and he's played Minesweeper (which allegedly used to be the most frequently used application on some OS...) before.

It's a basic problem, so he got rough idea of what needs to be done pretty quickly. So next time we're going to discuss how to implement his solution

Ordered a New Kindle

Got an e-mail message notification telling me that Amazon started to ship Kindle internationally, so I ordered one (I live in Japan).
I don't know the detailed info on new kindles, but I've wanted to get one.
I like printed books, but they take much space and takes time to have one shipped.
My Kindle hasn't been shipped yet. Can't wait to actually use it.


Binomial Coefficients and a Thick Slice of Toast

A few things I learned (reviewed) today... study meeting was cancelled and it's a self study.

Data alignment of C structure values.

Binomial coefficients (for it's related to dynamic programming, which I'm working on).

Graph of functions. Determine min and max values for f(x) with derivatives.

Basics of lambda calculus. From what I learned so far, it's about rewriting expressions, and it's about languages.

Numbers, sets, addition. The value of 1 + 1 depends on its definition of elements.

To do: design a library of functions as a tool to practice programming and solve combinatorics problems.


morning study session #2 (Oct 22, 2009)

So I and M had another study session in the morning.

Topics for Today:
- poi
- ntp-like sample program logic

There wasn't a solid agenda for today (if any it was supposed to be about poi).

Discussed how to learn about the apache poi project. There's a well written reference on the project site, so probably intermediate or above developers should have little difficulty to get started. M's planning on implementing some application with it.

Then M brought up something about conversion between time in seconds to date. I partly got what M was talking about, but I need more detail (or at least I need it written down) to see what was the particular technique he addressed. He knows how it's implemented but not the underlying theory. Maybe tomorrow he'll show me the actual piece of code.

It's my turn tomorrow (hopefully, or in the nearest convenience not so far...), and I probably pick a problem about a familiar topic, like games, and work on it.


morning study session(Oct 21, 2009)

First official morning study session with M.

We are going to take turns leading sessions (only two of us though) in the mornings. It's my turn today to bring up a topic and I suggested for us to study about dynamic programming.

T: Let's learn how to make use of dynamic programming.

M: Why bother?

T: If applied to a right kind of problem, it can be very useful, especially for calculating layout, allocating tasks, ... I think we can work on problems from programming contests and see how we can do well w/o dynamic programming (maybe brute force search), then see how dynamic programming can help.

M: It seems hard to start working on such problems right away.

T: I see. By my next turn, I'll pick a simple problem from a contest that can be solved in a straight forward way.

So anyway I'm going to stick with dynamic programming for a while. M will work on poi, and he'll explain it to me next time.