Michael Medin

Random thoughts on development, SOA and monitoring…

Book review: Oracle ADF Enterprise Application Development—Made Simple

1889EN Oracle ADF Enterprise Application Development-Made SimpleThe best PACKT book ever?

Now don’t get excited!

This is not saying much; most PACKT books are so bad I want to gauge my eyes out with a fork!

And indeed this book is no exception it has many flaws and I honestly think is a bad book which suffers from lack of editing and peer review.

But is is a very very smart book and the author has managed to pull something rather difficult off in very nice way. I think with some editing this would have made a truly amazing book.

Continue reading

Family augmentations

I have been quite for a few weeks, and that is not just because I have been lazy. No in fact I have been extremely busy and will probably be for the foreseeable future. But I shall try to squeeze out some time to write the odd blog post in the new few weeks at least. So why have I been busy you ask?

Sophia

Well, the reason is as the topic mentioned a bit of a family change as my second daughter was born on May 21 so excuse me if the reminder of this blog post is filled with sentimental gibberish Ler

DSC03366It was an interesting view if the Swedish health-care system. Since my girls friend apparently like nights she went into labor around eight:ish or so and just before midnight we figured maybe it is time to head over to the hospital. Arriving at the labor ward we discovered it was full. Meaning we had to wait for about an hour before we could get a room assigned. Fortunately we were not in a real rush so sitting around in the waiting room was not  much worse than sitting waiting in the room… for me that is. My girlfriend was less than thrilled about it. So an hour or so later we were allowed into our room and maybe 2 hours later after a rather event less birth my daughter was delivered in what they tell me was perfect health. I am an engineer so to me two hands, two feet, one head and some screams translates into healthy hence I would agree.

Continue reading

Embedding Python inside a multithreaded C++ program

This is a tutorial for how to embed python correctly inside a multi threaded program. Python is a very neat language which is very easy to embed inside C++ thanks to the boost::python library. But there are some crucial parts which is missing from boost:python in regards to how to manage GIL and thread state which I introduce here. Since this is my first C++ tutorial I will include boost:thread as well as a quick hello world application as well.

Continue reading

Efficient Work: Context switching via the Keyboard

One of the most common perceptions of windows is that it is a PUI (PARC User interface) oriented operation system. In other words the mouse is required to do everything. This is in many places true but fortunately Microsoft has recently changed this and incorporated the keyboard more and more into what was previously a mouse only domain. With Vista and Windows 7 a whole range of new keyboard shortcuts emerged and slapping on some third-party tools on top of that and we get a full-fledged keyboard experience.

This is a short introduction to how I use Modern Windows features and various third-party tools to optimize my workflow using the Keyboards in Windows..

Continue reading

Gallery 3: A modern web gallery?

imageAround 10 years ago I wrote a custom gallery in php it was nice and all but since it is abandoneware it is starting to get less and less usable. So I decided on Gallery 3 to replace it and I thought Id share some observations on it here. So how does Gallery 3 stack up? Was it all the modern “web 2.0 social experience” I expected?

What is Gallery 3?

Gallery 3 is a complete rewrite of Gallery 2 (a popular photo gallery). It seems about a year old but since its release there have only had two minor updates so it seems not to actively developed.

Still it is one of the major players in the gallery market which I guess is quickly being eaten alive by sites provided by the big players such as Facebook, Google and Microsoft. Since I have, by far, to many photos to store it all in the cloud I tend to look for a custom hosting where I can tinker a bit with the end result.

The good

Well first off lets start with the positive. Gallery 3 has a solid plugin foundation (not WordPress galore with thousands of them but then again there is only one plugin per feature so you don’t need thousands of them) but still a sizable amount somewhere in-between 150 and 200. Many of the plugins do what they announce and just work without any issues. They solve most common problems easily without any custom fidgeting and it is thus a breeze to get started. The plugins I use are:

  • Custom Menus
    Provides the ability to add custom menus to the UI
  • Exif GPS Data
    Provides google maps integration
  • Facebook Comments
    Adds a box for facebook comments (default it has its own).
  • Photo Annotation
    Tagging framework used by wlp face tagging plugin later on.
  • Rebuild items
    Allows you to easily rebuild thumbnails
  • Rectangle Thumbnails
    Allows you to se the aspect ratio of photos (to make thumbs look better)
  • Tag Albums
    Allows you to browse tags (a rather strange approach but works).
  • XMP
    Imports Windows Live Photo Gallery tags (this is where I get my face tags).

This is pretty much what I would expect. It is a bit low on the social side but that is not uncommon and there are some interesting plans in those areas.

Apart from the solid set of plugins things are working quite well and everything seems solid enough. So happy story all the way?

Not really, because once I had things running smoothly I was forced to scratch the surface as I wanted to make the style look like my WordPress theme. And here is where it all starts to fall apart once you start scratching you end up with some rather mind bogglingly strange things.

imageThe bad

First off why is there no out of the box way to configure the sizes of thumbs and photos? Why is there no way to configure the layout? Hell why is there no way to configure pretty much anything?

Perhaps they want themes to provide all this?

That is the direction which Greydragon went. Greydragon is a pretty solid all inclusive theme which seems to add a workaround for most of the oddities and adds many of the configuration options I would have expected out of the box. Unfortunately the theme in it self looks rather dated something easily solved with some minor customizations and CSS you’d think: right?

Layout and design aside, it is after all up to taste, there is a lot of things I would have expected in a modern gallery software which is missing in gallery 3.

  • Ajax powered
    Seriously, no ajax at al?
  • Built-in Slideshow
    Coloris is a nice touch but no lightweight built-in slideshow?
  • imageNext image?
    Why is there no way to click the image to skip to the next (or perhaps better yet, some modern version of the popup ajax thumbnail browser I had in my gallery see screenshot) ?
  • Zooming thumbnails
    Why cant I get at least some javascript goodness (I quite frankly had more ajax in my 10 year old gallery).
  • Interesting widgets
    The included widgets would not have been exiting even 10 years ago.
Another thing which really bothered me was the lack of concept such as views and trees. I would have liked to switch view to something less spacious like a list view or tiles view. And it would have been nice to be able to browse a tree somewhere as it is rather slow clicking around.

Another point I really missed was alias in my previous gallery an album could reside in multiple folders making it possible to group things in more then one way. I guess tags could replace this but browsing tags is an extension and not out of the box. Also tags are ”more photos” then albums.

imageThe ugly

As a developer my approach to problem is to fix what I feel is broken. So the first thing I did was open up vi and start to dabble here and there trying to make things at least look fresh and modern (in my humble opinion).

And that’s when it start to become really ugly.

Graydragon has pretty much recreated most of the features which would be found in a gallery in the theme (probably as the API seems limited).

To make matters worse since there is no standard way to interact between the various models and views the only way to add support for new features is to recreate the functionality again and again and again.

A good example of this is the “tag_album” module which in theory could have piggy backed on the normal thumbnails views just replacing the data with photos based on tags right?

Wrong! instead they opted to recreate the page-template, album page-template, and thumbnails-template to facilitate the tag browsing. This as there seems to be no easy way to create an instance of an “album” and say: Hey, lets render this guy for me.

This means when I want it to integrate nicely in my theme I ended up having to add the same hard coded stuff in my hacked Greydragon to make it look nice.

Perhaps this is due to inexperienced plugin developers, perhaps a badly designed API? I havent looked at Gallery 3 enough to make up my mind. But regardless of the reason the end result is leaves a lot to be desired.

And before I get carried away lets end this by briefly mentioning the clobbered mix of php, html and what not found in parts of the code. Hello ASP and welcome back to the year 2000!

imageConclusion

Now don’t get me wrong Gallery 3 is a really nice gallery it is one of the best (and I have tried a myriad of them) it really works handsomely. But it seems that Gallery 3 (and many others) are stuck somewhere between 10 years ago and now. Where is all the modern stuff? Ajax, javascript, hell even some flash would have been a welcome change.

If you are looking for gallery you cant really go wrong with gallery it has most features you will require albeit packaged in a pre-web 2.0 edition. But for most people this will not be a problem.

So just don’t expect a lot of cool stuff and make sure you like on of the included themes (as creating a custom one can be a huge endeavor).

What’s this blog about?

Michael and Evelina Medin

Since I am pretty new to this blogging thingy I will try to write what you can expect form this blog. I have in fact started to blog many times before but never lasted 5 posts so where as this is not new it is new in the sense that I intend to actually give it some effort this time.

The main topics will be:

  • Monitoring
    Nagios, Icinga, NSClient++
  • Development
    SOA, C++, Java, Python, …
  • Personal
    Myself, My family, …

The reason for having many topics (or categories as they seem to be called in the blogging world) is that I felt having three blogs would mainly be to much work but also seems rather silly as there will be four posts per year that way. So instead I will combine it all here.

imageMonitoring

Since I am the author of NSClient++ I have for some time been wanting to blog about monitoring mainly as I feel there is far to little blogs on the subject (that I have found) but mainly as I feel I have things to write about and non place to write it as the “blog” on nsclient.org is not really a blog.

imageDevelopment

Primarily I am and always will be a developer. I spend thousands of hours writing code and sometime I do things where I think now this would be nice to share but as I have no place to share I end up just ditching and forgetting it which means next time I need it I will have to figure it out all over again. I am mainly involved in SOA development at work which means technologies such as Java, XML, Web services, Databases as well as Weblogic Server and what not. But a lot of tooling is built in other languages such as Python, Perl, Excel etc etc. In my personal space I dabble mainly in C/C++ and things revolving around that.

imagePersonal

Well, I don’t really like Facebook so this will be my personal “I am making coffee”, “I am drinking coffee”, “I need to pee” section. Hopefully someone in my family will find it useful, if not maybe I will stop? Regardless these posts might be in Swedish so I would recommend not reading them unless you understand Swedish. Mainly my personal life includes my Girlfriend, Lovely daughter and the “bonus child” which my lovely girl friend brought along.

 

Well, this is pretty much it for now I guess…