<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Mladen Jablanović, seasoned software developer from Belgrade, Serbia.

  var _gaq = _gaq || [];
  _gaq.push([‘_setAccount’, ‘UA-13091290-4’]);
  _gaq.push([‘_trackPageview’]);

  (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);
  })();</description><title>jablan.radioni.ca</title><generator>Tumblr (3.0; @jablan)</generator><link>http://jablan.radioni.ca/</link><item><title>gnome-panel is dead, long live gnome-panel!</title><description>&lt;a href="http://www.vuntz.net/journal/post/2011/04/13/gnome-panel-is-dead%2C-long-live-gnome-panel%21"&gt;gnome-panel is dead, long live gnome-panel!&lt;/a&gt;: &lt;p&gt;TL;DR: You can reorganize your gnome panel by using Alt when right-clicking. Whew.&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/12919795867</link><guid>http://jablan.radioni.ca/post/12919795867</guid><pubDate>Thu, 17 Nov 2011 09:43:00 +0100</pubDate><category>linux</category><category>gnome</category><category>debian</category><category>UI</category></item><item><title>Solving delay when ssh-ing</title><description>&lt;a href="http://germanrumm.eu/fixing-ssh-login-delay-how-to-disable-gssapi-with-mic-on-ubuntu-linux/"&gt;Solving delay when ssh-ing&lt;/a&gt;</description><link>http://jablan.radioni.ca/post/10513276612</link><guid>http://jablan.radioni.ca/post/10513276612</guid><pubDate>Thu, 22 Sep 2011 09:38:34 +0200</pubDate></item><item><title>Matching successive records using self-join</title><description>&lt;p&gt;SQL joins can be really powerful once you got the hold of them. Especially interesting could be self-joins, i.e. joining the table onto itself.&lt;/p&gt;

&lt;p&gt;Let’s say you have a table of daily temperatures:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;create table temperatures (
  id serial,
  date date,
  temp numeric(4,2)
);

insert into temperatures (date, temp) values ('2011-09-01', 30);
insert into temperatures (date, temp) values ('2011-09-02', 28);
insert into temperatures (date, temp) values ('2011-09-03', 27);
insert into temperatures (date, temp) values ('2011-09-04', 32);
insert into temperatures (date, temp) values ('2011-09-06', 26);

select * from temperatures;

 id |    date    | temp  
----+------------+-------
  1 | 2011-09-01 | 30.00
  2 | 2011-09-02 | 28.00
  3 | 2011-09-03 | 27.00
  4 | 2011-09-04 | 32.00
  5 | 2011-09-06 | 26.00
(5 rows)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Say that we want a query which would, for each day, calculate the difference between that and the previous measurement.&lt;/p&gt;

&lt;p&gt;We will start with a simple query to get all date’s temperatures:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select date, temp from temperatures order by date;

    date    | temp  
------------+-------
 2011-09-01 | 30.00
 2011-09-02 | 28.00
 2011-09-03 | 27.00
 2011-09-04 | 32.00
 2011-09-06 | 26.00
(5 rows)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Ok, that’s easy. Now we will expand this table with other dates, but we can narrow our query to only get dates prior to the current one:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select t1.date, t1.temp, t2.date
from temperatures t1
left join temperatures t2 on t1.date &gt; t2.date
order by t1.date, t2.date;

    date    | temp  |    date    
------------+-------+------------
 2011-09-01 | 30.00 | 
 2011-09-02 | 28.00 | 2011-09-01
 2011-09-03 | 27.00 | 2011-09-01
 2011-09-03 | 27.00 | 2011-09-02
 2011-09-04 | 32.00 | 2011-09-01
 2011-09-04 | 32.00 | 2011-09-02
 2011-09-04 | 32.00 | 2011-09-03
 2011-09-06 | 26.00 | 2011-09-01
 2011-09-06 | 26.00 | 2011-09-02
 2011-09-06 | 26.00 | 2011-09-03
 2011-09-06 | 26.00 | 2011-09-04
(11 rows)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we have matched every date with &lt;em&gt;all&lt;/em&gt; previous dates. (An important thing to note is that 2011-09-01 doesn’t have matched record. That’s because there is no date prior to 2011-09-01 in the table). So, for example, for 2011-09-04 we have all three, 01, 02, and 03. matched. We need just the most recent one, i.e. 03.&lt;/p&gt;

&lt;p&gt;We will now use a trick to achieve this. We will add &lt;em&gt;another&lt;/em&gt; join to eliminate all the dates but the most recent one:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select t1.date, t1.temp, t2.date, t3.date
from temperatures t1
left join temperatures t2 on t1.date &gt; t2.date
left join temperatures t3 on t3 &lt; t1 and t2 &lt; t3
order by t1.date, t2.date, t3.date;

    date    | temp  |    date    |    date    
------------+-------+------------+------------
 2011-09-01 | 30.00 |            | 
 2011-09-02 | 28.00 | 2011-09-01 | 
 2011-09-03 | 27.00 | 2011-09-01 | 2011-09-02
 2011-09-03 | 27.00 | 2011-09-02 | 
 2011-09-04 | 32.00 | 2011-09-01 | 2011-09-02
 2011-09-04 | 32.00 | 2011-09-01 | 2011-09-03
 2011-09-04 | 32.00 | 2011-09-02 | 2011-09-03
 2011-09-04 | 32.00 | 2011-09-03 | 
 2011-09-06 | 26.00 | 2011-09-01 | 2011-09-02
 2011-09-06 | 26.00 | 2011-09-01 | 2011-09-03
 2011-09-06 | 26.00 | 2011-09-01 | 2011-09-04
 2011-09-06 | 26.00 | 2011-09-02 | 2011-09-03
 2011-09-06 | 26.00 | 2011-09-02 | 2011-09-04
 2011-09-06 | 26.00 | 2011-09-03 | 2011-09-04
 2011-09-06 | 26.00 | 2011-09-04 | 
(15 rows)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;What’s this? Even more records! We join with &lt;code&gt;t3&lt;/code&gt;, but in such way that the date from t3 must be &lt;em&gt;between&lt;/em&gt; dates from &lt;code&gt;t1&lt;/code&gt; and &lt;code&gt;t2&lt;/code&gt;. But if you note the “missing” bits in &lt;code&gt;t3.date&lt;/code&gt; column, you will see that for some date pairs from &lt;code&gt;t1&lt;/code&gt; and &lt;code&gt;t2&lt;/code&gt;, there is no &lt;code&gt;t3.date&lt;/code&gt;. That’s the records where &lt;code&gt;t2.date&lt;/code&gt; is right before &lt;code&gt;t1.date&lt;/code&gt;. We need only that records. So, we’ll just add &lt;code&gt;WHERE&lt;/code&gt; clause to discard all the records where &lt;code&gt;t3.date&lt;/code&gt; exists:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select t1.date, t1.temp, t2.date, t3.date
from temperatures t1
left join temperatures t2 on t1.date &gt; t2.date
left join temperatures t3 on t3 &lt; t1 and t2 &lt; t3
where t3.date is null
order by t1.date, t2.date, t3.date;

    date    | temp  |    date    | date 
------------+-------+------------+------
 2011-09-01 | 30.00 |            | 
 2011-09-02 | 28.00 | 2011-09-01 | 
 2011-09-03 | 27.00 | 2011-09-02 | 
 2011-09-04 | 32.00 | 2011-09-03 | 
 2011-09-06 | 26.00 | 2011-09-04 | 
(5 rows)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Right! Back to 5 rows, with just right values in t2.date column. Now all we have to do is add the temperature difference, and we’re done:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;select t1.date, t1.temp, t2.date, t1.temp - t2.temp as diff
from temperatures t1
left join temperatures t2 on t1.date &gt; t2.date
left join temperatures t3 on t3 &lt; t1 and t2 &lt; t3
where t3.date is null
order by t1.date, t2.date, t3.date;

    date    | temp  |    date    | diff  
------------+-------+------------+-------
 2011-09-01 | 30.00 |            |      
 2011-09-02 | 28.00 | 2011-09-01 | -2.00
 2011-09-03 | 27.00 | 2011-09-02 | -1.00
 2011-09-04 | 32.00 | 2011-09-03 |  5.00
 2011-09-06 | 26.00 | 2011-09-04 | -6.00
(5 rows)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That’s it. :)&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/10128857773</link><guid>http://jablan.radioni.ca/post/10128857773</guid><pubDate>Mon, 12 Sep 2011 18:58:07 +0200</pubDate><category>sql</category><category>join</category><category>databases</category><category>programming</category></item><item><title>Publish photos from GMail to Picasa</title><description>&lt;p&gt;You have received a bunch of photos to you GMail account, and you want to publish them to your Picasa web album, but you hate having them downloaded to your machine, and then again uploaded to web, especially knowing that both Gmail and Picasa are Google’s applications. Wouldn’t it be nice if Gmail had an option to, besides download, upload the photos directly? Unfortunately, no such option.&lt;/p&gt;

&lt;p&gt;There’s a workaround though. Go to your Picasa web account, go to photo settings page, there you will see an option to enable “email to Picasa”, by setting a special email account at  @picasaweb.com. Just enable it, go to your Gmail, and simply forward your email with attached photos to newly created email address. You will get your photos imported to Picasa almost instantly.&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/10084173262</link><guid>http://jablan.radioni.ca/post/10084173262</guid><pubDate>Sun, 11 Sep 2011 17:54:00 +0200</pubDate><category>DIY</category><category>gmail</category><category>picasa</category><category>photos</category></item><item><title>7 krugova pakla</title><description>&lt;h3&gt;(ili “7 razloga za pravdanje krađe para od poreskih obveznika preplaćivanjem državnih sajtova”)&lt;/h3&gt;

&lt;p&gt;Nakon reakcija iz branše na po ko zna koji preplaćen državni sajt, palo mi je na pamet da sistematizujem i klasifikujem sve vrste griža savesti koje se javljaju, kao i načine za njihovo suzbijanje.&lt;/p&gt;

&lt;p&gt;Da počnemo od najbanalnijih, ali i najtežih za suzbijanje…&lt;/p&gt;

&lt;h3&gt;7. Primate platu od države&lt;/h3&gt;

&lt;p&gt;Ovo je lagano. Ne sečete granu na kojoj sedite. Daleko bilo da podignete svoj glas i otvoreno kažete šefu da to ne košta toliko i da nije u redu što je nabacio posao svom kumašinu nego da je trebalo da se raspiše tender. Ne samo da biste ostali vi bez posla, nego i vaša žena i pašenog, koje ste ugurali na državne jasle preko poznanstva.&lt;/p&gt;

&lt;h3&gt;6. Dobili ste posao od države&lt;/h3&gt;

&lt;p&gt;Jasno - ne grizeš ruku koja te hrani. Konkurencija je gadna, vi ste naprimali kadar, ima tu i nešto slabijih programera, treba vremena (i para) dok se uhodaju, iznajmili ste fensi kancelarije, treba to pokrpiti. Pa nećete valjda u starkama raditi posao za Vlast?!&lt;/p&gt;

&lt;h3&gt;5. Niste dobili još nijedan posao od države, ali radite na tome&lt;/h3&gt;

&lt;p&gt;Pratite tendere, ortačite se sa perspektivnim partijskim kadrovima, pravite “socijalnu infrastrukturu” za buduće poslove. Ovaj posao su maznuli drugi, ali sledeći je vaš, kad ministarstvo gde radi vaš budući kum dođe na red. Ne želite da se sutradan postavi pitanje da li ste naplatili previše. I ako se postavi, pokazaćete prstom na svoju računicu od prošle godine gde ste matematički precizno dokazali da ni prethodnih N sajtova nikako nije preplaćeno.&lt;/p&gt;

&lt;h3&gt;4. Radite za strance i to dobro naplaćujete&lt;/h3&gt;

&lt;p&gt;Kada ste prethodni put stranom partneru lupili cifru triput veću nego što mislite da vaš rad zaista vredi, jako ste se iznenadili kad je pristao. Ali, kontate, tamo stručnjaci skupi, vi kvalitetni i pouzdani, nema razloga da vas grize savest. Lako ste se navikli na “zapadnu platu” u Srbiji. Ali pomalo vam je glupo kad vidite da se ovde ljudi prodaju za sitne pare, samo obaraju cenu u branši. Ko vam garantuje da sutra vaš strani partner neće uzeti baš nekog od njih za duplo manje nego što mu vi fakturišete. Zato neka, 50k€ i nije neka cifra za švajsovani Džumla templejt, kad malo bolje razmislite.&lt;/p&gt;

&lt;h3&gt;3. Radili biste, al n’ umete&lt;/h3&gt;

&lt;p&gt;Nikako vam nije jasno kako vaš ortak sastavi sajt za nedelju dana. Vi malo natucate Fotošop, nešto uspete u Drimviveru da nakrpite, PHP razumete kad je lepo napisan. Ej, nije to laka stvar napraviti sajt. Ljudi uče to programiranje po 10 godina, te fakulteti, te sertifikati… Treba imati rispekt za taj uložen rad (i novac). Te uložene pare i to uloženo vreme moraju se u jednom trenutku isplatiti… Džaba se vi danas mučite da učite, jedno po jedno, ako sutra to neko neće znati da ceni i plati.&lt;/p&gt;

&lt;h3&gt;2. Nekako želite da nosite kravatu&lt;/h3&gt;

&lt;p&gt;Stalo vam je da ortacima iz srednje koji su vas stalno zajebavali pokažete da ste postali neko i nešto. Hoćete da vas cene, da vas cice gledaju sa poštovanjem, da možete da smuvate i neku “pravu ribu” a ne samo bubuljičave wannabe sponzoruše i debele metalke. Da skinete najzad te starke, godine prolaze, nema više zezanja, dosta furanja nerd-imidža, treba se skinuti matorima s gajbe, kupiti neki pristojan auto. A šta je 50k€, potroši se začas. A cilj opravdava sredstvo.&lt;/p&gt;

&lt;h3&gt;1. Jednostavno ste konformista&lt;/h3&gt;

&lt;p&gt;Većina sa Tvitera tako misli a vi ne želite da se konfrontirate. :)&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/6825603357</link><guid>http://jablan.radioni.ca/post/6825603357</guid><pubDate>Thu, 23 Jun 2011 15:35:23 +0200</pubDate><category>rant</category><category>Srbija</category><category>IT</category></item><item><title>Limundo, sitnice koje smetaju</title><description>&lt;p&gt;Redovno koristim Limundo i, iako je u pitanju sasvim funkcionalan sajt sa sada već vrlo velikim komjunitijem, ima par stvari koje čine da Limundo i dalje odaje utisak nedovršenog i poluamaterskog proizvoda. U pitanju su sitnice koje bi bilo lako ispraviti, a znače puno:&lt;/p&gt;

&lt;h3&gt;Two-level security&lt;/h3&gt;

&lt;p&gt;Ne želim da moram da se logujem &lt;em&gt;uvek&lt;/em&gt; kad pristupam sajtu. Ni GMail ne zahteva logovanje pri svakom pristupu. Umesto toga, treba omogućiti dva nivoa pristupa: prvi nivo sa trajnom sesijom za “soft” pristup sajtu - posmatranje svojih i tuđih aukcija, čitanje pošte, i drugi nivo, sa dodatnim logovanjem i kratkotrajnom sesijom - za postavljanje aukcija, bidovanje itd. Ovaj sistem koriste i GMail i Amazon, recimo.&lt;/p&gt;

&lt;h3&gt;Auth token u email linkovima&lt;/h3&gt;

&lt;p&gt;Ako mi Limundo pošalje email (npr, kada primim novu poruku), želim da se klikom na link u mejlu automatski prijavim u prvi security nivo na Limundu, bez potrebe da kucam svoj username i password ponovo. Sama činjenica da imam pristup svom mejlu znači da imam pristup i svom Limundo nalogu.&lt;/p&gt;

&lt;h3&gt;Automatsko produžavanje aukcije pri bidovanju u poslednjim minutima&lt;/h3&gt;

&lt;p&gt;Popularni “fazon” na Limundu je bidovanje u poslednjim sekundama aukcije. Na ovaj način kupci se dovode u neravnopravnu situaciju (od aukcije pravi se igra na sreću), a predmet prodaje ne uspe da dostigne punu vrednost, tako da je i prodavac, a posredno i Limundo s obzirom da radi na procenat, oštećen.&lt;/p&gt;

&lt;p&gt;Aukcija treba da se automatski produži za par minuta, ako je ponuda postavljena u poslednjim minutima (tako npr. funkcionišu neki onlajn sportski menadžeri tipa hattrick.org). Na taj način predmet će prirodno dostići svoju tržišnu cenu a niko od kupaca neće se osećati frustrirano ako je bio spreman da ponudi višu cenu od ostalih.&lt;/p&gt;

&lt;h3&gt;Izmena lozinke treba da ide kroz verifikacioni link&lt;/h3&gt;

&lt;p&gt;Trenutno bilo ko ko zna moju email adresu može da promeni moju šifru. To nije ok. Umesto ovog, u mejlu koji dobijem kad kliknem “zaboravio sam šifru”, treba da stoji jedinstveni link kojim potvrđujem izmenu šifre, tj. šifra treba da se promeni tek kad ja, vlasnik email naloga, odradim svesnu akciju. U suprotnom, šifra treba da ostane ista kao ranije.&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/6548544794</link><guid>http://jablan.radioni.ca/post/6548544794</guid><pubDate>Wed, 15 Jun 2011 09:26:13 +0200</pubDate><category>Limundo</category><category>rant</category><category>usability</category><category>security</category></item><item><title>First Natty and Unity impressions</title><description>&lt;p&gt;I was curious about the new UI included in latest Ubuntu release called Unity so I decided to give it a shot. I haven’t reinstalled my main working machine (10.10 still working there), but I took 10-20 GB off MacbookPro’s hard drive to install it there.&lt;/p&gt;

&lt;p&gt;Installation went smoothly, Ubuntu even recognized the MacOS on the other partition and offered whether it should replace it (boy that was tempting!) or install alongside with it. Upon installation, everything went well, I got Unity right off, it is in fact written as a Compiz plugin, so, you got Compiz, you can have Unity and vice versa, no Compiz (say, no adequate graphic card or adequate driver), no Unity.&lt;/p&gt;

&lt;p&gt;I had some problems installing Broadcom Wifi drivers, had to experiment and google a bit, but eventually it started working.&lt;/p&gt;

&lt;p&gt;After the install, I just removed couple of applications I don’t use (everything using Mono, for example, Gwibber, Empathy, Shotwell etd), and installed couple I use (Kupfer, Pidgin, gThumb, Exaile). Natty occupies some 280 MB in memory upon boot. Seems rather modest to me.&lt;/p&gt;

&lt;p&gt;Now about Unity, as it’s the biggest change new Ubuntu brings.&lt;/p&gt;

&lt;p&gt;It may look intimidating to the users used to traditional Gnome interface. Top panel, although similar, &lt;em&gt;is not&lt;/em&gt; your old Gnome panel. Right-clicking doesn’t work. Icons on the right are not panel applets, but indicators (not the same). So you might feel frustrated by expecting for it to behave the way you used to.&lt;/p&gt;

&lt;h3&gt;Launcher&lt;/h3&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/jCHQK.png" alt="Launcher shortcuts"/&gt;On the left, you’ll see the launcher. If you used Mac OS or Windows 7, you’ll know what you have, same icons reused both for favourite applications you would like to be able to launch easily, and for currently running applications. I always liked that on Mac, I like it here as well. The only thing that annoyed me on Mac seems to be solved here: if you have more than one window opened for an application, you don’t see it on Mac, and if you want to pick one from them, you need to press and hold the icon until a (text) menu appears. In Unity you 1) have one small arrow on the left of the icon per every window opened, and 2) another click on the icon shows the thumbnails of the opened windows in that app, and you can pick one easily. The launcher hides automatically if some of your windows covers it, or if you maximize any window.&lt;/p&gt;

&lt;p&gt;There’s a nice feature in the launcher: each icon is assigned a keyboard shortcut - &lt;code&gt;Super+1&lt;/code&gt; for the first icon on the top, &lt;code&gt;Super-2&lt;/code&gt; for the second etc. If you have couple of icons fixed there (say, for a file manager, terminal, browser and a chat application, you can switch between them really quickly, lot faster and more accurate than using Alt-Tab (which, of course, still works). There is also &lt;code&gt;Super-W&lt;/code&gt;, which displays thumbnails of all open windows, and couple of other shortcuts.&lt;/p&gt;

&lt;h3&gt;Windows&lt;/h3&gt;

&lt;p&gt;Application menus are moved away from application windows, to the top panel. Again, MacOS users will feel at home here. Very sane decision, to save space by not displaying menubars of inactive windows.&lt;/p&gt;

&lt;p&gt;Maximized windows are really maximized. All you will see is the top panel. No window bar - close, minimize and maximize buttons and window title are, again, moved to the top bar.&lt;/p&gt;

&lt;h3&gt;Dash&lt;/h3&gt;

&lt;p&gt;Dash is something like Gnome menu replacement - you get it when you either click top left ubuntu button, or tap &lt;code&gt;Super&lt;/code&gt; key once. It’s convenient for searching and launching applications and documents. You might find it useful if you are a power user, but I guess some inexperienced users would expect to see all installed applications which they would browse at a single place. I, personally, prefer Unity’s type-and-search approach, but it’s inferior to existing applications dedicated to it, and here I must praise &lt;a href="http://kaizer.se/wiki/kupfer/"&gt;Kupfer&lt;/a&gt; again, a brilliant application for power users (I believe Quicksilver is the original application for Mac). I would really like to see integration of Kupfer and Unity as it could easily serve as the “engine” which powers dash search.&lt;/p&gt;

&lt;h3&gt;Cons&lt;/h3&gt;

&lt;p&gt;The biggest problem I see with Unity is the fact that it relies and requires video acceleration. Combine that with the fact that often you can’t rely on graphic drivers to exist or work on your specific hardware, you can’t guarantee that Unity will work on any hardware around.&lt;/p&gt;

&lt;p&gt;Also, there are some aesthetic annoyances, unaligned buttons and images here and there, it just feels a little unpolished.&lt;/p&gt;

&lt;p&gt;There is no centralized place for customizing look and feel. You can’t add, remove and rearrange app indicators as you could gnome’s panel applets. Right click is often unused.&lt;/p&gt;

&lt;h3&gt;General impressions&lt;/h3&gt;

&lt;p&gt;After couple of days of active Unity usage I really don’t feel restrained in any way by it, and I believe I will continue using it on my primary machine. Also, I believe it will improve in time, both in terms of aesthetics, features and customization. But generally, as a power user, I find it more friendly than the old Gnome.&lt;/p&gt;

&lt;h3&gt;Couple of hints&lt;/h3&gt;

&lt;ul&gt;&lt;li&gt;Install &lt;code&gt;ccsm&lt;/code&gt; (CompizConfig Settings Manager), you’ll be able to tweak some Unity’s features there.&lt;/li&gt;
&lt;li&gt;If your touchpad supports it, you can use three-finger scroll for moving windows around, and four-finger tap for invoking Dash.&lt;/li&gt;
&lt;li&gt;Check &lt;a href="http://www.webupd8.org/2011/04/things-to-tweak-fix-after-installing.html"&gt;this list&lt;/a&gt;, you might find something that suits you.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://jablan.radioni.ca/post/5186158826</link><guid>http://jablan.radioni.ca/post/5186158826</guid><pubDate>Wed, 04 May 2011 11:36:00 +0200</pubDate><category>ubuntu</category><category>natty</category><category>unity</category><category>review</category><category>linux</category></item><item><title>Upozorenje za Zvezda/Partizan mts prepaid pakete</title><description>&lt;p&gt;MTS prepaid brojevi (Zvezda/Partizan) &lt;em&gt;imaju problem&lt;/em&gt; sa primanjem SMS poruka. Danas sam bio u korisničkom servisu i ni službenik nije uspeo da primi SMS poruku na novi prepaid broj (kartica je ispravno aktivirana i prima i šalje glasovne pozive).&lt;/p&gt;

&lt;p&gt;Vidim po internetu da &lt;a href="http://www.elitesecurity.org/t426446-0#2858758"&gt;nisam jedini sa istim problemom&lt;/a&gt;.&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/5008628984</link><guid>http://jablan.radioni.ca/post/5008628984</guid><pubDate>Thu, 28 Apr 2011 11:09:55 +0200</pubDate><category>srbija</category><category>mts</category><category>problem</category><category>prepaid</category></item><item><title>Appeasing programming language gods</title><description>&lt;p&gt;Just recently, a fellow coder wrote the following tweet:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;you know what function #php is missing? preg_file_get_contents - get only the content part which matches the pattern&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I’m not usually reacting to such appeals, but I felt this is very suitable to try to explain what’s so deeply wrong about PHP, and not as much with PHP but with the whole attitude in communities around certain platforms. I said that that statement is wrong on so many levels, so here I’ll try to address some of them.&lt;/p&gt;

&lt;h3&gt;&lt;code&gt;language == function&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;This is so symptomatic in PHP - identifying the language with the function set provided with it. That tells helluva lot about the language (or, rather, the lack of one). Hey, I thought languages are there to allow &lt;em&gt;you&lt;/em&gt;, the programmer, to actually create the functions you need.&lt;/p&gt;

&lt;h3&gt;Micro-specification&lt;/h3&gt;

&lt;p&gt;Instead of having few very poweful functions which you can combine to achieve your goal, you rely on myriad of tiny, ultra-specialized functions crafted to perform a single specific task. You need function to get lines from a file that match a pattern? All you really need is:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;The possibility to iterate through lines of a file&lt;/li&gt;
&lt;li&gt;The possibility to &lt;code&gt;select&lt;/code&gt; items from an iterator based on a given criteria&lt;/li&gt;
&lt;li&gt;The possibility to perform regex on a string&lt;/li&gt;
&lt;li&gt;And a language powerful enough to combine the above three elegantly (no, C’s function pointers doesn’t count)&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Something like this (Ruby, but any decent modern language has something similar):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;File.foreach('pi.c').select{|line| line =~ /print/}
#    ^               ^                  ^ ...which match the given regex
#    |               | ...select only those lines...
#    | iterating through every line of a file...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;See? Not even worth putting in a separate method.&lt;/p&gt;

&lt;h3&gt;Relying on gods’ mercy&lt;/h3&gt;

&lt;p&gt;Waiting for the language creators (or, in extreme cases, a comitee) to accept something which would make your life easier is frustrating, time-wasting and plainly insulting. Such gods should be overthrown, caught and imprisoned. &lt;a href="http://en.wikipedia.org/wiki/John_McCarthy_(computer_scientist)"&gt;Good gods&lt;/a&gt; just should give us the basic tools, a hammer and a chisel, and we’ll make the rest ourselves.&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/4991817597</link><guid>http://jablan.radioni.ca/post/4991817597</guid><pubDate>Wed, 27 Apr 2011 22:30:00 +0200</pubDate><category>php</category><category>language war</category></item><item><title>Parsing search query in Ruby</title><description>&lt;p&gt;Here’s a regular expression you can use if you want to parse a user’s search query, along with some Ruby to put the result into neat Hash. The query supports prefixing with plus or minus, adding string prefix (a la Google’s &lt;code&gt;site:www.site.com&lt;/code&gt;) and quoting whole phrase for exact matching:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def parse_query s
  s.scan(/((\S+)\:\s?)?([+-])?(("(.+?)")|(\S+))/).map{|match|
    Hash[
      [nil, :prefix, :plusminus, nil, nil, :phrase, :word].zip(match).select(&amp;:all?)
    ]
  }
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;so that:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;parse_query 'foo +bar -baz "dev pro talk" site:devprotalk.com category:cat1'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;returns:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[
  {:word=&gt;"foo"},
  {:plusminus=&gt;"+", :word=&gt;"bar"},
  {:plusminus=&gt;"-", :word=&gt;"baz"},
  {:phrase=&gt;"dev pro talk"},
  {:prefix=&gt;"site", :word=&gt;"devprotalk.com"},
  {:prefix=&gt;"category", :word=&gt;"cat1"}
]
&lt;/code&gt;&lt;/pre&gt;</description><link>http://jablan.radioni.ca/post/4982485974</link><guid>http://jablan.radioni.ca/post/4982485974</guid><pubDate>Wed, 27 Apr 2011 13:44:45 +0200</pubDate><category>ruby</category><category>search</category><category>regexp</category></item><item><title>Reverse a string using regexps</title><description>&lt;p&gt;I know you have always wondered how would one reverse a string without using loops or any kind of iteration, using, say, regular expressions and recursion. So stop wondering you:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class String
  def r_revert
    sub(/(.+)(.)/){$2 + $1.r_revert}
  end
end
'jablan'.r_revert
#=&gt; 'nalbaj'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or, if you prefer recursive lambdas instead of monkey-patching:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;l = -&gt;(s){s.sub(/(.+)(.)/){$2 + l.($1)}}
l.('jablan')
#=&gt; 'nalbaj'
&lt;/code&gt;&lt;/pre&gt;</description><link>http://jablan.radioni.ca/post/4862704249</link><guid>http://jablan.radioni.ca/post/4862704249</guid><pubDate>Sat, 23 Apr 2011 12:55:05 +0200</pubDate><category>ruby</category></item><item><title>tačka zvezda: Šta ćemo i kako ćemo</title><description>&lt;a href="http://tackazvezda.com/post/4684603559"&gt;tačka zvezda: Šta ćemo i kako ćemo&lt;/a&gt;: &lt;p&gt;&lt;a href="http://tackazvezda.com/post/4684603559" class="tumblr_blog"&gt;omegawm&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_ljrlofNP2i1qz8riw.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;Preporučiću vam jednu izvanrednu knjigu o radu, stvaranju, zdravom razmišljanju i dobrim i lošim navikama. Napisana je narodski, jasno i koncizno, &lt;strong&gt;1908. godine&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Mislim da je dovoljno pročitati predgovor &lt;a href="http://www.archive.org/stream/taemoikakoemo00argoog#page/n6/mode/1up" target="_blank"&gt;ovde&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pored opštih lekcija o vrednoći, štednji i urednom životu, autor recimo…&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://jablan.radioni.ca/post/4685027213</link><guid>http://jablan.radioni.ca/post/4685027213</guid><pubDate>Sun, 17 Apr 2011 12:05:21 +0200</pubDate></item><item><title>Get first and last line from a file</title><description>&lt;p&gt;I needed to get only first and last line from a file (actually, not a file, but rather output from another command). &lt;code&gt;head -1&lt;/code&gt; and &lt;code&gt;tail -1&lt;/code&gt; can be used to get either first or last, but how to combine the two at the same time? Here’s how. Enter &lt;a href="http://linux.die.net/man/1/tee"&gt;&lt;code&gt;tee&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cat somefile | grep something | tee &gt;(head -1) &gt;(tail -1) &gt; /dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Neat, huh?&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/4184844466</link><guid>http://jablan.radioni.ca/post/4184844466</guid><pubDate>Tue, 29 Mar 2011 16:46:45 +0200</pubDate><category>unix</category><category>coreutils</category><category>gnu</category><category>command line</category></item><item><title>Random Mac/OSX PITA list</title><description>&lt;p&gt;Ok, here’s my entirely private, subjective, random list of Pains In The Ass that I experienced while I was trying to get used to using OSX on a Macbook. While I spent years working in Windows as well, I mostly tend to compare experiences with Linux, allegedly notorious for its desktop (un)friendlyness.&lt;/p&gt;

&lt;p&gt;The list is unordered, some things bothering more, some less.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;No way of changing the UI, only two, marginally different “skins”, that’s it. Let me say I’m not some design-obsessed lunatic that changes his desktop appereance every day or two, but I like to be able to set it &lt;em&gt;once&lt;/em&gt; the way I like it (colours, fonts, window decorations, iconsets etc) and use it that way.&lt;/li&gt;
&lt;li&gt;No localization to my native Serbian language. Again, I’m far from a nationalist in any possible sense, but I like my language and I like the possibility to use it on my computer, as much as I use it when talking to people around me.&lt;/li&gt;
&lt;li&gt;Again, non-US keyboard layout is not easy to use. Application don’t remember their individual layout, serbian layout is nonstandard so it has to be tweaked using third party tools etc.&lt;/li&gt;
&lt;li&gt;There is a set of application that you are kind of encouraged to use. Music player - use iTunes. Image viewer - use built one. Text editor - buy TextMate. There are alternatives, but they are far from anywhere close to the mainstream ones. In Linux, there are really plenty of alternative software. Not always 100% bug-free and not always 100% features there, but there’s always hope that either application A, B or C will get the feature you need, or application D will emerge with it. No such thing on Mac.&lt;/li&gt;
&lt;li&gt;I like to see the name of the song currently being played. In Linux, there’s Panflute applet that hooks to a number of music players. I had no luck finding similar tool for Mac.&lt;/li&gt;
&lt;li&gt;XWindows apps look and feel crappy (gimp and inkscape for example).&lt;/li&gt;
&lt;li&gt;Package management is inferior to apt.&lt;/li&gt;
&lt;li&gt;Every possible 3rd party application, no matter how trivial, is commercial.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Now, some hardware issues&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Keyboard is designed to look nice, but the keys lack tactile feedback (flat surface) and they are way too fragile (broke two before I adapted, and I hate having to adapt).&lt;/li&gt;
&lt;li&gt;Sharp front edge where the wrists are resting. Not sharp enough to really cut you, but uncomfortable for sure.&lt;/li&gt;
&lt;li&gt;No way to make use of integrated graphic card in OS other than OSX.&lt;/li&gt;
&lt;li&gt;Only two USB ports.&lt;/li&gt;
&lt;li&gt;Non-standard port for external monitor.&lt;/li&gt;
&lt;/ul&gt;</description><link>http://jablan.radioni.ca/post/4045529859</link><guid>http://jablan.radioni.ca/post/4045529859</guid><pubDate>Wed, 23 Mar 2011 16:57:00 +0100</pubDate><category>mac</category><category>macbook</category><category>osx</category><category>rant</category><category>linux</category></item><item><title>Clojure's interpose and interleave in Ruby</title><description>&lt;p&gt;These days I’m reading a great book titled &lt;a href="http://www.pragprog.com/titles/btlang/seven-languages-in-seven-weeks"&gt;“Seven Languages in Seven Weeks”&lt;/a&gt; by Bruce Tate, currently I’m on &lt;a href="http://clojure.org/"&gt;Clojure&lt;/a&gt;, and I am really surprised how easy it is to follow, knowing Ruby beforehand.&lt;/p&gt;

&lt;p&gt;In chapter on lazy evaluation, I noticed couple of methods that didn’t have their exact counterparts in Ruby, and I was curious how hard would it be to implement them. So, there they are.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://clojuredocs.org/clojure_core/1.2.0/clojure.core/interpose"&gt;&lt;code&gt;interpose&lt;/code&gt;&lt;/a&gt; works similarly to Ruby’s &lt;code&gt;join&lt;/code&gt;, just more generic: its result is not String, but &lt;em&gt;lazy sequence&lt;/em&gt; of elements from the starting sequence, with object given as argument inserted in between each two.&lt;/p&gt;

&lt;p&gt;Here it is, implemented in Ruby:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;module Enumerable
  def interpose obj
    Enumerator.new do |yielder|
      self.each_with_index do |elem, i|
        yielder.yield obj unless i == 0
        yielder.yield elem
      end
    end
  end
end

p [:lather, :rinse, :repeat].cycle.interpose(:and).take(5)
#=&gt; [:lather, :and, :rinse, :and, :repeat]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://clojuredocs.org/clojure_core/clojure.core/interleave"&gt;&lt;code&gt;interleave&lt;/code&gt;&lt;/a&gt; works similarly to Ruby’s &lt;a href="http://www.ruby-doc.org/core/classes/Enumerable.html#M001517"&gt;&lt;code&gt;zip&lt;/code&gt;&lt;/a&gt;, but this one also works on lazy sequences, not Arrays, as in Ruby, meaning that you can apply it to indefinite sequences as well. Here it is in Ruby:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;module Enumerable
  def interleave another
    this = self.to_enum
    another = another.to_enum
    Enumerator.new do |yielder|
      loop do
        yielder.yield this.next
        yielder.yield another.next
      end
    end
  end
end

p (0...2).cycle.interleave((0...3).cycle).take(20)
#=&gt; [0, 0, 1, 1, 0, 2, 1, 0, 0, 1, 1, 2, 0, 0, 1, 1, 0, 2, 1, 0]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Both examples are taken directly from Bruce Tate’s book.&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/3625157848</link><guid>http://jablan.radioni.ca/post/3625157848</guid><pubDate>Thu, 03 Mar 2011 21:58:00 +0100</pubDate><category>ruby</category><category>clojure</category><category>lazy sequences</category><category>functional programming</category></item><item><title>Zašto je PHP bolji od Rubija</title><description>&lt;p&gt;[Prevod članka Alija Nadžafa, britanskog programera. Original je ovde: &lt;a href="http://najafali.com/php-is-better-than-ruby.html"&gt;Why PHP is better than Ruby&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;21.2.2011.&lt;/p&gt;

&lt;h4&gt;PHP je bolji od Rubija. Eto, rekao sam. U ovom članku ću vam objasniti zbog čega, i usput verovatno iznervirati neke hipi fanove od dvadeset i kusur sa japankama i Mekovima.&lt;/h4&gt;

&lt;h3&gt;U Rubiju sve je objekat… čak i literali!&lt;/h3&gt;

&lt;p&gt;Ovo je prosto bolesno. Ne znam kako Rubi developeri mogu da sebe nazivaju programerima. U PHP-u nismo pobornici standardnog interfejsa. Mi slavimo svoju šarolikost. Da li je &lt;code&gt;plast, igla&lt;/code&gt; ili &lt;code&gt;igla, plast&lt;/code&gt;? Da li treba da zovemo metodu nad objektom ili da ga prosledimo funkciji? Ili treba da radimo i jedno i drugo i kodiramo različitim stilovima da bismo učinili život veselijim?&lt;/p&gt;

&lt;p&gt;U poređenju sa svakodnevnom avanturom provaljivanja kako PHP radi, Rubi je dosadan. Uzmite kao primer funkcije za rad sa stringovima. Da biste uradili najobičniju zamenu stringa u Rubiju, morate da pozovete metodu na svom stringu, a ne da ga prosledite funkciji za rad sa stringovima. Kakav objektno orijentisani krek je pušio Matz? To ubija svako uživanje u programiranju!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;?php
//zameni foo sa bar na razuman, PHP način
str_replace('foo', 'bar', 'I eat food and play football')
# I eat bard and play bartball

# Kakav pacijent je smislio ovo objektno-orijentisano iživljavanje?
"I eat food and play football".gsub('foo', 'bar')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Pored toga, imam osećaj da su developeri Rubija bili posebno duhoviti kad su smišljali jezik. Hajde da odemo dotle da se složimo da je sve objekat. Ali i klase? “Klase su objekti klase &lt;code&gt;Class&lt;/code&gt;”? Neko sigurno umire od smeha na račun ovih ubogih Rubi developera.&lt;/p&gt;

&lt;h3&gt;Sintaksu Rubija je nemoguće razumeti!&lt;/h3&gt;

&lt;p&gt;Rubi poseduje takve sumanute i uvrnute začkoljice koje normalno ljudsko biće nije sposobno razumeti. Pogledajte ovo, recimo:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class Address
  attr_accessor :name, :line1, :line2, :county, :postcode, :country

  def Address.valid_postcode?(string)
    #true for valid postcode, false otherwise
  end

  def initialize(data)
    if data[:postcode]
      raise "Invalid postcode" unless Address.valid_postcode?(data[:postcode])
    end
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Ovaj kod je potpuno nerazumljiv… Kao prvo, nigde nema vitičastih zagrada. Vitičaste zagrade me čine sigurnim i voljenim, a ja ovde ne vidim nijednu. Takođe, gubim osećaj ravnoteže kad nemam zagrade. Iako je suviše zagrada loša stvar (ne podsećajte me na to koliko mrzim LISP), naravno da su nam neophodne za grananja? Argumente funkcija? Zar niko ne uočava ludilo ovde?!&lt;/p&gt;

&lt;h3&gt;PHP mi omogućava da vežbam svoju veštinu slepog kucanja a Rubi ne&lt;/h3&gt;

&lt;p&gt;Kao zaluđenik za slepo kucanje, volim da se vežbam. Problem sa Rubijem je što mi dozvoljava da radim iste stvari koje mogu u PHP-u, samo sa mnogo manje kucanja. Pogledajte ovaj primer jednostavne klase sa geterima i seterima u PHP-u, a zatim u Rubiju:
    &lt;?php &lt;/p&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;class Address
{
    private $name;
    private $line1;
    private $line2;
    private $county;
    private $postcode;
    private $country;

    public function getName() {
        return $this-&gt;name;
    }

    public function getLine1() {
        return $this-&gt;line1;
    }

    public function getLine2() {
        return $this-&gt;line1;
    }

    public function getCounty() {
        return $this-&gt;county;
    }

    public function getPostcode() {
        return $this-&gt;postcode;
    }

    public function getCountry() {
        return $this-&gt;country;
    }

    public function setName($newName) {
        $this-&gt;name = $newName;
    }

    public function setLine1($newLine1) {
        $this-&gt;line1 = $newLine1;
    }

    public function setLine2($newLine2) {
        $this-&gt;line2 = $newLine2;
    }

    public function setCounty($newCounty) {
        $this-&gt;county = $newCounty;
    }

    public function setPostcode($newPostcode) {
        $this-&gt;postcode = $newPostcode;
    }

    public function setCountry($newCountry) {
        $this-&gt;country = $newCountry;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A sada pogledajte istu stvar sa istim pristupom u Rubiju…&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class Address
  attr_accessor :name, :line1, :line2, :county, :postcode, :country
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Ovo je previše kratko da bi bilo kome bilo od koristi. Ako tako lako mogu da pravim klase sa public geterima i seterima na svom poslu, prsti će mi odumreti i neću imati ništa za vežbanje. Hoću da mi se tastatura dimi pošto otkucam definiciju klase, a tri patetične linije Rubi koda nisu ni od kakve koristi.&lt;/p&gt;

&lt;p&gt;Takođe, bagovi koji su posledica grešaka u kucanju su vrhunac mog dana i preferiram sintaksu koja mi omogućava da napravim što više takvih. Batalite taj svetogrdni Rubi kod sa svojom konciznom i izražajnom sintaksom. Usredsredite se na ove tople i sigurne vitičaste zagrade. Eto, tako je bolje…&lt;/p&gt;

&lt;h3&gt;Rubi vam ne dozvoljava da pravite proizvoljne public atribute na objektima!&lt;/h3&gt;

&lt;p&gt;Jedna od pobedničkih stvari kod PHP-a je po defaultu mogućnost da postavite proizvoljni javni (public) atribut na objektu. Pogledajte sledeći PHP kod:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class Address {
      // vidi gore..
}

$address = new Address();
$address-&gt;xCoordinate = 54;
$address-&gt;yCoordinate = 73;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Ovo znači da možete da ugurate proizvoljne podatke u objekat gdegod želite u svom kodu! Povrh toga, ne morate da to deklarišete, dokumentujete ili ukažete na to na bilo koji način. Slobodno pišite kod u ostalim delovima sistema koji se oslanja na to da su ove public vrednosti postavljene. Ovo je odlično za očuvanje posla, jer niko osim vas neće moći da razume kako vaš kod radi.&lt;/p&gt;

&lt;h3&gt;Rubi vam dozvoljava da redefinišete klase, gdegod vam padne na pamet, uključujući i one iz standardne biblioteke!&lt;/h3&gt;

&lt;p&gt;U Rubiju, možete da uradite ovo:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# klasa za cele brojeve u Rubiju
class Fixnum
  def +(adder)
    self - adder
  end
end
## tako je rođaci, upravo sam pretvorio sabiranje u oduzimanje
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Mora da nešto nije u redu sa jezikom koji vam dozvoljava da podrijete osnovna pravila aritmetike!&lt;/p&gt;

&lt;p&gt;Šalu na stranu, developeri su po definiciji glupi. I zli. Dajte im priliku, komitovaće suvu konjsku balegu u svn i naprosto se ne može računati na njihovo ponašanje. Ako im pružite mogućnost da menjaju osnove jezika kako im se ćefne, sami tražite frku od svih glupih i zlonamernih developera iz vaše firme.&lt;/p&gt;

&lt;p&gt;U nekim ekstremnim slučajevima, primećeno je da Rubi developeri u svom prirodnom okruženju umeju da prave čitave poddijalekte jezika, prilagođavajući jezik svom određenom domenu. Štagod radili, ne dozvolite ovakve jeretičke gluposti u svojoj organizaciji.&lt;/p&gt;

&lt;h3&gt;Zaključak&lt;/h3&gt;

&lt;p&gt;Sve sam ispričao, Rubi je nemoguće razumeti, a daje developerima naizgled potpunu kontrolu nad jezikom. Najiskrenije vam predlažem da još jednom razmislite pre nego pokušate da naučite Rubi. To je slično zombi infekciji, dok kažete keks koristićete git za čuvanje koda, radićete od kuće u Textmate-u i bizarne funkcionalne paradigme će početi da se uvlače u način na koji pišete PHP.&lt;/p&gt;

&lt;p&gt;Upozoreni ste.&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/3485417396</link><guid>http://jablan.radioni.ca/post/3485417396</guid><pubDate>Thu, 24 Feb 2011 18:30:00 +0100</pubDate></item><item><title>Acer Aspire One D255 review</title><description>&lt;p&gt;I needed a cheap netbook to replace my old 7-inch Asus eeePc, already semi-broken, part of its display permanently dead, some keys not working anymore, others pulled out. It is our kitchen computer, used by wife and kid, and main criteria was to be as cheap as possible, so I wouldn’t have to despair if it gets its keys extruded, or milk spilled over.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://us.acer.com/ac/en/US/content/model/LU.SDN0B.024"&gt;Asus Aspire One D255&lt;/a&gt; (single-core Atom) is the cheapest netbook around, although others aren’t much more expensive, all sharing similar features - single core Atom processor, 10-inch screen and 160GB hard drive. When deciding which one to buy, main concerns were around number of USB ports, and quality of keyboard and touchpad. At one point I was also hoping to be able to buy it with Windows, and then reuse the license on another computer, but I found out I am not allowed to do that, so it didn’t matter which OS it came with, as I would reinstall Ubuntu anyway.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Acer_Aspire_One"&gt;Aspire One&lt;/a&gt; is available in around a dozen different variants, slightly different casing, different OS’s and hard-drive sizes. I heard there are two-core variants, but I haven’t see any of them offered in Serbia.&lt;/p&gt;

&lt;p&gt;This D255 comes with bare minimum of features, 160GB hard drive, 1.66 N450 Atom, 1GB of RAM and 3-cell battery (most of the time, the computer is attached to mains, so I didn’t care much about the battery life). Nice thing are 3 USB ports (2 on the left, one on the right side), so I wouldn’t worry about attaching mouse, external keyboard and a USB drive at the same time (an issue I hate with insanely priced Macbook Pro, for example).&lt;/p&gt;

&lt;p&gt;So, here are my impressions after installing Ubuntu and working on it for a while:&lt;/p&gt;

&lt;p&gt;Keyboard is big enough to comfortably work on (as much as physical size of the netbook itself allows), but the keys are strangely shaped: their surface seems wider than the basis, crosscut resembling letter T. This probably means that it’s easier to accidentally pull out the key while typing (say, if your finger or a fingernail gets stuck between keys). I had similar problem with macbook’s keyboard, and this one seems even more prone to the problem. I’d give it 3/5.&lt;/p&gt;

&lt;p&gt;The touchpad is big enough, concerning the space constraints below the keyboard. I dislike the fact that it’s not separated more clearly from the surrounding surface (only two thin lines which can barely be sensed under a finger), so it’s easy for your finger to get outside the sensitive area. Left and right click are performed using a single button, also a bit hard to hit precisely. Also 3/5.&lt;/p&gt;

&lt;p&gt;The screen is glossy but of poor quailty - you can see vertical stripes between pixels on a light background. The backlight is LED and it’s uniform across the whole screen, that’s ok. 3/5 again.&lt;/p&gt;

&lt;p&gt;The rest of the features are pretty standard so there’s no point in discussing them separately. Atom is powerful enough to surf and play some movies and music. Single core means that the machine can get stuck sometimes.&lt;/p&gt;

&lt;p&gt;It has integrated video card, but it works ok for basic needs: Compiz works outside of the box, and there are no visible glitches during video playback, both in a window or fullscreen.&lt;/p&gt;

&lt;p&gt;During a normal work, the machine doesn’t get hot at all, the bottom is pleasantly warm to the touch.&lt;/p&gt;

&lt;p&gt;Speakers are placed a bit awkwardly - below the palm rest, but turned downwards, on the bottom of the casing. This means that if you place the computer on a soft surface (say, your lap), the sound will get damped. I am not sure if other netbooks use the same idea, but it doesn’t look right to me.&lt;/p&gt;

&lt;p&gt;Now - the software. It comes with the Linux preinstalled (I think some variant of Moblin, or Linpus). It looked interesting, quite unusual for a Linux, but I didn’t bother to investigate it much, I just was a bit annoyed that I couldn’t find a button for shutdown or a restart. I installed Ubuntu 10.10 right away. I used a USB flash drive as the netbook doesn’t have optical drive. I had some problems with grub (Error 17), but it resolved by updating grub manually.&lt;/p&gt;

&lt;p&gt;Maverick Meerkat runs smoothly on Aspire One, the only thing doesn’t work is card reader (I will try to find a solution and post about it later). Oh, I haven’t tried webcam at all, I don’t know if it works.&lt;/p&gt;

&lt;p&gt;That’s about it, here are general impressions:&lt;/p&gt;

&lt;h3&gt;Pros:&lt;/h3&gt;

&lt;ul&gt;&lt;li&gt;Price&lt;/li&gt;
&lt;li&gt;Runs Ubuntu smoothly&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Cons:&lt;/h3&gt;

&lt;ul&gt;&lt;li&gt;Keys seem fragile&lt;/li&gt;
&lt;li&gt;Vertical stripes visible on screen&lt;/li&gt;
&lt;li&gt;Inadequately placed speakers&lt;/li&gt;
&lt;/ul&gt;</description><link>http://jablan.radioni.ca/post/2526946317</link><guid>http://jablan.radioni.ca/post/2526946317</guid><pubDate>Thu, 30 Dec 2010 14:18:32 +0100</pubDate><category>aspire one</category><category>review</category><category>acer</category><category>netbook</category><category>english</category></item><item><title>Imate novi pasoš, a treba vam nova lična</title><description>&lt;p&gt;Pre mesec-dva sam postavio &lt;a href="http://www.elitemadzone.org/t412377-0#2719120"&gt;pitanje na ES-u&lt;/a&gt; u vezi vađenja nove lične: interesovalo me je šta treba od dokumenata, pod uslovom da sam već vadio novi (biometrijski, crveni) pasoš.&lt;/p&gt;

&lt;p&gt;Evo da odgovorim sam sebi: državljanstvo &lt;strong&gt;nije&lt;/strong&gt; potrebno. &lt;strong&gt;Izvod&lt;/strong&gt; iz matične knjige nije potreban, pod uslovom da ste prilikom vađenja pasoša prilagali novi, trajni izvod (roze boje). Ako ste pasoš vadili pomoću starog, zelenkastog, “ne starijim od 6 meseci” izvodom, trebaće vam novi.&lt;/p&gt;

&lt;p&gt;Naravno, potrebne su i dve plaćene uplatnice, o tome više &lt;a href="http://www.mup.gov.rs/cms_lat/dokumenta.nsf/licna-karta.h"&gt;na sajtu MUP-a&lt;/a&gt;.&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/2512969588</link><guid>http://jablan.radioni.ca/post/2512969588</guid><pubDate>Wed, 29 Dec 2010 16:33:05 +0100</pubDate><category>serbian</category><category>srpski</category><category>birokratija</category></item><item><title>StackOverflow-style syntax highlight on Tumblr</title><description>&lt;p&gt;There are several articles on how to enable (client-based) syntax highlighting on Tumblr. None of these solutions worked for me, as each requires setting class on &lt;code&gt;pre&lt;/code&gt; or &lt;code&gt;code&lt;/code&gt; tags manually for coloring JS snippet to recognize areas to colorize. This is not simple in my case, as I am using &lt;a href="http://daringfireball.net/projects/markdown/syntax"&gt;Markdown&lt;/a&gt; as markup language, and generating HTML tags (and their attributes, such as &lt;code&gt;class&lt;/code&gt;) is out of control there.&lt;/p&gt;

&lt;p&gt;So I decided to slightly modify existing solutions to suit my needs. I took &lt;a href="http://code.google.com/p/google-code-prettify/"&gt;prettify&lt;/a&gt; module and combined it with small jQuery snippet of my own, which prepares existing HTML (created using Markdown) for prettification, by dynamically assigning &lt;code&gt;prettyprint&lt;/code&gt; class to code blocks.&lt;/p&gt;

&lt;p&gt;If you want to do the same, just customize your theme’s HTML to include following lines:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&lt;link rel="stylesheet" type="text/css" href="http://static.tumblr.com/n9ku3gx/bmmlda7os/prettify.css" /&gt;
&lt;script type="text/javascript" src="http://static.tumblr.com/n9ku3gx/1k0lda7q0/jquery.min.js"/&gt;
&lt;script type="text/javascript" src="http://static.tumblr.com/n9ku3gx/DiKlda7r3/prettify.min.js"/&gt;
&lt;script type="text/javascript"&gt;
  $(function() {
    $('pre &gt; code').addClass('prettyprint');
    prettyPrint();
  });
&lt;/script&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And that should be all it takes to get your code nicely highlighted!&lt;/p&gt;</description><link>http://jablan.radioni.ca/post/2177846097</link><guid>http://jablan.radioni.ca/post/2177846097</guid><pubDate>Sat, 11 Dec 2010 22:28:00 +0100</pubDate><category>tumblr</category><category>syntax highlight</category><category>stackoverflow</category><category>code</category></item><item><title>"Each with previous" in Ruby</title><description>&lt;p&gt;I often need a variant of &lt;code&gt;Enumerable#each&lt;/code&gt; method, with a “twist”: sometimes I want to have previous element available along with the current one, most often for comparison between the two. Here’s a trivial example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;array = [
  {name: 'foo', value: 15},
  {name: 'foo', value: 6},
  {name: 'bar', value: 2},
  {name: 'bar', value: 7},
  {name: 'bar', value: 14},
  {name: 'baz', value: 4},
  {name: 'baz', value: 1}
]

array.each_with_prev{|prev, curr|
  # Want to display name only before the first record in the group
  puts curr[:name] unless prev &amp;&amp; prev[:name] == curr[:name]
  puts "    #{curr[:value]}"
}
foo
    15
    6
bar
    2
    7
    14
baz
    4
    1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And here’s (very simple, &lt;code&gt;inject&lt;/code&gt; based) implementation of &lt;code&gt;each_with_prev&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;module Enumerable
  def each_with_prev
    self.inject(nil){|prev, curr| yield prev, curr; curr}
    self
  end
end
&lt;/code&gt;&lt;/pre&gt;</description><link>http://jablan.radioni.ca/post/2175717120</link><guid>http://jablan.radioni.ca/post/2175717120</guid><pubDate>Sat, 11 Dec 2010 18:10:00 +0100</pubDate><category>ruby</category><category>enumerable</category><category>each</category><category>programming</category></item></channel></rss>

