Alexander Dymo2017-03-10T10:28:40-06:00http://www.alexdymo.com/Alexander Dymoalex@alexdymo.com$6 Discount on Ruby Performance Optimization Book (Paperback) Today on Amazon2016-02-27T00:00:00-06:00http://www.alexdymo.com/blog/2016/02/amazon-discount-on-ruby-performance-optimization-book-paperback<p>Amazon sells my book today for $30 ($6 off). I just found this myself by accident. Given the unpredictable nature of Amazon, you'd better hurry up and get your book while the sale is still on.</p>
<!--more-->
<p>Here's the link to my book on Amazon:
<a href="http://www.amazon.com/gp/product/1680500694/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1680500694&linkCode=as2&tag=rubyperfoopti-20&linkId=NGS4OA6NZ5BLPZAB">Ruby Performance Optimization: Why Ruby is Slow, and How to Fix It</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=rubyperfoopti-20&l=as2&o=1&a=1680500694" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
<iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=US&source=ss&ref=ss_til&ad_type=product_link&tracking_id=rubyperfoopti-20&marketplace=amazon®ion=US&placement=1680500694&asins=1680500694&linkId=LKXB5MCEFS36224X&show_border=true&link_opens_in_new_window=true">
</iframe>
<p><small>
The links above are my own affiliate links. Hope you don't mind clicking one of them and supporting me and my work.
</small></p>
My Ruby Performance Optimization Book Is Now In Print2016-02-03T00:00:00-06:00http://www.alexdymo.com/blog/2016/02/ruby-performance-optimization-book-now-in-print<p>My <a href="http://ruby-performance-book.com" target="_blank">Ruby Performance Optimization</a> book is in print!<!--more--></p>
<p>Honestly, it's old news. I was so excited to get the book out and <a href="http://ruby-performance-book.com" target="_blank">ruby-performance-book.com</a> up that I forgot to announce it here on my personal blog.</p>
<p>I'm proud to say that my <a href="http://ruby-performance-book.com" target="_blank">Ruby Performance Optimization</a> is the first book on Ruby and Rails performance that actually teaches performance optimization and is not a mere collection of tips and tricks.</p>
<p>See <a href="http://ruby-performance-book.com/blog/2015/12/why-read-ruby-performance-optimization-book.html" target="_blank">why you should read the book</a> and make sure to read excerpts about <a href="http://media.pragprog.com/titles/adrpo/optimize.pdf" target="_blank">what makes ruby code fast</a>, <a href="http://media.pragprog.com/titles/adrpo/iterators.pdf" target="_blank">how to optimize your iterators</a>, and <a href="http://media.pragprog.com/titles/adrpo/statistics.pdf" target="_blank">analyze/compare measurements using statistics</a>.</p>
<p>Printed book costs $36. Make sure to check Amazon before you buy. They sometimes sell it for $30. There are also many offers for used books around $20. I don't really know where they come from. So if you buy one, please let me know how well that went.</p>
<p>Of course you can stil buy an ebook in epub, PDF, and Kindle (mobi) formats for just $24.</p>
<div float="left">
<iframe border="0px" frameBorder="0" seamless="true" src="https://pragprog.com/products/buy_now_insert/adrpo" height="192px" width="155px">
Buy Now
</iframe>
</div>
Get 40% Off My Ruby Performance Optimization Book (and Other PragProg Ebooks Too)2015-07-16T00:00:00-05:00http://www.alexdymo.com/blog/2015/07/ruby-performance-optimization-book-sale<p>Pragmatic Bookshelf has a sale today through Friday. They give 40% off any ebook when you use code <strong>XMASJULY2015</strong> during the checkout. Beta ebooks are also on sale, so it's a good chance to get my Ruby Performance Optimization for just $14.40 (full price is $24).<!--more--></p>
<div float="left">
<iframe border="0px" frameBorder="0" seamless="true" src="https://pragprog.com/products/buy_now_insert/adrpo" height="192px" width="155px">
Buy Now
</iframe>
</div>
My Ruby Performance Optimization Book Beta Is Out2015-04-03T00:00:00-05:00http://www.alexdymo.com/blog/2015/04/ruby-performance-optimization-book-beta<p>I'm excited to announce that the beta release of my Ruby Performance Optimization book beta is out! The ebook is available from Pragmatic Bookshelf for just $24.<!--more--> Click the <a href="http://ruby-performance-book.com">"Buy Now"</a> link below to get the ebook in 3 DRM-free formats (optimized for reading from screen, phone, and Kindle) directly from the publisher.</p>
<div float="left">
<iframe border="0px" frameBorder="0" seamless="true" src="https://pragprog.com/products/buy_now_insert/adrpo" height="192px" width="155px">
Buy Now
</iframe>
</div>
<h2>Why You Should Read This Book</h2>
<p>This book is the first comprehensive guide to Ruby optimization. You will learn how to write faster Ruby code of course. You should be able to get the 2x-7x speedup with the advice from the book.</p>
<p>But that's just the beginning. After reading the book, you'll know how to optimize the slow code even when none of the advice works. You'll learn how to use the Ruby CPU and memory profiler to figure out what exactly is slow. You'll master the performance benchmarking to make sure your optimization works. And you'll understand how to write performance tests to maintain the desired level of performance after optimization.</p>
<p>Finally, you'll see what really makes the Ruby code slow, and how to deal with that by tuning the execution environment and garbage collector.</p>
<h2>What Is Missing In This Beta</h2>
<p>Final chapters on tuning up the execution environment and the Ruby garbage collector are still in development.</p>
<p>But if you order the beta book now, there's a good chance you'll get them even before you finish reading the already completed chapters. The plan is to release a new chapter every couple of weeks.</p>
<p>In any case, once you buy the beta book, you'll get the updates, and also the final version of the book (ebook only) for free.</p>
<h2>What About Ruby on Rails Optimization</h2>
<p>One of the chapters is dedicated to Rails optimization techniques. But all of the other content is also directly applicable to Rails, especially, chapters on performance benchmarking, testing, and execution environment tuning.</p>
<h2>I Need Your Feedback</h2>
<p>Beta book is an exciting opportunity for me to get your feedback. I can still change anything in the book, and add new content. So, if you feel anything is missing, or not explained properly, please let me now. You can either <a href="mailto:alex@alexdymo.com">email me</a> or <a href="https://forums.pragprog.com/forums/366">post the message to the book forum</a>.</p>
<h2>Is It OK to Buy The Beta Book</h2>
<p>It's called beta simply because I haven't finished the last 2 chapters out of 10 yet. The other content is ready. And, you'll get the final book anyways, so get the beta and start optimizing right now!</p>
<div float="left">
<iframe border="0px" frameBorder="0" seamless="true" src="https://pragprog.com/products/buy_now_insert/adrpo" height="192px" width="155px">
Buy Now
</iframe>
</div>
I'm Speaking at RubyConf on Ruby Performance. Call for Sponsors2014-10-08T00:00:00-05:00http://www.alexdymo.com/blog/2014/10/i-am-speaking-at-rubyconf-on-ruby-performance<p>Join me at my <a target="_blank" href="http://rubyconf.org/program#prop_690"><em>Ruby Performance Secrets and How to Uncover Them</em></a> session at <a target="_blank" href="http://rubyconf.org/">RubyConf 2014</a> in San Diego, USA (November 17-19).<!--more--></p>
<p>I've been building Ruby and Rails software since 2006, and had to spend about one month per year optimizing. So I learned a thing or two about Ruby performance. This year I signed with Pragmatic Bookshelf to write a book on <a target="_blank" href="/blog/2014/09/signed-with-pragmatic-programmers-ruby-performance-book.html">Ruby Performance</a>. I learned even more while working on the book.</p>
<p>I'd be happy to share my knowledge on Ruby performance optimization at RubyConf. But equally important for me is to learn how other people optimize, what performance bottlenecks they find. That's why I especially look forward RubyConf this year. If you attend, stop by, I'd be very interested to learn from you.</p>
<p>My ultimate goal is to gather all knowledge on Ruby performance optimization, and put it into one place, my <a target="_blank" href="http://ruby-performance-book.com">Ruby Performance book</a>. So instead of wasting time hunting for the performance advice on the internet, Ruby developers would have a complete reference at hand. As a bonus, the book will actually teach how to optimize.</p>
<h2>Call for Sponsors</h2>
<p>I invest a lot of my free time into teaching developers how to write faster Ruby. I write blog posts, articles, now a book, present at RailsConf and RubyConf. And I do most of that work at my own expense.</p>
<p>Many companies get tangible value from my work. Faster code means better products. Better products mean more customers and revenue. But I need your support to continue my Ruby performance optimization endeavour. I would especially appreciate your help covering my costs for the upcoming RubyConf trip. Please email me at <a href="mailto:alex@alexdymo.com">alex@alexdymo.com</a> to discuss what I can do for you in return.</p>
Signed with Pragmatic Bookshelf To Write My Ruby Performance Book2014-09-18T00:00:00-05:00http://www.alexdymo.com/blog/2014/09/signed-with-pragmatic-programmers-ruby-performance-book<p>Great news on my <a href="http://ruby-performance-book.com">Ruby Performance</a> book. First, I have signed with the Pragmatic Bookshelf to write and publish it. Second, the book itself is well underway.<!--more--></p>
<blockquote class="twitter-tweet" lang="en"><p>Signed up with Pragmatic Programmers <a href="https://twitter.com/pragprog">@pragprog</a> to write my Ruby Performance book. Subscribe to book notifications: <a href="http://t.co/rMC49hPzbK">http://t.co/rMC49hPzbK</a></p>— Alexander Dymo (@alexander_dymo) <a href="https://twitter.com/alexander_dymo/status/512692640127516672">September 18, 2014</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>I actually signed the contract with the publisher back in May, but kept things silent until I make a substantial progress with the book.</p>
<p>I'm glad I went through the publisher route for the book. For a newbie writer like me they provide a ton of value. Of course, I get to work with an outstanding editor who fixes my writing and teaches me to express my thoughs better. But there's more. They have an in-house process that forces you to rethink the book in general and restructure your content. End result is that each chapter from the book has a tangible value for the reader. Looking back, I see how my first two chapters I wrote before May were just a pile of poorly organized content that didn't really teach anything useful.</p>
<p>The publisher also adds motivation. Remember that "carrot and stick" thing? So now I have both. My carrot is the number of people I have on the <a href="http://ruby-performance-book.com">book's mailinglist</a>. And PragProg pokes me with their stick with schedule and milestones. Writing is hard. Without the stick I would procrastinate more than write.</p>
<p>But I like carrots too, so if you're interested in knowing more about Ruby and Rails performance, <a href="http://ruby-performance-book.com">signup for the book's mailinglist here</a>.</p>
KDevelop in Facebook Open Academy Results2014-05-15T00:00:00-05:00http://www.alexdymo.com/blog/2014/05/kdevelop-open-academy-results<p>Open Academy has ended. All my 3 students successfuly completed the program and their assignments. I gave them positive evaluation and I'm looking forward seeing more contributions from them in the future. Here are our results.<!--more--></p>
<p>David Stevens was really productive this year. His biggest achievements are virtual override completion, implement function completion, and adjust signature helper for KDevelop-Clang plugin.</p>
<div>
<div class="figure" style="width: 440px;">
<a href="/blog/images/kdevelop-clang-virtual.png"><img src="/blog/images/kdevelop-clang-virtual_thumbnail.png" height="216" width="440" /></a>
<div class="figcaption">Virtual Override Completion</div>
</div>
<div class="figure" style="width: 440px;">
<a href="/blog/images/kdevelop-clang-implement.png"><img src="/blog/images/kdevelop-clang-implement_thumbnail.png" height="216" width="440" /></a>
<div class="figcaption">Implement Function Completion</div>
</div>
<div class="figure" style="width: 475px;">
<a href="/blog/images/kdevelop-clang-adjust.png"><img src="/blog/images/kdevelop-clang-adjust_thumbnail.png" height="264" width="475" /></a>
<div class="figcaption">Adjust Signature Helper</div>
</div>
</div>
<p>Todd Nowacki took over the KDevelop outputview tool. He added buttons to jump to next/previous output mark and fixed links to files in CMake output. He also helped Jørgen Kvalsvik with the missing include completion in KDevelop-Clang plugin. At this point he's working on move to source refactoring that I hope he'll finish after Open Academy program ends.</p>
<p>Thanks to Michael Ferris, new application wizard now allows special characters in project name. It also lets you select new project name and location separately. But most importantly, he added function and variable renaming refactoring to KDevelop-Clang plugin.</p>
<p>I'd like to thank my students for the their work and dedication. I hope to see KDevelop getting more students from Facebook Open Academy program in the future.</p>
Preannouncing My Ruby Performance Book2014-05-02T00:00:00-05:00http://www.alexdymo.com/blog/2014/05/preannouncing-ruby-performance-book<p>I'm proud to preannounce my Ruby Performance Book. I've been optimizing Ruby and Ruby on Rails applications since 2006. I wrote numerous performance patches to both Ruby, Rails and applications that use them. I accumulated a huge amount of Ruby performance optimization knowledge. Now it's time to share. That's why I've started writing the "performance" book. Read on to find out what's inside the book and <a href="http://ruby-performance-book.com/">sign up for the mailinglist</a> to get the early preview of the book once it's ready.<!--more--></p>
<p><strong>What I'm writing about:</strong></p>
<p>Ruby performance has always been the hot topic. Recent Ruby 2.1 release with significant performance improvements fueled this interest even more. There are blog posts and conference presentations on performance. But to this day there's no single source of Ruby optimization knowledge.</p>
<p>I want this book to become that source.</p>
<p><strong>Why I'm doing that:</strong></p>
<p>I've been managing Ruby teams since 2008. My experience is that even otherwise brilliant developers regularly produce slow code. Why? It turns out their expectations of code performance are wrong. For most people Ruby is not the first language. They do not expect that algorithmic complexity and IO performance matter much less than dataset size and memory consumption.</p>
<p>I want this book to explain what matters and to make it clear <em>what</em> developers should think about when writing Ruby.</p>
<p><strong>What will readers be able to do that they couldn’t do before:</strong></p>
<ol>
<li>Write Ruby code that has adequate performance without any further optimization.</li>
<li>Know weak (performance-wise) areas in Ruby and be able to identify potentially slow parts of the code during development before the code is deployed.</li>
<li>Optimize memory consumption that is often responsible for 80% of performance degradation. Know enough Ruby internals to do that.</li>
<li>Set up performance-oriented coding practices and processes, use optimization tools</li>
</ol>
<p><strong>Audience:</strong></p>
<p>Every developer has to deal with a slow code. Every developer hates slow code. That's why I expect any Rubyist can learn something from this book.</p>
<p>At the same time I understand that performance optimization is an advanced topic. I managed several teams, and in all cases it took developers about 2 years before they were comfortable enough with Ruby to take over optimization tasks.</p>
<p>That's why I think that the target audience is Ruby professionals with at least 2 years of experience.</p>
<p><strong>What is in the book:</strong></p>
<p>I organized the book into 3 parts: "Memory Optimization", "CPU Optimization", "Tools and Processes". They are ordered by importance and teach how to:</p>
<ol>
<li>First think of memory consumption and write code that doesn't take gigabytes of RAM.</li>
<li>Then think of CPU optimization and algorithmic complexity of the code.</li>
<li>Use optimization tools to fix what's slow and write performance tests to prevent future performance degradation.</li>
</ol>
<p><strong>Can I get the book now:</strong></p>
<p><a href="http://ruby-performance-book.com/">Sign up for the mailinglist</a> and I'll notify you once I have an early preview of this book ready.</p>
<p>You can also get a glimpse of what I'm talking about in my recent <a href="/blog/2014/04/my-railsconf2014-presentation-slides.html">RailsConf 2014 presentation</a>.</p>
My RailsConf 2014 Presentation Slides2014-04-26T00:00:00-05:00http://www.alexdymo.com/blog/2014/04/my-railsconf2014-presentation-slides<p>RailsConf 2014 is over and I'd like to thank conference organizers for the great event. I'd also like to thank everyone who attented my presentation. It was an honor to present to you. Here are the <a href="http://www.slideshare.net/adymo/adymo-railsconf-improveperformance">presentation slides</a> and a <a href="http://www.youtube.com/watch?v=9B_I3aIS-1o">short interview</a> with me.<!--more--></p>
<p>Here's what people say about the presentation:</p>
<blockquote><p>I attended the rails conf in Chicago and enjoyed your presentation. It was very thoughtful and helpful, something that we generally do not pay attention to.<br/>— Munish Gupta, Sr. Principal Software Engineer at Spokeo</p></blockquote>
<p>There will be a video of my talk and one more interview by UGtastic. I'll keep you updated on those.</p>
<p>If you weren't at RailsConf and wondering what I spoke about, please see the <a href="/blog/2014/03/speaking-at-railsconf2014.html">presentation abstract and outline here</a>.</p>
I'm speaking at RailsConf 20142014-03-11T00:00:00-05:00http://www.alexdymo.com/blog/2014/03/speaking-at-railsconf2014<p>RailsConf is in Chicago this year and I thought I have to attend. Especially because I live across the river from Sheraton where the conference is held.</p>
<p>I recently did a lot of work involving optimization of Rails applications and upgrading them to Ruby 2.1 so I thought I'd share my knowledge on that with the community. And I'm proud to announce that I was accepted as a speaker. This is my session:</p>
<h2>Improve Performance Quick and Cheap: Optimize Memory and Upgrade to Ruby 2.1<!--more--></h2>
<p>You spend big money on servers or Heroku dynos? Your app exceeds hosting's memory limit? Your background processes can't keep up with the work? Your cache invalidation code is too complex? Then it's time to optimize the code.</p>
<p>Join this session to learn why memory optimization is the #1 thing you can do to improve performance. Understand how to optimize memory. Find out what difference Ruby 2.1 makes and what to do if you can't upgrade. Get to know optimization tools and processes.</p>
<p>Why memory optimization is important. Real world experience:</p>
<ul>
<li>from my first startup: legacy Ruby 1.8 and Rails 2.x code)
<ul>
<li>how bad was the unoptimized app performance, how much resources it needed</li>
<li>how we saved time and money by optimizing instead of setting up additional dedicated servers</li>
</ul>
</li>
<li>from my second startup: modern Rails 3.x and 4.x code running on Ruby 1.9, 2.0 and 2.1
<ul>
<li>how we hit Heroku memory limits and what we did about that</li>
<li>how scaling dynos on Heroku stopped to improve overall application performance</li>
<li>how optimization saved us money on Heroku</li>
</ul>
</li>
</ul>
<p>Ruby 2.1 performance:</p>
<ul>
<li>real world measurements (throughput, response time):
<ul>
<li>Rails 4 app upgraded from 2.0 to 2.1</li>
<li>Rails 3 app upgraded from 1.9 to 2.1</li>
</ul>
</li>
<li>upgrade path: problems, solutions</li>
<li>what to do when you can't upgrade</li>
</ul>
<p>80-20 rule of Ruby and Rails performance optimization:</p>
<ul>
<li>memory optimization vs cpu optimization: code examples</li>
<li>80-20 rule: optimize memory. you might not have to optimize further</li>
<li>dive into the Ruby memory management architecture:
<ul>
<li>memory model</li>
<li>when garbage collection runs</li>
<li>how much time it takes</li>
</ul>
</li>
</ul>
<p>Memory optimization strategies:</p>
<ul>
<li>tuning Ruby GC
<ul>
<li>overview of GC environment variables in different Ruby versions</li>
<li>overview of gc.c constants, hints on custom ruby compilation and distribution</li>
<li>data on what impact the changes have: use cases from real world applications</li>
<li>summarized advice on which variables to change and in what cases</li>
</ul>
</li>
<li>processing less data
<ul>
<li>doing more work in the database: rails activemodel preloading</li>
<li>preloading without rails</li>
<li>complex calculations in the database: postgres window functions</li>
<li>processing data sequentially (reading files line-by-line, parsing data line-by-line, etc.)</li>
</ul>
</li>
<li>taking care of Rails memory-intensive features:
<ul>
<li>string callbacks in controllers involving large execution context copying</li>
<li>passing blocks to functions involving large execution context copying</li>
<li>rails serialization for large ruby objects</li>
</ul>
</li>
<li>other coding tips and techniques that reduce memory consumption (as time permits)</li>
</ul>
<p>Memory measurements and profiling:</p>
<ul>
<li>GC.stat and ObjectSpace counters</li>
<li>RSS measurements with external tools</li>
<li>built-in Ruby 2.1 profiling tools</li>
<li>RubyProf CPU and memory profiling</li>
<li>Valgrind CPU and memory profiling</li>
<li>Valgrind and RubyProf visualization tools: KCacheGrind and Massif Visualizer</li>
</ul>
KDevelop in Facebook Open Academy Program 20142014-01-06T00:00:00-06:00http://www.alexdymo.com/blog/2014/01/kdevelop-open-academy<p>I'm excited to report that I'll have 3 students working on KDevelop as a part of <a href="https://www.facebook.com/notes/facebook-engineering/facebook-open-academy-bringing-open-source-to-cs-curricula/10151806121378920">Facebook Open Academy Program</a>.<!--more--> The program is similar to Google Summer of Code with one important difference. It is held as part of a university student's CS education. Successful students will receive an academic credit for their open source contributions.</p>
<p>I got invited to be a mentor this year because of my previous involvement in Google Summer of Code program. I agreed and I'll manage, mentor and evaluate work of 3 students: David Stevens and Todd Nowacki from CMU and Michael Ferris from Polytechnic school of Montreal.</p>
<p>Our tentative plans for this year Open Academy are bugfixing and feature development of KDevelop-Clang C++ language support plugin.</p>
Как украинскому стартапу попасть в Y Combinator2013-02-18T00:00:00-06:00http://www.alexdymo.com/blog/2013/02/how-ukrainian-startup-can-get-into-ycombinator<p>На прошлой неделе Y Combinator (далее по тексту YC) <a target="_blank" href="http://ycombinator.com/apply.html?s2013">начал принимать заявки</a> на летний цикл 2013-го года. Самое время украинским стартапам начать подавать туда заявки. Я и <a target="_blank" href="http://dou.ua/lenta/interviews/aleksandr-dymo-acunote-interview/">мой стартап</a> уже были в YC, позвольте мне рассказать зачем и как туда попасть.<!--more--></p>
<p>Читайте <a target="_blank" href="http://dou.ua/lenta/articles/ukrainian-yc-guide/">полную версию статьи на dou.ua</a> и узнайте ответы на следующие вопросы:</p>
<ul>
<li>почему YC?</li>
<li>будет ли YC, американский стартап-инкубатор, инвестировать в меня, украинца?</li>
<li>США? И как я туда, по вашему, попаду?</li>
<li>нужно ли мне будет регистрировать компанию в США?</li>
<li>и как же попасть в YC?</li>
</ul>
<h2>Подпишитесь на рассылку с советами про поступление в YC</h2>
<p>Хотите знать больше про YC и узнать полезные советы про поступление из первых рук? <!-- // MAILCHIMP SUBSCRIBE CODE \\ --><a href="http://eepurl.com/vleu9" target="_blank">Подпишитесь на рассылку</a><!-- \\ MAILCHIMP SUBSCRIBE CODE // -->, я буду нечасто, но регулярно делиться с вами своим опытом.</p>
<p>Если у вас есть вопросы про стартапы, YC и все что с этим связано, пишите мне на <a href="mailto:alex+ycukraine@alexdymo.com">alex+ycukraine@alexdymo.com</a>, а я постараюсь ответить в рассылке на ваши наиболее частые и интересные вопросы.</p>
<p><a target="_blank" href="http://dou.ua/lenta/articles/ukrainian-yc-guide/">Читайте всю статью на dou.ua</a>.</p>
Kate/KDevelop Sprint: More Progress with New Ruby Language Support2012-10-29T00:00:00-05:00http://www.alexdymo.com/blog/2012/10/kate-kdevelop-sprint-more-progress-with-new-ruby-language-support<p>
More news about the new <a href="https://projects.kde.org/projects/playground/devtools/plugins/kdev-ruby" target="_blank">KDevelop Ruby language support</a> plugin.
</p>
<p>
This week saw many improvements on parsing and semantic analyzing side. <!--more-->Just to name a few, parser is now able to recognize even the most strange heredocs, properly distinguish between classes and modules, support class methods, autorequire Rails code and more. <a href="http://www.mssola.com/" target="_blank">Miquel</a> who did all those amazing things can probably tell you more about that, so let's wait for his blog posts :)
</p>
<p>
Meanwhile KDevelop got two major new features - new file templates and unit testing support. So Ruby plugin now has new class template which you can already use, and a preliminary support for Test::Unit which you cannot yet use (it's not yet finished and committed).
</p>
<p>
Thanks to Joseph and KDE e.V. for sponsoring the sprint!
</p>
Kate/KDevelop Sprint: New Ruby Language Support Progress2012-10-25T00:00:00-05:00http://www.alexdymo.com/blog/2012/10/kate-kdevelop-sprint-new-ruby-language-support-progress<p>
New <a href="https://projects.kde.org/projects/playground/devtools/plugins/kdev-ruby" target="_blank">KDevelop Ruby language support</a> plugin is now production ready :) Why? Because it opens my huge (and proprietary) Rails-based project without any single crash.<!--more-->
</p>
<p>
Thanks to Miquel and Milian who helped to make it happen!
</p>
<p>
Get it <a href="https://projects.kde.org/projects/playground/devtools/plugins/kdev-ruby/repository" target="_blank">here</a> and try it out for yourself now.
</p>
<p>
Old stable Ruby support plugin for KDevelop is still available <a href="https://github.com/adymo/kdevelop-ruby" target="_blank">here</a> in case you're not feeling adventurous.
</p>
Show Me How You Use KDevelop2010-07-06T00:00:00-05:00http://www.alexdymo.com/blog/2010/07/show-me-how-you-use-kdevelop<p>
I'd love to learn how you use KDevelop, what you use, what is your workflow, etc. If you're here at Akademy and up for a quick user testing session, grab me at any time.<!--more--> Currently I'm at Demola. If you don't know how I look like, ping me at irc (nick: adymo, #akademy and #kdevelop channels).
</p>
KDevelop BoF on Wednesday at 16:00 in Area 42010-07-05T00:00:00-05:00http://www.alexdymo.com/blog/2010/07/kdevelop-bof-on-wednesday-at-16-00-in-area-4<p>
We rescheduled KDevelop BoF from Friday to Wednesday so that more people can attend and so that we ourselves can attend :)
</p>
<p>
KDevelop BoF will happen <b>on Wednesday July, 7th at 16:00 in Area 4</b>. The BoF will be held by yours trully, Aleix and Milian.
</p>
<p>
Here's a list of potential topics for the BoF:
</p>
<ul>
<li> usage patterns
<ul>
<li> kdevelop as improved kate</li>
<li> kdevelop as 1-project ide</li>
<li> kdevelop as an ultimate work tool - many projects, sessions, etc.</li>
<li> which usage patterns are best supported right now and why</li>
</ul>
</li>
<li> what are sessions: intended use, scope, limitations</li>
<li> projects
<ul>
<li> idea behind multiple projects</li>
<li> multiple projects and buildiing</li>
<li> multiple projects and other plugins</li>
</ul>
</li>
<li> what happens behind the hood in UI
<ul>
<li> what are areas: intended use, limitations</li>
<li> what are workingsets: intended use, limitations</li>
<li> concept of views, saving/closing views, views and areas</li>
</ul>
</li>
<li> what happens behind the hood in c++ support
<ul>
<li> how includes are found
<ul>
<li> when automatic resolver is used</li>
<li> which buildsystems and when can do</li>
</ul>
</li>
<li> how and when completion, assistant hints, refactoring etc. work</li>
<li> what is duchain and what it does</li>
<li> how to tune performance</li>
</ul>
</li>
<li> how to create and use snippets</li>
<li> how to customize the IDE
<ul>
<li> customizing editor (modelines, kateconfig)</li>
<li> creating a custom shortcut scheme</li>
<li> kdeveloprc - what's there, what to change</li>
<li> quick overview of the extension architecture</li>
<li> writing language support plugins: very brief intro</li>
</ul>
</li>
<li> best workflows
<ul>
<li> quickopen instead of class view</li>
<li> navigation explained
<ul>
<li> what is context, what context navigation do</li>
<li> all other navigation features</li>
<li> tab/notab view management</li>
</ul>
</li>
</ul>
</li>
<li> Q/A</li>
</ul>
<p>
Come by, we'll be glad to talk to you. It's the only chance to tell us everything what you think about us and we promise to listen quietly and attentively ;) And of course we promise to finish this long before the semi-finals football match starts :)
</p>
Ruby Language Support in KDevelop42010-03-01T00:00:00-06:00http://www.alexdymo.com/blog/2010/03/ruby-language-support-in-kdevelop4<p>
It's been more than a week since I got back from Kate and KDevelop Hacksprint we had in Berlin, but I feel it's never late to write a blogpost about it.
</p>
<p>
The hacksprint was full of hacking, drinking awesome German beers, socializing, sightseeing and many more. I have to say I enjoyed every minute of it. Many thanks for Milian for organizing this event!
</p>
<p>
This time I set up a bold goal for myself. I had to make KDevelop 4 good for my everyday work and finally stop using KDevelop 3. For that to happen I had to do three simple things:
</p>
<ol>
<li> don't let C++ parser to take all my memory when opening Ruby interpreter sources</li>
<li> have proper X session management support to correctly reopen all my running KDevelop sessions at X startup</li>
<li> implement Ruby language support (at least) with the same feature set as in KDevelop 3</li>
</ol>
<p>
Thanks to a good beer and to a good company, I did everything I planned!
</p>
<h2>Ruby Support</h2>
<p>
Ruby support features we have so far in KDevelop 4 are:
<ul>
<li>Ruby application template</li>
<li>Ability to open existing projects with Generic Project Manager</li>
<li>Quick Open Files/Classes/Functions and a Class View</li>
<li>Outline and Previous/Next Function navigation</li>
<li>Rails-specific switching between controllers/models/views/tests</li>
<li>Run Current File feature with automatically created launch configuration</li>
<li>Run Current Test Function (works only for Test::Unit framework), again with automatically created launch configuration</li>
</ul>
</p>
<p>
I've imported Gitorious project (yeah, it's Ruby on Rails!) to illustrate my words.
</p>
<div class="figure" style="width: 474px;">
<a href="/blog/images/kdevelop_ruby3.png"><img src="/blog/images/kdevelop_ruby3_thumbnail.png" height="384" width="474" /></a>
<div class="figcaption">Quick Open Function</div>
</div>
<div class="figure" style="width: 474px;">
<a href="/blog/images/kdevelop_ruby4.png"><img src="/blog/images/kdevelop_ruby4_thumbnail.png" height="384" width="474" /></a>
<div class="figcaption">Rails-specific "Switch to View" navigation using regular Quick Open widget</div>
</div>
<div class="figure" style="width: 474px;">
<a href="/blog/images/kdevelop_ruby7.png"><img src="/blog/images/kdevelop_ruby7_thumbnail.png" height="384" width="474" /></a>
<div class="figcaption">Run Current File</div>
</div>
<p>
To try Ruby support yourself, you'll need to compile the <a href="https://github.com/adymo/kdevelop-ruby" target="_blank">plugin from playground</a> yourself. I have no plans to release it yet, but if you'd like to test it or use it for everyday work, please do. I'm writing Ruby code with KDevelop4 every day now, so the Ruby support is stable and I intend to keep it that way in the future.
</p>
<p>
This is only the beginning. Ahead is the long way to a best possible Ruby support in KDevelop 4. Stay tuned!
</p>
The antiPad2010-01-29T00:00:00-06:00http://www.alexdymo.com/blog/2010/01/the-antipad<p>
The more I see things like iPad, iPhone, iTunes, etc. coming, the more I am motivated to continue using, developing and promoting Free Software. This world needs people who care about freedom in general and digital freedom in particular. And we are those people.
</p>
I'm Speaking at RailsConf 2009!2009-04-08T00:00:00-05:00http://www.alexdymo.com/blog/2009/04/i-m-speaking-at-railsconf-2009<p>
Two important things made me busy lately. One is the preparation of the annual KDevelop Team Meeting which I'll write about later and another one is preparing for my RailsConf 2009 presentation called <a target="_blank" href="http://en.oreilly.com/rails2009/public/schedule/detail/8615">"Advanced Performance Optimization of Rails Applications"</a>.
</p>
<p>
I've been working professionally with Ruby and Rails for 3 years and always found it funny when my applications turned out to be slow. And when I say slow, I don't mean anything like I complained about in my previous posts on KDE performance.
</p>
<p>
The performance of normal Rails application is measured in seconds :) The performance of slow Rails application - in dozens of seconds. You simply can't write a KDE/C++ application that would be that slow.
</p>
<p>
But that doesn't mean your Rails application is doomed to be slow. Contrary to that, it can be snappy and feel more like a desktop application rather than like a slow web site. But you do need to know how to do that.
</p>
<p>
So, after all those years of fighting for performance I decided to tell the world on how to make Rails applications fast. If you're interested in the topic, please see my <a target="_blank" href="http://en.oreilly.com/rails2009/public/schedule/detail/8615">presentation abstract</a> and <a href="http://www.acunote.com/blog/2009/04/advanced-performance-optimization-of-rails-applications-at-railsconf-2009.html" target="_blank">other blog post</a> for details.
</p>
<p>
Someday I believe we'll be optimizing Ruby applications in the KDE world as well ;) QtRuby and Korundum are the great frameworks. They have C++ code behind them so performance will never be as much of a problem as it is with Rails. And they make developers extremely productive. Once just out of curiosity I rewrote my Sublime UI library from KDevelop in Ruby and spent 3 days for that. C++ version took me 3 months (excluding the time I didn't work on it) and it's not even finished yet!
</p>
<p>
KDE as a project was always keen on using the best tools for the job. I hope one day we'll seriously pick up dynamic languages. I dare to imagine how that will boost the already robust and speedy KDE development ;)
</p>
Comparison of KDE4 Graphics Performance on nVidia 8600GT and ATI HD34502009-02-24T00:00:00-06:00http://www.alexdymo.com/blog/2009/02/comparison-of-kde4-graphics-performance-on-nvidia-8600gt-and-ati-hd3450<p>
Five months ago I wrote a <a href="/blog/2008/10/kde4-performance-on-nvidia-8600gt-problem-solved-by-bying-ati.html">post</a> about inadequate graphics performance of KDE4 and Qt4 applications on nVidia cards using the proprietary nVidia driver.
</p>
<p>
I was unhappy with the nVidia 8600GT performance and bought el cheapo ATI HD3450 card and was happy with how well it worked with KDE. But after I posted my <a href="/blog/2009/01/kde-4-2-review-from-inside-out-part-1.html">KDE4 review</a> I got several comments from people saying that nVidia fixed their driver. So I became curious and took my old 8600GT and tried it.
</p>
<p>
In short, <b>the performance has been indeed improved</b>. But... I felt something is still wrong. In particular, text rendering was not fast enough. Konsole suffered from this the most. The problem was also visible in Kate (see <a target="_blank" href="http://bugs.kde.org/show_bug.cgi?id=171099">my bugreport with callgrind profile if you're curious</a>).
</p>
<p>
I decided to isolate the problematic code and try it with different drivers and cards to see what's going on. I wrote a simple program which renders one long line (16000 chars) on the screen several times and compared the rendering time
<a href="#" onclick="element = document.getElementById('code_example'); if (element.style.display == 'none') {element.style.display=''} else {element.style.display = 'none'}; return false">(see the code)</a>.
</p>
<div id="code_example" style="display: none;">
<figure class="highlight"><pre><code class="language-cpp" data-lang="cpp"><span class="cp">#include <QApplication>
#include <QTextLine>
#include <QPainter>
#include <QWidget>
#include <QFont>
#include <QTime>
</span>
<span class="k">class</span> <span class="nc">MyWidget</span><span class="o">:</span> <span class="k">public</span> <span class="n">QWidget</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
<span class="n">MyWidget</span><span class="p">()</span><span class="o">:</span> <span class="n">QWidget</span><span class="p">()</span> <span class="p">{</span>
<span class="n">m_text</span> <span class="o">=</span> <span class="n">QString</span><span class="p">(</span><span class="s">"foo bar zee moo "</span><span class="p">).</span><span class="n">repeated</span><span class="p">(</span><span class="mi">1000</span><span class="p">);</span>
<span class="n">m_layout</span> <span class="o">=</span> <span class="k">new</span> <span class="n">QTextLayout</span><span class="p">(</span><span class="n">m_text</span><span class="p">);</span>
<span class="n">m_layout</span><span class="o">-></span><span class="n">setFont</span><span class="p">(</span><span class="n">QFont</span><span class="p">(</span><span class="s">"Courier New"</span><span class="p">,</span> <span class="mi">12</span><span class="p">));</span>
<span class="n">m_layout</span><span class="o">-></span><span class="n">beginLayout</span><span class="p">();</span>
<span class="n">QTextLine</span> <span class="n">line</span> <span class="o">=</span> <span class="n">m_layout</span><span class="o">-></span><span class="n">createLine</span><span class="p">();</span>
<span class="n">line</span><span class="p">.</span><span class="n">setLineWidth</span><span class="p">(</span><span class="n">m_text</span><span class="p">.</span><span class="n">length</span><span class="p">());</span>
<span class="n">m_layout</span><span class="o">-></span><span class="n">endLayout</span><span class="p">();</span>
<span class="p">}</span>
<span class="k">protected</span><span class="o">:</span>
<span class="kt">void</span> <span class="n">paintEvent</span><span class="p">(</span><span class="n">QPaintEvent</span> <span class="o">*</span><span class="n">ev</span><span class="p">)</span> <span class="p">{</span>
<span class="n">QPainter</span> <span class="n">p</span><span class="p">(</span><span class="k">this</span><span class="p">);</span>
<span class="n">QTime</span> <span class="n">t</span><span class="p">;</span>
<span class="n">t</span><span class="p">.</span><span class="n">start</span><span class="p">();</span>
<span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o"><</span> <span class="mi">100</span> <span class="o">++</span><span class="n">i</span><span class="p">)</span>
<span class="n">draw</span><span class="p">(</span><span class="o">&</span><span class="n">p</span><span class="p">,</span> <span class="n">QPoint</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">));</span>
<span class="n">p</span><span class="p">.</span><span class="n">drawText</span><span class="p">(</span><span class="n">QPoint</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">50</span><span class="p">),</span> <span class="n">QString</span><span class="p">(</span><span class="s">"%1"</span><span class="p">).</span><span class="n">arg</span><span class="p">(</span><span class="n">t</span><span class="p">.</span><span class="n">elapsed</span><span class="p">()));</span>
<span class="p">}</span>
<span class="k">private</span><span class="o">:</span>
<span class="n">QString</span> <span class="n">m_text</span><span class="p">;</span>
<span class="n">QTextLayout</span> <span class="o">*</span><span class="n">m_layout</span><span class="p">;</span>
<span class="p">};</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span> <span class="o">**</span><span class="n">argv</span><span class="p">)</span> <span class="p">{</span>
<span class="n">QApplication</span> <span class="n">app</span><span class="p">(</span><span class="n">argc</span><span class="p">,</span> <span class="n">argv</span><span class="p">);</span>
<span class="n">QWidget</span> <span class="o">*</span><span class="n">w</span> <span class="o">=</span> <span class="k">new</span> <span class="n">MyWidget</span><span class="p">();</span>
<span class="n">w</span><span class="o">-></span><span class="n">show</span><span class="p">();</span>
<span class="k">return</span> <span class="n">app</span><span class="p">.</span><span class="n">exec</span><span class="p">();</span>
<span class="p">}</span></code></pre></figure>
</div>
<p>
I ran it on my desktop with ATI and nVidia cards and also on my EeePC. I have Qt 4.5 on the desktop and was able to try the new "Raster" graphics system in Qt which basically does all the drawing bypassing X11. Rumors are the "raster" system is faster.
</p>
<p>
Here are the numbers I got (smaller is better):
</p>
<table class="post-table" width="100%">
<thead>
<tr>
<th>Video Card</th>
<th>Driver</th>
<th class="number">X11</th>
<th class="number">Raster</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2" style="font-weight: bold; vertical-align: top;">ATI Radeon HD3450</td>
<td>fglrx 9.1</td>
<td class="number">918</td>
<td class="number">117</td>
</tr>
<tr>
<td>radeonhd</td>
<td class="number">768</td>
<td class="number">112</td>
</tr>
<tr>
<td rowspan="3" style="font-weight: bold; vertical-align: top;">nVidia GeForce 8600GT</td>
<td>nvidia 180.29</td>
<td class="number">1571</td>
<td class="number">113</td>
</tr>
<tr>
<td>nv</td>
<td class="number">895</td>
<td class="number">114</td>
</tr>
<tr>
<td>nouveau</td>
<td class="number">1699</td>
<td class="number">111</td>
</tr>
<tr>
<td style="font-weight: bold; vertical-align:top">Intel GMA 950 on EeePC</td>
<td>intel</td>
<td class="number">1029</td>
<td class="number">N/A</td>
</tr>
</tbody>
</table>
<p>
Immediate conclusions from that comparison are:
</p>
<ul>
<li>New raster graphics system from Qt 4.5 is <b>10x faster</b> then usual Qt rendering code</li>
<li>Proprietary nVidia driver is still <b>1.5x slower</b> than opensource 'nv' driver or any ATI driver</li>
<li>EeePC is so cool because Qt4/KDE4 renders text on it as fast as it does on more powerful graphics cards</li>
</ul>
<p>
Looking at these tests you might conclude that opensource nv and radeonhd drivers are the best. Yes, but only at rendering text. On my home computer I also want video and I wasn't able to use XV with any of the opensource drivers. With older cards XV may work, with mine it did not. Playing video through X11 was simply too slow so at this moment I'm forced to use proprietary driver. And exactly as five months ago, I choose ATI just because it's still faster.
</p>
<p>
I'm really looking forward distributions compiling Qt itself or Qt-based programs with Raster graphics system by default. Yes, it will make Qt/KDE applications slower on remote X sessions, but I'm ready to pay that penalty for the impressive 10x speedup in regular usage. For people who often use remove X,
distributions may provide replacement Qt binaries compiled with X11 graphics system or provide a system-wide configuration.
</p>
<h2>ATI fglrx driver warnings and hints</h2>
<p>
Remember that video and 3d won't work with Composite. Also, X11 may freeze on shutdown. To avoid freezes, try these solutions one by one:
</p>
<ul>
<li>do not use 'evdev' driver for keyboard and mouse, use 'kbd' and 'mouse' drivers instead</li>
<li>stop atieventsd daemon</li>
<li>add 'Option "Composite" "off"' to xorg.conf to turn off Composite completely</li>
</ul>
KDE 4.2 on EeePC Mini Review2009-02-18T00:00:00-06:00http://www.alexdymo.com/blog/2009/02/kde-4-2-on-eeepc-mini-review<p>
I was going to continue my series of KDE 4.2 reviews, but two weeks ago I've installed KDE 4.2 on my EeePC and couldn't wait any longer to share my experience with that.
</p>
<p>
I've been a happy owner of an EeePC 901 with 20G flash drive, 1G RAM and Linux preinstalled since September 2008. All I can say is that it's a best laptop I ever had. I knew EeePC will be useful for me, but I didn't know it will be THAT useful. I take it with me to the university for lectures and labs, I use it to surf the internet, work and make skype calls when I'm not at home. And yeah, I even take it with me when I go out with my friends :)
</p>
<p>
My 901 came with Xandros and heavily customized KDE3. It was certainly ok, but I wanted the real operating system and after a short research on the available options, I installed Ubuntu Eee which really was Ubuntu 8.04 customized for EeePC. The current version of this distribution is called <a href="http://www.geteasypeasy.com/" target="_blank">Easy Peasy</a> 1.0 and contains packages from Ubuntu 8.10 Intrepid.
</p>
<p>
Being Ubuntu, it of course came with GNOME and I was fine with that for 6 months until KDE 4.2 was released. I can certainly recommend installing Easy Peasy as everything worked out of the box - suspend to RAM, wifi, bluetooth and so on. The only thing that didn't work out of the box was my 3G Sony Ericsson MD300 modem. It was recognized as USB flash drive, so I had to install this udev rule to make it work as a modem:
</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">ACTION!<span class="o">=</span><span class="s2">"add"</span>, <span class="nv">GOTO</span><span class="o">=</span><span class="s2">"3G_End"</span>
<span class="nv">SUBSYSTEM</span><span class="o">==</span><span class="s2">"usb"</span>, ATTRS<span class="o">{</span>idProduct<span class="o">}==</span><span class="s2">"d0cf"</span>, ATTRS<span class="o">{</span>idVendor<span class="o">}==</span><span class="s2">"0fce"</span>, <span class="se">\</span>
RUN+<span class="o">=</span><span class="s2">"/bin/sh -c 'echo 3 > /sys/%p/bConfigurationValue'"</span>
<span class="nv">LABEL</span><span class="o">=</span><span class="s2">"3G_End"</span></code></pre></figure>
<p>
When KDE 4.2 came out, I realized that I simply have to install the best Linux desktop (which is KDE 4.2) onto the best laptop (which is EeePC) :) I've added
</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">deb http://ppa.launchpad.net/kubuntu-experimental/ubuntu intrepid main</code></pre></figure>
</p>
<p>
to /etc/apt/sources.list and ran
</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">apt-get update <span class="o">&&</span> apt-get install kubuntu-desktop</code></pre></figure>
<p>
This almost worked. Almost because my EeePC has 4G drive with the system partition and it had too little space to handle the update. I had a choice either to remove OpenOffice and GIMP or just uninstall GNOME before installing KDE. I chose the later and everything ran fine. After X restart I got the shiny new KDE 4.2 desktop.
</p>
<div class="figure" style="width: 400px;">
<img src="/blog/images/kde4_on_eeepc.jpg" height="264" width="400" /></a>
<div class="figcaption">KDE 4.2 on EeePC</div>
</div>
<p>
Hardware continued to work flawlessly with KDE 4.2 which was not a surprise because the underlying system was still good old Intrepid. But you may rather want to hear how KDE 4.2 worked with the hardware ;) In short, KDE 4.2 flied!
</p>
<p>
Before installation I was worried about memory consumption, so I measured it right after installation. This is what "free" command shows when running only KDE desktop and Konsole:
</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> total used free shared buffers cached
Mem: 1001 468 533 0 12 178
-/+ buffers/cache: 276 724
Swap: 1246 0 1246</code></pre></figure>
<p>
As you can see, the whole KDE desktop + Konsole application takes only <b>280 Megabytes RAM</b>! I think this is outstanding result for a modern desktop released in 2009.
</p>
<p>
Even if you think 280M is too much, there's something you can do. Kubuntu has four autostarted programs written in Python - the printer applet, update notifier, bluetooth daemon and guidance (the power saver application). Those take roughly 95M in RAM. You can use the KPowerSave from KDE3, turn off update notifications and save more memory. If you do that, then the most recent Linux operating system with KDE 4.2 desktop will take exactly as much RAM as 7 year old Windows XP - roughly 180-200M.
</p>
<p>
Integrated Intel graphics doesn't cause any troubles as well. More, I turned on Desktop Effects and, surprise! They worked. You may know from my previous posts that my definition of "works" is pretty severe: I like when UI doesn't disturb me. Desktop Effects aren't as smooth as for example animations on MacOS on MacBook's, but they don't disturb either. I can work with them. More, with "intel" driver and compositing enabled, Firefox doesn't show the scrolling problem that forces me to avoid effects on my desktop computer with either ATI or NVidia cards.
</p>
<p>
In general, the performance of KDE applications is comparable to the regular computer (unless the application does CPU intensive work of course). Because the 901 model has SSD, the startup time of both operating system and individual applications is impressive. For example, I have a feeling that Dolphin starts faster on EeePC than on my desktop computer :)
</p>
<p>
In short, the KDE experience on EeePC is definitely enjoyable. Here are several little things I discovered that will make your experience even better:
</p>
<ul>
<li>
set up your Panel to "Windows Can Cover" mode - 600px of vertical space on the screen is too small to waste it with the panel
</li>
<li>
use Quartz or BII window decoration which have tiny window border sizes and narrow window title bars, they won't look as good as Oxygen, but you will not waste the precious 600px for window decorations;
</li>
<li>
remove KNetworkManager and install GNOME Network Manager Applet, it turned to be more stable for me (especially when using WPA encryption);
</li>
<li>
if you use KDM, make sure to fix the background for your 1024x600 screen resolution, get the fix <a target="_blank" href="http://launchpadlibrarian.net/18295273/oxygen.xml.patch">here</a> or see the whole discussion <a target="_blank" href="https://bugs.launchpad.net/ubuntu/+source/kdebase-workspace/+bug/259181">here</a>
</li>
</ul>
<p>
I highly recommend EeePC and highly encourage you to install KDE 4.2 onto it. With the newest KDE desktop on board EeePC becomes the laptop you can impress people with. Take it with you anywhere you go and show off KDE, Plasma and Desktop Effects to people. I don't know a better way to attract more users to KDE and Linux at this time!
</p>
KDE 4.2 Review From Inside Out. Part 2: Applications2009-01-22T00:00:00-06:00http://www.alexdymo.com/blog/2009/01/kde-4-2-review-from-inside-out-part-2-applications<p>
I didn't expect the <a href="/blog/2009/01/kde-4-2-review-from-inside-out-part-1.html">previous part of this review</a> to be so popular. Huge thanks to everyone who read, linked and commented it!
</p>
<p>
I know I promised you to write about KDE4 applications, so without further ado, here is the continuation.
</p>
<span class="small-caps">Table of Contents:</span>
<ol style="margin-top: 0;">
<li>
<a href="#dolphin">Dolphin</a>
</li>
<li>
<a href="#konqueror">Konqueror</a>
</li>
<li>
<a href="#konsole">Konsole</a>
</li>
<li>
<a href="#kmail">KMail</a>
</li>
<li>
<a href="#akregator">Akregator</a>
</li>
<li>
<a href="#kget">KGet</a></li>
<li>
<a href="#gwenview_and_okular">Gwenview and Okular</a>
</li>
<li>
<a href="#grand_conclusion">Grand Conclusion</a>
</li>
</ol>
<a name="dolphin"></a><h2>Dolphin</h2>
<p>
I'd like to start my applications review with Dolphin, as it was the most prominent change in the applications area. It was planned to make Dolphin the default file manager since KDE3, but I never tried
it then. I got Dolphin with 4.1 and started using it.
</p>
<p>
Probably I'm too old, but I always liked two-panel console <s>Norton</s> Midnight Commander-alike file managers. They always worked for me in the most efficient way, or at least I felt so. Maybe this was the reason I never liked to use Konqueror in KDE3 for file management. Maybe not. I don't know now. What I know now is that for file management today I use Dolphin. What convinced me to do that?
</p>
<p>
First, it's Dolphin itself. It's freaking fast. It starts in a moment, it never pauses to read the directory (even my photo archives, without previews of course). Dolphin's performance is convincing.
</p>
<p>
One more convincing argument for Dolphin is its simplicity and focus. Extreme focus on just file management - nothing extra but plain file management. I adore this approach. Konqueror 3.x as a file manager used to have this bad habit of opening some files as a preview inside the same window, embedding an external application. I always had to go to mime type settings and explicitly tell Konqueror to never use these embedded viewers. Thankfully, this is not an issue now with Dolphin - it simply won't embed anything :)
</p>
<p>
Those who remember NC, Far, MC and brethren, will remember how useful F3 (quick file preview) was. In the good old days when computers were slow and file formats simple enough to parse - quick preview rocked. In 2009 when computers are too fast for the ordinary user and file formats are damn complicated, you can't have the quick preview. You need the whole application to do the preview for you. Konqueror in KDE3 tried to emulate previews by embedding apps in read-only mode inside. But that didn't quite work. Why would I need a preview when I can launch the full blown application with read-write access in the same time? This is why I like Dolphin for not trying to do previews at all. I double click - and I open the app. No dreaded embedding anymore.
</p>
<p>
Second reason for me switching from old school panel file managers was that these days I rarely need the file manager. In 1990's your computer session started in the file manager where you'd search for your files to start working on something and ended in the file manager where you'd type the command to shut down the machine. It's 2009 and I prefer more "application and document" oriented approach. I usually launch an application then work with my stuff directly inside it. For instance, I manage my projects with KDevelop, my music with Amarok and so on.
</p>
<p>
Here is my Dolphin window, nothing fancy really:
</p>
<div class="figure" style="width: 461px;">
<a href="/blog/images/dolphin.png"><img src="/blog/images/dolphin_thumbnail.png" height="360" width="461" /></a>
<div class="figcaption">Dolphin in KDE 4.2</div>
</div>
<p>
Note that I don't have the "Information" panel shown. In fact, I'd advise everybody to avoid it at all cost. Most of the time it will just sit there and eat your CPU and pull your disk trying to make previews and get file stats exactly when you don't need it. So turn it off and make your Dolphin fast. When you need stats - press "Alt-Enter" or choose "Properties" from the popup menu. When you need previews - switch to the "Preview" mode.
</p>
<p>
Speaking about "Preview". Did I mention that this mode is gorgeous in Dolphin? No? Then see for yourself:
</p>
<div class="figure" style="width: 461px;">
<a href="/blog/images/dolphin_previews.png"><img src="/blog/images/dolphin_previews_thumbnail.png" height="360" width="461" /></a>
<div class="figcaption">Dolphin preview mode</div>
</div>
<p>
Preview mode is quick and smooth and the magnifier slider below is an awesome addition to it. I do believe this slider was designed for previews. I don't need Gwenview to quickly review my photos now. I can just use Dolphin. By the way, one hint for those who have modern DSLR cameras or high-megapixel compacts. Go to Dolphin Preferences => View Modes => General and increase the maximum file size for file previews to 10-15 MB. Without this, pictures from your camera will not have previews which would be a real pity ;)
</p>
<p>
There are more nice things about Dolphin. The Ctrl-I (Filter Bar) feature is exceptionally useful to look for files in the directory. Like most things with Dolphin, it's fast. I'm typing 10 times slower than Dolphin filtering the directory with 4 thousands of files!
</p>
<p>
But I wish the filtering worked like the search bar in MacOS's Finder. Filtering there recurses into the subfolders. Recursive search + filtering would be a nice addition to Dolphin. I personally will buy a beer or two to the first person who implements that :)
</p>
<p>
Breadcrumbs-based navigation is another nice file management concept implemented in Dolphin. It doesn't sound groundbreaking for me, but I do use it when my hand holds the mouse. I also like that Ctrl-L shortcut still works as it did with Konqueror, replacing the breadcrumbs with an URL input field and letting me type, for example, the sftp server address. What I really don't like though, is that that input field doesn't remember URLs I've typed. Also Ctrl-L should preselect the URL for me. The most common case is me replacing the URL, not appending to it. I've committed exactly this fix some time ago to the KDE file dialog. Looks like I'll have to do the same with Dolphin :)
</p>
<p>
Being so simple, Dolphin has only a few problems. But one of them annoys me quite a lot. Split view is not keyboard-navigatable. You can't use Tab and Shift-Tab to switch between views because the focus switches to the magnifier widget. One way to fix that is make magnifier widget not focusable, another - to have one more shortcut to switch between split views. Until this change is done, split view is the feature only for mousers.
</p>
<p>
Another issue is the questionable value behind Nepomuk (aka "semantic desktop") related functionality, namely commenting, tagging and rating files and folders. I never ever commented any file, I never wanted to as well. I would rate only the audio tracks to make a playlist like the "My Top Rated" that exists in iPod's. But even then, I'd do that in Amarok directly and as I've discovered Amarok and Dolphin do not share the rating. This essentially voids any value of the rating for me.
</p>
<p>
Tagging? Ok, I can tag my file. What's next? I can't filter for tags in Dolphin, I can't find files by tag with "Find Files/Folders". I'd really like to see the tag-aware operations like these in Dolphin, but they are not there.
</p>
<p>
I suppose to get some value from tags I need to use the Strigi Desktop Search. For this review I tried exactly that. I enabled Strigi in System Settings => Advanced => Desktop Search. Then I had my folders indexed. Then I spent half an hour to understand what to do next and how to actually search. As it turned out, to search for tag called "test" you need to type "nepomuksearch:/tag:test" in the URL bar in Dolphin. And that finally worked :)
</p>
<div class="figure" style="width: 461px;">
<a href="/blog/images/dolphin_search_by_tag.png"><img src="/blog/images/dolphin_search_by_tag_thumbnail.png" height="360" width="461" /></a>
<div class="figcaption">Dolphin search by tag</div>
</div>
<p>
What I can say? Not only there's low value in new Nepomuk functionality, but there's actually no way for the user to discover and use it. What Dolphin needs is a search box. Search box will be immediately obvious for the user and a little "?" button near it would let people know what search syntax to use. In addition to that, I have a feeling that filtering by tag (preferably recursive) should work in Dolphin right away without any Strigi index from the filter bar.
</p>
<h3>Conclusion:</h3>
</p>
<p>
Dolphin is an excellent illustration for the "less is more" principle. Simple, focused just on file management and exceptionally fast, Dolphin is a joy to use.
</p>
<p>
My only complaint about Dolphin is the absence of the advanced search. In particular, I'm looking forward recursive search/filtering features and more close integration of the Strigi search into the file manager.
</p>
<p>
In any case, Dolphin is definitely one of the reasons to switch to KDE4 and even should you decide not to use the desktop itself, do try Dolphin. It's worth it.
</p>
<a name="konqueror"></a><h2>Konqueror</h2>
<p>
Konqueror from KDE4 for me is now only a web browser. I know it still can be used for file management, but with Dolphin in my hands I'd never use Konqueror for that.
</p>
<div class="figure" style="width: 461px;">
<a href="/blog/images/konqueror.png"><img src="/blog/images/konqueror_thumbnail.png" height="360" width="461" /></a>
<div class="figcaption">Konqueror in KDE 4.2</div>
</div>
<p>
As a web browser, Konqueror 4 is surprisingly good. Its primary goodness is the performance. The application starts and works fast, takes 3 times less memory than Firefox (under the same conditions), the javascript engine and renderer are definitely quick as well. Konqueror may not outperform Safari in terms of speed, but it is definitely on par with any other modern browser.
</p>
<p>
To make Konqueror even faster, go to Settings => Configure Konqueror => Performance and turn on preloading after KDE startup and set the memory usage setting to "Always". These days I don't use these options because
Konqueror is light enough and my PC is fast enough for me to never notice its startup time. Another thing I recommend is to configure browser cache. I always enable "Use cache whenever possible" mode myself. With this option enabled, you have sometimes to reload the page to invalidate the cache, but that is not necessary too often.
</p>
<p>
The UI in 4th version is simple and succinct. It doesn't have anymore all that bloat that ruined user experience in KDE3 times and it actually has most of the basic web browser features implemented.
</p>
<p>
For example, I like the tabbed browsing features that come by default in Konqueror. The essential tab management features for me are: opening new tabs in the background, opening tabs right after the current tab and undoing tab close. Konqueror by default has all these features, including the nicely implemented "undo close tab" which works like regular "undo" and is even bound to the same Ctrl-Z shortcut.
</p>
<p>
Bare Firefox right after installation misses the "open after current" function. But, Firefox has this indispensable Tab Mix Plus extension that easily outperforms Konqueror. I wish Konqueror had Tab Mix Plus' features like "Closed Tabs List" menu and the "Change opening order" mode that opens new tab after the last unread tab.
</p>
<p>
However, nice set of tab management features comes with an irritating tab switching behavior. Upon selecting the tab, the toolbar flickers. Being a developer, I know why this happens, but the knowledge doesn't satisfy me :) Internally each page is a KHTML component with its own menu and toolbar actions. When you open another page, Konqueror hides menu and toolbar actions for the previous page and shows actions for the new page. Hence the flickering. Understandable, but extremely irritating.
</p>
<p>
Apart from tabs, another essential web browsing feature these days is ad block. Konqueror's implementation is called "AdBlocK" and is built into the browser. AdBlocK comes without filters, but you can import them. I use the lists for Ad Block Plus Firefox plugin. I recommend importing <a target="_blank" href="https://easylist-downloads.adblockplus.org/easylist.txt">EasyList</a> first, and then looking for the local list for your country. I add <a target="_blank" href="http://denis-ovs.narod.ru/adblock.txt">RU AdList</a> and <a target="_blank" href="http://adblock.oasis.org.ua/banlist.txt">UA-IX banlist</a>. All those lists work fine, but I do miss the Ad Block Plus' ability to update them automatically. Another annoyance is that in Konqueror you cannot have exceptions from ad blocking. Some web sites and applications (like typepad.com) are broken with adblock, so you want to be able to exempt them. Unfortunately, with Konqueror you can't.
</p>
<p>
In the Firefox land when somebody says that Firefox doesn't do something, the usual answer is "install extension". In Konqueror land things aren't this bright. Konqueror does have an extension interface and even comes with 13 extensions but... unlike Firefox, you need to write extensions in C++ and compile. It's not like this task is extremely complicated, but it does set the high entry barrier for plugin writers. Also it complicates plugin distribution, because you have to cater for various flavors of Linux and also for MacOS and Windows. People who write Konqueror plugins simply distribute them from <a target="_blank" href="http://kde-apps.org">kde-apps.org</a> site in the source form leaving the burden of plugin compilation and installation for the user which is never a good solution.
</p>
<p>
If you read up to this point and already think I criticize Konqueror too much, then I'm going to disappoint you. Criticism barely started :) Because Konqueror as a web browser application is fine, but Konqueror (or rather its KHTML engine) as a web page rendering engine is not!
</p>
<p>
It will render web pages just fine 98% of the time. But even on those pages usually there are glitches. Nothing serious - hidden borders may be visible, buttons and comboboxes may be too big or not focusable from keyboard, fonts may have the wrong size, div's may have wrong positions and so on and so on.
</p>
<p>
These minor problems tend to sum up together and radically harm the impression from web pages. Usual apology for having such problems is that KHTML/Konqueror's user share is too small for web designers and developers to test pages against the browser and fix the problems. That is of course true, but even if you do want to fix the look of your website with Konqueror, there isn't much what you can do.
</p>
<p>
I've been developing web applications for almost 3 years and I know the simple fact. As you develop, first you get your site work good with Firefox. Then you tweak some minor things to fix Safari. Then you do some more work and fix Opera. After a week of frustrations and tricky hacking, IE7 will work fine. Another such week and you'll fix IE6. And only after that you go and check your website in Konqueror and fix that.
</p>
<p>
I hear you screaming "What? Konqueror is worse than IE6"? Believe me, it's true. Even after you get everything to work with IE6, there are usually some things still to be fixed with Konqueror. Also Konqueror doesn't make it easy to fix problems. Javascript debugger is rudimentary and DOM tree explorer is useless. There's no Firebug, no Web Inspector, so it's no wonder web developers don't check their work against Konqueror.
</p>
<h3>Conclusion</h3>
<p>
While Konqueror is a nice and fast web browsing application, it is just not good enough for everyday use. Since KDE3 Konqueror definitely improved, but not radically enough. You'd be better off with Firefox or Safari for both everyday use and web development.
</p>
<p>
I think for Konqueror to be a better browser, two things should be done.
</p>
<p>
First, QtWebKit should be used as rendering engine instead of KHTML. I want that not because WebKit is technically superior (it's not), but because it's exhaustively tested and because web developers develop and check against it. Also with WebKit on board it will be possible to have so badly needed development tool -
the Web Inspector.
</p>
<p>
Second, Konqueror should have extensions API for Ruby and/or Python. It should be much easier for people to write and distribute extensions written in those languages, therefore it will be much easier to build a developer community around Konqueror similarly to Firefox.
</p>
<a name="konsole"></a><h2>Konsole</h2>
<p>
Konsole is like a good old workhorse. It just works. Correct terminal emulation, tabs, unlimited history, copy and paste, support for unicode, total keyboard navigation through the interface. What else do you need?
</p>
<div class="figure" style="width: 408px;">
<img src="/blog/images/konsole.png" height="336" width="408" /></a>
<div class="figcaption">Konsole in KDE 4.2</div>
</div>
<p>
Apart from things I listed, I need and like Konsole's neat monitoring features. First, it highlights the tab where some change happened. This really helps me when I work on several tasks simultaneously (and I do that 90% of my day :)). If you think this notification is too subtle, there's a way to ask Konsole to report activity or silence with the system notification. I personally don't use this often, but silence notification does help to find out when a long-running task completes.
</p>
<div class="figure" style="width: 420px;">
<img src="/blog/images/konsole_silence_notification.png" height="72" width="420" /></a>
<div class="figcaption">Konsole silence notification</div>
</div>
<p>
In KDE4 Konsole became even faster (both at startup time and rendering). The UI was improved to increase usability. Also there are now split views, but with a bit strange implementation. When you split, you will see the duplicates of all your tabs in the new split container. I still haven't figured yet how to make use of this feature, but at least unlike Dolphin, I can switch between split view containers with Shift-Tab and even resize them from the keyboard.
</p>
<p>
From other things that changed recently, I'd like to mention that Konsole tabs in KDE4 are finally named after the program that is running or after the remote host I'm logged into with ssh.
</p>
<div class="figure" style="width: 288px;">
<img src="/blog/images/konsole_ssh_tab.png" height="48" width="288" /></a>
<div class="figcaption">Konsole SSH tab</div>
</div>
<h3>Conclusion</h3>
</p>
<p>
Konsole is still as awesome as it was ever before. With KDE4 it only changed for good so the only thing I have to say here is "Thanks" for Konsole developers! Konsole was one of the reasons I started using KDE back in year 2000 and it's still a compelling reason to switch to KDE4.
</p>
<a name="kmail"></a><h2>KMail</h2>
<p>
Unless you want to hear the endless flow of praise, please skip this section altogether because I'm just going to say that KMail is awesome :) I'm with KMail since 2001. It was version 1.4 IIRC. Now it's version 1.11 (how conservative, don't you think?) and I'm still with KMail.
</p>
<p>
My email archive is also still with KMail. I was able to import it from Outlook Express storage back in 2001 and since then kept it in the maildir format without any breakages. I still keep about 3 gigabytes of archives and KMail had never any performance problem because of that.
</p>
<div class="figure" style="width: 461px;">
<a href="/blog/images/kmail.png"><img src="/blog/images/kmail_thumbnail.png" height="360" width="461" /></a>
<div class="figcaption">KMail in KDE 4.2</div>
</div>
<p>
Historically KMail is an excellent tool for those who reads tons of mailinglists. Of course you can put mails from different lists into different folders using the most powerful filtering system I ever saw in mail clients. Proper threading is always a plus. The killer feature is the ability to bind a folder to one your email accounts such that all replies from that folder automatically use the specific address and smtp server. My work-related folders are set up to use my company's email account and my KDE-related folders are set up to use my personal address. This is really convenient.
</p>
<div class="figure" style="width: 442px;">
<img src="/blog/images/kmail_folder_settings.png" height="480" width="442" /></a>
<div class="figcaption">KMail folder settings</div>
</div>
</p>
<p>
Some of you could ask why do I mention folders, filtering and threading, aren't they supposed to be the standard in all email clients. That's only because there is GMail now - one of the most popular email "clients" with limited filtering capabilities and with no support for folders. Don't even bother telling me about labels. I receive so much emails, that without proper hierarchical organization into folders and subfolders my mailbox is simply not manageable. Also GMail doesn't do the correct threading. It threads only by subject ignoring "in-reply-to" and "references" headers. Not really useful I'd say.
</p>
<p>
However, KMail and GMail together make almost a perfect match. You can get all your mail from all your accounts into the GMail and then fetch it with KMail. This way you get the decent spam filtering and still use the right email client, which is of course KMail :)
</p>
<p>
KMail in KDE4 kept all the goodness it always had, added many of new features and became even faster. My personal KMail hero of the last year is Szymon Stefanek, who gave the new birth to the application during his summer of code project.
</p>
<p>
As a result of that GSoC project, KMail got new message list with tabbed interface and customizable look, new thread aggregation capabilities, message list themes, new sorting orders and much more. You have to explore the KMail yourself because my blog is just not large enough to present you all those various ways your message list can look like.
</p>
<p>
I'm conservative. I continue to use "Standard Mailing List" aggregation and "Classic" theme for message list. But what I really really like is how fast KMail is after Szymon Stefanek's refactoring. No, it's not "fast", it's "FAST"! I have huge folders with several thousands emails in them and never notice any slowdowns. The startup time doesn't depend at all from the size of the mailbox. I could easily have 15G of mails and I'm sure KMail would be just as fast as it is now with 3G.
</p>
<h3>Conclusion</h3>
<p>
KMail is amazing! It's a pleasure to use - excellent performance, great feature set for mailinglist lovers, single-key keyboard shortcuts for keyboard addicts. I simply can't think what else to ask from it. It will surely please both old-timers and newcomers. Try it, you won't regret!
</p>
<a name="akregator"><h2>Akregator</h2>
<p>
I'm subscribed to the horde of RSS feeds and therefore I frequently use Akregator, the KDE RSS reader. Unlike web-based tools, it's good for organizing your feeds into the tree-like structure just as I like. It's also fine for reading feeds. I wish it used Webkit instead of KHTML to display contents though.
</p>
<div class="figure" style="width: 461px;">
<a href="/blog/images/akregator.png"><img src="/blog/images/akregator_thumbnail.png" height="360" width="461" /></a>
<div class="figcaption">Akregator in KDE 4.2</div>
</div>
</p>
<p>
That said, I have to admit Akregator has quite some flaws. For example, it has potentially great "Combined View" when you have the list of feeds on the left and the single page with the complete article contents on the right. This view would be the most convenient for reading if only it wasn't too slow. It will attempt to show all articles in the feed which of course will take ages if you like me have 2000 articles sitting there. I think it should really show only unread articles in that mode.
</p>
<p>
Another potentially cool feature is Google Reader synchronization, but it also suffers from immaturity. The
UI for the feature is not finished and I couldn't log in to my GMail account at all. I'm not even sure whether the synchronization is supposed to work. I wish it worked because that would be the killer feature for me. When I'm away from my computer I want to have my feeds in Google Reader. When I'm back, I want them in the Akregator. That would be really cool, but alas, I couldn't make it work.
</p>
<h3>Conclusion</h3>
<p>
Akregator is definitely useful for RSS reading, but so far it doesn't give any compelling reason to use it. Two killer feature candidates (Combined View and Google Reader synchronization) are already there, but they don't work yet. If you used Akregator in KDE3, you'll find the same feature set in KDE4. If you already use another RSS reader, keep an eye at Akregator. Maybe at some point in the future it will have something interesting to offer you.
</p>
<h3>Update</h3>
<p>
As draugdel kindly pointed out in the comments, the Combined View mode obeys filtering. So if you set status filter to "Unread", it will no longer attempt to download all articles. This radically changes my experience for better and gives one bonus point for Akregator.
</p>
<div class="figure" style="width: 465px;">
<a href="/blog/images/akregator_combined_view_mode.png"><img src="/blog/images/akregator_combined_view_mode_thumbnail.png" height="360" width="465" /></a>
<div class="figcaption">Akregator combined view mode</div>
</div>
<a name="kget"></a><h2>KGet</h2>
<p>
KGet is the KDE downloader. It was there in KDE3, but it really matured since then. KGet that comes with KDE4 is very useful. Not only it has reworked interface that is actually usable, but it has the solid number of features. I'll name only multithreaded file download and and Bittorrent support. Both are not very critical however, but surely nice to have.
</p>
<div class="figure" style="width: 429px;">
<a href="/blog/images/kget.png"><img src="/blog/images/kget_thumbnail.png" height="168" width="429" /></a>
<div class="figcaption">KGet in KDE 4.2</div>
</div>
<p>
Another nice thing is the web interface that lets you control your downloads when you're away from your computer. While I like the idea, I don't quite like the implementation. The web interface doesn't work well with both Firefox and Konqueror - the numerous popups tend to stay on the page and force you to periodically refresh the page.
</p>
<h3>Conclusion</h3>
<p>
It's hard to say that downloader can be the application to convince people to use the KDE desktop. But should you need a downloader, you have it in KDE4. And unlike tons of other downloaders out there, this one is good
and usable. KGet has all the features and is simple to use at the same time. I like such applications, I like KGet and I hope you will like it as well.
</p>
<a name="gwenview_and_okular"></a><h2>Gwenview and Okular</h2>
<p>
Now it's time to review the <i>sweet pair</i> of KDE viewer applications - Gwenview, the image viewer and Okular, the document viewer.
</p>
<p>
Usually, image and document viewers are the indispensable desktop tools. I can't imagine myself using the desktop without them. Both Gwenview and Okular are newcomers in KDE. Gwenview has been in extragear in KDE3 times and Okular grew from KPdf. Both replaced the horde of viewing tools from KDE3 that never worked well. Both do their job and do it really really good.
</p>
<p>
Gwenview is gorgeous. It has everything the image viewer needs to have - browsing and viewing modes, full screen playback, customizable Metadata/Exif display (very useful for DSLR camera owners because you can set up it to show exactly the information you need), basic image editing like mirroring, cropping and red eye reduction. Just as other KDE4 applications I've reviewed, Gwenview is fast and is pleasure to use. During the development a lot of efforts were spent to increase the usability and it now clearly shows off. The application is definitely easy to use. As a nice bonus, it also looks good:
</p>
<div class="figure" style="width: 461px;">
<a href="/blog/images/gwenview.png"><img src="/blog/images/gwenview_thumbnail.png" height="360" width="461" /></a>
<div class="figcaption">Gwenview in KDE 4.2</div>
</div>
<p>
My only wish for Gwenview is the more advanced fullscreen playback. I rather like how iPhoto does slideshows with effects and music and I hope Gwenview will be able to do that as well.
</p>
<p>
Okular is a great improvement over "KPdf + KDvi + brethren" viewer combination we had in KDE3. First, it's good that now we have the single viewer to open all possible document formats. Second, Okular supports many more formats now and manages annotations for all those formats.
</p>
<p>
The greatest strength of Okular is of course PDF reading with the support for contents and fast and correct page rendering. I really like to have Djvu and Fb2 (Fiction Book) on board. As a (former) scientist, I have lots of Djvu books. As a literature addict, I also got the large collection of Fb2 books that I keep for my <a target="_blank" href="http://lbook.ua/products/lbooks/V3/">e-book reader</a>. Now I can read all these books in Okular without having to install the dedicated software. Nice, isn't it?
</p>
<div class="figure" style="width: 461px;">
<a href="/blog/images/okular.png"><img src="/blog/images/okular_thumbnail.png" height="360" width="461" /></a>
<div class="figcaption">Okular in KDE 4.2</div>
</div>
<p>
Of course, Okular has also its share of problems. While PDF files looks great, pages from ODT and Fb2 documents don't look as good mainly because of missing font antialiasing. I only wish we could have antialiasing for all possible document formats.
</p>
<h3>Conclusion</h3>
<p>
Gwenview and Okular are the results of the serious rework in image/document viewing department that was done during KDE4 development. Both are well-done, usable applications, they support all required image and document formats and are pleasure to use. My kudos to the Gwenview and Okular developers - they did a great job.
</p>
<p>
Gwenview and Okular can easily speak for itself. Once you try them, you won't look back. I would definitely switch to KDE4 only to get these two applications. Or, just use them with any other desktop. Like I said in the conclusions about Dolphin above, it's worth it!
</p>
<a name="grand_conclusion"></a><h2>Grand Conclusion</h2>
<p>
While writing this review I caught myself repeating the same things about every KDE application, namely <b>excellent performance</b>, <b>usability</b> and <b>great features</b>.
</p>
<p>
It is so good to see that a lot of work during KDE4 development went into improving the quality of the user experience. Unlike their KDE3 counterparts, the best KDE4 applications are definitely more user-oriented. Despite being a developer, I enjoy this as much as every other person would.
</p>
<p>
It is equally good to see almost all KDE4 applications being fast. The optimizations behind the scene in Qt and KDE frameworks already showed up, but I think that this is only a start. We will definitely see even more performance improvements in the future.
</p>
<p>
The KDE "Gang of Five" (Dolphin, KMail, Konsole, Gwenview and Okular) sets the new standards of performance, look, and usability without sacrificing essential features of file manager, mail client, terminal and viewer. If you aren't convinced by the bare KDE desktop, please take a look at these applications, let them speak for themselves!
</p>
<hr/>
<p>
KDE comes with a lot of good applications and I barely scratched the surface this time again. I haven't said a word about KWrite/Kate - an excellent text editor, Digikam - the ultimate digital photo processing software, Kaffeine - the video player and of course Amarok - my beloved music player. Looks like I have to write yet another part or two :) Come back again!
</p>
KDE 4.2 Review From Inside Out. Part 12009-01-10T00:00:00-06:00http://www.alexdymo.com/blog/2009/01/kde-4-2-review-from-inside-out-part-1<p>
It's probably the first time in my life when I'm writing a post with a word "Review", but looks like it's a perfect time to start doing that. Right now I desperately need to tell the world about KDE4, or to be precise, soon to be released KDE 4.2. This is going to be the first "real" release targeted not only at KDE developers and enthusiasts, but at general public - all the people who eagerly waited for the next KDE desktop to arrive. With this review I'd like to let people know that the KDE 4 is ready and to once again celebrate the hard work of all the people who put tremendous effort creating this great desktop.
</p>
<p>
Now you may think that because I'm a KDE developer, this is going to be one more "fan boy" article about KDE4, but I hope I'll prove you wrong. There are things I like, things I hate and things I miss in the new desktop and I am going to write about all those things. Of course everything that is written below is just my own opinion. Feel free to agree or disagree with me :)
</p>
<p>
Also note, that I'm going to review only the functionality and applications that I actually use. Surprisingly enough that is a fairly small subset of what KDE4 provides, so for example if you want to learn about the new KOffice you're going to need another reviewer ;) But enough of introduction, let's start.
</p>
<h2>4.2 is 4.0</h2>
<p>
There was a lot of controversy about KDE4 release schedule. There was a hard decision to ship 4.0 last year in January in the highly unstable state. I still think it was a wrong decision and we (being the open source project) could delay 4.0 for 9 months or an year. From the other side, the experimental .0 release wasn't so much a disaster. Thanks to the efforts of people from Marketing Working Group, people got the message about experimental nature of the release.
</p>
<p>
4.1 was the desktop I could start using myself and I did exactly that. Still I never recommended it to my friends (or to be more precise, I recommended against using it ;)). But the year passed by and now we're ready to release the "real 4.0" which is for the reasons described above called 4.2. So, let's see what we have now.
</p>
<h2>General Look and Feel</h2>
<p>
In comparison with KDE3, the 4.2 desktop looks modern. What's important is that it certainly doesn't copy neither Windows Vista, nor Mac OS. It has its unique identity in everything - in icons, widget theme, panel and desktop theme, window decorations, etc.
</p>
<div class="figure" style="width: 480px;">
<a href="/blog/images/desktop.png"><img src="/blog/images/desktop_thumbnail.png" height="360" width="480" /></a>
<div class="figcaption">KDE 4.2 look and feel</div>
</div>
<p>
I have an impression that it's during KDE4 development artists became a team and started thinking about consistency and coherence in visual appearance. Let's take icons for example. I usually don't care much about them, unless there is an icon that stands out of line and annoys me. In KDE4 so far all icons look consistent for me.
</p>
<p>
Oxygen theme for Plasma makes the desktop feel right. Dark blue and black decorations match perfectly. Those people who install KDE4 from OpenSUSE packages should really change the desktop theme from the OpenSUSE default grayish theme (was it called Aya?) back to Oxygen. It's not that Oxygen theme looks better (that's highly subjective), it just looks "right" because all parts of the decorations fit together.
</p>
<div class="figure" style="width: 374px;">
<img src="/blog/images/panel_and_widget.png" height="192" width="374" /></a>
<div class="figcaption">KDE panel and widget in Oxygen theme</div>
</div>
<p>
Things aren't as bright with Oxygen window decorations and widget style. The window decoration features cartoonish minimize/maximize/close buttons which give almost no feedback when you press them. But that's fairly minor issue. The major issue in the window border which is annoyingly think. I hate when decorations take my screen space. First, I don't want to see 5 pixel borders from each side, even on my 1920x1200 screen. Second, the rounded window corners are aliased and therefore look ugly and "unprofessional". In Mac OS, for example, windows have no border at all which contributes to the nice and professional look and feel.
</p>
<p>
What I'd love to see at least, is a configuration option to make window borders tiny. We had this option with Plastik in KDE3 and we have this option with other KDE4 styles (like QtCurve). I simply can't understand why the window border thickness is not configurable with Oxygen.
</p>
<p>
While the KDE4 default Oxygen widget style generally looks good, it's not without problems. It is certain and fortunate that we didn't screw up with default style like we did when KDE 3.0 was released with Keramik :) Oxygen is a good style, but there are a few things I dislike about it.
</p>
<p>
First, and most importantly, the scrollbars have an usability problem. Scrollbars are visually separated from their scrollable view. When you have two scrollable views sitting one alongside another, you'll see the scrollbar right in between them and you never can tell which view has this scrollbar - the one to the left or the one to the right. After a millisecond of thinking you remember that views usually have scrollbar on the right side and solve that problem. Remember the book "Don't make me think"? I always remember it when I see Oxygen scrollbars.
</p>
<div class="figure" style="width: 476px;">
<img src="/blog/images/oxygen_scrollbars.png" height="192" width="476" /></a>
<div class="figcaption">Oxygen scrollbars usability problem</div>
</div>
<p>
The scrollbar ownership problem combined with visually indistinguishable resize grips on splitters (just 3 subtle dots for the whole splitter) make for example Akregator unusable. Just look at the screenshot below and tell me without thinking where you'd grab to increase the height of the bottom view ;)
</p>
<div class="figure" style="width: 468px;">
<a href="/blog/images/oxygen_akregator.png"><img src="/blog/images/oxygen_akregator_thumbnail.png" height="336" width="468" /></a>
<div class="figcaption">Akregator in Oxygen theme: usability problem with resizable splitters</div>
</div>
<p>
I haven't seen a single widget theme that has such "orphaned" scrollbars, neither or Linux nor on Mac or Windows. There are other minor issues with the style such as tabs that take too much screen estate and comboboxes that don't react visually (push down) on clicks. What I'd like to say here is that it's really unfortunate that those 3-4 problems radically impair the user experience with otherwise nice and well done Oxygen style.
</p>
<p>
For myself, I've solved all those problems for now by using <a target="_blank" href="http://www.kde-look.org/content/show.php?content=40492">QtCurve style</a>. QtCurve resembles Plastik from KDE3 (which is fine with me as I really liked Plastik), it has little visual glitches (at least none of the described above) and its window decoration can be made thin. As a bonus, with QtCurve you can get uniform desktop look if you like me frequently use Gtk/Gnome and KDE3 applications. I still depend on KDevelop3 and Konversation. I frequently use Gimp and I have Firefox as my primary browser. All those applications look great
and consistent with QtCurve.
</p>
<div class="figure" style="width: 463px;">
<a href="/blog/images/qtcurve.png"><img src="/blog/images/qtcurve_thumbnail.png" height="384" width="463" /></a>
<div class="figcaption">KDE and GTK applications in QtCurve style</div>
</div>
<p>
The last thing from the "look-n-feel" department I'd like to mention is the overall desktop performance. I don't need any numbers to tell that performance hasn't changed much from KDE3 times. On my hardware (which is Core Duo 4600 based PC) KDE3 was fast. KDE4 feels the same, after all, it's not Vista :) Certain applications (like Dolphin, Konsole or KMail) even improved their startup time.
</p>
<h3>Conclusion</h3>
<p>
If you just need one reason to switch to KDE4 - it's the look and feel. The modern polished and stylish look makes your desktop experience as pleasant as possible. None of the issues I've described above is a showstopper for the user. In the worst case you'll end up like me using non-default widget style, but that's hardly a problem.
</p>
<h2>KWin Window Manager and Desktop Effects</h2>
<p>
I can hardly say anything about KWin itself. That's the amazing piece of software that never stands on your way and this is exactly how the window manager should work in my opinion.
</p>
<p>
KWin is highly configurable and customizable. This review is too small to even list all the things you can do with your windows. But there are two advanced KWin features that I actually use.
</p>
<p>
First feature is the window geometry/position saver which is handy for those applications that don't remember those settings themselves. Some time ago Konversation used to forget its position on the screen. Now KWrite has sclerosis. With KWin I'm always able to fix that myself.
</p>
<p>
Second feature worth mentioning is window shortcuts for quick switching. If your like me <i>always</i> have a certain number of windows opened, you'll find this useful. For example, my session starts Konsole, KMail, KDevelop and Firefox. Normally I keep them opened 100% of the time and no matter how many other windows I open, there are always Win-Alt-K, Win-Alt-M, Win-Alt-L and Win-Alt-O shortcuts to switch to and between them. The more windows you opened - the more you like window shortcuts.
</p>
<p>
I'd advise you to give those features a swing. You'll find them in Window Menu (Alt-F3) => Advanced => Special Window Settings, Geometry and Preferences tabs.
</p>
<div class="figure" style="width: 466px;">
<a href="/blog/images/kwin_shortcuts.png"><img src="/blog/images/kwin_shortcuts_thumbnail.png" height="432" width="466" /></a>
<div class="figcaption">KWin shortcuts</div>
</div>
<p>
KWin shines when it comes to the desktop effects. Compiz Fusion, the traditional solution to desktop effects is actually a compromise between appearance and window management features (and also stability as Compiz developers admit). With KWin you don't need to compromise neither stability nor features. Compositing and desktop effects come as an integral part of the window manager.
</p>
<p>
As a MacBook owner and Mac OS user I certainly like to have things like Exposé (called "Present Windows") and Desktop Grid in KDE as well. Window shadows would also be familiar for the Mac OS user. From the tons of other effects I saw the value in "mouse mark" thing. Usually you'd use mouse cursor to show off things on your screen to other people. With mouse mark you can also draw directly on the screen highlighting important areas.
</p>
<div class="figure" style="width: 480px;">
<a href="/blog/images/desktop_grid.png"><img src="/blog/images/desktop_grid_thumbnail.png" height="360" width="480" /></a>
<div class="figcaption">KWin Desktop Grid</div>
</div>
<div class="figure" style="width: 480px;">
<a href="/blog/images/present_windows.png"><img src="/blog/images/present_windows_thumbnail.png" height="360" width="480" /></a>
<div class="figcaption">KWin Present Windows (aka Exposé)</div>
</div>
<p>
Desktop Effects (aka "compositing") do require more or less modern graphics card. I used desktop effects on my Macbook Pro with ATI X1600 card and their performance was ok. On ATI 3450 there's nothing to complain about wrt effects. Other people report that integrated Intel graphics is ok. With <a target="_blank" href="ftp://download.nvidia.com/XFree86/Linux-x86/180.18/">newest drivers</a> NVidia should work fine as well without any performance penalties for the rest of the desktop (see my <a href="/blog/2008/10/kde4-performance-on-nvidia-8600gt-problem-solved-by-bying-ati.html">previous post</a> for the detailed discussion of problems with previous NVidia drivers).
</p>
<p>
No matter how much I like the idea of desktop effects, I still don't use them. With compositing enabled Firefox is slow as a hell at rendering and scrolling web pages. Current Webkit based browsers for Linux are not yet as good as Firefox so there's no way I'm switching from it. Firefox 3.1 beta has better performance with composite, but not much. Another known compositing problem is that with ATI proprietary driver video doesn't work (it flickers).
</p>
<h3>Conclusion</h3>
KWin is awesome. Do spend a couple of minutes and look through all its features to find some that you will like. I personally recommend window shortcuts and geometry saver.
</p>
<p>
Desktop effects with KWin do not just look cool, but instead provide usable features like "Present Windows", "Desktop Grid". If you have the right graphics card/driver combination or Firefox and video problems don't happen (or don't matter) for you, enable the desktop effects.
</p>
<h2>Plasma Desktop</h2>
<p>
Plasma is the complete redesign/rewrite/rework/re...etc. of the desktop in KDE4. I've mentioned how great it looks before, now it's time to look at the functionality.
</p>
<h3>Panel</h3>
<p>
From user's point of view not much has changed since KDE 3.x in the panel. It's still the good old K-menu + app launcher icons + desktop switcher + task manager + system tray + clock thing. Works fine - no complaints.
</p>
<p>
In 4.2 panel finally has one of two important features I need, namely the "Windows Can Cover" mode which I always use. Another one is still missing though. I very much liked the MacOS-alike menubar mode in KDE3. You could place the menubar panel on the top and add menu, application launcher, systray and clock there while leaving the task manager panel at the bottom (in "Windows Can Cover" mode). Such setup saved me some precious vertical screen space. Precious because I'm an widescreen monitor addict and on my 1920x1200 display I hate anything that takes my pixels from that "1200" side.
</p>
<p>
There are two implementations of the menubar for KDE4 already. One lies in the <a target="_blank" href="http://websvn.kde.org/trunk/playground/base/plasma/applets/menubar/">playground</a> and another comes with the <a target="_blank" href="http://www.kde-look.org/content/show.php/Bespin?content=63928">Bespin widget style</a>. I tried the the later which is called XBar. It mostly works, but doesn't look good even with Bespin. With other styles it's just plain ugly. I guess the code needs some more love to make the XBar ready for general consumption.
</p>
<h3>Desktop and Widgets</h3>
<p>
Plasma brings some fresh air to the Linux desktop departments. What I really like is this new and default "no f*g folder/file icons on the desktop" mode. Before KDE4, my desktop was always filled with all that garbage that I download with the web browser, files I temporarily save and so on. Because of that, the desktop had only one purpose - to be the trashcan that you need to sweep out periodically. Plasma by default won't let you do this and instead brings some value to the desktop with Widgets (aka Plasmoids).
</p>
<p>
KDE4 comes with 60-70 widgets you can place on your desktop, but after a year of using KDE4, I refined my selection to just 4 widgets.
</p>
<p>
The most useful addition to the desktop is the Picture Frame. I like to put the photo of my girlfriend into the nice frame right onto the desktop without having to change the wallpaper. In general, people faces and pets don't look good as wallpapers, so with Plasma you can have them as picture frames floating over the background.
</p>
<p>
Comic Strip is the another widget I'm totally in awe of. What can be better than getting the most recent strip from PhD Comics series right after login? :) Yeah, I know, I'm a pervert and you'll most likely be following Dilbert or XKCD, but I'm sure you get the idea ;)
</p>
<p>
Having used Notes in the Mac OS dashboard, I liked them in Plasma. Desktop just feels like the right place to put some random notes and now you can do that with KDE4. The good old KNotes application from KDE3 is still there in KDE4, but I just don't need it anymore. My notes are now on the desktop.
</p>
<p>
And finally, the last widget I use is called "Luna" which is a nice way to show the phase of the moon. I like to take my camera with a long lens, go out and shoot moon so it's good to know that there's a full moon day approaching. While I'm writing this review, Luna tells me that tomorrow is the full moon. How sweet :)
</p>
<p>
Here's how my desktop looks with all those widgets:
</p>
<div class="figure" style="width: 480px;">
<a href="/blog/images/desktop.png"><img src="/blog/images/desktop_thumbnail.png" height="360" width="480" /></a>
<div class="figcaption">KDE Plasma Desktop with widgets</div>
</div>
<p>
I was amazed how such a simple idea of having widgets on the desktop changes your experience for good. Also now I'm totally convinced that KDE4 implementation of this idea is the best out there. Vista's gadgets occupy only the small part of the desktop leaving you with those annoying icons for the rest of the desktop space. In Mac OS you need to go to the Dashboard for widgets. And only in KDE4 widgets are exclusively on the desktop, in fact they "are" a desktop.
</p>
<p>
Only with free software you have this power to make a decision to completely replace the old desktop with icons with the new one with widgets. Good to see both Apple and Microsoft still struggling with the old desktop metaphor while we're enjoying the new one :) And by the way, KDE is not Apple. The default desktop
setup is not going to be the only one possible. Choose "Folder View" containment as a Desktop Type, and get your icons back. I do advise against that, but it's your choice after all.
</p>
<p>
When desktop becomes more useful, the old problem how to show it when it is covered by windows becomes more severe. Vista solves this in the most useless way - the Sidebar is allowed to be on top of windows, effectively reducing the screen space. MacOS's solution is to show translucent Dashboard on user request only (with F12 shortcut, with active screen corner or with dock button). In KDE4 you can also show desktop widgets in a MacOS-alike way with Ctrl-F12, but instead of that I just add an extra virtual desktop and keep it always clean without windows. Any time I need the desktop widgets - I just switch to another virtual desktop.
</p>
<p>
Widgets you place on the desktop can also be added to the panel. Plasma team spend several years redesigning and rewriting the desktop and panel from scratch and now it certainly pays off. The same clock you see on the panel can be added to the desktop and vice versa. But no rewrites comes without consequences. Many places still need polishing. For example, the "Digital Clock" widget has its own implementation of the calendar widget and unlike the standard one from KDE libs, this has some repainting glitches and bugs with popup menu rendering. Also after increasing desktop resolution with xrandr command, desktop and panel resize fine, but you can't move the widget outside of the previous desktop dimensions. Such small problems exist, but I'm sure they will get all fixed eventually during 4.3 (or even 4.2.x) development.
</p>
<p>
In general, both the desktop itself and the widgets in KDE 4.2 provide great user experience. But at the same time you shouldn't expect as much polish from 4.2.0 as you would from 3.5.10 for example.
</p>
<h3>Kickoff Menu</h3>
<p>
Looks like there can be only "love or hate" with the new KDE4 menu for most people. For most, but not for me. I don't care about the "K"-menu at all as I rarely use it. What I like in the new menu is that by default only "Favorites" tab is shown and that there's a search bar to discover installed applications. This already covers 80% of my needs. Another 20% of my needs is covered by "Recently Used" tab. I visit Applications tab only once after new distribution installation just to check what's new came with an update.
</p>
<div class="figure" style="width: 389px;">
<img src="/blog/images/kickoff_menu.png" height="504" width="389" /></a>
<div class="figcaption">Kickoff menu</div>
</div>
<p>
Despite its low value for me, Kickoff menu is a nice change from the traditional one. But, in case you hate the new menu, just switch it to "Classic" style and relax ;)
</p>
<h3>KRunner</h3>
<p>
KRunner (Alt-F2) is the natural answer to the question "how to launch applications without fiddling with the menu". In KDE3 KRunner was just the tool to run command. The new KRunner in much more than just a command runner.
</p>
<p>
While you type, it will search for installed applications, commands in the PATH, bookmarks, contacts, opened devices and so on. For example, this is what you get typing "kon":
</p>
<div class="figure" style="width: 400px;">
<img src="/blog/images/krunner.png" height="264" width="400" /></a>
<div class="figcaption">KRunner launching application</div>
</div>
<p>
You can type whatever you want, and KRunner will ask its numerous plugins to come up with suggestions for you. For example, see what it shows after typing "fonts":
</p>
<div class="figure" style="width: 400px;">
<img src="/blog/images/krunner2.png" height="264" width="400" /></a>
<div class="figcaption">KRunner launching fonts configuration tool</div>
</div>
<p>
Veteran Mac OS users should have already recognized that KRunner is inspired by Quicksilver - the best application launcher for Mac OSX. Indeed, KRunner developers certainly took ideas from Quicksilver. If you turn on "Task oriented" KRunner user interface mode in the settings, then you'll even have Quicksilver-like UI. Personally, I prefer the command-oriented mode with the input box. First, it is much easier to type things there. Second, it's more convenient with a calculator plugin. Yes, right, KRunner can replace the calculator - just type your expression in the box starting with "=" and get your result:
</p>
<div class="figure" style="width: 400px;">
<img src="/blog/images/krunner_calculator.png" height="264" width="400" /></a>
<div class="figcaption">KRunner as a calculator</div>
</div>
<p>
KRunner doesn't come without problems of course. The minor problem is that sometimes it won't run the command you've typed (doesn't happen too often). The major problem is its discoverability and help.
</p>
<p>
I think that for the new KDE user it will be hard to discover KRunner itself. The only way to show it without knowing "Alt-F2" shortcut is the "Run Command" entry in the desktop popup menu. It's even harder to use plugins. Some plugins are obvious and do not require usage documentation, but plugins like calculator and unit converter do. For example, there's no description on accepted expression syntax and allowed mathematical functions for the calculator.
</p>
<p>
Unit converter is even more enigmatic. I spent half an hour trying various combinations of units to find out what it converts and how to do that right. Being a geek, I had some fun, but I wouldn't expect normal people to do that. I think we need to add some help for KRunner plugins. Having an "?" icon next to "i" in the plugin selection dialog appears to be the best place for that. And I don't think we need to write docbook documentation for that - just a window that would show essential usage information is enough.
</p>
<div class="figure" style="width: 400px;">
<img src="/blog/images/krunner_unit_converter.png" height="264" width="400" /></a>
<div class="figcaption">KRunner as a unit converter</div>
</div>
<p>
In any case, do try KRunner. Press Alt-F2 to show it, go to configuration and enable launcher plugins you'd like to use, and spend some time exploring the features. If you used and liked Quicksilver on Mac, you'll like KRunner. If you never used this kind of application, you'll be pleasantly surprised with how useful it can be. I'd say that if you need one more reason to switch to KDE4 - it's the KRunner. It's simply awesome.
</p>
<h3>Conclusion:</h3>
<p>
Plasma makes the desktop valuable again. I liked the default uncluttered mode without any icons and I liked the idea of widgets that you can put on the desktop. Unlike 4.0 and 4.1 Plasma in 4.2 is usable and stable (not without minor glitches though).
</p>
<p>
KRunner is a killer feature. Once you try it, you'll never stop, believe me. In my opinion, KRunner may easily be one of the reasons to switch to KDE4. I only wish it was more prominent and more documented.
</p>
<p>
As a general conclusion, I should say that after KDE4 I don't want to get back to KDE3. The new Plasma desktop is a huge success and with proper architecture and implementation behind it, I'm sure we'll see even more exciting improvements in the future. And of course, I'm sure that in subsequent KDE releases we'll also see even more polished and ironed out 4.x desktop.
</p>
<hr/>
<p>
I hope you enjoyed this review and I hope I've shown enough to convince that KDE 4.2 is the desktop worth using. It's stable, it looks perfect, it has some killer features like new desktop with widgets, KRunner and window manager with desktop effects built in. No review can cover all goodness that comes with 4.2. <a target="_blank" href="http://kde.org/announcements/4.2/">Discover it yourself!</a>
</p>
<p>
Even without all the things that come with KDE4 I would have enjoyed using it. But the real power of KDE lies not only in the desktop. The remaining part is the outstanding set of applications that is shipped with KDE. So, please come back soon for the next part of this review where I'll describe the programs for KDE4 that I enjoy using every day.
</p>
KDE4 Performance on NVidia 8600GT: Problem Solved by Bying ATI2008-10-11T00:00:00-05:00http://www.alexdymo.com/blog/2008/10/kde4-performance-on-nvidia-8600gt-problem-solved-by-bying-ati<p>
I've been running KDE4 desktop since May and I've constantly suffered from poor desktop performance and various graphics card related problems. Now I've solved those problems: I've bought an ATI card. Despite NVidia releasing the new <a target="_blank" href="http://www.nvnews.net/vbulletin/showthread.php?t=120679">Linux driver</a> and suggesting to <a target="_blank" href="http://www.nvnews.net/vbulletin/showthread.php?t=118088">tweak several performance-related configuration options</a>, I still decided to go and spend $50 on the new video card. Here is the long story why...
</p>
<p>
On my NVidia GT8600 KDE4 had several types of performance problems:
</p>
<h2>1. Slow Repainting of Windows</h2>
<p>
When I used KWin as a window manager with disabled compositing (sic!), main windows of KDE4 applications took too much time to repaint themselves upon switching. When I used other window manager (twm for instance :)), the repainting was a lot faster. Measurements showed that KWin suddenly took more than 40% of CPU on window switching. Turning on compositing (aka "desktop effects") greatly improved KWin performance, but compositing was a no-go for me for the reasons I'll explain below.
</p>
<p>
Status of the problem: <span style="color:red;">could not be solved for me</span>.
</p>
<h2>2. Slow Resizing of Windows and Plasma Applets</h2>
<p>
That's the problem all people using NVidia cards saw. It was the most severe but NVidia forum's suggestions helped.
</p>
<p>
I created an autostart script
</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#!/bin/bash</span>
nvidia-settings -a <span class="nv">InitialPixmapPlacement</span><span class="o">=</span>2 -a <span class="nv">GlyphCache</span><span class="o">=</span>1</code></pre></figure>
<p>
and added 3 more configuration options to the xorg.conf:
</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">Option <span class="s2">"PixmapCacheSize"</span> <span class="s2">"3000000"</span>
Option <span class="s2">"AllowSHMPixmaps"</span> <span class="s2">"0"</span>
Option <span class="s2">"OnDemandVBlankInterrupts"</span> <span class="s2">"True"</span></code></pre></figure>
<p>
This all helped to get reasonable performance. Some people report that for them KDE4 flies with such configuration. For me it did not fly. The performance was just bearable, but KDE3 desktop was simply a lot faster.
</p>
<p>
Status of the problem: <span style="color:green;">almost solved</span>.
</p>
<h2>3. Slow Desktop Effects</h2>
<p>
KDE4 with desktop effects turned on, remind me of running a heavy video game on integrated graphics card :) Slowness, freezes and so on.
</p>
<p>
Using the newest driver and all options I told about above solved the problem. Once again, almost solved. Virtual desktop switching effects would still freeze times to times.
</p>
<p>
In any case, I didn't care much because every time I turned on compositing, scrolling speed in Firefox degraded by an order of magnitude. I have to use Firefox a lot these days because I do web development at work so compositing became a complete "no-go" for me. Therefore I didn't really cared much about it being slow. I could be happy if only KWin hadn't got the problems with slow window repainting (the problem #1).
</p>
<p>
Status of the problem: <span style="color:green;">almost solved</span>.
</p>
<h2>4. Slow Painting in KDE4 Apps</h2>
<p>
This problem didn't depend on window manager or compositing. It was always visible and the most annoying. It was also quite hard to track down and profile.
</p>
<p>
One example was a listview widget in akregator with a list of posts. I have hundreds of posts there and listview scrolling was too slow for me. Valgrind said that the text painting was a problem. My laptop with old ATI X1600 card (and open-source driver) rendered the same text a lot faster and scrolling in akregator wasn't an issue at all.
</p>
<p>
Second example was kate also having problems with painting text (see <a target="blank" href="http://bugs.kde.org/show_bug.cgi?id=171099">bug report</a> for details). The painting algorithm in kate part may not be ideal, but my system was supposed to be fast enough to counterbalance that. In reality, painting text with the nvidia driver was just too slow and non-optimal algorithm just merely increased the annoyance.
</p>
<p>
Status of the problem: <span style="color:red;">I was unable to solve it</span>.
</p>
<h2>5. Corruption of System Tray Icons</h2>
<p>
Almost always icons in system tray were rendered with some weird background consisting from parts of other system tray icons. No driver updates and config options solved this problem
</p>
<p>
Status of the problem: <span style="color:red;">I was unable to solve it</span>.
</p>
<h2>Conclusion</h2>
<p>
After several months of self-torturing I decided that it was enough for me. I went to the local shop and got a cheap ATI Radeon 3450 card for $50. It's inferior to my 8600GT but I don't care much because KDE4 just flies on it. And by "flies" I <i>do mean</i> that it's really really fast. All 5 problems I've listed above are gone now. Period. Finita la commedia :)
</p>
<p>
It's not like things are all that shiny with an ATI. I miss the brightness setting in the driver (with nvidia you could do something like <i>nvidia-settings -a Brightness=-0.4</i>) and Firefox is still slow with compositing enabled. But in any case my desktop doesn't bother me anymore and I can just enjoy using it.
</p>
<h2>Update:</h2>
<p>
If after reading this post you think of selling your NVidia card and buying ATI, please note that proprietary ATI driver has at this moment (October 2008) several problems I know and can confirm:
</p>
<ul>
<li>video (xv and gl) doesn't work with composite turned on - it flickers</li>
<li>Xorg may fail to properly shutdown leaving only blank black screen</li>
<li>scrolling is still slow in Firefox with compositing turned on</li>
</ul>
<p>
For me desktop effects are not important at all, I turn them off. Be aware of the problems listed above if you intend to use X composite extension and desktop effects in KDE4.
</p>
PhD: (double) Dr. Dymo2008-07-29T00:00:00-05:00http://www.alexdymo.com/blog/2008/07/phd-double-dr-dymo<p>
The PhD saga is officially over today! In April I've got my Candidate of Sciences diploma and today I've received my PhD diploma. Yeah, one of the pros of defending your dissertation in Ukraine is that you get two diplomas for one dissertation ;) And of course the cons side is that you have to wait for governmental approval. The wait time for me was more than 7 months. Anyway, it's finally over now :)
</p>
PhD: T Minus One...2007-11-12T00:00:00-06:00http://www.alexdymo.com/blog/2007/11/phd-t-minus-one<p>
Today was finally the day of my PhD thesis defense! The defense went very well, the scientific council of my university approved my work with 10 votes "for" and 0 votes "against" and was overall pleased with my research :)
</p>
<p>
So now I need only to do nothing but wait for state examination board to approve the work and issue the PhD diploma.
</p>
Nostalgia for Kugar2007-10-10T00:00:00-05:00http://www.alexdymo.com/blog/2007/10/nostalgia-for-kugar<p>
It's been a long time since I last used <a target="_blank" href="http://websvn.kde.org/branches/koffice/1.6/koffice/kugar/">Kugar</a>. It's been even longer time since I last developed Kugar. But today was the Kugar day...
</p>
<p>
Yes, today I had to address 95 envelopes (I'm about to send printed abstracts of my PhD thesis). I had addresses written in the text file and I had to print them on envelopes. What was my solution? Of course to use the report generator and of course Kugar was that report generator ;)
</p>
<p>
2 minutes I spent writing a simple 10 line awk script that transformed text to Kugar xml format. 5 minutes were necessary to design the template in Kudesigner. And finally 10 more minutes I was figuring out how to properly insert the envelope to my printer ;) Overall, about 20 minutes for the task.
</p>
<p>
I remember my colleague telling me recently that he went to bed at about 5am because he was printing addresses. I can imagine him copying and pasting from one Word document with the list to another Word document with the envelope :) The fact is that it's only midnight here and I've already printed everything I wanted and can go to bed!
</p>
<p>
Anyway, I'd like to say that Kugar is pretty cool despite being unmaintained for 3 years. Yes, the software (especially Kudesigner) has now lots of bugs that weren't in the code 3 years ago, but it still remains highly usable.
</p>
<p>
Kugar's biggest problem is still actual though - nobody knows <i>when</i> to use it. So remember: <b>If you have any data in the format translatable to xml and you want to print it using the template, Kugar is your tool</b>. That simple! No databases (they are supported but completely optional), just two xml files - one with the data generated by you or your program and another one with the template generated by Kudesigner.
</p>
<p class="small">
PS: if you would like to contribute to Kugar, kick me hard and ask for the recent sources. I've ported portions of the source code to Qt4 already. Also my own copies are more stable and usable than ones in KDE svn. I
never committed them because they don't have dependency on KDE libs (they just depend on Qt)
</p>
Something Is Rotten in the State Ukraine2007-09-22T00:00:00-05:00http://www.alexdymo.com/blog/2007/09/something-is-rotten-in-the-state-ukraine<p>
Maybe you know, maybe you don't, but Ukraine is approaching another round of parliament elections. As we didn't have enough elections recently! And once again, three major forces participate and again as arrogant and hostile they are, they try to be good now and evince at least some care about Ukraine and Ukrainians:
</p>
<p>
<div class="figure" style="width: 475px;">
<a href="/blog/images/blue_orange_white.png"><img src="/blog/images/blue_orange_white_thumbnail.png" height="912" width="475" /></a>
<div class="figcaption">Here's how they care about Ukraine</div>
</div>
<p>
But look at the pictures, look carefully, look closely. Maybe you'll see what I can't see there. Maybe I'm blind, but what I see is only lots, lots of white, orange and blue flags that belong to our celebrated political parties. And what I <b>don't see</b> is <b>Ukrainian flags</b>! There're none. No <a target="_blank" href="http://en.wikipedia.org/wiki/Image:Flag_of_Ukraine.svg">flag of the country and people</a> they are so selflessly fighting for.
</p>
<p>
These pictures alone clearly show how much our parties care about Ukraine... Imagine how many other proofs we have here ;) Do we need these guys in parliament? Several years in a row my answer was "no!". This year I say "stay away from this country!".
</p>
<p class="small deemphasized">
Photos are copyright <a target="_blank" href="http://www.unian.net">UNIAN</a>.
Links:
<a target="_blank" href="http://photo.unian.net/rus/info/83824.html">1</a>,
<a target="_blank" href="http://photo.unian.net/rus/info/72117.html">2</a>,
<a target="_blank" href="http://photo.unian.net/rus/info/83587.html">3</a>
</p>
More Surprises in Scala: Covariance and Contravariance2007-09-08T00:00:00-05:00http://www.alexdymo.com/blog/2007/09/more-surprises-in-scala-covariance-and-contravariance<p>
I've been reading more about Scala discovering more and more nice features the modern language with static typing can bring. Some of those features look to me just as an syntactic improvement over what we already can do with another statically typed languages like C++. For example, pattern matching example <a href="/blog/2007/08/scala-a-pleasant-discovery.html">from my last blog</a> is definitely what you can do with several AST classes (they need to have type() or rtti() method) and your own implementation of visitor pattern in C++.
</p>
<p>
But there're some language features in Scala I didn't expect and didn't think about before. The perfect example IMHO is covariant and contravariant subtyping I discovered for myself just a couple of days before.
</p>
<p>
Think about this example, if we have class B that inherits class A then we can use objects of type B whenever we need objects of type A. So far so good. But what if we have template class X with A and B as parameter types? C++ tells us X<A> and X<B> are unrelated:
</p>
<figure class="highlight"><pre><code class="language-cpp" data-lang="cpp"><span class="k">class</span> <span class="nc">A</span> <span class="p">{};</span>
<span class="k">class</span> <span class="nc">B</span><span class="o">:</span> <span class="k">public</span> <span class="n">A</span> <span class="p">{};</span>
<span class="k">template</span><span class="o"><</span><span class="k">typename</span> <span class="n">T</span><span class="o">></span> <span class="k">class</span> <span class="nc">X</span> <span class="p">{};</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
<span class="n">B</span> <span class="o">*</span><span class="n">t1</span> <span class="o">=</span> <span class="k">new</span> <span class="n">B</span><span class="p">;</span>
<span class="n">A</span> <span class="o">*</span><span class="n">t2</span> <span class="o">=</span> <span class="n">t1</span><span class="p">;</span> <span class="c1">//ok because B inherits A
</span>
<span class="n">X</span><span class="o"><</span><span class="n">B</span><span class="o">></span> <span class="o">*</span><span class="n">x1</span> <span class="o">=</span> <span class="k">new</span> <span class="n">X</span><span class="o"><</span><span class="n">B</span><span class="o">></span><span class="p">;</span>
<span class="c1">//error!!! because C++ has non-variant subtyping
</span> <span class="c1">// so X<B> and X<A> are different types
</span> <span class="n">X</span><span class="o"><</span><span class="n">A</span><span class="o">></span> <span class="o">*</span><span class="n">x2</span> <span class="o">=</span> <span class="n">x1</span><span class="p">;</span>
<span class="p">}</span></code></pre></figure>
<p>
Contrary to that, in Scala you can declare that X[B] inherits X[A] and have covariant subtyping or even declare that X[B] inherits X[A] and have contravariant subtyping:
</p>
<figure class="highlight"><pre><code class="language-scala" data-lang="scala"><span class="k">class</span> <span class="nc">A</span> <span class="o">{}</span>
<span class="k">class</span> <span class="nc">B</span> <span class="o">{}</span>
<span class="k">class</span> <span class="nc">X</span><span class="o">[</span><span class="kt">+Type</span><span class="o">]</span> <span class="o">{}</span> <span class="c1">// +Type means "covariant"
</span>
<span class="k">val</span> <span class="n">t1</span> <span class="k">=</span> <span class="k">new</span> <span class="n">B</span>
<span class="k">val</span> <span class="n">t2</span> <span class="k">=</span> <span class="n">t1</span> <span class="c1">// ok, B inherits A
</span>
<span class="k">val</span> <span class="n">x1</span> <span class="k">=</span> <span class="k">new</span> <span class="n">X</span><span class="o">[</span><span class="kt">B</span><span class="o">]</span>
<span class="k">val</span> <span class="n">x2</span> <span class="k">=</span> <span class="n">x1</span> <span class="c1">// ok too because X[B] inherits X[A]
</span>
<span class="k">return</span></code></pre></figure>
<p>
Not that some elements of covariance and contravariance of types didn't exist before in familiar languages like C++ and Java. Contrary to that, <a target="_blank" href="http://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)"> they did</a>, but most likely I woulnd't have learned about them if I didn't start learning Scala which directly exposes those things as language features. Cool language Scala is... I must say, very cool ;)
</p>
Funny Consequences of "Functions are Objects" Rule in Scala2007-09-08T00:00:00-05:00http://www.alexdymo.com/blog/2007/09/funny-consequences-of-functions-are-objects-rule-in-scala<p>
Scala language is an unique combination of interesting language features and clear and concise syntax which is so rare in the world of programming languages.
</p>
<p>
Scala is truly object-oriented. This does mean that everything is an object, even functions. Err, functions you'd ask? Yeah, functions are indeed objects but that wasn't a surprise for me because I've seen and used that in Javascript. But function inheritance indeed was a surprise.
</p>
<p>
How can that be possible? Martin Odersky gives an example that functions with one argument in Scala are objects that mix this trait:
</p>
<figure class="highlight"><pre><code class="language-scala" data-lang="scala"><span class="k">trait</span> <span class="nc">Function1</span><span class="o">[</span><span class="kt">-A</span>, <span class="kt">+B</span><span class="o">]</span> <span class="o">{</span>
<span class="k">def</span> <span class="n">apply</span><span class="o">(</span><span class="n">x</span><span class="k">:</span> <span class="kt">A</span><span class="o">)</span><span class="k">:</span> <span class="kt">B</span>
<span class="o">}</span></code></pre></figure>
<p>
Traits are the Scala implementation of <a target="_blank" href="http://en.wikipedia.org/wiki/Mixin">mixins</a>. For C++ guys mixin is just a multiple inheritance. For Ruby guys trait is more like a module. The difference is that in Ruby you'd "include" the module into your class and in Scala you'd "extend" the class with a trait.
</p>
<p>
In the example above "-A" means that function that has AnyRef as an argument inherits a function that has a String argument. Take a look at this magical example:
</p>
<figure class="highlight"><pre><code class="language-scala" data-lang="scala"><span class="k">object</span> <span class="nc">MyProg</span> <span class="o">{</span>
<span class="k">def</span> <span class="n">doSmthStr</span><span class="o">(</span><span class="n">a</span><span class="k">:</span> <span class="kt">String</span><span class="o">)</span><span class="k">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="n">a</span><span class="o">.</span><span class="n">length</span>
<span class="k">def</span> <span class="n">doSmthAny</span><span class="o">(</span><span class="n">a</span><span class="k">:</span> <span class="kt">AnyRef</span><span class="o">)</span><span class="k">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="n">a</span><span class="o">.</span><span class="n">hashCode</span>
<span class="k">def</span> <span class="n">compute</span><span class="o">(</span><span class="n">function</span><span class="k">:</span> <span class="kt">AnyRef</span> <span class="o">=></span> <span class="n">int</span><span class="o">)</span> <span class="k">=</span> <span class="o">{</span>
<span class="n">function</span><span class="o">(</span><span class="s">"Haha"</span><span class="o">)</span>
<span class="o">}</span>
<span class="k">def</span> <span class="n">compute2</span><span class="o">(</span><span class="n">function</span><span class="k">:</span> <span class="kt">String</span> <span class="o">=></span> <span class="n">int</span><span class="o">)</span> <span class="k">=</span> <span class="o">{</span>
<span class="n">function</span><span class="o">(</span><span class="s">"Haha"</span><span class="o">)</span>
<span class="o">}</span>
<span class="k">def</span> <span class="n">main</span> <span class="k">=</span> <span class="o">{</span>
<span class="c1">// not possible because doSmthStr is of type String => int
</span> <span class="c1">// which is supertype of AnyRef => int
</span> <span class="n">compute</span><span class="o">(</span><span class="n">doSmthStr</span><span class="o">)</span>
<span class="c1">// possible because doSmthAny is exactly of type AnyRef => int
</span> <span class="n">compute</span><span class="o">(</span><span class="n">doSmthAny</span><span class="o">)</span>
<span class="c1">// possible because doSmthStr is exactly of type String => int
</span> <span class="n">compute2</span><span class="o">(</span><span class="n">doSmthStr</span><span class="o">)</span>
<span class="c1">// possible because doSmthAny is of type AnyRef => int
</span> <span class="c1">// which inherits String => int
</span> <span class="n">compute2</span><span class="o">(</span><span class="n">doSmthAny</span><span class="o">)</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="nc">MyProg</span><span class="o">.</span><span class="n">main</span></code></pre></figure>
<p>
Isn't that cool, the function doSmthAny with AnyRef (aka Object in Java) argument inherits the function doSmthStr with String argument and therefore can be used whenever we need doSmthStr. Amazing!!!
</p>
<p>
Even more amazing is when the return types in those functions are different. For a function to be the subtype of another function we not only require its argument to be a supertype, but its return value to be a
subtype. Citing <a href="http://www.scala-lang.org/docu/files/ScalaByExample.pdf" target="_blank">Scala by Example</a> book:
</p>
<blockquote>
function S=>T is a subtype of S'=>T' if S' is a subtype of S and T is a subtype of T'
</blockquote>
<p>
where S=>T is a function defined as:
</p>
<figure class="highlight"><pre><code class="language-scala" data-lang="scala"> <span class="k">def</span> <span class="n">function</span><span class="o">(</span><span class="n">arg</span><span class="k">:</span> <span class="kt">S</span><span class="o">)</span><span class="k">:</span> <span class="kt">T</span></code></pre></figure>
Scala: a Pleasant Discovery2007-08-26T00:00:00-05:00http://www.alexdymo.com/blog/2007/08/scala-a-pleasant-discovery<p>
I've recently became quite confident that choosing programming language is a process that is very similar to choosing what to cook. First you taste something. If you like it, you eat it. If you really really like it you look for a recipe and try to cook it. Same for the programming language. First you see some code in that language. If you like it, you read more about the language, learn its concepts and ideas. If you really really like what you found, you start programming in that language.
</p>
<p>
What's interesting is that your consciousness is not usually involved in the tasting phase. On the surface it's simple - you either like new thing or not. But I do believe that there's a serious subconscious process involved here that takes into account all your previous experience and tells you "yes" or "no" to this new thing.
</p>
<p>
I've made several failed attempts to ignore this subconscious decision and force myself into learning things I don't like. Ironically, such first attempt was Lisp and the last one was Haskell. Needless to say that Lisp still means to me nothing more than lots of isolated, sil^^^... <a target="_blank" href="http://acronyms.thefreedictionary.com/Limited+Instructions+Set+Processor">you know what ;)</a> and Haskell is still for me nothing more than a pure product of pure mind.
</p>
<p class="small">
Once again, no offense to these languages and people using them. That's just my mind that doesn't allow me to like these great languages ;)
</p>
<p>
Contrary to that, I made quite a success learning languages I liked. The best examples would be Prolog and Ruby. And yesterday I discovered for me another language I liked from the first look - <a target="blank" href="http://scala-lang.org">Scala</a>. So instead of working hard on my projects and my PhD, I spent last two days reading about Scala.
</p>
<p>
And I should say the language is very cool. It implements an interesting mixture of functional and object-oriented programming paradigms but keeps static typing and very clean syntax. For those familiar with Ruby, I'd
say Scala often feels like Ruby that is statically typed, has C-ish syntax and implements more functional programming goodies. I think next time I'll come up with a side-by-side Ruby vs Scala comparison.
</p>
<p>
And finally a little code snippet for you to taste (from excellent <a target="_blank" href="http://lamp.epfl.ch/~odersky/">Martin Odersky's</a> <a target="blank" href="http://www.scala-lang.org/docu/files/ScalaByExample.pdf">Scala by Example</a> book)
<figure class="highlight"><pre><code class="language-scala" data-lang="scala"><span class="k">abstract</span> <span class="k">class</span> <span class="nc">Tree</span>
<span class="k">case</span> <span class="k">class</span> <span class="nc">Sum</span><span class="o">(</span><span class="n">l</span><span class="k">:</span> <span class="kt">Tree</span><span class="o">,</span> <span class="n">r</span><span class="k">:</span> <span class="kt">Tree</span><span class="o">)</span> <span class="k">extends</span> <span class="nc">Tree</span>
<span class="k">case</span> <span class="k">class</span> <span class="nc">Var</span><span class="o">(</span><span class="n">n</span><span class="k">:</span> <span class="kt">String</span><span class="o">)</span> <span class="k">extends</span> <span class="nc">Tree</span>
<span class="k">case</span> <span class="k">class</span> <span class="nc">Const</span><span class="o">(</span><span class="n">v</span><span class="k">:</span> <span class="kt">int</span><span class="o">)</span> <span class="k">extends</span> <span class="nc">Tree</span>
<span class="k">type</span> <span class="kt">Environment</span> <span class="o">=</span> <span class="nc">String</span> <span class="k">=></span> <span class="n">int</span>
<span class="k">object</span> <span class="nc">MyProg</span> <span class="o">{</span>
<span class="c1">//uses pattern matching to evaluate the expression
</span> <span class="k">def</span> <span class="n">eval</span><span class="o">(</span><span class="n">t</span><span class="k">:</span> <span class="kt">Tree</span><span class="o">,</span> <span class="n">env</span><span class="k">:</span> <span class="kt">Environment</span><span class="o">)</span><span class="k">:</span> <span class="kt">int</span> <span class="o">=</span> <span class="n">t</span> <span class="k">match</span> <span class="o">{</span>
<span class="k">case</span> <span class="nc">Sum</span><span class="o">(</span><span class="n">l</span><span class="o">,</span> <span class="n">r</span><span class="o">)</span> <span class="k">=></span> <span class="n">eval</span><span class="o">(</span><span class="n">l</span><span class="o">,</span> <span class="n">env</span><span class="o">)</span> <span class="o">+</span> <span class="n">eval</span><span class="o">(</span><span class="n">r</span><span class="o">,</span> <span class="n">env</span><span class="o">)</span>
<span class="k">case</span> <span class="nc">Var</span><span class="o">(</span><span class="n">n</span><span class="o">)</span> <span class="k">=></span> <span class="n">env</span><span class="o">(</span><span class="n">n</span><span class="o">)</span>
<span class="k">case</span> <span class="nc">Const</span><span class="o">(</span><span class="n">v</span><span class="o">)</span> <span class="k">=></span> <span class="n">v</span>
<span class="o">}</span>
<span class="k">def</span> <span class="n">main</span> <span class="o">{</span>
<span class="k">val</span> <span class="n">env</span><span class="k">:</span> <span class="kt">Environment</span> <span class="o">=</span> <span class="o">{</span> <span class="k">case</span> <span class="s">"x"</span> <span class="k">=></span> <span class="mi">5</span><span class="o">;</span> <span class="k">case</span> <span class="s">"y"</span> <span class="k">=></span> <span class="mi">10</span> <span class="o">}</span>
<span class="c1">//(x+x) + (7+y)
</span> <span class="k">var</span> <span class="n">expr</span><span class="k">:</span> <span class="kt">Tree</span> <span class="o">=</span> <span class="nc">Sum</span> <span class="o">(</span><span class="nc">Sum</span><span class="o">(</span><span class="nc">Var</span><span class="o">(</span><span class="s">"x"</span><span class="o">),</span> <span class="nc">Var</span><span class="o">(</span><span class="s">"x"</span><span class="o">)),</span> <span class="nc">Sum</span><span class="o">(</span><span class="nc">Const</span><span class="o">(</span><span class="mi">7</span><span class="o">),</span> <span class="nc">Var</span><span class="o">(</span><span class="s">"y"</span><span class="o">)))</span>
<span class="c1">//(5+5) + (7+10)
</span> <span class="n">println</span><span class="o">(</span><span class="n">eval</span><span class="o">(</span><span class="n">expr</span><span class="o">,</span> <span class="n">env</span><span class="o">))</span> <span class="c1">//prints: 27
</span> <span class="o">}</span>
<span class="o">}</span>
<span class="nc">MyProg</span><span class="o">.</span><span class="n">main</span></code></pre></figure>
PhD: T Minus Two...2007-06-15T00:00:00-05:00http://www.alexdymo.com/blog/2007/06/phd-t-minus-two<p>
Today the scientific council in my university approved my work for defense :) so I have only two steps left - defense itself and state examination board approval. Looks like the five-year work finally comes to its end. Whew :)
</p>
RailsConf'07 Post Mortem2007-06-02T00:00:00-05:00http://www.alexdymo.com/blog/2007/06/railsconf-07-post-mortem<p>
RailsConf this year was huge. About 1600 people were there who paid incredibly high amount of money for the entry. And (like last year) it was again a show with Chad Fowler playing balalaika (or what was that instrument), Ze Frank amusing auditorium with his keynote and of course Dave Thomas again talking nonsense ;)
</p>
<p>
What is really noticeable is that Rails community became bigger and more pragmatic. We've got only two talks of "is Rails ready for the Enterprise" kind and both of them were not really about the subject. That's surely a good sign, but that's also a sign that the whole Ruby/Rails grew and will start loosing this aura of cool hacker's toolchain.
</p>
<p>
Not that I care about that much because I still think Ruby and Rails are powerful technologies that allow us to enjoy what we're doing but... this year is about time to start looking at others. People following Reddit might already have the impression Haskell is going to be the new hacker's toy. And maybe it will, who knows... It looks like in the next year we'll see some articles about "is Haskell ready for the Enterprise?" :) Heh... I'd better start fighting with my distaste for functional programming ;)
</p>
Domination2007-05-21T00:00:00-05:00http://www.alexdymo.com/blog/2007/05/domination<p>
I'm sitting here at one of the boring talks at RailsConf and have nothing to do, so I decided to blog a bit :)
</p>
<p>
Basically Ruby/Rails people are great Mac fans (see <a target="_blank" href="http://flickr.com/photos/ugocei/244414117/">this Flickr picture</a>). Some of them use Windows. But what's really interesting that there's a number of people who're using Linux here and all those people I've seen have KDE on their desktops. I don't know what is the most popular distro among them, but two Kubuntu addicts are sitting near me at this moment. And that's cool, isn't that :)
</p>
Catching Up2007-05-20T00:00:00-05:00http://www.alexdymo.com/blog/2007/05/catching-up<p>
Uh, I have discovered I haven't blogged since March. Not that nothing happened, contrary a lot of cool things were in those two months.
</p>
<p>
First, there's a lot things done in KDevelop. I was overloaded with work and PhD so didn't do any hacking but other guys worked really hard. Dukju continued his crusade against svn ;) Andreas and Matthew dug into version control interfaces and infrastructure like mad.
</p>
<p>
In fact, they sent so many emails to the kdevelop-devel mailing list so I believe now we beat the nosiness record on what was renowned as a very silent list :) And that's actually great. It indirectly indicates the amount of energy and potential in KDevelop community. We're keen, we're eager and we're kicking :)
</p>
<p>
Oh, and there's one more thing I forgot to mention about. Andreas got KDevelop working on Windows (see the obligatory screenshot below). So KDevelop is now as multiplatform as possible. Unix, Mac OS native, Windows native is all possible with Qt4 and KDE4! So, if you're still using Eclipse or something like that just because it works for you on Windows, tune up and keep an eye on KDevelop4. We will be multiplatform once we release ;)
</p>
<div class="figure" style="width: 480px;">
<a href="/blog/images/kdev4_win_shot.png"><img src="/blog/images/kdev4_win_shot_thumbnail.png" height="360" width="480" /></a>
<div class="figcaption">KDevelop on Windows</div>
</div>
<p>
Among the cool things happened last time is that I finally visited US :) I never had the chance to go there before, but it looks like my chances grew a lot after I became Ruby/Rails developer at Pluron company. So now I'm sitting at the Oregon Convention Center in Portland listening to the one of the RailsConf 2007 talks! I think I'll blog about RailsConf soon.
</p>
<p>
Btw, have I already mentioned that Pluron is a cool place to work? ;) If you read this, live in Ukraine and is a cool programmer/sysadmin/designer/QA specialist, drop me a note, we're hiring.
</p>
Yes, Summer Ends This Week2007-03-20T00:00:00-05:00http://www.alexdymo.com/blog/2007/03/yes-summer-ends-this-week<p>
As Thiago <a target="_blank" href="http://www.kdedevelopers.org/node/2735">noted</a>, the deadline for Google Summer of Code applications is approaching. And I'd like to note that we have not many applications for KDevelop related projects yet. Last year there were about 7-8 (or more), 3 of which were accepted. This year we have 2 applications filled and 1 pending. What does that mean? This means that you have a chance to get your KDevelop-related project accepted. <a target="_blank" href="http://code.google.com/soc/">Go ahead!</a>
</p>
KDevelop4 Evolution: The Application Templates2007-03-07T00:00:00-06:00http://www.alexdymo.com/blog/2007/03/kdevelop4-evolution-the-application-templates<p>
IDE's are usually created to make things easier and faster for developers. And most of them achieve this goal to some extent. But there is one group of people that has always suffered from IDE's. Those people are application template developers.
</p>
<p>
Tons of subtle application template formats were invented to bend to submission those miserable souls who wanted to add their little template!
</p>
<p>
Anjuta requires you to write a <a target="_blank" href="http://git.gnome.org/browse/anjuta/tree/plugins/project-wizard/templates/cpp.wiz.in">nice xml file</a> with template description including wizard page layout options, list of template files, directories and of rename rules. To do substitutions in the template files you have to spend a week learning extremely powerful but also extremely complicated <a target="_blank" href="http://autogen.sourceforge.net/">autogen</a> format so you could write something like <a target="_blank" href="http://git.gnome.org/browse/anjuta/tree/plugins/project-wizard/templates/cpp/src/main.cc">this</a> or <a target="_blank" href="http://git.gnome.org/browse/anjuta/tree/plugins/project-wizard/templates/gtk/src/main.c">this</a>.
</p>
<p>
Eclipse makes the process even more interesting. There's no application wizard, there's no template format. When you want something like that, you just have to code it in Java by yourself. Easy, isn't it? Choose between org.eclipse.cdt.ui.wizards.NewCProjectWizard, org.eclipse.ui.wizards.newresource.BasicNewResourceWizard or org.eclipse.ui.INewWizard, subclass/implement, write everything else by hand and get something like <a target="_blank" href="http://websvn.kde.org/trunk/playground/devtools/eclipse/org.kde.autotools.ui/src-autoui/org/kde/autotools/ui/wizards/">I got for KDE-Eclipse</a>.
</p>
<p>
KDevelop3 was not really different. Our first template format required you to write a <a target="_blank" href="http://websvn.kde.org/branches/KDE/3.2/kdevelop/languages/cpp/app_templates/cpphello/
cpphello?revision=409205&view=markup">template description</a> and a <a target="_blank" href="http://websvn.kde.org/branches/KDE/3.2/kdevelop/languages/cpp/app_templates/cpphello/script?revision=409205&view=markup">perl script</a> with installation instructions. Our second template format combined descriptions with processing/installation instructions to <a target="_blank" href="http://websvn.kde.org/branches/KDE/3.5/kdevelop/languages/cpp/app_templates/cpphello/cpphello.kdevtemplate?revision=624443&view=markup">the single file</a>. To make things even more interesting, we did not allow to have subdirectories in the templates, so you had to write special subdirectory creation and file copy instructions when you wanted for example to put the main.cpp into /src.
</p>
<p>
I created several application templates for KDevelop by myself and found that process too complicated and annoying. So when I was working on KDE-Eclipse I thought of ideal template format and soon figured out that <i>a simple tarball is the format of my dream</i>.
</p>
<p>
Really, why don't application wizard just extract the tarball and so some variable substitutions? I implemented exactly that: extraction + substitution and that worked better than any of those sophisticated template systems I know about.
</p>
<p>
So when the time had come to implement the application wizard for KDevelop4 I didn't hesitate and did the same thing again. So from now to create an application template for KDevelop4 you just need to:
</p>
<ul>
<li>have a directory with your project</li>
<li>place variables in file names and contents</li>
<li>write very simple .kdevtemplate file with a description like <a target="_blank" href="https://projects.kde.org/projects/extragear/kdevelop/kdevelop/repository/revisions/4.0/entry/app_templates/cpp/CMake/cmake_qt4gui/cmake_qt4gui.kdevtemplate">this one</a></li>
<li>pack it</li>
</ul>
<p>
As an example, take a look at our <a target="_blank" href="https://projects.kde.org/projects/extragear/kdevelop/kdevelop/repository/revisions/4.0/show/app_templates/cpp/CMake/cmake_qt4gui">Qt4 application template</a> in the unpacked form.
</p>
<p>
Of course, the variables that are not known to the application wizard has still to be declared in .kdevtemplate so that user can be asked at project creation time. But the whole thing is still as simple as possible and I will make sure we will stick to KISS principle and won't harry apptemplate developers anymore ;)
</p>
KDevelop4 Evolution: The Project and Buildsystem Management2007-03-06T00:00:00-06:00http://www.alexdymo.com/blog/2007/03/kdevelop4-evolution-the-project-and-buildsystem-management<p>
IDE's project management features are what everyone can see. Together with advanced language support features, proper build system support is the most prominent feature that differentiates IDE's from various editors, advanced and not.
</p>
<p>
And proper project management with proper buildsystem support is hard. KDevelop3 was very good at that. Anjuta only recently got close to what our Automake manager had for 4 years. My KDE-Eclipse autotools plugin did get some attention by RedHat guys after I stopped working on it, but I don't know what happened next. Seems like "fedora eclipse" project now superseded it. So even Eclipse doesn't have something on a par yet.
</p>
<p>
This all means KDevelop's features are still unique. Especially unique is QMake manager which has no alternatives I know about. After Andreas Pakulat took my qmake parser and vastly improved the manager in KDevelop 3.4, we can open and manage the most complex qmake project - the whole Qt library (both 3.x and 4.x versions).
</p>
<p>
But the time doesn't stop and KDevelop development doesn't stop either. We always wanted to change two things in 3.x - make it possible to open more than one project at a time and avoid code and UI duplication between buildsystem plugins.
</p>
<p>
As for today, in KDevelop4 we managed to realize our plan. First, Andreas Pakulat implemented support for opening several projects at a time. Second, we used Roberto Raggi's project management architecture with one user-visible "Project Management View" which displays information from various build system managers. That all grants the popular wish to open many projects and solves code maintainability and complexity issues at the same time!
</p>
<p>
You can see the current state of things in the screenshot below where I've opened two QMake projects using QMake Manager and KDevelop4 project using Generic Manager (CMake Manager is not yet ready). Looks cool, doesn't it? ;)
</p>
<div class="figure" style="width: 479px;">
<a href="/blog/images/kdevelop-projects.png"><img src="/blog/images/kdevelop-projects_thumbnail.png" height="336" width="479" /></a>
<div class="figcaption">KDevelop with two QMake and one CMake project opened</div>
</div>
Scripting KDevelop3?2007-02-24T00:00:00-06:00http://www.alexdymo.com/blog/2007/02/scripting-kdevelop3<p>
"Scripts" menu has been a dark horse of KDevelop since it first appeared. Almost nobody knew what it was and understood what hides beneath it (myself included until recently). But in fact the menu is the only visible hint KDevelop3 has some scripting features.
</p>
<p>
Those features are not so powerful as in Emacs, but they solve different problem. Emacs has Emacs Lisp to:
</p>
<ul>
<li>extend the environment</li>
<li>and automate common tasks</li>
</ul>
<p>
All modern IDE's I know about use different approach. They have:
</p>
<ul>
<li>extension system with plugins written usually in the same language IDE was created</li>
<li>and scripting language or scenarios to automate tasks within the IDE.</li>
</ul>
<p>
You can write plugins in C++ for KDevelop and or course you can write scripts. KDevelop exposes its internals via DCOP therefore the choice of scripting language is virtually unlimited. Either your language has DCOP bindings (like Perl, Java, Python, Ruby, KJS) or it can execute dcop command via shell.
</p>
<p>
Imagine a C++ project with some parts written in Python or Ruby. You naturally want it to be opened as C++ project to have nice integration but you also want a way to easily run your Ruby and Python programs. When working on Ruby projects, you are able to run currently edited programs. But there's no such option when a C++ project is opened. So why don't we implement that with a script?
</p>
<p>
KDevelop automatically loads all scripts it can find into the "Scripts" menu. The search path by default is $KDEDIR/share/apps/kdevelop/scripts, $KDEDIR/share/apps/kate/scripts and their user-editable equivalents ~/.kde/share/apps/kdevelop/scripts and ~/.kde/share/apps/kate/scripts.
</p>
<p>
Script has to be an executable file and needs to have a .desktop file with a short description. Our script menu item will be called "Run Ruby Program" and the actual script will be a shell script called runrubyprogram.sh. Below are the sources for runrubyprogram.desktop and runrubyprogram.sh I wrote today:
</p>
<p class="small-caps"></p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">-- runrubyprogram.desktop --
<span class="o">[</span>Desktop Entry]
<span class="nv">Encoding</span><span class="o">=</span>UTF-8
<span class="nv">Name</span><span class="o">=</span>Run Ruby Program
<span class="nv">Type</span><span class="o">=</span>ShellScript/bash
X-KDE-ScriptName<span class="o">=</span>runrubyprogram.sh</code></pre></figure>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">-- runrubyprogram.sh --
<span class="c">#!/bin/bash</span>
<span class="c">#get the name of active file and project</span>
<span class="nv">file</span><span class="o">=</span><span class="sb">`</span>dcop <span class="nv">$1</span> SimpleMainWindow caption<span class="sb">`</span>
<span class="nv">projectdir</span><span class="o">=</span><span class="sb">`</span>dcop <span class="nv">$1</span> KDevProject projectDirectory<span class="sb">`</span>
<span class="c">#strip "KDevelop" from the window caption to get the real filename</span>
<span class="nv">file</span><span class="o">=</span><span class="sb">`</span><span class="nb">echo</span> <span class="nv">$file</span> | sed <span class="s1">'s/ - KDevelop//'</span> | sed <span class="s1">'s/file:\/\///'</span><span class="sb">`</span>
<span class="nv">cwd</span><span class="o">=</span><span class="sb">`</span><span class="nb">pwd</span><span class="sb">`</span>
<span class="k">if</span> <span class="o">[</span> ! -z <span class="nv">$projectdir</span> <span class="o">]</span>; <span class="k">then</span>
<span class="c">#strip projectname</span>
<span class="nv">file</span><span class="o">=</span><span class="sb">`</span><span class="nb">echo</span> <span class="nv">$file</span> | sed <span class="s1">'s/^[^-]*- //'</span><span class="sb">`</span>
<span class="nv">cwd</span><span class="o">=</span><span class="nv">$projectdir</span>
<span class="k">fi</span>
<span class="c">#run current file with ruby in KDevelop</span>
dcop <span class="nv">$1</span> KDevAppFrontend startAppCommand <span class="s2">"</span><span class="nv">$cwd</span><span class="s2">"</span> <span class="s2">"ruby </span><span class="nv">$file</span><span class="s2">"</span> <span class="s2">"false"</span></code></pre></figure>
<p>
As you can see, two DCOP calls are made to get the name of currently opened file and project directory and one DCOP call to execute a command inside KDevelop. Each DCOP call is a call to some part of KDevelop which exposes methods via interfaces. For example, startAppCommand is a method of KDevAppFrontend interface. There's no documentation about what is exposed, but just run kdcop tool to explore the complete list of interfaces and their methods and check how they work.
</p>
<p>
When you save your script in ~/.kde/share/apps/kdevelop/scripts and restart KDevelop, you'll be able to run your ruby programs having a C++ project opened like shown in the screenshot below.
</p>
<div class="figure" style="width: 470px;">
<a href="/blog/images/kdevelop_scripts.png"><img src="/blog/images/kdevelop_scripts_thumbnail.png" height="312" width="470" /></a>
<div class="figcaption">Custom Run Ruby Program script that extends KDevelop 3</div>
</div>
<p>
PS: this post was inspired when I was reviewing the KDevelop wishlist named <a target="_blank" href="http://bugs.kde.org/show_bug.cgi?id=56884">"Unable to execute Python scripts in a C/C++ project"</a>.
</p>
<p>
PPS: I do believe we can make scripting more powerful and easier with KDevelop4 and we have two great technologies - QtScript and Kross for that... but this is another story ;)
</p>
KDevelop4 Evolution: The UI, Part 22007-02-22T00:00:00-06:00http://www.alexdymo.com/blog/2007/02/kdevelop4-evolution-the-ui-part-2<p>
I know I promised to blog often about KDevelop4 progress, but I did not intend to write one more post today ;) The reason I'm doing this is that someone came today to #kdevelop IRC channel and asked whether we can open more than one embedded Konsole toolview in KDevelop. Of course my answer was "no sorry" because in KDevelop3 the usual modus operandi is 1 plugin => 1 view.
</p>
<p>
But this is not the case in KDevelop4 anymore. During architecture rework that was done by yours trully and Andreas Pakulat we introduced so-called "toolview factories". So each KDevelop4 plugin now registers a toolview factory and then the shell application uses the factory to add toolviews when necessary.
</p>
<p>
Until today, factories were used by mainwindow only once and only one toolview was visible on the screenshots from my previous post. Today I though that nothing prevents me from implementing a nice dialog to add new toolviews. After several minutes of hacking (actual view creation is only 2 lines of code thanks to
Sublime library, everything else I committed was the UI for the feature) I got this:
</p>
<div class="figure" style="width: 448px;">
<a href="/blog/images/kdevelop_sublime_ui2.png"><img src="/blog/images/kdevelop_sublime_ui2_thumbnail.png" height="312" width="448" /></a>
<div class="figcaption">KDevelop 4 with two File Manager toolviews</div>
</div>
<div class="figure" style="width: 448px;">
<a href="/blog/images/kdevelop_sublime_ui3.png"><img src="/blog/images/kdevelop_sublime_ui3_thumbnail.png" height="312" width="448" /></a>
<div class="figcaption">Adding new toolview in KDevelop 4</div>
</div>
<p>
As you can see, there's no restriction anymore to the number of toolviews. You want 10 konsole's - you'll
get them! Also Qt4 dockwidget management system allows to group dockwidgets in tabs so some toolviews can be nicely kept together.
</p>
<p>
Ok, that's all for today. Next time I'll leave UI and tell you about project management in KDevelop4. Stay tuned...
</p>
KDevelop4 Evolution: The UI2007-02-20T00:00:00-06:00http://www.alexdymo.com/blog/2007/02/kdevelop4-evolution-the-ui<p>
It's been a long time since I last talked about the progress on KDevelop4. This has to change ;) I'll try to keep everyone informed about recent developments in KDevelop4.
</p>
<p>
Last time our new user interface concept ("Sublime") was covered in <a target="_blank" href="http://commit-digest.org/issues/2007-01-07/">commit-digest article</a>. At that time only the sublime user interface library code was available. Today we have two major UI design decisions implemented.
</p>
<p>
First was the support for areas (the KDevelop's name for perspectives). Area in KDevelop is the set of views (documents) and toolviews (docks). At this moment KDevelop has only "coding" area, debugger and design areas will be used once respective plugins are ported to KDevelop4.
</p>
<p>
Second major design decision was multi-mainwindow operation. KDevelop3 with its only one mainwindow and non-detacheable toolviews was hardly optimal for dual monitor setups. KDevelop4 allows to have as many mainwindows as necessary.
</p>
<p>
The interesting thing is how multiple mainwindows and areas work together. Of course, different mainwindows can have different areas. Basically opening one more window with "debug" area will be the default way to do debugging. Same for Qt UI design - you will have new mainwindow with "design" area to work on Qt .ui files.
</p>
<p>
But that's not all we can do. Eclipse pretends it can show one perspective in two or more mainwindows. KDevelop4 now does that as well, except that it doesn't pretend the area is the same in all those mainwindows. You can duplicate mainwindow with "coding" area but what you get is cloned area called "coding (copy)" shown in the new mainwindow. This means all view/toolview layout and settings belong to the new cloned area so no confusion happens when you close your windows and save areas.
</p>
<p>
In the screenshot below, you can see one KDevelop program with three mainwindows. The background window shows "coding" area, two topmost windows show the clones of "coding" area with different view/toolview layout. So nothing will prevent from using KDevelop in dual-monitor setups anymore. "New Window" action from the window menu will duplicate the mainwindow and clone its area as necessary. The cloning operation is relatively cheap, resources are used just to create a new mainwindow and views inside it. No KDevelop plugin is loaded for the second time.
</p>
<p>
Toolviews that use plain Qt4 dockwidgets with no hacks are handy as well. Unlike KDevelop3, you can dock/undock and close them completely.
</p>
<p>
Splitting is of course in place too, but with slightly different logic than in KDevelop3. Now it behaves more like Kate when current view under the cursor is splitted rather than the whole region with views.
</p>
<p>
Don't bother looking at combobox that we currently have as a way to switch between views because it's our temporary replacement for a tabwidget. Everybody knows that tabwidget doesn't scale when lots of files are opened and everybody hates QTabWidget for extra bevel and border. We hated tabwidget too so we had to avoid it ;)
</p>
<p>
All that is implemented in KDevelop4 shell in <200 lines of code ;) Ok, ok, another 3k loc reside in <a target="_blank" href="https://projects.kde.org/projects/extragear/kdevelop/kdevplatform/repository/revisions/master/show/sublime">Sublime</a> library :) Sublime is the fourth UI library KDevelop uses and the third one I wrote. And I do hope it will be the last one. This time I believe I got it right. At least the code is surely better than infamous <a target="_blank" href="http://websvn.kde.org/branches/KDE/3.5/kdelibs/kmdi/">KMDI library</a> and Sublime certainly is more capable than my previous <a target="_blank" href="http://websvn.kde.org/branches/KDE/3.5/kdevelop/src/newui/">NewD aka SimpleIdeal</a> and <a target="_blank" href="http://websvn.kde.org/trunk/playground/devtools/ideal/">Ideal</a> libraries. Also this time the I wrote an extensive test suite to guarantee that UI is stable and bug-free.
</p>
<p>
So, enjoy the screenshot and don't just wait for KDevelop4. It is high time to do an IDE right and we know how to do that this time. What we need is you :) Join us to create the IDE of your dream!
</p>
<div class="figure" style="width: 451px;">
<a href="/blog/images/kdevelop_sublime_ui.png"><img src="/blog/images/kdevelop_sublime_ui_thumbnail.png" height="336" width="451" /></a>
<div class="figcaption">KDevelop 4 Sublime UI</div>
</div>
The Story About a Gentleman and Two Gardeners2006-12-22T00:00:00-06:00http://www.alexdymo.com/blog/2006/12/the-story-about-a-gentleman-and-two-gardeners<p class="small">
I was reading <a target="_blank" href="http://aseigo.blogspot.com/2006/12/website-does-not-make-you-smart.html">Aaron's blog</a> and that infamous <a target="_blank" href="http://osnews.com/story.php/16783/Has-the-Desktop-Linux-Bubble-Burst/">OSNews article</a> today when the story came into my mind. So I had no other choice other than to dump it out here )
</p>
<p>
Two gardeners quietly worked on their garden plots preparing them for the winter. Meanwhile one gentleman was passing by. This person more than once used a goodwill of gardeners who gave him the flowers from these gardens that he presented his belowed girlfriend. More recently one of the gardeners gifted him a bouquet from 3 scarlet roses, 5 neat carnations and 5 charming tulips. Another gardener (on old friendship) gave him 2 most surprising lily of the valley with 16 small flowers on a stem apex.
</p>
<p>
And this time gentleman also visited his fellow gardeners. But they had no flowers for him today. There was a December and all flowers had already finished blossoming. Our gardeners was assiduously working on the ground to grow up new, finer plants in the following year. The gentleman was certainly afflicted, but probably so much that he began to behave completely unpredictable. Having forgotten that literally several weeks ago here he had been done much good, he offended gardeners. He told them that they are exhausted and they have neither flowers nor enough energy to grow up new ones. He also declared that he would go to the nearest flower shop and would buy there any flowers he want. He said two newest, most perfect kinds of flowers ever received in biological laboratories should be on sale there soon. Even allmighty genetic engineering was applied to grow them. Further gentleman hinted gardeners they understand nothing in cultivation of flowers and they need to go to laboratory and to learn from there. He told that the best and most highly paid experts work in those laboratories and gratuitous work in own gardens can never yield the same or better results in any way (not saying that without a laboratory backup it is plain impossible to grow flowers)! Thereafter gentleman left without saying a goodbye mumbling "no, they will NEVER grow SUCH flowers, never, never...".
</p>
<p>
Gardeners glanced one to another and saw frustration in their eyes. During this one moment the former rivalry for the right to place their best flower on a table in a house of their lady-love was forgotten. And they was both desiring to console each other. Eh! - they said, sympathetically shrugged shoulders and got back to work. And this work soon took up all their attention - they forgot the gentleman, the insult in their hearts thawed out and their mind concentrated on that fine flower which they were going to grow up next year.
</p>
More Choice Is...2006-11-21T00:00:00-06:00http://www.alexdymo.com/blog/2006/11/more-choice-is<h2>Choices == Headaches ?</h2>
<p>
I've recently enjoyed <a target="_blank" href="http://www.joelonsoftware.com/items/2006/11/21.html">this article from Joel</a> :) No, the beginning of the article was sensible, but the end was...
</p>
<p>
If we follow him, then we must conclude we don't need shampoo for the hair and gel for the body. One is sufficient, and don't blame if you get a dandruff thereafter...
</p>
<p>
We also don't need a soup and the main course served to you one after another in the restaraunt. What you really need is some stuff mixed together in one plate with one device to eat instead of spoons, forks and knives... And yes, don't dare to ask for the desert because it was already included...
</p>
<p>
Also urge the authors to write only one book during their life. If you have something to say, say that once. And don't try to write about anything that was ever written before...
</p>
<p>Finally, don't even try to reboot your computer to boot Linux instead of Windows because Joel says the only thing you can ask your computer to do is to say "bye bye"...
</p>
<p>
I can continue my examples for ages.
</p>
<p>
What I would like to say here is that it is useful to get things to their extreme to study them (like <a target="_blank" href="http://en.wikipedia.org/wiki/Georg_Wilhelm_Friedrich_Hegel">Hegel</a> used contradiction and negation to study the properties of the unity). But it is not sensible to apply extremeness in every day though. And that's exactly what Joel does.
</p>
<p>
Looks like Barry Schwartz's book <a target="_blank" href="http://www.amazon.com/Paradox-Choice-Why-More-Less/dp/0060005688">The paradox of choice</a> became a catalyst for this article. I haven't read the book yet but I've listened to the Google video <a target="_blank" href="http://www.youtube.com/watch?v=6ELAkV2fC-I">The Paradox of Choice, why more is less</a>. The book is on its way from the online store already but from what I heard and read it's not going to be significantly different in core ideas from the lecture.
</p>
<p>
Barry's lecture was excellent and thoughtful but it seems people (and Joel too) missed "Choice is Good" part of it. The whole idea of "The Paradox of Choice" seems for me not "Choice is bad" or "Choice == Headaches" but rather "<i>Too much</i> choice is bad". Schwartz stresses many times but his message seems to be missing. People just like to pick up the easiest but extreme ideas.
</p>
<p>
Of course we shall remember of "too much choice is bad" and use that knowledge. But how to make sense from "Paradox of Choice" and not fall into utter oversimplification? I've thought about that for a while and this is what I think about it.
</p>
<h2>Overcoming the Paradox of Choice</h2>
<p>
First, let's look at "choice" in its everyday meaning. Say, we can have one of four things. Let's call them A, B, C and D. This statement in terms of logic would naturally be
</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="no">A</span> <span class="n">or</span> <span class="no">B</span> <span class="n">or</span> <span class="no">C</span> <span class="n">or</span> <span class="no">D</span></code></pre></figure>
<p>
Sometimes in the real life we can have not only one of these things but a combination of them. This would become
</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="no">A</span> <span class="n">or</span> <span class="no">B</span> <span class="n">or</span> <span class="no">C</span> <span class="n">or</span> <span class="no">D</span> <span class="n">or</span> <span class="no">AB</span> <span class="n">or</span> <span class="no">AC</span> <span class="n">or</span> <span class="no">AD</span> <span class="n">or</span> <span class="no">BC</span> <span class="n">or</span> <span class="p">.</span><span class="nf">.</span><span class="p">.</span> <span class="nf">or</span> <span class="no">ABCD</span></code></pre></figure>
<p>
That is the choice represented in terms of some formal system S based similar to (human) logic.
</p>
<p>
So far so good. Now let's imagine situation when we must have all A, B, C and D. We must have them maybe because they serve different purpose or just we like them, whatsoever. In terms of S this situation would become
</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="no">A</span> <span class="n">and</span> <span class="no">B</span> <span class="n">and</span> <span class="no">C</span> <span class="n">and</span> <span class="no">D</span></code></pre></figure>
<p>
Do you recognize the difference between choice (represented by "or" operator) and this phenomenon (represented by "and"). I'll give the new phenomenon the name "chance". Chance might not be the best word but it's colourful enough to stress my point here.
</p>
<p>
So we as people in our everyday life have "choices" and "chances". And that real world situation perfectly transforms into the world of computer programs. Sometimes we are given a choice to do either A <b>or</b> B <b>or</b> C <b>or</b> D, but sometimes we need a chance to do A <b>and</b> B <b>and</b> C <b>and</b> D. If we apply ideas from "The Paradox of Choice" we might want to not give our users too much choice. But at the same time we certainly want to give our users more chances! For example, if your media player don't have a playlist, it certainly revokes your chance. But if it has two or more playlists or player windows (remember noatun?) then it's giving you choice, in this case too much choice.
</p>
<p>
<i>From this perspective software development looks like the process of giving users maximum number of chances and at the same time not too much choice!</i>
</p>
<p>
You could say here that the chance and choice are elusive and sometimes it's not possible to draw a distinct border between them. Indeed, if we look at Joel's example of shutdown options - which ones are chances and which one are options that only give a choice. But nevertheless I believe there's a way to tell a difference between them. Applying common sense might help. Basically A and B takes place when:
</p>
<ul>
<li>A significantly differs from B</li>
<li>A serves the different purpose than B</li>
<li>A gives results different from B</li>
</ul>
<p>
It's possible to add more points here but I hope you get the idea. If you get <b>A and B</b> you're giving the user two chances which is good. If you get <b>A or B</b> you have to think whether you're giving your users too much choice. That is my simple rule!
</p>
<p>
Now let's get back to Joel. First he says there're 7 different shutdown options in Vista:
</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="no">W</span><span class="p">(</span><span class="n">sWitch</span> <span class="n">user</span><span class="p">)</span> <span class="no">L</span><span class="p">(</span><span class="no">Log</span> <span class="n">off</span><span class="p">)</span> <span class="no">C</span><span class="p">(</span><span class="n">loCk</span><span class="p">)</span> <span class="no">R</span><span class="p">(</span><span class="no">Restart</span><span class="p">)</span> <span class="no">E</span><span class="p">(</span><span class="n">slEep</span><span class="p">)</span> <span class="no">H</span><span class="p">(</span><span class="no">Hibernate</span><span class="p">)</span> <span class="no">S</span><span class="p">(</span><span class="no">Shutdown</span><span class="p">)</span></code></pre></figure>
<p>
He starts to place operators between them:
</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="no">CWL</span><span class="o">=</span><span class="p">(</span><span class="no">W</span> <span class="n">or</span> <span class="no">L</span> <span class="n">or</span> <span class="no">C</span><span class="p">)</span> <span class="no">R</span> <span class="no">EH</span><span class="o">=</span><span class="p">(</span><span class="no">E</span> <span class="n">or</span> <span class="no">H</span><span class="p">)</span> <span class="no">S</span></code></pre></figure>
<p>
Then he simply puts "or"'s everywhere and simplifies the expression to just one thing
</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="no">BBye</span><span class="o">=</span><span class="p">(</span><span class="no">CWL</span> <span class="n">or</span> <span class="no">R</span> <span class="n">or</span> <span class="no">EH</span> <span class="n">or</span> <span class="no">S</span><span class="p">)</span></code></pre></figure>
<p>
Was there a fault in his derivation of BBye? In my opinion yes because he considered the set of options from only one point of view - the "too much choice is less" point. He didn't try to look at those options as at chances. If we carefuly did, he might have ended up with something different, for example with
</p>
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="no">CWL</span> <span class="n">and</span> <span class="no">R</span> <span class="n">and</span> <span class="no">EH</span> <span class="n">and</span> <span class="no">S</span></code></pre></figure>
<p>
Of course, another interpretations are possible and you might derive another formula (like Vista developers who put "and"'s everywhere).
</p>
<p>
That's finally all I wanted to say today :) I hope you got a <i>chance</i> to read this post to the end and you understand my idea that as a software developer you don't have a <i>choice</i> between A (giving your users less choice) and B (giving them more chances) - because A and B are your <i>chances</i> ;)
</p>
White vs Black, Good vs Evil (RailsConf Report)2006-10-08T00:00:00-05:00http://www.alexdymo.com/blog/2006/10/white-vs-black-good-vs-evil-or-railsconf-report<p>
I thought I'd write some words about RailsConf Europe here. I'll do that now but there's one more important thing I want to tell people here apart from just giving an overview of the conference.
</p>
<p>
Speaking about RailsConf. There were a lot of interesting technical talks there covering present and future trends in Rails development. I especially liked the new movement towards REST and new developments on ActiveResource RESTful ruby client library which would make interaction between web resource (service) and clients a lot more straightforward than in usual SOAP/XMLRPC case. I even wrote a simple C++ library to do the same thing ActiveResource does. Also interesting was Thomas Fuchs' presentation about javascript testing framework (which supports Konqueror among other browsers btw). There were more cool talks but this blog article is not really about them.
</p>
<p>
We had two "political" talks at RailsConf both telling us that Rails is cool, Rails is great, Rails is fast, whatsoever. We were also told that any information about Rails' weakness, slowness is just plain FUD. For people not involved in Rails community I'll give several links.
</p>
<p>
<a target="_blank" href="http://www.joelonsoftware.com/items/2006/09/01.html">Here</a> and <a target="_blank" href="http://www.joelonsoftware.com/items/2006/09/12.html">here</a> Joel Spolsky says that Ruby and Rails are slow. <a target="_blank" href="http://web.archive.org/web/20070402233213/http://www.loudthinking.com/arc/000598.html">This</a> and <a target="_blank" href="http://web.archive.org/web/20070322074712/http://www.loudthinking.com/arc/000596.html">this</a> are the replies from David Hanssen.
</p>
<p>
You say, ok, this is just another "language war".
</p>
<p>
Yesterday I discovered another battlefield. Steve Yegge tries to say that Agile software development <a target="_blank" href="http://steve-yegge.blogspot.com/2006/09/good-agile-bad-agile_27.html">can be bad</a> and Agile is basically <a target="_blank" href="http://steve-yegge.blogspot.com/2006/10/egomania-itself.html">egomania and religion</a>.
</p>
<p>
You say, ok, this is not a language but rather methodology war.
</p>
<p>
But there's a common pattern between those political RailsConf talks, language and methodology wars. In those cases people are presenting things as the fight between Good vs Evil, Right Thing vs Wrong Thing, etc. And when people in both camps do that we have this ridiculous situation when thing "A" can be "Good" and "Evil" at the same time! And more importantly, if we listen to them we naturally hear that things can only be White or Black, there's nothing in between.
</p>
<p>
So Agile methodology can be "the only true way" if we listen to agilists or "egomania" if we listen to their counterpart. Now I want to ask you, people, is it really so? Is thing "A" doomed to be either White or Black? I really doubt that. "A" can work (or be good) for one group of people, can be bad for another and (sic!) there's a third group of people that don't care of "A" at all.
</p>
<p>
So there are always situations when you either like something or dislike or don't care. And that doesn't
automatically make "something" Good or Evil. Simply put, there're people who <i>want</i> you to think of White vs Black, Good vs Evil and they usually have good reasons to do so (like to get you or your money). Most <i>their</i> reasons and goals may not coincide with <i>yours</i>. Therefore I developed a habit of recognizing this pattern and analyzing all kind of information that comes in that "White vs Black" shell to assure I have my <i>own</i> opinion and make my <i>own</i> decisions and achieve my <i>own</i> results.
</p>
<p>
Certainly not all people have "Black or White" vision. When it comes for software development methodologies I always remember Barry Boehm and Richard Turner's "Balancing Agility and Discipline" book which is the good example of how can we extract the best thing from all methodologies by avoiding polar "White vs Black".
</p>
<p>
Same applies for programming languages. Instead of fighting the wars we'd better benefit from all the languages. And here I must admit I'm really sad to see the proposal to choose the only one scrtipting language for KDE. Do you recognize the pattern of "White vs Black" here? I do...
</p>
Strange Loops, Self-References? Self-Reflection?2006-10-08T00:00:00-05:00http://www.alexdymo.com/blog/2006/10/strange-loops-self-references-self-reflection<p>
Finally I found the bravery to get Hofstadter's <a target="_blank" href="http://en.wikipedia.org/wiki/G%C3%B6del,_Escher,_Bach">GEB (Gödel, Escher, Bach)</a> book from the shelf and start reading it. To this moment I've only read an introduction and suddenly realized that those strange loops and self-references that the author thinks of as the core to understand the consciousness and "I-ness" of a human being feel so familiar for me. I've been teaching AI for two years and I always stress the self-reflection as the only one important thing that differentiates humans from (for example) computer programs (in their current stage). Good to know you're not alone in your thoughts (and you're not the first one). Now I got really interested in reading the book till the very end :)
</p>
One September, Two Conferences. Part I: aKademy2006-10-07T00:00:00-05:00http://www.alexdymo.com/blog/2006/10/one-september-two-conferences-part-i-akademy<p>
A lot of water flew away since I promised to blog about RailsConf Europe 2006. And one major event started and finished also during that time - the aKademy conference. So during one September I managed to attend two software conferences which I haven't covered in my blog yet.
</p>
<p>
So here comes by aKademy report.
</p>
<p>
Everybody who blogs about aKademy agrees that aKademy was a great event and everybody thanks to Marcus and the guys in blue. All I can do is just add my personal thanks to all aKademy team who did a great job and were really supportive when I was bugging with my usual give-me-my-visa-paper requests!
</p>
<p>
As usual at aKademies, I didn't code much but rather spent a lot of time communicating with people. What's important is that this time we (as in KDevelop team) managed to solve (or at least discuss) quite a lot of problems that bothered us for ages. One of the most important issue was the UI design for which we have now more-or-less clear vision and even the prototype I wrote in Ruby in a couple of minutes. Once I'll find time to transfer the vision to paper (or rather email) it will appear at kdevelop-devel mailing list for discussion. All I can say now is that it seems we found rather cool compromise between UI simplicity and feature-full bloatness. What we did is basically we tried to find an intersection between ideas behind MacOSX's Finder and XCode, Eclipse's perspectives and splitted-tab layouts, KDevelop's Ideal toolviews. Such an intersection while not being radically innovative (like ZUI, for example) will hopefully give us a powerfull UI that no IDE has.
</p>
<p>
Of course, UI ideas were not the only thing we produced at aKademy. kdevelop-pg parser generator has been pushed to its full extent because Jakob started to (re)implement c++ parser with it. Adam put a lot of work to solidify the our code models stuff, and also I started to write a new model-based filemanager (already in trunk). Lot of other things happened too which I can't remember right now (probably because I spent many nights partying in Irish pubs;)).
</p>
<p>
Another thing we decided upon is that we're going to have a KDevelop conference/hacking session next year. We had it back in 2005 but missed this year and we certainly don't want to miss another year. So during KDevelop BoF it was decided to try organizing such event in mid-summer 2007. At this time we know of two possible candidates for the location. One is Boston, USA and another is the south cost of <a target="_blank" href="http://en.wikipedia.org/wiki/Crimea">Crimea</a>, Ukraine. In both cases we'd need some sponsorship so if you know how we can get it I'd much like to hear about that.
</p>
<p>
After aKademy I spent three days travelling the Ireland. I visited Killarney and made my way through The Ring of Kerry, I was in Cork and saw the Blarney Castle and I spent a day in Galway and Aran Islands. I got too many impressions to describe all them here. What I can say is that Ireland is certainly one of the best places of the world I ever visited.
</p>
Traveling the World2006-09-22T00:00:00-05:00http://www.alexdymo.com/blog/2006/09/traveling-the-world<p>
I've too tired today to hack and therefore decided to blog a bit. I'm sitting at the Budapest airport waiting for my flight to Dublin which should be my last flight for the next week. And that week I hope to spend in Dublin without <i>any traveling</i>.
</p>
<p>
Ok, ok. I do like traveling, I like flying but after going from Mykolayiv to Kyiv (500km) to apply to Irish visa, going back home, going to Kyiv again to catch the flight to London, going back from London to Kyiv, then traveling Ukraine with the usual "give me my visa" route again (Kyiv-Mykolayiv-Kyiv-Mykolayiv) I feel like a bit tired ;) I've already covered 6x500=3000 km of Ukrainian territory and I observed each kilometer from the window in the bus! Yeah, yeah, you don't travel Ukraine by plane - it's extremely expensive.
</p>
<p>
But all that had positive result - I have my visa and I'm already heading Dublin for aKademy! By the way I also visited the RailsConf Europe in London which should really be the topic of my next blog.
</p>
The Case of Ideal UI Mode2006-09-04T00:00:00-05:00http://www.alexdymo.com/blog/2006/09/the-case-of-ideal-ui-mode<p>
In Qt 4.2 trolls did amazing job at improving dockwidgets. They even added the tabbing feature so that you can group docks into the one tabwidget by just dragging one on top of another.
</p>
<p>
A couple of months ago I thought that would replace "Ideal buttonbars" - those groups of buttons you can see in KDevelop and Quanta in Ideal UI mode at the window borders. But today I think that buttons should still stay if we want the Ideal mode like we had before. We just don't have enough control of those new tabs and can't make them do what we want (i.e. hide toolviews). Also they seem to be always horizontal which is a pity because we got used to vertical rows of buttons.
</p>
<p>
So, <a target="_blank" href="http://static.kdenews.org/jr/kdevelop4.png">this</a> and <a target="_blank" href="http://members.optusnet.com.au/%7Ehamishrodda/kdev-codecompletion2.png">this</a> is how KDevelop4 with toolviews looks now. Notice that KDevelop4 looks exactly like Qt Designer - all toolviews are just plain dock widgets. And <a target="_blank" href="http://web.archive.org/web/20021130181914/http://kdevelop.org/graphics/screenshots/3.0/gideon-idealmode-automake.png">this</a> is how Ideal mode looked before. Notice the "button bars" at the bottom, left and right window sides.
</p>
<p>
The question now is Qt Designer-like interface good enough or is it better to back to good old Ideal UI with buttonbars? I don't have the good answer, please share your opinion with us at kdevelop-devel@kdevelop.org or just leave a comment here.
</p>
<p>
For now I'll continue working on new Ideal library. I miss Ideal too much ;)
</p>
It's Good to Be Back2006-09-04T00:00:00-05:00http://www.alexdymo.com/blog/2006/09/it-s-good-to-be-back<p>
Yes, I'm back after not committing for a month and I'm back with the new ruby parser for KDevelop. The parser is of course not finished and it barely parses simple ruby code but it is there. I'm looking forward to implementing some real ruby language support features. First will most likely be a code model (which will automatically give nice code view with classes, methods, etc.). As it turned out our kdevelop-pg parser generator framework makes it dead easy to do that. And its not only the kdevelop-pg that helps, the whole KDevelop4 architecture makes the process a lot faster.
</p>
<p>
Previously when you wanted to implement the language support in KDevelop, you should have done:
</p>
<ol>
<li>lexer to tokenize the source</li>
<li>parser to transform the token stream into the AST</li>
<li>AST walker to make it possible to do something with it</li>
<li>AST parser to create the abstract code representation - the code model</li>
<li>"background parser" to execute the parser as a background job and fill the code model</li>
<li>language support part to run the background parser</li>
</ol>
<p>
Today you still have to write the lexer and the parser, but you no longer have to care much about the AST and AST walkers(visitors) because they are generated for you. And once the code model definition file is written, the entire code model will be generated too. kdevelop-pg does all those things.
</p>
<p>
From the other side, KDevelop4 has more generic language support and abstracted background parser so you can just tell the language support in several lines of code to use your parser. There's no need for language support code duplication which was so common in KDevelop3.
</p>
<p>
Simply put, points #3 and #5 are automatic now, #2, #4 and #6 were made easier. At this point I'm wondering if it is feasible to eliminate the #4 completely, i.e. implement automatic generation of code model binder which traverses the AST and fills the codemodel with items.
</p>
<p>
From what I can see KDevelop4 will really shine in the area of language supports. blackarrow is doing <a target="_blank" href="http://www.kdedevelopers.org/node/2311">wonders with C++</a>. jpetso completed his summer-of-code csharp project and the excellent csharp support is already in SVN. manyoso added java support that uses the complete java parser jpetso created last year. And if we add up language-neutral refactoring (which was another SOC project) to the stack, we would get the idea of how cool KDevelop4 is going to be!
</p>
<p>
It doesn't look like I'm short of cool material for my <a target="_blank" href="http://conference2006.kde.org/conference/talks/15.php">aKademy presentation</a> :) Rock on, KDevelop!
</p>
Real Life Happens2006-08-12T00:00:00-05:00http://www.alexdymo.com/blog/2006/08/real-life-happens<p>
That's what I heard from manyoso lately and he was damn right. This indeed happens and I see <a target="_blank" href="http://www.kdedevelopers.org/node/2213">I'm not the one</a>. Well, my day this week consisted of 16 hours and if I substract two hours I spend to have some food and read my mail I'll get same 14 working hours as geiseri had.
</p>
<p>
But I'm having that since February and I can't see the way to avoid this in the next 6 months too so I should live with that. But there's one <a target="_blank" href="http://en.wikipedia.org/wiki/Cicero">Cicero</a>'s statement that consoles myself. He said once that if we avoid the weight of cares then we miss the prowess. And indeed what would I have done and what kind of man would I be without my cares ;)
</p>
<p>
Speaking about cares, I had plenty of them recently. Just to mention the first Ruby/Rails meetup I and my fellow <a target="_blank" href="http://amanzyuk.blogspot.com/">Anton</a> organized here in Mykolayiv. The cool thing is that event was financed by the company I work for now and we managed to rent the good conference hall and gather the most interesting people there.
</p>
<p>
Anton did extremely well at organizing so my job was only to enjoy and educate people who came to this event. Hopefuly I did it not so bad ;) I was speaking on Ruby and Rails, showed live demos writing some real Ruby and Rails code and I was overwhelmed with questions during the whole event. I thought 3 hours would be enough and I was surprised to be proven wrong :) Four hours the people tortured me asking more and more (especially about Ruby language itself) and then after the event was finished they were continuing torturing me in the bar nearby till late evening :)
</p>
<p>
As far as I can see, people who work in software development industry in my town are really interested in something new and innovative. This is nothing surprising.
</p>
<p>
What's more surprising that engineers who worked in the industry at least for two years are more interested in technologies than students in my university. I've been working at the university for four years and I can see this tendency growing in last two years. Most CS students pick one thing they think will bring them money and get stuck (no it's not Java, here in Ukraine we all like Delphi). On their second year they already know (or think they already know) how to program in Delphi/ObjectPascal/whatever and stop listening to their teachers. Of course they miss algorithms, parsing theory, OO programming modelling and lots, lots of really necessary things including two Unix courses we have in our university. Of course they don't hear me telling them about the beauty of Unix, Ruby, whatever else.
</p>
<p>
And I now kinda enjoy when I see same people to have interest in all those things they missed at the university after spending a couple of years doing real life work. Why does that happen? Only recently I found out an answer. The very simple answer. Money is the answer.
</p>
<p>
Typical ukrainian student grows in the environment where he constantly lacks money. And after they are able to develop another cool accounting application in Delphi they find out they already can earn quite a lot of money. In fact, that amount can be already bigger their teachers get from the university. This convinces them the university teachers are worthless and they don't believe in their authority anymore. Heh.
</p>
<p>
Of course thereafter they grow, they start think more about their profession, maybe read <a target="_blank" href="http://steve-yegge.blogspot.com/">blogs like this one</a> (I was shown this several days ago). And their interest level actually starts growing and they start growing themselves at the same time. I wish our students looked one step further or just believed their teachers.
</p>
<p>
Hmm, why am I writing all that? Maybe I'm just ranting. But maybe that's just my own discourse on duties. Do not neglect your duties, even if they sound wrong if you're student and think the world domination is one step ahead. Just believe me, <i>the real life happens</i> and you will not have enough time to educate yourself after the university. I know it. Don't repeat my mistakes. I know how hard is now to extract just two hours from your daily schedule to learn new language or to read new book.
</p>
Moved!2006-07-27T00:00:00-05:00http://www.alexdymo.com/blog/2006/07/moved<p>
I've recently moved into the new appartment. The move itself was wery taxing and took more than a week (mostly because all my family including grandparents and parents was moving). But we finally made it and now I enjoy my new room. Today I've taken some pictures of alpha version of the room.
</p>
<div class="figure" style="width: 449px;">
<a href="/blog/images/view2_small.1.png"><img src="/blog/images/view2_small.1_thumbnail.png" height="336" width="449" /></a>
<div class="figcaption">New appartment: work place</div>
</div>
<div class="figure" style="width: 449px;">
<a href="/blog/images/view3_small.2.png"><img src="/blog/images/view3_small.2_thumbnail.png" height="336" width="449" /></a>
<div class="figcaption">New appartment: book shelf</div>
</div>
<div class="figure" style="width: 449px;">
<a href="/blog/images/view1_small.1.png"><img src="/blog/images/view1_small.1_thumbnail.png" height="336" width="449" /></a>
<div class="figcaption">New appartment: sofa</div>
</div>
<p>
Some furniture is not yet there and ADSL connection is still missing but we're in progress ;) At least this "alpha" version is already capable of containing all my library. In my old appartment those books were laying here and there without any chance of finding the book, now things are a lot better!
</p>
<p>
Now that I'm getting back to the life again I'll start working on KDevelop again. Last week I didn't commit at all and that doesn't make me feel good. I'm going to restore the good old habbit of committing stuff every day again ;)
</p>
Hojotoho! Heiaha!2006-06-28T00:00:00-05:00http://www.alexdymo.com/blog/2006/06/hojotoho-heiaha<p>
Today I finally finished listening to the Wagner's <a target="_blank" href="http://en.wikipedia.org/wiki/Der_Ring_des_Nibelungen">"Der Ring des Nibelungen"</a> opera (CD recording only alas). The complete Ring Cycle took me exactly four days to finish listening but I don't regret of any single hour spent! Only now I think I can understand Nietzsche's <a target="_blank" href="http://en.wikipedia.org/wiki/The_Birth_of_Tragedy_Out_of_the_Spirit_of_Music">"The Birth of Tragedy out of the Spirit of Music"</a> better. Indeed when Dionysian and Apollonian origins join they form something that is equally solemn (the music) and tragical (the epic) but leaves you anyway exhilarated.
</p>
<p>
I'm still sitting here, humming Hojotoho! ;) and reading more about Nibelung. Honestly, these days I discovered a previously unknown to me Norse mythology and epic. I didn't think of such rich mythical worlds existed outside the Greece. Obviously, I need to learn more (just ordered a book with West European epics collection, it will be a nice addon to my collection of Greek, Roman and Slavonic mythology).
</p>
I'm Very Proud of...2006-06-27T00:00:00-05:00http://www.alexdymo.com/blog/2006/06/i-m-very-proud-of<p>
...<a target="_blank" href="http://www.conti-online.com/generator/www/de/en/continental/contisoccerworld/themes/60_2006_fifa_world_cup/02_groups/group_h/wm_team_ukraine_en.html">these guys</a>!!! Tough play, steel nerves and luck - they demonstrated everything today :) I'm proud!
</p>
<p>
By the way, this is IIRC the best result ex-USSR football team ever showed since 1970 when <a target="_blank" href="http://en.wikipedia.org/wiki/USSR_national_football_team">USSR entered the quarterfinals</a>. Hurray to <a target="_blank" href="http://en.wikipedia.org/wiki/Ukraine_national_football_team">our team</a>!!!
</p>
Ooh!2006-06-23T00:00:00-05:00http://www.alexdymo.com/blog/2006/06/ooh<p>
Today Ukrainian football team finally fulfilled my expectations! They will be playing in 1/8 final! They did it not without trouble especially thanks to Trabelsi from Tunisia's team. Even his name reminds of troubles ;) He was the best player today probably.
</p>
4 In - 4 Out !!!2006-06-19T00:00:00-05:00http://www.alexdymo.com/blog/2006/06/4-in-4-out<p>
Now that was the real football game. 4:0 is what I wanted to see from Ukrainians today and they did it :) Keep going! Let us enjoy our first world championship!
</p>
My Job Is My Passion or KDevelop Sponsorship!2006-06-16T00:00:00-05:00http://www.alexdymo.com/blog/2006/06/my-job-is-my-passion-or-kdevelop-sponsorship<p>
It does look like I've finally reached the state where my job became my passion. You doubt it's possible? I have a counter-evidence :)
</p>
<p>
From this very moment <a target="_blank" href="http://www.pluron.com">Pluron</a> company is starting sponsoring me to work on KDevelop. I'm allowed now to spend part of my work time on KDevelop! That's so increadibly cool! We'll make the announcement soon, but I can't wait to tell about that ;)
</p>
<p>
In Pluron we develop Ruby/Rails project and of course use KDevelop as our IDE, so my primary target would probably be to make KDevelop4 shine as a Ruby IDE but of course I'll continue my work on UI and other things. This is a good chance to make all the difference ;)
</p>
<p>
Thanks to Pluron and special thanks to Gleb Arshinov, company founder and great open source supporter who made this possible!
</p>
<p>
PS: this is a shameless plug, but if you live in Ukraine, passionate about open source, ruby and/or ruby on rails or just look for a cool place to work, consider <a target="_blank" href="http://www.pluron.com/jobs.html">joining us</a>.
</p>
Eh!2006-06-14T00:00:00-05:00http://www.alexdymo.com/blog/2006/06/eh<p>
Today promised to be a good day but to my surprise it was not. Oh! Ukrainian football team did not make this day any better too. Catastrophic gameplay plus one unfair penalty made them lose with an awful score! Ok, they will have at least two another opportunities to win ;)
</p>
Rac(c)'ing the Ruby2006-05-30T00:00:00-05:00http://www.alexdymo.com/blog/2006/05/rac-c-ing-the-ruby<p>
As work on my ruby-based wiki parser continues, I started to have more and more fun with it. Today I travailed, trying to get RACC to fit my needs and discovered lots of interesting things about it. If you don't know the RACC - this is YACC for ruby (but without Lex/Flex companion ;) to make you get more fun while you write hand-made lexer).
</p>
<p>
Some time ago I discovered that RACC has one trouble. When a rule has a code block executed before entering the rule, usual numbering for "val" array becomes broken.
</p>
<p>
For example, if we have a rule:
</p>
<figure class="highlight"><pre><code class="language-antlr" data-lang="antlr">foo: moo boo
{ result = val[0] + val[1] }
;</code></pre></figure>
<p>
The result of the rule is computed by calculation of a sum of right part nonterminal's return values.
</p>
<p>
But if we use the rule like this:
</p>
<figure class="highlight"><pre><code class="language-antlr" data-lang="antlr">foo:
{ result = "I break " }
moo boo
{ result = val[1] + val[2] }
;</code></pre></figure>
<p>
then we suddenly break "val" numbering scheme. Instead of "val[0]" and "val[1]" we should reference nonterminal's return values using "val[1]" and "val[2]". Apparently the code block before nonterminals breaks. Not a grave bug... but costed me several minutes to get an idea of what is happening.
</p>
<p>
But today I glanced over racc output file and was stunned! RACC effectively considers these two rules as equal:
</p>
<figure class="highlight"><pre><code class="language-antlr" data-lang="antlr">foo: {} moo boo ;
foo: _any_nonterminal_ moo boo;</code></pre></figure>
<p>
and adds extra rule that breaks not only val[] numbering ;)
</p>
<p>
I implemented two examples (first is broken and second is ok) and studied them.
</p>
<figure class="highlight"><pre><code class="language-antlr" data-lang="antlr">/* Example 1: */
a: {} a B
| A
|
;
/* Example 2: */
a: a B
| A
|
;</code></pre></figure>
<p>
I found that the source of the problem was that for {} a special nonterminal @1 will be created and artificial rule like
</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">@1 -> ε</code></pre></figure>
<p>
will be added. But given input token A the parser allows both reducing the rule above and shifting A. Thus we have shift/reduce conflict that RACC hapily reports.
</p>
<p>
Another issue is endless loop: if the input is B then the parser reduces using the artificial rule and keeps reducing it forever. That happens because it always observes the empty symbol (together with B) and has the rule to reduce it. Ironically, another competing rule to reduce (say hello to reduce/reduce conflict!!!)
</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">a -> ε</code></pre></figure>
<p>
stays after the first one and is not selected for reduce.
</p>
<p>
To summarize, we have two shift/reduce conflicts and one reduce/reduce conflicts just because of the block. RACC is either was not designed to have before-rule blocks or the developers had something else in their mind. Alas, I haven't found any references to this issue yet.
</p>
Environment and Changes2006-05-30T00:00:00-05:00http://www.alexdymo.com/blog/2006/05/environment-and-changes<p>
I hope people are not yet bored with my Ruby blog posts. It's just so cool to get into the new environment that makes you care about things you've never cared before. Ruby was definitely something I knew about but never enjoyed as much as I do now. Same applies to my new Ruby/Rails job. I don't think I would read a vendor branches chapter from the svn book without it :) Of course, the chapter is only the example, there were (and are) more interesting things.
</p>
<p>
I started to write long posts not so long time ago, so let me keep this tradition and mention my search for elegant LALR grammar for lists of nested lists.
</p>
<p>
Let's say we need to parse token stream:
</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">BBABBBABB</code></pre></figure>
<p>
as the list of two items with one nested list inside. The ideal result would look like
</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="o">(</span>B <span class="o">(</span>BAB<span class="o">)</span> B<span class="o">)</span> <span class="o">(</span>B <span class="o">(</span>BAB<span class="o">)</span> B<span class="o">)</span></code></pre></figure>
<p>
The grammar that comes to mind is:
</p>
<figure class="highlight"><pre><code class="language-antlr" data-lang="antlr">list: item
| item list
;
item: B list B
| A
;</code></pre></figure>
<p>
This grammar is ambiguous and has one shift-reduce conflict (it's not clear whether we shall reduce finishing the list or shift starting it). All LALR parser generators would resolve the conflict to shift over reduce and would in fact make our parser fail. So we need to say "prefer reduce". I have several solutions but the cleanest (from the parser's viewpoint) is to add an artificial terminal, say X, denoting the beginning of the list. This grammar has no conflicts at all:
</p>
<figure class="highlight"><pre><code class="language-antlr" data-lang="antlr">list: item
| item list
;
item: X B list B
| A
;</code></pre></figure>
<p>
This solution is good for parser but hacky for lexer which has to supply this fake terminal ;) Well, I'm sure there are better solutions but I'm completely missing them today.
</p>
<p>
Addon: of course, if we allow to modify the lexer, something like this would be even better:
</p>
<figure class="highlight"><pre><code class="language-antlr" data-lang="antlr">list: item
| item list
;
item: B_START list B_END
| A
;</code></pre></figure>
What a Night!2006-05-26T00:00:00-05:00http://www.alexdymo.com/blog/2006/05/what-a-night<p>
Yesterday night was one of those rare productive KDevelop hacking nights. Last time I had it several month ago. Looks like I'm getting older ;)
</p>
<p>
Anyway, I managed to finally introduce "good-enough" keyboard navigation for KDevelop UI. Changes went to the Simple Ideal UI mode (which is now default in KDevelop 3.4).
</p>
<p>
Of course, you have Ctrl+Alt+Shift+(B|R|L) keys to activate toolviews at the bottom, right and left. But contrary to KMDI, if the toolview is already active and not focused, it will just get the focus, and not close. Also Alt+(Left|Right) is used for both toolview and editor switching depending on which of those have focus.
</p>
<p>
That's not everything, of course. You can right-click at the toolview button and assign an accelerator number to it and switch to and from the view using Alt+<Number> shortcut (like in IntelliJ IDEA).
</p>
<p>
I'm not sure those changes solve all keyboard navigation problems we have, but at least 3.4 is going to be an improvement in this area. Expect better UI navigation model from me only for KDevelop 4
</p>
<p>
PS: did I say that Simple Ideal will store the toolview layout (opened/closed state, sizes)?
</p>
SuSE 10.12006-05-25T00:00:00-05:00http://www.alexdymo.com/blog/2006/05/suse-10-1<p>
Today I joined the SuSE 10.1 users community. I've installed it on my laptop replacing 9.3. Everything went fine and pretty fast (yes, I've turned beagle off at installation :) ). Problems came thereafter. Networkmanager + konqueror combination became to annoy me though. When networkmanager thinks it's disconnected from my local home network, konqueror disagrees to go to any url, even local. For example, it does not connect to localhost:3000 where my rails app lives. Firefox does not care about networkmanager apparently and works fine. Otherwise, the system looks and works ok so far. I do appreciate working suspend-to-disk and ultra-fast KDE startup!
</p>
KDevelop SOC: 1->32006-05-25T00:00:00-05:00http://www.alexdymo.com/blog/2006/05/kdevelop-soc-1-3<p>
Looks like this time we did it right! KDevelop will have 3 summer of code projects contrary to only 1 last year :) This is awesome!
</p>
<p>
The overall number of KDevelop applications was 15 and 5 of them were inside the first 50. The interesting thing is that 6 proposals were aimed for "C# parser/integration". Ok, people, we finally began to understand. You need C# support in KDevelop, the thing we (KDevelop devels) has not been paying attention to for several years ;)
</p>
<p>
I wish we had higher limit for KDE projects, but in any case it's great to see 24 nice applications approved! Thanks to Google again!
</p>
<p>
Ok, now back to work. It's going to be a "hot" summer for me cause I'm mentoring two of our three students. Another one goes to our 4.x series maintainer Matt Rogers. Carsten Pfeiffer, Vladimir Prus and Andras Mantia kindly agreed to help us as co-mentors. Thanks :)
</p>
Ruby/Rails Job. Parsing Mediawiki2006-05-16T00:00:00-05:00http://www.alexdymo.com/blog/2006/05/ruby-rails-job-parsing-mediawiki<p>
As probably some of you already know, I've got a new cool job recently (no, the university is still my employer, that's the job I do after the Uni). My new duties are Ruby and Rails application development :) Some things I do now are free software, some not. One of the free software things is <a target="_blank" href="http://mediacloth.rubyforge.org/">MediaCloth</a> - MediaWiki syntax parser and HTML generator which I started to implement last week.
</p>
<p>
I don't know if there are true mediawiki parsers out there, but this one is "true". It has handwritten lexer, LALR Yacc-generated parser, AST and HTML generator (which is just another AST walker). AFAIK the "official" parser is regexp-based.
</p>
<p>
Development of the parser was much fun for me and made me think about some apparently simple things that suddenly became more and more complex. The one of such things was the discovery that MediaWiki syntax is actually context-sensitive. Heh, that's why people like it! We people hate html and xml in general. It's complex for us but simple for our computers because it's context-free. But we do like context-sensitive languages, we apparently have good parsing mechanisms for them.
</p>
<p>
Let's look at simple list written in wikimedia syntax:
</p>
<figure class="highlight"><pre><code class="language-moin" data-lang="moin"> * a
* b
* c</code></pre></figure>
<p>
This is normal flat bullet list and its parsing does not imposes any difficulty. The context-insensitive grammar below will parse the list:
</p>
<figure class="highlight"><pre><code class="language-text" data-lang="text">List -> Item List
| ε
Item -> * ID</code></pre></figure>
<p>
Here ID is any terminal symbol like "a", "b" or "c" above. The left derivation of the list from the root nonterminal will look like:
</p>
<figure class="highlight"><pre><code class="language-text" data-lang="text">List => Item List => *a List => *a Item List =>
=> *a *b List => *a *b *c List => *a *b *c</code></pre></figure>
<p>
The example above would have persuaded you that wiki language is context-insensitive and thus simple (at least in computer's sense of simple). But we all know lists can be nested like this:
</p>
<figure class="highlight"><pre><code class="language-moin" data-lang="moin"> * a
** 1
** 2
* b</code></pre></figure>
<p>
Ok. Now we have a parsing problem. The grammars that come to mind are not context-insensitive anymore. One of such possible grammars is shown below:
</p>
<figure class="highlight"><pre><code class="language-text" data-lang="text">List -> Item List
| Sublist List
| ε
Item -> * ID Level1
Level1 Sublist -> ** ID Level1
Level1 Item -> Item
Level1 List -> ε</code></pre></figure>
<p>
With this grammar we can derive our list from the root nonterminal with left derivation like this one:
</p>
<figure class="highlight"><pre><code class="language-text" data-lang="text">List => Item List => * a Level1 List => * a Level1 Sublist List =>
=> * a ** 1 Level1 List => * a ** 1 Level1 Sublist List =>
=> * a ** 1 ** 2 Level1 List => * a ** 1 ** 2 Item List =>
=> * a ** 1 ** 2 * b List => * a ** 1 ** 2 * b</code></pre></figure>
<p>
If we look at the grammar closely, we would notice it's actually context sensitive. Even more closer look would reveal that the grammar is recursively enumerable because the right part of production is longer than its left part:
</p>
<figure class="highlight"><pre><code class="language-text" data-lang="text">Level1 Sublist -> ** ID </code></pre></figure>
<p>
From the all discussion above it turns out that the mediawiki language is not only context-sensitive, but recursively enumerable. In computer world such languages are usually considered "hard" and "complex". The interesting thing is that people obviously disagree with such definition for complexity. A person does have an effective mechanism to parse context-sensitive languages and therefore loves wiki formatting!
</p>
<p>
Heh, probably for the time we use Turing machines our computers will still fail at those apparently simple tasks like language parsing. You can believe in Gödel's hypothesis or not, but people still have more computation power than their computers ;)
</p>
Summer of KDevelop Code: The Last Call!2006-05-02T00:00:00-05:00http://www.alexdymo.com/blog/2006/05/summer-of-kdevelop-code-the-last-call<p>
The deadline for Google SOC applications is really soon (TM) so I'm here to invite you to join KDevelop team this summer and have a lot of fun!
</p>
<p>
We have a lot of interesting proposals in our website for you and apart from C# support they are all still free.
</p>
<p>
If you are student, KDevelop user and know programming - join! Don't worry about KDevelop codebase being large. It's modular and we will give as much help as we can.
</p>
<p>
The greatest project proposals are "Unified code/header editing" and "Next-gen version control" but you're free to make your own. Everything that is about programming language parsing, code completion and refactoring is always welcome! Support for a build system of your choice also looks like a good project to hack on.
</p>
Ruby. Syntax. Taste2006-05-02T00:00:00-05:00http://www.alexdymo.com/blog/2006/05/ruby-syntax-taste<p>
Oh, Ruby has become a hot topic on KDE blogs again :) Let me also join with my 2 <a target="_blank" href="http://en.wikipedia.org/wiki/Ukrainian_hryvnia">kopiykas</a>.
</p>
<p>
My taste of programming languages tells me Python is not good for me. I don't want to claim here Python is bad, it's just not the language of my choice.
</p>
<p>
There are two good things about Ruby. First - when I've started learning both Python and Ruby year ago Ruby was perceived "cool". Today I work on Ruby (and Rails) projects half-time and the language is still "cool". There's nothing like this feeling to be commited to something cool :) Good advertising you say. Yep, pretty good but there's also something inside me telling Ruby is cool ;) Cornelius described that feeling in a more precise way.
</p>
<p>
The second good thing I found about Ruby is syntax. Surprise! Looking at the blogs and comments most people complain about perlish syntax. It's probably possible to write perlish code in Ruby but I barely see anyone does it. For example, what's wrong with <a target="_blank" href="http://www.kdedevelopers.org/node/1968">Richard Dale's code</a>?
</p>
<p>
Honestly, syntax matters were the first to take my attention away from Python. I like <i>def initialize</i> more than <i>def __init__(self):</i>. I also like code blocks ending with <i>end</i> and not just backward indentation. Writing <i>self.foo</i> disturbs me more than <i>@foo</i>. My list of preferences is long :)
</p>
<p>
Ok, I'm sure Python is a great language but I like Ruby more!
</p>
The End of Craziness. Episode IV. Tomorrow!2006-03-25T00:00:00-06:00http://www.alexdymo.com/blog/2006/03/the-end-of-craziness-episode-iv-tomorrow<p>
Ok, thanks to all Gods people ever beleived in! Ukraine is going to have parliament elections tomorrow. For the fourth time for the last 14 months we are going to elect somebody to govern us. I really hope that will put an end to this endless flow of political advertisement, speeches and other craziness.
</p>
<p>
Too many politics, too many politicians for poor Ukraine! Ok, we have the fourth elections tomorrow, and I'll vote for nobody the fourth time - just to send my message to those politicians (both from "orange revolution" and "opposition" camps) - you are not good to become presidents, deputies, majors, etc.
</p>
ADSL2006-03-09T00:00:00-06:00http://www.alexdymo.com/blog/2006/03/adsl<p>
Gee, at last I got a permanent internet connection. Looks like the progress has finally made its way to my home :) It's an <2Mbit ADSL connection with 1.5Gb of prepaid traffic for 183 UAH (~30 euro) per month. Quite expensive but at least I won't be counting minutes of damn slow dialup ;)
</p>
<p>
What's more interesting, is that a device which I am connected through is a DLink 500T ADSL router with <i>MontaVista Linux</i> operating system inside. It's just amazing how can a full-blown Linux system with apache, firewall, etc. live and work fast on a small flash drive :)
</p>KOffice Design Competition2006-03-06T00:00:00-06:00http://www.alexdymo.com/blog/2006/03/koffice-design-competition<p>
Oh, this competition project turned out to be very fruitful! I wish we could do that kind of UI design competition for KDevelop. For now we don't have $1000 but I do appreciate everybody sending me their ideas of IDE design and workflow ;)
</p>
Happy "Old" New Year2006-01-13T00:00:00-06:00http://www.alexdymo.com/blog/2006/01/happy-old-new-year<p>
Yep, New Year has come to Ukraine for the second time! It was 1918 when Soviet Russia adopted Gregorian calendar. And the difference between Julian and Gregorian calendar was -13 days then. I don't know how that happened but people in ex-Russian Empire, ex-USSR countries still unofficially celebrate the New Year by Julian style calling January 14 the "Old New Year". So, happy "Old" New Year! :)
</p>
A Perfect Major2006-01-13T00:00:00-06:00http://www.alexdymo.com/blog/2006/01/a-perfect-major<p>
Yes, one of those rare quizs that worked for me :)
</p>
<p>
You scored as <i>Mathematics</i>. You should be a Math major! Like Pythagoras, you are analytical, rational, and when are always ready to tackle the problem head-on!
</p>
<table width='300' cellspacing='0' cellpadding='0'>
<tbody>
<tr>
<td>Engineering</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='100' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>100%</td>
</tr>
<tr>
<td>Mathematics</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='100' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>100%</td>
</tr>
<tr>
<td>Philosophy</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='92' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>92%</td>
</tr>
<tr>
<td>Linguistics</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='83' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>83%</td>
</tr>
<tr>
<td>Theater</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='67' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>67%</td>
</tr>
<tr>
<td>Biology</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='67' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>67%</td>
</tr>
<tr>
<td>Chemistry</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='67' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>67%</td>
</tr>
<tr>
<td>English</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='67' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>67%</td>
</tr>
<tr>
<td>Journalism</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='58' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>58%</td>
</tr>
<tr>
<td>Sociology</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='58' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>58%</td>
</tr>
<tr>
<td>Psychology</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='50' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>50%</td>
</tr>
<tr>
<td>Art</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='42' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>42%</td>
</tr>
<tr>
<td>Anthropology</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='33' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>33%</td>
</tr>
<tr>
<td>Dance</td>
<td>
<table border='1' cellpadding='0' cellspacing='0' width='17' bgcolor='#dddddd'>
<tr><td></td></tr>
</table>
</td>
<td>17%</td>
</tr>
</tbody>
</table>
<p class="small deemphasized">
<a target="_blank" href="http://quizfarm.com/test.php?q_id=119158">What is your Perfect Major?</a>
</p>
Summer of Code!2005-10-07T00:00:00-05:00http://www.alexdymo.com/blog/2005/10/summer-of-code<p>
OMG, today I received payment for my <a target="_blank" href="http://websvn.kde.org/trunk/playground/devtools/eclipse/">Google SOC project</a>. Gee, I've never got that much money for a software project! My thanks to Google and my mentors Carsten, Harald, Roberto. Thanks also to Zack for pointing me to this program. Special thanks to Roberto for being so enthusiastic about Eclipse. I'd never touched that piece of code without you ;) Great :)
</p>
KDE at OSDN.UA Conference2005-10-02T00:00:00-05:00http://www.alexdymo.com/blog/2005/10/kde-at-osdn-ua-conference<p>
Yesterday I attended annual OSDN.UA conference in Kiev, Ukraine. I was talking about KDE4 technology and plans.
</p>
<p>
I couldn't resist speaking about KDevelop a bit so I revealed some KDevelop4 information ;) Most common questions were "why are you replacing of autotools?" and "what will happen with multimedia?".
</p>
<p>
After the talk I was communicating with the people and here I'd like to present a short summary.
</p>
<p>
KDE users asked for a simple way for them to participate in writing documentation. What they did ask IMHO was like offline wiki engine for KHelpCenter. They'd like to be able to put some notes and text into the offline documentation. For example, KDevelop/Automake documentation section is unfinished. Users say they could have finished it (or at least write several centences just to share their experience). But currently they'd need to either modify docbook sources or figure out a documentation maintainer and send him an email with a text. What would users love is a way to put some text/comments into the documentation and then click one button and send a patch with their changes to the documentation maintainer automatically.
</p>
<p>
Also I talked to ReactOS developer. He said they'd like to have Qt/KDE compiled and used as a default desktop on their operating system. They're compiling the system with MinGW32 compiler so I think Qt4 should work and KDE4 should work as well (when ported to win32).
</p>
MS Office UI2005-09-24T00:00:00-05:00http://www.alexdymo.com/blog/2005/09/ms-office-ui<p>
Thanks to Adam and Ariya the topic is hot now so I couldn't resist commenting it :)
</p>
<p>
From what I can see, MS is trying to:
</p>
<ol>
<li>get rid of menus</li>
<li>get rid of modal dialogs.</li>
</ol>
<p>
I completely support those two goals. Heh, I should have shown those of you who were in Malaga "kdevelop4geeks.ui" file that has been lying on my desktop for more than a month ;) That file is the concept of KDevelop4 user interface I created before I heard about MS Office 12. First version of it didn't contain menus at all and second included a "Menu" button just where the "File" menu is in MSO12. Other concepts I was playing with were different though. Anyway, most of them were efforts to move most of functionality from dialogs to views inside the main window which coincide with the second effort of MS guys.
</p>
<p>
Thus said, I have to admit that we should probably not copy their interface, at least not in KDevelop. I've only looked at screenshots so I can be wrong here, but it seems their interface is designed for mouse users. Contrary to that, I'd like to see KDevelop interface completely navigatable by keyboard. More, I'd like to make keyboard navigation the prefferred way over mousing. Therefore it's more likely we have to invent a different UI.
</p>
<p>
Anyway, I'll try to gather my UI ideas and blog more about them soon.
</p>
Fried and Salted2005-09-03T00:00:00-05:00http://www.alexdymo.com/blog/2005/09/fried-and-salted<p>
Those two words pretty much describe my experience of Malaga beach :) The sun was mostly under the clouds but still it was really hot ;) The Mediterranean Sea was great (warm and calm) but too salty to my taste. People, you should come to the <a target="_blank" href="http://en.wikipedia.org/wiki/Crimea">Crimea (Ukraine)</a> to the Black Sea cost. The water there is as warm but much cleaner (because there's no sand, only pebble) and also it contains twice less salt ;). Anyway, I enjoyed much swimming in the sea :)
</p>
A Hacker and a Tourist in Malaga2005-09-01T00:00:00-05:00http://www.alexdymo.com/blog/2005/09/a-hacker-and-a-tourist-in-malaga<p>
This year KDE conference was harder to attend to but we got a series of nice talks. I particularly enjoyed Richard's talk about bindings and Mirko's walk on the dark side (but that's probably because I've been walking on that dark side for more than a month now). The build system BoF was surprisingly fruitful, there were no disagreements and build systems wars at all.
</p>
<p>
Today I was once again a tourist and woke up early for a city tour. The tour was pretty interesting but too short for my taste so I decided to continue being a tourist and visited Picasso museum. The museum was pretty impressive, lots of original Picasso's paintings are there. Cool! Also did I mentioned that all his paintings contain naked women? ;) Yes, they do, even on those paintings that at the first look contain only lines and triangles, naked women are drawn :)
</p>
<p>
Ok, enough blogging, shall get back to hacking because I haven't finished yet qmake support for eclipse. Really, I spend too much time talking, eating, drinking, whatever... The "drinking" part is so huge so I managed to got drunk the day before yesterday and forgot my hat and my bag with a bottle of beer (has anyone seen them?). Oh, shame... how much drunk was I to forget a bottle of beer? ;)
</p>
Language Fetishists: Backend Doesn't Matter2005-08-20T00:00:00-05:00http://www.alexdymo.com/blog/2005/08/language-fetishists-backend-doesn-t-matter<p>
While writing our applications we do care about how we accomplish our programming tasks. We want to efficiently write code, easily debug, sync with the repository, etc. But does it really matter what kind of representation on disk our projects have? Let's just imagine a tool that allows you to write code, has code refactoring and completion, builds your projects and api documentation easily, whatever else you could imagine. And if we had this tool, would it be important that the tool stores its data on disk to files? I don't think it would be important. At least I wouldn't care.
</p>
<p>
The problem is only that we don't have such tool. Editors let you do all that stuff by hand. IDEs try to do that but usualy suck in several cases. And they don't suck because of plain file representation of the code. IDEs usually have several representations of code and project in memory in format that you mentioned (yep, smth like semantic networks, trees, whatever) and they can (and do) store that into disk in binary formats. So the problem is not having the representation but implementing things you're asking about. It just takes enormous amount of time and believe me, implementing source parsers is not the only task that takes that time.
</p>
KDE-Eclipse2005-08-17T00:00:00-05:00http://www.alexdymo.com/blog/2005/08/kde-eclipse<p>
Today I finally got back home. This time I was able to commit all my stuff to the SVN and prepare a little website for those who are curious about what is KDE-Eclipse. Get it <a target="_blank" href="http://websvn.kde.org/trunk/playground/devtools/eclipse/">here</a> and enjoy!
</p>
Eclipse Hacking Experience2005-08-16T00:00:00-05:00http://www.alexdymo.com/blog/2005/08/eclipse-hacking-experience<p>
I've been working on my Google SOC KDE-Eclipse project for several weeks now and what I can tell you is that hacking on Eclipse is a cool experience :) I like that and I don't think I'll drop KDE-Eclipse after 1st of September.
</p>
<p>
Before I started I knew Eclipse is huge. In reality this doesn't hurt you IMHO just because it has good architecture and it is written in good language (yes, java is ok for me). The documentation doesn't help you much though. First, it is not sufficient and second (and importrant) you do not learn much from the documentation.
</p>
<p>
Thankfully, you have the source code and I really appreciate the source code of Eclipse is open. That's because only from source you can learn as much as necessary. And this fact leads me to think more and more that open source is not about <i>reusing software</i> (commercial companies do that as well) but about <i>reusing experience</i> which is hidden inside the source.
</p>
<p>
I have the strong belief that people who write the software are more important than the software itself and by looking to the source code you can gain at least part of experience of people who wrote it. That's the power of open source, that's <i>reusing experience</i> concept at work!
</p>
<p>
Speaking back about Eclipse, I noticed that it's not uncommon when you spend several hours digging into source and docs trying to figure out how things work, how things you have in mind should work and then you spend 15-30 minutes coding your stuff ;) In that respect KDevelop is much easier to hack on. Basically, if you have an idea how usual KDE comonent application works, you can hack on lot of things in KDevelop.
</p>
<p>
PS: in several days I will commit the stuff I wrote last week so everybody could at last try it in use (yes, it's usable enough now).
</p>
aKademy2005-08-16T00:00:00-05:00http://www.alexdymo.com/blog/2005/08/akademy<p>
Finally it looks like I'm good to go to aKademy. After 3 visits to Spanish embassy (which is 600 km away from my home), 4 days of making phone calls to the embassy trying just to arrange an interview and 2 days of calling to know the result, I was told that I have my visa. Whew :) Now I just need to go to the embassy and take my documents back.
</p>
<p>
Also thanks to Trolltech (thank you Harald! :)) and KDE-eV (thanks Mirko and other guys :)) my travel expenses will be reimbursed.
</p>
<p>
That's going to be cool :) I will be able to spend 5 days (till 1st September) hacking on KDE-Eclipse (I'm starting to like that job;) but that's another blog) and other 4 days hacking on KDevelop4.
</p>
Ottawa. Part II2005-07-23T00:00:00-05:00http://www.alexdymo.com/blog/2005/07/ottawa-part-ii<p>
Today and yesterday I was doing like a real tourist. I visited lots of places in the city, walked tons of kilometers. At the end I got tired but very pleased. Ottawa is a really beautiful city and it doesn't look as other cities I visited :) Cool!
</p>
Ottawa2005-07-21T00:00:00-05:00http://www.alexdymo.com/blog/2005/07/ottawa<p>
I finally visited America :) Look's like it's a cool place but anyway it's a lot different from Europe. Especially the wet climate makes me feel that the weather in Ukraine is not so bad ;)
</p>
<p>
I had two talks - one at the DesktopCon and one at LinuxSymposium today. Looks like the one at DesktopCon took more attention. At LinuxSymposium I had two hours for the tutorial. At the first hour I was talking about KDevelop Platform mostly and I had some people interested in the platform stuff we have. Looks like we have to promote it more and try to get more applications written for the platform just to make a really good showcase. The second hour was scheduled after the lunch break and I spent it mostly discussing technical issues with the Eclipse guy (who was KDE developer some time ago btw :)). Other people were not interested in the talk.
</p>
<p>
Commenting Mathieu's blog, I have to disagree on some things with him. The organization of the conference is ok. I had my two tutorials accepted and we could have more KDE talks accepted if we sent our proposals. But I also have to agree with Mathieu that people who attend this conference are not really interested in KDE technologies. I don't know why - that's probably beyond my understanding. Anyway, there were some cool talks about Eclipse, Kernel (today) and even some X-related talks were ok ;) (we had lots, lots of X talks).
</p>
Ottawa. Trip Is Starting2005-07-16T00:00:00-05:00http://www.alexdymo.com/blog/2005/07/ottawa-trip-is-starting<p>
Today my trip to Ottawa is starting. I will give two tutorials - one at DesktopCon (19th) and another at LinuxSymposium (20th). Guys from Xandros were so kind to make this possible by sponsoring me :)
</p>
<p>
PS: Another thing everybody is wondering about is where is KDevelop Conference dot story. Well, once KDevelop4 is commited to svn, the story will be there ;)
</p>
KDevelop Conference2005-07-09T00:00:00-05:00http://www.alexdymo.com/blog/2005/07/kdevelop-conference<p>
The conference is over now. I'm sitting at home and writing this blog atm. Hope others got to their destinations without problems. I spent great time in Kiev, too bad we had only one week.
</p>
<p>
The next step will be writing a dot story covering our achievements during the week, I'll do it a bit later after I recover ;)
</p>
KDevelop Conference. Day 1-52005-07-06T00:00:00-05:00http://www.alexdymo.com/blog/2005/07/kdevelop-conference-day-1-5<p>
Despite the conference day started very early we still couldn't start the event in time. Approximately at 10:00 we started. We was torturing our visitors till 18:00 and finished almost in time. Before we finished Ian got his luggage therefore we were able to finish the rest of day drinking Tequila. I think Ian has some really embarrassing pictures of me and Roberto taken during this process :)
</p>
<p>
Next day we went to the hacking session place, downloaded qt4 and kdelibs4 and started porting kdevelop. This process in ended in the night with KDevelop4 running without any plugins on KDE4. This was quite an achievement so we decided not to continue hacking and spent the rest of the night drinking vodka.
</p>
<p>
Getting up in the morning was really hard on the third day but we managed to do that and continue porting. This day KDevelop had several plugins ported, Roberto continued working on his parser generator (which is a really cool thing btw ;)). I got kyzis running in KDevelop4. Richard had fun with Ruby grammar and Jens finally made us discuss Quanta/KDevelop integration issues.
</p>
<p>
Next day I was serving as a city guide :) We walked over almost all cool places in Kiev, visited lots of places and finally about 20:00 we ended up hacking on KDevelop again :) The day was really productive. Roberto wrote ast generator and refactoring engine for his parser generator. Ian started to provide support for qmake from Qt4 in KDevelop3. I updated the documentation plugin to support Qt4 documentation and joined Ian in his effort to improve qmake support.
</p>
<p>
The fifth day was taxing. I and Jens went to the train station to buy tickets for us. We spent more than an hour waiting in two queues but finally we got our tickets. This day we spent on porting more parts of KDevelop and Roberto and Harald started to improve our projectmanager and other plugins using model/view architecture. At the late night Ian got his improved qmake manager running and said we should have more such meetings. I couldn't disagree with him ;)
</p>
KDevelop Conference. Day -2, Day -12005-07-02T00:00:00-05:00http://www.alexdymo.com/blog/2005/07/kdevelop-conference-day-2-day-1<p>
When I came to Kiev I didn't realise how much stuff I have to do. The conference preparations took all my time which was spent on arranging meetings with people, printing booklets, announcements and badges. That was really interesting experience for me but now I wouldn't reccommend anybody to undertake such things like conference (especially when you're the only person responsible for that ;) ).
</p>
<p>
Now I can imagine how much stuff is being done by people working on organizing Kastle/aKademy meetings :) Those guys should really be busy preparing such cool events.
</p>
<p>
So, talking about the "day-2". I didn't notice it ended because I fall asleep probably just after going back from the city to the place I'm living ;).
</p>
<p>
Next day in the morning I had an interview at the Canadian embassy. I was applying for visa because I was accepted as a speaker on DesktopCon and LinuxSymposium (17-24 July). Of course, I will be speaking about KDevelop - what else can be expected from me? :)
</p>
<p>
Canadian embassy impressed me much - I got a visa just in one day. That never happened to me before :). I mean other embassies used to process my application one-two weeks and I was forced to come two-three times.
</p>
<p>
After I got my visa, I started arranging other conference-related things. That took too much time and therefore I was late to the airport to meet Harald Fernengel and Roberto Raggi. Thankfully, the arrivals queue was really large in the airport and Harald and Roberto managed to get through it only after 1.5 hours waiting. Ian Geiser had more interesting experience of arriving with the wrong flight without his luggage. I must admit he was ok even without the luggage. The only thing he missed was the bottle of Tequilla that was somewhere in his luggage :) Only Richard Dale arrived without problems.
</p>
<p>
Despite everybody was tired, it was decided to replace Tequilla with a Vodka and that helped a lot to overcome the "tired" state :) The only side-effect Vodka had was that we had 3 hours to sleep before the conference. Of course we could sleep two hours more but nobody had even started their presentations that time ;) So we woke up at 6:00, prepared our presentations and went to the conference place but... that's another story...
</p>
How Easy Could an Application Development Be?2005-04-21T00:00:00-05:00http://www.alexdymo.com/blog/2005/04/how-easy-could-an-application-development-be<p>
Today I was working on a specific part of pretty large project. The goal of that part is to help the user to organize information which he is looking for. Workflow for that user was designed in a way to prevent him from searching randomly in web browsers or local (network) disks. Each time the information (web or local resource) is found it should be categorized automatically (depending on a current search "context").
</p>
<p>
An application I develop is ought to force that kind of workflow. Obviously I need to have a "restricted" web browser and file manager. I'm quite confident that it's easy to do with KDE libraries. It's just a matter of embedding corresponding parts. But at the same time I though that it's too boring to develop main window for the application and other stuff which is related to browsing (like tabs).
</p>
<p>
I had been thinking how to make the application prototype faster for less than a minute when a sudden and cool idea came to my mind. KDevelop Platform! What else can make me feel happy and let me finish my prototype in few minutes?
</p>
<p>
Indeed, I have been working on transformation of KDevelop IDE to the Platform to build new applications for quite some time. I put some efforts to make sure that two current platform applications (IDE and Assistant) use the same plugins and architecture. And it seems that the time has come for me to benefit from that effort.
</p>
<p>
I'll make a little overview for those who haven't heard of KDevelop Platform so far. The clean platform application (built by just copy-n-paste method from docs) is a main window (shell) with two major capabilities. It is able to
</p>
<ol>
<li>load and embed parts by mime type (or manually)</li>
<li>load and embed KDevelop plugins</li>
<li>define which plugins are loaded using so-called "profile"</li>
</ol>
<p>
Ok, back to the application. Copy-n-paste method worked and after several minutes spent on creating makefiles I had my application running. I defined "GlobalFileManagement" and "UISwitching" in my profile and got the file manager and UI settings page for free by less than a second.
</p>
<p>
Then I wrote KDevelop plugin (using KDevelop application wizard, of course ;)) that added a URL requester combo on the toolbar to let the user open web pages in embedded khtml part. That took another couple of minutes (mostly spent on compilation and makefile.am hacking).
</p>
<p>
As a result, I had a feature-rich application protorype in less than an hour thanks to the KDevelop Platform. Despite the platform is being positioned as a way to build IDE-like applications, my application is not an IDE, it's like a web browser and file manager and (thanks again to the platform architecture) a universal file viewer. I wrote only 35 lines of code to do that. Another 678 lines was either generated by kdevelop application wizard or copied and pasted from the docs.
</p>
<p>
What can I say after that? KDevelop Platform is cool :) but there are few things to work on.
</p>
<p>
First, it takes too much time to set up and compile a platform application. We need to provide platform application template for KDevelop application wizard.
</p>
<p>
Second, it would be cool to do things described above in one of scripting languages to avoid makefile hacking and compilation. I'm confident that platform application in Ruby could have been written in ~10 minutes. Heh, I need to work on Ruby bindings probably.
</p>
What's the Buzz About Virtual Machines?2005-03-07T00:00:00-06:00http://www.alexdymo.com/blog/2005/03/what-s-the-buzz-about-virtual-machines<p>
I always hear how great VMs are, how great is to write programs for VMs, how easy those programs are executed, how efficient they are and so on... That always sounds cool, but I always have a strong feeling that it only sounds such.
</p>
<p>
Ok, let's consider known "good things" about VM.
</p>
<ol>
<li>
<p>Programs written for VM are easily portable</p>
<p>
Yes, of course. A program compiled into, for example, java VM bytecode can be run everywhere the VM exists. This assumes that no external stuff is used. Yes, no external libraries, no external programs written not for VM. How often can the external stuff be useful? I'd answer - very often. Even if you a volunteer programmer and work times to times on several tasks you will gather a collection of development tools (libs, programs, etc.) you're using. And you're lucky if you started the development for a VM and you're in trouble if you did not. A commercial company would have even more troubles with reusing available stuff.
</p>
</li>
<li>
<p>"Write once - run everywhere"</p>
<p>
It's quite cool to compile program only once and to be able to execute it on different platforms. But the question here is whether testing can be avoided on several target platforms. For example, a company could decide that AIX is too expensive to buy and testing on that platform is not necessary. In ideal world, the company made right decision, in real - it will fail! Even UI will not look the same on different problems. And who knows how much issues with program execution can happen on a different platform?
</p>
<p>
One can argue that recompilation on different platforms can be enormously hard. Yes, I agree but the problem is not the recompilation itself. The source of a platform are development tools (like different c/c++ compilers, different build systems, etc.).
</p>
</li>
<li>
<p>Modern computers have a lot of spare time - it can be spent for garbage collection and/or JIT compilation</p>
<p>
Heh, yes, computers waste a lot of CPU cycles. But why the hell they try to spend those CPU cycles on garbage collection and/or compilation at the same time I try do do something with a program (remember java's "adaptive mark-and-sweep stop-and-copy gc" that makes large java programs so unresponsive?).
</p>
<p>
I'd say that if I have spare CPU cycles, I'd better spend them on interpreting the program (like python interpreter does) and not on trying to do the "background" magic. Real world proves that the later approach which in theory is slower turns out to be much faster (compare Java/SWT programs to Python/GTK or Python/Qt).
</p>
<p>
Bear in mind also that python interpreter uses GC with reference counting which should be "much slower".
</p>
</li>
<li>
<p>It's easier to write programs for VM</p>
<p>
Huh? It's easier to write programs in java and/or c# but that has nothing to do with a VM. Don't remember that GCJ compiler exists to compile java code into native executables. Similar compiler for c# can be implemented as well.
</p>
</li>
<li>
<p>VM allows reflection</p>
<p>
Ok, two questions. How often reflection is used? And isn't reflection available with interpreted languages? My answers are: "rare" and "yes". If you need reflection, use interpreted languages, they can do it easier. Most problems can be solved using some kind of "eval" statement (in ruby, for example, you can even add/modify class definitions using "eval").
</p>
</li>
<li>
<p>It's easy to distribute programs for VM</p>
<p>
Ok, now I'm bailing out. This is not a myth - it's a reality. For example, java web start (JNLP) has always attracted me a lot. It's also easy to write and distribute plugins for applications. Anyways, with interpreted languages you can do the same thing and VM is not necessary. And let's consider for a minute troubles with distribution of native-compiled programs for Windows. Most of them are connected to the distribution of dll's which have no versioning information.
</p>
<p>
But besides that it's relatively easy to distribute compiled plugins for applications. On UNIX distribution of binaries was always a problem mostly due to binary incompatible libc/etc in dozens of distributions.
</p>
</li>
</ol>
<p>
PS: As a postscript I will raise one question. Can aforementioned "good things" be said about a development platform with a compiled language?
</p>
<p>
And here my answers:
</p>
<ol>
<li>
<p>Programs written for VM are easily portable</p>
<p>
"Write once - compile everywhere" <i>can</i> be achieved. There's no technical problem with that. It's a question of development tools - a compiler, standard library and build system.
</p>
</li>
<li>
<p>"Write once - run everywhere"</p>
<p>
"Write once - compile everywhere" can be considered as the same. Testing is always necessary so if a compilation can be made easier and straightforward then those statements become equal.
</p>
</li>
<li>
<p>Modern computers have a lot of spare time - it can be spent for garbage collection and/or JIT compilation</p>
<p>
There's no problem in having GC in compiled language. GC with reference counting can be used to avoid stops during program execution. The program will be slower (due to reference counting) but the overall program flow would be perceived as more "natural". For example, everybody knows that python programs are slow - each test shows their slowness, but at the same time python programs do not <i>feel</i> slow. They run <i>smoothly</i>.
</p>
</li>
<li>
<p>It's easier to write programs for VM</p>
<p>
For any modern language (java, c#, etc.) a native compiler can be created. If java/c# are not so good, it's always possible to create a better language ;)
</p>
</li>
<li>
<p>VM allows reflection</p>
<p>
Interpreter for a language can be created among with native compiler. Developers who need reflection could make use of such interpreter. Or vise versa, a compiler for an interpreted language can be created. The only technical problem to solve here is to allow easy interaction between interpreted and compiled code.
</p>
</li>
<li>
<p>It's easy to distribute programs for VM</p>
<p>
If BC is kept for the development platform then it is always possible to distribute binaries and plugins in binary form. A number of rules exists (see, for example, "parallel installation" document for GTK) to ensure the libraries do not clash and old programs can be run on newer platforms. It's just a matter of installing old and new binaries in parallel. Exactly the same thing should be done with VMs. Different versions of VMs can be incompatible so parallel installation is a must.
</p>
</li>
</ol>
I Have a Blog Now2005-01-27T00:00:00-06:00http://www.alexdymo.com/blog/2005/01/i-have-a-blog-now<p>
And now I'm curious what to write here. Well, time will tell... I hope ;)
</p>