git memo

Create a try branch:

$ git branch try/parser

Switch to a try branch:

$ git checkout try/parser

Pulling from github:

$ git pull . remotes/origin/master

Merge changes from master:

$ git rebase master

Merge changes from a try branch in a single commit:

$ git merge --squash try/parser

(note this will cause conflict for all changes in the future if you try to merge in normal fashion.)

Force delete a try branch:

$ git branch -D try/parser

Scala pitfalls

  • Iterators evaluate lazily, which means iterator.map(x => y) and for-yield evaluate lazily.
  • Don't make singleton that starts with lower case. "A variable pattern x is a simple identifier which starts with a lower case letter."

scalaxb

更新: scalaxb に関しては scalaxb.org から.

Scala and OSGi using NetBeans

For some reason, I can't keep OSGi in my head. Everything I read about it slips away in a few weeks, and I have re-read the guides and tutorials.

Here's a memo of setting up OSGi bundle written in Scala using NetBeans, following Neil Barlett's OSGi in Practice, except the book uses Eclipse.

Mac memo

Changing file association. Command-I to show file info, then change the application under "Open with." Hit "Change All..." to change the association for all alike files.

See Understanding Mac environment variables for environment variable.

To get those applications to see the environment variable, use the Doug McClure’s free program RCEnvironment.

Display /opt in GUI:

$ sudo chflags nohidden /opt

Android memo

Doing some Android stuff again. Having Tetris clone around helps expedite to the gut of the code.
Forgot to update res/layout/main.xml, and kept wondering why my code is not working.

To check the log, see Android Debug Bridge.

$ adb devices
 
$ adb -s HT841LC13244 logcat

Layered Architecture

One of my favorites from msdn is Application Architecture for .NET: Designing Applications and Services by Eduardo Jezierski. The version 2.0 is Microsoft Application Architecture Guide by J.D. Meier et al, but it's much more beefier than the original. Currently 1.0 is put under Retired node in msdn.

Scala and Evaluation Strategy

Once you use any technology to a significant extent, you understand its strength and shortcomings. I've probably written tens of thousands of lines of code in Delphi or C++, Java and C# too to some extent. I've depended on those languages, but gripe about them too. The new girl (or guy) obviously has the advantage of just being new. Since I haven't written anything significant in Scala besides Tetris, I haven't hit the shortcomings yet.

Where the Wild Things Are (2009)

This is going to be one of cult classics. I thought the film was a postmodern twist on Spielberg's E.T. the Extra-Terrestrial. Even while I was watching it reminded me of the scene from ET...

Syndicate content