Wednesday, August 3, 2011

PostgreSQL

When using the psql command line interface for PostgreSQL here is the command to get a list of all the tables in the database for a particular schema.



SELECT tablename FROM pg_tables WHERE schemaname = 'someschema';


Just replace someschema with your actual schema name and fire it off.  Voila a list of all the tables. #commandline4eva

Tuesday, August 2, 2011

Maven 3 and Nexus Incompatibility

Just a quick post on something I came across today.  We are in the process of upgrading to Maven 3 and everything worked fine on my local machine and even on our build server using Continuum.  However, when attempting to download the artifact generated as part of the build process I was getting an error about the artifact not being found.  I looked in Nexus and the artifact was there and the build results showed that it had indeed been deployed.

After a little searching I found the problem to be caused by a change in Maven 3 during the creation of the metadata that gets deployed to the repository.  Maven 3 has added some more information in the metadata than Maven 2.  In my case the version of Nexus we are using (1.6) has some issues with this change and doesn't correctly notify clients of the version.

Here are three possible fixes:
1. Upgrade to Nexus version 1.8.0.1 where the issue has been fixed. (http://goo.gl/AVgbT)
2. Stay at an existing version of Nexus but replace a library with a patched version (http://goo.gl/AVgbT see Maven 3 Metadata section for link)
3. Add the following parameter -Dmaven.metadata.legacy=true to your execution of mvn deploy. (http://goo.gl/7ZUix)

I went with the 3rd option because it was the least intrusive and now all is well.

Sunday, July 17, 2011

Time For An Upgrade

Over the last few months I have been thinking a lot about our computer situation.  We have been busy with iPads, iPhones and all sorts of other devices, but haven't done anything about our computer.  We have owned our late 2006 MacBook since the spring of 2007.  We seemed to have purchased it at just the right time.  It was the first MacBook with the Core 2 Duo chip which is the bare minimum for running Mac OS X Lion.  We have upgraded the RAM to 4GB and also upgraded the internal drive to a 500Gb unit.  Overall the computer is still running very well with a rare hiccup here and there, a battery that doesn't hold its charge and a fan that tends to run all the time.

The two things I would like to improve upon are the amount of storage space on the computer and also some performance improvements.  No matter how well its running it is now over four years old and doesn't run as fast as the latest greatest.  With regards to storage the 500Gb drive is now almost 80% full.  This includes about 60Gb for iTunes (music, movies, tv shows and apps), 150Gb for photos, and about 200Gb for videos.  This doesn't include the 200Gb of videos stored on an external drive.  For some reason I am obsessed with getting all of my media on a single drive, of course I never really go back and look at videos from four years ago, but also don't like the idea of plugging in an external drive in order to do it.

So my current thinking is to purchase a Mac Mini as our central media computer with the iTunes library, and all of our photos and videos.  Its a reasonably priced machine and I can easily leave an external drive hooked up to it for backup and when adding more space.  We would keep the MacBook and remote into it if we wanted to access or manage the media.  Our documents are all stored in DropBox so they would just synchronize regardless of where we keep them.  As for the MacBook I would like to try to attempt one more round of improvements and see how it goes.  I would first replace the slow hard drive we have now with a 64Gb SSD drive.  They have come down in price and since I wouldn't be storing much stuff on it 64GB should be plenty.  I could then use the MacBook for doing work stuff or developing (not exactly sure what this means exactly).  I don't know for sure if the SSD will make things faster, but it is very likely it will be much faster than the 5400RPM drive we have now.  If it turns out that the computer is just too slow still then the next step is to decide if I want a 13" or 15" screen.  If 13" then I would have to choose between the MacBook Air and the MacBook Pro.  That will come down to wanting to pay for performance or not.  If 15" then it means I am going with the MacBook Pro.

Of course all of this hinges on the specs for the new Mac Mini that is expected in the next couple weeks.  Hopefully it comes with some bigger drive options and ThunderBolt. All I can do now is wait...

Sunday, June 26, 2011

The Cloud Goes Mainstream

Several weeks have passed since the Apple WWDC and I am finally starting to wrap my head around the new iCloud product and also the bigger picture of how cloud based computing is going mainstream.  Initially after the keynote I was lukewarm on iCloud because my expectations shot for the moon. It was foolish of me to think that Apple was going to dramatically shift the computing world with one product. History has shown that they prefer the route of baby steps as was seen with the original iPhone in 2007 that was released without a developer API and only included 14 apps out of the box.  Of course every year since giant chunks of new functionality have been added to each iteration of iOS and now the "missing" feature list is negligible. Now that I have put things into perspective it seems like this is just the early stages of what is to come from Apple.

Browsers are the Future
In early 2008 it looked as though software inside the browser was the way of the future. Most users had migrated completely to online email clients thanks to the rich user interfaces of Gmail, Hotmail and Yahoo! mail.  Online photo management via Picasa, Kodak Gallery and Flickr also started taking off.  Online word processing and spreadsheets existed, but they were still very raw and hard to use because of the limitations of the browser (darn keyboard shortcut interception). Besides the move towards web apps nobody (besides gamers) was running out to the store to buy software in a box, beyond the staples of Microsoft Office, Quicken, TurboTax and a few assorted random applications.  The move by consumers towards using a single application, the browser, also lessened the importance of the operating system as well as the need for getting the latest and greatest hardware to run multiple applications.  Simply put you could plop down at nearly any computer with an internet connection and a browser and take care of most of your computing needs.

The Apps Arrive
All of that changed in the Spring of 2008 when Apple released a developer API for the iPhone operating system (now known as iOS) and announced that they were putting the App Store on every iPhone and iPod Touch.  Once the App Store opened things changed and people started buying software again.  Nearly overnight companies of one were releasing games that would rocket to the top of the App Store and put these developers on the map.  It seemed at one point like everybody was releasing apps from big retail companies like Gap and Target, to dads like me who just wanted to get their kids to sleep through the night. Of course there was controversy around the closed nature of the store and certain apps getting declined for sometimes what seemed like random reasons, but that is for a different story. What's important is that the clear future of browser based software all of a sudden became a little fuzzy.

Disposable Hardware
I didn't have much luck with my first iPhone 3G, I had a hardware problem that caused the orientation of the phone to get locked in one direction until I restarted.  Thankfully Apple is relatively understanding when it comes to issues of this type and after a brief conversation at the Genius Bar I was given a new iPhone 3G on the spot.  I was pretty psyched about this and headed home ready to set my iPhone up again.  Once I got home I plugged the phone into the computer and iTunes asked if I wanted to restore from a backup. I wanted to say, "Hell yeah I want to back up", but the button only said "Ok", so I clicked it.  Within minutes my new iPhone 3G was, well my old iPhone 3G minus the hardware glitch.  With this new device Apple had made the device itself disposable in some way.  Computers didn't work this way.  If for some reason your computer hard drive crashed, putting it back together typically involved several late nights of copying files, tweaking settings and never getting back to exactly where you had been.  The new iOS devices could be returned to their original state within minutes all with negligible user interaction.

Introducing iCloud
By June of 2011 the App Store had become a huge success and had expanded to the iPad and even the Mac.  Steve Jobs took the stage to finish out the keynote at the WWDC and started talking about iCloud.  Now prior to this I was expecting we would all just put everything on Apple's servers somewhere and magically stream things wherever we wanted.  Instead Mr. Jobs said iCloud will provide free push email, calendars and contacts (yawn). iCloud will sync your camera roll across your iOS devices and Macs (rubbing eyes). iCloud will let you download any music you already purchased onto any of your devices (focused). iCloud will let you backup your iOS devices settings (nodding off again). Finally, we will be providing an API that will allow developers to save their applications data to the cloud (fell asleep). Sadly the one I was most dismissive about has the most potential.

The Key to iCloud
The success of the App Store makes this one of the more important features of iCloud.  Users currently using apps are for the most part limited to working with "documents"within that app on a particular device and due to the lack of a file system can't easily access those "documents" from anywhere else. iCloud changes that buy allowing you access to the same "document" across devices both iOS and Mac OS.  Again the device becomes irrelevant.  With iCloud you could throw your Mac into the ocean, buy a new Mac, download your purchased app and immediately resume work as if nothing happened.  Voila the feeling of a browser based world, but with rich native apps.  With more and more apps coming from the App Store, more and more apps will be able to save in iCloud, all with little change in user behavior. The user basically continues to use the app as they always have, but behind the scenes it is getting saved and backed up for them. Oh yeah and lack of an internet connection is no big deal, because it will just back up when it gets the chance.

The Other Approach
While all this app craziness is going on Google hasn't just been sitting around waiting Apple to lead the way they have continued to push the envelope with browser based computing.  The Google Chrome browser is an ever evolving "platform" which is blurring the lines between native application and browser based application.  The quality of browser based applications has improved dramatically thanks to newer html5 standards and improved robustness of first generation applications.  The Google documents of today is a far cry from the first iteration and gmail has added so many features in the last couple years it is hard to shut them off fast enough.  Google also rolled out its own web app store which has provided users with access to many of the titles found in the Apple app store. The strategy they are taking is to get people to work in the browser and make the operating system and hardware irrelevant.  They even have created their own operating system called Chrome OS, which is essentially an operating system in a browser.

How The Story Ends
It is hard to say how the story ends.  I like Apple's strategy of near transparency when it comes to the cloud.  In my experience the less a user has to think the better for everyone.  Users need things to be really easy for them, they can't be worried with backups, they can't be concerned with a file system  (or trusted with it). They want to open up an app and be able to easily start something new or continue where they left off.  One difficulty I see is the restriction to iOS and Mac OS devices. While Mac sales continue to improve they still represent a very small share of the market.  Of course this only makes the sales pitch for getting a Mac that much easier.  "Hi Mr. Customer, you say you have an iPad and you use Pages to do word processing. Well if you buy a Mac and link it to your account you can download Pages for free and will also immediately have access to all the documents you created on your iPad. Oh yeah an all the music you bought in iTunes will all just be downloaded."  Switching to Mac has never been easier.

Google's strategy of getting everybody to work directly in the cloud is also pretty strong.  I spend a majority of my day in a web browser and with Google Chrome's syncing of settings across computers it is easy to just log in and continue where I left off.  The big hurdle with anything browser based is getting the average user to understand how it all works.  First of all the internet address (URL) thing still confuses people.  Raise your hand if your parent always goes to google to do anything. Why do you think Facebook gets so many Google hits?  As simple as it may seem the browser is just too complex for some people to use. Native apps on the other hand are concrete things users can click on and once loaded are isolated to their own little world.  Oh yeah and I forgot to mention getting somebody to download a new browser to use is next to impossible especially on a Windows machine.  I think my dad still uses the MSN browser.  Bottom line as long as somebody has to type an address to do something it is going to be difficult for the simple users. As for the Chrome OS, I think the likelihood of anybody I know going out and buying one is slim to none.  I only know a handful of people who have upgraded to Windows 7, most people are sticking with XP until they can trust 7 or have a Mac running the latest and greatest version of Snow Leopard.

Unanswered Questions
Lots of questions have been answered with iCloud and recent offerings from Google and Amazon.  My music is going to be stored in the cloud in one of two ways: The right to download it (iCloud) or the right to stream it (Google and Amazon).  Okay I am good with that.  Documents will be stored one of two ways: Locally with a backup in the cloud (iCloud) or accessible in the cloud (Google).  Apps will be taken care of either: Locally with rights to download (iCloud) or directly in the cloud.  Okay that takes care of most of the types of things I store on my computer, but what about personal photos and videos.  There really isn't a fully baked solution with iCloud, but there are lots of online options outside of the Apple universe like Picasa.  Movies and tv shows were left off the list of iCloud supported content.  Alternatives for those on the internet include things like Hulu, Netflix and YouTube.

It seems that Apple still has a little bit more work to do in order to make the computer as disposable the iPhone, but they are well on their way.  Now I just have to wait and see how things pan out.

Monday, June 6, 2011

The Latest Apple Announcement Recap

Most people know there was a big Apple event today, unfortunately only a couple sound bites will make it out to the average person via the mainstream media.  So I am going to attempt to break it down for the masses.  I am going to go in order of how it effects people and also what they are going to care about most.

iOS 5

The operating system of the iPhone, iPad, iPod Touch and Apple TV has now been around for 4 years and is getting a ton of new features this fall in its fifth major version

  • Notification Center - One of the most annoying features in iOS up until now has been the notifications that pop up over everything and require a quick tap in order to do anything else.  Notifications will now flip  up in a little area at the top of the screen.  The Notification Center is a centralized spot for all notifications that can be easily accessed by swiping down from the top of the screen.  The lock screen will also give list out your notifications and give you one touch access to the app with the notification.
  • Camera - The camera app is getting a couple improvements. The up volume button can now be used as the shutter instead of just the onscreen button.  Camera will now come with some built in editing tools.  Camera can now be launched directly from the lock screen
  • Reminders - A brand new app is joining the out of the box bunch and it is a To-Do list/Tasks app.  You can add items and uncheck them as you complete them like a regular task list, but you can also set up reminders by time and also by location.  For example, if you are out to dinner and remember you forgot to close the back windows you can set a reminder to pop up as soon as you get home regardless of when you get home.
  • WiFi Sync - Ever since the first iPod the only way to get anything from your computer to your iPod was to connect a cable and sync via iTunes.  In iOS 5 you can now sync over wifi.  Just plug your iOS device into a power source at home and it will automatically sync with iTunes, backing up your device to iCloud and getting the latest and greatest information from iTunes.
  • iPad Usability - The iPad is getting a couple cool new features of its own.  A special split onscreen keyboard for typing while you hold the iPad up with two hands. Multi-touch gestures for switching between apps, going to the home screen and other basic navigation.  Tabs in Safari.
Of course this is only a subset of the many features, like full Twitter integration, iMessages, Newsstand and many more which can be found at the Apple iOS 5 Page

iCloud
I think iCloud is one of the most interesting things to be announced today, but also probably one of the most confusing.  Up until now Apple has offered an online service called, MobileMe. It is a paid service that provides users with an email address, and also access to a cloud based calendar, mail service and contact application.  It costs $99 a year and had limited success.  The service did integrate well with iOS and provided one of the first methods of getting data pushed out to iPhones.

The new iCloud is MobileMe reborn, but with a couple new features and its free!! Once again you get email, calendar and contacts as with MobileMe, but with iCloud you also get storage of documents and the backups of your device contents.  You can also download any apps, books and music you have purchased from Apple from any of your devices whenever you want.  So if you own the latest Lady Gaga album, but don't have it on your iPhone you can go to the iTunes app and download it to your phone for free.  Finally there is a new PhotoStream feature that will sync your Camera Roll across all your devices including your Mac.  So if you take a photo on your iPhone it will automatically go to the cloud and then appear in the PhotoStream album on your iPad and also in iPhoto on your Mac.

Okay so that's all good, a bunch of stuff will automatically get saved somewhere and then be synced across multiple devices.  I am looking forward to syncing photos across devices and also being able to download purchased content, but as for the documents (I don't use any of the iWork stuff) and mail stuff I don't think I will use it.

It doesn't stop there though... there is one more thing which you will probably hear the most about in the news, but will not be reported on correctly.  The iTunes Match service is going to read all of the music in your iTunes library including all the stuff you spent hours and hours ripping and will match it to music in the iTunes Music Store.  For the price of $25 a year you will be able to access all of that music from any of your devices.  So if you were a huge Aerosmith fan and had 15 of their CD's imported into iTunes you will now have access to all of the CD's from your iPhone without having to actually have them on your iPhone.  The best part is you actually have access to the songs on the iTunes store which are most likely in a better quality format than what you have.

The big question with iTunes Match is; What happens if you decide not to renew your subscription?  Will you get to keep the new and improved quality versions of the song?  I am still on the fence about this, but it would be nice to get more up to date audio quality and also would be great to have it all backed up to the cloud.  More information can be found at the Apple iCloud page.

Lion
Finally I will briefly talk about the latest updated to Mac OS X, called Lion.  I don't think there is anything new to report since February.  The big deal being made about this release is how Apple has taken functionality from iOS and brought it back to the Mac.
  • Mission Control - A single view to see what apps are open on your Mac.
  • Multi-Touch Gestures - The entire operating system is now full of lots of multi-touch gesture support.  Oh yeah and they got rid of scroll bars.
  • Auto-Save - Apps will now be able to auto save with support for revisions, reverting to old revisions and duplicating.

Wednesday, May 18, 2011

A Computer-less Vacation

My wife and I recently decided to go on our first parents only vacation to Puerto Rico. Now like any true geek dad, near the top of the required list for any vacation is the camera and the laptop (anything else can easily be replaced). Over the years each of these items has improved to bring us to the killer pair of a Canon Rebel T1i and a late 2006 MacBook, today.  Since we were trying to pack extra light I thought it would be the perfect time to try to go laptop free for a vacation. Note I said laptop free, but not tablet or smartphone free.  The iPad 2 and iPhone 4 rarely leave my sight and this trip would be no exception.  The iPhone would help us navigate the island and also let me tweet all about our vacation.  The iPad 2 would be my all purpose media source (books, movies and games) and more importantly using FaceTime we could video chat with the boys back at home.

So the first problem of video chatting was solved, by the iPad 2.  However, I still had two other problems to overcome before I would truly be able to enjoy my vacation.

Problem 1: No WiFi
It may be hard to believe, but after calling the hotel we found out that each room had free wired internet access, but WiFi was only available in common areas.  As much as I would love to do all my video chatting from the lobby of the hotel and all my web browsing on my phone over 3G; I had to get WiFi in the room.  I quickly ruled out lugging my Airport Extreme on vacation, so I quickly searched for travel modems and found the Zoom 4506 3G Travel WiFi Router.
It is a small WiFi router with an internal battery and also relatively native support for 3G data modems.  Most of the reviews were good plus it was only like $75 so I took a chance.  Once I got it home I set it up and began testing.  It was pretty easy to set up and after all my testing I was ready to go.

Problem 2: Downloading Photos from the Camera
The one thing I like to do on vacation is to upload photos while we are on vacation, to show friends and family what we are up to and also to take care of the work of doing while I have spare time.  Again the iPad 2 doesn't have native support for uploading photos from a camera.  Of course there is the Apple Photo Connector from Apple for $40, but I make it a point to avoid buying Apple brand adapters if possible (too expensive).  Lucky for me the Eye-Fi company had just announced a new version of their iOS application that would allow "Direct Mode" transfers from certain Eye-Fi cards.  Basically what this means is if you were out in the middle of the woods the Eye-Fi card can set itself up as a WiFi base station and the iOS device can connect to the network for transferring photos.  The previous version of the app supported transfer of photos, but it would only work if both devices were on the same wireless network. Since I also needed more storage space for my camera this seemed to be the best route.  For only a little more than a standard 8GB SD card I picked up the Eye-Fi Pro
Once the Eye-Fi card arrived I also did some dry runs with it at home.  The setup on this was a little more complex and took me quite a bit longer than the wireless router.  The one thing I found most frustrating was the apparent limitation of linking the card up to only one iOS device in direct mode at a time.  I was able to get both the iPhone and iPad configured to connect in Direct Mode with the card, but once I shut down the wireless network only one of the iOS devices would receive photos.  I don't exactly know why it works this way, but I have to assume there was some good reason for it.  In the end I had it working as I wanted prior to leaving.

In The Field
I packed all my essentials, made it through the stressful process of security at the airport and made it to our hotel in Puerto Rico. In practice the Eye-Fi worked flawlessly, the iPad quickly found it and the photos whizzed over the 802.11n connection.  When we were in the airport I actually turned on the camera, fired up the app and let the iPad download the photos while it was in my bag.  I think it took about an hour and a half to download 300 photos in RAW format (~15-20MB each).  I was very impressed with it and found it to be a great investment.

I didn't have the same luck with the Zoom modem. Initially when I plugged it into the ethernet port in our room it was connected, the iPad could get on the network, but couldn't reach the network.  I played around with the IP settings and eventually got it to work.  However, the next morning it didn't work again.  Let me disclaimer here that I think the problem was not with the router but instead with the network settings in the hotel.  In the end we were able to pick up WiFi in our room from the lobby so it worked out okay.

In the end I did drop the ball by not uploading any photos (sorry friends and family), but that was mostly because I was too busy relaxing.  I never really laid out a plan for how I would have done it, but I think Alex(@alexredsox) would say something about people having figured out how to do that and it would probably involve Picasa and email.

Oh yeah and we did have a great vacation, although sitting here two weeks later and it seems like we never went.

Sunday, March 6, 2011

On to the Next One

I have decided to only post photos to Facebook going forward, since nobody was really aware of this blog anyway. Friend me if you wish to continue following me.