Ayende @ Rahien

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

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 18 | Comments: 81

filter by tags archive

SharpDevelop Cool Features...

time to read 1 min | 155 words

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

time to read 2 min | 283 words

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

time to read 1 min | 110 words

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

time to read 1 min | 115 words

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

time to read 5 min | 884 words

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

time to read 1 min | 95 words

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

  1. The insidious cost of allocations - 18 hours from now
  2. Buffer allocation strategies: A possible solution - 4 days from now
  3. Buffer allocation strategies: Explaining the solution - 5 days from now
  4. Buffer allocation strategies: Bad usage patterns - 6 days from now
  5. The useless text book algorithms - 7 days from now

And 1 more posts are pending...

There are posts all the way to Sep 11, 2015

RECENT SERIES

  1. Find the bug (5):
    20 Apr 2011 - Why do I get a Null Reference Exception?
  2. Production postmortem (10):
    03 Sep 2015 - The industry at large
  3. What is new in RavenDB 3.5 (7):
    12 Aug 2015 - Monitoring support
  4. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats