22 December 2006

The story about a gentleman and two gardeners

I was reading Aaron's blog and that infamous OSNews article today when the story came into my mind. So I had no other choice other than to dump it out here ;)

*********************

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.

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...".

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.

*********************

21 November 2006

More choice is...

Choices == Headaches ?

I've recently enjoyed this article from Joel :) No, the beginning of the article was sensible, but the end was...

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...

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...

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...

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"...

I can continue my examples for ages.

What I would like to say here is that it is useful to get things to their extreme to study them (like Hegel 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.

Looks like Barry Schwartz's book The paradox of choice became a catalyst for this article. I haven't read the book yet but I've listened to the Google video The Paradox of Choice, why more is less. 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.

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 "Too much 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.

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.

Overcoming the Paradox of Choice

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
A or B or C or D
Sometimes in the real life we can have not only one of these things but a combination of them. This would become
A or B or C or D or AB or AC or AD or BC or ... or ABCD
That is the choice represented in terms of some formal system S based similar to (human) logic.

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
A and B and C and D
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.

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 or B or C or D, but sometimes we need a chance to do A and B and C and 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.

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!

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:
  • A significantly differs from B
  • A serves the different purpose than B
  • A gives results different from B
It's possible to add more points here but I hope you get the idea. If you get A and B you're giving the user two chances which is good. If you get A or B you have to think whether you're giving your users too much choice. That is my simple rule!

Now let's get back to Joel. First he says there're 7 different shutdown options in Vista:
W(sWitch user) L(Log off) C(loCk) R(Restart) E(slEep) H(Hibernate) S(Shutdown)

He starts to place operators between them:
CWL=(W or L or C) R EH=(E or H) S
Then he simply puts "or"'s everywhere and simplifies the expression to just one thing
B'Bye=(CWL or R or EH or S)

Was there a fault in his derivation of B'bye? 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
CWL and R and EH and S
Of course, another interpretations are possible and you might derive another formula (like Vista developers who put "and"'s everywhere).

That's finally all I wanted to say today :) I hope you got a chance to read this post to the end and you understand my idea that as a software developer you don't have a choice between A(giving your users less choice) and B(giving them more chances) - because A and B are your chances ;)

08 October 2006

White vs Black, Good vs Evil (or RailsConf report)

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.

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.

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.

Here and here Joel Spolsky says that Ruby and Rails are slow. This and this are the replies from David Hanssen.

You say, ok, this is just another "language war".

Yesterday I discovered another battlefield. Steve Yegge tries to say that Agile software development can be bad and Agile is basically egomania and religion.

You say, ok, this is not a language but rather methodology war.

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.

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.

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 want 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 importantly their reasons and goals may not coincide with yours. 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 own opinion and make my own decisions and achieve my own results.

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".

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...

Strange loops, self-references? Self-reflection?

Finally I found the bravery to get Hofstadter's GEB (Gödel, Escher, Bach) 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 :)

07 October 2006

One September, two conferences. Part I: aKademy

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.

So here comes by aKademy report.

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!

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.

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;)).

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 Crimea, 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.

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.

22 September 2006

Traveling the world

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 any traveling.

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.

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.

04 September 2006

The case of Ideal UI mode

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.

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.

So, this and this is how KDevelop4 with toolviews looks now. Notice that KDevelop4 looks exactly like Qt Designer - all toolviews are just plain dock widgets. And this is how Ideal mode looked before. Notice the "button bars" at the bottom, left and right window sides.

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.

For now I'll continue working on new Ideal library. I miss Ideal too much ;)

It's good to be back

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.

Previously when you wanted to implement the language support in KDevelop, you should have done:

  1. lexer to tokenize the source

  2. parser to transform the token stream into the AST

  3. AST walker to make it possible to do something with it

  4. AST parser to create the abstract code representation - the code model

  5. "background parser" to execute the parser as a background job and fill the code model

  6. language support part to run the background parser


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.

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.

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.

From what I can see KDevelop4 will really shine in the area of language supports. blackarrow is doing wonders with C++. 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!

It doesn't look like I'm short of cool material for my aKademy presentation :) Rock on, KDevelop!

12 August 2006

Real life happens

That's what I heard from manyoso lately and he was damn right. This indeed happens and I see I'm not the one. 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.

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 Cicero'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 ;)

Speaking about cares, I had plenty of them recently. Just to mention the first Ruby/Rails meetup I and my fellow Anton 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 (we have the meetup site in russian and some pictures).

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 :)

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.

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.

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.

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.

Of course thereafter they grow, they start think more about their profession, maybe read blogs like this one (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.

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, the real life happens 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.

27 July 2006

Moved!





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. 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!

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 ;)

28 June 2006

Hojotoho! Heiaha!

Today I finally finished listening to the Wagner's "Der Ring des Nibelungen" 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 "The Birth of Tragedy out of the Spirit of Music" 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.

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).

27 June 2006

I'm very proud of...

...these guys!!! Tough play, steel nerves and luck - they demonstrated everything today :) I'm proud!

By the way, this is IIRC the best result ex-USSR football team ever showed since 1970 when USSR entered the quarterfinals. Hurray to our team!!!

23 June 2006

Ooh!

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.

19 June 2006

4 in - 4 out !!!

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!

16 June 2006

My job is my passion or KDevelop sponsorship!

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 :)

From this very moment Pluron 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 ;)

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 ;)

Thanks to Pluron and special thanks to Gleb Arshinov, company founder and great open source supporter who made this possible!

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 joining us ;)

14 June 2006

eh!

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 ;)

30 May 2006

environment and changes

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 ;)

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.

Let's say we need to parse token stream:
BBABBBABB
as the list of two items with one nested list inside. The ideal result would look like
(B (BAB) B) (B (BAB) B).
The grammar that comes to mind is:
list: item
| item list
;

item: B list B
| A
;
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. The grammar
list: item
| item list
;

item: X B list B
| A
;
has no conflicts at all. 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.

Addon: of course, if we allow to modify the lexer, something like
list: item
| item list
;

item: B_START list B_END
| A
;
would be even better.

rac(c)'ing the ruby

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).

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.

For example, if we have a rule:
foo: moo boo
{ result = val[0] + val[1] }
;
The result of the rule is computed by calculation of a sum of right part nonterminal's return values.

But if we use the rule like this:
foo:
{ result = "I break " }
moo boo
{ result = val[1] + val[2] }
;
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.

But today I glanced over racc output file and was stunned! RACC effectively considers:
 foo: {} moo boo ;
as
foo: _nonterminal_ moo boo;
and adds extra rule that breaks not only val[] numbering ;)

Example 1:
a: {} a B
| A
|
;
Example 2:
a: a B
| A
|
;

I implemented two examples (first is broken and second is ok) and studied them. I found that the source of the problem was that for {} a special nonterminal @1 will be created and artificial rule like
@1 -> ε
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.

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!!!)
a -> ε
stays after the first one and is not selected for reduce.

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.

26 May 2006

what a night!

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 ;)

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).

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.

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).

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 ;)

PS: did I say that Simple Ideal will store the toolview layout (opened/closed state, sizes) ;) ?

25 May 2006

KDevelop SOC: 1->3

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!

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 ;)

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!

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 :)