<?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>High Tech Redneck Woman &#187; Development</title>
	<atom:link href="http://www.hightechredneckwoman.com/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hightechredneckwoman.com</link>
	<description>I&#039;m a Redneck Woman. I&#039;m a High Tech Broad.</description>
	<lastBuildDate>Sun, 06 Nov 2011 19:51:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mock me? Mock you.</title>
		<link>http://www.hightechredneckwoman.com/2010/08/06/mock-me-mock-you/</link>
		<comments>http://www.hightechredneckwoman.com/2010/08/06/mock-me-mock-you/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 01:30:19 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[blogging]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=1315</guid>
		<description><![CDATA[<p>As I said in <a href="http://www.hightechredneckwoman.com/2010/07/27/i-have-a-plan/">my last post</a>, I&#8217;m spending some time working on my own websites for the first time in a long while. I admit, I&#8217;m not moving as fast as I&#8217;d like, but at least I&#8217;m doing something.</p>
<p>I thought the best place to start was to mock up the new layout so I could figure out what I wanted to do before I started any coding. I&#8217;ve been doing that at &#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>As I said in <a href="http://www.hightechredneckwoman.com/2010/07/27/i-have-a-plan/">my last post</a>, I&#8217;m spending some time working on my own websites for the first time in a long while. I admit, I&#8217;m not moving as fast as I&#8217;d like, but at least I&#8217;m doing something.</p>
<p>I thought the best place to start was to mock up the new layout so I could figure out what I wanted to do before I started any coding. I&#8217;ve been doing that at work when starting new projects, and it really helps when it comes time to put fingers to keyboard and code my heart out.  We had been using <a href="http://gomockingbird.com/" class="external">Mockingbird</a> at work for wireframing, but they&#8217;re moving to a paid system in a little over a week. It&#8217;s not that we weren&#8217;t willing to pay for a service, we just weren&#8217;t happy with the plans that they came up with.  My co-worker and I were both looking around for some alternatives.  I ran across <a href="http://mockflow.com/" class="external">MockFlow</a>. It looked like a really nice product. And their pricing wasn&#8217;t all that bad. And best of all, they have a desktop app that allows you to work offline if needed. I signed up for the free basic account to test it out. I also signed up for one at home so I could mock up the changes to this site. I really like how easy it is to create a mockup. They&#8217;ve got so many objects that you can drag onto your layout, and they&#8217;ve got a store where you can download components that other people have created. I&#8217;m definitely liking it (and I think we&#8217;re gonna start using it at work).</p>
<p>I&#8217;m not done with it yet, but here&#8217;s a sneak peek at what I&#8217;m thinking of doing for the layout for this place &#8230;</p>
<div style="text-align: center;"><a href="http://www.hightechredneckwoman.com/wp-content/uploads/2010/08/blog-mockup.gif" rel="lightbox"><img src="http://www.hightechredneckwoman.com/wp-content/uploads/2010/08/blog-mockup-320x202.gif" alt="" title="blog mockup" width="320" height="202" /></a></div>
<p>I&#8217;ve got a ways to go, but at least it&#8217;s a start. I hope to finish the wireframe up tomorrow so that I can start developing my own custom theme. I want to get it done &#8216;cuz I&#8217;ve got plans for <a href="http://www.rebeccaresler.com" class="external">my professional website</a>. I&#8217;m gonna play with <a href="http://codeigniter.com/">CodeIgniter</a> on that one.  <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-grin.gif' alt=':biggrin:' class='wp-smiley' /> </p>
<p>[Okay ... I know the title of this post is lame, but I'm still stuffed from the zeppoli I had for dessert at Olive Garden tonite. Bite me. <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-razz3.gif' alt=':razz2:' class='wp-smiley' /> ]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2010/08/06/mock-me-mock-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I have a plan</title>
		<link>http://www.hightechredneckwoman.com/2010/07/27/i-have-a-plan/</link>
		<comments>http://www.hightechredneckwoman.com/2010/07/27/i-have-a-plan/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 01:19:36 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=1312</guid>
		<description><![CDATA[<p>It seems like that since I started working full time as a web developer/programmer, I have neglected my own websites.  It has been really bad over the past few years.  I don&#8217;t even blog very much any more.  I&#8217;ve basically been doing all of my ranting and raving on Twitter and Facebook and haven&#8217;t been giving my own websites any attention.  I spend 8 hours (or 9 hours this summer) working on other people&#8217;s websites &#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>It seems like that since I started working full time as a web developer/programmer, I have neglected my own websites.  It has been really bad over the past few years.  I don&#8217;t even blog very much any more.  I&#8217;ve basically been doing all of my ranting and raving on Twitter and Facebook and haven&#8217;t been giving my own websites any attention.  I spend 8 hours (or 9 hours this summer) working on other people&#8217;s websites and don&#8217;t really wanna work on mine when I get home.</p>
<p>I&#8217;m trying to change that.  I&#8217;ve deactivated my Facebook account, and I&#8217;m taking a break from Twitter for a while.  I know I&#8217;ll eventually go back to Twitter, but as for Facebook, I&#8217;m not sure.  I might reactivate my account and I might delete it completely &#8230; I just don&#8217;t know yet.  Since I&#8217;m taking a break from social media, I&#8217;ll have more time on my hands, and I plan to use that time on my websites.  </p>
<p>Tonite I put together a list of things that I want to do.  They are (roughly in order that I want to accomplish them):</p>
<ul>
<li>Clean up the files I have on the server with my web host (get rid of stuff I&#8217;m no longer using).</li>
<li>Clean up my database (again, get rid of stuff I&#8217;m no longer using).</li>
<li>Decide what I want to do with the subdomains that I have set up (keep, redirect, or remove).</li>
<li>Clean up my email accounts and forwarders (again, get rid of stuff I&#8217;m no longer using).</li>
<li>Redesign the layout for this website.</li>
<li>Start this site over from scratch in WP3 and import the posts and comments I have to this point.</li>
<li>Possibly redesign the layout for my <a href="http://www.rebeccaresler.com" target="external">professional website</a>.</li>
<li>Start my professional website over from scratch using CodeIgniter.</li>
<li>Do further development on the weather script I wrote a few years back.</li>
<li>Possibly write a WP plugin based on my weather script (once I complete it).</li>
<li>Blog more about the stuff that I&#8217;ve been doing at work with CodeIgniter.</li>
</ul>
<p>That list should keep me busy for a while. LOL  Now I just need to get myself to turn off the tv so I don&#8217;t have any distractions.</p>
<p>Wish me luck. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2010/07/27/i-have-a-plan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I had such high hopes</title>
		<link>http://www.hightechredneckwoman.com/2010/03/04/i-had-such-high-hopes/</link>
		<comments>http://www.hightechredneckwoman.com/2010/03/04/i-had-such-high-hopes/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 01:55:58 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=1294</guid>
		<description><![CDATA[<p>After I redesigned this place the last time (back in <a href="http://www.hightechredneckwoman.com/2009/09/18/fresh-look/">September</a>, I had such high hopes of blogging more often and blogging about techie stuff.  It&#8217;s now March, and this is only my 2nd post of the year, and no techie/geekie stuff.  Yeah &#8230; I&#8217;m burning up the place. LOL</p>
<p>Since I&#8217;m back working again (just over 4 months at the new place) and coding every day, I have ideas race through my head &#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>After I redesigned this place the last time (back in <a href="http://www.hightechredneckwoman.com/2009/09/18/fresh-look/">September</a>, I had such high hopes of blogging more often and blogging about techie stuff.  It&#8217;s now March, and this is only my 2nd post of the year, and no techie/geekie stuff.  Yeah &#8230; I&#8217;m burning up the place. LOL</p>
<p>Since I&#8217;m back working again (just over 4 months at the new place) and coding every day, I have ideas race through my head for things I want to do with my own websites.  Unfortunately, those ideas are racing while I&#8217;m at work, and by the time I get home, they&#8217;re gone.  I need to start writing &#8216;em down I think.  I&#8217;ve been using the CodeIgniter framework a lot.  I keep trying to think of things I could do with it.</p>
<p>I&#8217;ve also dabbled in writing a Facebook app for a project at work.  It&#8217;s a relatively simple one, as far as Facebook apps go &#8230; no interaction with the user or anything like that.  I still had issues getting things set up initially, but that&#8217;s probably because I jumped in with both feet rather than reading documentation first.  Oh well. I learn best by doing anyway.  I&#8217;d love to come up with a Facebook app on my own, but I&#8217;m not sure what to do.  The only thing that I can come up with is a weather widget. I started laying one out for my own websites already.  I could create a script that can be plugged in to a regular website, a WordPress plugin, and a Facebook app.  I just need to get my butt in gear.  It&#8217;s hard to get motivated to work on my own websites after working on other people&#8217;s sites all day at work.  But then again, I am usually sitting at the computer all nite anyway.  I might as well do something useful rather than reading Twitter and Facebook and other mindless surfing.</p>
<p>We use WordPress quite a bit at work.  I don&#8217;t deal with it since I&#8217;m the programming geek (php &#038; MySQL), but I see what is being done by my co-workers.  It makes me want to work on this place again.  One thing I&#8217;ve never dabbled with is widgets.  I usually just hard code the stuff I want in the sidebar since I&#8217;m just doing the site for myself.  But I&#8217;ve seen what can be done with widgets and it makes me wanna give it a try.  </p>
<p>There was a time where I was doing a lot of WP development.  Yeah, it was just for myself, but I knew what was going on and what I could do.  It&#8217;s been so long since I&#8217;ve done anything serious with WP.  Even when I redesigned last, I didn&#8217;t delve into things I could have. I really wanna dive back in, but I feel so far behind. So many advances have been made to the core.  I happened run across a site for a <a href="http://www.wordcampmsp.org/">WordCamp in the cities</a>. I&#8217;m seriously considering going.  I think one of my co-workers wants to as well.  It&#8217;s not until November, so we&#8217;ve got a while to make a decision.  Anyone else considering going to it?</p>
<p>I&#8217;ve got a pretty sweet setup going on now (well, considering what I&#8217;ve had in the past anyway).  I added memory to my laptop (from 1GB to 4GB), and I upgraded to Windows 7 (which I <strong><em>LOVE</em></strong>).  I even got a new monitor that&#8217;s hooked up to my laptop (21.5&#8243; widescreen).  The dual monitor setup is perfect for development (I wish I had dual monitors at work).  I still use WAMP server for local development.  I even found out about a program (from my boss) that gives me a GUI for my local MySQL databases (<a href="http://www.heidisql.com/">HeidiSQL</a>).  I have no excuse not to work on my own websites (other than the fact that I&#8217;ve turned into a lazy ass).</p>
<p>So &#8230; be on the lookout (I&#8217;ve said that before, haven&#8217;t I <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-wink.gif' alt=':wink:' class='wp-smiley' /> ).  I really will try to post more here. As with the ideas I have for my websites during the day, I have ideas for posts that never materialize (I think I need to carry a notebook with me to work &#8230; or just use Google Docs).  I need to be better about that. I need to stop procrastinating and being lazy. I really hope I can follow through.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2010/03/04/i-had-such-high-hopes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Becky&#8217;s got her groove back</title>
		<link>http://www.hightechredneckwoman.com/2009/11/05/beckys-got-her-groove-back/</link>
		<comments>http://www.hightechredneckwoman.com/2009/11/05/beckys-got-her-groove-back/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 01:35:03 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=1251</guid>
		<description><![CDATA[<p>Tomorrow will end my first week of work at <a href="http://www.hightechredneckwoman.com/2009/11/02/managed-to-make-it-through/">my new job</a>. Things have been going good and the people are nice. I don&#8217;t feel like an outsider like I have at other jobs. I&#8217;ve finished up one project and have started another.</p>
<p>It feels soooooo good to be working with php again. For the past year, (at the 2 contract jobs I had) I was working strictly with html and css, mainly html &#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>Tomorrow will end my first week of work at <a href="http://www.hightechredneckwoman.com/2009/11/02/managed-to-make-it-through/">my new job</a>. Things have been going good and the people are nice. I don&#8217;t feel like an outsider like I have at other jobs. I&#8217;ve finished up one project and have started another.</p>
<p>It feels soooooo good to be working with php again. For the past year, (at the 2 contract jobs I had) I was working strictly with html and css, mainly html emails. While I don&#8217;t mind working with css, I enjoy working with php and sql so much more. And not only am I working with php again, I&#8217;m even learning a new framework, CodeIgniter. It&#8217;s what they use at work. </p>
<p>I had my first taste of it today when I started on a new project. I think I&#8217;ll pick it up pretty quickly. While I haven&#8217;t used a framework before, I have worked with a &#8220;layer&#8221; concept at a previous job. We had separate directories for database, presentation, and domain layers. CodeIgniter has model, view, and controller &#8220;layers&#8221;. What I really like about CodeIgniter is the fact that you can put together an array of data in the controller layer to send to the view layer, and in the view layer, you have variables that have the names of the keys from the array that was passed to it. Or at least as far as I can tell, that&#8217;s how it is. <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve even been in a good, upbeat mood the past couple days. I really noticed it today. I don&#8217;t know if it&#8217;s just because I&#8217;m out of my apartment or it&#8217;s because I&#8217;m back working (with something I really enjoy even) or it&#8217;s just things turning back around in my favor. I&#8217;m not going to analyze it, and I&#8217;m definitely not going to take it for granted (or at least I&#8217;m going to try my damnedest).</p>
<p>Hopefully this means I&#8217;ll have a good birthday this year (it&#8217;s next Saturday). Now I just need to figure out what I&#8217;m gonna do to celebrate it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2009/11/05/beckys-got-her-groove-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Project</title>
		<link>http://www.hightechredneckwoman.com/2009/04/28/new-project/</link>
		<comments>http://www.hightechredneckwoman.com/2009/04/28/new-project/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 17:15:05 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[distractions]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Weather]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=1187</guid>
		<description><![CDATA[<p>While I wait to hear back from the job opportunity I interviewed for last week and the job opportunity I applied for yesterday, I need a project to keep me occupied.  I only really have one idea for what that project should be.  I&#8217;ve already done something similar with this idea, but I thought I would take it a step further this time around.</p>
<p>What is the idea?  Well, it&#8217;s a weather widget.  Yes, there &#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>While I wait to hear back from the job opportunity I interviewed for last week and the job opportunity I applied for yesterday, I need a project to keep me occupied.  I only really have one idea for what that project should be.  I&#8217;ve already done something similar with this idea, but I thought I would take it a step further this time around.</p>
<p>What is the idea?  Well, it&#8217;s a weather widget.  Yes, there are lots of weather widgets already out there on the web, but there&#8217;s no rule anywhere saying I can&#8217;t add one more to the mix. <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-razz1.gif' alt=':pbbt:' class='wp-smiley' /> </p>
<p>My previous stab at this idea was just for my own personal use on my own websites.  It displayed the current conditions only for Fargo.  This time I want to create something that others can download and add to their own websites.  I also want it to allow for customization of the location of the conditions by the person who is viewing the website that the widget is on, and I want it to remember that customization.</p>
<p>I intend to use the <a href="http://www.weather.gov/xml/current_obs/" target="external">NWS XML feeds</a> for the data source.  That&#8217;s what I was using for my first version of this widget.  I trust the data from the NWS.  I see them as an official source.  I know that there are other sources out there that might have more data points, but I prefer the NWS, so that&#8217;s what I&#8217;m gonna use.</p>
<p>I&#8217;ve already created a brief outline of what I want to accomplish.  I even started sketching out the database schema over the weekend.  Now I just need to force myself to sit at the computer and work on it.  I definitely could use the distraction while I&#8217;m waiting.  Once I have things finished up, I&#8217;ll most likely add it to this site for download (with instructions of course).  I don&#8217;t know if anyone else will want to use it, but it will be good for me to put this together.  And it will be something nice to add to my portfolio. <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2009/04/28/new-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery tips: External Links</title>
		<link>http://www.hightechredneckwoman.com/2009/01/15/jquery-tips-external-links/</link>
		<comments>http://www.hightechredneckwoman.com/2009/01/15/jquery-tips-external-links/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 02:14:50 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=707</guid>
		<description><![CDATA[<p>As I <a href="http://www.hightechredneckwoman.com/2009/01/15/warning-geeky-content-coming-soon/">mentioned earlier today</a>, I've been learning about <a href="http://jquery.com/" target="external">jQuery</a> at work during my spare time.  I read some documentation on the jQuery website and went through some tutorials both on that site and on others.  I've learned quite a bit since I started.  </p>
<p>I wanted to share something that I thought was pretty cool.  If nothing else, I wanted to save it for later reference for myself.  And if someone else finds it &#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>As I <a href="http://www.hightechredneckwoman.com/2009/01/15/warning-geeky-content-coming-soon/">mentioned earlier today</a>, I've been learning about <a href="http://jquery.com/" target="external">jQuery</a> at work during my spare time.  I read some documentation on the jQuery website and went through some tutorials both on that site and on others.  I've learned quite a bit since I started.  </p>
<p>I wanted to share something that I thought was pretty cool.  If nothing else, I wanted to save it for later reference for myself.  And if someone else finds it useful, that's even better.</p>
<p>Let's say that you add classes to the links you have on your website (whether it's a blog or just a normal website) to indicate external links, such as the following:</p>
<p><span id="more-707"></span>
<div class="igBar"><span id="lhtml-6"><a href="#" onclick="javascript:showPlainTxt('html-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-6">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"http://www.url1.com"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"external"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Link 1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"http://www.url2.com"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Link 2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"http://www.url3.com"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"external"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Link 3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"http://www.url4.com"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Link 4<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">&lt;br</span></a> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Let's also say that you want to add either text or an image to the external links to indicate to your readers that they are links that will take them away from your website.  Since they <strong>are</strong> external links, you probably also want to open the links in a new browser window.</p>
<p>Of course, you can always manually add the text or image after the external links, and you can add <strong>target="_blank"</strong> or <strong>target="windowname"</strong>.  But that just adds more work for you to do.  And what if you're lazy?</p>
<p>Well, with jQuery, you can leave your links coded as above and add some code to do the rest of the work for you.  </p>
<p>The first think you need to do is include the jquery.js file.  If you're looking into jQuery, you probably are familar with how to set up an html page and include that file, so I'm not going to include that code (even though it <strong>is</strong> only one line).</p>
<p>You then have 2 options ... include the following code between some &lt;script&gt; tags directly on your page or create a separate javascript file and include that.  I tend to do that latter to keep my pages clean.  Now for the code ...</p>
<div class="igBar"><span id="ljavascript-7"><a href="#" onclick="javascript:showPlainTxt('javascript-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-7">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span>document<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// add your text or image to the end of the link</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"a.external"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"*"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// make the link open in a new window</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"a.external"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; window.<span style="color: #000066;">open</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">href</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now let's go through the pieces.</p>
<div class="igBar"><span id="ljavascript-8"><a href="#" onclick="javascript:showPlainTxt('javascript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-8">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span>document<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This piece of code is a pretty basic part of jQuery (from what I understand).  It is a wrapper (of sorts) that you put around the rest of your code.  It's sort of like <strong>window.onload()</strong> only better. <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-grin.gif' alt=':biggrin:' class='wp-smiley' /> It makes your code available as soon as the DOM has finished loading.  This means that your code can be executed before any images you have on the page while <strong>window.onload()</strong> doesn't (at least I think that's the case ... I'm no javascript expert).</p>
<div class="igBar"><span id="ljavascript-9"><a href="#" onclick="javascript:showPlainTxt('javascript-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-9">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// add your text or image to the end of the link</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"a.external"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"*"</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This does what the comment says it does.  It finds all of the links that have a class of "external" and adds the text (or image code) to the end of it.</p>
<div class="igBar"><span id="ljavascript-10"><a href="#" onclick="javascript:showPlainTxt('javascript-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-10">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900; font-style: italic;">// make the link open in a new window</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"a.external"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; window.<span style="color: #000066;">open</span><span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">href</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This code binds the custom "click" function to the links that have a class of "external".  The custom function just opens the url that is in the href attribute in a new window.  The <strong>return false</strong> just keeps the current browser window from following the link.</p>
<p>That's it.  It's that simple.  I really hope I didn't confuse you completely with my explanation.  I also hope that I did the jQuery justice by explaining it the way I did (hopefully correctly).  I'm going to try working this into this site some time soon ... at least the image indicators.  </p>
<p>I may be doing more posts like this in the future as I find other tidbits that I find useful.  They might be simple like this one is, and they may be more complex.  It just depends on what I find useful.  So consider yourself warned. <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-razz3.gif' alt=':razz2:' class='wp-smiley' /> </p>
<p><strong>Side note:</strong> Wow.  This is my third post (here) today.  And I even posted an entry on <a href="http://newme.hightechredneckwoman.com/" target="external">my other blog</a>.  That makes this my <strong>fourth</strong> post in one day.  I think this is some sort of record.  LOL</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2009/01/15/jquery-tips-external-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Warning: Geeky Content Coming Soon</title>
		<link>http://www.hightechredneckwoman.com/2009/01/15/warning-geeky-content-coming-soon/</link>
		<comments>http://www.hightechredneckwoman.com/2009/01/15/warning-geeky-content-coming-soon/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 18:22:29 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/2009/01/15/warning-geeky-content-coming-soon/</guid>
		<description><![CDATA[<p>I thought I'd give you a heads up ... a warning of sorts.  I plan on writing up some pretty geeky posts in the near future.  </p>
<p>At work, they use jQuery.  In my spare time this week (which there has been too much of for my taste), I've been reading up on the subject.  I'm liking what I've learned this far. </p>
<p>I thought I'd write up some posts with some tips and tricks ... both &#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>I thought I'd give you a heads up ... a warning of sorts.  I plan on writing up some pretty geeky posts in the near future.  </p>
<p>At work, they use jQuery.  In my spare time this week (which there has been too much of for my taste), I've been reading up on the subject.  I'm liking what I've learned this far. </p>
<p>I thought I'd write up some posts with some tips and tricks ... both for me to look back on and hopefully to help others too. They'll be pretty basic to start with but might get more in-depth later on. </p>
<p>That's enough for now. It's frickin' hard to type on this little keyboard (on my iPod Touch).  I'll try to write up my first post on this subject tonite, so consider yourself warned. <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2009/01/15/warning-geeky-content-coming-soon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What should I do with it?</title>
		<link>http://www.hightechredneckwoman.com/2009/01/13/what-should-i-do-with-it/</link>
		<comments>http://www.hightechredneckwoman.com/2009/01/13/what-should-i-do-with-it/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 00:54:50 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=697</guid>
		<description><![CDATA[<p>After I <a href="http://www.hightechredneckwoman.com/2008/10/10/not-sure-where-to-start/">lost my job back in October</a>, I bought a domain for my resume (it's my full name).  I wanted to put my resume online so I could point potential employers to it, and I didn't want to put it on a subdomain of this domain (that just didn't sound professional ... resume.hightechredneckwoman.com? Nope.).  As of right now, it has my resume, my portfolio, background info, a letter of recommendation, and a contact &#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>After I <a href="http://www.hightechredneckwoman.com/2008/10/10/not-sure-where-to-start/">lost my job back in October</a>, I bought a domain for my resume (it's my full name).  I wanted to put my resume online so I could point potential employers to it, and I didn't want to put it on a subdomain of this domain (that just didn't sound professional ... resume.hightechredneckwoman.com? Nope.).  As of right now, it has my resume, my portfolio, background info, a letter of recommendation, and a contact form.  I want to keep this website as my "professional" site, but I want to do more with it.</p>
<p>All that I know that I wanna do as of now is redesign the layout.  I also want to add more to it to make it more of an asset for getting a job.  One thing I was thinking of adding was a page/section with some code samples.  But other than that, I'm not sure what else to add.  I want it to be a showcase of what I can do.  After all, my current chosen career path <strong><em>IS</em></strong> web development/programming.  And I want to stay in this career path for as long as I can.</p>
<p>So this is where you, faithful readers, come in.  What do you think I should add to the site?  Do you have a professional site of your own?  What do you have on it?  I'm looking for ideas as to how to improve mine.  That and I miss working in php (since I don't get to at work). <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/G-grin.gif' alt=':biggrin:' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2009/01/13/what-should-i-do-with-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inspiration needed</title>
		<link>http://www.hightechredneckwoman.com/2008/11/07/inspiration-needed/</link>
		<comments>http://www.hightechredneckwoman.com/2008/11/07/inspiration-needed/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 16:20:20 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[distractions]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=496</guid>
		<description><![CDATA[<p>I need some help from you, faithful readers (I know there's at least one of you out there ... LOL).  I need some inspiration.  You see, over the past month, I've determined that I'm more happy during the day if I'm coding.  When I was putting up my resume website and working on the redesign of this site, I was definitely in a better mood.  On days where I'm not coding, it's not good.  I'm &#160;[&#8230;]</p>]]></description>
			<content:encoded><![CDATA[<p>I need some help from you, faithful readers (I know there's at least one of you out there ... LOL).  I need some inspiration.  You see, over the past month, I've determined that I'm more happy during the day if I'm coding.  When I was putting up my resume website and working on the redesign of this site, I was definitely in a better mood.  On days where I'm not coding, it's not good.  I'm usually found on the couch staring at the tv.  Not a pretty sight.  </p>
<p>So, while I'm waiting to find my next job, I need something to occupy my time during the day ... a new project.  I've had a couple ideas, but nothing has lit a fire under my ass yet.  One idea I had was for a weather script that I could turn into a WordPress plugin.  I had a weather script for quite some time, but I took it offline when I cleaned up my other domain.  Another idea I had was to put together a racing website.  I've had a few in the past, each devoted to a single driver.  This time around, I was going to make a generic racing site that had info on all drivers in the series.  I also thought about adding a page where visiters could create an account and select up to 3 drivers to view info for each time they came to the site, if they were logged in. </p>
<p>What I need from you, faithful readers ... or what I'm hoping you'll provide ... are some ideas for things for me to work on.  Perhaps an idea for a WordPress plugin that hasn't yet been done (or that could be improved upon), or some other functionality for any website.  Or should I dive into either the weather script or racing website?  Help me find a reason to get up in the mornings until I find my next job.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2008/11/07/inspiration-needed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optional should be OPTIONAL</title>
		<link>http://www.hightechredneckwoman.com/2008/05/23/optional-should-be-optional/</link>
		<comments>http://www.hightechredneckwoman.com/2008/05/23/optional-should-be-optional/#comments</comments>
		<pubDate>Fri, 23 May 2008 22:48:39 +0000</pubDate>
		<dc:creator>Becky</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.hightechredneckwoman.com/?p=271</guid>
		<description><![CDATA[<p>Yesterday and today, I've been working on some changes to our discount system (at work).  The majority of the changes dealt with the (mssql) database ... stored procedures and user defined functions (ufn).  One of the changes was to get the shopping cart subtotal based on different criteria ... </p>
<ul>
<li>If the shopping cart had an order-level discount in it, and that discount was set up to override any discount exclusions that were set up, the </li>&#160;[&#8230;]</ul>]]></description>
			<content:encoded><![CDATA[<p>Yesterday and today, I've been working on some changes to our discount system (at work).  The majority of the changes dealt with the (mssql) database ... stored procedures and user defined functions (ufn).  One of the changes was to get the shopping cart subtotal based on different criteria ... </p>
<ul>
<li>If the shopping cart had an order-level discount in it, and that discount was set up to override any discount exclusions that were set up, the subtotal calculation needed to only exclude those products where the exclusion wasn't allowed to be overridden.</li>
<li>If the shopping cart had an order-level discount in it, and that discount was NOT set up to override any discount exclusions that were set up, the subtotal calculation needed to exclude ALL products that had exclusions set up.</li>
</ul>
<p>We have a ufn set up to calculate the order subtotal.  This ufn is already taking into account the discount exclusions.  But with my changes, I needed it to now look at the exclusion overrides.  I was hoping that ufn's allowed for optional parameters like php functions do.  So I set up a little test to see ...</p>
<div class="igBar"><span id="lsql-14"><a href="#" onclick="javascript:showPlainTxt('sql-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-14">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">FUNCTION</span> <span style="color:#006600; font-weight:bold;">&#91;</span>dbo<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#006600; font-weight:bold;">&#91;</span>ufn_MyTest<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#40;</span>@Param1 int, @Param2 int = <span style="color: #993333; font-weight: bold;">NULL</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RETURNS varchar<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #cc66cc;color:#800000;">500</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">AS</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">BEGIN</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; DECLARE @MyVariable varchar<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #cc66cc;color:#800000;">500</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">IF</span> @Param1&gt; <span style="color: #cc66cc;color:#800000;">10</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">SET</span> @MyVariable = <span style="color: #ff0000;">'Incoming parameter #1 is greater than 10.'</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ELSE</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">SET</span> @MyVariable = <span style="color: #ff0000;">'Incoming parameter #1 is less than 10.'</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">IF</span> @Param2 <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; BEGIN</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">IF</span> @Param2&gt; <span style="color: #cc66cc;color:#800000;">10</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">SET</span> @MyVariable = @MyVariable + <span style="color: #ff0000;">' Incoming parameter #2 is greater than 10.'</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELSE</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">SET</span> @MyVariable = @MyVariable + <span style="color: #ff0000;">' Incoming parameter #2 is less than 10.'</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; END</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #993333; font-weight: bold;">RETURN</span> @MyVariable</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">END </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The database let me create the function, so I was hopeful that this was gonna work.  So I tried executing my little ufn ...</p>
<div class="igBar"><span id="lsql-15"><a href="#" onclick="javascript:showPlainTxt('sql-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-15">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">SELECT</span> dbo.ufn_MyTest<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #cc66cc;color:#800000;">8</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>But that didn't work.  It gave me an error ...</p>
<p><code>An insufficient number of arguments were supplied for the procedure or function dbo.ufn_myTest.</code></p>
<p>What?  Come on.  That second parameter is set up to be optional.  So I did some searching and found this tidbit ...</p>
<blockquote><p>from the MSSQL manual<br />
When a parameter of the function has a default value, the keyword "default" must be specified when calling the function in order to get the default value. This behavior is different from parameters with default values in stored procedures in which omitting the parameter also implies the default value.</p></blockquote>
<p>Grrr!!  <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/banghead.gif' alt=':banghead:' class='wp-smiley' /> So I tried this ...</p>
<div class="igBar"><span id="lsql-16"><a href="#" onclick="javascript:showPlainTxt('sql-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-16">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">SELECT</span> dbo.ufn_MyTest<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #cc66cc;color:#800000;">8</span>, <span style="color: #993333; font-weight: bold;">DEFAULT</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>THAT worked.  But doesn't that kind of defeat the purpose of having an "optional" parameter.  When I think "optional", I see that as meaning that the parameter doesn't have to be passed or it can be, depending on the situation.  If I have to put 'DEFAULT' in it's place, that doesn't make it optional.  I could just as well pass in the "optional" value.  </p>
<p>To fix my little conundrum, I created a separate ufn and called the appropriate one based on the parameter that I had wanted to pass in as an optional one.  That worked like a charm.  I just wish that Microsoft would have set up mssql ufn's to accept truly optional parameters.  But I guess I'm not surprised.  It is Microsoft after all.   <img src='http://www.hightechredneckwoman.com/wp-includes/images/smilies/neener.gif' alt=':nahnah:' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hightechredneckwoman.com/2008/05/23/optional-should-be-optional/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

