Monday, July 30, 2012

RubyKaigi restarts - RubyKaigi 2013 -

In yesterday, dates and venue of RubyKaigi 2013 has been announced. Let's check this page.

Friday, July 27, 2012

Rekonq - the konqueror alternative -

Today, KDE project has announced they start the sub project "Reconq" - the konqueror alternative. This new browser is based on Webkit and featured for HTML5. And it requires Qt 4.8.x or after.

Tuesday, July 24, 2012

FreeBSD Study #9

In last Frieday, FreeBSD Study #9 was held in KDDI Web Commnications' Office.

大きな地図で見る

Today's session is "Managing storage on FreeBSD (vol.1)".
  • What haappens between physical devices and /dev/* file on FreeBSD
    • GEOM is the framework to give abstract tiers between these
  • GEOM class
  • GEOM provider
  • GEOM consumer
  • sysctl kern.geom.*
  • Sample for mirroring on GEOM
  • File system of UNIX
    • Provide approches to file content via the file name
    • Tree structure with a single root
  • Kernel does not necessarily need file systems
  • Userland needs file systems
  • UFS
    • default file system of FreeBSD
  • Structure of UFS
    • inode
    • super block
    • how to approch the block content with inode
  • fsck
    • Check where the inode is collapsed at
  • SoftUpdates
    • Improve performance of fsck
    • Do I/O in async with strict order to add/delete block
  • SoftUpdates + Jornal (SUJ)
    • Since FreeBSD 9.0, SoftUpdates support Journaling
    • Improve the performance more

In this day, Dr Hiroki Sato has explained about Filesystem, GEOM and UFS. I have understood what is UFS+SUJ. On next month, FreeBSD Study #10 will be held and this session will continue with the theme about ZFS.

Saturday, July 21, 2012

Both FreeBSD 9.1 beta1 and PC-BSD 9.1 beta1 have been released

5 days ago, FreeBSD 9.1 beta 1 has been released. Ant then, 2 days ago, PC-BSD 9.1 beta 1 has also been released. Now I'm trying PC-BSD 9.1 beta.

Thursday, July 19, 2012

Protect mass assignment for ASP.NET MVC

In Ruby on Rails, we should protect mass assignment with defining attr_protected (black list) or attr_accessible (white list) on Model like this (via Ruby on Rails Guides).

(black list)
class SomeModel
  attr_protected :admin
  ...
end
(white list)
class SomeModel
  attr_accessible :name
  ...
end

I learned from the book Programming Microsoft® ASP.NET MVC, Second Edition that we should protect mass assignment with defining attribute on argument of Action method, not on Model directly.

(black list)
[HttpPost]
public ActionResult Create([Bind(Exclude="admin")]SomeModel model)
{
    ...
}
(white list)
[HttpPost]
public ActionResult Create([Bind(Include="name")]SomeModel model)
{
    ...
}

The best advantage of this approach is to be able to define black lists or white lists in each actions.