DCSIMG
March 2009 - Posts - IronShay

March 2009 - Posts

Tip: How To Use Generic .Net Classes in IronRuby

In the latest version of IronRuby (0.3), the ability to use Generic .Net classes was added. I couldn’t find anywhere how to do that so I dug it out of the code and now I’ll share it with you!

Example #1 - List

This is how to define an Int32 list, add two numbers to it and print them:

list = System::Collections::Generic::List[System::Int32].new

list.add 4
list.add 12

list.each { |x| puts x }

Of course we can also use Ruby type like Numeric, String, etc.

Example #2 – Dictionary

This is how to declare a number-string dictionary, add values to it and print them:

dict = System::Collections::Generic::Dictionary[Fixnum, String].new

dict.add 1, "Hey"
dict.add 15, "There"

dict.each { |x| puts "#{x.key} - #{x.value}" }

 

All the best,
Shay.

Posted by shayf | with no comments
תגים:, ,

Developers Are The New Legends

During the last few years, the amount of written text and spoken word about the great change that is currently evolving, has tremendously increased. The main focus is always computers, which start taking more and more central part of our lives. Nowadays, via our computer we meet friends, we buy and sell stuff, we  manage companies, we watch videos, we pay our taxes and we can even enlarge our p**** (I’ve never tried that one though… hmmm…). But no one ever mentions the behind-the-scenes-hard-workers of this wonderful change – the developers!

A few days ago I was wondering how many developers are there. Searching the web resulted in a number – about 10 million of us exist!
I can’t tell if this number is true or not, but it sounds logical to me. 
Assuming it’s right, consider the power that each of us, developers, has upon his or her product.
We are only about 0.001% of the entire world population and look what we are responsible of and what we have achieved – we’ve made the change happen!

Just like the Egyptians with mathematics, ancient Rome with architecture, ancient Greek with democracy and Great Britain with the industrial revolution – we are the new legends!

Developers Are The New Legends
Created at BeFunky.com

So next time when you feel down, the build’s just broken or someone goes hard on you, keep your chin up and tell them “what have you done for the human race?”.

We make it happen!
Shay.

P.S. Does this enlargement thing really work? :)

Share this post: DZone | Digg | DotNetKicks | DotNetShoutout

Posted by shayf | 4 comment(s)

TechDays 2009: Defy All Challenges Together!

Next Wednesday (April 1st), TechDays 2009 is going to take place. This time you don’t have to travel far and you don’t even have to walk out of your front door – the entire conference is online!

The event will take place for 24 hours and will offer LiveMeeting sessions about various technology-related subjects.

TechDays 2009

 

I was lucky to be picked as a presenter… so…

You’re all invited to my session:

Bringing the IRON to Ruby which will take place on 9:00-10:00 GMT (12:00-13:00 in Israel).

As you can already understand, I’m going to talk about IronRuby.
I’ll focus on the Ruby language and the advantages of combining Ruby and the .Net framework.
It’s gonna be a fun, horizon widening and full-of-demos session!

Register now and you can even win prizes!

http://www.msfttechdays.com

See you there!
Shay.

IronRuby 0.3 Has Been Released!

Great news! As Jimmy Schementi describes it – the “conference-driven development schedule” of IronRuby brings us some news for the MIX09 conference. It’s the 0.3 version of IronRuby!

IronRuby 0.3 is out!

So what’s new in 0.3?

  1. IronRuby now passes 10% more of the RubySpec than v0.2 has. Make sure to check IronRuby.info in order to get up-to-date statistics.
  2. Better .Net interoperability – you can now call generic methods and implement interfaces!
  3. More! you can read about all changes in the CHANGELOG.txt file that you’ll find in the zip.

Grab it: http://rubyforge.org/frs/download.php/53552/ironruby-0.3.0.zip

Enjoy,
Shay.

Posted by shayf | with no comments
תגים:,

Mail Scheduler for Outlook 2007

I’ve just finished uploading my first codeplex entry!

What is Mail Scheduler for Outlook 2007?

It is a small addin for Outlook 2007. Its target is simple – help delay the mail send to a “customer-friendly” time.

For example, you’re working late and you’ve just finished writing an important email to your customers. It’s already midnight and sending the mail now might generate some “it’s weird” impressions on your customers faces once the read it. This is where Mail Scheduler comes to aid! click the Scheduled Send icon and your email will be automatically sent at 8:00am next day (or on Sunday if it’s the weekend).

Mail Scheduler for Office 2007

Open Source!

The entire source-code is available for download on codeplex. You can participate and make the app better! Just download the code and add your improvements.

Download the source or the setup file at: http://outlookmailscheduler.codeplex.com/

If you have any ideas, comments, suggestions, whatsoever – let me know!

All the best,
Shay.

Posted by shayf | 2 comment(s)
תגים:,