I am currently taking CSE 218 at UCSD, “Advanced Topics in Software Engineering - Methods and Tools for Software Modularity”, where we recently read the paper “Applying ‘Design by Contract’” by Bertrand Meyer. I already knew a little about the concept, and after reading that paper and playing with the concept in a micro project, I am sold. I really think Design by Contract has a chance at being this decades TDD. It is pretty clear to me why it is a good idea to do “Contract First” development. Let me try to explain why.
It is not often I find myself struck by the passing of a public figure, but with Steve Jobs it is hard not to feel touched. The man who has had such a great influence on the tech industry and the world in general, leaves us with a large collection of important innovations and ideas, that will continue to inspire for many years to come.
I will leave you with this fantastic quote from his Stanford Commencement Address in 2005.
“Remembering that “I’ll be dead soon” is the most important tool I’ve ever encountered to help me make the big choices in life. Because almost everything – all external expectations, all pride, all fear of embarrassment or failure – these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.” – Steve Jobs
Update June, 2013: As pointed out by Don Morris in the comments, PHP Markdown Extra now supports classes, making the below trick obsolete for this purpose.
If you are using input filters such as the Markdown filter module, you may run in to a situation where the script behind the module does not provide you with all the formatting options you want.
This is a quick and easy way to grab all DNS records from a domain. All you need is the name of the domain you want to query and the DNS server that is handling the domain. Here is how you do:
Open up a command prompt and type:
C:\> nslookup - your.dns.server
In the nslookup prompt, type:
> set q=any > ls -d domain.name
Hope this helps.
In this tutorial I will show you how to package custom font(s) into a Windows Installer .msi package for easy deployment to computers in a network through Active Directory. Alternatives is to use a VBscript solution or batch file solution, but I like this solution better as it allows me to deploy it through a AD group policy, it will automatically ensure that the fonts is only installed once, and should I ever want to remove the fonts from all the computers again, it is just a matter of updating my AD group policy. The Windows Installer technology handles the rest.
The problem is pretty simple. When using ASP.NET Themes you do not have much say in how your style sheets are rendered to the page.
The render engine adds all the style sheets you have in your themes folder in alphabetic order, using the
I have always found it too difficult to add a “Choose xxxxx” item to the top of a
DropDownList, when the
DropDownListbinds to a
SqlDataSourceor similar. I almost always ended up just feeding the
DropDownListits content from the code behind, even though it felt like something that should be possible directly. The control do have a
AppendDataBoundItemsproperty, but most of the time you just end up with duplicated items.
Today I was looking at Ukadc.Diagnostics, an extension to the System.Diagnostics namespace, and decided to build a test website myself to get more familiar with it. After reading through Ukadc.Diagnostics Reference Example I thought it would be a homerun in the first try, but it turns out that without adding
compilerOptions="/d:TRACE"to each compiler in the compilers section in the Web.config, the tracing code is never compiled into the assemblies at runtime. Needless to say, I was scratching my head since my sample console application worked as expected the first time.
After reading Scott Mitchell’s article Using Coordinated Universal Time (UTC) to Store Date/Time Values, I decided to do as he suggest and use UTC for a web application I’m building at work. All in all it is fairly easy to deal with UTC in the .NET Framwork. There is a DateTime.UtcNow you can use instead of the regular DateTime.Now property, and there is a DateTime.ToLocalTime method that will convert your UTC DateTime value to the local server time zone, even taking daylight savings time in to consideration. When converting the other way, the DateTime.ToUniversalTime method is provided.