<?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>REVERT TO CONSOLE &#187; Steve</title>
	<atom:link href="http://www.reverttoconsole.com/blog/author/eokuwwy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.reverttoconsole.com</link>
	<description>for f in *;do echo &#124; sed &#039;i\rtc&#039; &#62;&#62; $f;done; java programming et al</description>
	<lastBuildDate>Thu, 25 Aug 2011 15:02:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Command Line Dictionary Using Groovy WS</title>
		<link>http://www.reverttoconsole.com/blog/general/command-line-dictionary-using-groovy-ws/</link>
		<comments>http://www.reverttoconsole.com/blog/general/command-line-dictionary-using-groovy-ws/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 22:37:18 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[dictionary command line groovy groovyws ws client bash]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=1015</guid>
		<description><![CDATA[Alas, another 15 years has passed since I&#8217;ve last posted. This time it was prompted by a fairly simple need: to lookup a word via the command line. Now, I already had a very simple solution to this using WordNet. That is simple enough: sudo apt-get install wordnet Then simply type: wn hello -over You [...]]]></description>
			<content:encoded><![CDATA[<p>Alas, another 15 years has passed since I&#8217;ve last posted.  This time it was prompted by a fairly simple need: to lookup a word via the command line.  Now, I already had a very simple solution to this using <a href="http://wordnet.princeton.edu/">WordNet</a>.  That is simple enough:</p>
<pre>
sudo apt-get install wordnet
</pre>
<p>Then simply type:</p>
<pre>
wn hello -over
</pre>
<p>You should see output similar to this:</p>
<p>Overview of noun hello</p>
<p>The noun hello has 1 sense (first 1 from tagged texts)</p>
<p>1. (1) hello, hullo, hi, howdy, how-do-you-do &#8212; (an expression of greeting; &#8220;every morning they exchanged polite hellos&#8221;)</p>
<p>That&#8217;s all well and good, until I typed this:</p>
<pre>wn smote -over</pre>
<p>And came up empty.  Indeed WordNet is useful but it is limited.  There are 2 solutions that immediately came to mind.	</p>
<ol>
<li>Figure out how to get more definitions loaded into my instance of WordNet</li>
<li>Find a dictionary service that is much more comprehensive than WordNet, and write a client for it</li>
</ol>
<p>After a couple of quick Google searches I decided on the latter.  And, since I&#8217;ve been doing a fair amount of Grails work lately, I thought, why not try this in Groovy?</p>
<p>One of those Google searches brought me to <a href="http://services.aonaware.com/DictService/">http://services.aonaware.com/DictService/</a>.  After a few trials with the simple front-end on the page, I was satisfied.  Then it was time to find a Groovy example, which I found quickly enough with <a href="http://groovy.codehaus.org/GroovyWS">Groovy WS</a>.</p>
<p>If you look at the code snippet on that page, it is incredibly simple.</p>
<pre>
@Grab(group='org.codehaus.groovy.modules', module='groovyws', version='0.5.2')
import groovyx.net.ws.WSClient

proxy = new WSClient("http://www.w3schools.com/webservices/tempconvert.asmx?WSDL", this.class.classLoader)
proxy.initialize()

result = proxy.CelsiusToFahrenheit(0)
println "You are probably freezing at ${result} degrees Farhenheit"
</pre>
<p>I tried this example as is, but seemed to have problems with the annotation at the top.  Being rather impatient, I found a Groovy WS Standalone jar here at:<br />
<a href="http://snapshots.dist.codehaus.org/groovy/distributions/groovyws/groovyws-standalone-0.5-SNAPSHOT.jar">http://snapshots.dist.codehaus.org/groovy/distributions/groovyws/groovyws-standalone-0.5-SNAPSHOT.jar</a></p>
<p>I dropped it into my $GROOVY_HOME/lib directory, and then removed the annotation from the code.  The example worked perfectly.</p>
<p>So, using the <a href="http://services.aonaware.com/DictService/DictService.asmx?WSDL">WSDL</a> from the service I mentioned earlier, I made a few modifications and named it Pablo.groovy.  Why Pablo?  Why not?  When speed counts, who cares?!</p>
<pre>
import groovyx.net.ws.WSClient

proxy = new WSClient("http://services.aonaware.com/DictService/DictService.asmx?WSDL", this.class.classLoader)
proxy.initialize()

//Define is a name of the service method, see the service WSDL
result = proxy.Define(args[0])

if(result != null) {
	for(defin in result.definitions.definition) {
		println "${defin.wordDefinition}"
	}
}
</pre>
<p>I needed to analyze the WSDL to figure out how to interpret the results, but other than that, it was a pleasantly pain-free experience.</p>
<p>Now I type:</p>
<pre>groovy Pablo.groovy smote</pre>
<p>And I get a much more satisfying result, save the logging garbage at the top!</p>
<p>Jul 18, 2011 5:11:29 PM org.apache.cxf.endpoint.dynamic.DynamicClientFactory outputDebug<br />
INFO: Created classes: com.aonaware.services.webservices.ArrayOfDefinition, com.aonaware.services.webservices.ArrayOfDictionary, com.aonaware.services.webservices.ArrayOfDictionaryWord, com.aonaware.services.webservices.ArrayOfStrategy, com.aonaware.services.webservices.Define, com.aonaware.services.webservices.DefineInDict, com.aonaware.services.webservices.DefineInDictResponse, com.aonaware.services.webservices.DefineResponse, com.aonaware.services.webservices.Definition, com.aonaware.services.webservices.Dictionary, com.aonaware.services.webservices.DictionaryInfo, com.aonaware.services.webservices.DictionaryInfoResponse, com.aonaware.services.webservices.DictionaryList, com.aonaware.services.webservices.DictionaryListExtended, com.aonaware.services.webservices.DictionaryListExtendedResponse, com.aonaware.services.webservices.DictionaryListResponse, com.aonaware.services.webservices.DictionaryWord, com.aonaware.services.webservices.Match, com.aonaware.services.webservices.MatchInDict, com.aonaware.services.webservices.MatchInDictResponse, com.aonaware.services.webservices.MatchResponse, com.aonaware.services.webservices.ObjectFactory, com.aonaware.services.webservices.ServerInfo, com.aonaware.services.webservices.ServerInfoResponse, com.aonaware.services.webservices.Strategy, com.aonaware.services.webservices.StrategyList, com.aonaware.services.webservices.StrategyListResponse, com.aonaware.services.webservices.WordDefinition<br />
Jul 18, 2011 5:11:30 PM groovyx.net.ws.AbstractCXFWSClient getBindingOperationInfo<br />
WARNING:  Using SOAP version: 1.1<br />
Smite \Smite\ (sm[imac]t), v. t. [imp. {Smote} (sm[=o]t), rarely<br />
   {Smit} (sm[i^]t); p. p. {Smitten} (sm[i^]t&#8221;t&#8217;n), rarely<br />
   {Smit}, or {Smote}; p. pr. &#038; vb. n. {Smiting}<br />
   (sm[imac]t&#8221;[i^]ng).] [AS. sm[=i]tan to smite, to soil,<br />
   pollute; akin to OFries. sm[=i]ta to smite, LG. smiten, D.<br />
   smijten, G. schmeissen, OHG. sm[=i]zan to smear, stroke, OSw.<br />
   &#038; dial. Sw. smita to smite, Dan. smide to throw, Goth.<br />
   bismeitan, to anoint, besmear; cf. Skr. m[=e]d to be fat. The<br />
   original sense seems to have been, to daub on, to smear. Cf.<br />
   {Smut}.]<br />
   1. To strike; to inflict a blow upon with the hand, or with<br />
      any instrument held in the hand, or with a missile thrown<br />
      by the hand; as, to smite with the fist, with a rod,<br />
      sword, spear, or stone.<br />
      [1913 Webster]</p>
<p>Now to smote the logging and be rid of it; simply adding these few lines will do:</p>
<pre>
import java.util.logging.Level
import java.util.logging.LogManager

LogManager.getLogManager().getLogger("").setLevel(Level.SEVERE)
</pre>
<p>Now the output is as tidy as I want it to be for now.</p>
<p>$ groovy Pablo.groovy smote<br />
Smite \Smite\ (sm[imac]t), v. t. [imp. {Smote} (sm[=o]t), rarely<br />
   {Smit} (sm[i^]t); p. p. {Smitten} (sm[i^]t&#8221;t&#8217;n), rarely<br />
   {Smit}, or {Smote}; p. pr. &#038; vb. n. {Smiting}<br />
   (sm[imac]t&#8221;[i^]ng).] [AS. sm[=i]tan to smite, to soil,<br />
   pollute; akin to OFries. sm[=i]ta to smite, LG. smiten, D.<br />
   smijten, G. schmeissen, OHG. sm[=i]zan to smear, stroke, OSw.<br />
   &#038; dial. Sw. smita to smite, Dan. smide to throw, Goth.<br />
   bismeitan, to anoint, besmear; cf. Skr. m[=e]d to be fat. The<br />
   original sense seems to have been, to daub on, to smear. Cf.<br />
   {Smut}.]<br />
   1. To strike; to inflict a blow upon with the hand, or with<br />
      any instrument held in the hand, or with a missile thrown<br />
      by the hand; as, to smite with the fist, with a rod,<br />
      sword, spear, or stone.<br />
      [1913 Webster]</p>
<p>            Whosoever shall smite thee on thy right cheek, turn<br />
            to him the other also.                &#8211;Matt. v. 39.<br />
      [1913 Webster]</p>
<p>            And David . . . took thence a stone, and slang it,<br />
            and smote the Philistine in his forehead. &#8211;1 Sam.<br />
                                                  xvii. 49.<br />
      [1913 Webster]</p>
<p>   2. To cause to strike; to use as an instrument in striking or<br />
      hurling.<br />
      [1913 Webster]</p>
<p>            Prophesy, and smite thine hands together. &#8211;Ezek.<br />
                                                  xxi. 14.<br />
      [1913 Webster]</p>
<p>            Saul . . . smote the javelin into the wall. &#8211;1 Sam.<br />
                                                  xix. 10.<br />
      [1913 Webster]</p>
<p>   3. To destroy the life of by beating, or by weapons of any<br />
      kind; to slay by a blow; to kill; as, to smite one with<br />
      the sword, or with an arrow or other instrument.<br />
      [1913 Webster]</p>
<p>   4. To put to rout in battle; to overthrow by war.<br />
      [1913 Webster]</p>
<p>   5. To blast; to destroy the life or vigor of, as by a stroke<br />
      or by some visitation.<br />
      [1913 Webster]</p>
<p>            The flax and the barly was smitten.   &#8211;Ex. ix. 31.<br />
      [1913 Webster]</p>
<p>   6. To afflict; to chasten; to punish.<br />
      [1913 Webster]</p>
<p>            Let us not mistake God&#8217;s goodness, nor imagine,<br />
            because he smites us, that we are forsaken by him.<br />
                                                  &#8211;Wake.<br />
      [1913 Webster]</p>
<p>   7. To strike or affect with passion, as love or fear.<br />
      [1913 Webster]</p>
<p>            The charms that smite the simple heart. &#8211;Pope.<br />
      [1913 Webster]</p>
<p>            Smit with the love of sister arts we came. &#8211;Pope.<br />
      [1913 Webster]</p>
<p>   {To smite off}, to cut off.</p>
<p>   {To smite out}, to knock out, as a tooth. &#8211;Exod. xxi. 27.</p>
<p>   {To smite with the tongue}, to reproach or upbraid; to<br />
      revile. [Obs.] &#8211;Jer. xviii. 18.<br />
      [1913 Webster]</p>
<p>Smite \Smite\ (sm[imac]t), v. t. [imp. {Smote} (sm[=o]t), rarely<br />
   {Smit} (sm[i^]t); p. p. {Smitten} (sm[i^]t&#8221;t&#8217;n), rarely<br />
   {Smit}, or {Smote}; p. pr. &#038; vb. n. {Smiting}<br />
   (sm[imac]t&#8221;[i^]ng).] [AS. sm[=i]tan to smite, to soil,<br />
   pollute; akin to OFries. sm[=i]ta to smite, LG. smiten, D.<br />
   smijten, G. schmeissen, OHG. sm[=i]zan to smear, stroke, OSw.<br />
   &#038; dial. Sw. smita to smite, Dan. smide to throw, Goth.<br />
   bismeitan, to anoint, besmear; cf. Skr. m[=e]d to be fat. The<br />
   original sense seems to have been, to daub on, to smear. Cf.<br />
   {Smut}.]<br />
   1. To strike; to inflict a blow upon with the hand, or with<br />
      any instrument held in the hand, or with a missile thrown<br />
      by the hand; as, to smite with the fist, with a rod,<br />
      sword, spear, or stone.<br />
      [1913 Webster]</p>
<p>            Whosoever shall smite thee on thy right cheek, turn<br />
            to him the other also.                &#8211;Matt. v. 39.<br />
      [1913 Webster]</p>
<p>            And David . . . took thence a stone, and slang it,<br />
            and smote the Philistine in his forehead. &#8211;1 Sam.<br />
                                                  xvii. 49.<br />
      [1913 Webster]</p>
<p>   2. To cause to strike; to use as an instrument in striking or<br />
      hurling.<br />
      [1913 Webster]</p>
<p>            Prophesy, and smite thine hands together. &#8211;Ezek.<br />
                                                  xxi. 14.<br />
      [1913 Webster]</p>
<p>            Saul . . . smote the javelin into the wall. &#8211;1 Sam.<br />
                                                  xix. 10.<br />
      [1913 Webster]</p>
<p>   3. To destroy the life of by beating, or by weapons of any<br />
      kind; to slay by a blow; to kill; as, to smite one with<br />
      the sword, or with an arrow or other instrument.<br />
      [1913 Webster]</p>
<p>   4. To put to rout in battle; to overthrow by war.<br />
      [1913 Webster]</p>
<p>   5. To blast; to destroy the life or vigor of, as by a stroke<br />
      or by some visitation.<br />
      [1913 Webster]</p>
<p>            The flax and the barly was smitten.   &#8211;Ex. ix. 31.<br />
      [1913 Webster]</p>
<p>   6. To afflict; to chasten; to punish.<br />
      [1913 Webster]</p>
<p>            Let us not mistake God&#8217;s goodness, nor imagine,<br />
            because he smites us, that we are forsaken by him.<br />
                                                  &#8211;Wake.<br />
      [1913 Webster]</p>
<p>   7. To strike or affect with passion, as love or fear.<br />
      [1913 Webster]</p>
<p>            The charms that smite the simple heart. &#8211;Pope.<br />
      [1913 Webster]</p>
<p>            Smit with the love of sister arts we came. &#8211;Pope.<br />
      [1913 Webster]</p>
<p>   {To smite off}, to cut off.</p>
<p>   {To smite out}, to knock out, as a tooth. &#8211;Exod. xxi. 27.</p>
<p>   {To smite with the tongue}, to reproach or upbraid; to<br />
      revile. [Obs.] &#8211;Jer. xviii. 18.<br />
      [1913 Webster]</p>
<p>Smote \Smote\,<br />
   imp. (&#038; rare p. p.) of {Smite}.<br />
   [1913 Webster]</p>
<p>smite<br />
     v 1: inflict a heavy blow on, with the hand, a tool, or a weapon<br />
     2: affect suddenly with deep feeling; &#8220;He was smitten with love<br />
        for this young girl&#8221;<br />
     3: cause pain or suffering in; &#8220;afflict with the plague&#8221;; &#8220;That<br />
        debasement of the verbal currency that afflicts terms used<br />
        in advertisement&#8221; [syn: {afflict}]<br />
     [also: {smote}, {smitten}, {smit}]</p>
<p>smote<br />
     See {smite}</p>
<p>The results are lengthy, but for right now, it&#8217;s all that I want.  And nay, I shan&#8217;t complain!</p>
<p>It was quick and easy, and as long as I use it less than several thousand times per day, I am operating well within the <a href="http://services.aonaware.com/DictService/tos.htm">terms of service</a>.</p>
<p>Till next time!</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fcommand-line-dictionary-using-groovy-ws%2F&amp;title=Command+Line+Dictionary+Using+Groovy+WS" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fcommand-line-dictionary-using-groovy-ws%2F&amp;title=Command+Line+Dictionary+Using+Groovy+WS" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fcommand-line-dictionary-using-groovy-ws%2F&amp;title=Command+Line+Dictionary+Using+Groovy+WS" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fcommand-line-dictionary-using-groovy-ws%2F&amp;title=Command+Line+Dictionary+Using+Groovy+WS" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fcommand-line-dictionary-using-groovy-ws%2F&amp;title=Command+Line+Dictionary+Using+Groovy+WS', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fcommand-line-dictionary-using-groovy-ws%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fcommand-line-dictionary-using-groovy-ws%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fcommand-line-dictionary-using-groovy-ws%2F&amp;title=Command+Line+Dictionary+Using+Groovy+WS" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fcommand-line-dictionary-using-groovy-ws%2F&amp;title=Command+Line+Dictionary+Using+Groovy+WS" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/general/command-line-dictionary-using-groovy-ws/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Twitter Mode for Emacs &#8211; With OAuth</title>
		<link>http://www.reverttoconsole.com/blog/linux/twitter-mode-for-emacs-with-oauth/</link>
		<comments>http://www.reverttoconsole.com/blog/linux/twitter-mode-for-emacs-with-oauth/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 15:12:41 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cygwin]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=639</guid>
		<description><![CDATA[Twitter&#8217;s recent removal of basic authentication eliminated the ability to use quick and dirty methods of posting tweets and viewing timelines, such as via the command-line with cURL. There is one twitter mode, twitel.el, that I had already been using. Supposedly it can handle OAuth through the emacs-oauth package, with some minor custom tweaks to [...]]]></description>
			<content:encoded><![CDATA[<p>Twitter&#8217;s recent removal of basic authentication eliminated the ability to use quick and dirty methods of posting tweets and viewing timelines, such as via the command-line with cURL.  There is one twitter mode, <a href="http://www.busydoingnothing.co.uk/twitel/">twitel.el</a>, that I had already been using. Supposedly it can handle OAuth through the <a href="http://github.com/psanford/emacs-oauth/">emacs-oauth</a> package, with some minor custom tweaks to the oauth.el file.  Unfortunately, I was unable to get this to work.</p>
<p>Then I found <a href="http://www.emacswiki.org/emacs/TwitteringMode">twittering-mode.el</a>.</p>
<p>This is a cakewalk to install and use!</p>
<p>You simply need to follow the few basic instructions from the wiki here: <a href="http://www.emacswiki.org/emacs/TwitteringMode">http://www.emacswiki.org/emacs/TwitteringMode</a></p>
<p>When you run twittering-mode for the first time, you will be prompted to login to the twmode twitter app (via a browser).  Enter your credentials and you will receive a pin, which you will then enter into the next prompt from the mode.  The OAuth authentication requirements are satisfied by use of the twmode twitter app.</p>
<p>Easy peasy, as some of you would probably say.</p>
<p>UPDATE</p>
<p>To avoid repeatedly retrieving and entering a pin, you can store the encrypted tokens in a local file by enabling:<br />
(setq twittering-use-master-password t)</p>
<p>At this time, you need to download the latest .el file (from the HEAD branch) in order to get this to work:<br />
<a href="http://github.com/hayamiz/twittering-mode/raw/master/twittering-mode.el">http://github.com/hayamiz/twittering-mode/raw/master/twittering-mode.el</a></p>
<p>Enter the mode and follow the prompts to set the master password.</p>
<p>Then, instead of needing to get and enter pins from the twmode twitter app, you simply enter the master password.</p>
<p>For more info on this, see <a href="http://github.com/hayamiz/twittering-mode/blob/master/NEWS">http://github.com/hayamiz/twittering-mode/blob/master/NEWS</a>.</p>
<p>Cheers!</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Ftwitter-mode-for-emacs-with-oauth%2F&amp;title=Twitter+Mode+for+Emacs+%26%238211%3B+With+OAuth" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Ftwitter-mode-for-emacs-with-oauth%2F&amp;title=Twitter+Mode+for+Emacs+%26%238211%3B+With+OAuth" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Ftwitter-mode-for-emacs-with-oauth%2F&amp;title=Twitter+Mode+for+Emacs+%26%238211%3B+With+OAuth" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Ftwitter-mode-for-emacs-with-oauth%2F&amp;title=Twitter+Mode+for+Emacs+%26%238211%3B+With+OAuth" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Ftwitter-mode-for-emacs-with-oauth%2F&amp;title=Twitter+Mode+for+Emacs+%26%238211%3B+With+OAuth', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Ftwitter-mode-for-emacs-with-oauth%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Ftwitter-mode-for-emacs-with-oauth%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Ftwitter-mode-for-emacs-with-oauth%2F&amp;title=Twitter+Mode+for+Emacs+%26%238211%3B+With+OAuth" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Ftwitter-mode-for-emacs-with-oauth%2F&amp;title=Twitter+Mode+for+Emacs+%26%238211%3B+With+OAuth" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/linux/twitter-mode-for-emacs-with-oauth/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Simple Processes: Bash vs. Python &#8211; &#8220;A No-Brainer&#8221;</title>
		<link>http://www.reverttoconsole.com/blog/linux/simple-tasks-bash-vs-python-a-no-brainer/</link>
		<comments>http://www.reverttoconsole.com/blog/linux/simple-tasks-bash-vs-python-a-no-brainer/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 05:15:19 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[xmms2 scripts track length]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=535</guid>
		<description><![CDATA[I haven&#8217;t posted in about 5 billion years. Well, it seems like that anyway. As I sit here partying with my laptop on a Friday night, I&#8217;ve been wondering how to display the track length of the current track that xmms2 is playing, without having to use the &#8220;xmms2 status&#8221; command. Yes, I listen to [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted in about 5 billion years.  Well, it seems like that anyway.  As I sit here partying with my laptop on a Friday night, I&#8217;ve been wondering how to display the track length of the current track that xmms2 is playing, without having to use the &#8220;xmms2 status&#8221; command.  Yes, I listen to and control all my music via a full-featured music player/manager from the command line (xmms2).  The problem with using the &#8220;status&#8221; command, is that it just prints out a continuous status of what&#8217;s playing and it just keeps going, which is exactly what it&#8217;s supposed to do.  It&#8217;s just like &#8220;tail -f&#8221;, So you have to ctrl-c to get out of it.  Yes. That is my sole motivation for doing this, to avoid ctrl-c.  Well, and maybe to learn a thing or two, but mostly out of defiance of having to use ctrl-c.  </p>
<p>So I figured, hey I know enough bash to at least get something rolling in order to do this.  Of course I had to keep looking stuff up in reference guides and on websites, because there&#8217;s no way I can remember it all.  Basically, it came down to 4 key tools for going the bash route.</p>
<p>1. sed &#8211; to strip brackets, slashes, colons, spaces, and other undesired characters in order to make the strings easier to deal with<br />
2. awk &#8211;  to find the location of decimal points or other characters<br />
3. cut &#8211; to get characters to the left or right of decimal points<br />
4. bc &#8211; to calculate and convert the milliseconds to human readable form </p>
<p>I finally got it to work reliably tonight.<br />
It was a horrid process that took forever.  What a waste of time.  But hey, that&#8217;s all part of the RTC experience!<br />
So here it is, please excuse the bad variable names and sloppiness. I was too pissed to give a ****.<br />
Note: I renamed this to xmms2tracklensafe and cut out all the curse words and tried to put some sense into the comments.</p>
<pre>
#!/bin/bash
tmpfileinfo=xtemp14251.tmp
tmpfile=xtemp91839.tmp
#use xmms2 info here
xmms2 info > $tmpfileinfo
vargrep=$(grep "duration" $tmpfileinfo)
echo $vargrep > $tmpfileinfo
#chopping the brackets, slashes, and spaces out of the string
sed -i 's/\[//g' $tmpfileinfo
sed -i 's/\]//g' $tmpfileinfo
sed -i 's/\///g' $tmpfileinfo
sed -i 's/'\ '//g' $tmpfileinfo
#convert the = to an X, easy to find
sed -i 's/\=/X/g' $tmpfileinfo
#for an mp3 - pluginmaddurationX
sed -i 's/\pluginmaddurationX//g' $tmpfileinfo
#for a flac - pluginflacdurationX
sed -i 's/\pluginflacdurationX//g' $tmpfileinfo
#God knows what other codecs there might be
#prints the time in milliseconds
echo "$(cat $tmpfileinfo) ms"
vargrep2=$(cat $tmpfileinfo)
varx=$vargrep2
#convert the time to minutes
var2=$(echo "$varx/1000/60" | bc -l)
echo $var2 > $tmpfile
#we are left with a fraction of a minute, which occurs after the decimal, we need to find the decimal point
var3=$(awk 'BEGIN { print index('$var2', ".") }')
#get the characters after the decimal point, this is our fraction of a minute
var4=$(cut -c $var3- $tmpfile)
#convert that fraction of a minute into seconds
var5=$(echo "scale=1; $var4*60" | bc -l | xargs printf "%1.0f")
#simply subtracting a 1 from the index of the decimal point, to be used in order to retrieve the number left of the decimal
varcut=$(echo "$var3 - 1" | bc -l | xargs printf "%1.0f")
#gets the number to the left of the decimal
var6=$(cut -c -$varcut $tmpfile)
#now we need to deal with the decimal in the number that has been converted to seconds
var7=$(awk 'BEGIN { print index('$var5', ".") }')
varcut2=1
#I honestly don't remember why I did this.  I think I needed it before I started adding | xargs printf "%1.0f"
if [ "0" != $var7 ]
	then
		varcut2=$(echo "$var7 - 1" | bc -l | xargs printf "%1.0f")
fi

echo $var5 > $tmpfile
#now we get the seconds as a whole number, by getting the characters left of the decimal
var8=$(cut -c -$varcut2 $tmpfile)
var8=$(cat $tmpfile)

#need to prepend a 0 to the seconds if they are under 10
if [ $var8 -lt 10 ]
	then
		var8="0$var8"
fi

#print out the time in human readable form, minutes : seconds
echo "$var6:$var8"
#clean up the temp files
rm -f $tmpfile
rm -f $tmpfileinfo
</pre>
<p>Wow, what a pain in the pee-hole.  It took me several hours over two nights and I even lost some sleep over it.  So, I decided to try it Jeff&#8217;s way, using Python, since he brags about it so much.  I had never used it before, and now that I have, I think I&#8217;ll be using it a lot!  A lot of you are saying, &#8220;Well yeah, duh. Idiot.&#8221; or something more insulting, and I fully accept that.  In fact, I encourage it!</p>
<p>First, we have the simple bash script that is used to execute the entire process from the command line.</p>
<pre>
#!/bin/bash

tmpfile=assscrambler124524.tmp
xmms2 info > $tmpfile

python ~/scripts/xmms2len.py

rm -f $tmpfile
</pre>
<p>And now we have the giant, complex, and horrendous python script.</p>
<pre>
file = open('./assscrambler124524.tmp')
for line in file:
	if(line.find('duration',0) > -1) :
		#print(line)
		s = line
		searchstr = 'duration = ';
		x = s.rindex(searchstr, 0);
		if(x > -1):
			timeMillis = s[x+len(searchstr):len(s)].strip()
			#print(timeMillis)
			timeConverted = float(timeMillis)/1000/60
			#print(timeConverted);
			stime = str(timeConverted)
			decIndex = stime.rindex('.', 0)
			timeFraction = float(stime[decIndex:len(stime)])
			seconds = int(round(timeFraction*60,0))
			strseconds = str(seconds)
			minutes = stime[0:decIndex]
			strminutes = str(minutes)
			if(seconds < 10) :
				strseconds = '0' + str(seconds)
			print(timeMillis + ' ms\n' + str(minutes) + ':' + strseconds)
			break
</pre>
<p>Wait, that's it?  Just some simple searches, substrings, calculations, easy conversions between types, and that's all?  Not to mention the incredibly easy way to open a file and iterate through its lines.<br />
Now, I commented out some print statements here, and I could have compacted it more, but I wanted it to be reasonably clear.  The point of course, and 95% of you know probably know this already, is that python kicks bash's ass when it comes to things that should be, well, programs.  Of course bash scripts will always have their place, and they are necessary for so many things.  I still love bash and am very fond of it, but from a programming perspective, it just doesn't "cut the mustard", as Jeff would say.</p>
<p>Well, that's it for my exciting Friday night.  Someday I'll get my crap together and talk more about my xmms2 setup, the xmms2 python equalizer, the xmms2 scrobbler for last.fm, and the other scripts I've written for xmms2.</p>
<p>Cya!</p>
<p>My main reference for python: <a href="http://www.astro.ufl.edu/~warner/prog/python.html">http://www.astro.ufl.edu/~warner/prog/python.html</a></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fsimple-tasks-bash-vs-python-a-no-brainer%2F&amp;title=Simple+Processes%3A+Bash+vs.+Python+%26%238211%3B+%26%238220%3BA+No-Brainer%26%238221%3B" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/linux/simple-tasks-bash-vs-python-a-no-brainer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quick command line spell check of a single word or sentence</title>
		<link>http://www.reverttoconsole.com/blog/linux/quick-command-line-spell-check-of-a-single-word-or-sentence/</link>
		<comments>http://www.reverttoconsole.com/blog/linux/quick-command-line-spell-check-of-a-single-word-or-sentence/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 16:43:53 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[cygwin]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=413</guid>
		<description><![CDATA[Here&#8217;s a short bash script, using aspell, to spell check a word or several words from the command line. It&#8217;s simple but effective. If anyone else knows a cleaner or even simpler way, please let us know. #!/bin/bash WORD=$1 TEMPFILE=temp.spell echo $WORD > $TEMPFILE aspell -c $TEMPFILE cat $TEMPFILE rm -f $TEMPFILE rm -f $TEMPFILE.bak [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a short bash script, using aspell, to spell check a word or several words from the command line.  It&#8217;s simple but effective.  If anyone else knows a cleaner or even simpler way, please let us know.</p>
<p><code><br />
#!/bin/bash</p>
<p>WORD=$1<br />
TEMPFILE=temp.spell</p>
<p>echo $WORD > $TEMPFILE<br />
aspell -c $TEMPFILE<br />
cat $TEMPFILE<br />
rm -f $TEMPFILE<br />
rm -f $TEMPFILE.bak<br />
</code></p>
<p>I named this script &#8220;spell&#8221;.  Simply use it like so:<br />
<code><br />
$ spell reccomend<br />
</code></p>
<p>Aspell will run and you can make your changes.<br />
<code><br />
reccomend</p>
<p>1) recommends                           6) commend<br />
2) recommend                            7) recommenced<br />
3) reckoned                             <img src='http://www.reverttoconsole.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> recommended<br />
4) regiment                             9) Redmond<br />
5) recombined                           0) rejoined<br />
i) Ignore                               I) Ignore all<br />
r) Replace                              R) Replace all<br />
a) Add                                  l) Add Lower<br />
b) Abort                                x) Exit<br />
</code></p>
<p>In this case, if I type &#8220;2&#8243;, the correction will be made, aspell will exit and the spelling I chose gets printed out.</p>
<p>Here&#8217;s an example of how to use it with a sentence.<br />
<code><br />
$ spell "I go to the storede and buy beakh clotes"<br />
</code></p>
<p>Now aspell will take you through each misspelled word.  After you finish the corrections it will exit and print out the corrected sentence or series of words.<br />
<code><br />
I go to the store and buy beach clothes<br />
</code></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Fquick-command-line-spell-check-of-a-single-word-or-sentence%2F&amp;title=Quick+command+line+spell+check+of+a+single+word+or+sentence" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/linux/quick-command-line-spell-check-of-a-single-word-or-sentence/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Follow RTC on Twitter</title>
		<link>http://www.reverttoconsole.com/blog/general/follow-rtc-on-twitter/</link>
		<comments>http://www.reverttoconsole.com/blog/general/follow-rtc-on-twitter/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 04:08:08 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=396</guid>
		<description><![CDATA[We only tweet from the console! http://www.twitter.com/reverttoconsole]]></description>
			<content:encoded><![CDATA[<p>We only tweet from the console!</p>
<p><a href="http://www.twitter.com/reverttoconsole">http://www.twitter.com/reverttoconsole</a></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Ffollow-rtc-on-twitter%2F&amp;title=Follow+RTC+on+Twitter" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Ffollow-rtc-on-twitter%2F&amp;title=Follow+RTC+on+Twitter" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Ffollow-rtc-on-twitter%2F&amp;title=Follow+RTC+on+Twitter" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Ffollow-rtc-on-twitter%2F&amp;title=Follow+RTC+on+Twitter" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Ffollow-rtc-on-twitter%2F&amp;title=Follow+RTC+on+Twitter', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Ffollow-rtc-on-twitter%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Ffollow-rtc-on-twitter%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Ffollow-rtc-on-twitter%2F&amp;title=Follow+RTC+on+Twitter" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Ffollow-rtc-on-twitter%2F&amp;title=Follow+RTC+on+Twitter" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/general/follow-rtc-on-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Revert to Console for IM &#8211; Gtalk Example using Mcabber</title>
		<link>http://www.reverttoconsole.com/blog/linux/revert-to-console-for-im-gtalk-example-using-mcabber/</link>
		<comments>http://www.reverttoconsole.com/blog/linux/revert-to-console-for-im-gtalk-example-using-mcabber/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 21:28:05 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.reverttoconsole.com/?p=390</guid>
		<description><![CDATA[I can finally sleep at night now that I have a command-line solution for Google Talk. What&#8217;s needed (for a poor windows user): Mcabber, a jabber client from http://mcabber.com Cygwin, http://cygwin.com Ssh package for cygwin, if you need to install mcabber elsewhere and then connect to it remotely. If cygwin and ssh are new to [...]]]></description>
			<content:encoded><![CDATA[<p>I can finally sleep at night now that I have a command-line solution for Google Talk.</p>
<p>What&#8217;s needed (for a poor windows user):</p>
<ul>
<li>Mcabber, a jabber client from <a title="http://mcabber.com/" href="http://mcabber.com/">http://mcabber.com</a></li>
<li>Cygwin, <a title="cygwin.com" href="http://cygwin.com">http://cygwin.com</a></li>
<li>Ssh package for cygwin, if you need to install mcabber elsewhere and then connect to it remotely.</li>
</ul>
<p>If cygwin and ssh are new to you, <a title="http://inside.mines.edu/~gmurray/HowTo/sshNotes.html" href="http://inside.mines.edu/~gmurray/HowTo/sshNotes.html">read this</a> to get up to speed.</p>
<p>If you are setting up mcabber on a host machine, you&#8217;ll want to setup ssh as a service or daemon on that machine as well.  Use the ssh-host-config script to do that.</p>
<p>Quickly, here&#8217;s how to get going.</p>
<ol>
<li>Get the latest updates for cygwin using the cygwin setup program.  I was missing the latest glib and I didn&#8217;t have pkg-config.</li>
<li>Download the mcabber source from the website.  Run the configure script with no arguments.  Take note of any errors; they are most likely related to missing libraries.  Get these libraries with the cygwin setup program.</li>
<li>Once configure is successful, you should be able to run make, and then make install with no problems.</li>
<li>Create a mcabberrc file in the directory ~/.mcabber, note that the filename is &#8220;mcabberrc&#8221; and not &#8220;.mcabberrc&#8221;.</li>
<li>Put the following into the mcabberrc file to configure it for Google Talk.</li>
</ol>
<p>set username = &lt;your username at gmail dot com&gt;<br />
set server = talk.google.com<br />
set ssl = 1<br />
set ssl_verify = 0<br />
set port = 5223</p>
<p>That&#8217;s all there is to it.  Type mcabber and it should prompt you for your password and then connect.</p>
<p>You&#8217;ll see 3 different &#8220;panes&#8221; or frames and the command prompt at the bottom.  Scroll through your contacts with Page Up and Page Down.  When you&#8217;ve selected a contact, just start typing in the command prompt to send messages.  The program commands start with a &#8220;/&#8221; character, type &#8220;man mcabber&#8221; for a complete list of commands.  If you&#8217;re in mcabber, you can type &#8220;/help&#8221; for help on specific mcabber commands.</p>
<p>That&#8217;s all for now!</p>
<p>-eokuwwy</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Flinux%2Frevert-to-console-for-im-gtalk-example-using-mcabber%2F&amp;title=Revert+to+Console+for+IM+%26%238211%3B+Gtalk+Example+using+Mcabber" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/linux/revert-to-console-for-im-gtalk-example-using-mcabber/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>&#8220;Revert to Console&#8221; for Language Translation</title>
		<link>http://www.reverttoconsole.com/blog/general/revert-to-console-for-language-translation/</link>
		<comments>http://www.reverttoconsole.com/blog/general/revert-to-console-for-language-translation/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 09:05:04 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://reverttoconsole.com/?p=354</guid>
		<description><![CDATA[So you might be sitting around asking yourself, &#8220;Do I really need a web browser or collection of clunky travel dictionaries to translate to and from different languages of the world? Isn&#8217;t there a command line tool that can do the same thing and make my life easier, while making me even more awesome at [...]]]></description>
			<content:encoded><![CDATA[<p>So you might be sitting around asking yourself,<br />
&#8220;Do I really need a web browser or collection of clunky travel dictionaries to translate to and from different languages of the world?  Isn&#8217;t there a command line tool that can do the same thing and make my life easier, while making me even more awesome at the same time?&#8221;</p>
<p>The answer is YES!</p>
<p>The <a href="http://savannah.nongnu.org/projects/twandgtw">Translate Word and Graphical TW project</a> is your gateway to having superior translation capabilities right in your CONSOLE!</p>
<p>Download tw from <a href="http://savannah.nongnu.org/files/?group=twandgtw">http://savannah.nongnu.org/files/?group=twandgtw</a>.<br />
I&#8217;m using tw-0.1.3.tar.bz2.</p>
<p>Major Dependencies<br />
elinks<br />
<a href="http://elinks.or.cz/download">http://elinks.or.cz/download</a><br />
I&#8217;m using elinks-0.11.5.tar.bz2.</p>
<p>I&#8217;m using Cygwin and I was missing the following:<br />
curl<br />
libiconv<br />
util-linux random utils (For the getopt() function)</p>
<p>The above Cygwin packages can easily be obtained through the Cygwin setup program.</p>
<p>1. Extract elinks.  Build it starting with &#8220;sh configure&#8221;.  Then type &#8220;make&#8221;.  After it finishes, type &#8220;make install&#8221;.</p>
<p>2. Repeat step 1 with tw.</p>
<p>3. Type &#8220;tw -h&#8221; to test that everything is installed correctly.</p>
<p>4. If everything went well, try typing &#8220;tw en-es hello&#8221; and you should get the following output:<br />
hello : hola</p>
<p>You&#8217;re all set!  Now you can quickly translate between many languages straight from your bash shell.  Type &#8220;tw -l&#8221; to see a list of &#8220;all&#8221; the languages.</p>
<p>Customized Script for Google Translate</p>
<p>Google&#8217;s translate service is one of the most comprehensive language translators available.  A major benefit of using Google&#8217;s translation service is that you can pass in as much text as you want; simply surround the text with quotes.  Even though tw does not list all of the languages that Google supports, it is still a bash script that parses input parameters, and it does not do any validation.  You can append anything you want to the argument &#8220;translate.google.com&#8221;.  For instance, Croatian is not listed as one of the languages (&#8220;hr&#8221;).  However, all you need to do is append the appropriate language pair to the end of the argument string, like so:<br />
$ tw translate.google.com.en-hr hello<br />
zdravo</p>
<p>To make this a bit more user-friendly, I have created a simple wrapper script (twg) for tw that only uses Google&#8217;s translate service.  It works just like tw, except you do not have to type &#8220;translate.google.com&#8221;.  You only need to put in the language pair.  For example:<br />
$ twg en-es &#8220;Hello World&#8221;<br />
Hola Mundo</p>
<p>Type &#8220;twg -l&#8221; to get a complete list of supported languages. You can find more details about featured languages at <a href="http://www.google.com/help/faq_translation.html#langpairs">http://www.google.com/help/faq_translation.html#langpairs</a>.</p>
<pre>
#!/bin/bash
# author: eokuwwy
# http://reverttoconsole.com
# description: customized tw wrapper script that uses google translate&lt;/code&gt;

if [ &quot;$1&quot; = &quot;-l&quot; ];
then
echo &quot;Arabic=ar&quot;;
echo &quot;Bulgarian=bg&quot;;
echo &quot;Catalan=ca&quot;;
echo &quot;Chinese=zh-cn&quot;;
echo &quot;Chinese=zh-tw&quot;;
echo &quot;Croation=hr&quot;;
echo &quot;Czech=cs&quot;;
echo &quot;Danish=da&quot;;
echo &quot;Dutch=nl&quot;;
echo &quot;English=en&quot;;
echo &quot;Filipino=tl&quot;;
echo &quot;Finnish=fi&quot;;
echo &quot;French=fr&quot;;
echo &quot;German=de&quot;;
echo &quot;Greek=el&quot;;
echo &quot;Hebrew=iw&quot;;
echo &quot;Hindi=hi&quot;;
echo &quot;Indonesian=id&quot;;
echo &quot;Italian=it&quot;;
echo &quot;Japanese=ja&quot;;
echo &quot;Korean=ko&quot;;
echo &quot;Latvian=lv&quot;;
echo &quot;Lithuanian=lt&quot;;
echo &quot;Norwegian=no&quot;;
echo &quot;Polish=pl&quot;;
echo &quot;Portuguese=pt-BR&quot;;
echo &quot;Romanian=ro&quot;;
echo &quot;Russian=ru&quot;;
echo &quot;Serbian=sr&quot;;
echo &quot;Slovak=sk&quot;;
echo &quot;Slovenian=sl&quot;;
echo &quot;Spanish=es&quot;;
echo &quot;Swedish=sv&quot;;
echo &quot;Ukranian=uk&quot;;
echo &quot;Vietnamese=vi&quot;;
elif [ &quot;$1&quot; = &quot;-h&quot; -o -z &quot;$1&quot; ];
then
echo &quot;Usage: twg [sourcelang-destlang (i.e. en-es)] [term]&quot;;
echo &quot;twg -h (shows help)&quot;;
echo &quot;twg -l (shows language list)&quot;;
else
tw translate.google.com.$1 &quot;$2&quot;;
fi
</pre>
<p>Happy command line translation!  Now jailbreak (at your own risk) your iPhone/Blackberry/PDA and put tw on there!</p>
<p>$ twg en-es &#8220;peace out&#8221;<br />
a la paz<br />
-eokuwwy</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Frevert-to-console-for-language-translation%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Frevert-to-console-for-language-translation%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Frevert-to-console-for-language-translation%2F&amp;title=%26%238220%3BRevert+to+Console%26%238221%3B+for+Language+Translation" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/general/revert-to-console-for-language-translation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The DO NOT&#8217;s</title>
		<link>http://www.reverttoconsole.com/blog/rants/the-do-nots/</link>
		<comments>http://www.reverttoconsole.com/blog/rants/the-do-nots/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 13:26:06 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://reverttoconsole.com/?p=302</guid>
		<description><![CDATA[I haven&#8217;t posted in about 8 years or something like that. Besides being lazy and uninspired, I really haven&#8217;t learned anything new or exciting in the past 2 years. I have nothing to share that would be beneficial to all of you. However, some of you may benefit from what I have learned NOT to [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t posted in about 8 years or something like that.  Besides being lazy and uninspired, I really haven&#8217;t learned anything new or exciting in the past 2 years.  I have nothing to share that would be beneficial to all of you.</p>
<p>However, some of you may benefit from what I have learned NOT to do over the past 2 years.  I have learned plenty of &#8220;DO NOT&#8217;s&#8221; over time, but the last 2 years, especially the last 7 months has been the grand festival of &#8220;DO NOT&#8217;s&#8221;.</p>
<p>1. Do not let an &#8220;expert&#8221; with unsubstantiated credentials tell you how to do your job.  Better yet, avoid working with an &#8220;expert&#8221; whenever possible.  These &#8220;experts&#8221; like to talk down to you and blame you for everything that goes wrong.  They never admit to contributing to the problem.  They also insist that his/her approach is the best, even if God (or other supreme being) were to tell him/her that it&#8217;s wrong.  An &#8220;expert&#8221; will try to control you and the project at any cost.  An &#8220;expert&#8221; will no doubt run the project into the ground or into a persistent vegetative state.  If you find yourself working with an &#8220;expert&#8221;, take precautionary measures and have an escape plan.</p>
<p>2. Do not let users perform their daily job duties with an application that is not fully developed or production ready, especially if it&#8217;s not even beta ready.  Don&#8217;t let users rely on an application that is undergoing constant development and hasn&#8217;t even been tested.  Users will no doubt work their dirty little hands into your project and get you to make changes at the drop of the hat, because their jobs depend on it!  Don&#8217;t expect a manager to help you out in this situation.  If things have reached this point, no manager can simply stop this evil cycle.  Now you have a situation where there is a direct impact on the success of the company.  Because the application is not even fully developed or tested, there will already be bugs galore.  The users relying on your application will find even more bugs that stop them in their tracks.  Everything becomes a critical defect.  Trust me, if you get into this situation, you will want to die, because you are already dying a slow and painful death.</p>
<p>3. Do not develop in an environment that has absolutely no process.  You don&#8217;t need to be process gung-ho and implementing CMMi level 5, but you should have some basic sort of SDLC process in place. A development group without processes usually fails to have standards as well.  The &#8220;as long as it works&#8221; mantra comes into play.</p>
<p>In this situation, you will end up with horrible spaghetti code where developers are doing whatever the hell they want.  You will have no ability to monitor code quality.  You might end up with code that looks like it was written by someone who is half-way through their first programming course (CSCI 101).  Hey, they just learned how to write arrays, and want to show off that skill, as much as they can.  Your &#8220;code review&#8221; will take place when you have to take over their project, at which point you&#8217;ll ask yourself, &#8220;What kind of dumbass could possibly write this &#038;*@%!@#!!!????&#8221;  Of course by then the bad code has permeated its way into the deep inner bowels of the application, like a virus, making it nearly impossible to correct without throwing it all away and rewriting from scratch.  It&#8217;s sort of like when Windows gets jacked-up every year or so and your best solution is to &#8220;format C:&#8221; and start over.</p>
<p>In addition, the extent of your QA will probably be limited to the success of your compiler and a few keystrokes and mouse clicks.</p>
<p>no process = bad applications (hopefully most of you know that already)</p>
<p>4. Do not get involved in a project where a phone call, simple face-to-face conversation, or a note on your desk from a user is all that is required for you to make a change.  This is closely related to #3, but it&#8217;s worth emphasizing a bit.  You need to have a way to document change requests and prioritize those requests, even if it a simple excel spreadsheet on a shared network drive.  This is just one more way that you can be trampled to death by users.  Not to mention the fact that you are developer and you have no business answering the phone or communicating with a user directly.  That&#8217;s what BA&#8217;s are for.  You lack the people skills required to interact directly with users and you should be damn proud of that.  Additionally, there is great satisfaction to be had when you can make users punch themselves in the face.  By that I mean something like this:</p>
<p>User: &#8220;What is this thing doing?  That&#8217;s not the way it&#8217;s suppose to work!&#8221;<br />
You: &#8220;Yes it is.&#8221;<br />
User: &#8220;No, it&#8217;s not.&#8221;<br />
You: &#8220;Yes it is, you requested it, see?&#8221;<br />
User: &#8220;Ah DAMMIT!&#8221; (punches self in face)</p>
<p>5. Do not succumb to the &#8220;at least we still have jobs&#8221; outlook on your career.  Yes, the economy sucks right now and layoffs suck.  I hate seeing people bringing in boxes to pack up their stuff, especially when they have done a great job at the company for 10, 15, 20 years or more.  That&#8217;s like saying, &#8220;Thanks for all your great years of service, now be a team player and piss off, yeah?&#8221;  There are other things employers will do to cut costs though.  They might squash benefits, slash salaries, and eliminate incentives.  This is especially likely to happen if the executives made stupid decisions (likely in any case) that ran the company into the ground.  You don&#8217;t have to pay for their mistakes.  This industry is still viable.  You can find good opportunities elsewhere.  Don&#8217;t be afraid to explore and don&#8217;t feel bad for leaving.  If you really believe in the company and feel that you want to help &#8220;get through this tough time together&#8221;, then stay and try to maintain a positive attitude.  But remember, you don&#8217;t owe the company anything.</p>
<p>That&#8217;s it for now. Maybe you learned something, maybe not.  You may have only learned that I am just an ass, if you didn&#8217;t know that already.  Either way, I hope it wasn&#8217;t a boring read. I&#8217;d better get back to &#8220;work.&#8221;</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fthe-do-nots%2F&amp;title=The+DO+NOT%26%238217%3Bs" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fthe-do-nots%2F&amp;title=The+DO+NOT%26%238217%3Bs" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fthe-do-nots%2F&amp;title=The+DO+NOT%26%238217%3Bs" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fthe-do-nots%2F&amp;title=The+DO+NOT%26%238217%3Bs" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fthe-do-nots%2F&amp;title=The+DO+NOT%26%238217%3Bs', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fthe-do-nots%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fthe-do-nots%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fthe-do-nots%2F&amp;title=The+DO+NOT%26%238217%3Bs" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fthe-do-nots%2F&amp;title=The+DO+NOT%26%238217%3Bs" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/rants/the-do-nots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just Venting</title>
		<link>http://www.reverttoconsole.com/blog/rants/just-venting/</link>
		<comments>http://www.reverttoconsole.com/blog/rants/just-venting/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 11:38:11 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://reverttoconsole.com/?p=215</guid>
		<description><![CDATA[I hate stupid users. *RRRRRRRRRRRRRRRRRRRRRRRIIIIIIIIIIIING* Me: &#8220;Hello&#8221; SU: &#8220;Why is the application going so incredibly slow?&#8221; Me: &#8220;Because I coded it so that if it finds your user ID it will run slower.&#8221; SU: &#8220;I&#8217;m reporting you to HR!&#8221; Me: &#8220;OK, but you&#8217;ll be wasting your time.&#8221; SU: &#8220;And why is that?!&#8221; Me: &#8220;Because I [...]]]></description>
			<content:encoded><![CDATA[<p>I hate stupid users.</p>
<p><strong>*RRRRRRRRRRRRRRRRRRRRRRRIIIIIIIIIIIING*</strong><br />
Me: &#8220;Hello&#8221;<br />
SU: &#8220;Why is the application going so incredibly slow?&#8221;<br />
Me: &#8220;Because I coded it so that if it finds your user ID it will run slower.&#8221;<br />
SU: &#8220;I&#8217;m reporting you to HR!&#8221;<br />
Me: &#8220;OK, but you&#8217;ll be wasting your time.&#8221;<br />
SU: &#8220;And why is that?!&#8221;<br />
Me: &#8220;Because I told everyone in HR that you are a stupid b*tch.&#8221;<br />
<strong>*click*</strong></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fjust-venting%2F&amp;title=Just+Venting" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fjust-venting%2F&amp;title=Just+Venting" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fjust-venting%2F&amp;title=Just+Venting" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fjust-venting%2F&amp;title=Just+Venting" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fjust-venting%2F&amp;title=Just+Venting', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fjust-venting%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fjust-venting%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fjust-venting%2F&amp;title=Just+Venting" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Frants%2Fjust-venting%2F&amp;title=Just+Venting" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/rants/just-venting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Machiavellian Approach to Software Development</title>
		<link>http://www.reverttoconsole.com/blog/general/a-machiavellian-approach-to-software-development/</link>
		<comments>http://www.reverttoconsole.com/blog/general/a-machiavellian-approach-to-software-development/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 03:16:37 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://reverttoconsole.com/?p=212</guid>
		<description><![CDATA[If you are a software developer and haven&#8217;t realized by now that a BS in Computer Science should be at least 50% BA, then you must be living the good life and I envy you. Though users love to believe that software development is a perfect science that is as predictable as manufacturing wing nuts, [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a software developer and haven&#8217;t realized by now that a BS in Computer Science should be at least 50% BA, then you must be living the good life and I envy you.  Though users love to believe that software development is a perfect science that is as predictable as manufacturing wing nuts, we know that to be far from the truth.  It is in fact, the user, that makes any attempt to apply scientific methodology to software development futile.</p>
<p>The user is not &#8220;the enemy&#8221;, nor is the user &#8220;stupid&#8221;.  Without users, there is no software.  Users are simply human beings.  Their minds are not bound by physical limits, such as volts, amps, or aerodynamic drag.  A human&#8217;s mind is capable of dreaming up anything, whether it is possible or not in the physical world.  In software we operate within a virtual world not bound by earthly physics.  This fact combined with the vast imagination of the human mind is what makes software development so challenging.  Without boundaries and limits, you can easily find yourself in a no holds barred situation.</p>
<p>Therefore, it is imperative that developers impose and enforce boundaries upon the user.  There are many examples of this: change control boards, requirements sign off, iterative development, etc.  While these conventional measures serve their purpose, it is sometimes necessary to take extra steps that may be ethically questionable.</p>
<p>You need to know the following:<br />
1. The user does not really know what he/she wants<br />
2. The user needs to be told what he/she can and cannot have<br />
3. You are in control of the software, not the user<br />
4. You are the technical expert, not the user<br />
5. The user doesn&#8217;t care about how the software works, so long as it works</p>
<p>We should not feel guilty about the nature of software development, nor the ways in which we deal with the above facts.  To deal with those facts mentioned above, consider the following:<br />
1. Lead the user away from ideas that will result in requiring complex features, while persuading them to accept ideas that will require simpler ones.<br />
2. Be firm with what features can and cannot be built.  Remember, the user is not the technical expert.  You can bend the truth a bit with your imagination and technical knowledge.<br />
3.  Do not ever give control of development to the user.  Always require him or her to follow proper procedures for change requests, it doesn&#8217;t matter how &#8220;urgent&#8221; it is.  Unless there is a defect causing people to die or the company to lose massive amounts of money, it is not urgent enough to skip the procedures and processes that have been put in place.<br />
4.  Do not be fooled by a user who claims to be an expert as a software developer.  Unless they are working on the same software that you are, their &#8220;knowledge&#8221; is useless.  Users with strong educational backgrounds love to make these claims.  (i.e., M.D.&#8217;s, P.h.D.&#8217;s)  Do not be intimidated.  Have confidence in yourself and your abilities.  If they are persistent about injecting their own technical “expertise” into your project, do whatever it takes to take them out of the picture.  Get his/her manager involved if you have to.  If you give in to this type of user, you could very well be jeopardizing the health of your entire project.<br />
5.The user doesn&#8217;t care about how the software works so don&#8217;t tell him/her. Not only is it a waste of time, but it also keeps them in the dark.  That allows you to bend and manipulate the technical truth to your liking if need be.</p>
<p>The last issue I would like to mention is the issue of deadlines.  You should set these, not the user.  If the user requires a deadline that is not reasonable, then tell him/her you will have to drop features in order to meet that deadline.  You cannot give up control.  Lie, cheat, and steal if you have to.  I can&#8217;t really see where you&#8217;d have to do the latter, but I am serious here.  Do whatever it takes to maintain control.</p>
<p>Again, the user is not the enemy (except maybe those “experts” described in number 4 above).  The user just needs stringent boundaries and limits.  These boundaries need to be firmly enforced, even if it means engaging in questionable tactics at times.  Sometimes you may have to approach your job like you are a slightly less than honest politician.  The end result will always be worth it.  If you can keep the user in line, you will find your job to be much more rewarding.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fa-machiavellian-approach-to-software-development%2F&amp;title=A+Machiavellian+Approach+to+Software+Development" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fa-machiavellian-approach-to-software-development%2F&amp;title=A+Machiavellian+Approach+to+Software+Development" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fa-machiavellian-approach-to-software-development%2F&amp;title=A+Machiavellian+Approach+to+Software+Development" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fa-machiavellian-approach-to-software-development%2F&amp;title=A+Machiavellian+Approach+to+Software+Development" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fa-machiavellian-approach-to-software-development%2F&amp;title=A+Machiavellian+Approach+to+Software+Development', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://images.del.icio.us/static/img/delicious.small.gif" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fa-machiavellian-approach-to-software-development%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fa-machiavellian-approach-to-software-development%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fa-machiavellian-approach-to-software-development%2F&amp;title=A+Machiavellian+Approach+to+Software+Development" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.reverttoconsole.com%2Fblog%2Fgeneral%2Fa-machiavellian-approach-to-software-development%2F&amp;title=A+Machiavellian+Approach+to+Software+Development" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.reverttoconsole.com/blog/general/a-machiavellian-approach-to-software-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

