<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>SiKaNrOnG.com Blog - The Dreddy Coder</title>
    <link>http://sikanrong.com/</link>
    <pubDate>Sat, 20 Dec 2008 16:10:00 GMT</pubDate>
    <description>Tales of Rails, Ajax, code, and other geekstuff..</description>
    <item>
      <title>VLC linux and the spirit of Christmas</title>
      <link>http://sikanrong.com/blog/view/122</link>
      <description>&lt;p&gt;So I opened VLC today on my ubuntu 8.10 install, and at first I thought the icon was broken. The Ktorrent icon gets weird from time to time, so I figured it was the same bug.&lt;/p&gt;
&lt;p&gt;Upon giving it a closer look, to my surprise, I discovered that the normal orange VLC cone was wearing a christmas hat! Check it out!&lt;/p&gt;
&lt;p&gt;&lt;img src="http://i245.photobucket.com/albums/gg69/sikanrong101/vlcxmas2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://i245.photobucket.com/albums/gg69/sikanrong101/vlcxmas1.png" alt="" width="287" height="139" /&gt;&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/122</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>Rails Javascript Testing (unittest.js the right way)</title>
      <link>http://sikanrong.com/blog/view/118</link>
      <description>&lt;p&gt;Hey all! It's been awhile since I've written. I hope you guys find this helpful, because I couldn't find this anywhere else on the internet and it took me ages. So, I've been using the javascript_test plugin. You can install this plugin with the following command in your project root directory:&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;ruby script/plugin install javascript_test&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;mkdir test/javascript&lt;br /&gt;ln -s ../../vendor/plugins/javascript_test/assets/ test/javascript/assets&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;Now, what you'll find is by default all this does is set up a framework with which you can test your javascript libraries againt NEW markup, that YOU have to write. I found this highly unrealistic. Only VERY rarely is the javascript in a rails application going to be able to be accurately tested in a 'vaccuum', meaning that the DOM and the JS have everything to do with eachother. Also, you want to be able to test the effects of your rjs templates, most of which will have everything to do with your markup and your application server &lt;em&gt;running&lt;/em&gt;. So, I thought about this for a while, and came up with (what I think) is a pretty elegant solution.&lt;/p&gt;
 
&lt;p&gt;When you run your tests (which you can do with the following command):&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;rake test:javascripts&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;What happens is the javascript_test plugin initializes a new WEBrick server running on port 4177, and all it really does is provide some basic functionality to run the JS tests with your newly written markup. It has nothing to do with your application ruby code, nor can you access that code via AJAX requests. Crap, huh? So, clearly this needs to be improved upon, and I believe I've found a way. Basically what I'm doing is opening a new window with my application server running in it, and simply running the tests (and the assertions) using the dom and JS included by the app! Completely unobtrusive, and you get the full power of the application when you test the JS. However...&lt;/p&gt;
 
&lt;h3&gt;Issue: Same Origin Policy&lt;/h3&gt;
 
&lt;p&gt;Basically the first thing you're going to get screwed by is this, in all modern browsers, JS from within a parent window cannot access the DOM of the child window in any significant way. This is to prevent cross side scripting attacks, which would otherwise hijack your browser behind the scenes and post midget porn all over your facebook. Now, you wouldn't think it - but according to same-origin policy 'http://localhost:3000' and 'http://localhost:4711' are actually different domains (because of the port). Firefox 3 (and previous) don't even provide a way to temporarily disable this, so you have to exploit the single loophole in same-origin policy: subdomains. You're allowed to access the child window if it belongs to a subdomain of the parent window. So,&lt;/p&gt;
 
&lt;p&gt;"How do I turn &lt;strong&gt;localhost:3000&lt;/strong&gt; and &lt;strong&gt;localhost:4711&lt;/strong&gt; into &lt;strong&gt;jstest.mysite.test&lt;/strong&gt; and &lt;strong&gt;mysite.test&lt;/strong&gt;??"&lt;/p&gt;
 
&lt;h3&gt;Solution: Subverting Same Origin Policy via Apache&lt;/h3&gt;
 
&lt;p&gt;That's right! It is possible to use apache (with mod_proxy) and /etc/hosts to trick your browser into using the same origin subdomain loophole. I'm using apache 1.3 for this (Default on OSX Tiger), but it won't change too much for Leopard, or other versions of Apache in general.&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;Step 1)&lt;/strong&gt; Uncomment these lines in the file /etc/httpd/httpd.conf (default OSX tiger file location)&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;#AddModule mod_proxy.c&lt;br /&gt;#LoadModule proxy_module&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; libexec/httpd/libproxy.so&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;Step 2)&lt;/strong&gt; Add these sections to httpd.conf (replace mysite with whatever you want to use)&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerName localhost&lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; ServerName mysite.test&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; ProxyPass / http://localhost:3000/&lt;br /&gt;&amp;nbsp;&amp;nbsp; ProxyPassReverse / http://localhost:3000&lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; ServerName js_test.mysite.test&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; ProxyPass / http://localhost:4711/&lt;br /&gt;&amp;nbsp;&amp;nbsp; ProxyPassReverse / http://localhost:4711&lt;br /&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;Step 3)&lt;/strong&gt; Add these two lines to /etc/hosts file&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp; mysite.test&lt;br /&gt;127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp; js_test.&lt;/strong&gt;&lt;strong&gt;mysite.test&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;Step 4)&lt;/strong&gt; restart Apache:&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;sudo apachectl restart&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;Step 5) &lt;/strong&gt;Edit the file vendor/plugins/javascript_test/lib/javascript_test.rb, change line 176 to&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;browser.visit("http://js_test.mysite.test#{test}?resultsURL=http://js_test.mysite.test/results&amp;amp;t=" + ("%.6f" % Time.now.to_f))&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;Step 6)&lt;/strong&gt; Make sure you add this to your application layouts AND to the &amp;lt;head&amp;gt; tags of the files in test/javascript (NOTE: &lt;em style="color:#F00"&gt;DO NOT LET THIS BIT OF CODE ONTO YOUR PRODUCTION SERVER&lt;/em&gt;). I've created a mechanism that I can turn on and off in environment.rb, a better solution would be to use arguements passed to script/server on rails start.&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.domain = "mysite.test";&lt;br /&gt;&amp;lt;/script&amp;gt;&amp;nbsp; &lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;Step 7)&lt;/strong&gt; Write tests that use your server! This is an example from one of mine - it opens the application in a separate window and logs in before doing other tests.&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;var &lt;/strong&gt;&lt;strong&gt;mysite_window&lt;/strong&gt;&lt;strong&gt; = null;&lt;br /&gt;&amp;nbsp; new Test.Unit.Runner({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; setup: function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mysite_window = window.open("http://mysite.test/login", "mysite_window");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var execute_string = ""+&amp;lt;r&amp;gt;&amp;lt;![CDATA[&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var inputs = &lt;/strong&gt;&lt;strong&gt;mysite_window&lt;/strong&gt;&lt;strong&gt;.document.forms[0].getElementsByTagName('input');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inputs[0].value = "user@email.com";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inputs[1].value = "password";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/strong&gt;&lt;strong&gt;mysite_window&lt;/strong&gt;&lt;strong&gt;.document.forms[0].submit();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]]&amp;gt;&amp;lt;/r&amp;gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setTimeout(execute_string, 2000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; teardown: function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; testMysiteLogin: function() { with(this) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wait(10000, function(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEqual(&lt;/strong&gt;&lt;strong&gt;mysite_window&lt;/strong&gt;&lt;strong&gt;.location, "http://mysite.test/member-overview");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp; }, {testLog: "testlog"});&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;Note that you don't have to have the window.open in the setup method, and in fact in most cases it's better if it just executes before the runner does (because it only needs to do so once). Anyway, You get the idea, now you can access all your JS methods from the window handler returned from window.open. So if I had a 'popup_cheesecake' function in my application JS, all I would have to do to test is is write something like:&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; testCheesecake: function() { with(this){ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //This Allows us to get the window handler of the popup without re-loading the URL&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var mysite_window = window.open("", "mysite_window");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEqual(&lt;/strong&gt;&lt;strong&gt;mysite_window&lt;/strong&gt;&lt;strong&gt;.popup_cheesecake()&lt;/strong&gt;&lt;strong&gt;, true);&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; }}&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;...And that's it! So anyway - I hope this has helped some people!! I know people on the rails scene have been looking into JS testing and seen solutions like the javascript_test plguin and shuddered in horror. This solution helps actually integrate the rails application AND the javascript testing suite, which in turn helps bring testing closer to what it's actually supposed to do - testing the software under real conditions!&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/118</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>How to convert a PHP guy to Ruby on Rails</title>
      <link>http://sikanrong.com/blog/view/117</link>
      <description>
 
&lt;p&gt;&lt;img src="http://i245.photobucket.com/albums/gg69/sikanrong101/198px-Ruby_logosvg.png" style="margin-left:10px; margin-bottom:10px; float:right"&gt;Hey, this is something every ruby guy should know. If you're a contract worker you'll walk into a project sometimes and you'll find a management team that wants something more effective, and a staff that's stuck on what they know, just because they already know it. While people have a valid point that learning something new is hard, Ruby on Rails provides so many benefits to the development of a project that the learning curve is an acceptable loss of time. These are the things that stopped my dead in my tracks about ruby on rails development.&lt;/p&gt;
 &lt;ol&gt; 
&lt;li&gt;&lt;strong&gt;MVC&lt;/strong&gt; - If you're a PHP guy sitting there going "What does 'MVC' mean?" i don't blame you. The fact of the matter is, PHP is a fucking mess. Even highly touted web frameworks in PHP aren't really MVC based. MVC means Model-view-controller - and really it's the best way to construct a web application and keep the views separated from the logic code. Models in Ruby on Rails typically represent tables in the database, and lets you extend special properties to the objects if you want, while controllers use these model objects and organize them to put into the Views, which are the templetes.&lt;br&gt;&lt;br&gt;&lt;/li&gt;
 
&lt;li&gt;&lt;strong&gt;ActiveRecord&lt;/strong&gt; - if you know a PHP guy and you want to convert them into a rails evangelist - &lt;em&gt;show them ActiveRecord&lt;/em&gt;!! Since ruby is so object-based, ActiveRecord objects are directly related to the tables in the database. This means that you can &lt;em&gt;completely avoid writing sql&lt;/em&gt;. Now, if you're sitting there thinking "But I already know how to write SQL, why would I do that?" The answer is simple. What if you develop a site using MySQL and find out that your client's host is on Postgre? Well, in PHP you're fucked, and in ruby you have to change like one word, and everything works. Also, consider your site gets really popular and you find you'd like to switch to a different database for scalability reasons. Once again, on PHP you're fucked, and in Rails it's done for you. The real power here is being able to treat your DB tables like real objects. This means that if you have a table with geographic locations in latitude and longitude, you can easily extend that table's class with a 'country' method which returns what country the lat/longitute are in, and calling it is as simple as &lt;br&gt;&lt;br&gt;&lt;pre&gt;GeoCodes.find(id).country&lt;/pre&gt;&lt;br&gt; Which will find the object with the proper ID in the database and return the result of the find_country method. The php equivalent to this is MUCH more messy. Also, everything about the DB layer is handled by rails. This means that really complicated things are handled for you. What if you have two tables that are related? The type of tables you would do an INNER JOIN on in sql. In rails, if you've got one object and it's related to more objects in another table, getting to these other objects is as simple as a method call. Lets say that you have a people table in your DB and each person has many cakes, which are referenced from the cakes table. So, you need to get the person object: 
&lt;br&gt;&lt;br&gt;&lt;pre&gt;person = Person.find id&lt;/pre&gt;&lt;br&gt;Easy, right? Now you want to get their cakes: &lt;br&gt;&lt;br&gt;&lt;pre&gt;person.cakes&lt;/pre&gt;&lt;br&gt; Wow! ONE word?? Yes indeed. Now lets say you only want the cakes from this person with chocolate on them: &lt;br&gt;&lt;br&gt;&lt;pre&gt;person.cakes.select{|cake| cake.icing == "chocolate"}&lt;/pre&gt;&lt;br&gt; How about only chocolate cakes with less than 4 candles?&lt;br&gt;&lt;br&gt;&lt;pre&gt;person.cakes.select{|c| c.icing == "chololate" and c.candles &amp;lt; 4}&lt;/pre&gt;&lt;br&gt;...I believe I've made my point. In php (to say the least) ll this kind of stuff is painful and shitty to write, either because you're writing it in pure SQL and using PHP string operations to modify that sql, OR because you're doing it all on the PHP side with loops. Either way, it's messy and it's not as clean as this.&lt;br&gt;&lt;br&gt;&lt;/li&gt;
 
&lt;li&gt;&lt;strong&gt;Complete Ajax Integration - &lt;/strong&gt;Haven't you ever wished you could write client-side JS code from the server side, so you could consolidate all your logic code into one place? Well, I've often wished this using PHP, and what it comes down to is that you have to include JS into your templates and then carefully try to use the server output and the templates together to make some hoppin' AJAX goodies. You can also output ajax from php using strings and string manipulation techniques. Hooray.. In Rails, all of this is fully integrated. For example. You want to make an ajax call in rails that updates an element (let's say a news ticker) with a new random entry:
&lt;br&gt;&lt;br&gt;&lt;pre&gt;def update_ticker&lt;br /&gt; news_array = NewsItems.find :all&lt;br /&gt; rand_news = news_array[rand(news_array.length) ]&lt;br /&gt; render :update do |page|&lt;br /&gt;  page['id_update'].replace_html rand_news.body&lt;br /&gt; end&lt;br /&gt;end&lt;br /&gt; &lt;/pre&gt;&lt;br&gt;which will actually output the necessary cross-browser compatible javascript code to replace the html in the div with id="id_update" with the body of the new random news item. All this without ever actually writing javascript. Pretty cool huh? &lt;br&gt;&lt;br&gt;&lt;/li&gt;
 
&lt;li&gt;&lt;strong&gt;Convention over Configuration&lt;/strong&gt; - This is important. Rails always assumes that whatever you're doing, you're trying to do it in the most common way that it's usually done. This means that it will assume that you're doing it in that common way, but if you'd like to change something about that (i.e. configuration) then you're free to do so. In PHP this is *not* the case. In php you're generally forced to point out every stupid detail of something before you use it, even if you're using it in the most common way it could be used. Examples? Lets say you have an action in your controller named hello_world. Rails will automatically look for your template for this action in views/controller_name/hello_world.rhtml, meaning that you don't have to write ANY code for it to understand that this is where that template is located, and try to use it when someone navigates to "yoursite.com/controller_name/hello_world". However if you'd like to use a different template for your action you could always call &lt;br&gt;&lt;br&gt;&lt;pre&gt;render "controller_name/different_template"&lt;/pre&gt;&lt;br&gt;...or what if you want to render the hello_world template, but you want to render it in a different page layout than your site's default layout? No problem:&lt;br&gt;&lt;br&gt;&lt;pre&gt;render "controller_name/hello_world", :layout=&amp;gt;"different_layout"&lt;/pre&gt;&lt;br&gt;Basically everything in rails acts like this: by default everything just works in the most common way possible, and if you'd like to add to it, you're free to. In php, nothing works until you make it work.&lt;br&gt;&lt;br&gt;&lt;/li&gt;
 
&lt;li&gt;&lt;strong&gt;Plugins&lt;/strong&gt; - Since rails is so well structured it's a very friendly framework to write plugins for. Say you've got users, and your users need to upload image attachments. Well, in php you have to write the image uploader, then you have to write the code that takes it from the tmp folder and stores it somewhere userful, and renames it, and checks that it's the right filetype, etc. In other words, in PHP there's 1,000,000 things you have to be aware of and configure so that your users can upload images. In Rails it's as simple as&lt;br&gt;&lt;br&gt;&lt;pre&gt;script/plugin install http://svn.techno-weenie.net/projects/plugins/attachment_fu/&lt;br /&gt;&lt;/pre&gt;&lt;br&gt;After which you just specify that Users have attachments associated with them by putting this in the User.rb class:&lt;br&gt;&lt;br&gt;&lt;pre&gt;  has_attachment :content_type =&amp;gt; :image, &lt;br /&gt;                 :storage =&amp;gt; :file_system, &lt;br /&gt;                 :max_size =&amp;gt; 500.kilobytes,&lt;br /&gt;                 :resize_to =&amp;gt; '320x200&amp;gt;',&lt;br /&gt;                 :thumbnails =&amp;gt; { :thumb =&amp;gt; '100x100&amp;gt;' }&lt;br /&gt;&lt;/pre&gt;&lt;br&gt; WOAH! look at that! We just killed like 200 birds with one big line! You specify the max size (note also how sexy '.kilobytes' is), and even what size to resize the image to (and built-in thumbnail support!), just right there! If this could be easier, I'm not sure how. All of your image upload needs are basically taken care of for you by a 3rd party plugin for the framework, and it's fully customizable. You could attribute associated image information with any of your existing models (DB tables) in your app, in just about one line. &lt;br /&gt;&lt;/li&gt;
 &lt;/ol&gt; 
&lt;p&gt;Alright.. So there are really a WHOLE lot more items i could go off about, like &lt;strong&gt;blocks&lt;/strong&gt; and passing blocks, &lt;strong&gt;gems&lt;/strong&gt; and the incredible power they provide, &lt;strong&gt;database migrations&lt;/strong&gt;, or the built-in &lt;strong&gt;testing framework&lt;/strong&gt;, or the power of clean and easy URLs with &lt;strong&gt;routes.rb&lt;/strong&gt;, but I think the really core differences are the ones up there. Anyway, have a nice day! If you know any die-hard PHP people, feel free to make the web coding world a better place for everyone and show them this list!!&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/117</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>Web 3.0: Caught with our pants down again?</title>
      <link>http://sikanrong.com/blog/view/116</link>
      <description>&lt;h3&gt;Web 1.0&lt;/h3&gt;
&lt;p&gt;Any respectable web expert can tell you that when the switch from web 1.0 to web 2.0 came about, a lot of people were caught with their pants down. The web 1.0 was like a giant library. If you were there, you remember it. It was like a load of people had been promised what we now know as "Web 2.0", but the reality had fallen a bit short. The internet of the 90's was a place where there was undoubtedly a wealth of information, yet it wasn't really dynamic. Someone wrote it, you read it, and that was that.&lt;/p&gt;
&lt;h3&gt;Web 2.0&lt;/h3&gt;
&lt;p&gt;Suddenly, the paradigm shifted completely. Perhaps not *too* suddenly, but generally the web evolved from the "Giant Library" web 1.0 model and became something else entirely. The library was still there, but suddenly it was a place to hang out. It was a place to meet, and a place to interact with other people efficiently. In many cases, more efficiently than could be achieved by conventional means. This is our current model of the web. The web is "Social". The web is a meeting place, and the content quite literally comes from all of us: the users. the following is an "America Online" ad from 1996, as you will see in the ad, none of the themes from "Web 2.0" or "The social web" are even touched on:&lt;/p&gt;

&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/xItCBJhKYwE&amp;hl=en"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/xItCBJhKYwE&amp;hl=en" type="application/x-shockwave-flash" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;br&gt;&lt;br&gt;
&lt;h3&gt;The Pre-Social Web&lt;/h3&gt;
&lt;p&gt;Holy crap I lost it watching that ad. It sounds like a Viagra commercial nowadays: "My friends said I should try &lt;em&gt;The Internet&lt;/em&gt;, so i did!". Anyway I dug up the old AOL footage because really for a lot of Americans this is how we first got on the internet! As you can see in the commercial, the Web 1.0 was all about the endless supply of information that was available &lt;em&gt;to&lt;/em&gt; you. The angle was generally that the content was provided, and you were receiving it. The driving force of web 1.0 was commerce. Everything was basically a brochure that a user could browse through. It changed the way we thought about 'brick &amp; mortar' shops completely. The leaders of the web 1.0 world were sites that made the first attempts to consolidate the information of "The Library". These were revered internet-superpowers like Yahoo, AltaVista, and Lycos, who were trying to figure up a good way to categorize and &lt;em&gt;index&lt;/em&gt; the information of the world wide web, and present it in such a way that your average user could navigate through it efficiently, a-la "search engine". Even Geocities (remember!?) would make a lasting impression on the web by taking the very first steps into Web 2.0: giving users an easy portal to make their own webpages, and thus their own internet location. To that effect, geocities almost had the quality of being a 'Social' place, however it was more users just making new books for the library, rather than a true shift of paradigm. &lt;/p&gt;
&lt;h3&gt;What Web 2.0 Isn't, and what it is&lt;/h3&gt;
&lt;p&gt;
A whole load of people would say that web 2.0 has everything to do with "glossy sleek designs, some easy non-contrasting colors, careful typography, and AJAX". While they are wrong, they're not entirely wrong. These things listed are simply a &lt;em&gt;sign of the times&lt;/em&gt;. These technologies are filling a lot of holes that previous ages of the web couldn't fill, and right now we're seeing them booming, but this does not characterize the heart of web 2.0. Web 2.0 is about user generated content. Thus, web 2.0 applications are about providing users a &lt;em&gt;means&lt;/em&gt; to 'get involved' in the web. A 'platform' from which they can easily meet certain needs, which are generally: 1) to easily be able to publish/create content, and 2) to publicize it. 
&lt;/p&gt;
&lt;h3&gt;Web 2.0, the Pre-Semantic Web??&lt;/h3&gt;
&lt;p&gt;So, if you remember the idea of geocities in 1996, they were web 2.0 pioneers, and they struck it really big with that, eventually getting acquired by Yahoo. Interesting right? In the age of "The Library Web", the first ones in the race to "The Social Web" get the cheese. This is a very important point. I believe that this is what we're seeing right now. If you look at web 3.0 as "The semantic web", this adds a whole new and not-totally-unexpected peice to the evolution puzzle. The term "Semantic" when used referencing web 3.0 generally conveys the idea that the barrier between computers and directly inputted human content will be much smaller, thus allowing computers to attribute relevance to content. Note that this is something largely impossible by today's standards. A computer can help you edit video, publish it, and publicize it - but for now all it knows about what's &lt;b&gt;inside&lt;/b&gt; the video are the words we humans attribute to it. So, the web 3.0 may mean quite a few things:&lt;/p&gt;

&lt;p&gt;
&lt;ul&gt;
&lt;li&gt;It may mean the age of the incredible data mash-up, where micro-formats analogous to 'tagging' of internet content are used to hone in on content meaning and context.&lt;/li&gt;
&lt;li&gt;It may mean that finally we develop smarter software which can interpret data dynamically from a 'human' source, like a video camera, a spoken word, or even a photograph, and thus the computer can dynamically attribute context to such content&lt;/li&gt;
&lt;li&gt;It may mean that the graphics capability of the modern computer will shift so sharply that the very way we visually experience the web will be different, perhaps even a true end to a two-dimensional web&lt;/li&gt;
&lt;li&gt;It &lt;em&gt;will&lt;/em&gt; mean being able to depend on the internet to actually understand the context of your requests, and the ability for applications to &lt;em&gt;contextually&lt;/em&gt; infer data from other websites.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;h3&gt;Web 3.0: The future is smart!&lt;/h3&gt;
&lt;p&gt;It's very likely that it'll be a mix of all of those. So, as we've seen with the transition from 1.0 to 2.0, the leaders are usually the ones gunning for the next generation of features, first. Google (I believe) will be (already is?) one of the first pioneers into the web 3.0 world, as they are already introducing as much 'semantic' features into their applications as they can. Adsense (google's ad platform) mashes up useful ads against tag words and tries to place them in places where they 'fit' contextually. These first small steps towards web 3.0 have earned them millions. Let's take a hypothetical example. Lets say tomorrow flickr makes an announcement that in conjunction with BlahWhatever Corp they've developed an algorithm that can identify individual objects inside of a photograph. The entire internet would change. If you searched for the word "Ball" in flickr you would no longer get a picture with a ball in it, but instead you would get only the ball itself: the most semantically correct response for your search.&lt;p&gt;
&lt;h3&gt;Web 3.0: backwards-compatible?&lt;/h3&gt;
&lt;/p&gt;In another very different situation we have sites like facebook and myspace, which rely &lt;b&gt;heavily&lt;/b&gt; on the social aspects of web 2.0 to generate their content for them (their driving force). Now, with the advent of what's soon to come in 3.0, strictly web 2.0 companies won't necessarily be losing out, but it'll be a big "Caught with your pants down" moment, and perhaps even one that doesn't end so gracefully. After all, where are the superstars of web 1.0? What happened to america online's 1990's business model for "The library of the world wide web"? Well, not much, obviously - this is the kind of fate that I believe awaits the current empires of the social web. If you don't stay ahead of the curve, you fall behind it. It was a giant gap for developers to take an existing "Read-only" web 1.0 site and turn it into something social, and I imagine turning "social" into "semantic" won't be an easy task either. Not just for developers, mind you; when the whole paradigm of the internet shifts, your code &lt;em&gt;and&lt;/em&gt; your business model generally need to shift with it. This is the art of staying right on the bleeding edge, and not falling behind.&lt;/p&gt;
&lt;br&gt;&lt;br&gt;
&lt;p&gt;...So that's it. Just wanted to shed some thoughts about the future, because I think it's the most interesting topic there is. What I &lt;em&gt;don't&lt;/em&gt; need are 40,000 comments about how calling it web X.X is bullshit, and "blah blah blah, stupid buzzword, blah blah, sells articles, blah". I don't fucking care; we're calling it web 2.0 because everyone is; it's here to stay. The next paradigm is already named web 3.0, because it makes sense. Deal with it.&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/116</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>MUR.DERLICIO.US LAUNCHED!! (testers needed)</title>
      <link>http://sikanrong.com/blog/view/115</link>
      <description>&lt;p&gt;&lt;a href="http://mur.derlicio.us"&gt;&lt;img class="right border" src="http://i245.photobucket.com/albums/gg69/sikanrong101/86309.jpg" alt="" /&gt;&lt;/a&gt;Hey all, have been writing this site for quite some (spare) time, and I couldn't be more proud of it. this site puts forth little competitions for ruby programmers!
It's basically a sandboxed testing environment, with a built in
rank/scoring system, so you can pit yourself agains other developers
(and even view their code and see how they beat you).&lt;/p&gt;
 
&lt;p&gt;Your uploaded
code gets evaluated by code length and execution time. I'm thinking
this will be fun for the ruby community! Anyway it's still in beta, but
now that I've got the basic framework down I plan on expanding it a lot
more. Any beta testers willing to give feedback would be appreciated.
Also, it's like a code-GAME! Who wouldn't want that?!?&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/115</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>2010: Knife-fight software development methodology</title>
      <link>http://sikanrong.com/blog/view/114</link>
      <description>&lt;p&gt;&lt;img style="padding:10px; float:right" src="http://i245.photobucket.com/albums/gg69/sikanrong101/dvd-dune-fight.jpg" alt="" /&gt;So, being a rails developer I often hear about "Agile" development methodology, and generally how developing a project given a certain set of guidelines will tremendously improve the quality of the final product. Well, I've got a methodology of my own. This is sure to replace Agile development and all it's avid followers. In fact, i see it springing up in Web 2.0 lingo everywhere around year 2010. Let me explain:&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;Knife fight software development model&lt;/strong&gt;&lt;/p&gt;
 &lt;ol&gt; 
&lt;li&gt;All disputes about the development of the project will be settled over knife-fight. This is the key element of the methodology.&lt;/li&gt;
 
&lt;li&gt;The project will be done in iterations, after which the lead engineer will have to systematically knife-fight each senior developer. This will determine the lead engineer for the next iteration of the project (as he will be the only one left alive).&lt;/li&gt;
 
&lt;li&gt;In the event of a dispute (namely between the designers and the programmers) an immediate knife-fight is required. The one left living will have their way in the issue. This helps prevent "overlapping flows" in the development cycle. &lt;br /&gt;&lt;/li&gt;
 
&lt;li&gt;Customers or users of the product should be frequently asked for their feedback. To adequately make a feature request in the knife-fight development model the customer must be asked to come directly to the office, where he or she will be confronted (again in a knife-fight) by one of the Jr. System administrators. Should The customer survive the meeting, the feature will be added to the next iteration.&lt;/li&gt;
 
&lt;li&gt;Adopting a new tool or technology requires that a representative of the company engages in a knife fight with the developer of the new tech in question. For example, if you were on a subversion system and someone suggests to move to git, the person suggesting the change would have to stand hand-to-hand combat with Linus Torvalds. We believe that this will help to confirm the seriousness of each request for tool-changes, as nobody would knife-fight linus torvalds unless they &lt;em&gt;really&lt;/em&gt; wanted to switch to git.&lt;/li&gt;
 &lt;/ol&gt; 
&lt;p&gt;&lt;img style="padding:10px; float:left; width:60%; height:60%;" src="http://i245.photobucket.com/albums/gg69/sikanrong101/knifefight.jpg" alt="" /&gt;So there you have it - I would suggest you start training your arm now if you're planning to develop software in 2010, as likely it's the only way you'll survive.&lt;/p&gt;
 
&lt;p&gt;...THE CAKE IS A LIE!!&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/114</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>How the internet went to hell in America (Part I)</title>
      <link>http://sikanrong.com/blog/view/113</link>
      <description>&lt;p&gt;&lt;img style="float:right; padding:10px" src="http://i245.photobucket.com/albums/gg69/sikanrong101/comcastic_blocktastic_slowtastic.jpg" alt="" /&gt;There's many forms of government in the world. Some are capitalist, communist, socialist... All have their downfalls. Nothing (*NOTHING*) fucks my day up more than when I hear some dumb american go "Well, this is the best country in the world!! We've got &lt;em&gt;capitalism!&lt;/em&gt;"&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;*SLAP!*&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;NO. No, no, no. Capitalism has it's downfalls too. Because of them, we're currently losing our right to a free and open and (un-corporate) internet. As ISPs clench their grasp on this, the internet has nothing to do but get worse (It'll be like "Internet Vista"). Basically - whenever people who want to make their pockets deeper really put their mind to it, the consumer inevitably has to bend over. The sort of insepid evil that's being talked about now is none other than (*CRINGE*) &lt;strong&gt;overage fees&lt;/strong&gt;. Now that net neutrality has been dealt some very real legal death-blows by the US 109th congress, the Senate, the House Judiciary Comitte, and notably &lt;em&gt;the Republicans,&lt;/em&gt; ISPs are now looking to fatten their wallots by charging users *OVERAGE FEES*. This means that there will be a cap on your internet. That's right, the same internet that you're paying for now, that one with no cap - you know that one? Well, in the bright and shining future of america, as our currency dwindles down to nothing, and our economy becomes stagnant, we're going to be paying the *SAME* amount of money, and then getting charged overage fees if we go over our data limit.&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;"WHAT THE FUCK"&lt;/strong&gt;, right? "What data limit?!?" Right. First, how did something as evil as this happen? That's the real question, isn't it? If you direct your attention to wikipedia, you'll see the seven bills that have been proposed (and the five which have been denied) by congress. All of these bills attempted to make rules stricter for ISPs, and also to make sure ISPs can't limit our speeds on the internet based on limited-service packaging schemes (tiered service), or deny service to some websites, while allowing it to others. This is so that if large web entities like google one day wanted to become financially intertwined with an ISP, the ISP couldn't start "coaxing" people into only using google by blocking all other search websites. These are the rules laid out to keep the internet free, and to keep us (the consumers) free from getting financially bent-over by ISPs with huge amounts to gain at our expense.&lt;/p&gt;
 
&lt;p&gt;So, why did 5 of these bills get denied? One-word answer here: &lt;em&gt;MONEY&lt;/em&gt;. Which brings me to my point: &lt;strong&gt;Capitalism's inherent flaw is that some fish get too big, and start wildly eating all the other fish. They aren't playing the game anymore, they now are so powerful that they control the game.&lt;/strong&gt; This is what's happening in our country right now. They have the money to control the game, whether that be with lobbyists, with free lunches, and young guys with nice suits that wait by senator's parking spots... Sometimes, with coffee.&lt;/p&gt;
 
&lt;p&gt;So this is me, telling all of you whole hartedly, we're fucked. It's not really our fault, but rather the very nature of un-checked capitalism gone way out of control. Get ready for overage fees, americans, because they're coming your way to the tune of $1.50/GB, and caps as low as 5GB/month.&lt;/p&gt;
 
&lt;p&gt;..As a side note, Comcast is notably the absolute worst ISP available when it comes to pissing on our consumer rights. Not only are they actively filtering bittorrent traffic, although the protocol has plenty of legal uses, they are also among the first ISPs to consider (and implement) the software needed to constitute an "Overage Charger" and "Data Transfer Limiter". Oh right, and did I mention they actually paid people right off the street to fill up the public hearings about net neutrality issues so that proponents for the legislation wouldn't have a place to sit? To any comcast employees reading this right now, &lt;strong&gt;please commit suicide to better the rest of our human experience.&lt;/strong&gt; ...Or just get another job, unless you're an executive of some sort. Then you're only option is really just to kill yourself. I figure you're so completly evil that anywhere you end up will make our lives worse somehow.&lt;/p&gt;
 
&lt;p&gt;What can you do to avoid this? Not a whole lot, honestly. Barack Obama has pledged that in his first year of office he will actively work with the FCC comissioner (also against net-neutrality) to try and set up stricter guidelines for ISPs, and subsequently make sure we can avoid shit like this. And by we I really mean mean all of &lt;em&gt;you&lt;/em&gt;, because if you're really smart (like me), you left the USA a long time ago with no plans on ever returning. Have a &lt;strong&gt;fucking comcastic&lt;/strong&gt; day, start saving up your cash so you have enough left to hand over to your ISP when the system fails you (again).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/113</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>Which IDE (or editor) do you use?</title>
      <link>http://sikanrong.com/blog/view/112</link>
      <description>&lt;p&gt;Hey all, I tried to make a pretty complete list of all the IDEs in this poll, if I've left something out comment about it and I'll try to add it. What editor do you use? My vote's been cast (TextMate for the win!). I'm really curious as to how this'll turn out, just wrote the polling code today!&lt;/p&gt;

&lt;iframe src="/poll/display_poll_simple/1" frameborder=0 style="width:500px; height:550px"&gt;&lt;/iframe&gt;</description>
      <guid>http://sikanrong.com/blog/view/112</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>What anime people would really look like</title>
      <link>http://sikanrong.com/blog/view/111</link>
      <description>&lt;p&gt;My girlfriend tarrah just started using photoshop, and this picture made me piss myself! It's so amazing! Being an avid anime watcher, the first thing that popped in my head was "Nyu???"&lt;/p&gt;
 
&lt;p&gt;&lt;img src="http://i245.photobucket.com/albums/gg69/sikanrong101/bigeyes.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;...Those EYES!&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/111</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>Jruby Applet: OpenGL running from Ruby in an Applet</title>
      <link>http://sikanrong.com/blog/view/110</link>
      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
 
&lt;p&gt;Hooray for combining technologies, this is a shining example of such work. So basically I've managed to put JRuby in an applet and make the ruby actually run the OpenGL code directly. I didn't want to bomb every visitor to this page with a java applet though, so I've made it a bit easier to deal with. If you want to see the applet in action, click &lt;a href="http://www.sikanrong.com/jruby_ogl_helloworld/sik-index.html" target="_blank"&gt;here&lt;/a&gt;. I've put this up on google code, so you can download the source &lt;a href="http://jruby-jogl-applet-launcher.googlecode.com/"&gt;from them&lt;/a&gt;. Anyway - basically what I'm doing is making an applet, evaluating the ruby code specified by URL in the 'evalruby' parameter, instantiating a new Ruby class (in java) and using it. Specifically, the ruby file highlighted in evalruby must define the class 'RubyGLListener', which implements the interface javax.media.opengl.GLEventListener. Then you just 'plug' the GLEventListener into the applet's canvas and voila! OGL JRuby Applet Launcher, at your service!&lt;/p&gt;
 
&lt;p&gt;So here we basically have the hardest bit:&lt;/p&gt;
 &lt;pre&gt;package com.sikanrong;
import org.jruby.Ruby;
import org.jruby.javasupport.Java;
import org.jruby.javasupport.JavaEmbedUtils;
import org.jruby.javasupport.JavaUtil;
import org.jruby.runtime.Block;
import org.jruby.runtime.GlobalVariable;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.RubyInstanceConfig;
import java.io.*;
import java.net.URL;

import java.util.*;
import javax.swing.JApplet;
import java.lang.ClassLoader;
import javax.media.opengl.GLEventListener;

public class RubyGLWrapper{


	public GLEventListener getGLListener(){
		return (GLEventListener) new Object();
	}

	public static RubyGLWrapper getInterfaceFromScript(String contents){
	   final Ruby runtime = Ruby.getDefaultInstance();
		
	   runtime.evalScriptlet(contents);

	   RubyGLWrapper ruby = null;
	   final IRubyObject rawRuby = 
                       runtime.evalScriptlet("RubyGLListener.new");	

	   ruby = (RubyGLWrapper) JavaEmbedUtils.rubyToJava(runtime, 
                          rawRuby, 
                          RubyGLWrapper.class);
           return ruby;
	}


}&lt;/pre&gt; 
&lt;p&gt;This is the RubyGLWrapper class - which is responsible for returning the Ruby class but wrapped so we can use it freely in java. Note the ruby class extends this class, and the only method we can call from java is getGLListener. If I wanted to call more Ruby methods from the java I would have to define the method both in the ruby and then a method to overwrite in the Java class that it inherits from. Moving on, this is the Ruby class:&lt;/p&gt;
 &lt;pre&gt;#!/usr/local/jruby/bin/jruby
require 'java'

include_class "com.sikanrong.RubyGLWrapper"

include_class "javax.swing.JFrame"
include_class "java.awt.BorderLayout"
include_class "com.sun.opengl.util.Animator"
include_class "javax.media.opengl.GL"
include_class "javax.media.opengl.GLCanvas"
include_class "javax.media.opengl.GLCapabilities"
include_class "javax.media.opengl.GLAutoDrawable"
include_class "javax.media.opengl.GLDrawableFactory"
include_class "javax.media.opengl.GLEventListener"
include_class "com.sun.opengl.util.GLUT"



class RubyGLListener &lt; RubyGLWrapper
  include GLEventListener
  def getGLListener
    self
  end
  

  
  def init(drawable)
     gl = drawable.getGL
    glut = GLUT.new

    gl.glShadeModel(GL::GL_SMOOTH);
    
    gl.glEnable(GL::GL_LIGHTING)
    gl.glEnable(GL::GL_LIGHT0)

    gl.glEnable(GL::GL_CULL_FACE)
  end
  
  def reshape(drawable, x, y, width, height)
  
  end

  def displayChanged(drawable, modeChanged, deviceChanged)
    
  end
  def display(drawable)
      gl = drawable.getGL();
      glut = GLUT.new
      gl.glRotated(0.15, 0, 1, 0);  
      gl.glRotated(0.15, 1, 1, 0);  
      gl.glClear(GL::GL_COLOR_BUFFER_BIT);
      gl.glColor4d(1,0,0,0);
      
      mat_specular = glFloatArray [1.0, 1.0, 1.0, 1.0]
      mat_shininess = glFloatArray [50.0]
      light_position = glFloatArray [1.0, 1.0, 1.0, 0.0]

      gl.glMaterialfv(GL::GL_FRONT, GL::GL_SPECULAR, mat_specular);  
      gl.glMaterialfv(GL::GL_FRONT, GL::GL_SHININESS, mat_shininess);
      gl.glLightfv(GL::GL_LIGHT0, GL::GL_POSITION, light_position);
      
      
      glut.glutSolidSphere 0.7, 20, 20
      gl.glFlush();
  end
  
  def glFloatArray(array)
    ret = java.nio.FloatBuffer.allocate(array.length)
    array.each do |n|
      ret.put(n)
    end
    ret
  end
  
end
&lt;/pre&gt; 
&lt;p&gt;..So elegant in it's simplicity... Note that the class inherits from the RubyGLWrapper and extends the GLEventListener interface. Pretty cool right? So as you can see all the OGL instructions in the applet are nicely contained right here in ruby! The possibilities with this stuff is endless, being able to manipulate OpenGL in ruby is going to lead to some awesome projects! Namely if those projects end up in an applet.. Speaking of which, this is the applet code:&lt;/p&gt;
 &lt;pre&gt;package com.sikanrong;
// External imports
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;

import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;

import com.sun.opengl.util.Animator;
import javax.media.opengl.GL;
import javax.media.opengl.GLCanvas;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.GLEventListener;


public class RubyGLApplet extends Applet
{
	GLCapabilities caps;
	GLCanvas canvas;
	StringBuffer buf; 
	
    public RubyGLApplet()
    {

        setLayout(new BorderLayout());

        setSize(400, 400);

        setVisible(true);
	    caps = new GLCapabilities();
        caps.setDoubleBuffered(true);
        caps.setHardwareAccelerated(true);
	    canvas = new GLCanvas(caps);

        add(canvas, BorderLayout.CENTER);

        Animator anim = new Animator(canvas);
        anim.start();
    }
	public void init(){
		
                //ignore the weird spacing here
                //it's just to fit it into this 
                //page's formatting
		RubyGLWrapper ruby = RubyGLWrapper.getInterfaceFromScript(
                     readFileFromURL(
                        getParameter("evalruby")));

		GLEventListener listen = ruby.getGLListener();

        canvas.addGLEventListener(listen);

	}

	public String readFileFromURL(String strUrl){
	    String line;
	    URL url = null;
	    try{
	      url = new URL(strUrl);
	    }
	    catch(MalformedURLException e){}
		StringBuffer strBuff = null;
	    try{
	      InputStream in = url.openStream();
	      BufferedReader bf = new BufferedReader(new InputStreamReader(in));
	      strBuff = new StringBuffer();
	      while((line = bf.readLine()) != null){
	        strBuff.append(line + "\n");
	      }

	    }
	    catch(IOException e){
	      e.printStackTrace();
	    }
		return new String(strBuff);
	}


}
&lt;/pre&gt; 
&lt;p&gt;Which is pretty short, note in the init method we grab the ruby eval url and instantiate the RubyGLWrapper instance, and from that we get the interface to pull our newly instantiated RubyGLListener out and use it for the applet canvas (i.e. we just 'plug' it in!)&lt;/p&gt;
 
&lt;p&gt;So, &lt;strong&gt;pitfalls and other points of interest&lt;/strong&gt;:&lt;/p&gt;
 &lt;ol&gt; 
&lt;li&gt;The jruby jar is HUGE and it makes the applet take forever to load. I've been nagging people on the JRuby forum to make a slimmed down build option for the JRuby jar to alleviate some of this, and I think soon they will&lt;/li&gt;
 
&lt;li&gt;I'm using the JNLP applet launcher to run this, which is awesome because it automatically downloads the native OGL stuff when needed for any OS/Architecture. That's freakin pimp, because it means that once you've written the Ruby OGL code, it's portable to any computer with a browser. Awesome!!&lt;/li&gt;
 
&lt;li&gt;I'd really like to use Pack200 too solve the size issue, and i just haven't been able to get it to work, anybody that could point me in a good direction should&lt;/li&gt;
 &lt;/ol&gt; 
&lt;p&gt;&lt;strong&gt;Where is this going?&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;Well the right answer is really "Anywhere", but I'd really (*really*) like to make a 3d game-engine in JRuby that has applet portability capabilities. I'd like to do it in JRuby because it would provide freedom and a concise &amp;amp; clean way to write game code on a level that the world of game-programmers have never before seen. Think "Ruby-on-Game-rails". I'm going to be incorporating the JBullet physics library - and seeing what cool syntatical stuff I can get ruby to do with significance to gaming (things like "x = Model.new('/path/to/model.3ds', 'path/to/texture.jpg', :physics=&amp;gt;true)"). Unfortunately that's all going to take forever because I'm really doing all this stuff on the weekend. Cool beans though, right??!&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;"So what does the applet actually do so far?"&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;If you want to marvel in the fact that it works, sure, go ahead and give it a click. All it does though is show a spinning sphere with a light pointed at it rotating though, and after about 15 seconds it's pretty boring. The cool part is it's really acting as an applet Launcher for any ruby based OGL stuff, so if you just switch out the 'evalruby' file for another file, it'll use that OGL code instead. So, although my ruby only spins a sphere, you can download the applet jar and start writing your own Ruby OGL code and using the very same applet to run it, without actually even having to re-compile any java code. THAT'S slick.&lt;/p&gt;
 
&lt;p&gt;&lt;strong&gt;"Your applet is broken"&lt;/strong&gt;&lt;/p&gt;
 
&lt;p&gt;NO ITS NOT - it just takes forever-and-a-day to load, so sit back and forget about it, and one of these times when you check back it'll actually have loaded and be working. You have to hit 'Trust' when the little dialogs come up asking if you want to give my applet permissions and stuff.&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/110</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>WE GET IT: Apple is from Cupertino</title>
      <link>http://sikanrong.com/blog/view/109</link>
      <description>&lt;p&gt;&lt;img style="float:right; padding:10px; width:50%; height:50%" src="http://www.iphoneros.com/wp-content/uploads/2007/08/steve_jobs.jpg" alt="" /&gt;I just wanted to say, for some freaking reason I CAN'T seem to read ANYONE'S tech-blog about Mac or Apple (or the iPhone) without reading the phrase "Cupertino-based Apple", or "Apple, a Cupertino based firm", or "The Cupertino based firm, Apple". OK! WE GET IT: Apple is in Cupertino, and guess what: &lt;span style="text-decoration: underline;"&gt;WE DON'T CARE!&lt;/span&gt; We really don't. If you're not from the US (and the internet is global, remember), then you don't know where Cupertino is. Hell, if you're from california and you're not a mac geek you don't know where Cupertino is. I'm from the west coast and I AM a mac geek and I don't even know where the hell it is, but here's what I know to be true; NONE of these groups of people care. Just say Apple, and we'll get it. Trust me. If you're scrounging for sentance-extending phrases, just wait until you can come up with more details that we &lt;em&gt;care&lt;/em&gt; about.&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/109</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>Someone Flame This Man!!</title>
      <link>http://sikanrong.com/blog/view/108</link>
      <description>&lt;p&gt;&lt;img style="float:right; margin:10px" src="http://i245.photobucket.com/albums/gg69/sikanrong101/Picture1.png" alt="" /&gt;Somehow the forces of evil have found a new way to come together. ASP, the worlds worst web-programming language, meets Christianity, the most awful Turd-in-a-punchbowl lie humanity has ever stuck to for thousands of years. Christianity and ASP have nothing to do with eachother besides being some of the worst things on the planet, UNTIL NOW. This guy has somehow figured out how to mix the two most hideous things he possibly could on &lt;a href="http://www.christianasp.net"&gt;christianasp.net&lt;/a&gt;. When I first saw this I almost cried and laughed, at the same time. If anybody needs something to do today, use &lt;a href="http://www.christianasp.net/Contact.aspx"&gt;this&lt;/a&gt; form and send him something he (clearly) needs to hear. Here's what I chose:&lt;/p&gt;
 
&lt;p style="background-color:#333; padding:10px"&gt;Dude, the fact that you have a christian ASP site is possibly the most disgusting thing I've ever seen on the internet. The fact that people smart enough to write code are dumb enough to believe in god is astounding to me. People like you make the world worse: coders are supposed to make the world better, and we have the power. People like you concern me greatly. Please re-think your life and your beliefs with the same mentality you would use while debugging your disgusting ASP code. Also, re-think using ASP. it's terrible and inferior in comparison to Ruby and PHP. Ciao.&lt;/p&gt;
 
&lt;p&gt;&lt;a href="http://www.christianasp.net/Contact.aspx"&gt;Write yours today!&lt;/a&gt;&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/108</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>All-Out Code Edit War: &lt;br&gt;What's the best Web-developer's Code Editor out there?</title>
      <link>http://sikanrong.com/blog/view/107</link>
      <description>&lt;p&gt;&lt;img style="float:right; padding:10px;width:112px; height:109px" src="http://i245.photobucket.com/albums/gg69/sikanrong101/Photo5.jpg" alt="" /&gt;Hi all, It's me again. I &lt;em&gt;love&lt;/em&gt; talking about IDEs and code editors. This &lt;em&gt;has&lt;/em&gt; to me the
damn touchiest nerd subject of all-time. I've got friends that ONLY
write code in &lt;a href="http://vim.sourceforge.net/"&gt;vim&lt;/a&gt;, while others that swear upon &lt;a href="http://en.wikipedia.org/wiki/Midnight_Commander"&gt;Midnight Commander&lt;/a&gt;, and yet others who use nothing less than the full-on graphical all-encompassing-integration IDE (dreamweaver, zend, etc). Well, I've seen this blog before, but I think the needs of a web-developer with respect to an IDE/Editor is different from other types of code author's perspectives. So here they are, may the best editor win!&lt;/p&gt;
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="vertical-align:top"&gt;&lt;span&gt;10)&lt;/span&gt;&lt;/td&gt;
 
&lt;td&gt;&lt;img style="float:right; padding:10px" src="http://i245.photobucket.com/albums/gg69/sikanrong101/Vim-1.png" alt=""  So first there's &lt;strong&gt;Vim&lt;/strong&gt;. Vim stands for 'VI - Improved', as it's a GNU remake of the old UNIX 'VI' text editor. Vim is primarily for Linux/Unix systems. Vim looks like something you'd see on a green-and-white CRT monitor in front of a programmer in the movie Superman 2. It's straight from the 80s (pure ASCII text-based love), and furthermore it doesn't even have a funky keyboard based ASCII faux-gui like nano or emacs, it's keyboard shortcuts and commands or BUST. Vim is said by it's die-hard followers to be the hands-down fastest way to write code, but only after you've spent 15 years figuring out what all the keyboard shortcuts and commands do. For example, the command for save+quit is ':wq!'. If that's not intuitive to you, it's because you're a NORMAL PERSON. Personally I will never understand the legions of vim-geeks. Why not 'ctrl+s'?? Anyway, vim is actually pretty handy sometimes, besides just being a classic:
	&lt;br /&gt;&lt;br /&gt; PROS:
	
&lt;ul&gt;
&lt;li&gt;Since vim is actually fully text-based, it's the PERFECT editor for when you're remoted into a linux shell VIA ssh or other means. Great for on-the-spot editing on the production server, etc.&lt;/li&gt;
 
&lt;li&gt;Recent versions of vim support code syntax highlighting, which is awesome for when you're really getting into editing something on the server. You'll have to remember ":syntax on" to turn it on though.&lt;/li&gt;
 
&lt;li&gt;Obviously, it's very lightweight (it's ASCII!)&lt;/li&gt;
 
&lt;/ul&gt;
CONS:
	
&lt;ul&gt;
&lt;li&gt;It's 2008, and we can do a whole whole lot more with an IDE than run it in a terminal nowadays, vim is just plain ugly.&lt;/li&gt;
 
&lt;li&gt;User-interface NIGHTMARE, if you don't already know how to do what you want to do in VIM, get ready to look up the specific keyboard commands on the internet somewhere, because you're sure-as-hell not getting saved by a menu&lt;/li&gt;
 
&lt;li&gt;By the time you do learn all the shortcuts, you'll (usually) have already found a better editor.&lt;/li&gt;
 
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
 
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="vertical-align:top"&gt;&lt;span&gt;9)&lt;/span&gt;&lt;/td&gt;
 
&lt;td&gt;&lt;img style="float:right;margin:10px;" src="http://i245.photobucket.com/albums/gg69/sikanrong101/VisualStudioNET.gif" border="0" alt="" /&gt;&lt;strong&gt;Visual Studio .NET&lt;/strong&gt; is a Microsoft development environment for just about everything. Really! It does C/C++/C#/VisualBasic/VC++ and the kitchen sink. Hey... But none of those are web languages! Well, exactly. THIS IS NOT A WEB DEVELOPMENT ENVIRONMENT. When I walk into a coffee shop and I'm like "Oh, you're a web developer?" and I look at their screen and see them editing ASP code in MSVS.net I just break out laughing. This is not just because of my true hate for ASP (maybe a little..), but also because it took MS until 2008 to get good "Intellisense" (code completion) for Javascript and CSS. How can you even call this a web development environment? So besides that, you can do code-bookmarks (which I kind of like, &lt;em&gt;when I'm editing C!&lt;/em&gt;), tabbed-browsing, syntax highlighting, and all the other standard code-edit stuff. If you're working on an ASP project you can Debug your applications line-by-line.&lt;br /&gt;&lt;br /&gt;There are no real advantages to using this IDE: the documentation is TERRIBLE, the community is non-existent compared to OS alternatives and their respective IDEs (like the PHP &amp;amp; Ruby languages), the interface (&lt;em&gt;and&lt;/em&gt; the configuration) is complex and ugly. Furthermore, there's no such thing as Open Source when it comes to Microsoft, so naturally this (VS.NET 2008) costs like $1200 bucks for the full version, and guess what? It's terrible to use with MySQL, so if you want the Full Integrated MS package you get MSSQL 2008, and then you're out another 1000+ bucks. "Sounds Great! Where do I sign up?" *SLAP*, read below to find out why I think this IDE is terrible crap.
	&lt;br /&gt;&lt;br /&gt; PROS:
	
&lt;ul&gt;
&lt;li&gt;This slightly beats out vim, but only because you actually have a graphical frontend.&lt;/li&gt;
 
&lt;li&gt;There are NO other advantages to using this IDE, even if you're unlucky enough to still be writing ASP.&lt;/li&gt;
 
&lt;/ul&gt;
CONS:
	
&lt;ul&gt;
&lt;li&gt;It costs a WHOLE WHOLE lot.&lt;/li&gt;
 
&lt;li&gt;Windows only, and on top of that, this is gonna leave a HUGE memory footprint when it runs.&lt;/li&gt;
 
&lt;li&gt;Geared towards ASP, the worst server-side language on the internet. ColdFusion might be the only thing that compares to it's shitty-ness.&lt;/li&gt;
 
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
 
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="vertical-align:top"&gt;&lt;span&gt;8)&lt;/span&gt;&lt;/td&gt;
 
&lt;td&gt;&lt;img style="float:right;margin:10px;width:158px;height:110px" src="http://i245.photobucket.com/albums/gg69/sikanrong101/MidnightCommander-1.png" border="0" alt="" /&gt;Next we have &lt;strong&gt;Midnight Commander&lt;/strong&gt;. Midnight Commander really doesn't count as an 'IDE' per se (like vim), however it is a pretty powerful tool that can (to be sure) meet the same ends when it comes to web development. So, MC is like a futuristic editor/file-manager, except it's stuck in ascii mode. MC features a full on menu system and ASCII GUI with &lt;em&gt;mouse support&lt;/em&gt; (look out vim-heads)!! Not only a file manager, MC can use one of it's panes to edit code with it's built-in editor 'mcedit' which features syntax highlighting for most common languages. With mcedit you can also use the mouse to edit text too, which is (always) an eternally handy feature. MC also boasts the ability to look directly into common archive types (such as .zip, .tar, or even .rpm) as though they were directories on the system. It can also act as an FTP client, which is pretty handy for those of us who work in PHP (or without versioning software in general). One thing I find pretty neat about midnight commander is it's level of customize-ability, the user can change the panes to do pretty much whatever they want, I like that. it's also filled with keyboard shortcuts (obviously, being an ASCII app) that can make life much faster when it comes to editing/renaming/moving around files, and flipping about it's panes. To put icing on this already bloated cake, MC now has an HTTP filesystem browsing plugin, meaning you can use HTTP virtual directories just like a mounted drive. That's pretty freakin' cool.
	&lt;br /&gt;&lt;br /&gt; PROS:
	
&lt;ul&gt;
&lt;li&gt;It's ASCII once again, so you can use it over a simple ssh terminal connection no problem. This eternally kicks vim's butt in terms of doing complicated filemanager operations remotely. It is (however) questionable whether the mouse will always work over the remote connection.&lt;/li&gt;
 
&lt;li&gt;It does EVERYTHING (read all that stuff up there!), it's like nautilus but ASCII-base.&lt;/li&gt;
 
&lt;li&gt;Unlike vim, MC is actually very intuitive and easy to use.&lt;/li&gt;
 
&lt;/ul&gt;
CONS:
	
&lt;ul&gt;
&lt;li&gt;Graphically we could be asking for a whole lot more, I like to open more than one file at a time for editing, like in different windows so I can easily switch back and forth between files which are far away from eachother in my filesystem tree. dual-panes are restricted to dual-panes&lt;/li&gt;
 
&lt;li&gt;That's really the only con, you just don't have full-on windows or tabs to work with. It's 2008, and editing code without this basic windowing stuff feels (to me) like you're asking a lot. Please don't flame me too hard for this MC purists..&lt;/li&gt;
 
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
 
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="vertical-align:top"&gt;&lt;span&gt;7)&lt;/span&gt;&lt;/td&gt;
 
&lt;td&gt;&lt;img style="float:right;margin:10px;width:150px;height:150px" src="http://i245.photobucket.com/albums/gg69/sikanrong101/Dreamweaver.jpg" border="0" alt="" /&gt;&lt;strong&gt;Dreamweaver&lt;/strong&gt; is primarily a windows IDE, which does absolutely everything, and mostly it does it all really freakin' bad. For the record I absolutely hate Dreamweaver, as well as most other adobe web-development solutions. However, it's a major player in the IDE game and I want my own chance to back up my good reasons to hate this. Basically DW can handle the most non-experienced web developers and give them something super-graphical to work with. DW even will write pre-made JS scripts for would-be complex elements of a site that require some Javascript Know-how. Unfortunately it'll give you disgustingly complex markup (and scripts) and instead of using would-be simple css techniques to do image-swap operations. It exports a full-on image pre-loader script, which is a crap approach. Actually, most things DW does are the 'crap' approach. It also attempts to incorporate server-side logic into it's graphical frontend a-la ColdFusion, which I just couldn't hate more (as a non-coldFusion developer). The reason it's on my list is because it's actually got a decent text editor built into it, and if you're only using it to edit text, it'll serve you right. It gives you tabbed code browsing, easy to use find operations, and syntax highlighting, as well as some more handy features. One thing I specifically like about DW is the ability to search for a string in just one directory of a massive project EASILY. Also, it doesn't use java, so once it's all started and initialized it runs pretty smoothly and quickly. Another thing I like about the find function is that you can split the main edit window into panes and use them for what you'd like. I'm usually splitting between the find in project pane and the code editor.
	&lt;br /&gt;&lt;br /&gt; PROS:
	
&lt;ul&gt;
&lt;li&gt;If you like ColdFusion, and you don't care about crappy javascript (if it works), AND you don't know much about writing code, this is your dream-tool.&lt;/li&gt;
 
&lt;li&gt;It'll even sync with your server for easy-uploading and on-the-server editing.&lt;/li&gt;
 
&lt;li&gt;Everything I've grown to expect from an advanced editor in 2008&lt;/li&gt;
 
&lt;li&gt;Built in documentation from o'reilly for a load of different web languages. That's actually pretty sweet.&lt;/li&gt;
 
&lt;/ul&gt;
CONS:
	
&lt;ul&gt;
&lt;li&gt;Leaves a GIANT memory footprint if you're just using the editor&lt;/li&gt;
 
&lt;li&gt;On slower machines this takes FOREVER to start up and initialize&lt;/li&gt;
 
&lt;li&gt;It's filled with tons of bloated crap that you'll never use if you're like me, it kinda sucks to have to avoid it's "handy" do-it-for-you approach all the time.&lt;/li&gt;
 
&lt;li&gt;It's too rigid on what is and isn't a part of the current project. I really don't like that about it, you'll have to go through like 2 modal windows just to add an existing file to your project, F*ck that..&lt;/li&gt;
 
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
 
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="vertical-align:top"&gt;&lt;span&gt;6)&lt;/span&gt;&lt;/td&gt;
 
&lt;td&gt;&lt;img style="float:right;margin:10px;" src="http://i245.photobucket.com/albums/gg69/sikanrong101/Zend-1.gif" border="0" alt="" /&gt;&lt;strong&gt;Zend Studio&lt;/strong&gt; a PHP IDE (for Windows, Mac &amp;amp; Linux) that comes from the very same people who developed php. Zend sports some pretty cool features when it comes down to PHP. It's the only IDE for PHP I've ever seen that introduces a line debugger; being able to do breakpoints with PHP and examining data (can) save HEAPS of time. Being a modern editor it's got most of what you'd expect from an IDE in 2008: It's got tabbed file browsing, an easy way to do a 'find-in-project', groovy text-editing keyboard shortcuts, etc. Also, it sports database-view which is compatible with all kinds of db types, including MSSQL and MySQL. If you're using phpmyadmin to view your db all the time and find it tedious at times, this is actually a pretty great tool. Why is it all the way up here at #7? Well, for one thing it's written in Java, and it's totally clunky and *slow* because of it. It's definitely a heavyweight and seemingly without all the features to really back up it's memory footprint. Furthermore, if you're like me you've probably long-since left PHP in the dust for Ruby or something else (i.e. something better), and Zend isn't going to be very helpful anymore..
	&lt;br /&gt;&lt;br /&gt; PROS:
	
&lt;ul&gt;
&lt;li&gt;PHP breakpoint debugging. That's freakin' hip.&lt;/li&gt;
 
&lt;li&gt;Tabbed file browsing, intuitive gui, easy find-in-project functionality&lt;/li&gt;
 
&lt;li&gt;Database view mode compatible with MANY types of popular db engines.&lt;/li&gt;
 
&lt;li&gt;Being written in Java really helps in that this IDE is available for every platform under the sun, which isn't costing Zend too much more in development time.&lt;/li&gt;
 
&lt;/ul&gt;
CONS:
	
&lt;ul&gt;
&lt;li&gt;Written with Java "Swing" components, which works clunky and slow. Just my opinion..&lt;/li&gt;
 
&lt;li&gt;Really not great for anything but PHP development&lt;/li&gt;
 
&lt;li&gt;To use the debugger you have to run your code on the pre-packaged zend php platform, which isn't necessarily the same as what you would normally be using (a-la LAMP). As with most things in PHP, it's kind of a pain to configure this beast.&lt;/li&gt;
 
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
 
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="vertical-align:top"&gt;&lt;span&gt;5)&lt;/span&gt;&lt;/td&gt;
 
&lt;td&gt;&lt;img style="float:right;margin:10px;" src="http://i245.photobucket.com/albums/gg69/sikanrong101/Netbeans-1.gif" border="0" alt="" /&gt;&lt;strong&gt;NetBeans IDE&lt;/strong&gt; is Awesome. Firstly it's FREE, which I suppose considering all the other GNU/GPL compliant projects listed on this page isn't &lt;em&gt;that&lt;/em&gt; surprising, but it's still pretty cool for a fully-featured IDE like this one. NetBeans supports a *lot* of languages, and (being an OpenSource Project) sports a load of plugins. Since I'm mainly a ruby developer, i have to go off about this, but it also features a load of ruby/rails developing tools in it's &lt;em&gt;base&lt;/em&gt; version, which is pretty impressive considering how much other stuff it's doing. Netbeans has pretty great rails code-completion stuff, as well as a regexp helper (which is pretty cool). It also features GUI'd up rails file/generation for MVC stuff, which does make it that much easier. Another thing I find pretty groovy is a gem installation manager, so no more comparing the output of sudo gem list to figure out what's going on. Unfortunately (and this doesn't bother a lot of people, but it bothers me), you &lt;em&gt;must&lt;/em&gt; create a project before you really start working. Other editors/IDEs are currently realizing that developers frequently need to hop around and edit things on the FS, and this task is greatly complicated more rigid when one &lt;em&gt;must&lt;/em&gt; make a project and add files to that project, etc. I know I've talked a load about it's Rails features, but netBeans also has a very impressive feature-portfolio when it comes to PHP and even more-so for Java and C/C++ development.
	&lt;br /&gt;&lt;br /&gt; PROS:
	
&lt;ul&gt;
&lt;li&gt;Ruby on Rails line debugger, built-in irb for Ruby developers, Rails code-completion&lt;/li&gt;
 
&lt;li&gt;Built-in gem installation, that is really pretty handy.&lt;/li&gt;
 
&lt;li&gt;Support for Every language under the sun (besides ASP! *slap*)&lt;/li&gt;
 
&lt;li&gt;Costs 0.00 and is fully Open Source&lt;/li&gt;
 
&lt;/ul&gt;
CONS:
	
&lt;ul&gt;
&lt;li&gt;Having a built-in IRB is a pretty pointless gesture, it's not even a 'script/console' which (in Rails) means generally that you'll use it for less. Weak move.&lt;/li&gt;
 
&lt;li&gt;Not the smallest memory footprint while running&lt;/li&gt;
 
&lt;li&gt;Rigid project creation rules&lt;/li&gt;
 
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
 
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="vertical-align:top"&gt;&lt;span&gt;4)&lt;/span&gt;&lt;/td&gt;
 
&lt;td&gt;&lt;img style="float:right;margin:10px;" src="http://i245.photobucket.com/albums/gg69/sikanrong101/Eclipse.png" border="0" alt="" /&gt;&lt;strong&gt;Eclipse&lt;/strong&gt; Is probably the most well-put-together open-source IDE I've ever encountered for Linux. Firstly, ECLIPSE IS FREE, which is awesome for how big of a product it really is. Also, this IDE is written in Java (and as such it's on OSX Win and Lin), however unlike most Java applications Eclipse uses the SWT libraries for it's widgets (not swing) and because of this it really does seem to work much better and less clunky. I mean a lot of things by 'clunky' by the way, but swing has a serious tendency to redraw every widget all the time, and it makes this awful flicker. Also it just runs significantly slower than the native OS's windowing toolkits (MFC, GWT, etc.).. Anyway, Eclipse draws all of it's power from an EXTENSIVE list of eclipse plugins. These plugins will basically allow you to bend eclipse to your will. Needless to say, with the right plugins eclipse can do EVERYTHING I've listed for every editor above, and probably even more. That's hip. It can integrate with database systems (mssql, mysql, sqlite, etc), it supports syntax highlighting for any language you can find an eclipse package for (most languages), and it can be customized to be a SUPREME web environment. Eclipse also supports line-break debugging of PHP applications. Also (I really like this) the Mylyn extension integrates your Bugzilla account at work to your IDE, letting you manage bugzilla tasks straight from the IDE. That's freakin' cool. It also has full (FULL) ruby-on-rails support, which I'll explain in #5.
	&lt;br /&gt;&lt;br /&gt; PROS:
	
&lt;ul&gt;
&lt;li&gt;DOES EVERYTHING. Absolutely. It's extensible, so if it doesn't do it already and you want it to, you can write a plugin&lt;/li&gt;
 
&lt;li&gt;Open source approach makes it available for absolutely free&lt;/li&gt;
 
&lt;li&gt;Java core minus swing makes for OS interoperability with no downsides&lt;/li&gt;
 
&lt;/ul&gt;
CONS:
	
&lt;ul&gt;
&lt;li&gt;I think the interface is just not-so-slick in it's design, but all the necessary parts are there. Sometimes things that could be small are very large (like in the file browser)&lt;/li&gt;
 
&lt;li&gt;Sometimes it's a pain to find the right plugin, or follow the right tutorial for upgrading or adding functionality to Eclipse, but only as much as it ever is on linux. Once it's up and running you shouldn't have any problems at all&lt;/li&gt;
 
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
 
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="vertical-align:top"&gt;&lt;span&gt;3)&lt;/span&gt;&lt;/td&gt;
 
&lt;td&gt;&lt;img style="float:right;margin:10px;" src="http://i245.photobucket.com/albums/gg69/sikanrong101/Aptana.jpg" border="0" alt="" /&gt;&lt;strong&gt;Aptana&lt;/strong&gt; Is a really unique eclipse-based ide. If your work centers around Javascript and DHTML techniques and you don't want to pay for your IDE, this is the one for you. Aptana seems to be an IDE geared towards DHTML development. Being 'Eclipse-based' means that aptana is really an extension to eclipse (i.e. on a linux system you install eclipse first and upgrade it to "Aptana"). Aptana also comes stand-alone if you don't want to get eclipse first (although it will still be using the eclipse core). This IDE features everything you need to develop Ajax applications. Firstly, you've got code-complete operations for javascript, CSS, and other DHTML favorites. Also (with the RadRails plugin) you get code-completion on rails objects and methods with inferenced typing. Not only is that tech stuff, but it's also &lt;em&gt;slick&lt;/em&gt;. You also get heaps of rails-specific features with RadRails (which I have to talk about, as a rails developer). You get integrated testing in the IDE, which of course helps you run your tests as much as you SHOULD be when you're developing. You get an integrated "script/console", which is (admit it) totally awesome. Aptana also handily gives you a view of your whole HD instead of requiring you to start an Aptana project to contain all files in, although you do still have that option. I really like that. Being a very current environment, Aptana also supports current trends in javascript like Prototype syntax (as well as Dojo and Mochkit).&lt;br /&gt;&lt;br /&gt; Okay, so a little off the subject of the IDE for a second, Aptana also has one grand trick up it's sleeve. Aptana is also producing Jaxter which (and I know this will hurt your head at first) really introduces &lt;em&gt;Server-Side Javascript&lt;/em&gt;. Check out an awesome example of this &lt;a href="http://ejohn.org/blog/server-side-javascript-with-jaxer/" target="_blank"&gt;here&lt;/a&gt;. I was pretty impressed! Jaxter basically does away with the rigid concept of a client end doing strictly managed data trading via ajax. Instead, Jaxter makes it possible for the client and the server to both run the same javascript, thus making the information exchange much more transparent. Surely when both age a bit there will be VERY unique things one will be able to do with Aptana and Jaxter together.
	&lt;br /&gt;&lt;br /&gt; PROS:
	
&lt;ul&gt;
&lt;li&gt;If you do DHTML work, this is the IDE of your dreams&lt;/li&gt;
 
&lt;li&gt;If you do Ruby on Rails, this IDE is the perfect solution for a non-OSX machine. The Aptana OSX version is actually quite nice, but there's other rails environments (which I'll get to later) that are yet better.&lt;/li&gt;
 
&lt;li&gt;Jaxter is a verty cool new idea, I'm excited to see what the IDE+Jaxter will be able to produce (In terms of speed) in the future&lt;/li&gt;
 
&lt;/ul&gt;
CONS:
	
&lt;ul&gt;
&lt;li&gt;There really aren't really any weaknesses, I find it a bit bloated, but some people like their IDE to be bloated, because it's synonymous for "feature-rich". I guess that part's up to you guys to decide.&lt;/li&gt;
 
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
 
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="vertical-align:top"&gt;&lt;span&gt;2)&lt;/span&gt;&lt;/td&gt;
 
&lt;td&gt;&lt;img style="float:right;margin:10px;" src="http://i245.photobucket.com/albums/gg69/sikanrong101/Komodo-1.jpg" border="0" alt="" /&gt;&lt;strong&gt;Komodo IDE&lt;/strong&gt; is an awesome IDE from ActiveState. I had the good fortune of running across the ActiveState guys doing a demo of this at RailsConf in Portland Oregon where I got a free Komodo 4.1 CD from them. This IDE is a ruby guy's dream, I like the interface in this one a lot. Firstly, it's got awesome (and undoable) find/replace-in-project features. Secondly (this is important), when editing PHP projects since there's so many files I really like to use the arrow keys to quickly navigate through the file tree. Specifically I like it when you can press L/R to expand/contract a folder, and for some reason in Eclipse this only scrolls the file-browse pane (who would need that on the arrows?). Anyway, I really like Komodo handles this.&lt;br /&gt;&lt;br /&gt; Also, Komodo is built on the mozilla engine, which (I'm sure) made it easy for ActiveState to provide full-on browser integration for debugging Ajax/JS applications. That's really cool, other IDE DOM inspectors/debuggers usually can't hold a candle to this. Since Komodo is a Rails IDE specifically, you can do some serious debugging, &lt;em&gt;INCLUDING&lt;/em&gt; using script/console WHILE breakpoint debugging from inside the IDE. That's pretty awesome. It's got a Unit::Test interface, which is pretty cool, but really it's just a widget to run rake, which is a bit crap because rSpec is gaining ground really fast on the rails TDD scene, and so far this has no support for it. Furthermore, Komodo IDE doesn't have too big of a memory footprint, and starts pretty quickly. HOWEVER, if you only want an awesome editor with full code-edit 2008 features (even code completion), it ships with KomodoEdit, which is basically all the text-edit glory of Komodo IDE, but without the IDE. KomodoEdit takes about a second to start on a fast machine. Did I mention it's available for Windows, Linux, and OSX? 
	&lt;br /&gt;&lt;br /&gt; PROS:
	
&lt;ul&gt;
&lt;li&gt;Awesome find-and-replace capabilities. That really is important.&lt;/li&gt;
 
&lt;li&gt;Integrated, Advanced DOM debugging with respect to JS and Ajax (Hooray Mozilla!)&lt;/li&gt;
 
&lt;li&gt;You've got two choices, KomodoEdit for fast quick-and-dirty editing, or the IDE for the full on developing experience.&lt;/li&gt;
 
&lt;li&gt;"script/console" DURING breakpoint debugging operations. I've (seriously) ALWAYS wanted that.&lt;/li&gt;
 
&lt;/ul&gt;
CONS:
	
&lt;ul&gt;
&lt;li&gt;No rSpec support!&lt;/li&gt;
 
&lt;li&gt;If you don't get it for free it's $295 for the full-version license. LOAD of crap that is. There USED to be a 'Komodo Personal' version for $35, and they discontinued it and made the far less-featured Komodo Edit free. Meh.&lt;/li&gt;
 
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;
 
&lt;p&gt;
&lt;table border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="vertical-align:top"&gt;&lt;span&gt;1)&lt;/span&gt;&lt;/td&gt;
 
&lt;td&gt;&lt;img style="float:right;margin:10px;" src="http://i245.photobucket.com/albums/gg69/sikanrong101/TextMate.jpg" border="0" alt="" /&gt;&lt;strong&gt;TextMate&lt;/strong&gt; is my favorite editor and the one that I use, released for OSX (only). Textmate built this site! Textmate really isn't (per-se) an IDE, but it's the most full-featured editor EVER. Basically, the interface wins me over here. Firstly, to open a project all you do is drag the folder (in finder) to the textmate icon in the Dock, and it immediately gives you the code editor window and a file-navigation slider page. It's very lightweight; textmate takes about 1 second to start. Despite it's many features, it even &lt;em&gt;appears&lt;/em&gt; lightweight, which I really like. It's &lt;em&gt;extremely&lt;/em&gt; non-obtrusive in comparison to the other entries listed on this page, which I really like. Furthermore, you can just type 'mate &amp;lt;directory_name&amp;gt;' into the terminal to open any filesystem directory that you're currently working on. Alright, past this textmate is expandable easily by 'Bundles', which it comes with HEAPS of, there's pre-packaged Bundles for nearly every type of language (really quite a long list). These are also available in development version from the Macromates subversion repository.&lt;br /&gt;&lt;br /&gt; So, besides all that, textmate is very useful for quickly finding things in files, or around a massive project. When I press (apple)-T I get a 'find file in project' dialog, which updates each time I press a new letter key, whittling down to the final file I'm looking for. It does this based on matched characters, and not squential matches (although that does seem to also carry weight). Point being you don't even have to spell (or remember) the filename correctly and usually you'll always get the right one. Also, these lists (if you don't type anything) list the last files you've opened with the dialog, so many times you can just use the 'last 10 files' list to select what you need &lt;em&gt;without&lt;/em&gt; typing anything. When you're in a large monolithic file you can use the 'Go to Symbol' dialog (ctrl+shift+t) and you get a list of all your classes and all the methods/class variables inside of it (all indented properly), which you can go directly to in the code by clicking.&lt;br /&gt;&lt;br /&gt; You also get a find/replace in file and find/replace-in-project with ctrl+f and ctrl+shift+f (I like how related operations have related key shortcuts). Of course, regexp is there when needed. Code completion is partially supported in ruby (for now) but in C, Java, and PHP and a host of other supported TM languages the code-completion function is fully implemented. I've got the Ruby bundle checked out from the Macromates SVN (because I can do that), and the new generation of ruby code completion is looking sharp! Also you can run your tests AND debug your code (macromates has added ruby-debug to the TextMate mix) from &lt;em&gt;inside&lt;/em&gt; TextMate, which encompasses most of what I ever need to do with a full-on IDE in terms of Ruby. And one more thing. If you hold alt your text selector turns into a crosshair with which you can &lt;em&gt;select blocks of text vertically or horizontally and edit them vertically.&lt;/em&gt; This even includes otherwise incredibly complicated block-cut/copy/paste operations. This saves me just &lt;em&gt;heaps&lt;/em&gt; of time. One last note: this is the only editor I've found so far that has HAML syntax highlighting. Textmate costs about $30. 
	&lt;br /&gt;&lt;br /&gt; PROS:
	
&lt;ul&gt;
&lt;li&gt;Best/most natural user interface for an IDE/Editor I've ever seen. I'm in love.&lt;/li&gt;
 
&lt;li&gt;Non-rigid standards for Project creation/use. You can open your project file by just dragging it in there, and it does exactly what you want it to do&lt;/li&gt;
 
&lt;li&gt;Best way to navigate any size project (or monolithic giant code file) I've ever encountered. TM For the win!&lt;/li&gt;
 
&lt;li&gt;Vertical Text Editing!! Cut/Copy/Paste vertically spliced sections from a group of lines! I almost cried happy when I saw that the first time. Sold.&lt;/li&gt;
 
&lt;/ul&gt;
CONS:
	
&lt;ul&gt;
&lt;li&gt;The ONLY thing that's negative about TextMate (although it's currently in the works) is the incomplete Code-Complete support for Ruby&lt;/li&gt;
 
&lt;li&gt;$30.00 USD is not expensive (by &lt;em&gt;any&lt;/em&gt; means, keep in mind that's only $20 euros). But it's still not as good as $0.00&lt;/li&gt;
 
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/107</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>Atheist + Theist =Respect and understanding? How about it?</title>
      <link>http://sikanrong.com/blog/view/106</link>
      <description>&lt;p&gt;&lt;img style="padding:10px;float:right;width: 50%; height: 50%" src="http://i245.photobucket.com/albums/gg69/sikanrong101/1114401351_l.jpg" alt="" /&gt;I'm going to start by saying that I am an atheist. That, in the most simple way I can explain, means I lack a belief in a god or gods. That's all it means, and I've realized this over time. I have no issues with the god I don't believe in, I'm not angry with god. It seems so many people are, though. Being an atheist, I checked the appropriate box when starting my Stumble account. Most of the atheist literature I come across seems to be just a lot of anger directed towards theists, Christians in particular, trying to prove them wrong in their beliefs. Why?&lt;br /&gt;&lt;br /&gt;I can think of a couple&amp;nbsp; reasons, using my own personal experience and what I've learned in life so far. I grew up in a Christian family, Catholic to be exact, although we didn't practice. When I was about fourteen I started to question my faith, and came to realize I didn't believe in god. This was aided by the theory of evolution and many other scientific discoveries. I thought people who believed in god were stupid and didn't see the evidence that was right in front of them. It pissed me off that all my life I had been getting this bullshit slammed down my throat. Religions in this country have a lot of power, and many religious people say that being an atheist equals moral bankruptcy, which is just ridiculous. To say a person is corrupt based on religious views alone is discriminatory and ignorant. &lt;br /&gt;&lt;br /&gt;Religion has power in the United States. In certain states atheists are restricted from holding office. Even though this is a blatant disregard of the Constitution, a violation of separation of church and state, it's still allowed. Words about god are in our pledge, on our money, which wasn't always how it was, so I don't want to hear any 'oh it's just tradition' crap.&lt;br /&gt;&lt;br /&gt;So there's a couple reasons some atheists may be pissed. Fine, But isn't it enough? I grew tired of being an angry atheist, trying to tell people what to believe or not to believe in a long time ago. There's no point, unless it's a welcome debate or discussion. I get pissed when people try to push their beliefs on me, so why would I want to push my lack of beliefs on someone? What good does it accomplish?&lt;br /&gt;&lt;br /&gt;Can't we all just respect one another, and accept each other regardless of what our feelings on religion are? In the end, we're all just people trying to live life and find something that works for us. I'm tired of fighting and arguing with people. I'm not saying we should roll over and allow our government to continue to dissolve the seperation of church and state, that's vital and necessary to protect the rights of all people of all religions and should be respected. I just don't want to hate people based on them believing and worshipping in a god I don't believe in, there's enough people fighting that useless battle without me.&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/106</guid>
      <author>Alexander Pilafian</author>
    </item>
    <item>
      <title>Best summation of scientology I've ever seen</title>
      <link>http://sikanrong.com/blog/view/105</link>
      <description>&lt;p&gt;I found this on the internet today, on &lt;a href="http://www.ufoship.com/page.php?5"&gt;this&lt;/a&gt; guy's page:&lt;/p&gt;
 
&lt;p style="background:#eee"&gt;&lt;img style="padding:10px; float:right; width:25%; height:25%;" src="http://i245.photobucket.com/albums/gg69/sikanrong101/scientology.jpg" border="0" alt="" /&gt;&lt;strong&gt;"If you want to complain about religion and its need for your money, you'd better start here. Whimsically created by a second-rate, piece of shit science fiction writer (and alleged child molester) named L. Ron Hubbard, Scientology is the biggest terd in a punch bowl ever encountered by man. Take every religion you know, isolate their flaws, multiply that by 100, and you'll understand Scientology."&lt;/strong&gt;&lt;/p&gt;</description>
      <guid>http://sikanrong.com/blog/view/105</guid>
      <author>Alexander Pilafian</author>
    </item>
  </channel>
</rss>
