You use keyboards and command line more and more, as you get more experienced with the tools in development. If you install git on windows, it creates “Git bash here” context menu on Windows Explorer. It is really handy, and I like it. I believe Visual Studio installation should do the same. Well, it doesn’t, [...]
Archive for the ‘Programming’ Category
The benefits of simple, automated performance testing by Kristoffer Dyrkorn
Posted in Programming, tagged NDC, Perfornamce on July 31, 2011 | Leave a Comment »
It is so good that all those videos are published after conference. If you are not a speaker at the conference, not sponsored by your company, or not have a free ticket, often you can’t simply afford to attend it. This is the first of “My learnings from NDC Conference Videos” series. The benefits of simple, automated [...]
Handling Sandwich Code in C#
Posted in Programming, tagged c#, lamda, sandwich code on June 30, 2011 | Leave a Comment »
What is “Sandwich Code”? I found it in Ruby Koans. Often, you have to do something at the beginning and at the end, even though your main lock is in the middle. Let’s say, you want to retrieve data from database. You have to create a connection, open it, use it to load data, and [...]
My favourite helpers for ASP.NET MVC
Posted in Programming, tagged ASP.Net MVC, Html Helper on April 14, 2011 | 2 Comments »
As you use ASP.NET MVC on and on, you start building and using handy html helpers. Rob Conery posted a few of his helpers on his blog. You can find some more in his ASP.NET MVC source code. Inspired by his helpers, here I post mine. 1. Html.Image Depending on the environment, the absolute url [...]
Testing private method in unit testing
Posted in Programming, tagged c#, NUnit on November 2, 2010 | Leave a Comment »
Ideally, it is not recommended to test private methods, as complex internals should be kept hidden and only interface be tested. Well, in real world, sometimes, you need to test your private methods, as it performs very important operation. In my case, the method was public and later I changed it to private, since it [...]
Outputting to pdf using iTextSharp
Posted in Programming, tagged C# iTextSharp on August 25, 2010 | Leave a Comment »
Recently, I moved to Barclays. My job is still development, though. Totaljobs is a good company, and I enjoyed its casual, IT geek culture. It’s the thing I miss in my new job, as I work with quants. The web application here has generally more complex UI. On public web page, you would not normally [...]
Pulling records from a referenced table using Entity Framework
Posted in Programming, tagged Entity Framework on August 9, 2010 | Leave a Comment »
Strangely, most of Entity Framework examples are for just one table. In real world, it is very rare, unless you use some document database. Often you get a result set from a database which joins two or three tables. There is one example of how to use navigation property. http://msdn.microsoft.com/en-us/library/bb896321.aspx I tried it, and thanks [...]
Using NHibernate, Sqlite in your ASP.Net MVC project
Posted in Programming, Uncategorized, tagged MS Test, NHibernate on April 29, 2010 | 4 Comments »
I used Entity Framework for my personal projects for a while but wanted to try NHibernate. Instead of NUnit, I tried MS Test this time. First problem was that MS Test fails, complaining that hibernate.cfg.xml does not exist. It did not copy the file to MS Test out directory. Of course, I set “Copy to [...]
Deploying Sqlite together with ASP.Net MVC and Entity Framework
Posted in Programming, tagged sqlite on April 26, 2010 | Leave a Comment »
Of course, you need to install sqlite or deploy the dll together. Yet I keep forgetting that I need to register “.Net Framework Data Provider for Sqlite” You don’t need it on your dev machine, as Sqlite installation register it with your version of .Net machine.config. If you not register it, you will have an [...]
To get started with ASP.Net MVC 2
Posted in Programming, tagged ASP.Net MVC on April 3, 2010 | Leave a Comment »
I work on a few personal projects. Personal projects are fun, because you can choose which technology and tools you are going to use and often you can experiment with the latest fancy things. I once used ASP.Net MVC for my toast manager and became a fan of ASP.NET MVC. Also, my experience with ASP.Net [...]