Ayende @ Rahien

Hi!
My name is Ayende Rahien
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

@

Posts: 5,947 | Comments: 44,542

filter by tags archive

SharpDevelop Cool Features...


I'm currently using version 1.1.1799 and I'm discovering some very nice stuff about it.

  • Project > Export to HTML...
    This allows you to output the entire content of the project / combine (solution in SD's dialect) as HTML, including line numbers & highlighting.
  • Intergrated Assembly Analyzer which is either FxCop or a direct copy.
  • Integrated unit testing and NAnt support
  • Much better support for Boo, even though I didn't upgrade my BooBinding, just linked them to the new version.
  • Slicker, better look.

Really nice experiance.

Sharp Develop annoyance


The best thing that I can say about #Develop is that it's easy to integrate new languages to it, and that it provide a very good user eperiance for C#.

The bad thing is that I began to encounter a strange bug in the text drawing on version 1.0.3.1768 (the latest right now).

You can see the problem here, this doesn't happens always, and not just for Boo code, but when it does happen (and I wasn't able to track why) it happens consistently, and nothing I can do (including setting double buffering off, which seems to fix it, but then render it unusable for other reasons, restarting the application, etc) didn't help.

Argh!

Update: I found the cause just 20 seconds from posting this article! I knew I'd a reason to blog :-)

The problem seems to be that I sometimes move one of my monitors to portrait mode, and SD doesn't seem to be able to handle this gracefully.

Moving to the second monitor in landscape mode fix this. And changing the first monitor to landscape mode will fix this as well.

I can't recommend portraint mode highly enough if you are going to be reading, especially if you are going to read code. There is so much more that you can see in portrait mode.

It isn't as good for writing code, mind you. This is mainly because all the sidebars (yes, I know I can move them) that takes up horizonal space and don't leave much room for the code.

Nhibernate Query Analyzer 0.6.2


You can find the new version here:

New features:

  • Offers dynamic loading from anywhere your system, and not just from the application base path.
  • Performance measurements.
    Pay attention!
    This is not something you can rely on, this is one time data, and it can be skewed by network latencies, file I/O, the phase of the moon and just random wierdness. It does provide some base line, but you need to do real profiling before you can go ahead and change your code

http://developer.berlios.de/projects/nqa/

Interesting article about OSS, IP, Patents, and lawsuits


Do read "When are you going to sue your customers?", it's a very good read.

I can think about one company that sues its customers, Apple :-)

"CChheecckk yyoouurr dduupplleexx sswwiittcchh.." -- Tech Support Slogan

"Breakthrough: It finally booted on the first try." -- Tech Support Slogan

"The steady state of disks is full." -- Ken Thompson

[Listening to: Who Do You Want - Gidi Gov - Who Do You Want CDS(03:49)]

Boo - half way through summary


Do I get a little obsessive about Boo? What do you think?

What I like in Boo1:

  • Anonymous methods now, so you can things like:

    (

    new Thread({print "Hello"}).Start()
  • No punctionation for control flow, this mean that you can do things like this:

    if

    not scanned:
     
    Scan()
    Instead of C#'s way, that often caused me to ignore the '!'

    if(!scanned) 
       Scan()

    There is a solution that is worse then the problem in C# - this one hurts my eyes:
    if(scanned==false)
      Scan()
  • The syntax support things like this one, which is cleaner then the C# way.

    logger.Debug(string.Format("Scanning {0}", entry.Key )) if (logger.IsDebugEnabled)

  • Many things that feels natural to me (from C# background) works the same in Boo. - Yes, it's a duplicate of what I don't like.
  • Has a natural property syntax, so you can do things like to avoid al the tedious get/set:

    [

    property(BaseDirectory)]
    baseDir as string = Environment.CurrentDirectory
    Moreover, do you recall how many times you created code that like this:

    string baseDir = Environment.CurrentDirectory;
    public
     string BaseDirectory
    {
      get
      {
          return baseDir;
      }
      set 
     

          baseDir = value; 
       }
    }

    This translate to this code in Boo which no ammount of IDE-Magic can beat.

    [

    property(BaseDirectory)]
    baseDir as string = Environment.CurrentDirectory
  • Allows you to define your own language constructs, using, with, transaction, lock, are not compiler magic, but code that you can modify or create new things. Wants to use your favoriate language feature? Just code it and it's there. This is the first time that I encountered a user-extensiable compiler. The potential for use is wonderful, the potential for abuse is... Well, let's just hope that it's a complex enough feature that the clueless won't get their hands on it.

What I don't like1:

  • No good IDE - sorry, SharpDevelop doesn't cut it, I've numerous bugs {using 1.0.3.1768} that caused data loss, and it frequently lock itself up, requiring killing the process
  • No Resharper - This is the killer for me
  • No visibility checking for now, so you can call a private method and that would cause a runtime error instead of compile time error.
  • Debugging through DbgClr, which does the job, but... it isn't the same experiance.
  • The compiler's error messages (which I get a lot of right now) aren't as good as C#'s. That is probably because the C# compiler bends over backward to gives you meaningful messages.
  • No characters literals, you have to do things like 'a'[0] to get a character - yet.
  • Many things that feels natural to me (from C# background) works differently in Boo. - Yes, it's a duplicate of what I like.
  • The language is still in beta.
  • It uses idention for control flow :-(
  • I keep making mistakes because my fingers & eyes think that I program in C#, so I usually code variables as string bar = "foo" instead of bar = "foo"
  • No literal strings ( @"C:\This\Is\A\Bummer" ), which is a real problem when you're trying to write regex-es that write regex-es, I've parts that makes my head spin.
    For example: regex.Replace("C:\\*\\ayende?","\\\\","\\\\") - Without running it, what is the result? (Here is doesn't matter whatever the code is C# or Boo.
  • A really nice way to select multiply cases, but it's not implemented yet!

    given

    Path.GetExtension(path).ToLower():
          when ".resx", ".resource":

1 In no particular order

Damn, Damn and double damn


I'm currently investigating a sweet little language call Boo. I've been totally blown away by it's abilities. It's so cool that I just can't belive that I didn't know that such a thing exist. It totally blows away C# in terms of ease-of-use.

There are some cavats currently, mainly due to the fact that the language is still in beta, but already it has some great potential.

The double damn is that I just spent three or four hours coding, and lost it all just as I was about to finish because of #Develop.

FUTURE POSTS

No future posts left, oh my!

RECENT SERIES

  1. RavenDB Sharding (3):
    22 May 2015 - Adding a new shard to an existing cluster, splitting the shard
  2. The RavenDB Comic Strip (2):
    20 May 2015 - Part II – a team in trouble!
  3. Challenge (45):
    28 Apr 2015 - What is the meaning of this change?
  4. Interview question (2):
    30 Mar 2015 - fix the index
  5. Excerpts from the RavenDB Performance team report (20):
    20 Feb 2015 - Optimizing Compare – The circle of life (a post-mortem)
View all series

RECENT COMMENTS

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats