Intro to Java Adapter Pattern

This entry is part 11 of 13 in the series Intro to Java

In the last lesson we looked at patterns in general and why we might want to use them. So here is our first pattern. We are well on our way to creating a common language with which to talk design.

One of the reasons I picked this pattern to start with, is that it is very easy to understand. It models real word situations very well, and that is what OO design is supposed to do right, model real world objects?

The Adapter in the Physical World

The concept of an Adapter is easy to understand. It does just what it is named to do. It adapts one object to that of another. Take the wall plug. It has three rectangular holes set at angles to fit the plug. It does? In Europe it does. We are traveling and need to plug our laptop into the wall. What do we use? An adapter.

The Adapter in the Software World

The idea is not so different in the software world. When you want to connect one class to another class that was not designed to fit together, you need an adapter class. Let’s look at an Java example to see how we can adapt one class to another.
Continue reading

Just Visiting Sunset

Just Visiting Sunset 

Here is another of the “just visiting” shots of my father. This one was less about the buildings and more about the sunset. This image was underexposed -3EV to really bring out the sky. The colors were all there, but I did pull them up a bit in Aperture. I then hit him with the flash, a SB800 with the diffuser.

Now, after getting into Joe McNally’s Hot Shoe Diaries a bit, I wish I had tried something that he has done, which is to take the diffuser off and zoom in the flash. Maybe try a snoot. Something that would focus the light on the person and control the amount of light that hits the railing, which is kind of ugly.

Happy Earth Day

I set out this morning to take this picture, but forgot that they would be closed. Didn’t look very good. Took these a little while before posting them this evening. I started with my 50mm f/1.8, but ended up using the 70-200 f/2.8 racked out to 200. The working distance was nice, but couldn’t get quite as close as I would like. Still, turned out pretty well.

Earth Day Crocus

Just Visiting

Just Visiting My father was visiting from Winnipeg. I used the oportunity to take a picture with off camera flash. The camera is triggered by a friend, I am holding a SB800 just out of frame at about 45deg from him. There is also a street lamp to his right.

I think I should have hit him with a bit more light. Maybe tried from the other side. Still getting used to this off camera flash deal. I think I need to try brighter than I think works in the viewfinder in these night shots.

Also, I am going to try bringing my umbrella with me and getting much closer to my subject next time. This one is just with the diffuser, and I am a little too far away.

Intro to Java Patterns

This entry is part 10 of 13 in the series Intro to Java

Patterns are a very important part of Java. They allow us to speak a common language. The names can be misused, and thrown around by people trying to sound important, but they really do help us to be able to communicate ideas between us.

It does take some Java knowledge to be able to read, use and apply patterns, but I think we have seen enough Java and OO principles to start looking at patterns. It is good to start hearing about and seeing different patterns at any level of Java programming.

So what is a pattern? In the physical world, it would be a series of steps taken over and over again that could be written down and repeated. In the software world, it is not really a set of steps, but a software solution that people apply over and over again in their coding. Experienced developers have put these solutions together, and given their pattern a name. By looking at and studying patterns, we can take advantage of the experience of others, and learn from their solutions. One interesting thing about patterns, is that they don’t need to be language specific. If you learn about the Adapter or the Command pattern, you can apply that pattern to PHP, Ruby, or Java.
Continue reading

Guthrie Silhouettes

Art House Ghosts

I was out shooting in Downtown Minneapolis with some friends on friday night last week, and we decided to go have a look from the Guthrie’s overlook. None of us had been up there. Very cool overlook, and I will have pictures from that later, but here are a couple I took as we were on our way there.

There was this great big long glowing red wall. Very cool. At first I was just setting up for some geometric shots, but then some people cam by, and I think that made the shot. It is more interresting with the people in it, even if they are “ghosting” through the frame. I’ve got to remember that everything doesn’t always need to be sharp in a frame.

Then I set up for a self portrait of sorts. I was going to use a wireless trigger, but I got Rich to take the shot for me. I also tried a shot with a flash fired directly across from me, but that just made a weird shadow, and having one part of the picture show up (me from the flash) looked odd. The silhouette looked much better.

Silhouette On Red

BuzzBoost your Feedburner Feed via Javascript

Well, it was pointed out to me that there was an easier way to get RSS feeds onto your site. Feedburner. Guess what. It is also a Google product. Sheesh! Basicly, you need to get your feed registered with Feedburner. Then you can use their BuzzBoost to create a piece of Javascript that will get your feed for you. It is pretty similar to what the GoogleApi is doing that I talked about earlier. The difference here is that Feedburner has a control panel where you set up how  your feed looks. No need to figure out any Javascript at all.

So this is my feed via WordPress.

This is my feed via Feedburner.

This is a snipit of my feed from the BuzzBoost.

Subscribe to RSS headline updates from:
Powered by FeedBurner


And this is the code that was generated that I pasted in. Pretty simple. I had a hard time getting feedburner to recognize my feed, but I am not sure that is feedburners fault. WordPress appears to take a really long time to respond with the feed.

Studio Strobes vs Speedlights

Scott Kelby has a post up where he compares studio strobes and speedlights. This is somthing that I have had going on in my head for quite some time now.

I took a studio lighting class, and the instructor was pretty anti speedlight. Maybe he just hasn’t use them much. I sure wouldn’t want to tell Joe McNally and David Hobby that small off camera flashes don’t put out good light. So, I decided that I would start small. Leave the studio strobes for some later time. Let me be able to say that I can do everything that is possible with one light.

So what did I buy? Well, I had an SB800 before the price lept off the insanity board. I figure you need a hotshoe flash no matter what, so it wouldn’t be a wasted light purchase. I now use it all the time. So what other gear¬†I purchased was a strobist kit from mpex (without the flash). See this post from a couple of days ago. I still intend to post more about the kit, but¬†I took these pics recently with that kit and that mini softbox from the friday post

I have to say that you can get quite different pricing than Scott got. Not on the same equipment, but how “pro” do you want to go? Mpex has one light¬†strobist kits for $219 that includes a flash! Yes, I know that it isn’t as powerful or feature rich as the SB-900, but hey, the price of entry is pretty cheap.

Then there are the alien bee’s studio strobes. The AB800 is $279. That is quite a bit cheaper than the Elinchrom BXRI 500s. ($625 at B&H, but out of stock) So are the AB800’s second fiddle? I haven’t seen enough lights to know. I do know that there are several people that have appeared on Scott’s guest blog that use Alien Bee’s lights, including Zack Arias and Dustin Snipes. I also used the ABR Ring Flash¬†at my class which I loved. So… when I get around to it, I am leaning to the bees.

But for now, I have a lot of learning to do. I have the Nikon CLS video¬†waiting to be watched, and I have wanted to order the Strobist Workshop DVD’s¬†if not attend a workshop myself. I think it would also be cool to attend a One Light Workshop with Zack Arias. ¬†I have read Joe McNally’s The Moment it Clicks, and right now I am reading The Hot Shoe Diaries.

That’s a lot of material to master. I figure I might add another speedlight, or LumoPro LP120¬†from mpex or two in a little while, but maybe I will wait until I can pull of this group shot with a single SB26 manual flash.

RSS Feeds via Javascript

I set about recently to try to get a RSS feed parsed using only Javascript. Not as easy as I had thought it would be. I had figured that there would be several Javascript library’s around, and I thought for sure that someone would have a jQuery plugin for it. Well, I did find jFeed, but it suffers from a rather large issue. It can’t access sites from a different domain from where it is running. This is really a Javascript security feature. I did a simple AJAX test, and sure enough, Javascript stops us from directly accessing another domain (to prevent cross site scripting attacks).

How do you get around this issue? Well, a php based proxy is one solution. You call via AJAX, this php file that then makes the request to the real feed, and sends it back. That didn’t seem like a simple or elegant enough solution.

I found RssToHtml, which is a PHP script that you can use the parse the RSS feed. Using this, you can even use an server side¬†include to get the feed. This¬†didn’t work on my machine¬†that would only¬†run cgi scripts from the include.¬†

I had just about given up when I stumbled upon the Google AJAX Feed Api. Google to the rescue again.
Continue reading

Busy Weekend Taking Pictures

Wow, this was a busy weekend. Friday night I got out to shoot some of Minneapolis from around the Stone Arch bridge. We also went inside the Gutherie and that new thrust walkway thing that juts into space. Very weird, but a pretty cool place to take some pictures. I am still going through them, but after a quick look, I think my favorites of the night were when I included my father with an off camera flash.

Then yesterday I was at a 15 year olds birthday party. Myself and a couple of others were there to take pictures of her and her friends. I don’t think a fashion shoot in Milan could have had more outfit changes. It was a lot of fun though, with pictures to come.