Thursday, September 23, 2004

Essential Software Tools

Lessons learned in my software development career.....

Essential tools to manage the "construction phase" of a software project of any size

1. Source Code Control (VSS, PVCS, Starteam.....)
2. Issue Tracking ("bug tracking" is old term) (Test Director, Bugzilla, Ultrapps issue tracker)
3. Automatic Build Management (Nant and Cruisecontrol .net)


Also...

NUnit.... Most of the developers find NUnit difficult to understant.. But once you try some samples with NUnit, all your mental blocks will be cleared and you'll "absolutely love NUnit".


Friday, July 30, 2004

Tools for safe browsing

All these are for free (for home users)

AVG Anti-Virus

Zone Alarm

Mozilla Firefox browser

Friday, June 18, 2004

JEXcelAPI

Generate Excel Files on your website (Convert JEXcelAPI to a .Net DLL )

Introduction

What is JEXcelAPI?

JExcelApi is a Java API for reading, writing and modifying the contents of Excel spreadsheets.

Now you would argue that Microsoft already provides Office object libraries API for reading, writing and modifying excel spreadsheets. Yes, you are right. But there are certain limitations in using microsoft office objects on IIS.

You can find the info about the limitations at : http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757

So, what would you do if you want to create excel spreadsheets from your websites which are developed in ASP/ASP .Net?

Purchase an excellent set of components from Softartisans.

If you are looking for an open source/freeware alternative.. then.. trust me .. I've searched the web for one month and could not find a decent open source/freeware solution to the problem.

Then I stumbled upon two java based solutions... ( The following components support a limited set of the features of Microsoft excel)

1. Jakarta POI HSSF
2. JExcelApi

I tried to compile the Jakarta source code using Microsoft Visual J# but there were too many compiler errors. Then I tried JEXcelAPI; within an hour's effort, i compiled the java code into a .Net DLL and written some basic code in C# to test the component. It was a success.

These are the steps i followed .....


1. Download the jexcelapi source

http://www.andykhan.com/jexcelapi/jexcelapi_2_4_3.tar.gz


2. Create two folders
a. c:\jexcelapiJava
b. c:\jexcelapiNet

3. Unzip the compressed jexcelapi_2_4_3.tar.gz into c:\jexcelapiJava

4. Start Visual Studio .Net
a. Select Visual J# Projects -> Class Library
b. Save the Project as
Name: jexcel
Location: C:\jexcelapiNet

5. In Visual Studio .Net Delete Class1.jsl from the project

6. Now open the "C:\jexcelapiJava\jexcelapi\src" folder in windows explorer look at the folder structure. You'll notice that

the folder structure is as follows
common
----log
jxl
--biff
----drawing
----formula
--demo
--format
--read
----biff
--write
----biff

7. Create similar folder structre in the visual studio .Net Project we've created in Step 4 above. You can do "right click"

on the Project and select Add-> New Folder
a. as a first step create the "common" and "jxl" folders
b. then create sub folders and sub-sub folders of these folders



8. Once you are done with the folder creation, Its time to add the java files which you've downloaded and saved in

c:\jexcelapiJava (mentioned in step 3 above). You can do this by right clicking on the folder and select "Add Existing Item"

from the context menu, this will open a file dialog.. go tto the appropriate folder under "C:\jexcelapiJava\jexcelapi\src"

and select the files of that folder.

9. Save the Project.

10. Now search for the string "public static void main" in the entire project. We need to comment this function ( because we

are goint to use this as a class library). You'll find this in the jxl/demo/demo.java file.



11. Remove the following files from common/log folder

Log4JLogger.java
SimpleLoggerName.java
Log4jLoggerName.java

12. Save the project

13. Now click "Build" -> "Build Solution" from the top menu

Compiler will display lot of compiler errors... don't panic.

Look at those errors carefully , You can notice that most of those errors are about the variables which are declared but

not used in the code. (meaning -> dead variables)

The real code errors are about 5 or 6. go to the code .. if the error is "stack.clear" then change it to "stack.empty"
if you don't understand the error then comment the line (and related lines) with a retrivable comment like

"//NeedModification" so that you can carefully look at the required code modification later.


14. Once you're done with commenting the code.. click "Build" -> "Rebuild Solution" from the top menu again.

Voila

You'll get a compiler message like...

Build complete -- 0 errors, 32 warnings
Building satellite assemblies...



---------------------- Done ----------------------

Rebuild All: 1 succeeded, 0 failed, 0 skipped




15. Now go to the following folder "C:\jexcelapiNet\jexcel\bin\Debug", what do you see there? jexcel.dll
Which means.. you have a javaexcelapi .Net DLL

16. Do you want to test the dll? Right then add a
1. "Visual J# Windows application to the soultion" and set it as a startup project
2. set the references to the jexcel project
3. Add a button to the form and double click it. this will lauch the code window.
4. try example code from the jexcelapi code downloaded

Happy coding

PS: Don't forget to modify the commented code. and if you have done successful modification and testing.. send the code to me

:)


Wednesday, June 09, 2004

ASP Debugging

Tired of using Response.Write?

Check this out

http://www.remotedebugger.com


Wednesday, April 07, 2004

Converting Audio tapes into MP3s

How to convert the sounds recorded in audio tapes/cassettes into MP3s?

You need the following hardware

1. A PC with sound card
2. An audio cassette player/ walkman which has "headphones socket"
3. A stereo Cable which has "Stereo Pins on both ends"

Connections
1. Insert the Stereo Pin of one end of the cable into the walkman/cassette player's headphones socket.
2. Insert the Stereo Pin on the other end of the cable into the "Line-in" socket of your PC.

The PC sound card interface looks like this....

| o |<-- Headphones Socket
| o |<-- Line-In Socket
| o |<-- Microphone Socket

Playing Music

1.Switch on your PC and switch on your PC Speakers
2.Switch on your Cassette Player, Insert an audio cassette and press the play button.

At this point you should be able to listen to the music played by audio cassette player from your PC speakers.

If you could not hear any sounds  then...

a. Check whether you've inserted the Stereo cable pins into appropriate sockets
of the Player and PC
b. Check whether the cable is OK. 

Recording the Sound

You need to get a software to record the sounds which are directed into your PC from an "external, sound producing hardware"..(in this case your.. Your "audio cassette player").
You can find lot of commercial/shareware/freeware to record the sounds and convert them into MP3s

For example "Rosoft Audio Recorder" 

You can download the software at

http://download.com.com/3000-2140-10242667.html?tag=lst-0-2

or you can look at the other available recorders

http://download.com.com/3120-2001-0-1-0.html?qt=audio+recording&author=&titlename=&desc=&dlcount=&daysback=&swlink=&os=&li=49&dlsize=&ca=


Have Fun!!