Pages

Wednesday, June 29, 2011

Using CDI in Java SE 6

What I really like about Weld which is the CDI (Context and Dependency Injection) reference implementation used in servers such as Glassfish and JBoss, is that they provide an extension where you can use most of the CDI features within a simple java application.

One of the main benefits for me is that i can test ideas I have for my web and Java EE work in a quick java app without having to wait for long builds and server deployment.  Of course it's also just a great way to write software, and any old java app could benefit from it, and it saves you writing a lot of needless code.

Here is a simple java program that prints out "Hello, Weld!"

@ApplicationScoped
public class WeldSeTest {

 public void sayHello(@Observes ContainerInitialized event) {
  System.out.println("Hello, Weld!");
 }
 
}

Thursday, June 23, 2011

Syntax Highlighting Test

@Inject
 @Any
 Event<IncSessionCount> incSessionCount;

 @Inject
 @Any
 Event<DecSessionCount> decSessionCount;

 @Inject
 private ReviewDocumentTracker tracker;

 /**
  * Default constructor.
  */
 public SessionManagerBean() {
 }

Friday, December 5, 2008

Netbeans 6.5 Subversion Woes

I have been trying to understand how Netbeans 6.5 (or any version) works with Subversion. There is a menu under Versioning called Subversion. In that there are a number of options, but the one I need, Import into Repository, is inactive. So how then am I supposed to import my local source into my remote svn repository?

I usually prefer Eclipse. It has been my IDE for a number of years. In Eclipse, versioning using Subversion is so simple. You add a repository location. The when you want to share your code by placing it into the repository, it just takes a few clicks to have it importing your source. So when I decided to use Netbeans to work on my PHP code, I found it easy to do because the .svn folders were already created when I was using eclipse. But when it comes to putting a new project into svn, I see nowhere how to configure a remote repository. So I am lost.

So why netbeans over exclipse? Netbeans has a much better IDE for PHP, especially with its code completion stuff. Eclipse PDT seems to be lacking. A collegue of mine hates eclipse so he decided to try Netbeans for our project. He kept talking about how cool it is, so I thought I'd give it a try. What made me hesitant to try it is with my experience using the beta version of netbeans 6.5. The php ide at that time just sucked, and even cause the ide to crash. It appears now that all the bugs were fixed. So I'll continue playing around with it. No doubt I am doing something wrong. We'll see.

Sunday, November 30, 2008

CritterCrawler: A Hypothetical Twitter App

I'm not sure if there is anything like this out there for the Twitter community, but I think it might be useful to have.

Every time I log into to my mac, I find an email in my inbox describing some new *itter app, which is a web app that adds some sort of functionality to twitter that twitter itself lacks.  For example, today I got a notification that new app called Mr. Tweet that finds "looks through your extended network to help you build effective relationships on Twitter."  I like it and I am now following a few more tweeters whose tweets seemed interesting.

Next is Qwitter which "e-mails you when someone stops following you on Twitter."  Not sure if I really want to know who has stopped following me.  I just can't take that kind of rejection.

So I thought to myself, maybe I should create an app that uses Twitter, and I am calling it CritterCrawler (or critterc or ccritter), which is a what I term the Creepy Twitter Crawler.  What does it do?  Well, I'm not sure.  But I imagine that it will be a kind of thing that crawls about and collects the tweets (is this the correct term?) of those that you follow and those that follow you in order to find matches to the things that interest you.  If the tweet points to a url then that will be crawled, but probably only to one level deep, and, as with finding tweets, it will bring to your attention any information that matches your bio, tags, interests, etc.

I can also imagine that it could also crawl, very similar to mr. tweeter, to find people and/or pages of interest.  If someon's tweets and links match your info (interests, etc), you would be notified and you could then choose whether you want to follow that person.

Although I have been a software developer for more than fifteen years and no doubt I could attempt with some measure of success to do it myself, I'd rather some young, eager person take it on because I seem to no longer have the stamina or motivations.  These days I'd rather think than do--you might say that I am an "open 'source' thinker," who lets others capitalize on the ideas.  


Reblog this post [with Zemanta]

Sunday, November 23, 2008

Website Images: Clip and Post

I think that it would be really cool if I could "clip" pieces of a web page, or right click on an image, and have it posted to your favorite photo site (e.g. flickr, picassa, etc.).  One of the reasons I would like to be able to do this is when I am blogging and want to embed an image.  Right now you can copy the image link from some image and embed it, or you can upload it to blogger (or whatever blog you have) and it will be embedded for you.

The problem with embedding an image that references the image from some web page is that if the image is moved or deleted, all you'll see is that box with the broken link image.  So why not upload from your PC?  Well, you can, but first you need to capture the image, save it to your hard drive, then go into your blogging app and upload it.  Too many steps.

Too ensure that the picture is always accessible and doesn't require a bunch of steps for uploading, you can upload the image to your flickr, picassa, etc., account.  Yes, this also requires several steps, too, but if I could do this all from a click or two on a web page, then that would make things simpler.

Another thought I had for wanting to do this is to be able to keep "scraps" in a kind of digital scrapbook.  I am always clicking, searching and surfing to find interesting stuff, and of course many things are related, but they are spread out over the place.  I can imagine a plugin that allows one to create a "scrapbook page" and as you surf, all you would need to do is clip part of the screen and have it saved in your book.

The reason  I want images instead of actual text is because it's not modifiable.  And what you are clipping is the exact representation.  But the images will be linked to the page from which they were clipped.

Now, alot of this can be done with a program called Jing.  Jing runs on the Mac (yay!) and Windows (booo) and allows you to capture any portion of the screen as image or live video (for making screen casts).  It allows you to upload video to screencast.com, a service that offers limited free access (2gig), or if you capture an image you can send it to either screencast.com or flickr, which, although free, limits you on storage as well.  But you can also save videos and images a via ftp or as a file.  For example, if I capture an image and save it to flickr, I can have it return the embed code so that I can just put it right in my blog. But Jing is limited to the folowing (see, I cliped this):



2008-11-23_1736


So okay, it's great for my first requirements.  But Jing is fixed in that these options are your only options.

But what about the clip and ship to a scrapbook?  This is where I thought a plugin could be made for all of the popular web browsers and that would confine you within the browser window, which is perfect, and provide a simple click to snip and save.  Okay, so with some playing I could do this with a word processor or something, but I thought that an integrated solution would be cool.

Of course this idea goes beyong the static scrapbook page.  I want the thing to create a page that would allow tagging and metadata and then present specific semantic relationships and recommendations.  This way I can use the thing in the way I think, the way I need it to be.  I want it all integrated and intelligent.  I don't mind that there are all of these applications out there to do similar things. I just want a way to pull them together to create something new... like a mashup but better.


Reblog this post [with Zemanta]

Friday, November 21, 2008

Cloudies: Get on to My Cloud

So I had this strange idea, and I can easily imagine that people have already thought about it, but having explored a number of web 2.0 sites such as social networking, media sharing, online storage space (e.g. Box.net), etc., I thought it would be cool if everyone could have virtually unlimited space in, to use a new buzzword, the cloud.

Here is how I thought about this working.  I have a shared hosting account at GoDaddy and I imagine that lots of people have similar hosting accounts hosted by various hosting services.  Without thinking about it I should be able to store anything on my "personal space" in the cloud and not care where it is or even how much it is because all of this space would be free.  How this could work would be like how pier networks work, but rather than a network of client-end computers sharing their space (e.g. from my pc at home via my cable modem), non-human agents could be deployed on a user's hosted system.  I could, for example, allocate 100gb from my hosted server to be used by us cloudies (users that connect to the cloud and utilize it's storage resources).

My 100gb of space would be used by any number of users.  As with a hard drive, when files are saved they take up free chunks of the hard drive space.  Something similar would happen with the cloud--a cloud drive anyone?  When I save a file a file from my computer using a phat-app, rather than go to my hard drive, it would be uploaded to my cloud.  But I imagine, especially given the curren trend to create richer web applications that can do all sorts of things, that we will all be using our "office" applications, for example, as web applications.  So rather than, say, use space at google when you use their office apps, space would be allocated somewhere else. 

There would of course be security.  Everyone could have a public key as part of, say, their OpenID.  Content could then be encrypted, especially if someone wants their stuff to be private or shared among a group.  But files/data/media could be public and shared by anyone. 

I guess the main idea behind all of this is that rather than use huge data storage facilities, it's kind of like a grassroots thing.  People just share the storage space that they have, if the have it, within the clouds.

So I haven't thought about all of it.  But hey, I like the term Cloudies (not sure yet if it is original) which explains what the new users of the cloud could be called.

Powered by ScribeFire.

Reblog this post [with Zemanta]

Tuesday, November 11, 2008

Track your Time with TSheets

I found one of the coolest web 2.0 applications called TSheets.  Even though it's not really free, you can take it for a spin.  Just create an account and have fun tracking your time.

Powered by ScribeFire.