Paul Graham’s Maker’s Schedule, Manager’s Schedule is interesting article. I like “Maker’s Schedule” and I’m a programmer.
But, Does anyone like “Manager’s Schedule”? Even managers.
Alone Time
“Context Switching” is common problem. Getting Real says:
People need uninterrupted time to get things done
(snip)
Getting in the zone takes time. And that’s why interruption is your enemy. It’s like REM sleep – you don’t just go to REM sleep, you go to sleep first and you make your way to rem. Any interruptions force you to start over. rem is where the real sleep magic happens. The alone time zone is where the real development magic happens.
And Joel Spolsky said:
Being able to do mentally difficult things like context switching makes our product better. This Is Why Programmers Get The Big Bucks.
Personally, I like 37signal’s view because they said “People need”! There is no divison of maker/manager, geek/suits or developer/planner.
I pushed all code of Newspeak on Bitbucket. And I got a new domain for Scala (and Java) because I don’t like “package info._8_p { …”.
Newspeak don’t use Lift. Instead I choose Jetty 6, Tokyo Cabinet and my Amrita-inspired template engine.
Jetty 6
Newspeak uses Jetty without XML. Here is my main function:
def main(args: Array[String]) = {
val app = new waf.Application
app.mount("/", (req, resp) => {
render("index", Map("title" -> "Newspeak"))
})
...
app.run(8000)
}
My application code depends javax.servlet.*, not Jetty. But waf.Application runs Jetty internally.
Tokyo Cabinet
Tokyo Cabinet is modern impl. of DBM. I use “table” database as a primary persistent layer of Newspeak. TC has JNI-based Java API. It’s easy to use from Scala off course.
And TC provides very handy tctmgr (1). I mostly uses “tctmgr importtsv” to built my database. However Newspeak’s database stores commit logs. And commit logs usually contain “\n”. It’s not suitable for TSV.
So I wrote JSON based import command in C++. It uses a picojson as a parser.
Amrita-inspired template engine
Many template engine handle HTML/XML as just a string. I think it’s bad design. But Amrita is not. My template engine is inspired from Amrita.
Conclusion
Scala is good.
Recently, I mainly uses a “dynamic” language (ex. JavaScript, Ruby and Perl). Dynamic language is easy to write, but hard to debug. “Static” language is hard to write, but easy to debug because many bugs are reported by a compiler. It’s fresh to me.
This weekend, I went back to my parents’ home and start new project: Newspeak.
The search engine for commit logs
In my personal project, I write commit logs in English because most programmers can’t read Japanese. However I’m not good at English. Sometimes I googled how to describe this commit in English. It’s a waste of time for me.
So I made a search engine for only commit logs. Newspeak is powered by Scala, Jetty 6 and Tokyo Cabinet. I’ll blog about in more detail soon.