I know the answer (it's 42)

A blog on coding, .NET, .NET Compact Framework and life in general....

Browse by Tags

Tagged Content List
  • Blog Post: Expanding and compressing in Ruby Method calls

    One of the things I didn't like in Ruby at all is the support for method overloading. You have no ways to support it in a straight forward way other than to define a single method that takes a variable number of arguments. def foo(*f) f.each { |a| puts a } end foo("Hello", "world") What...
  • Blog Post: Bar Charts on the console

    I work on the UI action recorder and it has a strict performance requirement. The tool dumps the time it takes to record each action in it's log and that is compared against the maximum allowed value (otherwise the system will seem sluggish). To do this obviously we need fancy charts, as everyone likes...
  • Blog Post: Support for range in programming languages

    The .NET platform and the languages on top of it have limited or no support for range of values. Data ranges are one of the most common data-types and somehow it's not there. Funnily most programmers do not even seem to miss it (unless of course if you have used Ruby). How would you specify a valid range...
  • Blog Post: True object oriented language

    Today I was spreading the goodness of Ruby and why I love it so much (and you can expect multiple posts on it). SmallTalk programmers can sneer at me, but hey I wasn't even born when SmallTalk came into being and hence I can be pardoned for pretending that Ruby invented this :) Languages like Ruby are...
  • Blog Post: All programming languages evolve towards Lisp

    In an internal DL people were debating what all should be included in the next version of C#. One of the things I suggested turned into an interesting thread. Abhinaba: Add if as expression (like in Ruby) so that I can do the following var ageGroup = if age < 2 "Infant" else if age < 19 "Teen";...
  • Blog Post: Filling income tax

    The Indian income tax law allows certain expenditure and investments to be tax-exempt. The law also demands various proofs if you want to claim exemptions for this. This include original medical bills, rent-receipts, investments proofs. The list goes on. As you can guess this results in standing in a...
  • Blog Post: Binary banner

    BoingBoing has a story of a store that sells t-shirts with offensive messages spelled out in binary. I think its a nice way to generate email signature or web-page banner where you can really say offensive stuff and get away with it. I wrote the following code in Ruby which takes any word and spits out...
  • Blog Post: C# Anonymous methods, lambda expressions and Ruby

    In my last post I had discussed about anonymous methods. I had used the following code snippet to show how anonymous methods can be used to print out a List<string> List < string > nameList = new List < string >(); nameList.Add( "Abhinaba" ); nameList.Add( "Kaushik" ); nameList.Add...
  • Blog Post: Ruby.NET

    I had blogged earlier about Gardens Point Ruby.NET . After I read Don Box writing about it, I decided to give it a try. I tried compiling some Ruby code. I failed to get the retry code to run. It kept giving " Unable to cast object of type 'Ruby.Object' to type 'Ruby.Class' " error. I tried to...
  • Blog Post: Dynamic languages on .NET

    Dynamic languages prove themselves immensly powerful at places you least expect them to be. I found this out when I started coding in Ruby some time back and I completely fell in love with Ruby when I started working on the webserver project . For the last 3-4 days I'm seeing reference to Ruby on .NET...
  • Blog Post: C#: And I thought parallel assigment expressions were good

    When I began using Ruby I loved most of the things I saw. I made couple ( 1 , 2 ) of posts on some of those features that I'd like to see in C#. When I started re-visiting code I wrote sometime back my views started to change considerably. One of these was the parallel assignment constructs in Ruby....
  • Blog Post: Ruby: Webserver in 70 lines of code

    <Updated the sources to add logging and default file index.html handling. Now the code is about 90 lines :(> I decided to write a http-server in Ruby on Windows to see how much code it requires as I have been reading about how Ruby gets your work done much easily and much faster. Some of the...
  • Blog Post: C#: How about borrowing some Ruby conditional expressions

    After using Ruby for some time I have become quiet attached to its conditional statement syntax. In particular I like statement modifiers which allow you to tag conditional statements at the end of a normal statement. If C# supported this then in C# terms this'd mean instead of writing if (!File.Exist...
  • Blog Post: C#: try and retry

    In many situation when something fails (exception is thrown) in the try block you want to retry that again. This could be a network timeout exception, or some other resource unavailability where you expect the same piece of try block code to succeed if you execute it again. How you do it in Ruby ...
  • Blog Post: Ruby: Adding line numbers to source code

    Frequently I feel the need for putting line numbers in source files which I put up in my blogs so that I can refer to them in the discussion that follows. /* 1 */ using Output=System.Console; /* 2 */ /* 3 */ namespace AbhinabaNameSpace /* 4 */ { /* 5 */ class HelloWorldMainClass /* 6 */ {...
Page 1 of 1 (15 items)