<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Lovor blog]]></title>
  <link href="http://blog.lovor.net/atom.xml" rel="self"/>
  <link href="http://blog.lovor.net/"/>
  <updated>2013-04-25T21:02:28+02:00</updated>
  <id>http://blog.lovor.net/</id>
  <author>
    <name><![CDATA[Dušan D. Majkić]]></name>
    <email><![CDATA[dmajkic@lovor.net]]></email>
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Posterous to Octopress on Windows]]></title>
    <link href="http://blog.lovor.net/posterous-to-octopress-on-windows/"/>
    <updated>2013-04-24T13:16:00+02:00</updated>
    <id>http://blog.lovor.net/posterous-to-octopress-on-windows</id>
    <content type="html"><![CDATA[<p>I just moved this blog from Posterous to vps hosted <a href="http://www.octopress.org">Octopress</a>. I&#8217;ll cover just a few Windows tips that could get into way.</p>

<p>You&#8217;ll obviously need Ruby. Go to <a href="http://www.rubyinstaller.org">RubyInstaller</a> to get excellent Ruby prepackaged for Windows. I tried with both Ruby2.0 32bit and 64bit. And both work fine.</p>

<p>Check that you are using correct DevKit. <em>eg. 64bit Ruby requires 64bit DevKit</em>. Octopress setup and installation after that should go fine. Just follow instructions. Only one thing to note: you should avoid paths with spaces and accented national characters in path. C:/Users/username/Documents/blog should be just fine, is your user name is without spaces and accented chars.</p>

<p>Import is done by following Jekyll wiki. Check <a href="https://github.com/mojombo/jekyll/wiki/blog-migrations#posterous">here</a>.</p>

<p>There was an error generating site that read something like incompatible 852 and utf-8. 852 is my OEM (console) code page.  You just need to change code page of your console to utf-8. You can do that by simply typing:</p>

<pre><code>C:\chcp 65001
</code></pre>

<p>Note that this changes code page in current console session only.</p>

<p>Since Octopress supports rsync out-of-the box, which is not supported on Windows, I chose to capify deployment. This means adding capistrano to gems, and setup simple deploy_via :copy solution.</p>

<p>That&#8217;s it. It wasn&#8217;t too hard.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Redis on Windows is now stronger]]></title>
    <link href="http://blog.lovor.net/redis-on-windows-is-now-stronger/"/>
    <updated>2012-04-30T00:00:00+02:00</updated>
    <id>http://blog.lovor.net/redis-on-windows-is-now-stronger</id>
    <content type="html"><![CDATA[<p>I was told it was never meant to be. <br />I was told that it will get me a lonesome, laughable spot.<p />Yet, I took that kid under my repo, showed him a trick <br />or two, like how to live without a fork. Made him simple, <br />constant and present. <p />I had a honor to communicate with Salvatore, Claudio, <br />and also with other people who contributed code, or <br />pointed at glitches.<p />Now the time has come to let the kid move on.<p />The new home for Redis on Windows is fully open,<br />developed in open; contributions welcomed. There are <br />more capable hands on the deck. There is a fork <br />alternative, perhaps even better than fork itself.<br />It will be tested more and deployed.<p />Redis on Windows is now stronger. <p />So, rethink your project. Get involved. It is here:<p /><a href="https://github.com/MSOpenTech/redis">https://github.com/MSOpenTech/redis</a> <p />Thank you.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Don't miss "The Little Redis Book"]]></title>
    <link href="http://blog.lovor.net/dont-miss-the-little-redis-book/"/>
    <updated>2012-01-23T00:00:00+01:00</updated>
    <id>http://blog.lovor.net/dont-miss-the-little-redis-book</id>
    <content type="html"><![CDATA[<p>Karl Seguin did a great job.</p>
<p>Go get it at:<br /><a href="http://openmymind.net/2012/1/23/The-Little-Redis-Book/">http://openmymind.net/2012/1/23/The-Little-Redis-Book/</a></p>
<p>You can also fork the project and translate it on github:<br /><a href="http://github.com/karlseguin/the-little-redis-book">http://github.com/karlseguin/the-little-redis-book</a></p>
<p><br />Good work, Karl!<p /></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Redis 2.4 Windows port is ready]]></title>
    <link href="http://blog.lovor.net/redis-24-windows-port-is-ready/"/>
    <updated>2011-10-17T00:00:00+02:00</updated>
    <id>http://blog.lovor.net/redis-24-windows-port-is-ready</id>
    <content type="html"><![CDATA[<p>New version 2.4.0 from &#8220;2.4&#8221; branch is ready.<p />Windows notice:<p />Background saving operations are supported as foreground<br />on windows, so it is advised to turn off automatic saving,<br />and call SAVE and SAVEAOF manualy when needed.<p />Forked source is at:<p />&nbsp; <a href="http://github.com/dmajkic/redis">http://github.com/dmajkic/redis</a><p />Windows binary files (both 32bit and x64) are hanging at:<p />&nbsp; <a href="http://github.com/dmajkic/redis/downloads">http://github.com/dmajkic/redis/downloads</a><p />Direct download link for 2.4.0 binaries: <p />&nbsp; <a href="https://github.com/downloads/dmajkic/redis/redis-2.4.0-win32-win64.zip">https://github.com/downloads/dmajkic/redis/redis-2.4.0-win32-win64.zip</a><p />I&#8217;ll use Redis 2.4 internaly from now on since it is faster, <br />takes less memory, and tests take significant less time to execute.<p />2.2 forked branch should receive an update in a day or two, <br />to match official 2.2.14 and with backported fixes from 2.4 port.<p /><br />Thank you for support.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Redis for Windows 2.2.12 ready]]></title>
    <link href="http://blog.lovor.net/redis-for-windows-2212-ready/"/>
    <updated>2011-07-27T00:00:00+02:00</updated>
    <id>http://blog.lovor.net/redis-for-windows-2212-ready</id>
    <content type="html"><![CDATA[<p>Prebuilt binaries for 2.2.12, both 32bit and x64 versions, can be downloaded from here:</p>
<p>Direct link:</p>
<p><a href="https://github.com/downloads/dmajkic/redis/redis-2.2.12-win32-win64.zip">https://github.com/downloads/dmajkic/redis/redis-2.2.12-win32-win64.zip</a></p>
<p>Other versions are there too:</p>
<p><a href="https://github.com/dmajkic/redis/downloads" target="_blank">https://github.com/dmajkic/redis/downloads</a></p>
<p>&nbsp;</p>
<p>Source code is on GitHub</p>
<p><a href="https://github.com/dmajkic/redis" target="_blank">https://github.com/dmajkic/redis</a></p>
<p>&nbsp;</p>
<p>Regards.</p>
<p>Dusan Majkic</p>
<p>&nbsp;</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[64bit Redis Windows port - done.]]></title>
    <link href="http://blog.lovor.net/64bit-redis-windows-port-done/"/>
    <updated>2010-11-18T00:00:00+01:00</updated>
    <id>http://blog.lovor.net/64bit-redis-windows-port-done</id>
    <content type="html"><![CDATA[<p>Windows x64 build is ready and passes all tests.<p />  Please note that there are more differences between 64bit Linux and 64 bit Windows, than on 32bit, so this build should be treated as &#8220;needs more testing&#8221;, beside the fact that all supplied redis tests pass.<p />  Prebuilt binaries for v2.1.7, both 32bit and x64 versions, can be downloaded from here:<p />  <a href="https://github.com/dmajkic/redis/downloads" target="_blank">https://github.com/dmajkic/redis/downloads</a><p />  Source code is on GitHub<p />  <a href="https://github.com/dmajkic/redis" target="_blank">https://github.com/dmajkic/redis</a><p /> </p>
<p>Regards.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Ported Redis to Windows]]></title>
    <link href="http://blog.lovor.net/ported-redis-to-windows/"/>
    <updated>2010-10-16T00:00:00+02:00</updated>
    <id>http://blog.lovor.net/ported-redis-to-windows</id>
    <content type="html"><![CDATA[<p><span style="font-family: arial, sans-serif; border-collapse: collapse;">Since I am officially on vacation and since I won&#8217;t travel anywhere, at&nbsp;least I can&nbsp;do is to support projects I like. Redis is first.</span></p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;">I was already exploring redis, learning how it works. While doing so, I came&nbsp;close to full win32 port. Moments ago I polished a few last bits and&nbsp;here it is.</span></p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;">Details:</span></p>
<ul>
<li>Native MinGW port, no external dependencies</li>
<li>Windows 32 (didn&#8217;t try to compile on Win64)</li>
<li>Everything is ported: server, client, linenoise, fix utils, benchmark.</li>
<li>As close to unix version as possible</li>
<li>All tests pass</li>
<li>All commands work</li>
<li>Only caveat is since there is no fork() on windows<br />commands using it do work, but they work in foreground.</li>
</ul>
<p><br />If you have full msysGit or ruby DevKit you can clone&nbsp;<a href="http://github.com/dmajkic/redis">my repository</a> and build it using make from command line.&nbsp;More detail in README and source code comments, and&nbsp;<span style="font-family: arial, sans-serif; border-collapse: collapse;">I&#8217;ll post more here about porting.</span></p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;">Source code</span></p>
<p style="padding-left: 30px;"><span style="font-family: arial, sans-serif; border-collapse: collapse;"><a href="http://github.com/dmajkic/redis" target="_blank" style="color: #0658b5;">http://github.com/dmajkic/redis</a></span></p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;"><br />Prebuild binaries (Win32)</span></p>
<p style="padding-left: 30px;"><span style="font-family: arial, sans-serif; border-collapse: collapse;"><a href="http://github.com/dmajkic/redis/downloads" target="_blank" style="color: #0658b5;">http://github.com/dmajkic/redis/downloads</a>&nbsp;&nbsp;(looks like GitHub denies access)</span></p>
<p style="padding-left: 30px;"><span style="font-family: arial, sans-serif; border-collapse: collapse;"><span style="font-family: arial, sans-serif;"><a href="http://dl.dropbox.com/u/2931334/redis-2.1.4-win32.zip">http://dl.dropbox.com/u/2931334/redis-2.1.4-win32.zip</a> (alternate location)</span></span></p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;">More about redis: </span></p>
<p style="padding-left: 30px;"><span style="font-family: arial, sans-serif; border-collapse: collapse;"><a href="http://www.redis.io">http://www.redis.io</a>&nbsp;</span></p>
<p style="padding-left: 30px;">&nbsp;</p>
<p>Stay tuned.&nbsp;</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[GitHub supports Serbian language]]></title>
    <link href="http://blog.lovor.net/github-supports-serbian-language/"/>
    <updated>2010-07-14T00:00:00+02:00</updated>
    <id>http://blog.lovor.net/github-supports-serbian-language</id>
    <content type="html"><![CDATA[<p>GitHub supports <a href="http://github.com/blog/679-github-in-your-language?locale=sr">Serbian</a> language. More on GitHub blog:</p>
<p><a href="http://github.com/blog/679-github-in-your-language">http://github.com/blog/679-github-in-your-language</a></p>
<p>Nice. I wonder how Serbian and Croatian got into 8 languages supported by GitHub. </p>
<p> </p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Ruby 1.9.1 on Windows with Rails, MS SQL Server and Cucumber]]></title>
    <link href="http://blog.lovor.net/ruby-191-on-windows-with-rails-ms-sql-server/"/>
    <updated>2010-03-05T00:00:00+01:00</updated>
    <id>http://blog.lovor.net/ruby-191-on-windows-with-rails-ms-sql-server</id>
    <content type="html"><![CDATA[<p><em>Cucumber: For future reference, and time-saving, here is what we did.</em></p>
<p><strong><span style="font-size: medium;">Why wolud anybody use Ruby on Windows? With Microsoft SQL Server?</span></strong></p>
<p>At the <a href="http://www.wings.rs" target="_blank">company where I work</a>&nbsp;we decided to generate db integration tests. We need database model rock solid for new release we are planing soon. Our old db test system was based on pure SQL, and was working fine. but model itself got complex and SQL is far from what user wants to do and wants to see. We realized that we need test that is very close to what non-tech user is actually talking about,&nbsp;</p>
<p>I did a small research and found <a href="http://cukes.info/" target="_blank">Cucumber</a>, and after a few tweaks we got excellent results.&nbsp;For future reference, and time-saving, here is what we did.</p>
<p>In Ruby slang we &#8220;created rails project connecting activerecord with legacy database on MS SQL Server, using Cucumber for testing&#8221;</p>
<p><strong><span style="font-size: medium;">Let&#8217;s go: Download Ruby 1.9.1 and install gems&nbsp;</span></strong></p>
<p>You can install from installer, but I&#8217;ll start from plain 7zip file:&nbsp;</p>
<p><span style="font-size: small;"><a href="http://rubyforge.org/frs/download.php/69035/rubyinstaller-1.9.1-p378-rc2.exe" title="Ruby 1.9.1 windows installer">http://rubyforge.org/frs/download.php/69039/ruby-1.9.1-p378-i386-mingw32.7z</a></span></p>
<p>Unzip it to C:\Ruby191, and make that dir accessible to all users. This is where all ruby files and gems will be located.&nbsp;</p>
<p>Add&nbsp;C:\Ruby191\bin to your PATH. After that try these two commands:&nbsp;</p>
<p><strong>ruby &#8211;version<br />gem -v</strong></p>
<p>If you get versions (1.9.x and 1.3.x), you are ready to start with basic gems:</p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;"><strong>gem install &#8211;no-rdoc &#8211;no-ri rails&nbsp;<br />gem install &#8211;no-rdoc &#8211;no-ri database_cleaner factory_girl rspec rspec-rails cucumber cucumber-rails</strong></span></p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;">You can now create a rails app, but be patient. We need to set a few more things.</span></p>
<p><strong><span style="font-size: medium;">Tricky part 1: Connecting to MS SQL Server from Ruby 1.9.1</span></strong>&nbsp;</p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;"><strong>gem install &#8211;no-rdoc &#8211;no-ri activerecord-sqlserver-adapter</strong></span></p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;">This will do on 1.8.6 and 1.8.7. But it is not enough for 1.9.1</span></p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;">For <strong>1.9.1</strong> to work you need to download this file (thanks to&nbsp;<span style="border-collapse: separate; font-family: Lucida Grande, verdana, arial, helvetica, sans-serif; font-size: 12px;">Cosimo Guglielmucci<span style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse;">):</span></span></span></p>
<p style="padding-left: 30px;"><span style="font-family: arial, sans-serif; border-collapse: collapse;"><span style="border-collapse: separate; font-family: Arial, Helvetica, sans-serif;"><strong><a href="http://web.tiscali.it/mamva/ruby19-odbc-mswin32.zip" target="_blank">http://web.tiscali.it/mamva/ruby19-odbc-mswin32.zip</a></strong></span></span></p>
<p><span style="font-family: arial, sans-serif;"><span style="border-collapse: collapse;">And unzip it to the C:\<span style="border-collapse: separate; font-family: Arial, Helvetica, sans-serif;">Ruby19\lib\ruby\1.9.1\i386-mingw32\ folder. </span></span></span></p>
<p><span style="font-family: arial, sans-serif;"><span style="border-collapse: collapse;"><span style="border-collapse: separate; font-family: Arial, Helvetica, sans-serif;"><span style="font-family: arial, sans-serif; border-collapse: collapse;">Now you can create a rails app, and connect it to MS SQL, but we still need to set a few more things.</span></span></span></span></p>
<p><strong><span style="font-size: medium;">Tricky part 2: RSpec on Windows and Ruby 1.9.1</span></strong></p>
<p><span style="font-family: arial, sans-serif;"><span style="border-collapse: collapse;"><span style="border-collapse: separate; font-family: Arial, Helvetica, sans-serif;"><span style="font-family: arial, sans-serif; border-collapse: collapse;"><span style="border-collapse: separate; font-family: Arial, Helvetica, sans-serif;">RSpec gem relays on <strong>test-unit 1.2.3</strong>, but it will fail to load it if there is a newer one installed.&nbsp;Solution is simple. First find out which test-unit you have installed:&nbsp;</span></span></span></span></span></p>
<p><strong>gem list test-unit&nbsp;</strong></p>
<p>if there is no <strong><em>test-unit 1.2.3 <span style="font-weight: normal;"><span style="font-style: normal;">or there are more versions installed:&nbsp;</span></span></em></strong></p>
<p><strong><em>gem uninstall test-unit&nbsp;<br /><span style="font-style: normal; font-weight: normal;"><strong><em>gem install test-unit -v 1.2.3</em></strong></span></em></strong></p>
<p><strong><span style="font-size: medium;">Tricky part 3: Cucumber on Windows and Ruby 1.9.1</span></strong></p>
<p>Cucumber got it&#8217;s name as &#8221;<em>all green -&gt; you are done</em>&#8221;, and it relays on colored console output.&nbsp;On windows that means that cucumber depends on win32console gem.&nbsp;That gem fails on Ruby&nbsp;<strong>1.9.1</strong>. But there is a soulution (thanks to<a href="http://blog.mmediasys.com/"> Luis Lavena</a>)</p>
<p><span style="color: #ffffff;"><strong><span style="font-family: monospace; line-height: 13px;">gem install win32console &#8211;prerelease</span>.&nbsp;</strong></span></p>
<p>This command will install win32console beta version which works on 1.9.1&nbsp;</p>
<p>If your console codepage is not 1252, you will have incorect output - eg. incredible &#8221;<em>missing <strong>&#8216;a&#8217;</strong> problem</em>&#8221;.&nbsp;Solution is to chenge your console code page:&nbsp;</p>
<p><strong>chcp 1252</strong></p>
<p>Cucumber will also remember where it stopped with testing, but it saves path with backslashes on windows, and that backslash can trigger hard to spot errors (missing files, etc&#8230;). If you encounter such error just delete <strong>rerun.txt </strong>file in root of your project.&nbsp;</p>
<p>Solution for this is to set enviroment variable:&nbsp;</p>
<p><strong>SET CUCUMBER_FORWARD_SLASH_PATHS=true&nbsp;</strong></p>
<p>Since Cucumber need enviroment variables and chcp, the best thing to do is to create batch file in root of your project:</p>
<p>191.bat</p>
<p style="padding-left: 30px;">SET Path=%PATH%;C:\Ruby19\bin;</p>
<p style="padding-left: 30px;">SET HOME=%HOMEDRIVE%%HOMEPATH%</p>
<p style="padding-left: 30px;">SET GEM_BIN=C:\ruby19\bin&nbsp;</p>
<p style="padding-left: 30px;">SET CUCUMBER_OUTPUT_ENCODING=cp1252</p>
<p style="padding-left: 30px;"><span style="font-weight: normal;"><span style="font-style: normal;">SET CUCUMBER_FORWARD_SLASH_PATHS=true</span></span></p>
<p style="padding-left: 30px;"><span style="font-weight: normal;"><span style="font-style: normal;">chcp 1252</span></span></p>
<p style="padding-left: 30px;"><span style="font-weight: normal;"><span style="font-style: normal;">ruby &#8211;version</span></span></p>
<p style="padding-left: 30px;">&nbsp;</p>
<p><span style="font-weight: normal;"><span style="font-style: normal;">This will make Ruby and Cucumber happy. Open console, <em>cd</em> to your project and call 191.bat.&nbsp;In fact, I have <strong><em>186.bat</em></strong> and <strong><em>187.bat</em></strong>; each with its own gems.&nbsp;</span></span></p>
<p><strong><span style="font-size: medium;">Create your rails project&nbsp;</span></strong></p>
<p><span style="font-size: small;">We are using <strong>rails </strong>since it ties <strong>activerecord</strong>, <strong>rspec</strong> and <strong>cucumber</strong> very nice. With lots of examples.&nbsp;Please note that we are&nbsp;not&nbsp;making a website. Of course nothing stops you to do exacly that. Here is short command line tutorial:&nbsp;</span></p>
<p style="padding-left: 30px;"><span style="font-size: small;"><strong>rails dbtest<br />cd dbtest<br />ruby script/generate cucumber<br /></strong></span></p>
<p>Database connection is set in <strong>config/database.yml </strong>It should look like this<strong>:</strong></p>
<p style="padding-left: 30px;">development:<br />&nbsp;&nbsp;adapter: sqlserver<br />&nbsp;&nbsp;dsn: WingsTest</p>
<p style="padding-left: 30px;">test: &amp;TEST<br />&nbsp;&nbsp;adapter: sqlserver<br />&nbsp;&nbsp;dsn: WingsTest</p>
<p style="padding-left: 30px;">production:<br />&nbsp;&nbsp;adapter: sqlserver<br />&nbsp;&nbsp;dsn: WingsTest</p>
<p style="padding-left: 30px;">cucumber:<br />&nbsp;&nbsp;&lt;&lt;: *TEST</p>
<p>I created ODBC&nbsp;DSN &nbsp;(Control Panel-&gt;Administrative Tools-&gt;ODBC) for my database connection.<br /><strong><em><span style="font-style: normal; font-weight: normal;"><br /></span>Note that I&#8217;am using only one db, and you should use three if you are creating a website.<br /></em></strong></p>
<p><strong><em><span style="font-style: normal; font-weight: normal;"><strong><span style="font-size: medium;">Tricky part 4: Legacy MS SQL Server database on Rails</span></strong></span><br /></em></strong></p>
<p>First thing to notice is that <em><strong>activerecord</strong></em>&nbsp;expects lowercase table and field names.&nbsp;And our db is all uppercase.&nbsp;<p />Fastest solution was to patch&nbsp;<span style="font-family: arial, sans-serif; border-collapse: collapse;"><em><strong>activerecord-sqlserver-adapter. </strong><span style="font-style: normal;">Only thing changed was to insert LOWER(FIELD_NAME) in a few places where adapter fetches tablenames and field names metadata from SQL Server. The only file changed was:</span></em></span></p>
<p><span style="font-family: arial, sans-serif; border-collapse: collapse;"><em><span style="font-style: normal;">C:\Ruby19\lib\ruby\gems\1.9.1\gems\activerecord-sqlserver-adapter-2.3.4\lib\active_record\connection_adapters\sqlserver_adapter.rb&nbsp;</span></em></span></p>
<p><span style="font-family: arial, sans-serif;"><span style="border-collapse: collapse;">My patch is public. I forked <strong>activerecord-sqlserver-adapter</strong> on GitHub made change and published back my changes. You can get them from:<br /></span></span></p>
<p style="padding-left: 30px;"><span style="font-family: arial, sans-serif;"><span style="border-collapse: collapse;"><a href="http://github.com/dmajkic/2000-2005-adapter">http://github.com/dmajkic/2000-2005-adapter</a><br /></span></span></p>
<p><span style="font-family: arial, sans-serif;"><span style="border-collapse: collapse;">If you have <strong><span style="text-decoration: underline;">legacy</span></strong>&nbsp;database, that is <strong><span style="text-decoration: underline;">CaSE INsenSItiVE</span></strong>, you are welcome to use my fork.</span></span></p>
<p><span style="font-family: arial, sans-serif;"><span style="border-collapse: collapse;"><br />Then I generated <strong>schema.rb</strong>&nbsp;with<br /></span></span></p>
<p style="padding-left: 30px;"><span style="font-family: arial, sans-serif;"><span style="border-collapse: collapse;"><strong>rake db:schema:dump</strong></span></span></p>
<p><span style="font-family: arial, sans-serif;"><span style="border-collapse: collapse;">If your connection is ok, you will get&nbsp;<strong>schema.rb<span style="font-weight: normal;">&nbsp;file with all your tables.&nbsp;<strong><span style="font-weight: normal;">After that we added activerecord model or two just to get started with cucumber.</span></strong></span></strong></span></span></p>
<p><span style="font-family: arial, sans-serif; font-size: medium; border-collapse: collapse;"><strong>That&#8217;s it .&nbsp;</strong></span></p>
<p>If you are going to use Ruby for website development, you will need to follow more tutorials and go with installing more gems.</p>
<p><span style="border-collapse: collapse; font-size: small;"><span style="font-family: arial, sans-serif; font-size: 13px;">As for us, we now have a Cucumber &#8220;stage&#8221; set, and we are adding steps and scenarios as needed.&nbsp;</span></span></p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[St. Sava Street Race in Valjevo, Serbia]]></title>
    <link href="http://blog.lovor.net/st-sava-street-race-in-valjevo-serbia/"/>
    <updated>2010-01-26T00:00:00+01:00</updated>
    <id>http://blog.lovor.net/st-sava-street-race-in-valjevo-serbia</id>
    <content type="html"><![CDATA[<p>27. January is celebrated as <a href="http://en.wikipedia.org/wiki/Saint_Sava" title="Saint Sava" target="_blank">Saint Sava</a> day in Serbia, and that is the time when schools and students are tributing his life through art and sport performances.</p>
<p>Valjevo is no difference, and since 1993. City of Valjevo and Athletic Club Metalac organise <strong><em>St. Sava Street Race. </em><span style="font-weight: normal;">&nbsp;Beside youg categoriies, race also features senior competition and is considered a first winter test.&nbsp;</span></strong></p>
<p><strong><span style="font-weight: normal;">Race it self has an interesting history: it was started in hard times, by the people who where first to stand for democracy in Serbia, first race winner was famous serbian athlete <a href="http://sr.wikipedia.org/sr-el/%D0%93%D0%BE%D1%80%D0%B0%D0%BD_%D0%A0%D0%B0%D0%B8%D1%87%D0%B5%D0%B2%D0%B8%D1%9B" title="Goran Raičević na Wikipediji" target="_blank">Goran Raičević.</a>&nbsp;</span></strong></p>
<p>Official site of the Street Race is <a href="http://www.svetosavskatrka.org" title="www.svetosavskatrka.org" target="_blank">www.svetosavskatrka.org</a>&nbsp;where you can find more about race history, results, street tracks and so on. Site is in serbian cyrilc, so please use google translate.&nbsp;</p>
<p>See you on start.&nbsp;</p>
<p>&nbsp;</p>
<p><strong><em><br /></em></strong></p>
<p>&nbsp;</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[While reading about Google's Go]]></title>
    <link href="http://blog.lovor.net/while-reading-about-googles-go/"/>
    <updated>2009-11-11T00:00:00+01:00</updated>
    <id>http://blog.lovor.net/while-reading-about-googles-go</id>
    <content type="html"><![CDATA[<p>
<p>In &#8220;The&nbsp;Go&nbsp;Programming Language Part 3&#8221; Rob Pike wrote&nbsp;</p>
<p style="padding-left: 30px;">&#8221; &#8230;</p>
<p style="padding-left: 30px;"><strong><em>There are many concurrency questions. They will&nbsp;</em></strong></p>
<p style="padding-left: 30px;"><strong><em>be addressed later; for now just assume it all&nbsp;</em></strong></p>
<p style="padding-left: 30px;"><strong><em>works as advertised.</em></strong></p>
<p style="padding-left: 30px;"><strong><em>&#8230;</em><span style="font-weight: normal;"><strong><em>&#8221;</em></strong></span></strong></p>
<p>&nbsp;</p>
<p><span style="font-size: small;">This is a good intro. Will&nbsp;</span><span style="font-size: small;">definitely</span><span style="font-size: small;">&nbsp;use it. &nbsp;</span></p>
</p>
<p>Go? &nbsp;<br />Yes, I also got that strange feeling about current bloat, and &#8220;no-fun&#8221; of modern programming languages. But I can&#8217;t say that Go will solve everything. Future Landing on Android and Native Client platforms could help.</p>
<p>I like it on first sight. It looks small, easy and simple on the front, and yet powerful in the back.</p>
<p>Like Google wants Go to be to programming languages what Google home page is to the web.</p>
<p>Still reading about it.&nbsp;Added to &#8220;track this&#8221; mail label.&nbsp;</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Predlog za sr_RS Collation]]></title>
    <link href="http://blog.lovor.net/predlog-za-srrs-collation/"/>
    <updated>2008-09-17T00:00:00+02:00</updated>
    <id>http://blog.lovor.net/predlog-za-srrs-collation</id>
    <content type="html"><![CDATA[Unicode vlada. Već dugo su Windows .Net  i Java okruženja  zaživela na UTF-16 unikod kodiranju, dok na internetu najveći broj stranica koristi UTF-8. Iz ugla nekog čija kultura koristi i ćirilicu i latinicu, i koja se kao takva nikada nije uklapala u nekakve kodne strane, mogu reći - Napokon!

Uz malo sreće i fontova i <strong>Š</strong> i <strong>Ш</strong> će biti prikazani na vašem ekranu. Ali kako će biti sortirani?  To je predmet ovog predloga. Dozvolite prvo da vam predstavim haos koji postoji sa srpskim jezikom i pravilima za sortiranje.
<h2>Srpski kroz internet vekove</h2>
Imamo oznaku <strong>&#8220;sr&#8221; </strong>za jezik<strong>. </strong>Koja je po ISO standardu postala &#8221;<strong>sr_YU</strong>&#8221;, ali to je bilo ASCII vreme, pa su se pojavlie i &#8221;<strong>sr_YU@Latin</strong>&#8220;  i  &#8221;<strong>sr_YU@Cyrilic&#8221;. </strong>Onda je došao period sankcija gde je isplivao  &#8221;<strong>sr_SP</strong>&#8221; uz  Latin i Cyrilic dodatak. Interesantno da je neko predpostavio da će Srbija dobiti SP kao ISO oznaku zemlje umesto YU, a ostali su prepisivali. I svi su pogrešili - dobili smo CS.  A uz to i &#8221;<strong>sr_CS</strong>&#8221; (Windows i .Net 2.0) . Pojavio se i &#8220;Serbian (BIH)&#8221;.  Ove godine nakon osamostaljenja Srbije zaživela je, napokon, i ISO oznaka <strong>RS</strong>.

Nisam video da se negde koristi <strong>sr_RS</strong>, pa sam ovde hteo da skrenem pažnju kako da se nova oznaka iskoristi da se dobije upotrebljivo rešenje u skladu sa jezikom.
<h2>ORDER BY Prezime COLLATE sr_RS</h2>
Većina sadržaja kojeg uopšte treba sortirati se nalazi u bazama podataka. Najveći igrači na tom polju su Oracle, Microsoft SQL Server, MySQL, IBM DB2 i drugi. Kada poželite da dobijete neki sortiran sadržaj, serveru se šalje <strong>ORDER BY</strong> komanda. Ako je navedena tekstualna kolona, server sortira podatke koristeći pravila za sortiranje (collation) . U praksi se navede podrazumevan collation kod kreiranja baze koji onda važi za sve tabele.

Na posletku, ako želite da postavite colation na srpski, morate prvo da pronađete koji srpski želite (ako postoji!) i morate da se odlučite između ćirilice i latinice.   Ta odluka  uvek ide na štetu ćirilice. Pitate se zašto?  Uzvraćam pitanjem. Da li ste ikada videli srpsku ćiriličnu tastaturu?

U unikod svetu to nije porebno. Evo zašto i kako.
<h2>Jedna korisnica je Ana a druga Ана.</h2>
Collation za ćirilicu i latinicu je razdvojen jer tako piše u pravopisu srpskog jezika. Odabereš pismo, i pišeš onim koji si odabrao. Razlog za to je praktičan - ako napišem CABA, da li sam napisao Sava? ili na Цабa?  Sa druge strane internet dozvoljava da i ćirilica i latinica završe u istoj bazi.

Iako slova isto izgledaju, unikod ispod haube vrlo dobro zna da li pišem ćirilicom ili latinicom. Naime u unikodu <strong>a</strong> (latinično) i <strong>а</strong> (ćirilično) su dva totalno različita slova koja se nalaze na različitim pozicijama u fontu. Isto izgledaju, ali su to dva različita znaka.
<h2>sr_RS kao rešenje i spas</h2>
<strong>sr_RS</strong> treba da bude sortiranje koje uzima u obzir i latinicu i ćirilicu. U isto vreme i bez razdvajanja. Možemo dati prednost ćirilici da ide uvek prva. Ili da zagrizemo i napravimo mešan sort azbuke i abecede, ali mi se to čini ipak predaleko.

Sa ćirilicom i latinicom <strong>sr_RS</strong> bi takođe bio način da sprečimo da internet potpuno ubije srpsku ćirilicu. Nadam se da će ovo pročitati i timovi koji rade prevođenja i implementacije vezane za srpski jezik, jer očigledno je da ovde postoji još mesta za raspravu. Ali kratku i efikasnu.

Srpski jezik zaslužuje sistemski, a ne stihijski tretman.
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[MSDN day: Enitity Framework i LINQ umesto SQL upita]]></title>
    <link href="http://blog.lovor.net/msdn-day-enitity-framework-i-linq-umesto-sql/"/>
    <updated>2008-05-29T00:00:00+02:00</updated>
    <id>http://blog.lovor.net/msdn-day-enitity-framework-i-linq-umesto-sql</id>
    <content type="html"><![CDATA[LINQ je već tu, a Entity Framework je u završnoj fazi, i trebalo bi da se finalna verzija uskoro nađe u sastavu SP1 za net 3.5 kao i SP1 za Visual Studio 2008.

Obratite pažnu - obe tehnologije će biti u srcu i Visual Studija i DotNeta.  Ali zašto je Microsoft odlučio da da baš ove tehnologije dobiju prioritet?  Da bi možda bili bliže odgovoru, hajde da probamo da razumemo zašto je SQL postao &#8220;loš&#8221; momak.
<h2>SQL u poslovnim aplikacijama</h2>
SQL je nastao u IBM-u još 1970. To znači da je stariji od većine učesnika jučerašnjeg &#8220;MSDN day&#8221; skupa, a, boga mi, i predavača. SQL ima 300 internet godina, a opet je okosnica celokupnog današnjeg poslovnog softvera. SQL živi iza skoro svakog sajta na internetu,  iza gotovo svake poslovne klijent-server aplikacije. Jasno je da će SQL još dugo, dugo biti sa nama.

Sa druge strane, stvari na polju softvera su dosta napredovale. Od C-a se došlo do Jave i C# i Rubija. Internet Explorer, FireFox, Safari su novi terminali.  To je upravo taj nesklad - SQL se i u najmodernijim programski jezicima i dalje pojavljuje kao čist tekst, odnosno string. To nije dobro. Prvo zbog sigurnosti; Dovoljno je da neko zlonamerno ubaci svoj SQL string uz vaš, i da vaši podaci postanu nesigurni. Baš ova metoda napada je dosta česta i poznatija je kao <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL Injection</a>.

Sadržaj stringa će vaš kompajler uzeti zdravo za gotovo. Ako ste vi ili neko drugi izmenili naziv nekog polja u bazi,  vaš do juče ispravni SQL će prijaviti grešku - ali tek kada taj string stigne do SQL servera. To može biti u test proceduri, a može biti i u produkcionoj verziji kod korisnika.

Ne manje bitna stvar je da sadržaj stringa ne podržava  <strong>IntelliSense </strong>tehnologiju. Ako imate nekoliko stotina tabela, pogleda, procedura, ili ako te tabele i njihova polja razvija neki drugi tim - taj nedostatak će sigurno usporiti razvoj.
<h2>LINQ i Entity Framework u pomoć</h2>
LINQ, odnosno LINQ to SQL rešava jedan deo problema. Vaš upit nije više string, već postaje ravnopravan dotnet kod. I SQL je tu, ali se generiše i izvršava u pozadini. A Entity  Framework ide i korak dalje.  On će vam predstaviti model baze kao model objekata sa relacijama.  Vi pišete nešto kao <strong><em>Order.Partner.Adress</em></strong> sa tim da posle tačke na Order, dobijete <strong>Intellisense</strong> listu sa poljima iz Orders tabele, uključujući i objekat Partner sa podacima o partneru. <em>Order</em> je entitet a <em>Orders </em>kolekcija.

Gospodin Dragoslav Ogar je na prezentaciji efektno prikazao i kako se takav kod ponaša kada se samo promeni konekcija na drugu bazu,  kako radi Intellisense i kako se brzo mapiraju veze.  Takođe smo u SQL profajleru mogli videli kako se entiteti pretvaraju u SQL i kako izgleda SQL koji stiže na SQL server.
<h2>Šta koristiti?</h2>
Obzirom da je LINQ jedna og udarnih stvari novog dotnet okruženja, i da će Entity Framework biti u srcu verzije 3.5 SP1,  jasno je da je postavljen nov pravac kako će aplikacije &#8220;razgovarati&#8221; sa SQL serverima. Pre svih - poslovne aplikacije.

Sa druge strane Entity Framewok još nije u finalnoj verziji. To se videlo i na prezentaciji, gde je napomenuto da neki tipovi podataka nisu podržani. Dodat je još jedan, ORM sloj između korisnika i podataka.  Da bi sve radilo kako treba, neophodna su mapranja, odnosno XML fajlovi u kojima stoji kako se podaci iz baze preslikavaju na entitete i kolekcije.  Ta mapiranja imaće svoj dizajner u najnovijem Visual Studiju.

Dakle ostaje da nove tehnologije povlače za sobom prelazak na nove alate.
Najnovije, najnovije, najnovije&#8230;

Konačan sud doneće korisnici, odnosno razvojni timovi širom planete. Ja sam lično ubeđen da SQL lagano odlazi putem asemblera i C-a &#8211; prisutan ali sakriven od većine.
<h2>Trivia za kraj</h2>
Imao sam tu sreću da početkom devedesetih budem srednjoškolac u IV Beogradskoj gimnaziji, na matematičko-programerskom smeru.  Tada je na neki od računarskih predmeta došao mlad profesor, za koga su svi tvrdili da stvarno nešto zna o programiranju. I ne samo to. Bio je glasan, ali  je umeo da debatu vodi tako da nestane klasičan odnos profesor-učenik.  Takođe je imao dovoljno neobično prezime koje je odmah postalo i nadimak - Ogar.

MSDN predavanje je, bar za mene, bilo i krajnje simpatičan flashback.  I gle, sad imam pred sobom MS papir da ocenim predavača i predavanje. I to ocenom od 1 do 5!  Hm, kako život okreće stvari.

Čista petica - naravno.  Bilo mi je zadovoljstvo biti prisutan.
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[5 stavki za va&scaron; CV ako hoćete da se bavite poslovnim softverom]]></title>
    <link href="http://blog.lovor.net/5-stavki-za-vascaron-cv-ako-hocete-da-se-bavi/"/>
    <updated>2008-03-23T00:00:00+01:00</updated>
    <id>http://blog.lovor.net/5-stavki-za-vascaron-cv-ako-hocete-da-se-bavi</id>
    <content type="html"><![CDATA[<p>Na prvom mestu je škola. Ne kao dokaz da znate sve, nego jednostavno  ne smete sebi dozvoliti da vas odbace a da vas nisu videli. Znam da svi traže kandidate do 24 godine, sa završenim ETF-om i 5 godina iskustva u svim poznatim tehnologijama. Ali takođe znam da je praksa drugačija: Najbolji sa ETF-a ili PMF-a će dobiti vize pre nego diplome, a oni ostali će potražiti visko plaćene poslove u bankama, osiguranjima, vladi&#8230; Ovo ostavlja sve ostale firme otovrene za vas i vaš CV.  Ako se još dvoumite, pravac <a href="http://www.vets.edu.yu">www.vets.edu.yu</a> ili <a href="http://www.eposlovanje.org">www.eposlovanje.org</a>. &#8220;Inženjer&#8221;  zvuči više nego ok i vodi vas u drugi krug.   </p>  <p>Na drugom mestu su znanja koja ste stekli mimo škole, a imaju nekakve veze sa konkretnim poslom. Naravno da većinu ljudi koji budu čitali vaš CV neće zanimati da imate veštinu ronjenja iz izviđača. Ali ako se firma bavi opremom za ronjenje, to može da bude nešto što će prevagnuti u vašu korist. Takođe u poslednjih nekoliko godna se razvilo tržište sertifikata za razne softverske pakete  (n. pr. <em>Microsoft), a</em> iz pouzdanih izvora se saznaje da slične sertifikate pripremaju i neki domaći proizvođači softvera za svoje pakete.  Znate još neki jezik mimo engleskog?  Takve stvari su uvek plus u vašem CV-u.   </p>  <p>Imate li nešto na šta možete pokazati prstom? Adresar rađen u  nekom programskom jeziku? Postavili ste mrežu kod rođaka u firmi? Imate sajt? Preveli ste neki strani softverski alat na srpski?  Učestvujete u nekom open source projektu? To je treća stavka.  Ako su prve dve stavke odbrana da vas ne odbace, ovo može biti stvar zbog koje će neko hteti da vas vidi. Ovakvim stvarima pokazujete interesovanje i spremnost da aktivno učestvujete. </p>  <p>Odaću vam malu tajnu. Sve firme imaju svoje ustaljne poslovne procese. I jedino što traže od novih ljudi je da ih brzo razumeju, da ih ne kvare i da ih pamentno upotrebe. Probni rad je jedini pravi način da se proveri čovek, ali je zadatak ljudi koji razgovaraju sa kandidatima da izaberu najadekvatnije i eliminišu lošije kandidate.  Morate zadržati fokus na onome što se traži. Nemojte dozvoliti da se neke nevažne stvari iz CV-a protumače negativno. </p>  <p>Timski rad je peta i najvažnija stvar koja treba da se vidi u vašem CV-u. Ako bolje pogledate razred u školi, ili smer na fakultetu - to je jedna vrsta tima. Polaznici kursa su tim.  Projekti su delo tima. Fokus na zadatak je timska igra. Firma je tim. Uklopiti se u tim znači povećanje kreativne atmosvere u korist svih. Prvi red vašeg CV-a mora da znači ste spremni da u drasu ekipe istrčite na tržište. </p>  <p>Pre nekoliko dana smo o ovoj temi i pričali na sastanku. Dobri ljudi trebaju.  Ne menjajte kanal.  Kada bude zvaničan konkurs, obajviću detalje i ovde. Možda se i vidimo. </p>
]]></content>
  </entry>
  
</feed>
