LINQ - watchout for slow queries

LINQ or Language Integrated Query is great for application developers to develop applications that interact with databases. But remember it is a tool and like every tool, you have to use it wisely to achieve the best results. I currently maintain a web based application that is meant to allow job scheduling, and provide users a way to interact with the jobs that are currently running too. Some of the features include, stop the job that is running, skip one among the several jobs, restart the job, resume from a particular section in the job etc. It is a very rich web application. And we have used LINQ almost entirely for all the interactions between the database layer and the application. ...

February 14, 2016 · 4 min · 685 words

Password free SSH login to Server using Putty

Hey folks, So I’ve seen a lot of people open putty and then select their host and finally enter a user name and password. I don’t do that. I don’t want to either. Why would I? I’m a computer scientist/programmer/whatever. I should not do repetitive tasks. I should automate it. Password free SSH login is just that: Automation. How do you do it? This isn’t rocket science. Let us start with what SSH is Secure Shell. OMG! That didn’t help. It is a protocol that helps you to connect to remote machines securely over unsecured networks. Over use of secure you might say. You generally need an SSH server and an SSH client for this purpose. Generally most of your enterprise linux hosts would be configured to allow your personal workstation to connect to it using an SSH client like Putty. There are several different versions of this protocol too. But I’m not a networking protocol geek. So enough said. Let us go right into what you have to do to setup your computer to log in. ...

February 13, 2016 · 4 min · 683 words

Getting to know LINQ

LINQ stands for Language Integrated Query Language. It was a feature introduced along with Visual Studio 2008 that extends the querying capabilities of C# for any sort of data source. Generally LINQ is used to query data sources like SQL Server Databases and XML files. I use it to query databases. I’m not going to explain everything about LINQ here. I’m going to just talk about some very basic details. ...

July 27, 2014 · 3 min · 555 words

Refactoring - Code written by others

As you might have noticed from my recent posts, I’ve just recently jumped from one platform to another. And my current project is a bit of a legacy thing. A lot of people worked on it previously and those who did weren’t necessarily experts in the technology that they used when they initially developed it. They did a lot of hacky things, to get things going. But such hacks are good for getting a product moving, but not really good for maintaining them. And now that I’m having to implement changes to them, I realized how hard they have made this for me. ...

April 21, 2014 · 3 min · 472 words

Perl Catalyst - VBox Network Configuration on Ubuntu

In my previous post regarding PerlCatalyst tutorial setup I mentioned about setting up a virtual machine inside a virtual machine. I didn’t provide you with much information regarding how I did it because all the tutorials related to that is already available online. Pasting the links below: Catalyst::Manual::Tutorial::01_Intro But I had a serious problem with my virtual box inside a virtual box. Not so serious actually, just that it stopped me from proceeding ahead because of my ignorance of network configuration. The tutorial says that after downloading the virtual machine for the tutorial and setting it up as mentioned in the website, I could start using it as a server and log into it using ssh from my host computer. But for some reason the VM (virtual machine) provided by Catalyst just had a loopback network configuration. It wouldn’t show me a proper ip address to which I could connect to. And hence I had no way of connecting to this new tutorial virtual machine that I started from within an Ubuntu Virtual machine. I played around with the network configuration of VBox for a couple of hours trying out the different settings provided: ...

February 9, 2014 · 6 min · 1112 words

Perl Catalyst Tutorial needs us to download a virtual machine

I was trying to explore more about how and where Perl is used on the web. I figured out that there are a lot of web frameworks that are based on Perl. Catalyst seems to be a nice MVC framework that is really popular. I thought I’d take some time off to learn more about it. And I downloaded all the necessary packages and modules and then went on to check out the tutorial which is posted here: Catalyst Tutorial. I am already using Ubuntu on a virtual machine. My laptop came pre-loaded with Windows 8. And I’ve upgraded it to Windows 8.1. I always wanted to own a Linux laptop. But thinking about the lack of availability of games, I chose Windows over Linux. But I still can’t avoid using Linux as I always use it at work. Though recently I made a move to a windows based development team, which still has some code on non-windows based boxes. ...

February 9, 2014 · 2 min · 305 words

emacs - Why do I use it?

Over the past few years, the only text editor I’ve been using on Linux is emacs. Not because I wanted to. But after I joined the firm that I currently work for, I was trained in emacs. And I found it difficult to use initially. But then I decided that if every one else in the firm could use it and become an expert, then so can I. So I spend some time with the built-in emacs tutorial and I just learned it really quick. ...

February 9, 2014 · 4 min · 643 words

Perl module installation - Ubuntu

Ever wondered how to install a Perl module from CPAN: sudo perl -MCPAN -e 'install ModuleName'

February 5, 2014 · 1 min · 16 words

Perl - Modules and path on disk

I don’t know if you have ever wondered where a module that you have been using is installed. Working in a corporate with multiple operating systems and having to maintain data update systems on multiple platforms that run on Perl based scripts, you might have to make sure that the CPAN modules you use are of the same versions, to keep your code portable. So recently I ran across one of these problems and came up with some interesting solutions as suggested by my colleague. I didn’t understand what I was doing at the time. So I took a break and tried to understand how I actually got to know what it was. ...

February 2, 2014 · 3 min · 520 words

GNU Screen - Dynamic Window Titles, etc - tmux after this

So in one of my previous posts I told you about terminal multiplexing and also mentioned how cool it was. Now is the time to introduce you to GNU Screen. The wikipedia page is a good introduction already. But I should talk about it from my point of view, about how I use it. To be honest, if I knew of the abilities of tmux at the time I got to know about screen, I would have just started using tmux. It isn’t too hard to switch though. It would just take a day or two of getting used to the new short cuts. Or you could go ahead and manually configure your shortcuts to keep you happy. ...

February 2, 2014 · 7 min · 1451 words