<?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>ADM Blog &#187; Stuff</title> <atom:link href="http://blog.another-d-mention.ro/category/misc/stuff/feed/" rel="self" type="application/rss+xml" /><link>http://blog.another-d-mention.ro</link> <description>No matter how you see things, reality changes when you reach understanding</description> <lastBuildDate>Fri, 22 Jul 2011 06:56:49 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1</generator> <item><title>Gnome – multiple monitor taskbar</title><link>http://blog.another-d-mention.ro/how-tos/gnome-%e2%80%93-multiple-monitor-taskbar/</link> <comments>http://blog.another-d-mention.ro/how-tos/gnome-%e2%80%93-multiple-monitor-taskbar/#comments</comments> <pubDate>Sat, 13 Nov 2010 00:19:12 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[How To's]]></category> <category><![CDATA[Stuff]]></category> <category><![CDATA[gnome]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[monitor]]></category> <category><![CDATA[taskbar]]></category> <category><![CDATA[ultramon]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=841</guid> <description><![CDATA[If you are using Linux on multiple monitors you are surely going to miss Utramon, but don’t worry. You can get your task-bar on multiple monitors using the following instructions Instructions: 1.) Right click on anywhere on the launch-bar, click “New Panel” 2.) Drag that to any monitor. 3.) Right click on that panel, and [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/stuff/windows-7-quotes-problem/' rel='bookmark' title='Permanent Link: windows 7 quotes problem'>windows 7 quotes problem</a></li><li><a
href='http://blog.another-d-mention.ro/misc/eee-pc/install-windows-xp-on-your-asus-eee-pc-using-a-usb-flash-drive/' rel='bookmark' title='Permanent Link: Install Windows XP on your Asus Eee PC using a USB flash drive'>Install Windows XP on your Asus Eee PC using a USB flash drive</a></li><li><a
href='http://blog.another-d-mention.ro/programming/c/use-clipboard-copypaste-in-c-console-application/' rel='bookmark' title='Permanent Link: Use clipboard (copy/paste) in C# console application'>Use clipboard (copy/paste) in C# console application</a></li></ol>]]></description> <content:encoded><![CDATA[<p>If you are using Linux on multiple monitors you are surely going to miss Utramon, but don’t worry. You can get your task-bar on multiple monitors using the following instructions</p><p>Instructions:<br
/> 1.) Right click on anywhere on the launch-bar, click “New Panel”<br
/> 2.) Drag that to any monitor.<br
/> 3.) Right click on that panel, and click “Add to Panel”<br
/> 4.) Select “Window List” under Desktop and Windows<br
/> 5.) Click Add.<br
/> 6.) Add as many widgets you want to the taskbar<br
/> 7.) Click Close, and you’re done.</p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/stuff/windows-7-quotes-problem/' rel='bookmark' title='Permanent Link: windows 7 quotes problem'>windows 7 quotes problem</a></li><li><a
href='http://blog.another-d-mention.ro/misc/eee-pc/install-windows-xp-on-your-asus-eee-pc-using-a-usb-flash-drive/' rel='bookmark' title='Permanent Link: Install Windows XP on your Asus Eee PC using a USB flash drive'>Install Windows XP on your Asus Eee PC using a USB flash drive</a></li><li><a
href='http://blog.another-d-mention.ro/programming/c/use-clipboard-copypaste-in-c-console-application/' rel='bookmark' title='Permanent Link: Use clipboard (copy/paste) in C# console application'>Use clipboard (copy/paste) in C# console application</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/how-tos/gnome-%e2%80%93-multiple-monitor-taskbar/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Every day the same dream</title><link>http://blog.another-d-mention.ro/misc/stuff/every-day-the-same-dream/</link> <comments>http://blog.another-d-mention.ro/misc/stuff/every-day-the-same-dream/#comments</comments> <pubDate>Wed, 20 Jan 2010 09:39:51 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Stuff]]></category> <category><![CDATA[flash]]></category> <category><![CDATA[game]]></category> <category><![CDATA[molleindustria]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=788</guid> <description><![CDATA[Just brilliant. By molleindustria No related posts.
No related posts.]]></description> <content:encoded><![CDATA[<p><object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="400" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param
name="src" value="http://cache.another-d-mention.ro/stuff/everydaythesamedream.swf" /><embed
type="application/x-shockwave-flash" width="600" height="400" src="http://cache.another-d-mention.ro/stuff/everydaythesamedream.swf"></embed></object></p><p>Just brilliant. By <a
href="http://www.molleindustria.org" target="_blank">molleindustria</a></p><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/misc/stuff/every-day-the-same-dream/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>windows 7 quotes problem</title><link>http://blog.another-d-mention.ro/misc/stuff/windows-7-quotes-problem/</link> <comments>http://blog.another-d-mention.ro/misc/stuff/windows-7-quotes-problem/#comments</comments> <pubDate>Thu, 14 Jan 2010 17:43:30 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Stuff]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[quotes]]></category> <category><![CDATA[windows7]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=774</guid> <description><![CDATA[If you have a problem with quotes in Windows 7, try to switch the keyboard layout from "United States - International" to "US" After installing Windows 7, I discovered the following behavior in the code editor: Pressing the quote (') or double-quote (") key once would have no effect. Pressing any key after that would [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/eee-pc/install-windows-xp-on-your-asus-eee-pc-using-a-usb-flash-drive/' rel='bookmark' title='Permanent Link: Install Windows XP on your Asus Eee PC using a USB flash drive'>Install Windows XP on your Asus Eee PC using a USB flash drive</a></li><li><a
href='http://blog.another-d-mention.ro/how-tos/gnome-%e2%80%93-multiple-monitor-taskbar/' rel='bookmark' title='Permanent Link: Gnome – multiple monitor taskbar'>Gnome – multiple monitor taskbar</a></li><li><a
href='http://blog.another-d-mention.ro/how-tos/how-to-setup-a-subversion-server-on-windows/' rel='bookmark' title='Permanent Link: How To &#8211; Setup a Subversion server on Windows'>How To &#8211; Setup a Subversion server on Windows</a></li></ol>]]></description> <content:encoded><![CDATA[<p><strong><a
href="http://cache.another-d-mention.ro/images/wp-content/uploads/2010/01/windows7.jpg"><img
class="alignleft size-thumbnail wp-image-777" title="windows7" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2010/01/windows7-150x150.jpg" alt="windows7 150x150 windows 7 quotes problem" width="150" height="150" /></a>If you have a problem with quotes in Windows 7, try to switch the keyboard layout from "United States - International" to "US"</strong></p><p>After installing Windows 7, I discovered the following behavior in the code editor: Pressing the quote (') or double-quote (") key once would have no effect. Pressing any key after that would produce both the double quote character and the next character.</p><p>The problem is caused but by regional settings - I solved it by switching from "United States - International" to "US" keyboard layout.</p><p>Go to Control Panel-&gt;Region and Language-&gt;Keyboards and Languages tab-&gt;click Change keyboards... where you add English (United States) - Us to the list and then select it as default from the top drop down list.</p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/eee-pc/install-windows-xp-on-your-asus-eee-pc-using-a-usb-flash-drive/' rel='bookmark' title='Permanent Link: Install Windows XP on your Asus Eee PC using a USB flash drive'>Install Windows XP on your Asus Eee PC using a USB flash drive</a></li><li><a
href='http://blog.another-d-mention.ro/how-tos/gnome-%e2%80%93-multiple-monitor-taskbar/' rel='bookmark' title='Permanent Link: Gnome – multiple monitor taskbar'>Gnome – multiple monitor taskbar</a></li><li><a
href='http://blog.another-d-mention.ro/how-tos/how-to-setup-a-subversion-server-on-windows/' rel='bookmark' title='Permanent Link: How To &#8211; Setup a Subversion server on Windows'>How To &#8211; Setup a Subversion server on Windows</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/misc/stuff/windows-7-quotes-problem/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Flex Camp</title><link>http://blog.another-d-mention.ro/misc/flex-camp/</link> <comments>http://blog.another-d-mention.ro/misc/flex-camp/#comments</comments> <pubDate>Tue, 02 Jun 2009 20:44:24 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Misc]]></category> <category><![CDATA[Stuff]]></category> <category><![CDATA[adobe]]></category> <category><![CDATA[camp]]></category> <category><![CDATA[flex]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=404</guid> <description><![CDATA[For all interested, we host a Flex Camp this Saturday (6 june) in Cluj-Napoca, for more details click the poster or go to http://flexcluj.eventsbot.com/ and register. See you there Related posts:Flex vs Silverlight vs AJAX Create Flex/AS3 applications for Mobile Devices Flex and Visual Studio
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/flex-vs-silverlight-vs-ajax/' rel='bookmark' title='Permanent Link: Flex vs Silverlight vs AJAX'>Flex vs Silverlight vs AJAX</a></li><li><a
href='http://blog.another-d-mention.ro/programming/create-flexas3-applications-for-mobile-devices/' rel='bookmark' title='Permanent Link: Create Flex/AS3 applications for Mobile Devices'>Create Flex/AS3 applications for Mobile Devices</a></li><li><a
href='http://blog.another-d-mention.ro/misc/flex-and-visual-studio/' rel='bookmark' title='Permanent Link: Flex and Visual Studio'>Flex and Visual Studio</a></li></ol>]]></description> <content:encoded><![CDATA[<p
style="text-align: center;"><a
href="http://flexcluj.eventsbot.com/"><img
class="aligncenter size-large wp-image-405" title="Flex Camp poster" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/06/transylvania_flex_camp1-724x1024.jpg" alt="transylvania flex camp1 724x1024 Flex Camp" width="304" height="430" /></a></p><p
style="text-align: left;">For all interested, <a
href="http://groups.adobe.com/groups/15724342f4/summary" target="_blank">we</a> host a Flex Camp this Saturday (6 june) in Cluj-Napoca, for more details click the poster or go to <a
href="http://flexcluj.eventsbot.com/" target="_blank">http://flexcluj.eventsbot.com/</a> and register. See you there</p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/flex-vs-silverlight-vs-ajax/' rel='bookmark' title='Permanent Link: Flex vs Silverlight vs AJAX'>Flex vs Silverlight vs AJAX</a></li><li><a
href='http://blog.another-d-mention.ro/programming/create-flexas3-applications-for-mobile-devices/' rel='bookmark' title='Permanent Link: Create Flex/AS3 applications for Mobile Devices'>Create Flex/AS3 applications for Mobile Devices</a></li><li><a
href='http://blog.another-d-mention.ro/misc/flex-and-visual-studio/' rel='bookmark' title='Permanent Link: Flex and Visual Studio'>Flex and Visual Studio</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/misc/flex-camp/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Augmented Reality Magic</title><link>http://blog.another-d-mention.ro/misc/augmented-reality-magic/</link> <comments>http://blog.another-d-mention.ro/misc/augmented-reality-magic/#comments</comments> <pubDate>Thu, 30 Apr 2009 13:14:14 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Misc]]></category> <category><![CDATA[Stuff]]></category> <category><![CDATA[augmented]]></category> <category><![CDATA[graphics]]></category> <category><![CDATA[magic]]></category> <category><![CDATA[marco tempest]]></category> <category><![CDATA[reality]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=338</guid> <description><![CDATA[Marco Tempest demonstrates his playing card magic and augmented reality hybrid act using - "100% real-time stuff - No post-processing. Programmed In C++ with OpenFrameworks, OpenCV, ARToolkitPlus, MacCam and other Open Source goodies…" Very cool to see AR tech finding its way into established performance crafts like this. I'm guessing we'll see these techniques combined [...]
No related posts.]]></description> <content:encoded><![CDATA[<p>Marco Tempest demonstrates his playing card magic and augmented reality hybrid act using - "100% real-time stuff - No post-processing. Programmed In C++ with OpenFrameworks, OpenCV, ARToolkitPlus, MacCam and other Open Source goodies…" Very cool to see AR tech finding its way into established performance crafts like this. I'm guessing we'll see these techniques combined with live/performance and projection more and more as <a
href="http://www.hitl.washington.edu/artoolkit/" target="_blank">ARToolkit</a> catches on.</p><p
style="text-align: center;"><object
width="480" height="385"><param
name="movie" value="http://www.youtube.com/v/Mk1xjbA-ISE&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999"></param><param
name="allowFullScreen" value="true"></param><param
name="allowscriptaccess" value="always"></param><embed
src="http://www.youtube.com/v/Mk1xjbA-ISE&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/misc/augmented-reality-magic/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Sudoku solver in python</title><link>http://blog.another-d-mention.ro/programming/sudoku-solver-in-python/</link> <comments>http://blog.another-d-mention.ro/programming/sudoku-solver-in-python/#comments</comments> <pubDate>Fri, 27 Mar 2009 22:00:51 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[How To's]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[Stuff]]></category> <category><![CDATA[solver]]></category> <category><![CDATA[sudoku]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=273</guid> <description><![CDATA[Sudoku is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9×9 grid so that each column, each row, and each of the nine 3×3 boxes (also called blocks or regions) contains the digits from 1 to 9 only one time each. The puzzle setter provides a partially completed grid. I'm really not [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/how-to-run-python-code-in-windows-batch-bat-files/' rel='bookmark' title='Permanent Link: How to run python code in Windows batch (bat) files'>How to run python code in Windows batch (bat) files</a></li><li><a
href='http://blog.another-d-mention.ro/programming/python/quick-python-script-explanation/' rel='bookmark' title='Permanent Link: Quick Python Script Explanation'>Quick Python Script Explanation</a></li><li><a
href='http://blog.another-d-mention.ro/programming/how-to-clone-duplicate-an-object-in-actionscript-3/' rel='bookmark' title='Permanent Link: How to clone (duplicate) an object in ActionScript 3'>How to clone (duplicate) an object in ActionScript 3</a></li></ol>]]></description> <content:encoded><![CDATA[<p><a
href="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/03/lens1512255_sudoku12.gif"><img
class="alignleft size-full wp-image-280" style="margin: 10px 10px 10px 0px;" title="lens1512255_sudoku12" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/03/lens1512255_sudoku12.gif" alt="lens1512255 sudoku12 Sudoku solver in python" width="116" height="116" /></a>Sudoku is a logic-based, combinatorial number-placement puzzle. The objective is to fill a 9×9 grid so that each column, each row, and each of the nine 3×3 boxes (also called blocks or regions) contains the digits from 1 to 9 only <em>one</em> time each. The puzzle setter provides a partially completed grid.<br
/> I'm really not a sudoku fan but I love solving problems and sudoku offers you a challenging one. So...here's a the shortest sudoku solver written in python</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
</pre></td><td
class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> r<span style="color: black;">&#40;</span>a<span style="color: black;">&#41;</span>:i=a.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'0'</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">;</span>~i <span style="color: #ff7700;font-weight:bold;">or</span> exit<span style="color: black;">&#40;</span>a<span style="color: black;">&#41;</span><span style="color: #66cc66;">;</span><span style="color: black;">&#91;</span>m
<span style="color: #ff7700;font-weight:bold;">in</span><span style="color: black;">&#91;</span><span style="color: black;">&#40;</span>i-j<span style="color: black;">&#41;</span><span style="color: #66cc66;">%</span>9<span style="color: #66cc66;">*</span><span style="color: black;">&#40;</span>i/<span style="color: #ff4500;">9</span>^j/<span style="color: #ff4500;">9</span><span style="color: black;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: black;">&#40;</span>i/<span style="color: #ff4500;">27</span>^j/<span style="color: #ff4500;">27</span>|i<span style="color: #66cc66;">%</span>9/<span style="color: #ff4500;">3</span>^j<span style="color: #66cc66;">%</span>9/<span style="color: #ff4500;">3</span><span style="color: black;">&#41;</span><span style="color: #ff7700;font-weight:bold;">or</span> a<span style="color: black;">&#91;</span>j<span style="color: black;">&#93;</span><span style="color: #ff7700;font-weight:bold;">for</span>
j <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">81</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: #ff7700;font-weight:bold;">or</span> r<span style="color: black;">&#40;</span>a<span style="color: black;">&#91;</span>:i<span style="color: black;">&#93;</span>+m+a<span style="color: black;">&#91;</span>i+<span style="color: #ff4500;">1</span>:<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: #ff7700;font-weight:bold;">for</span> m <span style="color: #ff7700;font-weight:bold;">in</span><span style="color: #483d8b;">'%d'</span><span style="color: #66cc66;">%</span>5<span style="color: #66cc66;">**</span><span style="color: #ff4500;">18</span><span style="color: black;">&#93;</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">sys</span> <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #66cc66;">*;</span>r<span style="color: black;">&#40;</span>argv<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div><p>If you want to test that, save it in a file and use the command line to execute the code. Execute the code as following: <em>python solver.py puzzle</em> - where puzzle is an 81 character string representing the puzzle read left-to-right, top-to-bottom, and 0 is a blank space</p><div
class="wp_syntax"><div
class="code"><pre class="dos" style="font-family:monospace;">python solver.py 530070000600195000098000060800060003400803001700020006060000280000419005000080079</pre></div></div><p>The problem with the above code is that is really slow. Here's another one that runs about 100x faster and is less cryptic.</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td
class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> same_row<span style="color: black;">&#40;</span>i,j<span style="color: black;">&#41;</span>: <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#40;</span>i/<span style="color: #ff4500;">9</span> == j/<span style="color: #ff4500;">9</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">def</span> same_col<span style="color: black;">&#40;</span>i,j<span style="color: black;">&#41;</span>: <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#40;</span>i-j<span style="color: black;">&#41;</span> <span style="color: #66cc66;">%</span> <span style="color: #ff4500;">9</span> == <span style="color: #ff4500;">0</span>
<span style="color: #ff7700;font-weight:bold;">def</span> same_block<span style="color: black;">&#40;</span>i,j<span style="color: black;">&#41;</span>: <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#40;</span>i/<span style="color: #ff4500;">27</span> == j/<span style="color: #ff4500;">27</span> <span style="color: #ff7700;font-weight:bold;">and</span> i<span style="color: #66cc66;">%</span>9/<span style="color: #ff4500;">3</span> == j<span style="color: #66cc66;">%</span>9/<span style="color: #ff4500;">3</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> r<span style="color: black;">&#40;</span>a<span style="color: black;">&#41;</span>:
  i = a.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'0'</span><span style="color: black;">&#41;</span>
  <span style="color: #ff7700;font-weight:bold;">if</span> i == -<span style="color: #ff4500;">1</span>:
    <span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span>a<span style="color: black;">&#41;</span>
&nbsp;
  excluded_numbers = <span style="color: #008000;">set</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
  <span style="color: #ff7700;font-weight:bold;">for</span> j <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">81</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> same_row<span style="color: black;">&#40;</span>i,j<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">or</span> same_col<span style="color: black;">&#40;</span>i,j<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">or</span> same_block<span style="color: black;">&#40;</span>i,j<span style="color: black;">&#41;</span>:
      excluded_numbers.<span style="color: black;">add</span><span style="color: black;">&#40;</span>a<span style="color: black;">&#91;</span>j<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
&nbsp;
  <span style="color: #ff7700;font-weight:bold;">for</span> m <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #483d8b;">'123456789'</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> m <span style="color: #ff7700;font-weight:bold;">not</span> <span style="color: #ff7700;font-weight:bold;">in</span> excluded_numbers:
      <span style="color: #808080; font-style: italic;"># At this point, m is not excluded by any row, column, or block, so let's place it and recurse</span>
      r<span style="color: black;">&#40;</span>a<span style="color: black;">&#91;</span>:i<span style="color: black;">&#93;</span>+m+a<span style="color: black;">&#91;</span>i+<span style="color: #ff4500;">1</span>:<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
  <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#41;</span> == <span style="color: #ff4500;">2</span> <span style="color: #ff7700;font-weight:bold;">and</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> == <span style="color: #ff4500;">81</span>:
    r<span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
  <span style="color: #ff7700;font-weight:bold;">else</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'Usage: python sudoku.py puzzle'</span></pre></td></tr></table></div><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/how-to-run-python-code-in-windows-batch-bat-files/' rel='bookmark' title='Permanent Link: How to run python code in Windows batch (bat) files'>How to run python code in Windows batch (bat) files</a></li><li><a
href='http://blog.another-d-mention.ro/programming/python/quick-python-script-explanation/' rel='bookmark' title='Permanent Link: Quick Python Script Explanation'>Quick Python Script Explanation</a></li><li><a
href='http://blog.another-d-mention.ro/programming/how-to-clone-duplicate-an-object-in-actionscript-3/' rel='bookmark' title='Permanent Link: How to clone (duplicate) an object in ActionScript 3'>How to clone (duplicate) an object in ActionScript 3</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/programming/sudoku-solver-in-python/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How Software Companies Die</title><link>http://blog.another-d-mention.ro/misc/how-software-companies-die/</link> <comments>http://blog.another-d-mention.ro/misc/how-software-companies-die/#comments</comments> <pubDate>Thu, 26 Mar 2009 15:18:16 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Misc]]></category> <category><![CDATA[Stuff]]></category> <category><![CDATA[developer]]></category> <category><![CDATA[orson scott card]]></category> <category><![CDATA[programmer]]></category> <category><![CDATA[Software]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=265</guid> <description><![CDATA[The environment that nurtures creative programmers kills management and marketing types - and vice versa. Programming is the Great Game. It consumes you, body and soul. When you're caught up in it, nothing else matters. When you emerge into daylight, you might well discover that you're a hundred pounds overweight, your underwear is older than [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/visual-versioning-for-designers/' rel='bookmark' title='Permanent Link: Visual versioning for designers'>Visual versioning for designers</a></li><li><a
href='http://blog.another-d-mention.ro/misc/stories-for-a-it-audience/the-story-of-mel-a-real-programmer/' rel='bookmark' title='Permanent Link: The Story of Mel, a Real Programmer'>The Story of Mel, a Real Programmer</a></li><li><a
href='http://blog.another-d-mention.ro/misc/stories-for-a-it-audience/the-parable-of-the-two-programmers/' rel='bookmark' title='Permanent Link: The Parable of the Two Programmers'>The Parable of the Two Programmers</a></li></ol>]]></description> <content:encoded><![CDATA[<p><a
href="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/03/orson-scott-card_03.jpg"><img
class="alignleft size-medium wp-image-266" style="margin:0px 10px 10px 0px;" title="orson-scott-card_03" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/03/orson-scott-card_03-225x300.jpg" alt="orson scott card 03 225x300 How Software Companies Die" width="135" height="180" /></a>The environment that nurtures creative programmers kills management and marketing types - and vice versa. Programming is the Great Game. It consumes you, body and soul. When you're caught up in it, nothing else matters. When you emerge into daylight, you might well discover that you're a hundred pounds overweight, your underwear is older than the average first grader, and judging from the number of pizza boxes lying around, it must be spring already. But you don't care, because your program runs, and the code is fast and clever and tight. You won.</p><p>You're aware that some people think you're a nerd. So what? They're not players. To them C++ is a decent grade, almost a B - not a language. They barely exist. Like soldiers or artists, you don't care about the opinions of civilians. You're building something intricate and fine. They'll never understand it.</p><p><strong>BEEKEEPING</strong></p><p>Here's the secret that every successful software company is based on: You can domesticate programmers the way beekeepers tame bees. You can't exactly communicate with them, but you can get them to swarm in one place and when they're not looking, you can carry off the honey.</p><p>You keep these bees from stinging by paying them money. More money than they know what to do with. But that's less than you might think. You see, all these programmers keep hearing their fathers' voices in their heads saying "When are you going to join the real world?" All you have to pay them is enough money that they can answer (also in their heads) "Geez, Dad, I'm making more than you." On average, this is cheap.</p><p>And you get them to stay in the hive by giving them other coders to swarm with. The only person whose praise matters is another programmer. Less-talented programmers will idolize them; evenly matched ones will challenge and goad one another; and if you want to get a good swarm, you make sure that you have at least one certified genius coder that they can all look up to, even if he glances at other people's code only long enough to sneer at it.</p><p>He's a Player, thinks the junior programmer. He looked at my code. That is enough. If a software company provides such a hive, the coders will give up sleep, love, health, and clean laundry, while the company keeps the bulk of the money.</p><p><strong>OUT OF CONTROL</strong></p><p>Here's the problem that ends up killing company after company. All successful software companies had, as their dominant personality, a leader who nurtured programmers. But no company can keep such a leader forever. Either he cashes out, or he brings in management types who end up driving him out, or he changes and becomes a management type himself. One way or another, marketers get control.</p><p>But...control of what? Instead of finding assembly lines of productive workers, they quickly discover that their product is produced by utterly unpredictable, uncooperative, disobedient, and worst of all, unattractive people who resist all attempts at management. Put them on a time clock, dress them in suits, and they become sullen and start sabotaging the product. Worst of all, you can sense that they are making fun of you with every word they say.</p><p><strong>SMOKED OUT</strong></p><p>The shock is greater for the coder, though. He suddenly finds that alien creatures control his life. Meetings, Schedules, Reports. And now someone demands that he PLAN all his programming and then stick to the plan, never improving, never tweaking, and never, never touching some other team's code. The lousy young programmer who once worshipped him is now his tyrannical boss, a position he got because he played golf with some sphincter in a suit.</p><p>The hive has been ruined. The best coders leave. And the marketers, comfortable now because they're surrounded by power neckties and they have things under control, are baffled that each new iteration of their software loses market share as the code bloats and the bugs proliferate. Got to get some better packaging. Yeah, that's it.</p><p
style="text-align: right;"><strong>Orson Scott Card </strong><em>{Windows Sources, March 1995, p. 208}</em></p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/misc/visual-versioning-for-designers/' rel='bookmark' title='Permanent Link: Visual versioning for designers'>Visual versioning for designers</a></li><li><a
href='http://blog.another-d-mention.ro/misc/stories-for-a-it-audience/the-story-of-mel-a-real-programmer/' rel='bookmark' title='Permanent Link: The Story of Mel, a Real Programmer'>The Story of Mel, a Real Programmer</a></li><li><a
href='http://blog.another-d-mention.ro/misc/stories-for-a-it-audience/the-parable-of-the-two-programmers/' rel='bookmark' title='Permanent Link: The Parable of the Two Programmers'>The Parable of the Two Programmers</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/misc/how-software-companies-die/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
