<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en" xml:base="http://www.breakingrobots.net">
<id>http://www.breakingrobots.net/</id>
<title>BreakingRobots.net</title>
<updated>2008-08-29T23:16:14Z</updated>
<author><name>Austin Gilbert</name></author>
<link href="http://www.breakingrobots.net/blog/"/>
<link rel="self" href="http://www.breakingrobots.net/blog/blog_atom.xml"/>
<entry>
	<id>http://www.breakingrobots.net/blog/2008/08/29.html</id>
	<title>Another frustrating conversation with a "Technology Recruiter"</title>
	<link href="http://www.breakingrobots.net/blog/2008/08/29.html"/>
	<updated>2008-08-29T12:00:00Z</updated>
	<content type="html"><![CDATA[I'm looking for work in St. Louis, which is a bigger market than Tulsa... so I thought, what a great oportunity to move into a development position. Ha. I've had about a half a dozen conversations with recruiters. All of them dangle the carrot of development work and all of them try to suggest IT work instead. Today's worst conversation went something like this:<blockquote>Her: So I ran acrossed your resume yesterday on Dice.com. We have a client that is about to higher 10 C++ programmers and I think that you would be a great fit.<p/>Me: Yeah that sounds great.<p/>Her: So what kind of professional programming experience do you have?<p/>Me: Essentially none, all of my programming experience is academic... *thinks to himself 'Did you read my resume?*<p/>Her: Oh well our client really is looking for applicants that have two years of <i>professional</i> experience. So I really don't think that you're a good fit.<p/>Me: *thinking 'Then why are you wasting my time calling?'*<p/>Her: But I do have some other positions that I think would be a better fit for you. I have a listing for a LAN administrator.<br/> <p/>Me: No thanks. I'm really only looking for development work.<br/><p/>Her: Are you sure? I think you'd be a really great fit for this LAN Administrator position.<br/><p/>Me: I didn't get a Bachelor's Degree, let alone my Master's Degree, so that I could work in IT.<br/> <p/>Her: Really?<br/><p/>Me: Yeah. Call me when you have some development work.</blockquote>]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2008/06/28.html</id>
	<title>Unbake Windows Text Files on Unix</title>
	<link href="http://www.breakingrobots.net/blog/2008/06/28.html"/>
	<updated>2008-06-28T12:00:00Z</updated>
	<content type="html"><![CDATA[If you work on multiple platforms, occasionally you'll need to remove Windows line endings from files before working on them in Unix. I ran across a great tip on how to do this on <a href="http://madross.com/blog/convert-windows-line-endings-to-unix-os-x/">Madross.com</a>.<p>$ cd /director/with/your/file<br/>$ find . -type f -exec perl -pi -e 's/\r\n?/\n/g' {} \;</p>The above recursively edits your directory. Or you can do this one file at a time:<p>$ perl -pi -e 's/\r\n?/\n/g' filename.txt</p>]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2008/06/12.html</id>
	<title>C++ Tertiary Operator can be chained</title>
	<link href="http://www.breakingrobots.net/blog/2008/06/12.html"/>
	<updated>2008-06-12T12:00:00Z</updated>
	<content type="html"><![CDATA[Today, while I was digging around on the web for some information on template meta-programming I ran across some really interesting code:<p/>bool a1 = false;<br/>bool a2 = false;<br/>bool a3 = true;<br/><p/>std::cout &lt;&lt; ( a1 ? "true" : a2 ? "a2=true" : a3 ? "a3=true" : "all=false" ) &lt;&lt; std::endl;]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2008/01/29.html</id>
	<title>How to get spaces to print in Ruby on Rails (RoR)</title>
	<link href="http://www.breakingrobots.net/blog/2008/01/29.html"/>
	<updated>2008-01-29T12:00:00Z</updated>
	<content type="html"><![CDATA[As a newbie in the rails environment, I spent a couple of frustrated half hours trying to get spaces to print in a formatted string... see example.<p>def show_sku_message<br/>&nbsp;&nbsp;&nbsp;sprintf("%-8s %-5s %-5s", value1, value2, value3 )<br/>end</p>The spaces in the format don't print when viewed in a web browser. ;( Then it hit me, this is a browser feature, not a problme with ruby.Browsers strip out extra spaces between tag. What I really want is a &amp;nbsp; instead of a space.<p/>Tacking on gsub(' ', '&amp;nbsp;') will do the trick. <p>def show_sku_message<br/>&nbsp;&nbsp;&nbsp;sprintf("%-8s %-5s %-5s", value1, value2, value3 ).gsub(' ', '&amp;nbsp;')<br/>end</p>]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2007/07/22.html</id>
	<title>Interesting problem using OpenBSD + Postfix for mass email campaigns</title>
	<link href="http://www.breakingrobots.net/blog/2007/07/22.html"/>
	<updated>2007-07-22T12:00:00Z</updated>
	<content type="html"><![CDATA[OpenBSD's default maximum number of file descriptors is 1772. Postfix accepts mail and then writes the mail to disk, hence every incoming email uses at least one file descriptor and possibly more. This became a problem when sending out 100,000+ emails within a two hour period. The fix is simply to increase the maximum number of file descriptors to a reasonable number using the <i>sysctl</i> variable <i>kern.maxfiles</i>.  When OBSD runs out of file descriptors, it logs an error message to /var/log/messages, something like "/bsd: file table full". Of course, I would only look in this log if something was obviously wrong... and in this case the exhibiting symptom was a little strange. <p/>The symptom exhibited itself in our POP3 daemon. Whenever we were running a mass email campaign, several of our email users would start getting multiple copies of old email (anything still residing in their "cur" directory, maildir format). I thought at first this was an Outlook bug, or at least an Outlook/Dovecot bug, because when I checked their mail directories there was only a single copy of the email. I thought Outlook must be freaking out and downloading the same email over and over again. When I started looking into the issue this time, I noticed that I got a "no file descriptors available" when I tried to <i>ls</i> a directory. Then I put the two together. Dovecot keeps an index file referencing the email in the users directories. When it was unable to get a file descriptor to read this file, it ended up creating a new index file with new UID numbers for each email. In turn, this caused Outlook to think the email was new and to download it again. So at least part of the problem was the way that Dovecot handles the "no descriptor" error, its likely that it doesn't even check the <i>errno</i> when a file fails to open. The root cause, however, was the limited number of file descriptors available.<p/>Interestingly enough, not having enough file descriptors didn't adversely affect Postfix. Seemingly, it simply returns a server error when receiving email that it can't write to disk. ]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2007/05/08.html</id>
	<title>SC440 with Broadcom bcm5754</title>
	<link href="http://www.breakingrobots.net/blog/2007/05/08.html"/>
	<updated>2007-05-08T12:00:00Z</updated>
	<content type="html"><![CDATA[Doing boot -c and enabling acpi does not correct this <a href="http://archives.neohapsis.com/archives/openbsd/2007-02/0029.html">issue</a>. <p/>No instability, no crashing, I can ping the IP assigned to the interface, but it does not pass traffic. According to <a href="">this</a>, support for the bcm5754 chipset is relatively new, which may explain the problem. <p/>I grabbed the 20070508 snapshots and upgraded to the current version, this fixed the problem, which supports the theory that this was a bug in the driver.]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2007/02/06.html</id>
	<title>Space Junk Cleanup</title>
	<link href="http://www.breakingrobots.net/blog/2007/02/06.html"/>
	<updated>2007-02-06T12:00:00Z</updated>
	<content type="html"><![CDATA[Maybe some of the civi-space startups out there should tackle this <a href="http://www.nytimes.com/2007/02/06/science/space/06orbi.html?ex=157680000&en=2e0e0b3efc03312d&ei=5124&partner=permalink&exprod=permalink">space junk </a> problem? I bet there are some valuable metal alloys floating around up there. The problem would be knowing what is safe to bring back down and what you would want to leave, i.e. anything radioactive would probably more costly than it was worth, but then I guess the US would be willing to pay for the proper disposal of some of the more dangerous materials. ]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2006/12/30.html</id>
	<title>You think you know something about C/C++?</title>
	<link href="http://www.breakingrobots.net/blog/2006/12/30.html"/>
	<updated>2006-12-30T12:00:00Z</updated>
	<content type="html"><![CDATA[Wow... I'm at a loss for words. I've been programming in C/C++ for nearly a decade and I just found this little bit of information today. I happened to be reviewing the documentation for the execve() system call on Mac OS X and I noticed that it mentioned that main() gets passed three arguments, not two:<blockquote>main( int argc, char** args, char** env )</blockquote>The third argument is a NULL terminated array of environment variables (the same format as <i>char** args</i> in other words. Now, the normal way to find an environment variable would be to call <i>getenv()</i> with the name of the variable you want, but printing the environment variables passed in could be interesting:<blockquote>#include &lt;iostream&gt;<br/><br/>int main( int argc, char** args, char** env ) <br/>{ <br/> &nbsp;&nbsp; &nbsp;&nbsp; int i = 0; <br/>  &nbsp;&nbsp; &nbsp;&nbsp; while( env[i] != NULL ) <br/>   &nbsp;&nbsp; &nbsp;&nbsp; { <br/>    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; std::cout &lt;&lt; env[i] &lt;&lt; std::endl; <br/>    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; i++;   &nbsp;&nbsp; &nbsp;&nbsp; } <br/> &nbsp;&nbsp;&nbsp;&nbsp; return 0; <br/>} <br/></blockquote><p>No teacher or book ever mentioned that main() can take more than two arguments. My guess is that this is OS dependent. Which would explain why it is never mentioned or explained in books. <p/> I don't immediately see how browsing through the environment variables could be useful, but then I never knew it was possible before... maybe I'll think of a use for it later.<p>What else is out there? How about another NULL terminated list? It looks like this is the command that was called - but why again, this is normally in argv[0]?<blockquote>#include &lt;iostream&gt;<br/><br/>int main( int argc, char** args, char** env, char** whatisthis ) <br/>{ <br/> &nbsp;&nbsp; &nbsp;&nbsp; int i = 0; <br/>  &nbsp;&nbsp; &nbsp;&nbsp; while( whatisthis[i] != NULL ) <br/>   &nbsp;&nbsp; &nbsp;&nbsp; { <br/>    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; std::cout &lt;&lt; whatisthis[i] &lt;&lt; std::endl; <br/>    &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; i++;   &nbsp;&nbsp; &nbsp;&nbsp; } <br/> &nbsp;&nbsp;&nbsp;&nbsp; return 0; <br/>} <br/></blockquote>Windows also supports the extra arguments in main.]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2006/11/24.html</id>
	<title>svn+ssh using plink on windows</title>
	<link href="http://www.breakingrobots.net/blog/2006/11/24.html"/>
	<updated>2006-11-24T12:00:00Z</updated>
	<content type="html"><![CDATA[Recently, I needed to get Subversion working over SSH on a Windows machine. I elected to use <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">Plink.exe, </a> the command line version of Putty to do this. I got my SSH tunnel working through plink in almost no time, but it wouldn't work when I executed an 'svn' command, such as 'svn co svn+ssh://server/repos'. The client simply sat there, pressing Ctrl-C caused the following error message "connection closed unexpectedly". After struggling with it, I found mention that paths in the subversion 'conf' file must use forward slashes. Using 'ssh= plink -P 1234 -l username -i D:\path\key.ppk' prevent plink from find the key. Plink defaults to using a password when it can't locate the key file. Hence <i>svn</i> sat waiting for a password on STDIN until catching a Ctrl-c. I changed the path to my key to D:/path/key.ppk' and every thing worked immediately! <h4>Step-by-step</h4>This guide assumes you already have sshd and subversion configured and working on your *nix server and that you have a good grasp of how to use them. <p/>Here are the step by step instructions (more or less) for getting svn+ssh to work from a windows client:<p/>Use PuTTYGen.exe to generate a public/private key pair. <p/>Leave the passphrase blank and save the private and public key somewhere safe.<p/>Edit your Subversion config file to modify the ssh tunnel, or create a new tunnel. In Windows, this file is located at <blockquote>C:\Documents and Settings\&lt;username&gt;\Application Data\Subversion\config</blockquote> Under the [tunnels] section, I added the line: <blockquote>ssh = plink -P 1234 -l username -i D:/Path/to/key.ppk</blockquote>Where key.ppk is the private key that you want to use to authenticate. Make sure you use the -l option, on unix you wouldn't need this, but plink will get confused if it isn't there, even when logging in with key authorization. Be sure to use forward slashes in your paths!! Make sure that plink.exe is in your PATH, otherwise use <blockquote>ssh=C:/path/to/plink.exe -P 1234 -l username -i D:/Path/to/key.ppk</blockquote><p/>Use <i>pscp</i> to copy your <b>public key</b> to the server. This is likely the key you saved without the .ppk extension.<p/>Login to your server.<p/>PuttyGen doesn't save the keys the way that OpenSSH expects them. You can use PuttyGen to export the key to OpenSSH or you can simply use <i>vi</i> to do this - I elected to use <i>vi</i>. Delete the headers and the trailing footer line, then get rid of each newline character so that the key is one long string. Before the key, type <blockquote>command="/path/to/your/svnserve -t -r /repos/path</blockquote> followed by a space. Then type <blockquote>ssh-dss</blockquote> followed by a space. If your key is not a DSA key, like mine, figure out what you need instead of ssh-dss. Finally, after your key string type a space followed by <blockquote>username@domain</blockquote>This should be something meaning full to you. Typically, you would use this to figure out which key to delete if the need arises but it isn't necessary.<p/>Append your key file onto your <i>authorized_keys2</i> file using: <blockquote>cat key-filename >> ~/.ssh/authorized_keys2</blockquote><p/>Logout of your server.<p/>Test your connection from the windows client:<blockquote>plink -l username -P 1234 -i D:\path\to\key.ppk server_ip</blockquote>You should see <blockquote>( success ( 1 2 ( ANONYMOUS EXTERNAL ) ( edit-pipeline ) ) )</blockquote> This means your connection is working and you are ready to use Subversion. Note that you won't get a command prompt because we configured SSH to run svnserve when the session is authenticated using this key. If you still want command line access, login without this key using Putty or ssh.<p/>List the contents of your project: <blockquote>svn list svn+ssh://serverIP/project</blockquote>]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2006/11/16.html</id>
	<title>Vienna RSS Reader</title>
	<link href="http://www.breakingrobots.net/blog/2006/11/16.html"/>
	<updated>2006-11-16T12:00:00Z</updated>
	<content type="html"><![CDATA[For the longest time I've used <a href="http://ranchero.com/">NetNewsWire Lite 2.0.1</a> for reading RSS and Atom feeds. Lately, I've been trying out <a href="http://www.opencommunity.co.uk/vienna2.php">Vienna</a> for Mac OS X... and I like it for a basic reader. It has all the features of NetNewsWire Lite (that I like) and a few extras, but not all of the features of NetNewsWire (the full version).  <font color='red'>Update: Hmmm.... I can't say if this was Vienna acting on its own or getting pwn'd by page content, but a few times Little Snitch caught Vienna trying to contact https://www.paypal.com. Also, there seems to be some other security related issues, because Vienna crashed a few times while rendering pages. BTW, nothing exotic here just regular reading. I've since switched back to NetNewsWire Lite. Maybe one day I'll pony up for the full version of NetNewsWire.</font>]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2006/10/19.html</id>
	<title>Kaspersky Anti-Virus</title>
	<link href="http://www.breakingrobots.net/blog/2006/10/19.html"/>
	<updated>2006-10-19T12:00:00Z</updated>
	<content type="html"><![CDATA[The following are my thoughts on Kaspersky Labs Antivirus compared to Symantec. Price = wow. Kaspersky aims to be competitive. With a two or three year commitment on your AV licenses you can likely cut your AV cost in half over Symantec - at least in my region (Great Plains). <p/>The performance is good. The scan rate is as good or better than Symantec, and the reported detection rate is also as good or better than Symantec. Though I should point out that any antivirus product fails to detect (an arguably high) percentage of current malware.<p/>On a personal laptop, Kaspersky is equal to Symantec. It is usable and user friendly. On the corporate level, Kaspersky isn't quite as intuitive. Rolling out a Symantec Corporate Edition server and joining clients to it is very straight forward. Symantec did an awesome job. Kaspersky isn't quite as intuitive, but it is ALMOST as good. Installing the server is no issue - but if you are not doing a remote installation of the clients then it will take a bit of knowledge about the product to get things going. An hour or less of reading will help you to understand the software pieces that you need to get things up and going. Ultimately, you install the Antivirus client and then an additional networking agent to communicate with the policy server. I think that Kaspersky takes care of this if you use the automated rollout tool, but if you are installing manually from the machine, you have two pieces to install whereas Symantec only has one installer. The only thing I DIDN'T like about Kaspersky's centralized management is that scheduled tasks and client management are handled through the windows task scheduler and related ports - ports commonly used by virus to propagate across a LAN. Symantec will work from behind host firewalls so long as their special TCP port is open. So they both require ports to be open for communication - but is the ports that Kaspersky requires that make me a slight bit nervous.  <p/>I can give Kaspersky a cautious two thumbs up. If your tech budget is tight this is certainly a product worth looking into for some cost savings. ]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2006/10/17.html</id>
	<title>Using Perl::Sendmail to send multiple MIME attachments</title>
	<link href="http://www.breakingrobots.net/blog/2006/10/17.html"/>
	<updated>2006-10-17T12:00:00Z</updated>
	<content type="html"><![CDATA[Awhile back, I needed a script to send an alert email with file attachments... yes multiple attachments. Being that Perl is my weapon of choice for most scripting needs and I've used Mail::Sendmail in the past I set out to make this happen. The trouble I found is that the most common examples of sending attachments using Mail::Sendmail only show how to attach one file. To complicate matters, most examples love to use perl's special block printing functions to accomplish this. It makes understanding what the examples are doing with MIME types very difficult. Well, I waded through it, trying a change here and a change there and I have compiled an example that sends an email with multiple attachments using Mail::Sendmail. <p/>Essentially, there is a hash called %files where the keys are the file names and the value holds the contents of the file. Any file in the hash gets appended as an attachment. (Warning this is not a good way to go if your files are LARGE, mine aren't, but the example should be fairly straight forward and you can easily modify this code to handle reading the file from disk while constructing the email. ) The $message variable makes up the body of the email. In this case it is an HTML message - it could be plain text, whatever. See the Mail::Sendmail documentation for information on the remaining variables - they are all standard. <p/>I hereby release <a href="/programs/perlExamples/mime.txt">this example code</a> into the public domain, without waranty or implied waranty or guarantee of fitness of any kind. Cheers.]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2006/10/16.html</id>
	<title>Surfacing</title>
	<link href="http://www.breakingrobots.net/blog/2006/10/16.html"/>
	<updated>2006-10-16T12:00:00Z</updated>
	<content type="html"><![CDATA[Wow. For sometime I've been working almost exclusively from my windows laptop. The unintended consequence being that I haven't been posting here. After being in Windows land for so long, I can say without hestition: I've missed my Mac. Now, I've discovered some nice utilities, tools, and applications for Windows, but for my day in and day out activities, the Macintosh is far better - IMHO. I've especially had withdrawl from the one-click dictionary, spotlight, the unix terminal, Mail.app, and NetNewsWire Lite - to name a few. <p/>Anyway, I have some older stuff to post, rather than doing it retroactively, I'll just post it like it was new.<h4>New House</h4>Maryna and I purchased a house. It is very nice. I had to put a week into painting and moving, but now everything is beautifully in order. If you know me, you'll have to come see it. <p/>Now, the house's cable modem access point is in Maryna's office and my office is on the complete opposite end of the house. I tried each and every wireless channel but non of them proved to reach my office with more than a "very weak" signal. Plus, the airspace is a might bit more crowded in this neighborhood causing me to get bumped from the net at least once every three hours ;( I went looking for something more reliable. We have plaster-of-parris walls so dragging networking cable through the ceiling was out because you can't make a wall drop like you can with drywall. I decided to check out the Homeplug 1.0 standard. I purchased two Netgear Power-over-Ethernet bridges and hooked them up. The throughput is comparable with 802.11b, and the reliability is great. I haven't been bumped off the net since. The latency seems to be a little better than the wireless networking equipment that I had, but the Homeplug is more susceptible to network jitter. I get unexpected spikes in latency, whereas the wireless equipment was more or less constant. The other thing I worry about is a cord running from my power outlet to my PC. No it won't work through a surge protector. ]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2006/06/15.html</id>
	<title>Installing XP Pro on Dell Inspiron 1300 Fails</title>
	<link href="http://www.breakingrobots.net/blog/2006/06/15.html"/>
	<updated>2006-06-15T12:00:00Z</updated>
	<content type="html"><![CDATA[The installer dies with some stop error code and message that includes pci.sys. Read up on Dell's web forum, many people suggested that a Windows XP Pro SP2 disk would not have this problem.... who has one of those laying around? Others suggested slipstreaming XP2... <p/>There was one more comment in the forums that seemed to work for me: when the installer loads and says "Press F6 to install RAID..." press F5 instead. Then select your processor type and go on with the installation. It should run without problems. ]]></content>
</entry>
<entry>
	<id>http://www.breakingrobots.net/blog/2006/06/09.html</id>
	<title>Thumbnailing JPEGs with Image::Epeg</title>
	<link href="http://www.breakingrobots.net/blog/2006/06/09.html"/>
	<updated>2006-06-09T12:00:00Z</updated>
	<content type="html"><![CDATA[Well, I tried using Image Magick to resize thumbnails, but it doesn't respect aspect ratios (or at least I couldn't figure out how to make it retain the aspect ratio using the perl interface - or I should say I didn't want to put any effort into this). A week or more ago, I found a simple JPEG thumbnail library called Epeg - it also has a corresponding perl module. Yesterday evening, I worked through getting it compiled and installed, tonight I took it for a test spin. It works easy enough to call good. It does a basic thumbnail reasonably well. I wouldn't call the output great, but it is good enough to get about 80% of my thumbnails done in one quick shot, which is a big help. I can hit the rest with Gimp. Of course, the major drawback is you can only use JPEGs ;(]]></content>
</entry>
</feed>
