Sunday, December 16, 2007

Odyssey Bookstore Pune

Finally a book-store which had almost all the stuff I've been looking for, for the last 2-3 months. Though the store looks small compared to others like Landmarks or Crosswords, they have a sophisticated collection of books and CDs. I went there looking for the 'Tao of Jeet Kune Do', though they didn't have it, I got 2 other amazing books on the same subject which were also on my list. I must say the customer care is pretty good, they took down the request the 'Tao...', lets see how soon they can get it!

They also must have a pretty neat collection of CDs. I say 'must have' since I didn't have much time to browse through their collection, I just asked for "Deep Purple - Knocking at your back door" and "Best of Shania Twain", they handed me both without much searching, amazing!

Crosswords, you could learn a few things from these guys.

Monday, December 3, 2007

Sparring fear

Two days back I sparred with four or five different students. Everyone one of them used me as a punching bag with my 100% co-operation!

I travel out of my city for my Martial Arts classes so there is usually a gap of 2 - 3 week between the days I attend. I train at home 1 - 2 hours everyday when I'm not attending and keep picturing techniques and moves I can try the next time I spar.

Never has it happened that a single technique I had thought of earlier could be executed during actual sparring. I seem to freeze during sparring and all the grand plans I have disappears into smoke.

I finally searched google for "fear of sparring" and came across some good blogs. I chanced upon some sayings which have motivated me:

'When practicing martial arts, don't be the artist; become the art'

'Every Black Belt is a White Belt who did not quit'

If things work out for me I'll try and analyze how these saying motivated me and helped me to act differently in my next sparring session. Till then keep training.

Wednesday, October 24, 2007

Patenting the conecpt of Patents and links

I wonder if the concept of Patents is patented.
Anyway, a few links which discuss the stupidity and greed of people concerning patents:

Believe it or not! Some ass**** patented the idea of swinging on a swing, and I'm not even talking about Java.

http://www.patentstorm.us/patents/6368227-fulltext.html


Legendary Richard Stallman talks about the implications of software patents.

http://www.guardian.co.uk/technology/2005/jun/20/comment.comment


Read this idea for a patent.

http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PG01&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.html&r=1&f=G&l=50&s1=%2220050160005%22.PGNR.&OS=DN/20050160005&RS=DN/20050160005


A small article software programmers.

http://gadgetopia.com/post/2727

Wednesday, August 22, 2007

Kudos MediaMax !!!

MediaMax users have been facing problems with their accounts for sometime now.
I too couldn't access any of my files.....TILL TODAY!
How happy I am to see all my pics and programs back online!!
MediaMax rocks!

SqlDependency not firing

Grrrr...after hours of trying various pieces of C# code and tinkering with SQL Server 2005 settings it turns out that the database owner was the problem.

class Program
{
static string connStr = "Server=DARKSTAR; Initial Catalog=MyDatabase; Integrated Security=false; User Id=sa; Password=XXXXXXXXXX";

static SqlDependency dep;

static void Main(string[] args)
{
SqlDependency.Start(connStr);
TestSqlNotificiation();
SqlDependency.Stop(connStr);
}

static void TestSqlNotificiation()
{
try
{
using (SqlConnection conn = new SqlConnection(connStr))
{
conn.Open();

SqlCommand cmd = conn.CreateCommand();

cmd.CommandText = "Select RollNo, [Name] from dbo.Students";

dep = new SqlDependency(cmd);

dep.OnChange += new OnChangeEventHandler(OnDataChange);

SqlDataReader dr = cmd.ExecuteReader();
{
while (dr.Read())
{
Console.WriteLine("Name = " + dr[1].ToString());
}
}

dr.Close();

Console.WriteLine("Waiting for any data changes...\nPress to end program.");
Console.ReadLine();
}
}
finally
{
//SqlDependency.Stop(connStr);
}
}

static void OnDataChange(object sender, SqlNotificationEventArgs e)
{
Console.WriteLine(e.Info.ToString());
Console.WriteLine(e.Source.ToString());
}
}
}

This is the program which should fire the OnDataChange function when rows change in the Students table. However, the event was simply not firing.

Finally I chanced upon this article which made everything work right. It turned out that I was having problems with the database owner. I just changed it to 'sa' for the time-being:

ALTER AUTHORIZATION ON DATABASE::MyDatabase TO sa;

Wednesday, August 15, 2007

SQL Server 2005 Express Advanced Edition reports AGTACCOUNT error during Setup

SQL Server 2005 Express Advanced Edition reports following error during setup:

"SQL Server Setup has determined that the following account properties are not specified: 'AGTACCOUNT' . The properties specify the startup account for the services that are installed. To proceed, refer to the template.ini and set the properties to valid account names. If you are specifying a windows user account, you must also specify the password for the account."

After trying some of the stuff mentions at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=365116&SiteID=1 I finally gave up.

But wait a minute, there was something about a template.ini file.
This is what I did and it worked. First copy the install files from your Read-Only media (CD/DVD) to a folder on your hard-drive. Open the template.ini file (directly under the root folder containing the setup files).

Look for the following section:

; Note that if SQLBrowser is already installed, SQLBROWSERACCOUNT and SQLBROWSERPASSWORD are ignored.

SQLBROWSERACCOUNT=
SQLBROWSERPASSWORD=

SQLACCOUNT=
SQLPASSWORD=

AGTACCOUNT="NT AUTHORITY\NETWORK SERVICE"
AGTPASSWORD=

ASACCOUNT=
ASPASSWORD=

RSACCOUNT=
RSPASSWORD=
;--------------------------------------------------------------------
; To use the *AUTOSTART features, specify 1 to start automatically or 0 to start manually.

See the bolded line, all you need to is specify the account for it and then launch setup.exe with the following parameters:
setup.exe /settings c:\template.ini

Looking at the command line, it seems likely that you could get away by copying and editing just the template.ini file instead of all the installation files to hard-disk.

Sunday, May 13, 2007

CSV Reader Quick and Dirty

Well, this program like many others was developed by me, for me.
I needed a better utility than notepad to view my log files which
are in CSV format. What better way to spend a weekend than developing
a new utility?

The CSV format may look simple but it can get pretty complicated if
you take into account "all" capabilities of CSV format. If you don't
believe me take a look at this:
http://www.shaftek.org/publications/drafts/mime-csv/draft-shafranovich-mime-csv-02.html

Anyway, I didn't really need a CSV reader which supports the full CSV
specification. I just needed something which can read "my" log files!
As it turned out, many of the data-exports and log files generated by
other applicatoin were also read successfully by CSV Reader.
This was reason enough for me to believe that this little utility might
be useful to others and this is why I am making it available on the www.

Here's a screenshot:
Screenshot

MD5 Hash of Executable: E9D023ECEB07A8AF421F155CCD6224BF
MD5 Hash of ZIP: 63CB43CF9AF08CFA0629540B96E175F8

Download It!

Monday, May 7, 2007

A Paradoxical approach to Energy Saving and ECO Friendliness

Here's a post about an electric sports car.
http://news.com.com/Silicon+Valley+engineers+peek+at+the+Tesla/2100-11389_3-6181574.html?tag=nefd.lede
Good thing: "its electric" and should be Eco-friendly.
Paradox: It a two seater! Why not use a bike? If you are going to waste so much energy running a car, at least make sure 4 people can travel in it!

Sunday, May 6, 2007

Version 1.1 of Net Use

Just 2 days since I posted the "NetUse" utility and there's already a new version!
Improvements:
- Old "net use" connections are remembered so that when you want to connect to 'that server' you never seem to remember, its listed in the 'New Connection' dialog along with the login id you had used for it. Passwords are not remembered so you will need to put in the password again.

Download It
MD5 Hash of Setup: 875FFDC77AA32242748BDA7FD0A3D734

Thanks to Harsha for giving the idea.

Friday, May 4, 2007

My Favorite Breakfast

Here's an tasty and easy to make breakfast for those days when YOU have to do the cooking and your wife wants to take it easy:
3 tablespoons of finely chopped garlic
1 whole onion cut fine
1 can of baked beans
Whole grain brown bread
1 teaspoon of olive oil

Heat 1 teaspoon of olive oil in a non-stick pan for 2 minutes
Add the garlic and onions for about a minute
Just as the garlic and onions start getting golden yellow, add the entire can of baked beans.
Add 2 tablespoons of red-chilly sauce
Add 2 tablespoons of tomato sauce
Add 2 dried red-chillies broken into 1cm sized pieces
Heat for another 2 minutes
Serve piping hot with toasted bread.

YUM!!!!

Friday, April 27, 2007

GUI version of Net Use

Here's a GUI version of the useful "net use" command.
You can create net use connections, delete existing connections, view list of existing connections and you can also create Drive Mappings.
Screenshot:
screenshot
Size : 1.3 MB
MD5 Hash of package (setup.exe): F25BBB701DB8E84AA532AEFC59B6E78A
Download It!
Hope you like. Mail any comments/bugs to siddharth_b@yahoo.com

Wednesday, April 18, 2007

It's a Timing Thing

Here's a small program I quickly whipped up. It shuts down Windows at a specified date and time. Its written in C++, you don't require .NET or any other runtimes.

Screenshot:
Screenshot

Download size: 156 KB
MD5 Hash of ZIP: 508FBAFDD04C72057EAB7F350DF22EE0
Download It

Sunday, April 15, 2007

Service Removal Utility

Here's a utility by your's truly which will remove Windows Services from your computers. Its written in C++, you don't require .NET or any other runtimes.

Screen Shot

Download Size: 109 KB
MD5 Hash of EXE: 36ca0af19cb9bda78bd39a956095029b

Download Now



Hope you liked it.

Friday, April 13, 2007

Compile error while using SHBrowseForFolder API in Borland C++ Builder

How annoying to see a perfectly good piece of code not compile!
That too for no fault of your own.

If you're using SHBrowseForFolder Shell API in a Borland C++ Builder project, you might run into the following problem:
Compile Error

To get around this all you need to do is define NO_WIN32_LEAN_AND_MEAN in the project settings like this:

Project Settings

Happy coding.

Sunday, April 1, 2007

Auto increment build number of .NET assemblies

Found a simple way to automatically increment the build number of .NET assemblies.
You need a program which will parse the AssemblyInfo.cs file and pick up the build number from there, increment and write back the file.

You'll need to call this program as part of your Pre Build step.

The program is a small C++ utility which does all the parsing and stuff. Its also not very intelligent, it can handle only versions specified as:
[assembly: AssemblyVersion("1.0.3.0")]

In the pre-build event command line, enter:
..\..\..\..\tools\IncBuildNumber.exe $(ProjectDir)Properties\AssemblyInfo.cs -build
This is for my project which has a directory structure like this:
Logman
|
- Tools
|
-Source
|
- Sid.Utilities

The Tools folder contains IncBuildNumber.exe
The Source\Sid.Utilities contains my C# project.

Note, for older .NET project, the AssemblyInfo.cs will not be under Project\Properties folder, it will be directly under the Project folder.

Last point, when building from the IDE, do not keep the AssemblyInfo.cs file open since this will cause the IDE to ask for reloading the file.

Here is the source code for the utility.
Here is a link to download the utility.

Saturday, March 31, 2007

Visual Studio SP1 - Absolutely Amazing!

Installing Visual Studio 2005 SP1 is a pain in itself.
Slip-streaming SP1 into the main Visual Studio 2005 installer seemed like a good idea until:



Anyway, if you want to slip-stream SP1, here's the link.

Here's a link that might speed thing up a bit.


Saturday, January 20, 2007

Code (S)talkers

I bet there must be more than a few people you know who seem to have a solution for all your programming (software development in general incl. design et all) problems. In fact listening to them you almost always end up agreeing that they are correct, this is until you actually try putting their suggestions into practice. They almost never work. The solutions usually involve less work, but they screw up the design, all the beautiful decoupling you had done, everything good the project ever had suddenly goes up in smoke.

You'll also notice that such people rarely write any code themselves, what I mean is that you must be writing tonnes of codes while making cool utilities, reusable classes etc, but this bunch never does any of this. They just talk.

So, beware of the code (s)talkers!

DVD for Developers

Good bye CDs, hello DVDs.

We still get Visual Studio installation disks in the form of CDs so also MSDN cds.
I prefer having just one DVD containing both Visual Studio and its MSDN documentation. Here is a link to an article which tells you how make such a DVD.

Also, having a Directory synchronization for such tasks really helps. I wrote my own folder synchronizer which is pretty easy to use. All you need is to have Microsoft .NET 2.0 framework installed on your PC.

You can download DirSynch here.

Happy burning!

Monday, January 15, 2007

Closing the box

As software development matures, doesn't it look like developers are becoming less and less programming-literate?

No offense, but when was the last time you thought about writing a linked list? Isn't it all there already? Our dependence on ready-to-use libraries is increasing at an alarming rate. Hell, once you program in C# you don't even feel like touching C++!

This of course is a natural evolutionary path for software languages. Isn't this what reuse is all about? Having utility classes like collection classes, windowing classes etc. help the developer to concentrate more on the business logic instead of spending large part of development time on such code.

This is good, but not always. Traditional knowledge of computers like pointers, memory, paging etc. are being lost quite fast. Only a small amount of developers are left who attempt working on stuff like compilers, OS, database systems etc. With lesser developers working on such projects, there will be lesser new operating systems, databases and other important software leaving end users with very little choice.

Here is a link to a very good story by Richard Stallman. It almost makes me think of various Asimov novels I have read.
http://www.gnu.org/philosophy/right-to-read.html

Tuesday, January 9, 2007

Installing VisualStudio 2003 in MY folder

I have been trying to install Microsoft Visual Studio 2003 on my machine for some time now.
Usually, its pretty easy, just select the components, their folders and there you go but this time the installer wasn't allowing me to choose the folder for the main (root) component.

I used to have it installed at c:\program files\... but I had uninstalled this few weeks back. Now I wanted to install it in f:\program files\...

I tried searching google for finding a solution for this problem but couldn't find much. Finally, I manually removed all registry entries having the path to the previous installation of Visual Studio 2003 and it worked!

Thursday, January 4, 2007

Bad Wafers

Has anyone noticed that the quality of Lay Wafers (take any flovor) getting worse since the last few months?

I noticed that this phonemenon coincided with the introduction of the 'Pringles' style of new wafer by Lays.

I shout 'not fair'! since the older packs (big size) is for Rs. 20 while the new ones is for 55 odd rupees.