Category Archives: programming
Using javascript to avoid the mouse and page scrolling
Here’s the problem. It is not very easy to scroll a document when you’re inside an input element. Arrow keys don’t work, and Page Up/Page Down jump in big increments. What if you want to see just a few lines below the current element? Our clients hate to scroll. And they hate having to use [...]
Also posted in code, jquery, js Leave a comment
Tuning LINQ performance with Mr. P and Mr. S
I thought I’d take a second look at the Mr. P and Mr. S problem, which I’d posted more than a couple of years ago. The last time I tried it, I wasn’t successful. I had a strategy to solve it, but somehow I just couldn’t translate it into code. I’ve been programming a lot [...]
Also posted in c#, code, tips Leave a comment
On reflecting extension methods in C#
Extension methods are a great way of adding functionality to existing classes. It almost makes C# similar to ruby/javascript, where none of the classes are “closed” – functionality can be added to them at any point of time. For example, say we want the method ToTitleCase to be available to all String objects, and we [...]
Also posted in c#, extension, methods Leave a comment
Make your editor help you
While the above is funny, using a good editor, and using it effectively, usually prevents such situations. A good auto-completing editor isn’t necessarily to help one type faster – it is most helpful for the context sensitive documentation that it provides. It brings documentation closer to the act of writing code, and saves the context [...]
Also posted in editor Leave a comment
So, I took my GRE …