I spent a few days playing with Ruby on Rails a while back. During the learning experience, there was one particular feature that I really liked. It was the database migration scripts that get automatically generated for you. I always wished I had something like this in the windows (asp.net) world. It turns out there […]
Entries Categorized as 'Programming'
Database Schema Compare & Upgrade
July 10, 2008
Unit Test Private Methods in Visual Studio
July 9, 2008
I am working on a feature that will let me import twitter messages to yonkly and wanted to write a test for it. The method is private and I couldn’t get the unit test to see it. I also didn’t want to use the private accessor class generate by Visual Studio because I was mocking […]
Dynamically Build LINQ Queries Using Reflection
May 12, 2008
I was recently working on a project where there was an option to export data from the database. The export function simply exported 2 hard-coded columns that were returned by a stored procedure into a tab-delimited text file.
The sproc looked something like select id, name from mytable (I am over simplifying of course). I […]
Ruby on Rails Crumbs - Part 1
May 2, 2008
If you have been following along, I blogged previously about my experience trying Ruby on Rails as a .net developer (here and here). I quickly realized how different things are and that I desperately need some help, so I got myself the beta PDF version of Agile Web Development with Rails and Rails Recipes. Both […]
Ruby on Rails for a .NET Developer - Part 2
April 30, 2008
Ok, so I thought the whole scaffolding thing was so easy and I would be done in a few minutes. I was so wrong. Nothing seemed to work right. I would call ruby script/generate scaffold Tag and it will generate all the files but the views were empty. Hmm… This is exactly what has been […]
Ruby on Rails for a .NET Developer - Part 1
April 25, 2008
Looking at my blog or resume, you will immediately know that I am a .net developer and my entire programming career has been Microsoft-centric. I have been wanting to play with Ruby on Rails due to its inescapable popularity and I was actually surprised to learn that the language itself (Ruby) was developed in the […]
Ajax with ASP.NET MVC Framework Preview 2
March 31, 2008
This is the updated version of the Nikhil’s excellent example on how to use Ajax with ASP.net MVC.
I commented all the changes made in the code and prefixed them with //emad. So just search for //emad and you will see all the changes I made… Here is a quick list of the changes […]
Set a Clip in Code-Behind
March 17, 2008
You can use the Clip property on any item to clip its display area. For example if you have this two items rectBlue and rectRed like this
And you want to animate rectRed by sliding it out from the right side, without clipping it would look like this
But if you set the Clip property on […]
Silverlight: TemplateBinding Throwing an Error
March 14, 2008
This drove me crazy for about half an hour…
I attached this style to a button
<Style x:Key=”NavButtonStyle” TargetType=”Button”>
<Setter Property=”Opacity” Value=”0.8″></Setter>
<Setter Property=”Template”>
<Setter.Value>
<ControlTemplate>
[…]
Get Enum Value from String
February 20, 2008
Here is a quick tip. If you have the following Enum
Enum Frequencies
DAILY
WEEKLY
MONTHLY
End Enum
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { […]
Posted in
content rss
