September 2006 - Posts

Leap year misconception
Published 09-27-2006 2:25 PM | jokiz
I think there is a common misconception that a year is a leap year if it is divisible by 4. From wikipedia.org leap years include: "all years evenly divisible by 4, except for centennial years (those ending in -00), which receive the extra day only if...
Filed under:
VB.NET's Array Size -- ugh!
Published 09-26-2006 7:30 PM | jokiz
Do you have any idea why the following test case fails? Imports NUnit.Framework <TestFixture()> _ Public Class ArrayTests <Test()> _ Public Sub ArraySize() Dim myArray(5) As Integer Assert.AreEqual(5, myArray.Length) End Sub End Class The...
Filed under: , ,
Test-driven programming with a student
Published 09-26-2006 3:12 PM | jokiz
Last weekend, i helped my friend and former student with her sudoku solver project in Java. Basically, her professor gave her a list of methods for the solver class with their expected behavior. I wanted to teach her test-driven programming so i asked...
Filed under: ,
File GUIDs in MSI changed when new files were added
Published 09-26-2006 11:29 AM | jokiz
I have been using an IDT file to populate the DuplicateFile table of our installer for a long time now. I decided to use it since i noticed that the GUIDs for the files in the File table of the MSI are the same on every setup project build. Just this...
Filed under: ,
ExpectedException vs Testdriven.Net's easy VS code navigation
Published 09-25-2006 5:22 PM | jokiz
I was using MbUnit in my expression evaluator when i noticed that a failing test with an ExpectedException does not include a link to the line of the failing code. The link is established if you are on a DEBUG build (i encountered not seeing a link since...
Filed under: ,
Shift+N for "No to all" during a copy operation
Published 09-20-2006 10:42 PM | jokiz
Raymond Chen has this interesting post about Hibernate option from Shutdown, Alt keys, and so on. It mentions the Shift+N shortcut for "No to All" when encountering overwrites during a copy operation. I have eversince settled for holding Alt...
Filed under: , ,
Readonly recommended flag for Word documents
Published 09-19-2006 2:30 PM | jokiz
I was browsing the NMock documentation when it prompted me to if i want to open the document as readonly or not (readonly as default) and i was curious where is the setting for this. I found out it's setting was here: I wonder if there really is a setting...
Filed under: ,
Using NMock to test interaction of IComparable objects with it's IComparer
Published 09-19-2006 12:25 PM | jokiz
I have a requirement to sort a business object and obviously providing an IComparer for the said business object and implementing IComparable is the way to do it. And because of the dependency of the business object to the IComparer, i thought this could...
Filed under: ,
Encapsulation vs Testability
Published 09-14-2006 7:39 PM | jokiz
Reference articles: Why use private or protected Testability I am fond of Rocky Lhotka 's CSLA framework before and when i shifted to be test-driven, there are some constructs in CSLA that i'm beginning to dislike. I like the broken rule tracking...
Filed under: , ,
Keyboard shortcuts for Word 2002 and for Word 2003
Published 09-14-2006 3:30 PM | jokiz
I just found this keyboard shortcut list for Microsoft Word, just what i need. For those who still don't have this bookmarked, here it is: http://support.microsoft.com/default.aspx?scid=kb;en-us;290938
TimeSnapper
Published 09-12-2006 7:34 PM | jokiz
Jon Galloway recommends TimeSnapper here . The advantage of using it in filling up timesheets attracted me so if you are having a hard time filling up your timesheets, you can try the classic version also. I am also trying it out.
Filed under: , ,
MbUnit vs NUnit
Published 09-12-2006 2:44 PM | jokiz
Roy Osherove has illustrated the need to Avoid Multiple Asserts in a test method. Basically i agree with his points in the said blog post. I currently need need to test a number of permutations and i want to be disciplined to avoid multiple assertions...
Filed under: ,
Limiting TortoiseSVN Show log entries
Published 09-12-2006 11:19 AM | jokiz
When you are using SVN Show Log, you'll have a list of the top 100 (default setting) logs/revision logs from Subversion. It may take some time to populate them if you already have a number of revisions in your current project but you have the option to...
Filed under: , ,
yahoo mail captcha prompt before sending mails
Published 09-11-2006 12:51 PM | jokiz
i have just noticed that yahoo mails included a captcha prompt before sending emails to fight spamming using yahoo mails. captcha is still around although it was controversially demo'ed by casey a year ago that it is still vulnerable to attacks.
Filed under: , ,
Decimal data type for financial applications
Published 09-07-2006 1:39 PM | jokiz
My current project uses a double data type for its values and i have raised a suggestion to convert it to decimal data type instead. I remember that it is recommended to use decimal over double for financial applications because decimal data types have...
Filed under: , , ,
More Posts Next page »