<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>&#34;Hello World&#34; - The SlickEdit Developer Blog &#187; SlickEdit Products</title>
	<atom:link href="http://blog.slickedit.com/category/slickedit-products/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.slickedit.com</link>
	<description>&#34;Hello World&#34; - The SlickEdit Developer Blog</description>
	<lastBuildDate>Tue, 08 Jun 2010 18:45:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Let’s Make a Macro Part 2: Adding Debug Timing</title>
		<link>http://blog.slickedit.com/2010/05/let%e2%80%99s-make-a-macro-part-2-adding-debug-timing/</link>
		<comments>http://blog.slickedit.com/2010/05/let%e2%80%99s-make-a-macro-part-2-adding-debug-timing/#comments</comments>
		<pubDate>Thu, 06 May 2010 13:41:53 +0000</pubDate>
		<dc:creator>Scott Hackett</dc:creator>
				<category><![CDATA[Macro Programming]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=486</guid>
		<description><![CDATA[In Part 1, we went over how to create a macro from scratch, load it and bind it to a key.  We also went over some basic macro functionality like inserting a new line of text and determining which language we are working in.  I thought it would be useful to stick with the theme [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://blog.slickedit.com/2010/04/lets-make-a-macro-part-1-outputting-debug-values/" target="_blank">Part 1</a>, we went over how to create a macro from scratch, load it and bind it to a key.  We also went over some basic macro functionality like inserting a new line of text and determining which language we are working in.  I thought it would be useful to stick with the theme of writing a macro that could insert some useful code.  In this blog, we&#8217;ll write a macro that surrounds the currently selected block of code with some simple code that reports how long the block takes to execute.  It&#8217;s sort of a poor-man&#8217;s performance tuning, and everyone needs to do it from time to time when they need to determine how long various sections of code take to execute, but don&#8217;t want to instrument the whole code base.</p>
<h3>Working with selections</h3>
<p>The very first thing I realized when I sat down to do this was that I&#8217;d need to get the bounds of the current selection, and I&#8217;d never worked with selections before.  Whenever I hit an area that I&#8217;m unfamiliar with, the first place I go is the <strong>API documentation</strong>.  To get there, you can click Help &gt; Contents, and then click <em>API Documentation</em> at the bottom of the contents list.  Next, select <em>Macro  Functions By Category</em> and you will be taken to a categorized list of the documented Slick-C functions.  I scrolled down and found the <em>Selection Functions</em> category in the list, clicked it, and started looking through that list for potentially useful ways to get the bounds of the current selection.</p>
<p>Right away, I noticed _get_selinfo() and it looked like a perfect fit.  The problem that I discovered though, is that _get_selinfo() doesn&#8217;t provide line numbers for the current selection, only column numbers, which made it useless for the information I needed.  I then decided to look at how other macro functions were using _get_selinfo(), so I right clicked it and selected <strong>&#8220;Goto reference to _get_selinfo&#8221;</strong> which lists all of the places in the macro code where it&#8217;s called.  You can also use the <strong>find-refs</strong> command for this.  This led me to other code that used _begin_select() and _end_select(), which I had passed over in the help originally because they sounded more like actions than a way of getting selection information.  My strategy for getting the line range was to call _begin_select(), which places the cursor on the first line of the selection, and insert a line of code to get a timestamp.  I would then do the same thing with _end_select() and insert the code to get a second timestamp and report the difference.</p>
<h3>Writing the macro</h3>
<p>We&#8217;ll start by beginning a new macro file the same way we did in <a href="http://blog.slickedit.com/2010/04/lets-make-a-macro-part-1-outputting-debug-values/">Part 1</a>, and we&#8217;ll call it &#8220;insert_debug_timer.e&#8221;.  Using our selection strategy, we can write the following macro code:</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/04/codesnippet12.png"><img class="alignnone size-full wp-image-490" title="codesnippet1" src="http://blog.slickedit.com/wp-content/uploads/2010/04/codesnippet12.png" alt="" width="674" height="386" /></a></p>
<p>After loading this, you can select some text in your editor, run <em>insert-debug-timer()</em> and your selection will be surrounded by the text &#8220;This is the beginning&#8221; and &#8220;This is the end&#8221;.  Success!  Now we can move on to inserting the actual code that will do the timing.  There will be two parts to this, the code that gets inserted before the selection, and the code that gets inserted after the selection.  I first made a throw-away command to test what the code might look like (in Slick-C):</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/04/codesnippet22.png"><img class="alignnone size-full wp-image-494" title="codesnippet2" src="http://blog.slickedit.com/wp-content/uploads/2010/04/codesnippet22.png" alt="" width="432" height="178" /></a></p>
<p>Let&#8217;s start with the code that gets inserted before the selection.  We know that we&#8217;re going to have to detect which language we&#8217;re in and insert something different based on that, just like we did in Part 1.  I didn&#8217;t want to pollute the code in the <em>insert_debug_timing()</em> command, so I decided that I&#8217;d make a separate function to insert the &#8220;before&#8221; code.  This function will take the indentation text as a parameter and directly insert the text at the current line.</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/04/codesnippet31.png"><img class="alignnone size-full wp-image-496" title="codesnippet3" src="http://blog.slickedit.com/wp-content/uploads/2010/04/codesnippet31.png" alt="" width="624" height="329" /></a></p>
<p>Next we can write the second function, which is basically the same as this one, except that it inserts the code to take a second timestamp, diff the two timestamps and report the time difference.  We now replace the lines in <em>insert_debug_timer()</em> with calls to these two functions.  We now have a command that takes the current selection (or the current line if there&#8217;s no selection) and wraps it with timing code.</p>
<h3>A final improvement</h3>
<p>This is a good start, but there are a small improvements I had to include.  The problem I ran into after about 10 seconds of using the macro is that if you have more than one section you want to time, you get a variable name collision.  Since these debug timing code inserts are really just temporary, we can name the variables anything we want.  I decided to make a global int variable called g_debugVarCounter that we could append to the variable names every time the <em>insert_debug_timer()</em> command is called, and then increment that value at the end of the command.  Here is the declaration of the global counter:</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/05/codesnippet4.png"><img class="alignnone size-full wp-image-499" title="codesnippet4" src="http://blog.slickedit.com/wp-content/uploads/2010/05/codesnippet4.png" alt="" width="537" height="38" /></a></p>
<p>and here&#8217;s how we can use it to make the variable names:</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/05/codesnippet5.png"><img class="alignnone size-full wp-image-500" title="codesnippet5" src="http://blog.slickedit.com/wp-content/uploads/2010/05/codesnippet5.png" alt="" width="396" height="90" /></a></p>
<p>Now we can insert debug timing commands wherever we want and there are no variable name collisions.  The <em>insert-debug-timer()</em> macro is ready to be bound to a key combination by clicking Tools &gt; Options, then go to Keyboard and Mouse &gt; Key Bindings in the options tree, just like we did in part 1.</p>
<p>The macro file can be downloaded by <a href="http://www.slickedit.com/images/stories/macros/blog/insert_debug_timer.e" target="_blank">clicking the this link</a>.</p>
<h3>Removing debug timing sections</h3>
<p>Another important improvement would be a way to remove any of the code we&#8217;ve inserted by running this command.  We&#8217;ll cover how to do that in the next blog post&#8230; check back soon!</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2010%2F05%2Flet%25e2%2580%2599s-make-a-macro-part-2-adding-debug-timing%2F';
  addthis_title  = 'Let%E2%80%99s+Make+a+Macro+Part+2%3A+Adding+Debug+Timing';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2010/05/let%e2%80%99s-make-a-macro-part-2-adding-debug-timing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s Make a Macro Part 1: Outputting debug values</title>
		<link>http://blog.slickedit.com/2010/04/lets-make-a-macro-part-1-outputting-debug-values/</link>
		<comments>http://blog.slickedit.com/2010/04/lets-make-a-macro-part-1-outputting-debug-values/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 14:13:08 +0000</pubDate>
		<dc:creator>Scott Hackett</dc:creator>
				<category><![CDATA[Macro Programming]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=435</guid>
		<description><![CDATA[One of the things that we think sets SlickEdit apart from other editors is the amount of customization you can do to it.  If you aren&#8217;t happy with the way something behaves, chances are there&#8217;s an option to change it. In addition to the standard settings available in the Options dialog, there&#8217;s the fact that [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that we think sets SlickEdit apart from other editors is the amount of customization you can do to it.  If you aren&#8217;t happy with the way something behaves, chances are there&#8217;s an option to change it. In addition to the standard settings available in the Options dialog, there&#8217;s the fact that much of SlickEdit is written in macro code.  This allows for an entirely new level of customization and functionality tailored to the way you work.</p>
<p>Unfortunately, only the most advanced of the advanced users ever consider getting so deep into an application that they learn to write their own macros for it.  There&#8217;s a few reasons for this.  Many people don&#8217;t even know that so much functionality is available in macro form.  Even if a user did look into making their own macros, finding out what functionality is available in macro code is an enormous challenge.  We all have deadlines and important things to do, and learning a new code base like the Slick-C macro language just doesn&#8217;t realistically fit into most people&#8217;s 24 hour day.</p>
<p>I personally love making little knock-off gizmo utilities for things that fit my workflow.  One of the things that I do often is putting debug statements at various points in my code to report the value of some variable.  This is very helpful when you want a history of values, not just a one stop breakpoint in the debugger.  I decided to make a macro that adds these statements automatically given the word under my cursor (assuming it&#8217;s a variable).  It&#8217;s a simple, first-step macro, and instead of just posting the code, I&#8217;m going to walk through the steps to make it.</p>
<h2>Starting a macro from scratch</h2>
<p>To start, click <strong>File &gt; New Item From Template</strong>.  This will bring up the &#8220;Add New Item&#8221; dialog.  Select Slick-C in the &#8220;Categories&#8221; tree, select a location where you&#8217;d like this file (a scratch development folder is best), and enter <em>insert_debug_value</em> as the name.</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/03/addnewslickcitem.png"><img class="aligncenter size-full wp-image-443" src="http://blog.slickedit.com/wp-content/uploads/2010/03/addnewslickcitem.png" alt="" width="459" height="399" /></a></p>
<p>Click the Add button.  This creates a new file called <em>insert_debug_value.e</em> in the specified directory.  This file will be opened in a new buffer with the following code included:</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/03/initialcode.png"><img class="aligncenter size-full wp-image-444" src="http://blog.slickedit.com/wp-content/uploads/2010/03/initialcode.png" alt="" width="333" height="133" /></a></p>
<p>This is the basis for all macros started from scratch.  You can load it hitting the escape button to go to the command line, then type &#8220;load&#8221; and hit enter.</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/03/commandbar.png"><img class="aligncenter size-full wp-image-449" src="http://blog.slickedit.com/wp-content/uploads/2010/03/commandbar.png" alt="" width="221" height="111" /></a></p>
<p>SlickEdit will respond by reporting &#8220;Module(s) loaded&#8221; in the status area at the bottom of the application.  You can now type &#8220;insert-debug-value&#8221; on the command line and your new command will execute.  Of course, it doesn&#8217;t do anything yet&#8230;</p>
<h2>Implementing the macro</h2>
<p>A general strategy for this function will be the following:</p>
<ol>
<li>Get the current word that the cursor is in.</li>
<li>Determine which language is being edited.</li>
<li>Insert a new line beneath that to output it&#8217;s value.</li>
</ol>
<p>That seems simple enough.  To start, we&#8217;ll use the <strong>cur_word()</strong> function to determine the full word beneath the cursor.  This function has a byref parameter, which returns the beginning column of the current word, so we have to pass a temp variable for that.  We can also use the <strong>say()</strong> function to report the value of curWord to the stdout window.  The code currently looks like this:</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/03/codesnippet11.png"><img class="aligncenter size-full wp-image-448" src="http://blog.slickedit.com/wp-content/uploads/2010/03/codesnippet11.png" alt="" width="377" height="175" /></a></p>
<p>Again, you can reload this by hitting the escape button to go to the command line, then type &#8220;load&#8221; and hit enter.  If you run it from the command line, it will show the stdout window titled <strong>vsapi.dll</strong>, and the value of curWord will be shown.</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/03/vsapioutput.png"><img class="aligncenter size-full wp-image-450" src="http://blog.slickedit.com/wp-content/uploads/2010/03/vsapioutput.png" alt="" width="700" height="182" /></a></p>
<p>Now we can start to build the text that we&#8217;ll insert.  Since we want this inserted line to be indented to match the current line, we&#8217;ll get the current indentation using the <strong>first_non_blank()</strong> function.  This puts the cursor on the first non-blank column on the line.  Next, we&#8217;ll get the column number using the <strong>p_col</strong> property.  We can build an indentation string using the <strong>indent_string()</strong> function, passing the starting column value.  The code now looks like this:</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/03/codesnippet2.png"><img class="aligncenter size-full wp-image-453" src="http://blog.slickedit.com/wp-content/uploads/2010/03/codesnippet2.png" alt="" width="400" height="238" /></a></p>
<p>For this example, we&#8217;ll support three languages; Slick-C, C/C++ and Java.  To tell which language we&#8217;re in, we can use the <strong>p_LangId</strong> property, which returns the language ID of the current editor.  We can switch on that value and append the code to the variable containing the text to insert.  Finally we can call <strong>insert_line()</strong> to insert the text we&#8217;ve built.</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/04/codesnippet3.png"><img class="aligncenter size-full wp-image-476" title="codesnippet3" src="http://blog.slickedit.com/wp-content/uploads/2010/04/codesnippet3.png" alt="" width="697" height="294" /></a></p>
<p>Go to the command line and reload the file by typing &#8220;load&#8221; and hitting enter.  Now put the cursor on a variable in the editor, go back to the command line and type &#8220;insert-debug-value&#8221; and hit enter.  A <strong>say()</strong> statement will be inserted into the file on the line after the cursor that reports the value of the variable your cursor was on.  Now you have a way to quickly add a debug statement to your code to report the value of the variable without having to write anything.  A final improvement is to store the original line number and column so they can be restored after the new line is inserted.</p>
<p>The macro file can be downloaded by <a href="http://www.slickedit.com/images/stories/macros/blog/insert_debug_value.e" target="_blank">clicking the this link</a>.</p>
<h2>Binding a key combination to your macro</h2>
<p>A macro like the one we just made works best when bound to a key, since we don&#8217;t want to have to go to the command line every time we want to invoke it.  To bind a key combination to this macro, bring up the options by clicking <strong>Tools &gt; Options</strong>, then go to <strong>Keyboard and Mouse &gt; Key Bindings</strong> in the options tree.  Type the name of the macro in the &#8220;Search by command:&#8221; text box to find it.  Double click its entry to bring up the &#8220;Bind Key&#8221; dialog.  We&#8217;ll bind it to &#8220;Ctrl+Shift+/&#8221;.  Press that key combination and it will appear in the &#8220;Key Sequence:&#8221; dialog.  Click the &#8220;Bind&#8221; button to bind it.  The key bindings entry should look like this:</p>
<p><a href="http://blog.slickedit.com/wp-content/uploads/2010/03/keybinding.png"><img class="aligncenter size-full wp-image-447" src="http://blog.slickedit.com/wp-content/uploads/2010/03/keybinding.png" alt="" width="591" height="123" /></a></p>
<p>Click OK on the options dialog.  Now, whenever you press &#8220;Ctrl+Shift+/&#8221; your macro will execute.</p>
<h2>Is it perfect?</h2>
<p>Absolutely not!  There are many potential problems here.  The cursor may not be on a variable.  The buffer may be read only.  There are also many other languages that this macro could support.  The list is potentially huge.  However, this macro is a starting point from which you can start to tinker around with writing your own macros.  Soon, you&#8217;ll be amazed at how much can be done with Slick-C that you&#8217;ll start writing lots of little tools and utilities that fit your own unique workflow.  Check back for more blog posts in this series, which will build on what we&#8217;ve started here.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2010%2F04%2Flets-make-a-macro-part-1-outputting-debug-values%2F';
  addthis_title  = 'Let%26%238217%3Bs+Make+a+Macro+Part+1%3A+Outputting+debug+values';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2010/04/lets-make-a-macro-part-1-outputting-debug-values/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hey, Check Out My Slick New Editor!</title>
		<link>http://blog.slickedit.com/2009/09/hey-check-out-my-slick-new-editor/</link>
		<comments>http://blog.slickedit.com/2009/09/hey-check-out-my-slick-new-editor/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 14:21:01 +0000</pubDate>
		<dc:creator>Jeffrey</dc:creator>
				<category><![CDATA[Code Editors]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SlickEdit Products]]></category>
		<category><![CDATA[Diffzilla]]></category>
		<category><![CDATA[Macro Record/Playback]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[Regular Expressions]]></category>
		<category><![CDATA[slickedit]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=396</guid>
		<description><![CDATA[Greg Christopher of VMware has written an article for DevX.com: Hey, Check Out My Slick New Editor!
In the article he discussing some of his favorite features of SlickEdit and why SlickEdit is his code editor of choice for programming.
On objections on switching editors
If your current editor works well enough for you, why switch? The answer depends [...]]]></description>
			<content:encoded><![CDATA[<p>Greg Christopher of VMware has written an article for DevX.com: <a href="http://www.devx.com/enterprise/Article/42874/0/page/1"><strong>Hey, Check Out My Slick New Editor!</strong></a></p>
<p>In the article he discussing some of his favorite features of SlickEdit and why SlickEdit is his code editor of choice for programming.</p>
<p><strong>On objections on switching editors</strong></p>
<blockquote><p>If your current editor works well enough for you, why switch? The answer depends on how you define &#8220;well enough.&#8221; Your current editor probably handles every editing command you think you need now, but consider the possibility that something could make you far more productive. You&#8217;ll see a few examples in a moment, but first, here are some of the reasons you might decide not to switch editors.</p></blockquote>
<p><span id="more-396"></span> <strong>Regular Expression Search and Replace</strong></p>
<blockquote><p>This isn&#8217;t an exclusive SlickEdit feature, some other editors have it too; but if you haven&#8217;t had the opportunity to experience regular expression searches, you should really consider switching to an editor that supports the feature.</p></blockquote>
<p><strong>Macro Record/Playback</strong></p>
<blockquote><p>SlickEdit carries out many of its commands through its slick-C programming language (note that both Brief and Emacs have their own languages as well). SlickEdit lets you write your own macros, or do a simple record / playback. This comes in handy when the syntax for find and replace gets too dicey.</p></blockquote>
<p><strong>Other Features</strong></p>
<blockquote><p>As you might imagine, because SlickEdit&#8217;s been around for 20 years, this article just scratches the surface.</p></blockquote>
<p>Continue reading <a href="http://www.devx.com/enterprise/Article/42874/0/page/1">Hey, Check Out My Slick New Editor<strong>!</strong></a> here: <a href="http://www.devx.com/enterprise/Article/42874/0/page/1">http://www.devx.com/enterprise/Article/42874/0/page/1 </a></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2009%2F09%2Fhey-check-out-my-slick-new-editor%2F';
  addthis_title  = 'Hey%2C+Check+Out+My+Slick+New+Editor%21';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2009/09/hey-check-out-my-slick-new-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automating SlickEdit with Snow Leopard Services</title>
		<link>http://blog.slickedit.com/2009/09/automating-slickedit-with-snow-leopard-services/</link>
		<comments>http://blog.slickedit.com/2009/09/automating-slickedit-with-snow-leopard-services/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 13:45:40 +0000</pubDate>
		<dc:creator>Matthew E</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SlickEdit Products]]></category>
		<category><![CDATA[SlickEdit Mac]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=379</guid>
		<description><![CDATA[I have always liked the idea of the Services menu, but found it frustratingly crowded and not often helpful. And I always thought Automator had real potential, but I never really found a place for it in my day-to-day work. With the improvements to the Services menu in Snow Leopard, the combination of these features is wonderfully [...]]]></description>
			<content:encoded><![CDATA[<p>I have always liked the idea of the Services menu, but found it frustratingly crowded and not often helpful. And I always thought Automator had real potential, but I never really found a place for it in my day-to-day work. With the improvements to the Services menu in Snow Leopard, the combination of these features is wonderfully useful.</p>
<p>SlickEdit&#8217;s Slick-C macro language should be no stranger to our users, but many folks aren&#8217;t aware that macros can be called when SlickEdit is started. In this tutorial, I&#8217;ll demonstrate how to use Automator to create a simple text service for SlickEdit, using this macro call facility.<span id="more-379"></span></p>
<p>First, launch the <strong>Automator</strong> application and create a new service using the Service template. At the top of the new workflow, it should say <em>Service receives <strong>selected text</strong> in <strong>any application</strong></em>. Make sure <em>Replaces selected text</em> is <strong>not</strong><em> </em>checked.</p>
<p>From the library&#8217;s actions panel, select the <strong>Text &gt; New Text File </strong>action, and drag it into the workflow as the first item. Pick a name and location for the temporary file to be saved, and make sure <em>Replace existing files </em>is checked, or else you&#8217;ll receive an Automator error the second time you use the service. Select the Encoding to be (UTF-8).</p>
<p>From the library&#8217;s action panel, select the <strong>Utilities &gt; Run Shell Script</strong> action, and drag it into workflow as the second item. The shell should be set to the default of <strong>/bin/bash</strong>. Change the right-hand drop-down to read <em>Pass input <strong>as arguments</strong></em>.</p>
<p>Delete any existing text in the shell script editor. Add the following text as the first line.</p>
<pre>export VSLICKXNOPLUSNEWMSG="1"</pre>
<p>Switch to Finder, and navigate to the Applications directory. Highlight your SlickEdit application, and Control-Click the application, and select <em>Show Package Contents</em> from the context menu. Drill down to the <strong>Contents/slickedit/bin</strong>, highlight the <strong>vs </strong>executable, and drag this into the shell script editor. This will insert the full path to the executable in the script editor. Make sure it&#8217;s on a new line after the export line you just typed.<br />
Append the following right after vs, making sure the command is all one line.</p>
<pre>-#new-file "-#get $1"&amp;</pre>
<p>The full script should look like the following:</p>
<pre>export VSLICKXNOPLUSNEWMSG="1"
/Applications/SlickEditV1402.app/Contents/slickedit/bin/vs -#new-file "-#get $1"&amp;</pre>
<div id="attachment_380" class="wp-caption alignnone" style="width: 160px"><a href="http://blog.slickedit.com/wp-content/uploads/2009/09/AutomatorService.png"><img class="size-thumbnail wp-image-380" src="http://blog.slickedit.com/wp-content/uploads/2009/09/AutomatorService-150x150.png" alt="Automator Service" width="150" height="150" /></a><p class="wp-caption-text">Automator Service</p></div>
<p>Don&#8217;t forget the ampersand at the end of the second line. Save the service, (⌘+S), and give it the name &#8220;New SlickEdit File&#8221;.</p>
<p>Switch to another application, like Safari or TextEdit, highlight some text, and pull down the application&#8217;s services menu. Your new service should now be available in the menu in the Text category.</p>
<p>The SlickEdit &#8220;magic&#8221; is done with the <strong>-#</strong> arguments. These specify macros to be called when SlickEdit in invoked. Any SlickEdit macro command (defined with the <span style="color: #0000ff">_command</span> keyword in Slick-C) can be called. Surround the entire -# argument with quotes if the Slick-C command takes any parameters, like the <strong>get</strong> macro in this example.</p>
<p>You can create a similar service that will insert the text into the currently active document by simply removing the <strong>-#new-file</strong> argument.</p>
<p>By default, service workflows are saved under $HOME/Library/Services. You can remove the service by removing this file.</p>
<p>To rename a Service, select the workflow file under $HOME/Library/Services, Control-Click to bring up the context menu, and select Show Package Contents. Look for the <strong>Contents/Info.plist</strong> file, and open it in the Property List Editor application. Change the value of the <strong>Services/Item/Menu/Menu item title</strong> entry. You do not need to rename the workflow file itself.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2009%2F09%2Fautomating-slickedit-with-snow-leopard-services%2F';
  addthis_title  = 'Automating+SlickEdit+with+Snow+Leopard+Services';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2009/09/automating-slickedit-with-snow-leopard-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Small Changes</title>
		<link>http://blog.slickedit.com/2009/05/no-small-changes/</link>
		<comments>http://blog.slickedit.com/2009/05/no-small-changes/#comments</comments>
		<pubDate>Thu, 14 May 2009 15:12:19 +0000</pubDate>
		<dc:creator>Scott Westfall</dc:creator>
				<category><![CDATA[Dev Management]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=296</guid>
		<description><![CDATA[Recent experiences with SlickEdit 2009 have reminded me that there are no small changes. Even when you think you understand the nature of a change, severe side-effects can pop up in complex software.
This was the case when we put out our first release of SlickEdit 2009, version 14.0.0.5. We had completed our usual beta cycle [...]]]></description>
			<content:encoded><![CDATA[<p>Recent experiences with SlickEdit 2009 have reminded me that there are no small changes. Even when you think you understand the nature of a change, severe side-effects can pop up in complex software.</p>
<p>This was the case when we put out our first release of SlickEdit 2009, version 14.0.0.5. We had completed our usual beta cycle before releasing this version, which included a number of drops to correct reported problems. After the last beta drop, we made a few more changes, all of which seemed totally risk-free.</p>
<p>Within two hours of releasing SlickEdit 2009, we had reports of severe problems with the File tabs and the File list. These problems trace back to one of these simple, risk-free changes. We had done our normal testing after these changes, and we hadn&#8217;t discovered any problems. But this problem was so severe we had to pull the release until it could be fixed.</p>
<p>So, what did we learn from this?</p>
<p>First, there are no small changes. Even when you think you know the effect a change will have, you could be wrong.</p>
<p>Should we have tested more? Sure, you can always test more, but that is no guarantee that you will find a problem. Testing suffers from a horizon effect: you can only see as far as you test. The problem you need to find could lay just beyond or miles beyond. You don&#8217;t know until you find it.</p>
<p>Second, testing is different than using. When you are testing, you click all the buttons and try all the functions, but you are rarely able to perform all combinations of operations. Some problems depend on the order in which operations are invoked. Others require multiple operations before the problem surfaces, as was the case with the problem we missed.</p>
<p>It should be no surprise that the parts of SlickEdit that work the best are the things we use everyday. But there are many languages we don&#8217;t use on a daily basis. Even if we did, with a product like SlickEdit, our testing cannot hope to replicate the variety and complexity of our customers&#8217; use patterns.</p>
<p>We&#8217;ve determined that prior to shipping any release, we need help validating it. So, we&#8217;ll create a Release Candidate when we have finished our testing. We&#8217;ll make the Release Candidate available for early adopters to test, and if all goes well, it will be used for the General Availability release. In this way, we hope to catch more problems before they are set free to roam the countryside and terrorize the populace.</p>
<p><strong>Q&amp;A</strong></p>
<p><strong>Does that mean you&#8217;ve given up on testing? </strong>No, we plan to continue testing just as we always have. We just need help with final validation.</p>
<p><strong>What if I don&#8217;t have time to help you catch problems?</strong> Then wait until a release is no longer a release candidate. At that point, others will have helped to validate it, and you will have less likelihood of experiencing issues with a new version.</p>
<p><strong>If an unladen swallow flies west from New York&#8230;</strong></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2009%2F05%2Fno-small-changes%2F';
  addthis_title  = 'No+Small+Changes';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2009/05/no-small-changes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>User Attention Span, the New Performance Metric</title>
		<link>http://blog.slickedit.com/2008/08/user-attention-span-the-new-performance-metric/</link>
		<comments>http://blog.slickedit.com/2008/08/user-attention-span-the-new-performance-metric/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 14:31:22 +0000</pubDate>
		<dc:creator>Scott Hackett</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=245</guid>
		<description><![CDATA[When I was a kid, I was raised on Sesame Street.  I learned some counting and some reading, but most importantly, I learned how to pay attention in 3 minute chunks of time.   Over the years, that time has been cut down to somewhere around 30 seconds, which means that the advertising industry has [...]]]></description>
			<content:encoded><![CDATA[<p>When I was a kid, I was raised on Sesame Street.  I learned some counting and some reading, but most importantly, I learned how to pay attention in 3 minute chunks of time.   Over the years, that time has been cut down to somewhere around 30 seconds, which means that the advertising industry has done their job well.  Unfortunately, there&#8217;s a large group of people that share my short attention span&#8230; end users.</p>
<p><strong>Read The Friendly Manual&#8230; or not<br />
</strong></p>
<p>Many software products have changed over the years to cater to end users who don&#8217;t want to spend a lot of time learning how to use new software.  I first saw this in the game industry, where people can&#8217;t seem to be bothered to read a manual at all.  These days, games don&#8217;t even come with instructions.  They provide a tutorial level or integrated help that watches what you do and introduces you to the things you need to know as you play.  It&#8217;s brilliant, really.  The users don&#8217;t have to read a thing before playing, and who&#8217;d want to?  When I get a new game, I don&#8217;t want to waste time reading when I could be already up to level 10.  The game companies win too, because they don&#8217;t have to pay for the printed materials.  Everyone&#8217;s happy.</p>
<p>But how does this translate outside the game industry?  It&#8217;s been tried before, with much less success.  Clippy was the spokesman for the first wave of learn-as-you-go user experiences.  We all know how that turned out.  &#8220;<em>One of the worst software design blunders in the annals of computing</em>,&#8221; wrote <a href="http://en.wikipedia.org/wiki/Office_Assistant#Overview">Smithsonian Magazine</a>.</p>
<p><img width="300" src="http://www.slickedit.com/images/stories/blog/clippy.jpg" height="262" /></p>
<p>So users didn&#8217;t like being told how to use the software while they used it.  Another form of learning that is not always well received is the tip of the day.  I know my first order of business after installing new software is checking the &#8220;Never, never, ever show me this again&#8221; checkbox on the tip of the day dialog.</p>
<p><img width="353" src="http://www.slickedit.com/images/stories/blog/tipoftheday.png" height="292" /></p>
<p>Wizards also tried to ease the user into getting up and going without having to wade through options pages and understanding all of the menus and toolbars.  Although wizards have had some success, it&#8217;s still a paradigm that&#8217;s seems old.  When I think of wizards, I feel like I&#8217;m flashing back on an episode of &#8220;<a href="http://www.vh1.com/shows/dyn/i_love_the_90s/series.jhtml">I Love the 90s</a>&#8220;.</p>
<p>At the very least , there hasn&#8217;t been a lack of effort to try to help users figure out how to use their software without the manual.  Yet, most of these attempts seem to fail.  It&#8217;s as if users don&#8217;t want to read how to use the software and can&#8217;t be bothered being shown how to use it by the software itself.  Part of me wants to rant about how idiotic that is and the other half of me recognizes that I fall into that group.</p>
<p><strong>Done programming?  Great, now get back to work.</strong></p>
<p>I&#8217;ve spent most of my programming career writing programs for in-house use, or writing programs that were bought by large companies to be rolled out in-house.  The thing that all of my work had in common was that the end users were not end users by choice.  The software I helped write was all rolled out in some fashion to a large group of people whose jobs depended on them learning the software.</p>
<p>Here at SlickEdit, I&#8217;m no longer writing software that users <strong>must </strong>adapt to.  Instead, I&#8217;m writing software that users  make a conscious choice to use or not use.  The choice to use it hinges heavily on the trial, and if the user can&#8217;t get the trial installed and doing spectacular feats in less than five minutes, then the opportunity is completely lost. The bottom line is that the most important software performance metric is not how fast my code works, but how fast the user can use it meaningfully.  If that doesn&#8217;t happen, then the user loses interest and all of the great work we&#8217;ve done will never be seen.</p>
<p>That&#8217;s quite a psychological transition for me, because I&#8217;ve never focused before on instant user gratification.  One of our strategies involves the software helping users through an optional tool window, called the Tools Assistant,  which is part of the &#8220;Tools for Visual Studio&#8221; product.  It stays off to the side or can be closed if the user doesn&#8217;t want the help.  But there&#8217;s also a lot more to this effort than just adding up-front convenience to the software.  We also have to think up new ways to get users to see the product in action with very little effort on their part, often without even downloading it and installing it.  This involves a lot of non-programming work, like video script writing, screen shots, articles, etc&#8230;  It&#8217;s certainly an interesting change of pace, but it really pushes the limits outside of my programming turf.  I took a break the other day to fix bugs and it was refreshing just to see code for a while.</p>
<p>I love a change of pace&#8230; it keeps things interesting.   However, trying to figure out how to pitch a software product may be one of the biggest challenges I&#8217;ve had as part of a software development team.  I certainly never took any marketing classes in college, and at this point they&#8217;d all be irrelevant anyway.  So I&#8217;m no longer focused on reducing the time it takes to perform complex operations&#8230; my focus now is on reducing the amount of time it takes a new user to say, &#8220;wow, that is so cool!&#8221;  So far I can&#8217;t find any way to calculate the big O for that, but I&#8217;m trying.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2008%2F08%2Fuser-attention-span-the-new-performance-metric%2F';
  addthis_title  = 'User+Attention+Span%2C+the+New+Performance+Metric';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2008/08/user-attention-span-the-new-performance-metric/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Better way to find Eclipse command Ids, and more&#8230;</title>
		<link>http://blog.slickedit.com/2008/08/better-way-to-find-eclipse-command-ids-and-more/</link>
		<comments>http://blog.slickedit.com/2008/08/better-way-to-find-eclipse-command-ids-and-more/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 13:26:45 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Code Editors]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=243</guid>
		<description><![CDATA[Core 3.4.0 introduced the Slick-C function _eclipse_execute_command which allows you to execute Eclipse commands from the SlickEdit environment.  The documentation for this function shows you how you can search the Plug-in Registry to find Eclipse command names and ids, but there is a much better way documented in the following blog post:  http://evans-stuff.blogspot.com/2007/10/it-seems-that-im-not-only-one-still.html . 
Unfortunately I [...]]]></description>
			<content:encoded><![CDATA[<p>Core 3.4.0 introduced the Slick-C function <strong>_eclipse_execute_command</strong> which allows you to execute Eclipse commands from the SlickEdit environment.  The documentation for this function shows you how you can search the Plug-in Registry to find Eclipse command names and ids, but there is a much better way documented in the following blog post:  <a target="_blank" href="http://evans-stuff.blogspot.com/2007/10/it-seems-that-im-not-only-one-still.html">http://evans-stuff.blogspot.com/2007/10/it-seems-that-im-not-only-one-still.html</a> . </p>
<p>Unfortunately I discovered this technique after we finished the documentation and shipped the plug-in, but hopefully me pointing it out here may help some users. </p>
<p>Also, don&#8217;t forget the &#8220;Activate Editor&#8221; command in Eclipse (F12 by default).  If you are using <strong>_eclipse_execute_command</strong> to jump into different Eclipse Views and search around mouse-less, hitting F12 will jump you back into the last active editor.</p>
<p><strong>&lt;update&gt;</strong> </p>
<p>Check out this thread of the SlickEdit Forums for adding a generic Eclipse Pass-through Command: <a href="http://community.slickedit.com/index.php?topic=3549.0">http://community.slickedit.com/index.php?topic=3549.0</a></p>
<p><strong>From the post:</strong><br />
If you are evaluating 3.4.0 for your company, you can make this happen easily.  One of the best features in Core 3.4.0 is the introduction of _eclipse_execute_command, which is discussed in the user guide/readme, and also a little more in my post here: <a href="http://community.slickedit.com/index.php?topic=3816.0">http://community.slickedit.com/index.php?topic=3816.0</a> .  This is the idea that Rob suggests in this thread.</p>
<p>I&#8217;ll take this opportunity to give a brief tutorial on how to integrate that &#8220;Activate Task&#8221; shortcut into the SlickEdit environment.</p>
<p>First you need to know the command id of what you are trying to execute.  I used the method described <a href="http://evans-stuff.blogspot.com/2007/10/it-seems-that-im-not-only-one-still.html">http://evans-stuff.blogspot.com/2007/10/it-seems-that-im-not-only-one-still.html</a> , in which you create a Simple Cheat Sheet and use the Command Browse button (see first screenshot).</p>
<p><img src="http://www.slickedit.com/images/stories/blog/task1.png" /></p>
<p>Then I just used the search field to find the command (see second screenshot).</p>
<p><a href="http://www.slickedit.com/images/stories/blog/task2.png"><img src="http://www.slickedit.com/images/stories/blog/task2.png" /></a></p>
<p>Now that I had the command/parameter info, I opened up the Slick-C macro file where I write my custom commands (ryan.e), and added functions for Activate Task and Deactivate Task using _eclipse_execute_command (see third screenshot).  Remember to load your macro file with F12 after writing the functions.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/task3.png"><img src="http://www.slickedit.com/images/stories/blog/task3.png" /></a></p>
<p>Then I used the SlickEdit Keybindings dialog to bind eclipse_activate_task to Ctrl + F9 (see fourth screenshot), and voila.  Hitting Ctrl + F9 in a SlickEdit editor will launch the Mylyn Activate Task dialog.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/task4.png"><img src="http://www.slickedit.com/images/stories/blog/task4.png" /></a></p>
<p>It may seem like a lot of steps, but it&#8217;s really not.  This whole process took me less than 10 minutes including the time I took to capture/crop/annotate the screenshots.  You can use this method to execute almost any Eclipse command from any plug-in from the SlickEdit environment.</p>
<p>- Ryan</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2008%2F08%2Fbetter-way-to-find-eclipse-command-ids-and-more%2F';
  addthis_title  = 'Better+way+to+find+Eclipse+command+Ids%2C+and+more%26%238230%3B';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2008/08/better-way-to-find-eclipse-command-ids-and-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s Do a Code Review With SlickEdit Tools (Part 2)</title>
		<link>http://blog.slickedit.com/2008/07/lets-do-a-code-review-with-slickedit-tools-part-2/</link>
		<comments>http://blog.slickedit.com/2008/07/lets-do-a-code-review-with-slickedit-tools-part-2/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 14:56:10 +0000</pubDate>
		<dc:creator>Scott Hackett</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=241</guid>
		<description><![CDATA[This article continues Part 1 of the series, where we began the code review process by demonstrating some ways to find the best candidate files to review. We then introduced some techniques to identify what code a specific developer had written, using some of the features in the Versioning Toolbox. The next task is to [...]]]></description>
			<content:encoded><![CDATA[<p>This article continues <a href="http://blog.slickedit.com/?p=237">Part 1 of the series</a>, where we began the code review process by demonstrating some ways to find the best candidate files to review. We then introduced some techniques to identify what code a specific developer had written, using some of the features in the Versioning Toolbox. The next task is to actually comment on the code. This is always best done in an electronic format, in a way that can be pulled together with other developers&#8217; comments during the code review meeting.</p>
<p><strong>Using Code Annotations to Write Review Comments</strong><br />
The Code Annotations feature in the Editing Toolbox is extremely useful for writing code review comments because it lets you attach comments to specific locations in the code without altering the code itself. You can bring up the Code Annotations tool window by clicking <em>SlickEdit &gt; Show Code Annotations</em>.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/code_review/codeannotationstoolwindow.jpg"><img src="http://www.slickedit.com/images/stories/blog/code_review/codeannotationstoolwindow_small.jpg" /><br />
[Click for full size image]</a></p>
<p>The first step when writing code review comments is to create an annotation file to store all of your code review comments. You can then send this file to the code review organizer when you&#8217;re done. You can use the <strong>Annotation File Manager</strong> to create a file called &#8220;<em>Code Review &#8211; Bob</em>&#8221; (or whatever your name may be).</p>
<p><img src="http://www.slickedit.com/images/stories/blog/code_review/codeannotationsfilemanager.jpg" /></p>
<p><strong>Writing Comments About the Code</strong><br />
After applying the <a href="http://www.slickedit.com/images/stories/blog/code_review/defaultuserscheme3.jpg">&#8220;Scott&#8217;s code&#8221; visualization scheme</a> that we made in the first article, we can navigate through the sections of code that Scott has written. On line 497 of <em>PackageBaseWhidbey.cs</em>, we see that he&#8217;s doing a GUID comparison using a literal string. This goes against coding standards, so we&#8217;ll log a comment that the string literal needs to be defined as a constant. Put the cursor on that line and click the <strong>New Annotation</strong> button on the Code Annotations toolbar. This will bring up the <strong>New Annotation</strong> dialog.</p>
<p><img src="http://www.slickedit.com/images/stories/blog/code_review/newannotation.jpg" /></p>
<p>We&#8217;ll create a review comment, which is one of the standard annotation types. We&#8217;ll also select the &#8220;Global : Code Review &#8211; Bob&#8221; scope, or category, which will put the annotation into the code review file we created earlier. After filling out the fields and clicking OK, a purple highlighted marker is placed on the line of the new comment.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/code_review/annotatedline1.jpg"><img src="http://www.slickedit.com/images/stories/blog/code_review/annotatedline1_small.jpg" /><br />
[Click for full size image]</a></p>
<p>Once you create an annotation, it gets an entry in the annotation list. You can select that entry to see a summary of the annotation, or you can double click on it to jump directly to the code it is assigned to. This makes it easy to get to the code that you&#8217;ve commented on.</p>
<p>We also found a bug on line 431 of <em>FileUtility.cs</em>, so a bug annotation can be logged for that. This new annotation has a red highlight to indicate that it&#8217;s a bug type.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/code_review/annotatedline2.jpg"><img src="http://www.slickedit.com/images/stories/blog/code_review/annotatedline2_small.jpg" /><br />
[Click for full size image]</a></p>
<p>It&#8217;s helpful to only show annotations that you have created for the code review, without the clutter of others in the list. You can filter out all non-code review annotations by using the <strong>Annotation Filter Configuration</strong> dialog, available on the code annotations toolbar. Select <strong>Filter by Scope</strong> and select the &#8220;Global : Code Review &#8211; Bob&#8221; item. Now, only your code review annotations will be visible in the list.</p>
<p><img src="http://www.slickedit.com/images/stories/blog/code_review/annotationfilter.jpg" /></p>
<p><strong>Wrapping Up Your Review</strong><br />
Once all of your code review comments have been completed, they will all be contained in the file &#8220;<em>Code Review &#8211; Bob.sca</em>&#8220;, which we created at the beginning of the article (code annotation files have an extension of .sca by default). That file can then be sent to the code review organizer.</p>
<p><img src="http://www.slickedit.com/images/stories/blog/code_review/annotationfileattachment.jpg" /></p>
<p>All of the received code annotation files can then be imported by the organizer during the code review meeting, where they can be discussed. Reviewing code this way maintains a tight link between the code review comments and the actual source code, and is far better than trying to manage the process with pen and paper, or a set of text documents.</p>
<p>You can also create a report of the annotations to print before the meeting, or to send to other developers. To do this, click the <strong>View annotation Detail</strong> toolbar button. The <strong>Code Annotation Details</strong> dialog will be shown and each annotation in the list will be shown in the report. A small red document icon will appear by each annotation that may be clicked to navigate to that annotation in the source code. The report can be exported to HTML or printed.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/code_review/annotationreport.jpg"><img src="http://www.slickedit.com/images/stories/blog/code_review/annotationreport_small.jpg" /><br />
[Click for full size image]</a></p>
<p>The next step will be the actual code review meeting, which will be the focus of part 3 of this series. Once the code annotation files are pulled together from all of the reviewers, those comments can be discussed and updated. After the code review meeting, they can be exported to a single code annotation file and emailed back to the group. The developer being reviewed then has a clear set of action items as a result of the meeting.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2008%2F07%2Flets-do-a-code-review-with-slickedit-tools-part-2%2F';
  addthis_title  = 'Let%26%238217%3Bs+Do+a+Code+Review+With+SlickEdit+Tools+%28Part+2%29';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2008/07/lets-do-a-code-review-with-slickedit-tools-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s Do a Code Review With SlickEdit Tools (Part 1)</title>
		<link>http://blog.slickedit.com/2008/06/lets-do-a-code-review-with-slickedit-tools-part-1/</link>
		<comments>http://blog.slickedit.com/2008/06/lets-do-a-code-review-with-slickedit-tools-part-1/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 15:11:34 +0000</pubDate>
		<dc:creator>Scott Hackett</dc:creator>
				<category><![CDATA[Code Editors]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=237</guid>
		<description><![CDATA[As a developer, I look for tools that help me get things done quicker, and make tasks easier. This series of articles shows you how to take a handful of the features in SlickEdit Tools for Microsoft® Visual Studio® and use them to effectively put together and perform a code review.
I can&#8217;t say that I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>As a developer, I look for tools that help me get things done quicker, and make tasks easier. This series of articles shows you how to take a handful of the features in <a href="http://www.slickedit.com/content/view/408/244?utm_source=seblogtoolstut&amp;utm_medium=blog&amp;utm_campaign=seblogtoolstut">SlickEdit Tools</a> for Microsoft® Visual Studio® and use them to effectively put together and perform a code review.</p>
<p>I can&#8217;t say that I&#8217;ve met too many developers that eagerly looked forward to reviewing code. Most developers understand the importance of code reviews, but many have experienced the pain of poorly run code reviews. Although SlickEdit Tools does not have a &#8220;code review&#8221; feature, it provides several features that can be used together to make a code review run smoothly. A well done code review process can be the difference between developer loathing and developer buy-in.</p>
<p>Because code reviews are such a big topic, this article will focus on some of the steps that lead up to a code review. Code reviews typically focus on the work of a single developer, so we&#8217;ll start there. We are going to be code reviewing the developer with ID <em>SLICKEDIT\shackett</em> (or <strong>Scott</strong>) in source control, and we&#8217;ll be reviewing his work since March 3, 2008, which is the date of our last (fictional) release.</p>
<p><strong>Finding the Best Files to Review</strong><br />
Our first challenge involves finding the set of files that Scott has worked on since March 3, 2008. We&#8217;ll use the <strong>Find Version</strong> feature of the SlickEdit Tools Versioning Toolbox as our starting point.</p>
<p><img src="http://www.slickedit.com/images/stories/blog/code_review/findversion.jpg" /></p>
<p>Find Version allows you to query versions of the source code files in your solution. The code review organizer can use this feature to find an ideal set of files to review. Simply click <em>SlickEdit &gt; Find Version</em> to bring up the Find Version tool window. For this example, we&#8217;ll find versions with the following criteria:</p>
<ul>
<li><strong>Since date:</strong> Finds all versions checked in since a particular date, such as the last release.</li>
<li><strong>Developer name:</strong> Finds all versions checked in by one or more specific developers.</li>
</ul>
<p>These two criteria are used to find all versions checked in by Scott during the latest development cycle (March 3, 2008 &#8211; present).</p>
<p>No development team has the resources to code review every file in that list, so it&#8217;s important to find the best candidate files to review. Therefore, the next task is to look through the results and find a sampling of files that represent the most important or complex code. You might also include some files that have a high number of check-ins by that developer, which indicates high rate of change, or churn. These are the ideal candidate files to be reviewed. Email the names of those files to all developers who will be participating in the code review.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/code_review/findversionresults.jpg"><img src="http://www.slickedit.com/images/stories/blog/code_review/findversionresults_small.jpg" /><br />
[Click here for the full size image]</a></p>
<p>In this example, <em>PackageBaseWhidbey.cs</em> has had several changes and is a very important file, so we&#8217;ll include that in our code review process.</p>
<p><strong>Loading the Files to Review</strong><br />
When a developer is ready to prepare their review comments, they should close all other files and open the files in the list sent by the code review organizer. This can be done quickly using the <strong>Load Files </strong>feature in the Editing Toolbox, which allows you to quickly filter the list of files in your solution and open the ones you&#8217;re looking for. Click <em>SlickEdit &gt; Load Files</em> to use this feature.</p>
<p><img src="http://www.slickedit.com/images/stories/blog/code_review/loadfiles.jpg" /></p>
<p>By typing &#8220;<em>basew</em>&#8221; in the filter, we narrow down the files in the list to only those that include that text in their file name. We&#8217;ll select <em>PackageBaseWhidbey.cs</em> and open it.</p>
<p><strong>Isolating a Developer&#8217;s Work</strong><br />
One of the most difficult things to do when reviewing the code of another developer is actually identifying the work that that developer did, especially if it was done as part of a team. Once you have <em>PackageBaseWhidbey.cs</em> open, we&#8217;ll use the <strong>Version Visualizer</strong> feature of the Versioning Toolbox to see which parts Scott has worked on. Click <em>SlickEdit &gt; Version Visualizer</em> to show this tool window. Next, select &#8220;Default User Scheme&#8221; in the drop down at the top of that tool window.</p>
<p><img src="http://www.slickedit.com/images/stories/blog/code_review/versionvisualizer.jpg" /></p>
<p>The versions of the file will be processed and the tool window will list the names of all developers who have contributed to the current state of the file. The editor also becomes colorized into segments of lines that identify who wrote each line of the file.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/code_review/defaultuserscheme1.jpg"><img src="http://www.slickedit.com/images/stories/blog/code_review/defaultuserscheme1_small.jpg" /><br />
[Click here for the full size image]</a></p>
<p>You can find Scott&#8217;s name (<em>SLICKEDIT\shackett</em>) in the tool window list and double click on it to go to the first line of code he contributed. You can then use the next and previous button on the tool window to navigate through the blocks of his work.</p>
<p>To make Scott&#8217;s work stand out more distinctly, select his name (<em>SLICKEDIT\shackett</em>) in the list and click the &#8220;Toggle Selection Visibility&#8221; toolbar button. When toggled on, Scott&#8217;s work will stand out, and all other developer&#8217;s work will be dimmed out. This allows you to quickly see what code is Scott&#8217;s and what code isn&#8217;t. You can click this button again to toggle it back off.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/code_review/defaultuserscheme2.jpg"><img src="http://www.slickedit.com/images/stories/blog/code_review/defaultuserscheme2_small.jpg" /><br />
[Click here for the full size image]</a></p>
<p>Another option is to assign a unique color to Scott. To do this, click the <strong>Configure Visualization Schemes</strong> button on the <strong>Version Visualizer</strong> toolbar. This will bring up the <strong>Scheme Builder</strong> dialog. We&#8217;ll create a new scheme to highlight all areas of code worked on by Scott. Click the <strong>Add new scheme</strong> button and give the scheme a name of &#8220;Scott&#8217;s code&#8221;. We can now add a scheme item for Scott and give it a color of bright red.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/code_review/schemebuilder.jpg"><img src="http://www.slickedit.com/images/stories/blog/code_review/schemebuilder_small.jpg" /><br />
[Click here for the full size image]</a></p>
<p>We can save this visualization scheme and then apply it by selecting it in the <strong>Version Visualizer</strong> drop down. This same scheme can be applied to any file to highlight areas of the code written by Scott.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/code_review/defaultuserscheme3.jpg"><img src="http://www.slickedit.com/images/stories/blog/code_review/defaultuserscheme3_small.jpg" /><br />
[Click here for the full size image]</a></p>
<p>If you find a block of code written by the developer being reviewed that looks questionable, you may want more context about the developer&#8217;s intent, such as the check in comment made when that section of code was checked in. This information is very important for creating meaningful code review comments. The easiest way to do this is to see which version that code was checked in as, and look at the comment associated with that version. To do this, select &#8220;Default Relative Age Scheme&#8221; in the drop down at the top of the <strong>Version Visualizer</strong> tool window.</p>
<p><a href="http://www.slickedit.com/images/stories/blog/code_review/defaultrelativeagecheme.jpg"><img src="http://www.slickedit.com/images/stories/blog/code_review/defaultrelativeagecheme_small.jpg" /><br />
[Click here for the full size image]</a></p>
<p>Again, the versions of the file will be processed, but now the tool window will list the IDs of all versions that have contributed to the current state of the file. The editor also becomes colorized into segments of lines that identify which version last updated each line of the file. The colorizing of each segment corresponds to the age of the version it was checked in with (dark is oldest, light is most recent).</p>
<p>You can find the version associated with the questionable code and take a look at the comments associated with it. You can also use the next and previous button as before to see all of the code in the file that was updated as a result of that check in. For instance, we may have disagreed with the AddMenuCommandHandler function being public. We can see that change was part of version 762. By hovering over that version in the <strong>Version Visualizer</strong> tool window, we get a better understanding of why the function was made public. All of these features assist the team in making judgments about which code to review. They also provide some insight into the motivation the developer being reviewed might have had when checking a set of code in.</p>
<p>Next is the task of actually commenting on the code. This task is always best done in electronic format, in a way that can be pulled together as part of the code review meeting. The <strong>next article</strong> in the series will go through some of the features of SlickEdit Tools that facilitate writing comments about code and tying them directly to the source, without modifying the files.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2008%2F06%2Flets-do-a-code-review-with-slickedit-tools-part-1%2F';
  addthis_title  = 'Let%26%238217%3Bs+Do+a+Code+Review+With+SlickEdit+Tools+%28Part+1%29';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2008/06/lets-do-a-code-review-with-slickedit-tools-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Works on my Machine</title>
		<link>http://blog.slickedit.com/2008/04/works-on-my-machine/</link>
		<comments>http://blog.slickedit.com/2008/04/works-on-my-machine/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 14:57:08 +0000</pubDate>
		<dc:creator>Sandra</dc:creator>
				<category><![CDATA[Code Editors]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=225</guid>
		<description><![CDATA[I report a problem to a colleague. After trying and failing to use the &#8220;works on my machine&#8221; excuse, he comes over to see for himself. He asks to drive so he can do a little debugging on my editor, so I step aside to let him use the keyboard. He squints at the code [...]]]></description>
			<content:encoded><![CDATA[<p>I report a problem to a colleague. After trying and failing to use the &#8220;works on my machine&#8221; excuse, he comes over to see for himself. He asks to drive so he can do a little debugging on my editor, so I step aside to let him use the keyboard. He squints at the code and seems unable to type. Several times he presses an elaborate key combination, only to curse and have to undo whatever he did. Usually, when he tries to undo, he again curses before finally looking at the keyboard to press Ctrl+Z with the concentration of an octogenarian trying to double-click the AOL icon fast enough.</p>
<p>Why is he having so much trouble using my editor? Because I&#8217;m using SlickEdit. What does he use? SlickEdit.This scenario happens a lot to me, really anytime a coworker tries to use my machine. Even after he gets used to the color scheme and whatever tool windows I use, if he doesn&#8217;t happen to use the same emulation that I use, he&#8217;s hosed. He spends more time trying to get somewhere in the code than he does actually making any changes. And no doubt he&#8217;s got some custom keybindings on his machine that he uses all the time, but my editor seems to think they have completely different functions.</p>
<p>So the good thing about SlickEdit is that it&#8217;s incredibly customizable. You can set it up to do whatever you want, however you want. You can go over, under, around, and through your code using commands and keybindings that you define, and after using them for a couple of days, you&#8217;ll feel like you were born using Ctrl+W to comment a line of code. You&#8217;ll do all this without thinking about it, because you&#8217;re thinking about the code instead of the use of the editor.</p>
<p>Ah, but then you have to use someone else&#8217;s configuration. It&#8217;s worse if they&#8217;re looking over your shoulder, giving you keyboard performance anxiety. You&#8217;re all thumbs, two left hands, a DVORAK user in a QWERTY world. Your customizations are your crutches, and you have to limp along to solve a stupid problem when you know it works perfectly on your machine.</p>
<p>In fact, you work perfectly on your machine, too.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2008%2F04%2Fworks-on-my-machine%2F';
  addthis_title  = 'Works+on+my+Machine';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2008/04/works-on-my-machine/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Professional SlickEdit® Hits the Shelves</title>
		<link>http://blog.slickedit.com/2007/11/professional-slickedit%c2%ae-hits-the-shelves/</link>
		<comments>http://blog.slickedit.com/2007/11/professional-slickedit%c2%ae-hits-the-shelves/#comments</comments>
		<pubDate>Wed, 21 Nov 2007 19:39:37 +0000</pubDate>
		<dc:creator>Scott Westfall</dc:creator>
				<category><![CDATA[Code Editors]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=191</guid>
		<description><![CDATA[Last Saturday I had one of the most rewarding moments of my professional life. I was at Barnes &#38; Noble looking through the computer books when I saw two copies of the new Professional SlickEdit® book [1] on the shelf. Seeing this filled me with a sense of pride I have rarely experienced before.
 I [...]]]></description>
			<content:encoded><![CDATA[<p>Last Saturday I had one of the most rewarding moments of my professional life. I was at Barnes &amp; Noble looking through the computer books when I saw two copies of the new <u>Professional SlickEdit®</u> book [1] on the shelf. Seeing this filled me with a sense of pride I have rarely experienced before.</p>
<p><center><a rel="lightbox[pics191]" href="http://blog.slickedit.com/wp-content/uploads/2007/11/slickeditbooksmall.JPG" title="slickeditbooksmall.JPG"><img width="200" src="http://blog.slickedit.com/wp-content/uploads/2007/11/slickeditbooksmall.thumbnail.JPG" alt="slickeditbooksmall.JPG" height="150" class="imageframe imgalignleft" /></a> </center>I didn’t write the book. It was written by John Hurst, a long-time SlickEdit user with no affiliation with SlickEdit Inc. I did help to review the material John wrote and provided feedback, but the pride I felt wasn’t related to my minor contribution to the book. It was because of what the book says about our product that made me proud.</p>
<p>The book is a symbol of the impact our work has on others. It says that there are enough people using SlickEdit for a publisher like Wrox to publish this book. That someone like John, whose knowledge of SlickEdit is remarkable, was available to write this book also indicates something of the passion our customers feel for our work. This awareness of the positive effect our work has had on others is often missing in software development.</p>
<p>I’ve worked on a lot of different projects in my career. Most were large custom automation jobs that were deployed on a server somewhere. Often there was little to no interaction with the actual users of the system. With SlickEdit, I get to see and use the result of my efforts. I interact with people who use our products every day. And now, with the release of <u>Professional SlickEdit®</u>, I feel, well, almost famous.</p>
<p><strong>Why a SlickEdit Book?</strong></p>
<p>The very existence of a 3rd party book on SlickEdit raises the question of why such a book is needed. Some might ask, “Isn’t the user guide good enough?” The answer, frankly, is “yes it is” and “no it isn’t”.</p>
<p>After 20 years of development, SlickEdit is full of features. Even though we’ve made great strides in improving our documentation over the last several releases, there’s still a long way to go. As John points out in the introduction to <u>Professional SlickEdit®</u>, “The SlickEdit User Guide that is shipped with the product does not even document every feature…” Hey! We’re working on it!</p>
<p>The SlickEdit User Guide and <u>Professional SlickEdit®</u> describe SlickEdit from two different perspectives. Our goal with the User Guide is to teach you how to install, configure, and use the features in SlickEdit. <u>Professional SlickEdit®</u> picks up where the SlickEdit User Guide leaves off. It covers many of the features that are documented in the user guide but it does so from an advanced usage perspective, showing effective ways to use the features. The book includes examples showing actual code and how various features can be used. It also includes sample Slick-C macro code to customize and extend SlickEdit, which will be of particular interest to advanced users.</p>
<p>We try to be process-agnostic at SlickEdit. We recognize that people have very different work patterns, and we don’t want to force you to change them. Instead, we believe it is important for SlickEdit to adapt to your work style. No matter how much we are convinced that brace style 1 (shown below) is the only sensible choice we allow you to mess up your code with brace style 2 and 3 as much as you like.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;pre&gt;<br />
if () { <br />
}&lt;/pre&gt;</div></td></tr></tbody></table></div>
<p>As an independent author, John had more degrees of freedom. He was freer to express his opinion, not unlike the freedom one has while blogging. So, where our documentation provides a list of the capabilities, John directs you towards the ones he finds to be most useful.</p>
<p><strong>A Fresh Perspective</strong></p>
<p>One of the key benefits I’ve gotten from this process is the insight from seeing our product from another perspective. Working with John and reading his descriptions of SlickEdit helped me see the product in a new way.</p>
<p>It’s a common problem. The more you work on something the less you are able to really see it. You see, instead, your perceptions of the product. How many times have you written something, code or text, and missed a simple flaw, like an omitted word or a boundary condition? No matter how many times you read it, you see what you expect to see not what is really there. Then, someone who reads it for the first time easily finds the problem.</p>
<p>My thanks to John Hurst for writing this book and the good people at Wrox for publishing it. And for treating me to a truly rewarding moment in my career!</p>
<p>[1] <u>Professional SlickEdit®</u> by John Hurst (ISBN-13: 978-0-470-12215-0), Wiley Publishing, Inc.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2007%2F11%2Fprofessional-slickedit%25c2%25ae-hits-the-shelves%2F';
  addthis_title  = 'Professional+SlickEdit%3Csup%3E%C2%AE%3C%2Fsup%3E+Hits+the+Shelves';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2007/11/professional-slickedit%c2%ae-hits-the-shelves/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>C# with SlickEdit : No Visual Studio Required</title>
		<link>http://blog.slickedit.com/2007/11/c-with-slickedit-no-visual-studio-required/</link>
		<comments>http://blog.slickedit.com/2007/11/c-with-slickedit-no-visual-studio-required/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 17:13:12 +0000</pubDate>
		<dc:creator>Matthew E</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=163</guid>
		<description><![CDATA[&#8220;No Visual Studio® Required&#8221;
SlickEdit C# Project Tutorial
In this tutorial, we&#8217;ll build a simple C# console application with SlickEdit. This tutorial assumes you have the .NET Framework 2.0 and the C# compiler (Csc.exe) installed under %WINDIR%\Microsoft.NET\Framework\v2.0.50727. The Windows SDK (v6.0 or later) or the full .NET Framework SDK is required for the mdbg.exe managed code debugger.
Conventions
Dark [...]]]></description>
			<content:encoded><![CDATA[<h2>&#8220;No Visual Studio<sup>®</sup> Required&#8221;</h2>
<h3>SlickEdit C# Project Tutorial</h3>
<p>In this tutorial, we&#8217;ll build a simple C# console application with SlickEdit. This tutorial assumes you have the .NET Framework 2.0 and the C# compiler (Csc.exe) installed under <font face="Courier New">%WINDIR%\Microsoft.NET\Framework\v2.0.50727</font>. The Windows SDK (v6.0 or later) or the full .NET Framework SDK is required for the mdbg.exe managed code debugger.</p>
<h4>Conventions</h4>
<p>Dark blue italics represent menu commands: <strong><em><font size="2" color="#330066">File &gt; New</font></em></strong><br />
Bold items represent names of dialog buttons, labels, and controls: <strong><font size="2">Location:</font></strong><br />
<font face="Courier New">Monospaced fonts</font> are used for environment variables, file paths and names, and text that you type into dialog controls:<br />
Several screenshot <img width="16" src="http://blog.slickedit.com/wp-content/uploads/2007/10/cam16.png" alt="Screenshot" height="16" /> links are provided that show how the dialogs are used.</p>
<h4>Creating the starter project</h4>
<ul>
<li>In SlickEdit, go to <strong><em><font size="2" color="#330066">Project &gt; New</font></em></strong>. Create a <strong>(generic)</strong> project. <a rel="lightbox[pics163]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/newproj.png" title="newproj.png"><img width="16" src="http://blog.slickedit.com/wp-content/uploads/2007/10/cam16.png" alt="newproj.png" height="16" /></a> You probably want to use the <strong><font size="2">Create </font></strong><strong><font size="2">project directory from project name option. Change the <strong><font size="2">Location:</font></strong> to a </font></strong>directory where you want the project to go. Click <strong><font size="2">OK</font></strong> to create the starter project. Dismiss the project properties dialog if it appears afterwards.</li>
<li>Go to <strong><em><font size="2" color="#330066">File &gt; New Item from template&#8230;</font></em></strong> <a rel="lightbox[pics163]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/newitem.png" title="newitem.png"><img width="16" src="http://blog.slickedit.com/wp-content/uploads/2007/10/cam16.png" alt="newitem.png" height="16" /></a> Under <strong>Installed Templates \ CSharp</strong>, highlight the <strong>C# Main Entry Point</strong> template. Change the Name in the lower portion of the dialog, and check the &#8220;Add to current project&#8221; checkbox. Click Add, and the new file will be created. It should appear under the <em>Source Files</em> project folder. Edit the Main() method. Add the following code inside the Main()
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008080;">#if DEBUG</span><br />
Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hello World - Debug&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008080;">#else</span><br />
Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hello World - Release&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008080;">#endif</span></div></td></tr></tbody></table></div>
</li>
<li>Go to <strong><em><font size="2" color="#330066">Project &gt; Workspace Properties </font></em></strong>to display the workspace properties dialog. A SlickEdit Workspace (.vpw) is the equivalent of a Solution (.sln) in Visual Studio. Click the <strong><font size="2">Environment</font></strong> button to display the Workspace Environment Options dialog.</li>
<li>Click <strong><font size="2">Set Environment Variable </font></strong>. Create a new variable named <font face="Courier New">DOTNETDIR </font>, and point it to your .NET framework that you want to use for the C# compiler, like <font face="Courier New">C:\Windows\Microsoft.NET\Framework\v2.0.50727</font>. <a rel="lightbox[pics163]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/wkspcenv.png" title="wkspcenv.png"><img width="16" src="http://blog.slickedit.com/wp-content/uploads/2007/10/cam16.png" alt="wkspcenv.png" height="16" /></a> To use an existing environment variable in the definition of the workspace environment use the <font face="Courier New">%(VARIABLE) </font>syntax, and not the <font face="Courier New">%VARIABLE% </font>syntax. For example: <font face="Courier New">%(WINDIR)\Microsoft.NET\Framework\v2.0.50727<br />
</font>Be sure to select environment variable names that do not already exist.</li>
<li>Create another variable named <font face="Courier New">WINSDKDIR</font> , and point it to the Windows SDK or .NET Framework SDK, like <font face="Courier New">C:\Program Files\Microsoft SDKs\Windows\v6.0</font> . You want this to be a directory where the <font face="Courier New">mdbg.exe</font> managed code debugger can be found.</li>
<li>Click <strong><font size="2">OK</font></strong>. You will be prompted that you need to close and reopen the workspace for the variables to be set.</li>
</ul>
<h4>Setting up the build command</h4>
<ul>
<li>Once you&#8217;ve closed and reopened the workspace, go to <strong><em><font size="2" color="#330066">Project &gt; Properties </font></em></strong>to show the dialog. In the <strong><font size="2">Settings for: </font></strong>combo, select Release, which should be the only other choice right now.</li>
<li>Go to the <strong><font size="2">Tools </font></strong>tab and remove the Compile and Rebuild tools. (Use the red X button) This should leave Build, Debug, and Execute.</li>
<li>Highlight the <strong><font size="2">Build</font></strong> tool. <a rel="lightbox[pics163]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/relbld1.png" title="relbld1.png"><img width="16" src="http://blog.slickedit.com/wp-content/uploads/2007/10/cam16.png" alt="relbld1.png" height="16" /></a> Change the <strong><font size="2">Command line:</font></strong> entry field to the following:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">%(DOTNETDIR)\csc.exe /warn:3 /target:exe /define:TRACE /debug- /out:%bdSeHello.exe %{*.cs}</div></td></tr></tbody></table></div>
<p>The <font face="Courier New">%bd</font> in the above command line is a variable that represents the build output directory, in this case <font face="Courier New">Release\</font>.<br />
The <font face="Courier New">%{*.cs}</font> construct means all project files that end with the .cs extension</li>
<li>Replace <em>SeHello.exe</em> with whatever you want the exe to be named. You shouldn&#8217;t need to change the <strong><font size="2">Run from dir:</font></strong> entry field as it should already be <font face="Courier New">%rw</font></li>
<li>Make sure the <strong><font size="2">Capture Output</font></strong> and <strong><font size="2">Output to build </font></strong><strong><font size="2">window</font></strong> options are selected.</li>
<li>Highlight the <strong><font size="2">Execute </font></strong>tool. <a rel="lightbox[pics163]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/relbld2.png" title="relbld2.png"><img width="16" src="http://blog.slickedit.com/wp-content/uploads/2007/10/cam16.png" alt="relbld2.png" height="16" /></a> Change the command line to <font face="Courier New">&#8220;SeHello.exe&#8221;</font>, or whatever your exe output name is from the Build tool command line. Change the <strong><font size="2">Run from dir:</font></strong> option to <font face="Courier New">%bd</font></li>
<li>Make sure the <strong><font size="2">Capture Output </font></strong>and <strong><font size="2">Output to build </font></strong><strong><font size="2">window</font></strong> options are selected.</li>
<li>Click <strong><font size="2">OK</font></strong> to close the dialog and save the changes. You should now be able to execute a build from <strong><em><font size="2" color="#330066">Build &gt; Build</font></em></strong> , and see the output of the C# compiler. If the build succeeds, <strong><em><font size="2" color="#330066">Project &gt; Execute </font></em></strong>should run the console program and display the <font face="Courier New">&#8220;Hello World-Release&#8221; </font>results.</li>
</ul>
<h4>Setting up the debug build</h4>
<ul>
<li>Open the project properties dialog again, and click <strong><font size="2">Configurations </font></strong>. Click <strong><font size="2">New </font></strong>to create the Debug configuration, and copy the settings for the Release configuration.</li>
<li>Click <strong><font size="2">OK</font></strong> to create the Debug config, and dismiss the dialogs.</li>
<li>Back on the project properties dialog, highlight the <strong><font size="2">Tools </font></strong>tab, and select Debug from the <strong><font size="2">Settings for: </font></strong>combo box.</li>
<li>Highlight the <strong><font size="2">Build </font></strong>tool name <a rel="lightbox[pics163]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/dbgbld1.png" title="dbgbld1.png"><img width="16" src="http://blog.slickedit.com/wp-content/uploads/2007/10/cam16.png" alt="dbgbld1.png" height="16" /></a>, and change the <strong><font size="2">Command line: </font></strong>entry field to:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">%(DOTNETDIR)\csc.exe /warn:3 /target:exe /define:DEBUG;TRACE /debug+ /out:%bdSeHello.exe %{*.cs}</div></td></tr></tbody></table></div>
<p>All we did was add the <font face="Courier New">DEBUG</font> define and change <font face="Courier New">/debug-</font> to <font face="Courier New">/debug+</font>. Again, use your exe name in place of <em>SeHello.exe</em> if you want.</li>
<li>Highlight the <strong><font size="2">Execute</font></strong> tool name, and make sure it is the same as you set up for the Release configuration.</li>
<li>Click <strong><font size="2">OK</font></strong> to save and close the project properties.</li>
<li>Go to <strong><em><font size="2" color="#330066">Build &gt; Set Active Configuration &#8230;</font></em></strong> and select Debug.</li>
<li>Execute the <strong><em><font size="2" color="#330066">Build &gt; Build</font></em></strong> command. If the build suceeds, run the <strong><em><font size="2" color="#330066">Build &gt; Execute</font></em></strong> command. You should see the <font face="Courier New">&#8220;Hello World &#8211; Debug&#8221;</font> output in the build window.</li>
</ul>
<h4>Setting up the console debugger</h4>
<ul>
<li>Back on the project properties dialog, highlight the <strong><font size="2">Tools</font></strong> tab, and select Debug from the <strong><font size="2">Settings for:</font></strong> combo box.</li>
<li>Highlight the <strong><font size="2">Debug</font></strong> tool name, <a rel="lightbox[pics163]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/dbgbld2.png" title="dbgbld2.png"><img width="16" src="http://blog.slickedit.com/wp-content/uploads/2007/10/cam16.png" alt="dbgbld2.png" height="16" /></a> and change the <strong><font size="2">Command line:</font></strong> entry field to:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">%(WINSDKDIR)\Bin\mdbg.exe SeHello.exe</div></td></tr></tbody></table></div>
<p>Again, change <em>SeHello.exe</em> to your exe name as needed. <strong><font size="2">Run from dir:</font></strong> should be set to <font face="Courier New">%bd</font></li>
<li>Make sure the <strong><font size="2">Capture Output</font></strong> and <strong><font size="2">Output to build </font></strong><strong><font size="2">window</font></strong> options are selected.</li>
<li>Click <strong><font size="2">OK</font></strong> to save and close the project properties.</li>
<li>Run the <strong><em><font size="2" color="#330066">Build &gt; Debug </font></em></strong>command. The build window should have focus with a blinking cursor just after the first <font face="Courier New">mdbg&gt; </font>prompt.</li>
<li>Enter the following commands in order, pressing <font face="Courier New">&lt;enter&gt;</font> after each one.
<ul>
<li><font face="Courier New">print args</font> to show the value of the args variable.</li>
<li><font face="Courier New">next</font> to do a step over</li>
<li><font face="Courier New">go</font> to continue execution</li>
<li><font face="Courier New">quit</font> to quit the debugger (IMPORTANT!)</li>
</ul>
</li>
<li>The entire debug session output should look like the following.</li>
</ul>
<p><font face="Courier New">C:\Dev\Lab\TestProjects\SeHello\Debug<br />
&gt; C:\WinSDK\Bin\mdbg.exe SeHello.exe<br />
MDbg (Managed debugger) v2.0.50727.312 (rtmLHS.050727-3100) started.<br />
Copyright (C) Microsoft Corporation. All rights reserved.<br />
For information about commands type &#8220;help&#8221;;<br />
to exit program type &#8220;quit&#8221;.<br />
run SeHello.exe<br />
STOP: Breakpoint Hit<br />
16: static void Main(string[] args) {<br />
[p#:0, t#:0] mdbg&gt; <strong><font color="#00008b">print args</font></strong><br />
args=array [0]<br />
[p#:0, t#:0] mdbg&gt; <strong><font color="#00008b">next</font></strong><br />
19: Console.WriteLine(&#8220;Hello World &#8211; Debug&#8221;);<br />
[p#:0, t#:0] mdbg&gt; <strong><font color="#00008b">go</font></strong><br />
Hello World &#8211; Debug<br />
STOP: Process Exited<br />
mdbg&gt; <strong><font color="#00008b">quit</font></strong><br />
C:\Dev\Lab\TestProjects\SeHello\Debug<br />
&gt;</font></p>
<h4>Handling complex build commands</h4>
<p>A small console application like this one doesn&#8217;t have any extensive dependencies, and most of the default options for the C# compiler are fine. However, more complex projects will require many more options to be passed on the command line. For these cases, it can be useful to create an options file for all of the command line switches.</p>
<ul>
<li>Go to <strong><em><font size="2" color="#330066">File &gt; New</font></em></strong> to create a new text file and add it to the project. <a rel="lightbox[pics163]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/dbgopts.png" title="dbgopts.png"><img width="16" src="http://blog.slickedit.com/wp-content/uploads/2007/10/cam16.png" alt="dbgopts.png" height="16" /></a> For this example, we&#8217;ll create the command line options for the debug build in a file called <font face="Courier New">Debug.opts</font></li>
<li>Edit the new options file and put in the following contents, which should match your first few options on the Debug build command line:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/warn:3 /target:exe /define:DEBUG;TRACE /debug+</div></td></tr></tbody></table></div>
</li>
<li>Open the Project Properties dialog to the <strong><font size="2">Tools</font></strong> tab, select the Debug configuration, and highlight the Build tool. <a rel="lightbox[pics163]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/dbgopts2.png" title="dbgopts2.png"><img width="16" src="http://blog.slickedit.com/wp-content/uploads/2007/10/cam16.png" alt="dbgopts2.png" height="16" /></a> Change the build command to:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">%(DOTNETDIR)\csc.exe @Debug.opts /out:%bdSeHello.exe %{*.cs}</div></td></tr></tbody></table></div>
</li>
<li>You can now run the <strong><em><font size="2" color="#330066">Build &gt; Build</font></em></strong> command to make sure the options file was correctly read.</li>
</ul>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2007%2F11%2Fc-with-slickedit-no-visual-studio-required%2F';
  addthis_title  = 'C%23+with+SlickEdit+%3A+No+Visual+Studio+Required';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2007/11/c-with-slickedit-no-visual-studio-required/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>East Bound and Down&#8230; (some joke about &#8220;codin&#8221;)</title>
		<link>http://blog.slickedit.com/2007/10/east-bound-and-down-some-joke-about-codin/</link>
		<comments>http://blog.slickedit.com/2007/10/east-bound-and-down-some-joke-about-codin/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 13:17:28 +0000</pubDate>
		<dc:creator>Dan H</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=114</guid>
		<description><![CDATA[In this industry, we have to be very careful which features we select to add to our products each release.  Even with the growing amount of time and scrutiny dedicated to choosing these features, we occasionally miss the mark.  As an illustration of this point, I am going to talk about Coors, and Smokey and [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffsetup1.JPG" title="diffsetup1"></a><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput1.JPG" title="diffoutput1"></a><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffsetup1.JPG" title="diffsetup1"></a><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput1.JPG" title="diffoutput1"></a><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput21.JPG" title="diffoutput2"></a>In this industry, we have to be very careful which features we select to add to our products each release.  Even with the growing amount of time and scrutiny dedicated to choosing these features, we occasionally miss the mark.  As an illustration of this point, I am going to talk about Coors, and Smokey and the Bandit.  Try to stick with me until the end where I will try to tie all this together.  At the very least, you will understand why I am not a teacher.</p>
<p><a href="http://en.wikipedia.org/wiki/Coors_Brewing_Company">The Coors Brewing Company of of Golden, Colorado, USA</a>, had a fairly profound impact on the thirty-somethings in the world like myself.  You see, we have been led to believe for thirty years or so that it was once illegal to transport Coors beer East of Texas.  As far as I can tell, this was never true (although it was <a href="http://en.wikipedia.org/wiki/Coors_Brewing_Company#History">not nationally available until sometime in the 1990s</a>).  Nonetheless it was the plot of the hit 1977 movie Smokey and the Bandit.  And when I say &#8220;hit 1977 movie&#8221;, it was the second highest grossing movie of that year.  Star Wars was number one.  It is not Scorcese or [fill in name of artsy director you like here], but it was a big deal.</p>
<p>I don&#8217;t want to get off on a big tangent here, but a small one is necessary, stick with me.  For anybody who did not get basic cable over the last thirty years, the basic plot is as follows:</p>
<ul>
<li>It is illegal to ship Coors beer East of Texas</li>
<li>Burt Reynolds and Jerry Reed are paid a large some of money to get 400 cases Coors beer from Texarkana, Texas to Atlanta, Georgia in twenty-eight hours</li>
<li>Burt Reynolds distracts cops from the speeding eighteen wheeler carrying the 400 cases of beer by performing really cool stunts in a 1977 Trans Am
<ul>
<li>In order to keep a low profile, the eighteen wheeler is painted with a mural of a masked bandit robbing a stagecoach.</li>
</ul>
</li>
<li>Jerry Reed sings his hit song, &#8220;East Bound and Down&#8221;</li>
<li>Hillarity insues</li>
</ul>
<p>Sounds ridiculous right?  Well, it does lack the realism of &#8220;Die Hard&#8221;, but it is actually not a bad movie provided that:</p>
<ol>
<li>You are a guy<a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput21.JPG" title="diffoutput2"></a></li>
<li>When you watch a movie you want to be entertained and don&#8217;t question things too much.</li>
</ol>
<p>But the point here is that history was changed:</p>
<ul>
<li>The mystique of Coors beer was further boosted to those who could not get it East of Texas.  Here I need to emphasize that people thought it was really illegal to take Coors beer East of Texas.</li>
<li>The Trans-Am became as cool as the (<a href="http://en.wikipedia.org/wiki/Evel_Knievel#Retirement.28s.29">then recently jailed</a>) <a href="http://en.wikipedia.org/wiki/Evel_Knievel">Evel Knievel</a> with suburban pre-teens across America.</li>
<li>Jerry Reed had a hit single.</li>
</ul>
<p>As much as I love old Trans-Ams, and that song, what I want to focus on is the first item in that list: People believed that it was illegal to take Coors beer East of Texas.  This is one of the standout facts people in the United States know about Coors beer.  What they do not know is this: in 1959 Coors was the first beverage in America to be packaged in a <a href="http://en.wikipedia.org/wiki/Aluminum_can">two-piece aluminum can</a>.  These cans are a part of common life today.  There are two on my desk right this minute (diet soda, not beer).  They are so common place people my age really cannot picture a world without them.  A world where I am told you had to use a can opener (one of the pointy triangluar ones, not the rotating ones with a blade) simply to drink a beverage.  I imagine the people at The Coors Brewing Company of of Golden, Colorado are proud of having introduce this convenient, and recyclable, can.  But far more people remember that it was illegal to ship Coors beer East of Texas (and when I say &#8220;far more people&#8221;, I  mean &#8220;me&#8221;).</p>
<p>What could this <em>possibly </em>have to do with software development?  It can be difficult to figure out what people will latch onto.  In my tenure at SlickEdit, I have seen a lot of sleep lost over features that did not make quite the splash we hoped they would.  Thankfully none of these turned out to be as big a blunder as the <a href="http://en.wikipedia.org/wiki/Edsel">Edsel</a>.  I will share the one that personally hit me the hardest though:</p>
<ol>
<li>Launch SlickEdit&#8217;s DIFFzilla® setup dialog (Tools&gt;File Difference)</li>
<li>Fill in &#8220;Path 1&#8243; and &#8220;Path 2&#8243; with any two files that SlickEdit tags</li>
<li>Click the &#8220;Symbols&#8221; radio button at the top left</li>
<p style="text-align: center"><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffsetup1.JPG" title="diffsetup1"><img width="200" src="http://blog.slickedit.com/wp-content/uploads/2007/10/diffsetup1.thumbnail.JPG" alt="diffsetup1" height="115" class="imageframe imgalignleft" /></a></p>
<p><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffsetup1.JPG" title="diffsetup1"></a></p>
<li>Clicking OK will yield output that actually show changes on a <em>symbol</em> level, including modified functions and added/deleted functions.</li>
<p><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput1.JPG" title="diffoutput1"></a><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput1.JPG" title="diffoutput1"></a></p>
<p style="text-align: center"><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput1.JPG" title="diffoutput1"><img width="200" src="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput1.thumbnail.JPG" alt="diffoutput1" height="125" class="imageframe imgalignleft" /></a></p>
<p><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput1.JPG" title="diffoutput1"></a></p>
<li>Selecting an item from this list and clicking &#8220;Diff&#8221; will actually compare just those two functions in the DIFFzilla output dialog.</li>
<p><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput21.JPG" title="diffoutput2"></a><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput21.JPG" title="diffoutput2"></a></p>
<p style="text-align: center"><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput21.JPG" title="diffoutput2"><img width="200" src="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput21.thumbnail.JPG" alt="diffoutput2" height="125" class="imageframe imgalignleft" /></a></p>
<p><a rel="lightbox[pics114]" href="http://blog.slickedit.com/wp-content/uploads/2007/10/diffoutput21.JPG" title="diffoutput2"></a></ol>
<p>This can be convenient for a number of reasons.  Sometimes a function moved, and the file itself has changed so much diffing two whole files just confuses matters.  This feature will shine in those cases.</p>
<p>I thought this would be a hit.  Everybody here thought it was a neat idea, and I worked feverishly to sneak this into the 8.0 release.  It was not a hit.  In fact, I am not certain that a user has ever actually used this feature.  It is generally good for a &#8220;wow&#8221; or two at a trade show though.</p>
<p>The moral of the story?  Be careful when you choose to add features.  The <a href="http://en.wikipedia.org/wiki/Aluminum_can">two-piece aluminum can</a> may not look nearly as flashy as a 1977 Trans-Am, but people will still be using it 50 years later.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2007%2F10%2Feast-bound-and-down-some-joke-about-codin%2F';
  addthis_title  = 'East+Bound+and+Down%26%238230%3B+%28some+joke+about+%26%238220%3Bcodin%26%238221%3B%29';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2007/10/east-bound-and-down-some-joke-about-codin/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Editor or IDE?</title>
		<link>http://blog.slickedit.com/2007/08/editor-or-ide/</link>
		<comments>http://blog.slickedit.com/2007/08/editor-or-ide/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 13:15:07 +0000</pubDate>
		<dc:creator>Scott Westfall</dc:creator>
				<category><![CDATA[Code Editors]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=122</guid>
		<description><![CDATA[The first season of Saturday Night Live had a great skit featuring Gilda Radner, Dan Aykroyd , and Chevy Chase arguing about new Shimmer(i):
Gilda: “New Shimmer is a floor wax.”
Dan: “No, new Shimmer is a dessert topping.”
Gilda: “It’s a floor wax!”
Dan: “It’s a desert topping!”
Gilda: “It’s a floor wax, I’m telling you!”
Dan: “It’s a desert [...]]]></description>
			<content:encoded><![CDATA[<p>The first season of Saturday Night Live had a great skit featuring Gilda Radner, Dan Aykroyd , and Chevy Chase arguing about new Shimmer(i):<br />
<strong>Gilda</strong>: “New Shimmer is a floor wax.”<br />
<strong>Dan</strong>: “No, new Shimmer is a dessert topping.”<br />
<strong>Gilda</strong>: “It’s a floor wax!”<br />
<strong>Dan</strong>: “It’s a desert topping!”<br />
<strong>Gilda</strong>: “It’s a floor wax, I’m telling you!”<br />
<strong>Dan</strong>: “It’s a desert topping, you cow!”<br />
<strong>Chevy</strong>: “Hey, hey, hey, calm down, you two. New Shimmer is both a floor wax and a dessert topping!”</p>
<p>I often get involved in a similar debate about SlickEdit&#8211;not about whether it is a floor wax or dessert topping&#8211;but whether it is an editor or an Integrated Development Environment (IDE). To answer this we need to examine a brief history of programming and the differences between editors and IDEs.</p>
<p><strong>A Brief History of Programming</strong><br />
The first evidence we have of man as programmer lies in the cave paintings in France. Some would have you believe that these are depictions recording daily prehistoric life. If you look more closely it becomes clear that these are really the first known examples of a written program.</p>
<p>The programming language is symbolic with a confusing syntax. What, today, we would write simply as:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">man.hunt(antelope);</div></td></tr></tbody></table></div>
<p>requires many more figures in this primitive programming language. Of course, there were no computers back then, so all programs had to be hand executed. This could explain why most of the programs were about hunting and dancing. These early cave programs were written with bits of charcoal and pigments made from plant extracts. Editing tools were utterly lacking.</p>
<p>Another prominent example of early programming is seen in Egypt during the reign of the pharaohs. While some hieroglyphs may, indeed, be a form of writing, some we now know were early programs. This is particularly true of the large obelisks carved by the Egyptians. These were intended to be inserted into a large, obelisk-shaped reader. Unfortunately, no examples of these early peripherals still exist. As with many stone computers, they were disassembled and reconfigured into items more practical in those times, such as homes, restaurants, and parking garages.</p>
<p>The Egyptians’ programming language, called Osiris (later replaced by Osiris++), uses several abstract symbols that are combined to represent a larger set of programming concepts. In fact, the Egyptians were the first to introduce the concept of the variable, as seen in this example:</p>
<p><a rel="lightbox[pics122]" href="http://blog.slickedit.com/wp-content/uploads/2007/08/hieroglyphs.JPG" title="hieroglyphs.JPG"><img width="200" src="http://blog.slickedit.com/wp-content/uploads/2007/08/hieroglyphs.thumbnail.JPG" alt="hieroglyphs.JPG" height="65" class="imageframe imgalignleft" /></a></p>
<p>Though no interpreters from that time still exists, it’s largely believed that this statement translates into:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">int i = 0;</div></td></tr></tbody></table></div>
<p>Again, the Egyptians had little in the way of editing tools. Programs were typically written with a hammer and chisel, making undo a very time consuming operation. They did, however, introduce the earliest use of whiteboards in the form of clay tablets, which allowed them to prototype code in a more forgiving form.</p>
<p>There isn’t time for a comprehensive history of programming, so we’ll have to skip over the early Greek and Roman programmers, who used Scroll 1.0 to write their programs, and frontier programmers in the early American west, who whittled their programs out of wood. We’ll skip past systems where you toggled programs into the front panel in binary and those using paper tape or punch cards.</p>
<p>The modern era of programming began in 19-mumble-mumble with the advent of the teletype. With these systems you had access to your full program and could readily extend and modify it. Editing was done a line at a time, so these editors were called “line editors”. You would print a range of lines, then type a command to insert or alter a line.</p>
<p>Teletypes were just an evolutionary bridge to the console, early CRT systems that displayed your code electronically. With consoles, the first visual editors were created. These editors displayed a page of code and allowed you to move a cursor within the file. Editing could be done simply by positioning the cursor and inserting or overwriting characters.</p>
<p>Contemporary editors share many characteristics with these early editors. They have added features like syntax highlighting, Graphical User Interfaces, window management, and a host of other features, but the process of writing code is fundamentally the same. Typically, these editors are file-oriented. You open a file, make changes, and save the file. All other activities are performed by programs or utilities launched from a command line or shell.</p>
<p>Integrated Development Environments group the related development activities into a single…well…integrated development environment. This is generally considered to be more convenient because it allows previously separate utilities to interact.</p>
<p>An IDE generally has 4 main components:</p>
<ol>
<li>An editor—something providing the heretofore described ability to write code.</li>
<li>A project/build system—something that knows about the set of files in your project and allows you to launch a build on these files.</li>
<li>A compiler or interpreter—that allows you to build and execute your program.</li>
<li>A debugger—that allows you to step through your code and examine values.</li>
</ol>
<p>Typically, an IDE will also provide a number of code/object browsers, integration with source control tools, and other utilities related to programming.</p>
<p>Interaction between the editor and the other components in the IDE provides key points of efficiency not available using standalone editors:</p>
<ul>
<li>The project/build system provides the knowledge of the available files and symbols in the program. Using this information you can browse to open files and use powerful completions while typing. This saves keystrokes, prevents wasted time looking up functions and methods, and reduces the number of compile errors.</li>
<li>Integration with the compiler allows an IDE to launch a build and gather the results of the build. Programmers can quickly step through the errors and navigate to the source code for that error. With a standalone editor, you must manually open files and execute an operation to go to the specified line.</li>
<li>Integration with the debugger allows you to set breakpoints from within the editor and view the code in the editor as you step through the code. Though similar capabilities are available in standalone debuggers, the code will be displayed differently, often without or with different color coding (sometimes called syntax highlighting). Once you are used to reading code in color, any alternate presentation slows your comprehension.</li>
</ul>
<p><strong>Different Strokes for Different Folks?</strong><br />
So, obviously, the IDE has completely supplanted the visual editor, right? No, for a number of reasons some users still prefer to use editors rather than IDEs. Emacs and vi (and their descendents) are the two most common examples of these.</p>
<p>One reason some people prefer a standalone editor is that IDEs tend to be very GUI-oriented, providing graphical mechanisms to launch operations. Standalone editors tend to be command-oriented, providing comprehensive key bindings to initiate operations. Using commands and key bindings is a big boost to programming efficiency, compared to the time lost grabbing the mouse and selecting things.</p>
<p>The editors in IDEs are often less powerful than the standalone editors. When all you do is write an editor, you can focus on the kind of power programmer operations that really improve programming efficiency. Developers of IDEs have to split their time between the editor and all of the other elements in the environment.</p>
<p>The choice of platform also makes a difference. Use of standalone editors is far more common on UNIX and Linux systems than on MS Windows or the Apple Macintosh. UNIX and Linux users are typically more comfortable writing scripts to automate builds and process results. They see the OS as the integrated environment.</p>
<p>Even with these reasons, users of standalone editors are missing out on those key points of efficiency that come with an IDE. That’s why the descendents of standalone editors, like Vim and GNU Emacs, have been adding more of those capabilities.</p>
<p><strong>So What the Heck is SlickEdit?</strong><br />
SlickEdit looks and works like an IDE, but we call ourselves an editor. This is because we don’t include a compiler or a debugger with SlickEdit. It’s also because we place our emphasis on the editor. SlickEdit is a command-oriented, keyboard-centric editor. In fact, SlickEdit began as a powerful visual editor that grew to include the most essential IDE capabilities.</p>
<p>Though we don’t include a compiler and a debugger(iii), we work with commonly available compilers and debuggers. If you have installed the GNU C/C++ tool chain, a Java JDK, or Microsoft Visual Studio, then SlickEdit works like an IDE, providing the key integrations described previously. SlickEdit detects the presence of these tools and interacts with them inside the SlickEdit environment(ii).</p>
<p>So, is SlickEdit a great editor that works like an IDE, or is it an IDE with a great editor? Like the Shimmer product in the SNL skit, SlickEdit is both.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
i: http://snltranscripts.jt.org/75/75ishimmer.phtml<br />
ii: SlickEdit launches the Visual Studio debugger in a separate window.<br />
iii: SlickEdit does include a copy of GDB to insure compatibility.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2007%2F08%2Feditor-or-ide%2F';
  addthis_title  = 'Editor+or+IDE%3F';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2007/08/editor-or-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SlickEdit 2007 For Windows Development</title>
		<link>http://blog.slickedit.com/2007/08/slickedit-2007-for-windows-development/</link>
		<comments>http://blog.slickedit.com/2007/08/slickedit-2007-for-windows-development/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 14:56:51 +0000</pubDate>
		<dc:creator>Matthew E</dc:creator>
				<category><![CDATA[Code Editors]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=103</guid>
		<description><![CDATA[You&#8217;ve got Visual Studio®, and you mostly write applications for Windows. So why would you need SlickEdit? SlickEdit can read most Visual Studio solution and project files, and can pinch hit nicely for Visual Studio. If you just need to load up a project, make some edits, check some files in and out of source [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve got Visual Studio<sup>®</sup>, and you mostly write applications for Windows. So why would you need SlickEdit? SlickEdit can read most Visual Studio solution and project files, and can pinch hit nicely for Visual Studio. If you just need to load up a project, make some edits, check some files in and out of source control, and kick off a build, you can do all this in SlickEdit.<br />
But where SlickEdit really shines is helping you organize and edit all of that code you&#8217;ve got that doesn&#8217;t fit neatly into an application project. It all starts with using SlickEdit&#8217;s flexible and customizable project system in combination with other time-saving features.</p>
<p><strong>Managing Builds</strong></p>
<p style="float: right; margin: 0px 0px 10px 10px">Schema URL Mappings<br />
 <a rel="lightbox[pics103]" href="http://blog.slickedit.com/wp-content/uploads/2007/08/urlmappings.jpg" title="urlmappings.jpg"><img width="200" src="http://blog.slickedit.com/wp-content/uploads/2007/08/urlmappings.thumbnail.jpg" alt="urlmappings.jpg" height="103" class="imageframe imgalignleft" /></a></p>
<p>We&#8217;ve been using CruiseControl.NET and NAnt for nightly builds of our products. Both technologies use an XML file format. SlickEdit&#8217;s XML features include Auto-completion of tags and attributes, gleaned from the definitions in XSD schemas. Visual Studio also has an excellent XML editing experience, but SlickEdit allows you to customize what specific XSD schemas are used for a particular XML namespace declaration. CruiseControl.NET does not distribute an &#8220;official&#8221; schema for their namespace, mostly because the CruiseControl syntax is extensible with a plug-in architecture. By using Microsoft&#8217;s XML tools I was able to take my existing CruiseControl project files and generate a starter schema. SlickEdit&#8217;s URL Mappings allow me to then use that custom schema for document validation and auto-completion.</p>
<p>In an effort to reduce redundant code and reduce the size of the NAnt source files, many common properties and tasks used by multiple projects have been broken out into a series of include files. However, locating a property or task that is defined in an external file usually requires<a rel="lightbox[pics103]" href="http://blog.slickedit.com/wp-content/uploads/2007/08/alias.jpg" title="alias.jpg"></a> a multi-file search.</p>
<p style="float: right; margin: 0px 0px 10px 10px">Regex Evaluator<br />
<a rel="lightbox[pics103]" href="http://blog.slickedit.com/wp-content/uploads/2007/08/regexeval.jpg" title="regexeval.jpg"><img width="200" src="http://blog.slickedit.com/wp-content/uploads/2007/08/regexeval.thumbnail.jpg" alt="regexeval.jpg" height="171" class="imageframe imgalignleft" /></a></p>
<p>By using the SlickEdit Regex Evaluator I was able to craft a regular expression to search for task and property definitions. Once the expression was ready, I created a macro in Slick-C (SlickEdit&#8217;s C-like macro language)(<a href="http://blog.slickedit.com/?page_id=108">snippet</a>) to search for the word at the cursor in the current NAnt build file and any included build files. Now I have instant search across multiple files when the definition of a property or target eludes me.</p>
<p><strong>Building Installers with WIX (Windows Installer XML)<br />
</strong>WIX is an open-source toolkit from Microsoft for building Windows Installer .msi files. It too uses an XML file format. There are tools available in Wix for getting your project started and compiling your list of files to be installed, but authoring an installer still requires quite a bit of hand-editing the XML source. I use SlickEdit&#8217;s Aliases feature to provide <a href="http://blog.slickedit.com/wp-content/uploads/2007/08/aliascall.jpg">completion of code snippets </a>for commonly used Wix XML constructs. Aliases go well beyond simple insertion of prewritten code. You can configure an alias to format and auto-indent the new text, set the initial editing position, and prompt for replacement parameters.<strong> </strong></p>
<p style="float: right; margin: 0px 0px 10px 10px"><strong>Defining Aliases<br />
</strong><a rel="lightbox[pics103]" href="http://blog.slickedit.com/wp-content/uploads/2007/08/alias.jpg" title="alias.jpg"><strong><img width="200" src="http://blog.slickedit.com/wp-content/uploads/2007/08/alias.thumbnail.jpg" alt="alias.jpg" height="155" class="imageframe imgalignleft" /></strong></a></p>
<p>All of the code for the installer is placed in a custom SlickEdit project. A custom project allows you to create as many organizational folders as you need, optionally organized by physical directories or file extensions. The real power in SlickEdit projects is the ability to define custom build steps to call external tools. Since this project invokes quite a few NAnt build targets, I <a href="http://blog.slickedit.com/wp-content/uploads/2007/08/buildmenu.jpg">customized the build menu</a> by adding <a href="http://blog.slickedit.com/wp-content/uploads/2007/08/projprops.jpg">new build tools</a> to the project. These allow me to invoke NAnt to execute the build targets and display the output in the build window.</p>
<p><strong>Dabbling in PHP and MySQL, with a Side of PowerShell</strong><br />
A year or so ago, I worked on a side project to develop a content management website using PHP and MySQL. The application had to work with Internet Explorer, Firefox, and Safari browsers. Using SlickEdit allowed me to create a single project to organize the code and work with the Subversion repository located on a remote Linux hosting account. And I was able to edit the code on both a Windows XP tablet PC and my MacBook as the custom project format is identical on Windows and *Nix platforms. Customizing the project&#8217;s build commands allowed me to add shortcuts for opening pages in multiple browsers, execute MySQL scripts one the database, and transfer files via FTP to my remote hosting account.</p>
<p style="float: right; margin: 0px 0px 10px 10px">PowerShell Syntax<a href="slickedit_win/PowerShell.jpg"><br />
</a><a rel="lightbox[pics103]" href="http://blog.slickedit.com/wp-content/uploads/2007/08/powershell.jpg" title="powershell.jpg"><img width="200" src="http://blog.slickedit.com/wp-content/uploads/2007/08/powershell.thumbnail.jpg" alt="powershell.jpg" height="163" class="imageframe imgalignleft" /></a></p>
<p>SlickEdit supports dozens of languages out of the box, and has the ability to quickly add your own user-defined highlighting schemes or modify existing ones. I found that the default listing of SQL keywords didn&#8217;t include some of the MySQL keywords, but they were <a href="http://blog.slickedit.com/wp-content/uploads/2007/08/syntax.jpg">easy enough to add</a> via the Color Coding options dialog.</p>
<p>For the past year or so I&#8217;ve been using PowerShell in place of cmd.exe, and steadily building a library of scripts to automate routine tasks. But it just didn&#8217;t seem right that such a neat shell language should have to be edited without any syntax highlighting. With SlickEdit, this was easily solved. To <a href="http://blog.slickedit.com/wp-content/uploads/2007/08/powershell.jpg">set up color coding</a> for PowerShell, all I had to do was create a new language definition, specify the comment format, and add a list of keywords.</p>
<p><strong>No Code Left Behind</strong><br />
These examples only begin to scratch the surface of the features available in SlickEdit. Your code or build process doesn&#8217;t have to be a second-class citizen just because it doesn&#8217;t fit neatly into Visual Studio. For all those times you have to &#8220;just edit it in notepad&#8221; or &#8220;run this tool from the commandline&#8221;, think of how SlickEdit could save you time and hassle.</p>
<p><strong>Download Free Trial</strong></p>
<p>You can download a free trial of Slickedit 2007 here: <u><a href="http://www.slickedit.com/content/view/409/239/">SlickEdit Trial</a></u></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2007%2F08%2Fslickedit-2007-for-windows-development%2F';
  addthis_title  = 'SlickEdit+2007+For+Windows+Development';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2007/08/slickedit-2007-for-windows-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Customizing the Auto Doc Code Viewer’s Output</title>
		<link>http://blog.slickedit.com/2007/07/customizing-the-auto-doc-code-viewer%e2%80%99s-output/</link>
		<comments>http://blog.slickedit.com/2007/07/customizing-the-auto-doc-code-viewer%e2%80%99s-output/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 13:08:35 +0000</pubDate>
		<dc:creator>Scott Hackett</dc:creator>
				<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=52</guid>
		<description><![CDATA[This article describes how to do some basic customizations to the output produced by the Auto Doc Code Viewer tool available in SlickEdit® Tools v1.1 for Microsoft® Visual Studio® 2005. This tool works on the following concept:

It performs a scan of your source code and creates an XML file representing all of the code elements [...]]]></description>
			<content:encoded><![CDATA[<p>This article describes how to do some basic customizations to the output produced by the Auto Doc Code Viewer tool available in SlickEdit® Tools v1.1 for Microsoft® Visual Studio® 2005. This tool works on the following concept:</p>
<ol>
<li>It performs a scan of your source code and creates an XML file representing all of the code elements and their associated comments.</li>
<li>As you click through the Auto Code Doc Viewer, it dynamically produces the next rendered page by running a transform on the XML file created in step 1.</li>
</ol>
<p>Therefore, it’s fairly easy to customize the output. This article will show you how to make some simple modifications to do this. For our example, I’ll be creating a customized SlickEdit template.</p>
<p><strong>Creating a New Template Directory</strong><br />
Before we do anything, we will create a new output template. To do this, perform the following steps:</p>
<ol>
<li>Browse to the <strong>C:\Program Files\SlickEdit Tools v1.1\win\HtmlFormatting</strong> directory. This may be in another location if you didn’t install it to the default directory. The <strong>HtmlFormatting </strong>directory is the directory we’re interested in.</li>
<li>Create a new folder as a child of the <strong>HtmlFormatting </strong>directory. For the example, it will be called <strong>SlickEdit</strong>. Copy the contents of the <strong>HtmlFormatting </strong>directory to the new directory. The following screen capture shows this.</li>
</ol>
<p><a rel="lightbox[pics52]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image1.jpg" title="image1.jpg"><img width="400" src="http://blog.slickedit.com/wp-content/uploads/2007/04/image1.thumbnail.jpg" alt="image1.jpg" height="279" /></a></p>
<p>If you start Visual Studio and go to <strong>Tools &gt; Options</strong>, then find <strong>SlickEdit &gt; Auto Code Doc Viewer</strong>, the option page will have a drop down called “HTML output style”. If you click the drop down, you will see <strong>SlickEdit </strong>in the list. Selecting it will use the transforms from the SlickEdit directory instead of the <strong>HtmlFormatting </strong>directory. This is shown in the following screen capture.</p>
<p><a rel="lightbox[pics52]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image2.jpg" title="image2.jpg"><img width="400" src="http://blog.slickedit.com/wp-content/uploads/2007/04/image2.thumbnail.jpg" alt="image2.jpg" height="237" /></a></p>
<p>Out new SlickEdit template is created and ready to use, so now we can make some modifications to it.</p>
<p><strong>The Style Sheet</strong><br />
At this point, all of our modifications will be made to files within the newly created <strong>SlickEdit </strong>directory. The file <strong>default_stylesheet.css</strong> contains the major styles that are used in the HTML rendering, so we will edit this first. Before we go any farther, let’s take a look at what our Auto Doc Code Viewer output looks like before any edits.</p>
<p><a rel="lightbox[pics52]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image3.jpg" title="image3.jpg"><img width="366" src="http://blog.slickedit.com/wp-content/uploads/2007/04/image3.jpg" alt="image3.jpg" height="211" /></a></p>
<p><strong>Modifying the Background Color</strong><br />
Our first modification will be to change the background color to a very subtle blue (#EFF8FC). To do this, open <strong>default_stylesheet.css</strong> for editing. Add a background-color item to the BODY entry at the top of the file:</p>
<pre>BODY
{
    font-family:verdana,arial,helvetica;
    color:#000000;
    margin:0px;
    margin:5 0;
    margin-top:0px;
    background-color:#EFF8FC;
}</pre>
<p>Save that change and click the refresh button on Auto Doc Code Viewer. The output now looks like the following:</p>
<p><a rel="lightbox[pics52]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image7.jpg" title="image7.jpg"><img width="366" src="http://blog.slickedit.com/wp-content/uploads/2007/04/image7.jpg" alt="image7.jpg" height="213" /></a></p>
<p>We now have a blue background!</p>
<p><strong>Modifying the Quick Link Color</strong><br />
Now let’s update the style of the index and hierarchy lines. Those are controlled by the “eyebrow” style, so search for the word eyebrow to find its definition. We’ll update its background-color and border-width to match the following:</p>
<pre>.eyebrow
{
    background-color: # DDDDDD;
    border-color: #999999;
    border-width: 1px 0 1px 0;
    border-style: solid;
}</pre>
<p>This will give it a top edge and will shade it light grey. The top edge will be important when we add stuff above this element.</p>
<p><strong>Modifying the Code Element Name Bar Font</strong><br />
For our final step in the style sheet, we’ll modify the font of the code element name bar to a larger, non-bold Comic Sans MS font. To do this, find the definition of the <strong>h1 </strong>style and change the definition of <strong>h1</strong> to the following:</p>
<pre>h1
{
    font-family: Comic Sans MS;
    font-weight: normal;
    font-size: 180%;
    margin-top: 0em;
}</pre>
<p>The following screen capture shows our changes to the output so far.</p>
<p><a rel="lightbox[pics52]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image5.jpg" title="image5.jpg"><img width="366" src="http://blog.slickedit.com/wp-content/uploads/2007/04/image5.jpg" alt="image5.jpg" height="217" /></a></p>
<p><strong>Adding a graphic</strong><br />
Our next and final step will be to add a company graphic to the page. To do this, a SlickEdit graphic named <strong>slickeditlogo.gif</strong> is copied to the <strong>SlickEdit </strong>directory we created. To add the graphic, each XSL file must be updated. For this example, we will update the <strong>solution.xsl</strong> file. The others can be updated in a similar way.</p>
<p>Open the <strong>solution.xsl</strong> file in the <strong>SlickEdit </strong>directory for editing. Find the &lt;body&gt; tag and add the &lt;img&gt; tag to the line directly between it and the &lt;table&gt; tag that follows it. It should look like the following:</p>
<pre>&lt;body topmargin="0" leftmargin="0" ... &gt;
&lt;img src="slickeditlogo.gif" mce_src="slickeditlogo.gif" /&gt;
&lt;table bgcolor="#ffffff" border="0" ... &gt;</pre>
<p>If we save and refresh the output, we won’t see any change. In order for the change to be applied, the XSL transform file must be reloaded. The way to force that to happen is to go to the to <strong>Tools &gt; Options</strong> dialog, the find the Auto Code Doc Viewer options. You don’t have to change anything, just click OK. This will force a reload of the XSL transforms, including the change to the <strong>solution.xsl</strong> file. To see the change to pages that you’ve already generated (visited), you must do a rebuild.</p>
<p>The following screen capture shows our changes to the output so far.</p>
<p><a rel="lightbox[pics52]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image6.jpg" title="image6.jpg"><img width="366" src="http://blog.slickedit.com/wp-content/uploads/2007/04/image6.jpg" alt="image6.jpg" height="238" /></a></p>
<p><strong>Conclusion</strong><br />
Because Auto Doc Code Viewer uses XSL transforms, there are many different ways that the end result may be viewed. The default template provides the first in what will be a series of code documentation views, available in future releases. Until then, you have the ability to modify the templates yourself to suit your own output needs.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2007%2F07%2Fcustomizing-the-auto-doc-code-viewer%25e2%2580%2599s-output%2F';
  addthis_title  = 'Customizing+the+Auto+Doc+Code+Viewer%E2%80%99s+Output';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2007/07/customizing-the-auto-doc-code-viewer%e2%80%99s-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Version Control: From Where We Began to CVS and Subversion</title>
		<link>http://blog.slickedit.com/2007/06/version-control-from-where-we-began-to-cvs-and-subversion/</link>
		<comments>http://blog.slickedit.com/2007/06/version-control-from-where-we-began-to-cvs-and-subversion/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 14:51:56 +0000</pubDate>
		<dc:creator>Dan H</dc:creator>
				<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=97</guid>
		<description><![CDATA[I came to work here at SlickEdit during the early nineties.  I was just out of college and had a lot to learn.  A lot of things have changed since then.  We changed the name of the company, switched offices a number of times, released twelve versions of SlickEdit (some of them were called &#8220;Visual [...]]]></description>
			<content:encoded><![CDATA[<p>I came to work here at SlickEdit during the early nineties.  I was just out of college and had a lot to learn.  A lot of things have changed since then.  We changed the name of the company, switched offices a number of times, released twelve versions of SlickEdit (some of them were called &#8220;Visual SlickEdit&#8221;).  Shortly after I got here in 1993 we received an early version of Microsoft Visual C++ (I thought it was the first version, but Wikipedia says 1992, I can only guess that the one we had was not the first version).  Visual C++was a big deal for development on Windows&#8230;  And we were flooded with requests to replace the editor inside the Visual C++ application.  To be fair, these request really only lasted for fourteen years or so.  When they stop I will write another blog about it (or more appropriately maybe one of the members of the SlickEdit Tools for Visual Studio team will).</p>
<p>Right around this time we started work to add version control support to Visual SlickEdit 1.1.  At the time most of the version control systems we had requests to support were very file oriented.  You checked a file out, it was locked, you worked on it, and checked it back in.  Some of the companies that made these products were actually here in &#8220;The Triangle&#8221; area of central North Carolina, which was convenient, and almost all of these companies were willing to give you a free copy of their product for support purposes, or do a product swap.  In no particular order, these players were Source Safe, TLIB, and PVCS on Windows, and RCS or SCCS on UNIX.  Briefly there was a product for Windows called &#8220;Microsoft Delta&#8221;.  It is really hard to find information about at this point.  Apparently it was not well received, and Microsoft purchased One Tree, the company that produced Source Safe.  (This is not one of those anti-Microsoft rants, just a history lesson).  Supporting these products proved challenging because it was tough to create a general purpose framework for all of them, and we felt creating individual support for each one would eventually prove even more problematic.  So we put in place a system with configurable command lines that had &#8220;parse in parts&#8221; and we were off.</p>
<p>A few years down the road, we started getting requests to support a product called ClearCase.  It was more directory oriented than file oriented, and actually had its own file system (for its UNIX versions).  It was <em>huge</em> compared to these other systems.  It also changed hands (or in some cases companies changed names) a few times.  We managed to come up with a set of command lines that worked alright for ClearCase, and looked ahead.</p>
<p>Around 1995 Microsoft released a spec for dealing with source control systems known as the &#8220;SCC Interface&#8221;.  It was very file oriented.  It supported the concept of a project, but most of the operations that were supported dealt with a single file (checkout, checkin, etc).  We started support for this in Visual SlickEdit v4.0.  It solved some problems, and created some new ones.  Overall it was a good thing.  Unfortunately, it kind of disappeared.  The interface itself is still in use today, but if you wanted to find a copy of the specs for it, it might prove challenging.</p>
<p>In the late nineties, we had a <em>lot </em>of requests to support a version control system called CVS.  It had actually been around for at least ten years at the time.  CVS is a very directory oriented system, and I initially had a very hard time wrapping my head around it.  We finally had to break our mold and support one system differently, with much customized support.  We first shipped the support for CVS with v9 in 2003, but we had been using it internally for some time.</p>
<p>Shortly thereafter, something called “Subversion” happened.  It works the same as CVS in many regards, so adding support for it was not that difficult.  It is taking some time to “settle down” though, given a combination of changes in Subversion itself and the amount that the interface has been used/tested.</p>
<p>So what does the future hold?  I hope to spread something more like our current CVS and Subversion interface to more systems.  I hope to do it in a robust manner that does not cause more problems than it solves.  Also, I hope not to spend too much time writing features that serve no practical purpose.  I hope to revamp our version control integration in a fashion that says “I learned a few things along the way”.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2007%2F06%2Fversion-control-from-where-we-began-to-cvs-and-subversion%2F';
  addthis_title  = 'Version+Control%3A+From+Where+We+Began+to+CVS+and+Subversion';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2007/06/version-control-from-where-we-began-to-cvs-and-subversion/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Top Ten Reasons NOT to use SlickEdit</title>
		<link>http://blog.slickedit.com/2007/05/top-ten-reasons-not-to-use-slickedit/</link>
		<comments>http://blog.slickedit.com/2007/05/top-ten-reasons-not-to-use-slickedit/#comments</comments>
		<pubDate>Fri, 25 May 2007 01:01:24 +0000</pubDate>
		<dc:creator>Jeffrey</dc:creator>
				<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=85</guid>
		<description><![CDATA[An odd title to a post on the SlickEdit blog I know.  But in reality, it is just a light-hearted and hopefully creative way that we have been advertising SlickEdit this year.  We wanted to appeal to a developer’s sense of humor, and to also get across that we understand coding pain points and frustrations developers have [...]]]></description>
			<content:encoded><![CDATA[<p>An odd title to a post on the SlickEdit blog I know.  But in reality, it is just a light-hearted and hopefully creative way that we have been advertising SlickEdit this year.  We wanted to appeal to a developer’s sense of humor, and to also get across that we understand coding pain points and frustrations developers have to deal with.  So without further adieu, the top ten reasons not to use SlickEdit.</p>
<p><strong><em>Top Ten Reasons NOT to use SlickEdit</em></strong></p>
<p><em>10. I’d lose my parking spot if I had time to go out for lunch.<br />
9.  Milestones? What are milestones?<br />
8. Half the fun of writing code is fixing syntax errors.<br />
7. If I finish my work on schedule they’ll just give me more to do.<br />
6. I love reading library reference manuals.<br />
5. I can get full disability when my Repetitive Stress Injury is severe enough.<br />
4. Nothing is more satisfying than formatting my code by hand.<br />
3. Real programmers don’t need no fancy tools.<br />
2. The office is so peaceful after 10PM.<br />
1. There&#8217;s really only one good reason not to use SlickEdit — you&#8217;ve never tried it.</em></p>
<p>The ads are running in both printed and online mediums and you can see a sampling of them below.</p>
<table align="center">
<tr>
<td><a rel="lightbox[pics85]" href="http://blog.slickedit.com/wp-content/uploads/2007/05/tshirt_sdtimesrevfinal.jpg" title="tshirt_sdtimesrevfinal.jpg"></a><a rel="lightbox[pics85]" href="http://blog.slickedit.com/wp-content/uploads/2007/05/tshirt_sdtimesrevfinal.jpg" title="tshirt_sdtimesrevfinal.jpg"></a></p>
<p style="text-align: center"><a rel="lightbox[pics85]" href="http://blog.slickedit.com/wp-content/uploads/2007/05/tshirt_sdtimesrevfinal.jpg" title="tshirt_sdtimesrevfinal.jpg"><img width="147" src="http://blog.slickedit.com/wp-content/uploads/2007/05/tshirt_sdtimesrevfinal.thumbnail.jpg" alt="tshirt_sdtimesrevfinal.jpg" height="200" class="imageframe imgalignleft" /></a></p>
</td>
<td><a rel="lightbox[pics85]" href="http://blog.slickedit.com/wp-content/uploads/2007/05/top-ten_final_legal.jpg" title="top-ten_final_legal.jpg"></a><a rel="lightbox[pics85]" href="http://blog.slickedit.com/wp-content/uploads/2007/05/top-ten_final_legal.jpg" title="top-ten_final_legal.jpg"></a></p>
<p style="text-align: center"><a rel="lightbox[pics85]" href="http://blog.slickedit.com/wp-content/uploads/2007/05/top-ten_final_legal.jpg" title="top-ten_final_legal.jpg"><img width="150" src="http://blog.slickedit.com/wp-content/uploads/2007/05/top-ten_final_legal.thumbnail.jpg" alt="top-ten_final_legal.jpg" height="200" class="imageframe imgalignleft" /></a></p>
</td>
<td><a rel="lightbox[pics85]" href="http://blog.slickedit.com/wp-content/uploads/2007/05/slicked_mug_sdt_060107.jpg" title="slicked_mug_sdt_060107.jpg"></a><a rel="lightbox[pics85]" href="http://blog.slickedit.com/wp-content/uploads/2007/05/slicked_mug_sdt_060107.jpg" title="slicked_mug_sdt_060107.jpg"></a></p>
<p style="text-align: center"><a rel="lightbox[pics85]" href="http://blog.slickedit.com/wp-content/uploads/2007/05/slicked_mug_sdt_060107.jpg" title="slicked_mug_sdt_060107.jpg"><img width="147" src="http://blog.slickedit.com/wp-content/uploads/2007/05/slicked_mug_sdt_060107.thumbnail.jpg" alt="slicked_mug_sdt_060107.jpg" height="200" class="imageframe imgalignleft" /></a></p>
</td>
</tr>
</table>
<p>So there you have it &#8211; the top ten reasons not to use SlickEdit.  What do you think of the campaign? Is it funny? Does it catch your eye? Not your cup of tea (or coffee)? Let us know.  You won&#8217;t hurt our feelings.  We would love to hear your feedback, as well as any ideas you have for additions to the list. </p>
<p>Look forward to hearing from you!</p>
<p>Jason</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2007%2F05%2Ftop-ten-reasons-not-to-use-slickedit%2F';
  addthis_title  = 'Top+Ten+Reasons+NOT+to+use+SlickEdit';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2007/05/top-ten-reasons-not-to-use-slickedit/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>SlickEdit Offers Help to All CodeWright Orphans</title>
		<link>http://blog.slickedit.com/2007/04/slickedit-offers-help-to-all-codewright-orphans/</link>
		<comments>http://blog.slickedit.com/2007/04/slickedit-offers-help-to-all-codewright-orphans/#comments</comments>
		<pubDate>Tue, 24 Apr 2007 16:06:00 +0000</pubDate>
		<dc:creator>Scott Westfall</dc:creator>
				<category><![CDATA[Code Editors]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=5</guid>
		<description><![CDATA[Many CodeWright® orphans were created when Borland® announced that they would no longer develop or support CodeWright. It’s a sad sight, these poor urchins wandering the streets in search of support. “Pardon me, sir, but could you spare a bug fix?” SlickEdit® offers a solution for those who want a powerful code editor that is [...]]]></description>
			<content:encoded><![CDATA[<p>Many CodeWright<sup>®</sup> orphans were created when Borland<sup>®</sup> announced that they would no longer develop or support CodeWright. It’s a sad sight, these poor urchins wandering the streets in search of support. “Pardon me, sir, but could you spare a bug fix?” SlickEdit<sup>®</sup> offers a solution for those who want a powerful code editor that is actively being developed and supported.</p>
<p>While no editor can offer the exact same set of capabilities as another, SlickEdit provides more of the powerful editing features that CodeWright users are accustomed to than any other editor…and some that CodeWright users never had before, like Comment Wrapping, Backup History, and the Regular Expression Evaluator.<br />
 <br />
No programmer relishes the thought of switching editors. After using an editor for years, the key sequences and operations become second nature. To ease this migration, SlickEdit offers a CodeWright emulation that uses the same key bindings for common operations and provides default behaviors familiar to CodeWright users. This makes you productive right away on SlickEdit.</p>
<p>A PDF of the CodeWright emulation is available at <a href="http://www.slickedit.com/images/stories/products/slickedit/emulation_charts/codewright_emulation.pdf"><strong>http://www.slickedit.com/codewright</strong></a>.</p>
<p>SlickEdit also provides a utility that converts CodeWright workspaces and projects into SlickEdit workspaces and projects. Each CodeWright .psp file is converted to a corresponding SlickEdit .vpw file. Likewise, the CodeWright .pjt files are converted to SlickEdit .vpj files. While this utility doesn’t convert all commands or options, it does save a lot of time setting up the project structure in SlickEdit. The CodeWright project converter is implemented as a Slick-C macro file.</p>
<p>To download it, go to <a href="http://www.slickedit.com/content/view/432"><strong>http://www.slickedit.com/codewright</strong></a>.</p>
<p>Follow these instructions to load the file:<br />
1. Save the file to any directory.<br />
2. Open SlickEdit.<br />
3. Select Help &gt; Product Updates &gt; Load Hot Fix.<br />
4. Navigate to the saved zip file, select it, and click OK.</p>
<p>Once loaded, you run the converter by selecting Project &gt; Open Other Project &gt; Convert CodeWright Project. Or you can run it from the SlickEdit command line. Press F9 (in the CodeWright emulation) to bring up the SlickEdit command line. Type: <span style="font-size: 10pt; font-family: Courier">convert_cw_project –o</span>Then press Enter. The ‘o’ option tells the converter to open the newly converted workspace. CodeWright users, you have a new home!</p>
<p><strong>Visit </strong><a href="http://www.slickedit.com/2007"><strong>www.slickedit.com/2007</strong></a><strong> to download a free trial today!</strong></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2007%2F04%2Fslickedit-offers-help-to-all-codewright-orphans%2F';
  addthis_title  = 'SlickEdit+Offers+Help+to+All+CodeWright+Orphans';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2007/04/slickedit-offers-help-to-all-codewright-orphans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Key Binding, Command, Menu: The Golden Triangle</title>
		<link>http://blog.slickedit.com/2007/04/8/</link>
		<comments>http://blog.slickedit.com/2007/04/8/#comments</comments>
		<pubDate>Mon, 02 Apr 2007 16:37:03 +0000</pubDate>
		<dc:creator>Scott Westfall</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[SlickEdit Products]]></category>

		<guid isPermaLink="false">http://blog.slickedit.com/?p=8</guid>
		<description><![CDATA[To borrow a phrase from Mr. Jinks[i], “I hate meeses to pieces”. Before you call the SPCA, let me be clear that I’m talking about computer mice and not Mus musculus, the common household mouse. Further, I should narrow my context to that of programming because in many other areas of computing the mouse is [...]]]></description>
			<content:encoded><![CDATA[<p>To borrow a phrase from Mr. Jinks[i], “I hate meeses to pieces”. Before you call the SPCA, let me be clear that I’m talking about computer mice and not <em>Mus musculus</em>, the common household mouse. Further, I should narrow my context to that of programming because in many other areas of computing the mouse is indispensable.</p>
<p>In programming, however, the mouse can be one of the greatest productivity sinkholes. Time is wasted each time you lift your hand from the keyboard to grab the mouse, and more time is wasted when you move your hand back to home row in preparation for more typing.</p>
<p>So what’s the solution? Keep your hands on the keyboard! To do this use the SlickEdit<sup>®</sup> command line and bind commonly used commands to keys.</p>
<p><strong></p>
<p>Launching Operations<br />
<br />
</strong>SlickEdit provides three ways to launch operations: key bindings, commands, and menus. OK, there are actually four, if you include icons. Since the focus of this article is how to keep your hands on the keyboard, I was going to skip that one. </p>
<p><strong></p>
<p>Key Bindings</strong> <br />
Key bindings are the fastest way to launch an operation. They can be pressed at any time while editing. A key binding associates a key sequence with a command. A key sequence is a series of key strokes. Anything you do frequently should be bound to an easily remembered key sequence.</p>
<p>For example the key sequence Ctrl+A means hold down the Control key, typically labeled “Ctrl” on most keyboards, and press the A key. The letter A is represented as an uppercase letter, but this does not mean that you are to press the Shift key. If you are supposed to press the Shift key, the sequence will be written as Ctrl+Shift+A.  We use the uppercase A to match the letter on the keyboard.</p>
<p><strong></p>
<p>Commands<br />
<br />
</strong>Commands are useful for less frequently used operations or operations that take arguments. They are executed from the SlickEdit command line and are nearly as fast as key bindings. Press the Escape key (in most emulations) to activate the command line, which is displayed at the bottom of the SlickEdit application window.  </p>
<p style="text-align: center">
<p align="center"><a rel="lightbox[pics8]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image001.jpg" title="image001.jpg"><img width="96" src="http://blog.slickedit.com/wp-content/uploads/2007/04/image001.thumbnail.jpg" alt="image001.jpg" height="73" class="imageframe imgalignleft" /></a> </p>
<p align="center">  <em>Figure 1, SlickEdit with Command Line</em></p>
<p>It offers a full command history and completions for command names and arguments. Use the arrow keys or the mouse to scroll through previous commands. As you type, a list of possible completions is displayed. Use the arrow keys or mouse to select a completion. SlickEdit stores recorded macros as commands. You can also use Slick-C to write new commands. Use the <strong>_command</strong> keyword to identify a macro as a command. Any command can be bound to a key sequence for faster launching. </p>
<p><strong></p>
<p>Menus<br />
<br />
</strong>Menus are accessed via the mouse or a keyboard shortcut. Menus are great for infrequently used items that may not be worth a key binding. They are also helpful to learn about new capabilities. But if you use an operation frequently, you will be more productive by binding it to a key sequence or launching it from the command line. Many menus list a keyboard shortcut to launch the operation. This is just the key binding for the associated command. So when you use a keyboard shortcut, you are really just using a key binding. </p>
<p>You can also operate the main menu through hotkeys. Enable the use of hotkeys by selecting <strong>Tools &gt; Options &gt; General</strong>, selecting the General tab, and putting a check in “Alt menu hotkeys”. This will be selected by default in many emulations. Once enabled, pressing the Alt key will display an underscore beneath each menu option, indicating the letter to press to activate that option. This is not as fast as key bindings, but it does keep your hands on the keyboard and is much faster than using the mouse. In some cases the menu hot key sequence is a good mnemonic for the command. For example, Alt+P, E (to bring up <strong><u>P</u>roject &gt; Prop<u>e</u>rties</strong>) may be easier to remember and type than binding project-edit to Ctrl plus some function key. </p>
<p><strong></p>
<p>Icons<br />
<br />
</strong>SlickEdit presents icons in a series of toolbars related to different tasks. Toolbars can be customized with an extensive set of additional icons. Icons are useful for die-hard mouse users or for setting up infrequently used operations for which you have a hard time remembering the associated command or key binding. </p>
<p><strong></p>
<p>The Golden Triangle<br />
<br />
</strong>The three methods (excluding icons) to launch an operation are related, forming the Golden Triangle of operation launching. If you know how to execute an operation with one of these, you can easily configure SlickEdit to launch the operation using the other two methods. Commands form the base for the other two…which is why it is shown as the apex of the triangle (Damn it, Jim, I’m an engineer, not an artist!). Maybe I should have used a Golden U or something. <br />
 </p>
<p style="text-align: center">
<p align="center"><a rel="lightbox[pics8]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image003.jpg" title="image003.jpg"><img width="128" src="http://blog.slickedit.com/wp-content/uploads/2007/04/image003.thumbnail.jpg" alt="image003.jpg" height="91" class="imageframe imgalignleft" /></a></p>
<p align="center"><em>Figure 2 the Golden Triangle; behold its majesty!</em></p>
<p align="center">
<p align="center">
<p><strong>From Key Binding to Command<br />
<br />
</strong>Sometimes you may want to change the key sequence to which an operation is bound. You first need to find the command associated with that key sequence. Use the <strong>what-is</strong> command from the SlickEdit command line or select <strong>Help &gt; What Is Key</strong> from the main menu. The command line will be replaced with the prompt, “What is key:” Enter the key sequence in question, like Ctrl+A (hold down the Control key and press A), and SlickEdit displays the associated command. In CUA emulation, SlickEdit will output, “Ctrl+A runs the command select-all”. You can use the same approach to determine the commands associated with mouse events. After you run what-is, click any mouse button and you will be prompted with a list of mouse events. Select one from the list and SlickEdit displays the associated command. For example, if you select mbutton-down in CUA emulation, SlickEdit will output, “MButtonDn runs the command mou-paste”. </p>
<p><strong></p>
<p>From Command to Key Binding<br />
<br />
</strong>To find the key binding for a command, use the where-is command or select Tools &gt; Options &gt; Key Bindings from the main menu. The where-is command works just like what-is, except you type in the command name and it outputs the key sequence. The Key Bindings dialog displays a list of the commands. You can scroll through the list or search for a command by typing the command in the text box at the top. The key binding for the selected command is displayed in the dialog.   </p>
<p style="text-align: center"><a rel="lightbox[pics8]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image003.jpg" title="image003.jpg"></a><a rel="lightbox[pics8]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image005.png" title="image005.png"><img width="128" src="http://blog.slickedit.com/wp-content/uploads/2007/04/image005.thumbnail.png" alt="image005.png" height="89" class="imageframe imgalignleft" /></a></p>
<p align="center"><em>Figure 3, Key Bindings Dialog    </em></p>
<p align="center">
<p align="left"><strong>Modifying Key Bindings<br />
<br />
</strong>The Key Bindings dialog can also be used to set a key binding. Type the command in the Command field, or select one from the list. Then click the “Add Key or Mouse Click” button. Now type the key sequence you want to use. For example, to bind a command to Ctrl+A, hold down the Control key and press A. To bind a command to a mouse event, click any mouse button and then select the appropriate event from the list. When you are finished, click the <strong>Bind</strong> button. To exit the dialog, click <strong>Done</strong>.</p>
<p align="left"><strong>From Menu to Command</strong> <br />
If the menu entry displays a keyboard shortcut, you can quickly find the associated command using what-is and entering the key sequence. If the menu entry does not display a shortcut, then finding the command for an entry involves a little more work. </p>
<p>SlickEdit provides a convenient UI under <strong>Macro &gt; Menus</strong> that allows you to view and modify menus in SlickEdit. To find commands for the items on the main menu, select “_mdi_menu” from the list and then click the <strong>Open</strong> button. You are presented with a menu hierarchy that you can expand to find the menu entry in question. Once selected, information about the entry is displayed including the command executed. You can use this menu to add or change the shortcut for a menu item. Doing so has the same effect as using the Key Bindings dialog to bind the menu entry’s command to a key sequence.   </p>
<p style="text-align: center"><a rel="lightbox[pics8]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image003.jpg" title="image003.jpg"></a><a rel="lightbox[pics8]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image005.png" title="image005.png"></a><a rel="lightbox[pics8]" href="http://blog.slickedit.com/wp-content/uploads/2007/04/image007.jpg" title="image007.jpg"><img width="96" src="http://blog.slickedit.com/wp-content/uploads/2007/04/image007.thumbnail.jpg" alt="image007.jpg" height="73" class="imageframe imgalignleft" /></a></p>
<p align="center"><em>Figure 4, Menu Editor</em></p>
<p>Some menu entries are added dynamically by SlickEdit, so you may have to search the code to find the associated command. One example of this is <strong>Build &gt; Java Options</strong>, which is only present when a Java project is active. Unfortunately, finding the associated commands for these entries can be very difficult and not easily covered in an article like this.</p>
<p><strong></p>
<p>Context Menus</strong> <br />
It is also easy to find the commands in the context menu for the editor window. The context menu, itself, contains an entry to “Edit This Menu”. Selecting this option brings up a dialog that lists the menu entries and associated information, including the command. Use this dialog to modify the context menus. Note that there are two context menus for the editor window: one when a selection is made and one when no selection is made. You can view or change the function that is used for these menus by selecting <strong>Tools &gt; Options &gt; File Extension Setup</strong> and selecting the Advanced tab.<br />
<strong></p>
<p>From Key Binding to Menu and Back</strong> <br />
Menu entries map to key bindings through commands, so key bindings are not directly associated with menu entries. To map from a key binding to a menu or vice versa, you need to look up the associated command. That Golden U is looking better all the time!</p>
<p><strong></p>
<p>Customizing Toolbar Icons</strong> <br />
The focus of this article has been to help you keep your hands on the keyboard, so icons weren’t included in the Golden Triangle. Besides, then I would have needed a Golden Square or some other form of rhombus, and that just doesn’t sound cool. You may find it helpful to change the set of displayed toolbars, add or remove icons, or change the behavior for an icon. SlickEdit uses the term “toolbar” to refer to both icon bars and tool windows. To change the set of displayed toolbars, select <strong>View &gt; Toolbars</strong> and check/uncheck one of the listed toolbars. The list is divided into two groups. The top group is comprised of tool windows, like the Symbol view and the Projects view. The bottom group is made up of icon bars. </p>
<p>Additional options are available on the Toolbar Customization dialog by selecting <strong>View &gt; Toolbars &gt; Customize</strong>. The Toolbars tab provides a way to control the visibility of the toolbars. The Toolbars tab allows you to set options for which toolbars are visible, whether they are dockable, etc. </p>
<p>The Categories tab displays the complete set of available icons. These can be added to any icon toolbar by dragging them to the desired location. All of the icons have pre-defined behaviors, except the set in the “User Definable Tools” category. Use these to add your own functionality. </p>
<p>Each icon has an associated command that defines what happens when it is clicked. To view or change that command, right-click on the icon and select Properties. The icon needs to be located in a toolbar to do this. You cannot access the properties for an icon in the Toolbar Customizations dialog.  </p>
<p><strong></p>
<p>“Exit, Stage Left”<br />
<br />
</strong>OK, that one is a Snagglepuss reference<a name="_ednref2" title="_ednref2"></a>[ii]. Whatever angst I previously expressed for mice has now been transferred to the Golden Polygon of Unspecified Dimensions. Regardless of the shape, you now have the tools you need to configure SlickEdit to work the way YOU think it should, using the key bindings you find natural. This is one of the essential steps in being a true power programmer.<br />
 </p>
<hr />    </p>
<p class="MsoEndnoteText"><a name="_edn1" title="_edn1"></a>[i] Mr. Jinks, sometimes called “Jinks the cat”, appeared in the “Pixie and Dixie” cartoons as part of “The Huckleberry Hound Show”, by Hanna and Barbera.</p>
<p class="MsoEndnoteText"><a name="_edn2" title="_edn2"></a>[ii] Snagglepus is another of Hanna-Barbera’s cartoon characters.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.slickedit.com%2F2007%2F04%2F8%2F';
  addthis_title  = 'Key+Binding%2C+Command%2C+Menu%3A+The+Golden+Triangle';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.slickedit.com/2007/04/8/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
