<?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>Quinn's Brain, aka QBrain &#187; Technology</title>
	<atom:link href="http://qbrain.randomnonsense.com/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://qbrain.randomnonsense.com</link>
	<description>Finance, Food, Fitness</description>
	<lastBuildDate>Sun, 02 May 2010 17:33:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Goal Accomplished:  Finished C++ Primer Plus</title>
		<link>http://qbrain.randomnonsense.com/goal-accomplished-finished-c-primer-plus/</link>
		<comments>http://qbrain.randomnonsense.com/goal-accomplished-finished-c-primer-plus/#comments</comments>
		<pubDate>Sat, 13 Sep 2008 18:26:12 +0000</pubDate>
		<dc:creator>qbrain</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://qbrain.randomnonsense.com/2008/09/13/education/goal-accomplished-finished-c-primer-plus/</guid>
		<description><![CDATA[I have written more C++ then I have read about how to write C++ and this might be the typical way people learn programming languages.
When I needed to learn Perl, I went the other way around.  I read and worked through all the exercises in Learning Perl and then followed that up by reading [...]]]></description>
			<content:encoded><![CDATA[<p>I have written more C++ then I have read about how to write C++ and this might be the typical way people learn programming languages.</p>
<p>When I needed to learn Perl, I went the other way around.  I read and worked through all the exercises in Learning Perl and then followed that up by reading the first two thirds of Programming Perl.  This was all accomplished before I had written more than a 1,000 lines of real perl and I think this gave me a much stronger base for understanding the how and why of things.  Of course when I learned Perl, I was able and willing to devote 80 hours a week to the task, and going through Learning Perl and Programming Perl probably only took 3 weeks.</p>
<p>Last year when I went to talk to by soon to be adviser about working on my Master&#8217;s thesis, he said that he wanted everything written in C++.  No big deal I said, but I have never taken the time to develop a strong ground work in the hows and whys of C++.  Thus I ordered C++ Primer Plus. </p>
<p>I was planning on reading the entire book over Christmas break, but instead spent all my free time working on my thesis.  Obviously, I had waited too late to do the right thing and did not really start on the book until after graduating.  I am certain that the code for my thesis could have been better, but certainly was no where near the worst that has been written.  After graduating, I made it one of my goals to finish the book since I really enjoyed writing C++ for my thesis.</p>
<p>Reading this book gave me some insight into C++, but it is no Programming Perl.  What I now have is background in C++, and know that I probably should read a book just on IO and spend a very long time working through template examples.  My weakness in C++ is really what has been developed in the last, oh, <b>15</b> years.  </p>
]]></content:encoded>
			<wfw:commentRss>http://qbrain.randomnonsense.com/goal-accomplished-finished-c-primer-plus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do you get remote interactive commands initiated ssh commands to die when the ssh connection dies?</title>
		<link>http://qbrain.randomnonsense.com/how-do-you-get-remote-interactive-commands-initiated-ssh-commands-to-die-when-the-ssh-connection-dies/</link>
		<comments>http://qbrain.randomnonsense.com/how-do-you-get-remote-interactive-commands-initiated-ssh-commands-to-die-when-the-ssh-connection-dies/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 00:16:45 +0000</pubDate>
		<dc:creator>qbrain</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://qbrain.randomnonsense.com/?p=154</guid>
		<description><![CDATA[This would have been called &#8220;How the fuck do I get remote commands to die&#8221; but I wanted to make sure I had all the keywords in the title, so I could find the answer later.
First the problem.  When a running a command remotely using ssh, there is no local ptty associated with that [...]]]></description>
			<content:encoded><![CDATA[<p>This would have been called &#8220;How the fuck do I get remote commands to die&#8221; but I wanted to make sure I had all the keywords in the title, so I could find the answer later.</p>
<p>First the problem.  When a running a command remotely using ssh, there is no local ptty associated with that remote command.  So if the connection dies, or someone kills the ssh itself, the command continues running on the remote box.</p>
<p>For example, you have several servers and you want to monitor a log file on each of them from a central location.  There are other solutions to this problem, but for the sake of the argument, we want to use tail -f on the remote box and the tail will be run over ssh.</p>
<p><code>ssh <b>login</b> tail -f <b>log file</b></code></p>
<p>If the ssh is killed, the tail -f will live forever on the remote box.</p>
<p>The solution is simple, once you know where to look for it.  In the ssh man pages there is a flag, -t, that will associate the local ptty with the remote command.  So if the ssh goes away, the ptty goes away for the remote command, triggering the remote command to terminate on its own.  This is the desired behavior.</p>
<p>But now, you want to write a perl script to monitor all these remote tails you have going.  The problem now is that you don&#8217;t have a ptty because your command is started from inside the perl script.  Oh no, what to do?</p>
<p>Run around, scream and shout!</p>
<p>Actually, the hard part was finding -t.  Going back to that wonderful bit of knowledge and reading the last bit of the paragraph explaining -t, the mention <i>Multiple -t options force tty allocation, even if ssh has no local tty.</i>  Really, that was nice of them.  That is exactly what I needed.</p>
<p>So the command becomes</p>
<p><code>ssh -tt <b>login</b> tail -f <b>log file</b></code></p>
<p>and I can stick it in whatever script I want, and it will clean up nicely is the ssh connection is ever lost.</p>
]]></content:encoded>
			<wfw:commentRss>http://qbrain.randomnonsense.com/how-do-you-get-remote-interactive-commands-initiated-ssh-commands-to-die-when-the-ssh-connection-dies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good advice</title>
		<link>http://qbrain.randomnonsense.com/good-advice/</link>
		<comments>http://qbrain.randomnonsense.com/good-advice/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 20:00:07 +0000</pubDate>
		<dc:creator>qbrain</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://qbrain.randomnonsense.com/2008/07/20/education/good-advice/</guid>
		<description><![CDATA[As I am working through C++ programming problems my C++ Primer Plus book, this story pops up on my news reader.
I think the same justifications hold for a traditional CS education.  You might not actually use the knowledge directly, but it creates a basis of understanding that will help accomplish what you actually do [...]]]></description>
			<content:encoded><![CDATA[<p>As I am working through C++ programming problems my C++ Primer Plus book, <a href="http://www.codingthewheel.com/archives/learning-to-drive-a-stick-shift">this</a> story pops up on my news reader.</p>
<p>I think the same justifications hold for a traditional CS education.  You might not actually use the knowledge directly, but it creates a basis of understanding that will help accomplish what you actually do use on a daily basis.</p>
<p>Coding the Wheel is my favorite blog right now.  I could care less about windows programming, but with his posts about poker bots, I get all excited about the neat hacks that make the windows world work.</p>
]]></content:encoded>
			<wfw:commentRss>http://qbrain.randomnonsense.com/good-advice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Technology too</title>
		<link>http://qbrain.randomnonsense.com/technology-too/</link>
		<comments>http://qbrain.randomnonsense.com/technology-too/#comments</comments>
		<pubDate>Mon, 13 Mar 2006 04:00:47 +0000</pubDate>
		<dc:creator>qbrain</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://qbrain.randomnonsense.com/?p=97</guid>
		<description><![CDATA[I added technology as well, which will probably go along closely with education.  Recently my brain started working again, and there is a strange desire to learn lisp or scheme, erlang and ruby as well as become a decent with C and C++.
Lisp is used a lot in AI and I should be taking [...]]]></description>
			<content:encoded><![CDATA[<p>I added technology as well, which will probably go along closely with education.  Recently my brain started working again, and there is a strange desire to learn lisp or scheme, erlang and ruby as well as become a decent with C and C++.</p>
<p>Lisp is used a lot in AI and I should be taking a AI class in the next school year.  Scheme is a derivative language out of MIT.  Considering that lisp is probably used in UTD&#8217;s AI class, it is slightly better supported, and I have already started learning it, I think it wins.</p>
<p>Erlang has built in distributed capabilities.  That is enough reason for me to learn it.</p>
<p>Just read a bit about Ruby today, and it was discribed as having stolen all perl&#8217;s good features (and a bunch of other languages).  So perl++, sounds great.  This should be a fun one and maybe we can just call Ruby Perl6.</p>
]]></content:encoded>
			<wfw:commentRss>http://qbrain.randomnonsense.com/technology-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
