<?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>Dushkin.org &#187; programming</title> <atom:link href="http://www.dushkin.org/tag/programming/feed/" rel="self" type="application/rss+xml" /><link>http://www.dushkin.org</link> <description>Citizen of the Internet</description> <lastBuildDate>Thu, 10 Jun 2010 15:49:54 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0</generator> <item><title>So much coding, so little time (or: &#8220;this stuff is freakin&#8217; sweet!&#8221;)</title><link>http://www.dushkin.org/2009/11/12/so-much-coding-so-little-time-or-this-stuff-is-freakin-sweet/</link> <comments>http://www.dushkin.org/2009/11/12/so-much-coding-so-little-time-or-this-stuff-is-freakin-sweet/#comments</comments> <pubDate>Thu, 12 Nov 2009 20:52:52 +0000</pubDate> <dc:creator>dushkin</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[coding]]></category> <category><![CDATA[django]]></category> <category><![CDATA[gallery]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[python]]></category> <category><![CDATA[site]]></category><guid isPermaLink="false">http://www.dushkin.org/?p=360</guid> <description><![CDATA[I don&#8217;t think I really understood just how big this project I took upon myself really was. After discovering the joys of Django, which really is everything I could ever hope for, I think I got a bit ahead of myself. Learning a new platform was the smaller hurdle. Django doesn&#8217;t feel that alien to [...]]]></description> <content:encoded><![CDATA[<p>I don&#8217;t think I really understood just how big this project I took upon myself really was. After discovering the joys of Django, which really is everything I could ever hope for, I think I got a bit ahead of myself.</p><p>Learning a new platform was the smaller hurdle. Django doesn&#8217;t feel that alien to me somehow, and the documentation is fair, too. Unlike Ruby on Rails it doesn&#8217;t mean you have to know all of Ruby&#8217;s kinks. Let&#8217;s face it, Ruby wouldn&#8217;t have been much without rails. I&#8217;d much rather work with the more familiar Python, but I think I expressed that enough already. (Probably)</p><p>That said, the problem was more that of magnitude. I&#8217;ve made it my goal to take <a href="http://www.auberdine.com">The Auberdine Community</a>&#8216;s website to the wonderful realm of web2.0. The first couple of weeks I breezed through it like nobody&#8217;s business. I actually almost finished a complete forum platform which was actually easy enough, and not that many bugs creeping here and there either.</p><p>But the issue was that say I have a model, every single one of those requires:</p><ul><li>A view to put stuff into the template</li><li>The template itself</li><li>Repeat for every action that the user would do on the model</li></ul><p>So a post model suddenly had to have 5 more views and templates and those all needed to look pretty, and in turn those would have to also work properly.</p><p>Fair enough, that&#8217;s just cumbersome, I can do it, right? But then there are other issues involved. For instance, plugging all the little holes that suddenly pop up (damn you, user input validation!) and designing the models just right (you have no idea how many times I wiped the db).</p><p>Maybe I&#8217;ll just finally redo my gallery instead and come back to the project. It&#8217;s about damn time. Would love to see that being improved</p> ]]></content:encoded> <wfw:commentRss>http://www.dushkin.org/2009/11/12/so-much-coding-so-little-time-or-this-stuff-is-freakin-sweet/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Perl script for converting between currencies</title><link>http://www.dushkin.org/2009/10/23/perl-script-for-converting-between-currencies/</link> <comments>http://www.dushkin.org/2009/10/23/perl-script-for-converting-between-currencies/#comments</comments> <pubDate>Fri, 23 Oct 2009 18:55:17 +0000</pubDate> <dc:creator>dushkin</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[mac os x]]></category> <category><![CDATA[perl]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[quicksilver]]></category> <category><![CDATA[script]]></category><guid isPermaLink="false">http://www.dushkin.org/?p=355</guid> <description><![CDATA[Hello there dear readers, I&#8217;ve been working on a little command line utility this afternoon to convert between different currencies google style. Instead of googling &#8220;10 USD in EUR&#8221; every time, you can simply type the same in the command line and get the result straight from your terminal. My intention was originally to make [...]]]></description> <content:encoded><![CDATA[<p>Hello there dear readers,</p><p>I&#8217;ve been working on a little command line utility this afternoon to convert between different currencies google style. Instead of googling &#8220;10 USD in EUR&#8221; every time, you can simply type the same in the command line and get the result straight from your terminal.</p><p>My intention was originally to make this script into a <a href="http://docs.blacktree.com/quicksilver/quicksilver">Quicksilver</a> utility. It could easily be done by having an applescript supply the data to  but unfortunately Applescript seems <strong>broken</strong> in Quicksilver on Snow Leopard and I still haven&#8217;t had the chance to try to fix it.</p><p>In case this one caught you by surprise &#8211; yes, there&#8217;s actually a version of Qucksilver that <a href="http://code.google.com/p/blacktree-alchemy/downloads/detail?name=Quicksilver-b56a7.tar.gz&amp;can=2&amp;q=">works fine with Snow Leopard</a>.</p><h3>Installing this script</h3><ol><li>Install <code><a href="http://search.cpan.org/~lgoddard/Finance-Currency-Convert-Yahoo-0.2/Yahoo.pm">Finance::Currency::Convert::Yahoo</a></code>. <strong>To do this</strong>:<ol><li>Start <code>cpan</code></li><li>Type: <code>install Finance::Currency::Convert::Yahoo</code></li></ol></li><li>Put the script somewhere you like</li><li>Make sure it&#8217;s executable (chmod +x ./currency.pl)</li><li>Done!</li></ol><h3>Using this script</h3><p>Couldn&#8217;t be any easier:</p><blockquote><pre>% ./currency.pl 100 USD in EUR
66.58 EUR</pre></blockquote><p>And that&#8217;s it!</p><p>It also takes other forms of input. For instance:</p><ul><li>&#8220;10USD in GBP&#8221;</li><li>&#8220;USD10 in GBP&#8221;</li><li>&#8220;USD 10 JPY&#8221;</li><li>&#8220;$20.10 in cny&#8221; (keep in mind that you will need to escape that dollar sign or the shell might think it needs to do something with it)</li></ul><p>The basic rule of thumb is that the <strong>first</strong> currency is the source, the <strong>second</strong> is the target and that a number is the value in the source currency. You may only supply ONE of each.</p><p><strong>Note:</strong> I added a substitution from &#8220;NIS&#8221; (New Israeli Shekel) to ILS (Israeli Shekel). Yahoo prefers the code ILS while I prefer NIS, no biggie.</p><h3>License</h3><p>Public domain, baby.</p><h3>Getting the script</h3><p><a href="http://www.dushkin.org/code/currency.pl">Save this file</a>. Then see above instructions.</p><h3>Changelog</h3><ul><li><a href="http://www.dushkin.org/code/currency-1.0.pl">1.0</a><ul><li>Released</li></ul></li></ul> ]]></content:encoded> <wfw:commentRss>http://www.dushkin.org/2009/10/23/perl-script-for-converting-between-currencies/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>bot.py, the python IRC bot toolkit</title><link>http://www.dushkin.org/2009/06/16/botpy-the-python-irc-bot-toolkit/</link> <comments>http://www.dushkin.org/2009/06/16/botpy-the-python-irc-bot-toolkit/#comments</comments> <pubDate>Tue, 16 Jun 2009 13:02:42 +0000</pubDate> <dc:creator>dushkin</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[bot]]></category> <category><![CDATA[chat]]></category> <category><![CDATA[gpl]]></category> <category><![CDATA[irc]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[python]]></category><guid isPermaLink="false">http://www.dushkin.org/?p=286</guid> <description><![CDATA[This is a quick post, I&#8217;ve not got exactly all the time I want to have, but I&#8217;m very eager to show this one to the world as a useful GPL program. bot.py is an IRC bot toolkit for python. It&#8217;s really quite simple. You: Import it. import bot Initialize a new bot object a [...]]]></description> <content:encoded><![CDATA[<p>This is a quick post, I&#8217;ve not got exactly all the time I want to have, but I&#8217;m very eager to show this one to the world as a useful GPL program.</p><p>bot.py is an IRC bot toolkit for python. It&#8217;s really quite simple. You:</p><ol><li>Import it.<br /> <code>import bot</code></li><li>Initialize a new bot object<br /> <code>a = bot.bot(master="yourname", channels=["#somechan"], nick="foobar")</code></li><li>Register events<br /> <code>irc.register(check_func, act_func)</code><br /> Where check_func is a function that receives the sender, arguments of the IRC command and the text of it. Also, it&#8217;s possible to set the evtype= argument to act on other commands (e.g. NICK, QUIT, etc.)</li><li>Connect and run<br /> <code>a.connect("server.com", 6667)<br /> a.start()</code></li></ol><p>Protip: <code>a.send(a)</code> will send a to the server. For instance:<br /> <code>a.send(b'PRIVMSG #channel :Hello!')</code><br /> will send &#8220;Hello!&#8221; to #channel. Or whatever other command you like.</p><p>Yes, you need to know the IRC protocol, a bit. The rest should be fairly obvious, if not, contact me. Also, contact me with improvements and I will gladly add them!</p><p>NB: This is for Python 3<br /> <a href="http://www.dushkin.org/bot.py">Download bot.py</a></p> ]]></content:encoded> <wfw:commentRss>http://www.dushkin.org/2009/06/16/botpy-the-python-irc-bot-toolkit/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>I&#8217;m a spoiled ass who likes Python</title><link>http://www.dushkin.org/2009/05/31/im-a-spoiled-ass-who-likes-python/</link> <comments>http://www.dushkin.org/2009/05/31/im-a-spoiled-ass-who-likes-python/#comments</comments> <pubDate>Sun, 31 May 2009 11:49:16 +0000</pubDate> <dc:creator>dushkin</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[python]]></category><guid isPermaLink="false">http://www.dushkin.org/?p=284</guid> <description><![CDATA[Recently I&#8217;ve started developing dicey for some RPGs over IRC. I started with little knowledge of python and the IRC protocol, but actually went as far as to develop a pretty robust and feature-packed bot. I think I have at least some experience with about every language out there. I&#8217;m a shitty coder for the [...]]]></description> <content:encoded><![CDATA[<p>Recently I&#8217;ve started developing dicey for some RPGs over IRC. I started with little knowledge of python and the IRC protocol, but actually went as far as to develop a pretty robust and feature-packed bot.</p><p>I think I have at least some experience with about every language out there. I&#8217;m a shitty coder for the most part because I just don&#8217;t have the patience, but I at least take a look at them. The basic syntax, their features, just out of general interest.</p><p>I&#8217;ve been a long time fan of python, but never really used it to this degree until now. My projects were mostly boring stuff like a BF interpreter and scripts here and there to do repetitive tasks. Never a bot.</p><p>I started by googling code samples of using IRC in python. Not long after I found a very basic implementation that would just connect, ping back when asked to and print the raw output.</p><p>One thing about IRC, it&#8217;s a <a href="http://www.irchelp.org/irchelp/rfc/rfc.html">wonderful protocol</a>. You hardly even need a client for most of it. It&#8217;s ancient and missing some things, but I can willingly overlook that.</p><p>(Dicey will be released eventually.)</p> ]]></content:encoded> <wfw:commentRss>http://www.dushkin.org/2009/05/31/im-a-spoiled-ass-who-likes-python/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Java sucks</title><link>http://www.dushkin.org/2009/03/18/java-sucks/</link> <comments>http://www.dushkin.org/2009/03/18/java-sucks/#comments</comments> <pubDate>Wed, 18 Mar 2009 18:21:05 +0000</pubDate> <dc:creator>dushkin</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[annoying]]></category> <category><![CDATA[computers]]></category> <category><![CDATA[programming]]></category><guid isPermaLink="false">http://www.dushkin.org/2009/03/18/java-sucks/</guid> <description><![CDATA[There, I said it.]]></description> <content:encoded><![CDATA[<p>There, I said it.</p> ]]></content:encoded> <wfw:commentRss>http://www.dushkin.org/2009/03/18/java-sucks/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>