Thursday, February 23, 2006

Here's how:

http://www.imilly.com/tools.htm#ole

Download and follow the included directions. 

One thing you may need to change is the location of the firefox executable in the InFirefox.htm and InFirefoxPage.htm files. 

Why would I do this?:

Until IE 7 comes out of beta, IE is missing the great developer features that firefox has.  So this is a nice shortcut to open pages in firefox and use the web developer tools.

Firefox already has an extension that let's you open a file in IE and I use this extension instead of this hack.

 |  | 
Thursday, February 23, 2006 11:23:14 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, February 16, 2006

Here's another area where the documentation that comes with Visual Studio 2005 and the suff online as MSDN make a simple topic complicated.

To add a connection string to the App.Config:

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

   <connectionStrings>

      <add name="aConnectionString"

      connectionString="Data Source=localhost;Initial Catalog=Northwind;Integrated Security=True"

      providerName="System.Data.SqlClient"/>

   </connectionStrings>

</configuration>

 

To retrieve it in your program:

 

1. Add a reference to System.Configuration (no this is not automagically included).

 

2. Add a using statement:

   

   using System.Configuration;

   

   Optionally add another using statement for the sqlclient:

 

   using System.Data.SqlClient;

 

3. Use this code to grab the connection string:

 

   string cnString = ConfigurationManager.ConnectionStrings["aConnectionString"].ConnectionString;
   SqlConnection cn = new SqlConnection(cnString);

Note:  You can also add the connection string information to the connectionStrings section of the machine.config.  This is handy if you have a machine that runs many automated script type programs.

Thursday, February 16, 2006 2:31:44 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Wednesday, February 15, 2006

I came across this page with some useful code samples:

http://www.personalmicrocosms.com/html/dotnettips.html

I used the XML pretty printing one today.  Of course most of the material is stuff you can figure out rather quickly but I would rather work on solving other problems.

Wednesday, February 15, 2006 11:05:22 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Tuesday, February 14, 2006

This seems to be an under documented feature of ASP.NET 2.0.

You can easily embed resources (text files, images, etc) in you assemblies.  This is very handy for server control deployment.  However the documentation for this is somewhat lacking.

Here goes:

At the top of your class add an attribute to allow an embedded attribute:

[assembly: WebResource("MyProject.ResourcesFolder.JavascriptFolder.AutoCompleteTextBox2.js", "text/javascript")]

(This can also go in the AssemblyInfo.cs)

One big gotcha here is the fact that the first argument is the default namespace + folder location + the actual name of the file to embed.

So if my default namespace is "MyProject" and the file is located in /Resources/Javascript and named AutoCompleteTextBox2.js then the resource will be embedded correctly. 

Then to make sure that the javascript link is embedded in the page:

protected override void OnPreRender(EventArgs e)
{
    this.Page.ClientScript.RegisterClientScriptResource(

       typeof(MyType), 

       "MyProject.ResourcesFolder.JavascriptFolder.AutoCompleteTextBox2.js");

    base.OnPreRender(e);
}

You need to place this in the PreRender event handler for the code to be placed correctly in the page.

Finally, make sure your resource is compiled into your assembly.  By Changing the build action on EACH resource that you want to include.  Check out the image below.  the date_control.js file is now an embedded resource and can be accessed using the methods listed above.


Tuesday, February 14, 2006 3:42:04 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Monday, January 23, 2006

I came across this while searching for a CD recorder for Windows XP.  I haven't burned a CD in a long time and I realized that I hadn't copied one since I re-imaged my system back in May of 2005.  I used to use Nero but I was too lazy to find the software so I downloaded this:

http://isorecorder.alexfeinman.com/isorecorder.htm

It seems to be a bit faster then the built in Windows XP facility for copying data disks via drag and drop.  It also lets you burn ISO's which is a plus.  I'm not sure it's ready for the toolkit yet as it hasn't proven its mettle in combat yet.

---Updated 06/02/2006---

I've used this a few times now and it did the job.  One problem I ran into is that you can't record the ISO's off network drives or drives that are aliased with the subst command.  So just keep that in mind if you are having any problems burning an ISO.

Monday, January 23, 2006 8:30:27 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Thursday, January 12, 2006

PSPad is still the winner.   There are some odd things I don't like but for the most part I think it's pretty good.  It still loads fairly fast.  It has GREAT HTML, CSS and JavaScript support along with the color picking ability.  It integrates with TopStyle (and the free Lite) version but with the included intellisense and color support I don't think you necessarily need TopStyle. 

PSPad has made it only 3 of my 4 machines and the fourth I don't use often for development so it's not a big deal. 

All in all I will say that PSPad is the king of development oriented text editor.  For Now...

PSPad Site

Thursday, January 12, 2006 9:42:28 AM (Central Standard Time, UTC-06:00)  #    Comments [1]
 Monday, January 02, 2006

I was under the weather this weekend so I spent some time looking for a new text editor.  I had a few requirements:

  • File explorer
  • ability to view differences between 2 files
  • syntax support for Ruby
  • pretty print features

I tried out CPad and it was very promising.  However there is a little bug with CPad where the program will not close without killing it in taskmgr.  I posted the bug on the CPad form and we will see if it gets fixed.

So I tried quite a few others but none had the features I listed above.

Then I came upon PSPad.  It has the features I need plus the kitchen sink.  This thing has everything from a color picker to an ASCII table to the ability to handle ruby embedded in HTML.  Something only sophisticated IDE's are usually able to handle. 

I'm still playing with the PSPad but I think it may replace my current favorite Crimson Editor and earn a place in the Pragmatic SDK.

Update:

Yes it does do Ruby fairly well.  I must admit however that since ASP.NET 2.0 came out I haven't used Ruby or Ruby on Rails much.  I'm exploring the new features of ASP.NET and C# and enjoying the new IDE.

See the comment below for enabling Ruby syntax support.

Monday, January 02, 2006 8:08:24 PM (Central Standard Time, UTC-06:00)  #    Comments [2]
 Saturday, December 31, 2005

Paul Graham is a LISP dude.  He likes LISP.  He preaches LISP.  This made me very interested in LISP because I find his writing to be interesting. 

Joel Spolsky is also an interesting writer.  He has mentioned LISP several times in various essays.

Taken together this provides curiosity about LISP.  I’ve downloaded SCHEME and played with it.  On the surface it seems an interesting concept.  You define functions which you can then call.  Not too far out.

I’ve also come upon the recent Reddit-LISP-convert-to-Python controversy and this inspired some thinking on my behalf. 

I will concede that LISP is the most powerful language in the solar system.  Maybe GOD (GOD Over Djinn) wrote the universe in LISP.  If so why didn’t he provide the nice standard libraries for sockets and threading that the Reddit team would eventually need?

I’m interested in these ideas because I recently started using Ruby on Rails and JavaScript which are both languages with a similarity to LISP (or maybe the better description is “cheap knock offs of LISP” or maybe “actually useable versions of LISP”?).  Of course as an avid reader of the sources I’ve mentioned above I was more readily willing to try Ruby.  My background is in Microsoft technologies and Java.  I started in VBScript then I went to Visual Basic then to .NET with C# and then to Java and now back to classic ASP and ASP.NET with C# and Visual Basic. 

I’ve learned that .NET and Java the platforms are roughly equivalent in power with Java having the longevity advantage which provides for all kinds of open source resources and a mountain of documentation.  Java can run on multiple OS’s and I used to work for a company where this was important, now I don’t so this is no longer an issue for me.

Now LISP claims the title as most powerful.  I would append this to “theoretically most powerful.”  If it is the most powerful why do people stop using it because it can’t do what they need?  Why did Paul Graham have to write his back office code in Perl and his image manipulation in C if LISP was so powerful?  Why does Joel Spolsky write FogBugz in ASP classic? 

It comes down to libraries.  Java is the king of libraries.  I can find Java classes to do anything.  NET is catching up.  JavaScript is going to rule client side software.  So why am I using Ruby?  Because I can get most of what I need to get done very fast and there are a lot of libraries for Ruby available.  Not as many as Java or NET but no deal killers yet.  It’s cross platform.  I develop on a Windows machine and deploy to a FreeBSD machine with no problems. 

Maybe one day I’ll get around to truly learning LISP but it will probably be after I’ve written my killer app in a more powerful language…

Saturday, December 31, 2005 10:36:31 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
 Friday, December 30, 2005

I've been thinking about business ideas lately and this topic comes to mind.  Many of the large and well publicized acquisitions by Yahoo and others are for general purpose large user base applications.  These include picture sharing and social networking in one form or another. 

Today in a meeting one of my colleagues made the comment that "custom is always better" in reference to COTS versus home grown software.  This started a thought process on the value of software and a continuum for measuring the value. 

On the low end you have a product like Writely or Basecamp.  These applications are simple and general purpose.  On the other side you have software for a custom application and in the extreme case it is for one customer, one site or perhaps one special purpose like running one of a kind machinery.  Now I believe that we can place value of the software along this spectrum.

A piece of blogging software has almost zero value because it is on the commodity end of the spectrum.  Anyone can write blogging software and everyone apparently has.  There are so many open source blogging engines that it's almost comical.  Let’s say that the developer/publisher makes one cent off each user so volume is important.

On the other hand specialized software is expensive.  Software for complex processes like specialized work flow, monitoring and industrial processes is very expensive.  COTS packages for this type of application are not cheap.  In this monetary range many organizations hire programmers either full time or as consultants to build custom applications.  These often are the most expensive of the software options, yet like a tailored suit often provide the best fit.

The problem I’ve seen is that companies that have a full time development staff often opt for COTS packages.  While many times this is a great fit for example buying the MS Office suite is a good idea, trying to wedge a work flow system into an organization is not such a good idea.  The more custom your application, meaning the more a COTS solution needs tailoring for the organization, the more a custom developed application makes sense. 

These types of application can pay very well but you need a lot of pay from these jobs because you very likely can only sell one of them.  You can’t mass produce these applications on a CD and put them on the shelf in Wal-mart. 

What does this mean?

I think that the companies purchased by Yahoo, Google et al. are lottery winners.  The development effort was equivalent to buying the $1 Lotto ticket at the local gas station.  When you win you win big but most the time you lose but it’s not a big deal because you haven’t invested much.


The other side is more like a Texas Hold ‘Em game.  You’ve got fewer competitors but you know who you’re playing against.  This is where the big boys play; the COTS players with the deep pockets, if you will. 

I think my spot is somewhere in the middle.  I don’t want to write yet another blog engine but I don’t want to make shrink-wrapped software.

 

 

Friday, December 30, 2005 9:18:04 PM (Central Standard Time, UTC-06:00)  #    Comments [0]