So, I'm learning Ruby and Rails at home, and I'm absolutely loving it.
I love the little idiomatic stuff that make typing in it so concise.
Let's say that I have a list called mylist. I want to add an object to the list, foo.
In Java, I'd have to go something like this.
In Ruby, it's just this:
It's not earth shattering, but there are a dozen examples like this that I really like. If you understand the symbols and operators of the language, it actually reads just fine. Maybe I'm getting cranky in my old age and not wanting to type out all that stuff as much anymore.
Another perhaps bigger example was the "attr_accessor" convenience method.
What just happened here? For me, the critical part was the getter/setter bits. In Java, I'd have to select a menu option in Eclipse to generate the getter's and setter's for this class. Imagine a class with 10 fields in Java. You are NOT gonna type out those methods.
In the Ruby case, it's just 1 line of code. And, you can add more fields to the same line. "attr_accessor" tells us that what are our accessor methods. Nice!
See also attr_reader and attr_writer which do as you would expect, allowing only read or only write methods.
Wednesday, June 18, 2008
Alfresco partnering with Adobe
I just randomly hit my bookmark for the Alfresco blog today and was like...whoa!
It appears Alfresco is partnering with Adobe now on forms. They're gonna embed the Alfresco repository as part of the LiveCycle suite. Wow. Congrats if that works out for ya. Not sure how that works yet but I'm intrigued. I was just speaking with a colleague about forms applications and how badly OpenText did it in the past. Not sure if their competitors did it any better. Having not worked with LiveCycle directly, I cannot say that this is a good thing, only it's a big thing. Something to keep an eye on.
Here's the Press Release.
Read more... on their blog.
It appears Alfresco is partnering with Adobe now on forms. They're gonna embed the Alfresco repository as part of the LiveCycle suite. Wow. Congrats if that works out for ya. Not sure how that works yet but I'm intrigued. I was just speaking with a colleague about forms applications and how badly OpenText did it in the past. Not sure if their competitors did it any better. Having not worked with LiveCycle directly, I cannot say that this is a good thing, only it's a big thing. Something to keep an eye on.
Here's the Press Release.
Read more... on their blog.
Wednesday, June 11, 2008
MyEclipse Quirk
I discovered a really weird UI quirk with MyEclipse today. I updated a thread on the MyEclipse forum for good measure. But, this is the issue:
I've seen this where case where the Add button on the Manage Deployments dialog is grey or greyed out. It's the weirdest thing. This was happening to me on Ubuntu Linux today but I don't think that matters. Also, I'm using MyEclipse 6.x. And, this also happened to a colleague of mine using Windows a few weeks ago. It was maddening and I couldn't figure it out at the time.
It seems that if the current open project doesn't have focus, this occurs. Make sure to click somewhere on your project in your project explorer. Then click the Deploy button again to bring up the Manage Deployments dialog.
So, to re-create this problem click on a closed project on your package explorer then try to deploy. It should be greyed out.
I don't know if this is really a bug as much as it is a UI quirk?
I've seen this where case where the Add button on the Manage Deployments dialog is grey or greyed out. It's the weirdest thing. This was happening to me on Ubuntu Linux today but I don't think that matters. Also, I'm using MyEclipse 6.x. And, this also happened to a colleague of mine using Windows a few weeks ago. It was maddening and I couldn't figure it out at the time.
It seems that if the current open project doesn't have focus, this occurs. Make sure to click somewhere on your project in your project explorer. Then click the Deploy button again to bring up the Manage Deployments dialog.
So, to re-create this problem click on a closed project on your package explorer then try to deploy. It should be greyed out.
I don't know if this is really a bug as much as it is a UI quirk?
Friday, April 25, 2008
SQL's brain-lock on the development community....
I was reading this blog post by Tim Bray on the subway this morning. It seems so spot on to me. So, I'll link to it now and maybe comment on it later.
By the way, Tim was one of the co-founders of OpenText back in the day.
Tim Bray: Multi-Inflection-Point Alert. The comments are quite insightful as well.
By the way, Tim was one of the co-founders of OpenText back in the day.
Tim Bray: Multi-Inflection-Point Alert. The comments are quite insightful as well.
Wednesday, April 2, 2008
How Fast Can OpenOffice.org Be Extended?
Here's a nice article with code and screenshots on how to extend Open Office using Java. When I was playing around trying to do some stuff with Plucker, I also noticed they have a Java package to handle Palm database files (.pdb). Look around in their repository. You might actually find some useful code.
TDD, yeah you know me
If you've been keeping up with my rants lately, you know that I have become a big advocate of TDD in the last few months. But, it's a practice that's hard to convert people to, including yourself. I wish I could even get to the point with code coverage that I could get to this argument. Alas, I'm not there yet with my current group. Follow the link. There are a lot of good comments related to TDD following the post on Cedric's blog. Like anything, it's not for everyone, or for everything. But, you should at least look at the idea.
Otaku, Cedric's Blog: TDD leads to an architectural meltdown around iteration three
Otaku, Cedric's Blog: TDD leads to an architectural meltdown around iteration three
Sunday, March 30, 2008
Kindle envy
So my trainer last week showed off his Kindle to me. I must say I was more impressed than I expected to be. The demonstration turned into a discussion of the pro's and con's of owning one and why someone like me would be offended by the DRM included in the device. But, after thinking on his comments and looking at the features more myself, I am now wondering when I can afford one.
I read a lot of blogs on the subway. Soccer, programming, etc. I have even synced down technical documentation and manuals. My current process is to use Plucker ala the Sunrise application to sync those down to my old Treo. Code is not a very realistic option on my current device as it doesn't wrap well at all.
I'm cheap so I had concerns that owning a Kindle means I couldn't get all that nice free content down to the device. No problem. The Kindle has an email account you can send content to. If you have something in Word or text you can email it to the Kindle account and it will show up on the device. The device comes with wi-fi.
My current method works great but a nicer screen is so tantalizing. I want to read more. Unfortunately, I don't have the money to be buying books as often I would prefer. And, NYC doesn't have a nice chain of half-price books with good books on the shelves ala the likes of a Half-Price books in Austin. Alas, my choices are thin on the ground.
The Kindle screen is excellent for reading. It's hard to see the difference on a PC screen. If you know someone with one, just take a look at theirs.
I was surprised to see that they sold out on the Kindle in five and a half hours. Jeff Bezos apologized that there was still a six week delay. Interesting. As of today, the price is still sitting at $399. Ouch. Maybe at 300-350 this would be more attractive for my pocket book. However, demand will not allow for such a price reduction anytime soon. It will take competition to force a price reduction.
Maybe in 2009 things will look better.
I read a lot of blogs on the subway. Soccer, programming, etc. I have even synced down technical documentation and manuals. My current process is to use Plucker ala the Sunrise application to sync those down to my old Treo. Code is not a very realistic option on my current device as it doesn't wrap well at all.
I'm cheap so I had concerns that owning a Kindle means I couldn't get all that nice free content down to the device. No problem. The Kindle has an email account you can send content to. If you have something in Word or text you can email it to the Kindle account and it will show up on the device. The device comes with wi-fi.
My current method works great but a nicer screen is so tantalizing. I want to read more. Unfortunately, I don't have the money to be buying books as often I would prefer. And, NYC doesn't have a nice chain of half-price books with good books on the shelves ala the likes of a Half-Price books in Austin. Alas, my choices are thin on the ground.
The Kindle screen is excellent for reading. It's hard to see the difference on a PC screen. If you know someone with one, just take a look at theirs.
I was surprised to see that they sold out on the Kindle in five and a half hours. Jeff Bezos apologized that there was still a six week delay. Interesting. As of today, the price is still sitting at $399. Ouch. Maybe at 300-350 this would be more attractive for my pocket book. However, demand will not allow for such a price reduction anytime soon. It will take competition to force a price reduction.
Maybe in 2009 things will look better.
Subscribe to:
Posts (Atom)