granularity

Do you encapsulate scalars?

I find myself defining classes like: struct AngleSize { explicit AngleSize(double radians) : size(radians) {} double size; }; This has a bunch of advantages over storing anglesizes as plain doubles. Advantage 1, it makes it possible to define these 2 distinct constructors: Vec2::Vec2(double x, double y); Vec2::Vec2(double l...

DateTime precision in NHibernate and support for DateTime2 in NHibernate SchemeExport

Hi, I am then using Fluent NHibernate and its automapping feature to map the the following simplified POCO class: public class Foo { public virtual int Id { get; set; } public virtual datetime CreatedDateTime { get; set; } } The CreatedDateTime field will map to a SQL DateTime by default. However if I do a test to check ...

Granularization of models?

I'm developing a CMS largely based on Zend Framework components. Some of the database tables for this CMS are as followed: site | id | name | ------------- locale | languageCode | regionCode | ----------------------------- site_locale // link sites with locales | siteId | languageCode | regionCode | isActive | isDefault | ------------...

Choosing granularity with QtConcurrent

I'm looking to use QtConcurrent with a program having two or three levels of possible parallelism. At the highest level, a function L1() is called several times. The function L1() calls a function L2() several times, and the function L2() calls a function L3() several times. The bulk of the total running time is spent in L3(). The e...