The application reloads the list of jobs, if any job is reposted or expired. We display different labels, such as “reposted”, “expired”, depending on the action. It worked well with browsers but IE 8. Simply, IE was cacheing the part of html. Though we request the partial view by post. So, we brought in NoCache [...]
Archive for the ‘Programming’ Category
Disable browser cache for ajax request on ASP.NET MVC
Posted in Programming, tagged ajax, ASP.Net MVC, attribute, cache, jquery on April 25, 2012 | Leave a Comment »
rails generate basics
Posted in Programming, tagged basics, generate, rails on April 22, 2012 | Leave a Comment »
create controller with help and home routes the option no-test-framework suppresses the default rspec test (or test::unit). if you have created them by mistake, you can destroy them. Creating a model is the same. Errors Could not find a javascript runtime. Install node.js.
rake basics
Posted in Programming, tagged basics, rails tutorial, rake on April 22, 2012 | Leave a Comment »
Rake is ruby make, a make-like language in ruby. make has been used to build code in linux & unit environment. This execute migrate db scripts. Use bundle exec, to run the version of rake in your gem file. You can see rake commands.
git basics
Posted in Programming, tagged basics, git on April 21, 2012 | Leave a Comment »
I have used git for a year now on my personal projects, but it is still mysterious. I feel like I need a good gui. Anyway, this is the basics of git, so don’t expect any in-depth knowledge from this post. An augmented .gitignore This will ignore rails document, vim, emacs swap files, and Mac [...]
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 [...]