Wednesday, April 30, 2008
Some useful tools for Delphi developers
Tuesday, April 15, 2008
Celebrating new year
Thursday, April 10, 2008
Constitutional Assembly Election in Nepal
Tuesday, April 08, 2008
New Delphi Magazine
Wednesday, April 02, 2008
Back again
Tuesday, August 14, 2007
Management Lesson: Taking charge with programmers
If you want to communicate with a programmer, you have to take charge. Programmers are a tricky bunch sometimes. But you, not the programmer, are in charge of the project. Although the programmer is in charge of a large portion work, you’re the one responsible of the project if the project fails. You must establish dominance without being too aggressive. Establish five things through your early communications:
- Leadership: Leadership is focused on motivating, aligning objectives, and moving your project team to a destination. Assume that you’re leading the project and that your project team will follow.
- Management: Management is focused on getting results. As a project manager, your core focus is on getting the project successfully completed. Management of a group of programmers means you must see results.
- Discipline: When your programmers aren’t getting their work done as promised, don’t hesitate to discipline according to your human resources guidelines. Be careful about making snap judgments, thought. First, find out why they aren’t completing the work. Were your instructions unclear? Was there a miscommunication on your end? The problem could be yours and not the programmers’.
- Organization: Your ability to communicate, lead, manage, and discipline your project team centers on your organizational skills. Be organized and your project team will respect you for having everything on the ball.
- Balance: In all your decisions you must be fair. Your team of programmers will respect you even more if you show balance and fairness in all of your work assignments and disciplinary actions. Don’t play favorites.
Wednesday, June 20, 2007
Multiple instances of the application
Thursday, April 05, 2007
Management Lesson: The Law of Diminishing Returns
Wednesday, August 09, 2006
Restructuring SVN repository
1. First, dump the repository to some file
svnadmin dump /path/to/repo > dumpfile.txt2. Move your repository folder to somewhere else in order to backup, just in case
mv /path/to/repo /path/to/repo_backup3. Now, manually change the "Node-path:" and "Copy-to-path:" headers to insert "trunk/" into them
sed -e 's/^\(Node-path: \)\(.*\)/\1trunk\/\2/;s/^\(Copy-from-path:\)\(.*\)/\1trunk\/\2/' dumpfile > dumpfile.newIf you find above command too hard, just open the dumpfile in any text editor and do find and replace. :-) You should be replacing "Node-path:" with "Node-path:trunk/" and "Copy-to-path:" with "Copy-to-path:trunk/". Simple huh! 4. Create new repository
svnadmin create /path/to/repo5. Load modified dump file into newly created repository
svnadmin load newdumpfile.txt path/to/repo6. Finally, import 'tags' and 'branches' folder in the repository. Now, you will see your repository with proper structure in which you can make branches and tags of your project.
Monday, January 30, 2006
Distributed Version Control with SVK
Plan of implementation
In order to make SVK work, the plan is to mirror the central repository in the local machine. Then the local branch is created. Instead of using the mirrored trunk, user will be accessing this branch. At the end of the day, when everybody is done with their work, the local branch is merged into mirrored trunk. At the same time, the central repository is automatically updated.
Installing SVK
SVK is written completely in Perl and kind of pain to install. Luckily, in my Fedora Core 4 system, Subversion was already installed with perl binding, all I needed to fire the command;
perl -MCPAN -e 'install SVK'This command install SVK and all of it's many dependencies.
Setting up local 'depotmap'
To set up local repository, the following command does the trick;
svk depotmap --initThis will create a default depotmap. Alternatively, if you want to make a depotmap to the desire location, just issue the command
svk depotmapThis will open a default text editor and let you edit the depotmap name and the location.
Mirroring the central repository
svk mirror svn://mydomain.com/myproject/trunk //localrepo/trunkTo ensure that mirror has been setup,
svk mirror --list command can be used. Now that the mirror has been set up, the local copy is sync with mirror using
svk sync //localrepo/trunkCreating a local branch
The first thing need to be done before start working is to create a local branch. Doing this is same as in Subversion.
svk cp -m "local branch" //localrepo/trunk /localrepo/localbranchYou can check the branch by issuing the following command;
svk ls //localrepo/localbranchNow user is able to work with the local branch using TortoiseSVN or anyother Subversion client tool.
Merging from local branch to the mirror
At the end of the day, after everybody is done with the work, local branch must be merged to the mirror. This can be done with the command svk smerge command.
svk smerge -C //localrepo/localbranch //localrepo/trunkThe C option checks for the conflict that may have. Now, if there is no conflict, the actual merger can be done using following command;
svk smerge -l //localrepo/localbranch //localrepo/trunkThis command also updates the repository automatically that the mirror points to.
Tuesday, November 29, 2005
Google Reader
Friday, October 07, 2005
Insert and Delete with DLinq
Authors aut = new Authors();
aut.AuId = id;
aut.AuFname = fName;
aut.AuLname = lName;
aut.Phone = phone;
db.Authors.Add(aut);
db.SubmitChanges();
Continuing the work I left last time, I made an object of Authors and added ID, first name, last name and phone to it. Then calling the SubmitChanges method, the actual data is written to database.
Similarly, deleting a record is also not so hard.
var authors = (
from a in db.Authors
where a.AuId == id
orderby a.AuFname
select a).First();
db.Authors.Remove(authors);
db.SubmitChanges();
In order to delete a record, First method is called with the query, which returns a particular record. By passing this record to the Remove method of Authors object, a record will be deleted. With this, record deletion is only limited to memory data. Actual record will be deleted only after calling SubmitChanges method.
The next step is to explore transaction in LINQ.
Linq and DLinq in action
using System;
using System.Collections .Generic;
using System.Text;
using System.Query;
using System.Xml.XLinq;
using System.Data.DLinq;
using System.Data.SqlClient;
using pubs;
namespace LINQApp
{
class Program
{
static void Main(string[] args)
{
dbQuery();
}
static void dbQuery()
{
SqlConnection conn =
new SqlConnection(@"SERVER={YourDBServer};user id={uid};password=;database=pubs;");
Pubs db = new Pubs(conn);
var authors =
from a in db.Authors
select a;
foreach (var auth in authors)
{
Console.WriteLine(" {0} {1} | {2} | {3} ",
auth.AuFname, auth.AuLname, auth.Address, auth.Phone);
}
Console.ReadLine();
}
}
}
Wednesday, September 21, 2005
The LINQ project
Thursday, September 15, 2005
Camera, Action, Go!
There are few more to watch on flickr.
Wednesday, September 14, 2005
Learning Photography
Tuesday, August 23, 2005
New Job
Wednesday, August 03, 2005
Reporting with RAVE
Wednesday, July 13, 2005
The 24 hours of Delphi
Friday, June 17, 2005
Namespace in Delphi
Also, I am really impressed with the namespace support in Chrome.

