Hodges' Model: Welcome to the QUAD: IDE

Hodges' model is a conceptual framework to support reflection and critical thinking. Situated, the model can help integrate all disciplines (academic and professional). Amid news items, are posts that illustrate the scope and application of the model. A bibliography and A4 template are provided in the sidebar. Welcome to the QUAD ...

Showing posts with label IDE. Show all posts
Showing posts with label IDE. Show all posts

Monday, April 07, 2008

NetBeans, Eclipse and IntelliJ

I've made some progress getting to know Eclipse as a programming environment, but on Friday night (as per the post) I was told about JRuby (which I'd confused with IronRuby) and advised to take a look at NetBeans. So now it's installed, registered and yet another 'hello world' program has run.

Although I know little of Java I recognise an industry heavy weight when I see one. Walking past the coffee house at Oxford Road Manchester I often wondered wish I had time to get to know Java proper. Java's is too much for me and like the armchair astronomer I currently am, in theory so far Ruby has caught my eye and imagination. Behind Java though there is a huge catalogue of libraries and at present Ruby is written in Java.

Apparently the IDE of choice is IntelliJ, but this is not Open Source. I will download this too c/o a trial demo. Wonder if they sponsor worthy causes...? Following Scotland On Rails and Joe O'Brien's observation to focus on Ruby not just Rails, I must also use irb - that is interactive Ruby. It's copied on to the Eee PC now.

I'm working my way through the jQuery in Action book. One existing website page that will benefit from a review and recode is the FAQ. Already I'm thinking about what animations /effects it is sensible to use. It will be interesting to revisit the page created in response to Pippa's question on the humanistic-mechanistic axis. The jQuery used was lifted from a tutorial/blog site and although edited it probably contains some errors / redundant code.

I have not mentioned Drupal for a while, we'll get there.... There's another book on the shelf Learning PHP & MySQL. Must chase the new Drupal 6 book from Mercer too.

Friday night chatting another Ruby-Rails delegate in Edinburgh mentioned having been put-off by the prospect of tackling databases and then I realised: Yes, that's me too - the rabbit like eyes : the glare of headlights - it's all there.
Must seek some therapy, or get off the road....

Saturday, February 23, 2008

Domain Specific Languages [II] + a Ruby mixin

Last year in one of those pick-it-up:put-it-down cycles, I surfed into this article on DSLs and Ruby c/o:

Artima logo

Ruby Code & Style Creating DSLs with Ruby
by Jim Freeze, March 16, 2006

Although as mentioned the other week, I'd read - and keep reading! - Chris Pine's intro Ruby book and the Thomas's Pickaxe, much of the code is hard to follow for a beginner - here's a snippet (from page 3 of 4):

[n.b. Some lines below are incomplete due to Blogger's interpretation of the characters]
Again, we update the require statement in dsl-loader.rb to load the mydsl4.rb file and run the loader:
% ruby dsl-loader.rb params.dsl
#
["@parameter", "@name"]
This is all well and good, but what if we don’t know the parameter names in advance? Depending on the use cases for the DSL, parameter names may be generated by the user. Never fear. With Ruby, we have the power of method_missing. A two-line method added to MyDSL will define a DSL attribute with dsl_accessor on demand. That is, if a value is to be assigned to a (thus far) non-existent parameter, method_missing will define the getters and setters and assign the value to the parameter.

% cat mydsl5.rb
require 'dslhelper'

class MyDSL
def method_missing(sym, *args)
self.class.dsl_accessor sym
send(sym, *args)
end

def self.load(filename)
# ... Same as before
end
end

% head -1 dsl-loader.rb
require 'mydsl5'

% ruby dsl-loader.rb params.dsl
#
["@parameter", "@name"]
Once again Olsen's - Design Patterns in Ruby has helped me (to begin to) understand  method-missing (p.184). I swear I heard some clanks as the pieces re-arranged themselves and one or two fell (almost) in place. Having copied Freeze's code into Ruby, it would not run. At least now the code is not as complex looking at it was and reading it through now it makes a lot more sense. I'm really looking forward to trying this again in Eclipse. On that first exposure I had a vague notion of the principle of method-missing, but reading Olsen's book I've a better grasp and may be able to keep hold of this and other Ruby concepts. Believe me that helps in my pick-it-up:put-it-down world.

more to follow ....

Saturday, February 09, 2008

Early spring PC clean: Eclipse, Drupal, PHP & Ruby

My PC is over 5 years old, that's no problem as I like to squeeze every bit out of them.

I've recognised for a quite a while that there are obvious connections between Drupal, PHP, MySQL, HTML, CSS and Javascript. There are additional connections though when Ruby and Protege are thrown into the mix. The common thread seems to be the Eclipse IDE integrated development environment. This presents the biggest challenge at present and it is clear what I have to do: So long Dreamweaver - I really DO need to adopt Eclipse.

The Smalltalk* V DIGITALK package is sat on my shelf laughing at me and that's a really scary, dusty grin. The Smalltalk IDE was so tantalising and yet I couldn't get past base. Borland's Prolog (later PDC Prolog) plus Delphi also failed to take off for me (although PDC Prolog did help with my studies at the time).

Clearing the PC cobwebs today (have you checked your PC's air vents recently?) I found an old Eclipse 2 folder and have deleted version 3.1 and finally downloaded 3.3. Aptana and the Ruby development tools were installed, so there are now plug-ins to chase. Apparently, there's a plug-in for PHP too, which is why I wonder whether Eclipse can do it all? That is of course if I can learn enough to hear the harmony.

I've found a good series of tutorials, but my reflex book search suggests there are not many general intro books on Eclipse 3.x:

http://eclipsetutorial.sourceforge.net/workbench.html


I won't delete Dreamweaver MX just yet...

*Currently, reading about early interface and interaction development in Bill Moggridge's Designing Interactions, which includes Smalltalk - p.69 a great book in weight and content. More to follow...