I came across this article which I found pretty cool news. Playing games will be just a matter of thinking about the moves.
Tonight I got the chance to present my nblogr application to a larger audience. Unfortunately I’m in the process of fixing bugs in NBlogr and one of those bugs required me to make a change to NBlogr.Web/views/default/shared/mainmenu.boo . I had made this change on sunday around midnight right before I went to bed. Of course I forgot to test the application because and it wouldn’t run on my presentation. When I got home it took me about 3 minutes to fix. I had to import a reference to Base4.Storage in the mainmenu.boo file.
I’d like to thank everybody for coming, their patience and listening to my ramblings.
Anyway I’ve included my slide deck in this post and I think it might be a good idea to post a couple more links to some of the people I mentioned in my talk.
http://www.base4.net - Alex James, Auckland
http://blog.bittercoder.com - Alex Henderson, Auckland
http://www.ayende.com/blog
http://hammet.castleproject.org
http://www.castleproject.org
http://www.nunit.org
http://www.nblogr.com
svn repository:
https://svn.koolkraft.net/nblogr/trunk
[NBlogr-Wellington 02 _05_2007.ppt (440 KB)](http://www.flanders.co.nz/Blog/content/binary/NBlogr-Wellington%2002%20_05_2007.ppt)
To get nblogr running on your machine follow these steps :
Make sure you have a subversion client installed or subversion itself.
C:\Projects> svn co https://svn.koolkraft.net/nblogr/trunk
C:\Projects> osql -E
1> create database nblogr
2> go
1> quit
open the nblogr solution.
change the connection string in web.config
The different configuration options are explained in the web.config
If you want to use a different extension than aspx you have to change the httphandler configuration and set the extension in nblogr/routing
if you want urls to be rewritten without an extension you will have to enable wildcard handling.
hit ctrl-f5 and it should take you through the configuration. If ctrl-f5 doesn’t work try setting up the application in IIS.
**Update:
**James Hippolite from telecom was so kind to blog most of the bullet points of my slides. Which can be found here http://tvornz.spaces.live.com/blog/cns!A93B6100E328706D!388.entry?c=BlogPart&c02_owner=1
As I said before I really like the concept of dock panels over the taskbar with start menu.
And when I was searching for something on the net I stumbled on this link to the stardock website. Apparently they have created something like that. It’s freeware and above all it’s pretty :)
I hope you like it as much as I’m enjoying it.
Disclaimer:
I am in no way getting an incentive for this anouncement. I just like this piece of software.
I work at Xero and we were using Sourcesafe, which we always knew had to be replaced sometime.
[http://www.codinghorror.com/blog/archives/000660.html](http://www.codinghorror.com/blog/archives/000660.html)
I have some experience with most of the source control systems out there. We decided to go with Team Foundation Server the reasons for it being :
High level of integration with visual studio 2005
Easily extensible with C#
It is currently v1, which translates to me as 2 more versions and it will be the most awesome tool out there
Based on Sql Server
Why didn’t we choose for Subversion, you may ask ?
It’s a microsoft shop we don’t need cross-platform tools
Not based on Sql Server
No webservices api ready to be consumed
I personally like the way subversion stays out of the way and you don’t have to explicitly check stuff out. But I don’t like the decentralised way of managing it.
The tools that come with Team Foundation Server, even though it’s only v1, look more slick and handle a lot better than the tools that come with Subversion.
Since everybody in our team was already familiar with source safe which made the learning curve virtually non existent.
All in all taking all the variables into account we decided that Team Foundation Server was a much better solution for our needs than subversion.
If you want to read some other peoples thoughts on the subject, Ayende and Roy Osherove have been having a discussion about it through their blogs.
[http://ayende.com/Blog/archive/2007/04/29/CodePlex-TFS-and-Subversion.aspx](http://ayende.com/Blog/archive/2007/04/29/CodePlex-TFS-and-Subversion.aspx)
[http://weblogs.asp.net/rosherove/archive/2007/04/29/tfs-or-not-being-a-perfectionist-is-a-realistic-world.aspx](http://weblogs.asp.net/rosherove/archive/2007/04/29/tfs-or-not-being-a-perfectionist-is-a-realistic-world.aspx)
[http://ayende.com/Blog/archive/2007/04/29/TFS-Zero-Friction-and-living-in-an-imperfect-world.aspx](http://ayende.com/Blog/archive/2007/04/29/TFS-Zero-Friction-and-living-in-an-imperfect-world.aspx)
[http://weblogs.asp.net/rosherove/archive/2007/04/29/what-source-control-tool-do-you-use-and-more-on-tfs-vs-open-source-tools.aspx](http://weblogs.asp.net/rosherove/archive/2007/04/29/what-source-control-tool-do-you-use-and-more-on-tfs-vs-open-source-tools.aspx)
[http://ayende.com/Blog/archive/2007/04/29/TFS-Vs.-Open-Source-tools.aspx](http://ayende.com/Blog/archive/2007/04/29/TFS-Vs.-Open-Source-tools.aspx)
[http://weblogs.asp.net/bsimser/archive/2007/04/29/tfs-vs-open-source-the-battle-rages-on.aspx](http://weblogs.asp.net/bsimser/archive/2007/04/29/tfs-vs-open-source-the-battle-rages-on.aspx)
[http://ayende.com/Blog/archive/2007/04/29/Exensability-Ask-and-you-shall-recieve.aspx](http://ayende.com/Blog/archive/2007/04/29/Exensability-Ask-and-you-shall-recieve.aspx)
There are a couple of excellent resources available online.
Screencasts :
http://colinramsay.co.uk/2007/04/17/getting-started-with-monorail-screencast-one/
http://colinramsay.co.uk/2007/04/18/using-monorail-screencast-two/
http://colinramsay.co.uk/2007/04/19/databinding-and-activerecord-screencast-three/
Tutorials:
http://blog.bittercoder.com/PermaLink,guid,b298cbe4-6eff-4783-a2a1-c95e344a9de5.aspx
http://blog.bittercoder.com/PermaLink,guid,195c3d13-faf8-4f5e-8faf-861d02b0fc2e.aspx
I do see the benefit of UAC in vista but I would like it to have some type of timeout or program context so that when I open visual studio for example I don’t have to click allow for every instance I open (I often have 3 instances open)
I would definitely like to get more control over the UI.
The taskbar had out lived it’s usefullnes back in windows 98 I would love to see some panels like they have in gnome or some taskbar like mac has or a similar higly customizable option. so that i am not plagued by all those windows.
That would also solve the debacle of the shutdown menu options because a user can ultimately change what is there. I’d like to see power more power for the people.
Tagging for any type of file would also be great and a search that works a bit faster.
I’m sure the people at Microsoft are really smart people that would be able to decouple the interface from the underlying functionality.
These customizable options are really nice and would in turn build a whole new type of community.
There will probably be more coming.. but this concludes this post for today.
Alex Henderson has been very busy writing a tutorial series on how to properly use and understand castle’s windsor container.
You can find them here Container tutorials
Check them out :)
After a couple of months getting into ruby on rails I got back to .NET development, as well as back to NBlogr and back to blogging.
Now for replies I saw on some blogs the format < replied 1 month, 5 days, 2 hours and 13 minutes ago. I wanted to find out how they did that and my first reaction was.. yay easy hello timespan.
Turns out that timespan only goes up to days, no months or anything. A bit deeper hidden for a c# programmer there is the function datediff in vb.net But that function doesn’t handle years properly for example the difference between today 01/01/2007 15:15 and 31/12/2007 18:00 gives a difference of 1 year instead of 1 day. So I decided to write my own class for it, turns out that the solution is quite simple.
To use the class below one would do :
NBlogr.Common.TimeSpan ts = new NBlogr.Common.TimeSpan(someStartDate, someEndDate);
string humantime = ts.ToString() + ” ago”;
The class :
/*
* Created by: Ivan Porto Carrero
* Created: Thursday, 12 April 2007
*/
using System;
using System.IO;
using System.Text;
namespace NBlogr.Common
{
public class TimeSpan
{
private DateTime startDate;
private DateTime endDate;
private int startDay;
private int endDay;
private int startMonth;
private int endMonth;
private int startYear;
private int endYear;
private int startHour;
private int endHour;
private int startMinute;
private int endMinute;
private int startSecond;
private int endSecond;
private int diffMonth;
private int diffDays;
private int diffHours;
private int diffMinutes;
private int diffYear;
private int diffSeconds;
private bool hasCalculated;
public TimeSpan()
{
hasCalculated = false;
}
public TimeSpan(DateTime startDate, DateTime endDate)
{
StartDate = startDate;
EndDate = endDate;
}
private void initialize()
{
startDay = StartDate.Day;
endDay = EndDate.Day;
startMonth = StartDate.Month;
endMonth = EndDate.Month;
startYear = StartDate.Year;
endYear = EndDate.Year;
startHour = StartDate.Hour;
endHour = EndDate.Hour;
startMinute = StartDate.Minute;
endMinute = EndDate.Minute;
startSecond = StartDate.Second;
endSecond = EndDate.Second;
}
public override string ToString()
{
StringBuilder sb = new StringBuilder();
if (Years > 0)
sb.Append(pluralise(“year”, Years));
if (Months > 0 && Years > 0)
sb.Append(“, “);
if (Months > 0)
sb.Append(pluralise(“month”, Months));
if ((Months > 0 || Years > 0) && Days > 0)
sb.Append(“, “);
if (Days > 0)
sb.Append(pluralise(“day”, Days));
if ((Months > 0 || Years > 0 || Days > 0) && Hours > 0)
sb.Append(“, “);
if (Hours > 0)
sb.Append(pluralise(“hour”, Hours));
if ((Months > 0 || Years > 0 || Days > 0 || Hours > 0) && Minutes > 0)
sb.Append(“, “);
if (Minutes > 0)
sb.Append(pluralise(“minute”, Minutes));
if ((Months > 0 || Years > 0 || Days > 0 || Hours > 0 || Minutes > 0) && Seconds > 0)
sb.Append(“, “);
if (Seconds > 0)
sb.Append(pluralise(“second”, Seconds));
return sb.ToString();
}
private void calculate()
{
initialize();
diffYear = endYear - startYear;
calculateMonths();
calculateDays();
calculateHours();
calculateMinutes();
calculateSeconds();
hasCalculated = true;
}
private static string pluralise(string singular, int quantity)
{
return quantity != 1 ? string.Format(“{0} {1}”, quantity, singular + “s”) : string.Format(“{0} {1}”, quantity, singular);
}
private void calculateMonths()
{
if (endMonth >= startMonth)
diffMonth = endMonth - startMonth;
else
{
diffYear–;
diffMonth = (12 - startMonth) + endMonth;
}
}
private void calculateDays()
{
if (endDay >= startDay)
diffDays = endDay - startDay;
else
{
diffMonth–;
diffDays = (DateTime.DaysInMonth(startYear, startMonth) - startDay) + endDay;
}
}
private void calculateHours()
{
if (endHour >= startHour)
diffHours = endHour - startHour;
else
{
diffDays–;
diffHours = (24 - startHour) + endHour;
}
}
private void calculateMinutes()
{
if (endMinute >= startMinute)
diffMinutes = endMinute - startMinute;
else
{
diffHours–;
diffMinutes = 60 - startMinute + endMinute;
}
}
private void calculateSeconds()
{
if (endSecond >= startSecond)
diffSeconds = endSecond - startSecond;
else
{
diffMinutes–;
diffSeconds = 60 - startSecond + endSecond;
}
}
public int Months
{
get
{
if (!hasCalculated)
calculate();
return diffMonth;
}
set { diffMonth = value; }
}
public int Days
{
get
{
if (!hasCalculated)
calculate();
return diffDays;
}
set { diffDays = value; }
}
public int Hours
{
get
{
if (!hasCalculated)
calculate();
return diffHours;
}
set { diffHours = value; }
}
public int Minutes
{
get
{
if (!hasCalculated)
calculate();
return diffMinutes;
}
set { diffMinutes = value; }
}
public int Years
{
get
{
if(!hasCalculated)
calculate();
return diffYear;
}
set { diffYear = value; }
}
public DateTime StartDate
{
get
{
if (startDate == null)
throw new InvalidDataException(“You need to specify a start date”);
return startDate;
}
set
{
hasCalculated = false;
startDate = value;
}
}
public DateTime EndDate
{
get
{
if (endDate == null)
throw new InvalidDataException(“You need to specify a end date”);
return endDate;
}
set
{
hasCalculated = false;
endDate = value;
}
}
public int Seconds
{
get { return diffSeconds; }
set { diffSeconds = value; }
}
}
}
My ipod headphones died on me.. so it was time to get some new stuff and preferrably better than what I had.
Because I’m a cheap skate and I find it a bit of a ridiculous sight to have these huge headphones on my head when walking down the street.
I went for the Bose in-ear headphones.
And man they are well worth the money.. I can finally get proper bass and the noises from the office/street are drastically pushed to the background.
JD and JB are at it again.. This time they give us a powershell gadget for the vista sidebar. It’s a really cool toy.. and a valuable resource for those wanting to create a sidebar gadget.
Feel free to digg them.