<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Controlling Time</title>
	<atom:link href="http://www.thekua.com/atwork/2009/01/controlling-time/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thekua.com/atwork/2009/01/controlling-time/</link>
	<description>thekua&#039;s reflections on work related topics</description>
	<lastBuildDate>Wed, 28 Jul 2010 02:22:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: thekua.com@work &#187; Controlling Time: How to deal with periodic gaps</title>
		<link>http://www.thekua.com/atwork/2009/01/controlling-time/comment-page-1/#comment-58244</link>
		<dc:creator>thekua.com@work &#187; Controlling Time: How to deal with periodic gaps</dc:creator>
		<pubDate>Mon, 06 Apr 2009 09:05:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=378#comment-58244</guid>
		<description>[...] out the time taken to do some long running work. I&#8217;m going to assume that you already have a Clock concept in the [...]</description>
		<content:encoded><![CDATA[<p>[...] out the time taken to do some long running work. I&#8217;m going to assume that you already have a Clock concept in the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ville Oikarinen</title>
		<link>http://www.thekua.com/atwork/2009/01/controlling-time/comment-page-1/#comment-49741</link>
		<dc:creator>Ville Oikarinen</dc:creator>
		<pubDate>Tue, 03 Feb 2009 13:52:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=378#comment-49741</guid>
		<description>Yes, clock is a good name, not least because unix uses it :)

And you are right, ubiquitous language is the most important point here, and _if_ time/clock is an essential part of the domain, then it&#039;s wise to use the term domain experts find best.

Otherwise (in most cases?) naming an internal detail like this is more a matter of taste (of the developers involved).</description>
		<content:encoded><![CDATA[<p>Yes, clock is a good name, not least because unix uses it <img src='http://www.thekua.com/atwork/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>And you are right, ubiquitous language is the most important point here, and _if_ time/clock is an essential part of the domain, then it&#8217;s wise to use the term domain experts find best.</p>
<p>Otherwise (in most cases?) naming an internal detail like this is more a matter of taste (of the developers involved).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.thekua.com/atwork/2009/01/controlling-time/comment-page-1/#comment-49739</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Tue, 03 Feb 2009 13:31:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=378#comment-49739</guid>
		<description>Hi Ville,

You don&#039;t sound too critical and I do appreciate hearing your point of view. You have lots of good points. Here are some responses...

You could still argue over the merits of &lt;code&gt;TimeProvider&lt;/code&gt; but I still don&#039;t know anyone (outside of programmers) that would call a Clock that. Even *nix people call it the system clock (not a system time provider). You talk about other aspects and depending on what you were modelling, could potentially all be valid. I would say though that all clocks tell the time, yet all clocks do not have all the properties you mention (alarms, dimensions, etc). 

For some programmers, mathematics might be very useful for communicating, but I also believe in the &lt;a href=&quot;http://domaindrivendesign.org/discussion/messageboardarchive/UbiquitousLanguage.html&quot; rel=&quot;nofollow&quot;&gt;Ubiquitious Language&lt;/a&gt; and even then, mathematics is not often the best choice for this. 

I also agree that minimalism can exist with readability.</description>
		<content:encoded><![CDATA[<p>Hi Ville,</p>
<p>You don&#8217;t sound too critical and I do appreciate hearing your point of view. You have lots of good points. Here are some responses&#8230;</p>
<p>You could still argue over the merits of <code>TimeProvider</code> but I still don&#8217;t know anyone (outside of programmers) that would call a Clock that. Even *nix people call it the system clock (not a system time provider). You talk about other aspects and depending on what you were modelling, could potentially all be valid. I would say though that all clocks tell the time, yet all clocks do not have all the properties you mention (alarms, dimensions, etc). </p>
<p>For some programmers, mathematics might be very useful for communicating, but I also believe in the <a href="http://domaindrivendesign.org/discussion/messageboardarchive/UbiquitousLanguage.html" rel="nofollow">Ubiquitious Language</a> and even then, mathematics is not often the best choice for this. </p>
<p>I also agree that minimalism can exist with readability.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ville Oikarinen</title>
		<link>http://www.thekua.com/atwork/2009/01/controlling-time/comment-page-1/#comment-49533</link>
		<dc:creator>Ville Oikarinen</dc:creator>
		<pubDate>Mon, 02 Feb 2009 08:07:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=378#comment-49533</guid>
		<description>Yes, finding implementations for a given interface is easy, and I also name implementations in a quite similar way: if I don&#039;t have anything special to say about an implementation for X, I&#039;ll call it XDefaultImpl.

But finding the provider interface isn&#039;t so easy. The best way that pops into my mind is to find references to the interface or even to a constructor of some implementation.

I agree, readability is at least as important as convenience. But I believe minimal vocabulary can coexist with readability.

Mathematics is a good example: most laymen find mathematical jargon clumsy and dull (and unreadable), but I believe it&#039;s quite optimal the way it is, after generations of evolution.

And, many projects &quot;overload&quot; seemingly universal concepts with project-specific semantics anyway (like you said, &quot;not all classes will match real world concepts&quot;). Or, even more likely, they simplify the concepts.

Take Clock, for example. Does our program need any physical properties of the clock instrument, like dimensions? Is it a digital or an analog clock? Does it have alarm functionality? Does it ring a bell every hour? If not, maybe we don&#039;t need the whole Clock interface, only a little part of it, namely a provider for time.

Well, I hope I don&#039;t sound too critical. Clock is also a good name, but I just wanted to show that the &quot;classical&quot; naming can also be something else than a learned bad habit.</description>
		<content:encoded><![CDATA[<p>Yes, finding implementations for a given interface is easy, and I also name implementations in a quite similar way: if I don&#8217;t have anything special to say about an implementation for X, I&#8217;ll call it XDefaultImpl.</p>
<p>But finding the provider interface isn&#8217;t so easy. The best way that pops into my mind is to find references to the interface or even to a constructor of some implementation.</p>
<p>I agree, readability is at least as important as convenience. But I believe minimal vocabulary can coexist with readability.</p>
<p>Mathematics is a good example: most laymen find mathematical jargon clumsy and dull (and unreadable), but I believe it&#8217;s quite optimal the way it is, after generations of evolution.</p>
<p>And, many projects &#8220;overload&#8221; seemingly universal concepts with project-specific semantics anyway (like you said, &#8220;not all classes will match real world concepts&#8221;). Or, even more likely, they simplify the concepts.</p>
<p>Take Clock, for example. Does our program need any physical properties of the clock instrument, like dimensions? Is it a digital or an analog clock? Does it have alarm functionality? Does it ring a bell every hour? If not, maybe we don&#8217;t need the whole Clock interface, only a little part of it, namely a provider for time.</p>
<p>Well, I hope I don&#8217;t sound too critical. Clock is also a good name, but I just wanted to show that the &#8220;classical&#8221; naming can also be something else than a learned bad habit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.thekua.com/atwork/2009/01/controlling-time/comment-page-1/#comment-49491</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Sun, 01 Feb 2009 22:06:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=378#comment-49491</guid>
		<description>Hi Ville!

Thanks for your comment. I can appreciate the need to consider leaving code that needs to cross multiple cultures and languages. I understand that calling something X and XProvider is easy, and may be conventional for many programmers, however I still prefer to name my classes to leave as much intent in them as possible. 

Although I &lt;em&gt;could&lt;/em&gt; name a class XProvider, what does that tell future programmers? What other characteristics should it have? If I can&#039;t think of a better name, I prefer to name things &lt;em&gt;Default&lt;/em&gt;X instead. 

I also believe that finding implementations of X shouldn&#039;t be hard for developers these days with excellent tools like Eclipse and IntelliJ showing us inheritors or class hierarchies with a short keyboard shortcut (or click away). Javadoc, albeit slower, also gives us access to the same information.

I will admit that not all classes will match real world concepts, but it doesn&#039;t mean that we should be lax on the principle of programming for readability vs programming for convenience.</description>
		<content:encoded><![CDATA[<p>Hi Ville!</p>
<p>Thanks for your comment. I can appreciate the need to consider leaving code that needs to cross multiple cultures and languages. I understand that calling something X and XProvider is easy, and may be conventional for many programmers, however I still prefer to name my classes to leave as much intent in them as possible. </p>
<p>Although I <em>could</em> name a class XProvider, what does that tell future programmers? What other characteristics should it have? If I can&#8217;t think of a better name, I prefer to name things <em>Default</em>X instead. </p>
<p>I also believe that finding implementations of X shouldn&#8217;t be hard for developers these days with excellent tools like Eclipse and IntelliJ showing us inheritors or class hierarchies with a short keyboard shortcut (or click away). Javadoc, albeit slower, also gives us access to the same information.</p>
<p>I will admit that not all classes will match real world concepts, but it doesn&#8217;t mean that we should be lax on the principle of programming for readability vs programming for convenience.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ville Oikarinen</title>
		<link>http://www.thekua.com/atwork/2009/01/controlling-time/comment-page-1/#comment-49011</link>
		<dc:creator>Ville Oikarinen</dc:creator>
		<pubDate>Fri, 30 Jan 2009 10:38:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=378#comment-49011</guid>
		<description>Hi Patrick.

I understand your point about naming: mainstream OO naming is sometimes humorous and clumsy, and more &quot;natural&quot; naming has its merits.

On the other hand, just like an electronic office shouldn&#039;t just mimic paper office, maybe the language in code could also do better than its real-life counterpart.

The richness of natural languages is of course a blessing for art and other human activity, but in code certain minimalism and consistency is good.

If I need any X in my code, it&#039;s easy if I can just see if there is an interface named XProvider to be injected, instead of having to activate my (non-native) English skills and find the correct natural term for the provider.

Program code isn&#039;t supposed to be read in a poetry competition, after all, it&#039;s supposed to be effective enough to be even boring sometimes :)

- Ville Oikarinen
comment provider</description>
		<content:encoded><![CDATA[<p>Hi Patrick.</p>
<p>I understand your point about naming: mainstream OO naming is sometimes humorous and clumsy, and more &#8220;natural&#8221; naming has its merits.</p>
<p>On the other hand, just like an electronic office shouldn&#8217;t just mimic paper office, maybe the language in code could also do better than its real-life counterpart.</p>
<p>The richness of natural languages is of course a blessing for art and other human activity, but in code certain minimalism and consistency is good.</p>
<p>If I need any X in my code, it&#8217;s easy if I can just see if there is an interface named XProvider to be injected, instead of having to activate my (non-native) English skills and find the correct natural term for the provider.</p>
<p>Program code isn&#8217;t supposed to be read in a poetry competition, after all, it&#8217;s supposed to be effective enough to be even boring sometimes <img src='http://www.thekua.com/atwork/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>- Ville Oikarinen<br />
comment provider</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.thekua.com/atwork/2009/01/controlling-time/comment-page-1/#comment-48989</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Fri, 30 Jan 2009 08:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=378#comment-48989</guid>
		<description>Hi Nathan,

Thanks for your comment. I didn&#039;t know that this was here as an option. I&#039;m still a little bit uncomfortable using static methods for anything like this, but it could certainly be useful for people as a starting place.</description>
		<content:encoded><![CDATA[<p>Hi Nathan,</p>
<p>Thanks for your comment. I didn&#8217;t know that this was here as an option. I&#8217;m still a little bit uncomfortable using static methods for anything like this, but it could certainly be useful for people as a starting place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan McDonald</title>
		<link>http://www.thekua.com/atwork/2009/01/controlling-time/comment-page-1/#comment-48718</link>
		<dc:creator>Nathan McDonald</dc:creator>
		<pubDate>Wed, 28 Jan 2009 23:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.thekua.com/atwork/?p=378#comment-48718</guid>
		<description>For a simpler approach in tests, you can just use:
&lt;code&gt;org.joda.time.DateTimeUtils#setCurrentMillisFixed(long)&lt;/code&gt;

to set the time you want used by the rest of joda, such as when new DateTime() is called.

in the tearDown for your test, restore it with:

&lt;code&gt;org.joda.time.DateTimeUtils#setCurrentMillisSystem()&lt;/code&gt;

This allows the codebase to use new DateTime() whenever the current time is required, without needing to inject some other interface to facilitate controlled testing.</description>
		<content:encoded><![CDATA[<p>For a simpler approach in tests, you can just use:<br />
<code>org.joda.time.DateTimeUtils#setCurrentMillisFixed(long)</code></p>
<p>to set the time you want used by the rest of joda, such as when new DateTime() is called.</p>
<p>in the tearDown for your test, restore it with:</p>
<p><code>org.joda.time.DateTimeUtils#setCurrentMillisSystem()</code></p>
<p>This allows the codebase to use new DateTime() whenever the current time is required, without needing to inject some other interface to facilitate controlled testing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
