Go Journey
After I published previous article, I complete the transform from Ruby to Martini. Now the website and its back-end script are now written in Go. The result is very good. Not only the memory is less and concurrent support of Go makes the script run much faster.
I also try to adapt Redis to speed-up some page. I made two change, one is better but another one is not. I also try to adapt groupcache, but after some trying, I decide to postpone. Because the target improve response time is 40ms, it looks ok according to Ilya Grigorik’s article.
After that, I create one page to give cleaner viewer of Hacker News. Just create one script to get the information and update the page. I also give a try to Material + Bootstrap and adapt it to my aozora page also.
To be honest, it’s just ok. While material flat design is not bad, but I don’t feel exciting after the change. Maybe I need to build iOS app and adapt it overall to get more better experience.
Now after three weeks journey with 60+ commit in Go, now I continue to learn new stuff. The first one is Elixir. In fact I have do some tutorial to Elixir and try to use it in Project Euler. Code. The performance is not quite good when comparing to C/C++.
I think that’s because to use it maybe easy, but use it in the right way require some time to transform my procedure programming mindset to functional programming one. And this time, I want to do another try. Just buy Programming Elixir and quickly scanned five chapters. It’s quite relaxing pace in this book. I like it.
I notice there exist an statement that smart Rubyists move to Go while smarter Rubyists move to Elixir. I somehow don’t agree this statement. To be frank, I choose Go because it support concurrent programming in first day and syntax is similar to C/C++. But that’s NOT the only concept for Go. Read this article by Rob Pike.
Of course I don’t build large website using Go, but the experience I have shows that the syntax and standard library of Go may not be exciting or big difference comparing to Elixir, but it indeed is in good design. Simple and good to use. The performance is good and support concurrent. I will recommend it to C/C++ programmer. Not to replace C/C++, but it worths to learn it.
I am considering to use Go to continue my Project Euler journey. Hope I will continue to make a good progress!!