Saturday, June 9, 2012

The power of built-in debugging and introspection

I've recently started reading the excellent "Code Complete" by Steve McConnell and - as is often the case when you encounter a good book - got inspired by some of its ideas. I was particularly enlightened by the idea of implementing advanced built-in debugging/introspection capabilities, only available if application was compiled with DEBUG flag.
I found this idea very interesting for QComicBook - it would be very cool to be able to check internal state of some more sophisticated widgets when debugging issues. QComicBook has fairly detailed tracing (if you compile it with -DCMAKE_BUILD_TYPE=Debug flag), but it's not very useful in debugging subtle issues (such as with drawing) as it simply produces too much text output to analyse.
So, I started hacking it today. For starters I picked the most troublesome widget in QComicBook - ContinuousPageView, responsible for continuous view mode. This widget still has some minor issues that show up under specific circumstances, and they are very hard to debug. I implemented a simple Debug window, available via Debug > Continuous View menu option; it displays frames for all pages, showing their sizes, position on the QGraphicsScene and internal state. And it didn't take long as I spotted first potential problem: when rotation is applied, some sizes manifested by QGraphicsItem interface (blue boxes) don't match numbers used internally to handle continuous view logic; this seems to affect pages that use estimated sizes only (i.e. not loaded yet).
I'm not sure yet if this can cause real problems, but certainly it looks suspicious. It also definitely shows the potential of built-in debugging tools and I'm going to add some more to QComicBook in the future. Frame View mode, job subsystem, memory usage are just a few top candidates for live introspection. Having them at hand, it will hopefully be much easier to prepare a rock solid QComicBook 1.0.0 :)

Tuesday, June 5, 2012

QComicBook UI cleanup, quest for icons

As a part of the preparations for QComicBook 1.0.0 (yeah, it should eventually come - it's been 7 years already!) I've started working on UI cleanup. The goal is to make it simple and ditch some useless actions (is anyone using Page top/Page bottom or '5 pages forward'??); target #1 is to clean up the toolbar. Another goal is to make QComicBook UI look like the rest of the desktop, i.e. use system theme icons.
Much to my delight I discovered that Qt supports standard desktop icons (be it GNOME, KDE, XFCE...) from version 4.6! This works well and I was able to quickly test it by replacing some icons with themed icons using Qt Designer. Unsurprisingly there are some icons that just don't exist in standard themes. For most menu actions it's OK to just get rid of them, but toolbar actions must have icons... That means 'Two pages mode', 'Manga mode' and 'Fit to width', 'Fit to height' and alike as a minimum (see first screenshot). Unfortunately existing QComicBook icons stand out too much from pretty much any desktop theme and I need to find or create replacements for them. Suggestions, ideas or contributions anyone?

Saturday, June 2, 2012

QComicBook 0.9.0 is available

This release have seen a lot of delays, but it's finally available. It brings two notable internal changes:
  • switch to Qt GraphicsView framework, leading to more lightweight and flexible page handling implementation. This opens up more possibilities for future tweaks and enhancements.
  • more robust image transformation code resulting in dramatic improvement in responsiveness and performance whenever you scale main window, rotate a page etc; this kind of operations are now performed in a separate thread. If you ever considered QComicBook to be a bit sluggish, give it another chance again and try version 0.9.0!
As usual, latest QComicBook releases can be found on it's home site.

Monday, May 7, 2012

UDS in Oakland, CA has started

Ubuntu Developer Summit has just started today at the City Center Marriott in Oakland, CA. OMG! Ubuntu guys seems to be covering the most important aspects of it live.

Sunday, March 11, 2012

Playing with Unity Lens: Manual Pages Lens

Unity dash - displaying matching man pages as you type
Lenses are in my opinion one of the best features of Unity - they can speed up productivity by providing search functionality for common activities, such as launching applications or accessing recently opened files. Unity provides some lenses by default, but what's more interesting, it provides an API that can be used for implementing your own lenses, thus extending Unity's dash functionality.
Yelp displaying selected man page
I had been playing with that API a few months ago just for fun, but didn't have anything usable - not until now. I spent a few hours last weekend on adding some missing bits and here it is: Manual Pages Lens. This simple lens provides search functionality for manual pages, based on names and descriptions. It relies on 'apropos' command and provides a fast way for finding manual pages - particulalry useful for developers. Manuals are displayed with yelp (standard help browser in Ubuntu), so they are nicely formatted and cross-linked.
Manual Pages Lens package is available from my PPA.  It can only be used in Ubuntu 11.10 at the moment since Ubuntu 12.04 (currently in beta) uses a slightly changed API and I haven't yet ported my lens to it.
By the way, if you don't want to or can't use my lens, you can still open manual pages with Unity dash by hitting ALT+F2 and typing 'man:' followed by a name (e.g. 'man:printf'), and it will bring yelp. Very handy.


Saturday, March 3, 2012

Joining Canonical

I'm happy and proud to announce that March 1st marks an important day in my life & career as I've joined  Canonical team to work on Unity project and surrounding applications. My main focus will be on Qt-based Unity 2D, meaning C++, Qt & QML as the primary technologies. Cool stuff. With recent announcements of Ubuntu TV and Ubuntu on Android, and upcoming Ubuntu 12.04 (LTS) it's really great time to join and it all looks very exciting! I'm very happy to work on opensource technologies and in fast-moving and growing project - something I've always dreamed about. It's almost too good to be true!

Tuesday, January 31, 2012

Goodbye Ireland!

Early in the January 2011 me and my family moved to Dublin and I took position as a Senior Software Engineer with AOL. This was a big decision for my family for lots of reasons, and not an easy one to undertake as you can imagine. Anyway, everything that has a beginning, has an end, and this time the end was not so distant... In late 2011 we decided to return to Poland for personal and family reasons. So, after 13 months I'm back at home in Poland.
The decision of returning was almost equally difficult to that of leaving one year ago, and my last days in Ireland will be the most memorable ones - last night & last few pints with friends from AOL, lots of good words I heard from co-workers, last walk in the city centre etc. It's these moments you actually realise you're loosing something and leaving it behind...
Anyway, it's time to move on. Let me try to summarize the last 13 months:


Good things:
  • working for AOL was good.
  • made a lot of friends at AOL - brilliant people and smart engineers. I'm going to miss you guys!
  • learned a lot of new technologies such as Erlang and got familiar with cool stuff such as ZeroMq, Thrift, Goole Protocol Buffers (protobuf), NodeJs and others.
  • worked on the backend of one of the biggest Ad-solutions (ADTECH) & learned how advertisement business on the internet works. This was completly new stuff for me.
  • Been to PyCon 2011 and listened some amazing talks and lectures from bright people such as Raymond Hettinger or Paul Barry.
  • Been to one of Google Techology Group monthly talks at Google HQ in Dublin.
  • Had two wonderful weeks of sunny holidays on Tenerfie / Canary Islands (you wouldn't think I was going to say 'in Ireland', would you? ;)) in the summer.
  • lived in a quiet and green area of Dublin, in Ashtown (north city), close to Phoenix Park, around 6 kms from cirty centre. Nice area.
  • Been to a few cost towns - Malahide, Howth, Dalkey to name a few. Very nice places with beautiful views.
  • improved my English - I think my understanding of English has improved, although some Irish people still give me trouble if they're mumbling ;).
Bad things:
  • I'm on the lookout for new job again.
  • Feeling a bit lost and confused. May take a few weeks to adjust to new (old) reality again ;)
That's it, not so many bad things to talk about. Attached are a few photos taken during my last walk in the city centre. Cheers!