skip to main | skip to sidebar
  • Home
  • mindstorms
  • About
  • NoSQL
  • Think Differently Big
  • Profile
  • Wishlist
  • RSS
  • A parallel of equality in 2 worlds (Ruby and Java)

    Here is a short presentation of equality methods in Ruby and Java:
    RubyJava
    Object#equal?==
    Object#eql?Object.equals
    Object#==Object.equals
    Object#===N/A
    So, in both Ruby and Java we have an instance reference equality or identity (Object#equal?, respectively the == operator).

    Another similarity is for objects used as keys in maps (hashes). If you want to customize their behavior, in both Ruby and Java will have to override Object#eql? and Object#hash, respectively Object.equals() and Object.hashCode(). And that would be it with the similarities.

    In Ruby world, Object#eql? and Object?== are named equivalence. I haven't been able to find out the reasons for having both Object#eql? and Object?== and the only example I have found is the following:
    2.eql? 2.0 => false
    2 == 2.0 => true
    
    Ruby has another equality method Object#=== and this one is used only in case statements.

    Reference:
    • The Ruby Way
    • Programming Ruby- The Pragmatic Programmer's Guide 2nd Ed (known also as the ~PickAxe book)
    • Object#==
    • Object#===
    • Object#eql?
    • Object#equal?
    • Object.equals
    • comparing objects
    • which method do I have to override?
    • hash and ==
    • identity
    • equivalence relation

    category: Java, Ruby, Identity, Equivalence
    Read post...
    bookmark | email | 5 comments
  • Eclipse is waiting for Callisto?

    I am wondering if Eclipse is actually waiting for Callisto before it releases the final 3.2. There haven't been any post 3.2RC7 release candidates and not even maintenance builds on the 3.2. I know that Callisto aims to be a concerted release of multiple projects/plugins, and that some of us may like this idea, but I am thinking that this is making the life harder for other plugin developers (even if Eclipse has been in API freeze state for quite a while) and other products based on Eclipse (f.e. MyEclipse).

    Update: I think there is already a confirmation for my supposition.

    category: Eclipse, Eclipse plugins, Callisto, MyEclipse
    Read post...
    bookmark | email | comments
  • Can I validate my feed please?

    I am working on improving the InfoQ smart feeds (I will post another time on the real reasons why I call 'em this way, what improvements I am bringing to the current feed generator and biensure about the problems I faced [blink/]). And one of the most important things I need to do is to validate them. I have found several online services that are doing a great job:
    • FEED Validator (which by the way is providing an extensive list of errors and hints on how to solve them
    • RSS Validator
    • W3C FEED Validation Service
    Unfortunately, my environment doesn't allow me to use feeds URLs for validation, so the only one working for me is W3C FEED Validation Service, which allows uploading the content of the feed for validation.
    I am wondering if there are any desktop apps that do this, or some Ruby/Python scripts for doing this. Any hints?
    Update: I have found another RSS 1.0 online validator: Redland RSS 1.0 Validator and Viewer, but not yet what I am looking for.

    category: Feed, Feed Validator, RSS 1.0, Ruby, Python
    Read post...
    bookmark | email | 1 comments
  • Code reviews and tools (plugins) that may help

    After reading Cedric's post on Code reviews I remembered that I have used an Eclipse plugin that helped me doing code reviews: Jupiter (I have even submitted at that time some patches [blink/]). As far as I know the plugin is continuously improved so if you are in need for something like this go and get it a try.
    Another nice Eclipse plugin that might help with code reviews is Mylar even if its intention is not exactly this one.

    category: Eclipse, Eclipse plugins
    Read post...
    bookmark | email | 3 comments
  • Stripes?... sounds cool

    Being in an investigate/document/read mood these last days, and trying to figure out a good answer to Tim's question: What Web Application framework should you use? and Matt's answer, I've given a short read to Stripes documentation.
    And I must confess that at first glance I like it. It may sound weird comming from an WebWork/SAF developer, but hey, I am doing my best to be objective. I also have to confess that I haven't got time to really play with it, and I just passed through the documentation, which by the way is well written and clean.
    Talking about the rationale behind it (sounds like RoR success story [smile/]):
    The main driver behind Stripes is that web application development in Java is just too much work! [...] Others, like WebWork 2 and Spring-MVC are much better, but still require a lot of configuration, and seem to require you to learn a whole new language just to get started.
    The framework looks like needing almost no configuration (Zero external configuration per page/action (ActionBeans are auto-discovered, and configured using annotations)), tries to eliminate the need to duplicate domain object over the web layer and makes heavy usage of Java5 annotations (f.e. even for URL binding: UrlBinding).
    [...] But that doesn't mean that it can't run on a Java 1.4 JVM.
    and you can read a 2 page HowTo for using Stripes with 1.4 JVMs. There are many other interesting, and I would say important aspects needed for building a normal web app, but I am not gonna describe it here (because I haven't gained the knowledge to do it and I may present wrong ideas). Here it is a short list of things that I found interesting:
    • Use Defaults More
    • Spring with Stripes
    • Indexed properties
    • Intercept Execution
    • Localization (in fact I18N support)
    • Layout Reuse
    Quick updated: after reading the documentation on site, I have downloaded Stripes and hope to find the time to play with it a little.

    category: Web framework, Stripes, WebWork, Spring, Ruby on Rails
    Read post...
    bookmark | email | 6 comments
  • InstantRails using existing installations (tips and tricks)

    I've been reading a lot about Ruby on Rails, because being a committer on one of the most important Java web frameworks (WebWork) made me curious about it. But this post is not another RoR vs Java web framework post. (by the way, WebWork has already some productivity improvements and more work is on the way on the SAF2 (Struts Action Framework) side)
    Today, I've had finally time to install RoR on my laptop in an attempt to see it at work. I was looking for an installer that would make things very simple, and indeed the guys on Ruby community made it available in the form of InstantRails. A zip file, containing absolutely everything you need to start playing with RoR and immediately see your toys. Excellent decission!
    However, I've been a little bit intrigued by the fact that the zip file already contains a Ruby distribution (1.8.4) and also MySQL, both of which I have already installed. So I have tried to make it use the existing parts I had instead of its own copies. As advertised, RoR is about convention over configuration, so I couldn't figure out how to do this without some tricks [smile/].
    The tricks are quite simple:
    • copy all RoR related gems to your default Ruby installation
    • copy all SCGI and Mongrel scripts to your default Ruby installation dir
    • delete the ruby directory in InstantRails installation and use the excellent tool junction to create a link from ruby to your Ruby installation dir
    • use mysqldump utility to dump the example dbs in InstantRails
    • create these DBs in your MySQL
    • delete the mysql directory in InstantRails installation and use again junction to create a link from mysql to your MySQL installation dir
    After doing this you have an installation of InstantRails that uses your existing Ruby and respectively MySQL installation.
    I am posting this because I couldn't find any hints on achieving it on InstantRails mailing list archieves and I guess there may be other people trying to do it.
    category: Ruby, Ruby on Rails, RoR, InstantRails, MySQL
    Read post...
    bookmark | email | 3 comments
  • Agile boss, Agile PM and Agile developer

    The last days I have noticed some interesting discussions about agile techniques/strategies/etc. Being interested for a long time on this topic and anything related, and reading daily on InfoQ the agile posts, I thought I would like to touch another aspect of agility.
    Most of the discussions around agility are centered on what and how the developers must/should do. But, in my experience I have found out that managers and bosses have the real problem moving to agility (and it looks like others are having the same opinion). The problem is that most of project managers and bosses will not embrace agility (even if there are recommendations for them too). I don't know the reasons, but I can understand some of them.
    So, let's see some of them:
    • I don't think it is really possible to go out and win a project without good schedules, timeplans, decissions and budgetting. Your participation in the auction will be simply denied without these.
    • I don't think it is really possible to have your PM go into a financial meeting and say that there are some guestimates, but no real schedules
    • I haven't met many managers that would spend time explaining their thoughts (as a form of requirements specification)
    • it's hard to believe that all clients you will meet are agile, so that you use agile techniques while collaborating
    • many partner companies (the ones you do the project for) will not like to sit in the same room; they have already chosen to externalize the project because they don't have resources and they consider they should to something else
    In my humble opinion agility is not the silver bullet. I am not worried about some of its contradictions, because I know that methodoligies must be adapted and than applied, but sometimes I might get worried if or when finding out that agile never fails.
    category: agile, professional development, agile techniques, management, planning, collaboration
    Read post...
    bookmark | email | 3 comments
Older Posts Newer Posts Home

mindstorms

Software and web architectures, cloud computing and a flavor of tech startup entrepreneurship through the eyes of Alex Popescu.

About me: Software architect, Web Aficionado, Cloud Computing Fanboy, Geek Entrepreneur, Speaker, Co-founder and CTO of InfoQ.com, Writing also about NoSQL on the myNoSQL blog

Latest comments

Loading...

think differently big

Loading...

Tag Cloud Sphere ▼

Follow Alex on Twitter ▼

    follow me on Twitter

    Daily Cloud Stream ▼

    Loading...

    Show more articles

      • A parallel of equality in 2 worlds (Ruby and Java)
      • Eclipse is waiting for Callisto?
      • Can I validate my feed please?
      • Code reviews and tools (plugins) that may help
      • Stripes?... sounds cool
      • InstantRails using existing installations (tips an...
      • Agile boss, Agile PM and Agile developer

      Tags

      Archive

      myNoSQL a NoSQL blog featuring the best daily NoSQL news, articles and links covering all major NoSQL projects and following closely all things related to NoSQL ecosystem. Everything you need and want to know about NoSQL

      .
      • Alex Popescu @ LinkedIn
      • Alex Popescu @ Twitter
      • Alex Popescu @ Facebook
      • Alex Popescu @ FriendFeed
      • Alex Popescu @ Indenti.ca
      • Alex Popescu @ Disqus
      • Alex Popescu: Think Big Differenty @ Tumblr
      • Alex Popescu: A Lifestream of Differently Big Thoughts @ Soup.io