Thursday, September 08, 2011

Porting to PySide/QML: Notification Bar

I keep hearing about how great QML is to learn so I'm a bit baffled as to why I am still having such a hard time with getting more than a toy program written.  I'm trying to save my rant about that once I've gotten an application completed and can help provide more useful feedback.  In the mean time I wanted to cover a set of changes to my python code that will made the QML port a bit easier.  This is regarding code to make it easy both for users to provide good bug reports and for me to figure out what went wrong.

tl;dr

Some sample programs that demonstrate the ideas in this post

Saturday, August 13, 2011

A Swipe UX Idea

Over my desk at work I have a sign that says "On my deathbed I would design a better deathbed".

I've been using the N950 now for several weeks and I can't help thinking about how I would do things differently.  This is not meant to criticize Nokia's work on Swipe.  Swipe works well as a universal gesture.  Even if there are issues with it you and I should recognize this is beta software.  I've heard Nokia has already made one change to swipe since my software build and who knows what else might change before release.

I'm just curious about how else things could be done and the effect they might have on the user experience.  I don't think Nokia should immediately drop everything and switch to my idea.  I first would like to see what they come up with in the finished project.  If I still think mine is better?  Oh well.  People think and act differently, especially programmers, and they are probably targeting others.

Swipe UX

I'd recommend these demos for a quick introduction into swipe.  The main swipes will bring you back to the last home screen you used.  When wanting to swipe to a specific screen you swipe back to the home screen you were on, pause to see which it was, and then swipe over.  You can go about it faster by remembering what screen you were on.  I usually think I know where I was but I tend to be wrong leading me to swipe a few more times.

My variant on Swipe UX

My idea centers on a spatial model that spans home screens, the lock screen, and applications.  This could roughly be translated to virtual desktops with rules controlling which desktop different windows get launched on based on the desktop's role.

Launch an app, no matter from what screen?  As it is opening the device also slides home screens over to the task switcher.  Now with the app up a swipe down reveals the task switcher below.  If instead you swipe up the app closes.  Also you can swipe to the right to move to the launcher or left to move to the events feed.
Idea: Swipe up or down from the lock screen to unlock and reveal the feed
The device goes to sleep?  The lock screen is above the events feed.  A swipe up or down reveals the feed below.  Instead a swipe right moves to the task switcher and left for the launcher.

Idea: Swipe left on the lock screen to unlock and move to the launcher
Open up a folder of icons? The subfolder opens up above the launcher.  A swipe up or down to reveals the main launcher below.    This would provide a simple UI for subfolders to be built into the launcher..  Again instead a swipe right moves to the events feed, and left for the task switcher.

Idea: Swipe Right on the lock screen to unlock and move to task switcher
Applications, home screens, and the lock screen would operate on a more consistent set of simpler rules using a spatial model for the home screens rather than most-recently-used.  From where you are you would always know how to get to where you want to be with one swipe without a pause to think of which screen you are on and what direction you need to go to get to where you want or having to keep an accurate mental copy of the device state.

*Note: The images are mockups only and were hacked together from screenshots I found through Google.

Python Packaging for Harmattan

Right now I am taking a break from learning QML.  Instead I've been adding support for Harmattan to my existing QWidget projects.  It might seem pretty pointless because of how aweful QWidget can be with the default theme.  I will at least have the apps available if I need them in a bind.  Also taking working apps and repackaging them rather than new untested apps provides the benefit of controlling the number of variables to debug when things go wrong.

I will be focusing on packaging for OBS seeing as a QWidget-based application isn't worth pushing through OVI.

Packaging

I had to switch my applications packaging over from my py2deb fork to the distutils-based sdist_maemo.  A big reason is sdist_maemo already has Harmattan support.  I also figured it was a good idea to switch to distutils as it is more "proper" python packaging and because it is pluggable for various target packaging systems.  That last part will allow me to continue to support Maemo 4.1/5 and in the future support regular MeeGo.

So first I've moved all of my files to a proper distutils based layout
  • ./setup.py
  • ./LauncherName
  • ./package-name/*.py
  • ./data/package-name.desktop
  • ./data/package-name.png
I try to reuse code and packaging infrastructure between my projects so this means I need an easy way to diff between them, so I added a symlink from "./package-name/" to "./src".

I then wrote my setup.py file with an sdist_maemo command configured for each of my target deb-based distributions.  A nice thing to know is that for Maemo 5 the python module will be optified for you.

An annoying thing is each platform has different packaging requirements.  Some examples include:
  • Different ".desktop" file locations
  • Different ways of launching the app from within a desktop file.
  • Everything seems different with the app launcher icon
  • Different icon sizes for the Maemo-Icon-26 field
  • Different .deb sections
  • Different dependency names
  • Aegis file support (not needed for current apps so skipped over)
Already the differences between Maemo 4.1 and Maemo 5 were annoying from a packaging perspective.  This makes the problem even bigger.  One approach I've always rejected was maintaining separate packaging scripts for each distribution requiring me to keep duplicate information like the version number.  The approach I used with py2deb was passing a parameter in to my script to change what was passed to py2deb.  That doesn't seem to jive with distutils.  So I threw in a touch of code-gen using a nifty tool called cog.
To minimize my need for using code-gen my setup.py file creates multiple instances of sdist_maemo, one for each platform.

The app icon caused me some problems.  I had assumed it would operate like previous versions of Maemo and desktop Linux, that if you just said "ejpi" or "gonvert" it would look for the appropriate icon size in "/usr/share/icons/hicolor".  I'm glad I found that document explaining otherwise.  As an alternative some of the apps in the OVI Store just hard code an absolute path. When you do make a mistake on this, Harmattan seems to have two different default icons.  The red square came up for me when "ejpi" didn't map to an icon.  The green curved icon came up when I had an absolute path that pointed at nothing.

My makefile creates the needed icons, code-gens my desktop files, code-gens my setup.py files, and then runs "setup.*.py sdist_*".

Odds and Ends

I do not believe PyQt is available for Harmattan, so I had to finish adding support for PySide in my applications.  I've made it easy to use both bindings by centralizing all knowledge of the differences between the two.

I've tried to make the switch a couple of times already but each time I came across new bugs that the old bugs prevented me from seeing.  Luckily the PySide people are quick at resolving these issues and by 1.0.5 my applications ran smoothly.

I went ahead and made the simple switch to XDG and Harmattan-style icons though I'm not yet seeking OVI compliance.  I decided to redo the icons.  They weren't all that great, no where near the icon guidelines, and I wanted SVGs so I could use the Harmattan Icon Generator.  Not being an expert at graphics tools, the icon generator definitely saved me a good amount of work.  The main drawback is that basing the icons background gradient on the base icon's content seems to produce results without enough contrast.  I ended up using the "mean" setting to force gray backgrounds.

Distributing

Now that we have all that wrapped up, time to upload onto the OBS.  The Getting Started Guide has been updated and now is pretty good.  I setup a harmattan-specific subproject due to my code-gen specializing the source-packages per distribution.  Once everything was uploaded to my project, I logged in as root, added my sources, and away I went.

So for the fruit of my work:
Well I guess this means I need to get back to learning QML.

Resources

Desktop File:
XDG
Icon
Package
OBS

Tuesday, July 19, 2011

N950 Arrival and My Development Plans

A couple of weeks ago I was notified by Quim Gil that I was selected for the MeeGo Community Developer Device Program for a Nokia N950 devkit.  Prior to this I had been quiet in Maemo-land for a little bit while I worked on an experimental rewrite of one of my applications that uses PyGame.  Seeing as PyGame isn't on the N950 I hurried up in getting it to a state I could put aside and moved on to learning QML.

The excitement increased as I saw the box personalized with my name regardless of that personalization just being a piece of tape
MeeGo Development

My development plans have changed (and frustration increased) over time as the MeeGo development story has gotten refined.  This is due to both changes in the UI toolkit availability and rules for distribution of applications.

Originally when things shifted to Qt I chose QWidget because it was ready now, includes widgets, and was recommended by Nokia (you know, the people who own Qt) for the types of apps I write (which recommendation was removed on June 22, 2011).  At MeeGo Conference I found out that some (most? all?) MeeGo instances are not including QWdget themes (which without a theme its basically dead).  QWidget in Qt5 will be optional and will probably not be included on those same MeeGo instances that currently don't ship a theme.  So there goes that work.

I am still a bit frustrated with QML in that there is not even a subset of common QML Components between platforms though some disagree on it being a problem.  I've just seen really terrible QML applications which mostly stem from everyone reinventing the same bugs when writing widgets from scratch.  I also find it a wonderful experience having the widgets available for the desktop such that I can write apps in a desktop environment that are targeted for small screens without the need for any pesky IDEs and emulation.  When it comes to testing, I am much more efficient testing and debugging natively on the desktop and just need to spot check how it translates to my devices.

I do not look forward to packaging for generic MeeGo.  I found out at MeeGo conference that dependency management isn't guaranteed to be included and one has to include in their package any dependencies outside of core MeeGo.  This is fine for compiled applications, you just pull in static libs.  This is not as simple for Python developers where part of the beauty is your program isn't compiled and any compiled extensions are distributed and maintained separately.  I have contemplated some tools to simplify this (based on cx-freeze and Hatchet) but that is a good amount of work and focused away from what makes all of this fun.

At MeeGo conference I raised my concern for packaging Python applications during the apps.meego.com lunch time BoF.  The impression I got then (no clue if things have changed) is that they will focus on MeeGo compliant apps at first and might later support others.  Even with that concession this is a stark contrast to the original vision that helped bring me on board from Maemo about (what was then called) Surrounds which would serve both as an app repo and as a place for third-party dependencies.  If I chose to not bundle all of my libraries then I also am not available for any of the other distribution channels (and any contests they might be running).  I don't program for the reward of the contests but it isn't fun feeling excluded.

The beauty of developing for Maemo was it had very low friction in the development story thanks to Python that I was able to spend more time focusing on what was fun: designing software for end-users to enjoy.  I feel that this is being lost in MeeGo.

MeeGo and Nokia

The picture can be better when focusing on a individual vendors.  Vendors may keep things a bit more lax with their distribution channels.  The problem is then you are customizing per vendor which requires device availability for testing and a lot more work.  That vendor has to be worth it.

Nokia is worth it (even without the DDP).  Nokia actually shipped a great device previously (N900 running Maemo5) and is committed to shipping the N9.  That is a lot more than other vendors can say.  On top of that Nokia offers a great experience with the software and hardware.  So as a user, Nokia is worth it.  What about as a developer?  Nokia has Qt Quick Components to provide reusable QML widgets.  They also will support dependencies and have Python/PySide available in their store.

The Way Forward

For my initial ports I will continue to focus on what keeps this fun, writing apps for end-users despite any downsides of being vendor specific.  After that I will bite the bullet of making my applications MeeGo compliant to make them available for a wider audience.
The default date.  It's good to see somebody at Nokia has a sense of humor

I have work to do on all of my applications but I will be focus on the ones that still use GTK first, especially since they are fairly simple.   I am using QuickNote as my playground for learning QML.  Expect further posts regarding progress updates and lessons learned regarding QML and MeeGo 1.2 Haramattan.

Google CR-48

Today I was asked my opinion on my CR-48 ChromeOS netbook to help with a purchasing decision for a Chromebook.  I thought I'd share my thoughts of having used it for the last 6 months.

I have a plethora of devices including most of the Maemo family (just missing the n800), some netbooks I got free through various (legal) means, and my desktop.

Whenever I am out and am needing something bigger than a handheld, I rarely choose something other than my CR-48.  This is because most of what I use are the various Google web apps and I can limp along on other use cases that don't fit in as well.  As an example, my CR-48 leaves the house once a week for my church meetings to assist me in my current responsibilities which is facilitating administrative matters so our congregational leaders get to focus more on assisting people.  An example of when I might chose another device is when I travel to various Maemo/MeeGo events where I'd want something that is a bit more prepared for python development.

The other main use of my CR-48 is what I'll refer to as opportunistic internet usage.  What I am referring to is the reduction in friction when having the thoughts "Oh, I'd like to look up ..." or "I should record ... so I don't forget" enough that you will act upon that thought more often.  This is when I am sitting about the apartment (or out and about) and my phone isn't quite enough to satisfy my need.  This is something harder to quantify when doing comparisons so it is usually not even thought of.  A tablet could also serve this purpose well except they are pricier and don't have a physical keyboard.

With any netbook you have to be honest with yourself about the reduced functionality due to their design, it is just more so the case for the CR-48 as you only have access to a web browser.  This can have some benefits though.  I remember an observation made to me back in the days of PalmOS.  My father preferred PalmOS because it wasn't imitating the desktop.  Why is that good?  When the imitation is too close you are more likely to get frustrated at the gaps when you come across them, sort of an uncanny valley of features.

So what devices should someone have?  It depends on your use case.  I've generally been a person who has preferred a cheap portable with the work horse being their desktop.  This has the benefit of being less paranoid about the portable device and making it easier to replace it when needed combined with the cost savings of a desktops (especially when you go 6 years without replacing them).  It is hard to say what I would get myself when left to my own devices (pun intended) since so many of my devices have been free.

ps If you are reading this and dream of robbing me, look further at the specs, release dates, and niche role of the various devices I listed.  It won't be worth it.

Friday, July 01, 2011

Google+

I still don't have too many people on Google+ but I thought I'd record my thoughts

Circles

I love them.  Some people are a bit confused about them and consider it a privacy risk that people can add you without your permission.  FB has the same problem but doesn't do a good job of telling you.  In FB if you send a friend request and it is never accepted/rejected then your feed will display any public updates from that person.  Google makes this explicit and emphasizes the benefit of it by having a "following" circle by default.  I think it is a much better and simpler model than "friending" products and people or "liking" their Page.

I'm still playing with what I want in circles.  Too granular of circles means you have a lot more to manage for each post.  Right now I am looking at "family", "friends", "acquaintances", "local", and "professional"


For cleaning up my circles over time, I'd appreciate a mass-edit mode where everyone is a row in a table and the columns are the circles they are in.  Bonus points for Google also showing who has not added me back and who I've not added back.

Posting

I like that when commenting on posts you can see what the visibility is of that thread.

Sometimes privacy on my posts isn't a big deal, like talking about programming for MeeGo.  It'd be nice if you could use your circles not just to restrict communication but say "these people will actually care but allow it to be discoverable for people I'm not connected to yet".

Another variant of that global-sharing-with-focused-audience use case is my use case for Twitter.  I originally joined twitter so I could track MeeGo Conference hashtag and know what else was going on around me while in attendance.  A Similar use case that a friend pointed out is tracking live news for things like the Texas legislative session.  I don't think I've seen a G+ equivalent system to hash tags but it will be hard for it to compete with Twitter without it.


Notifications

This is one of the killer features, being able to check on my notifications within GMail.

Feedback

It is nice that it is so easy to find how to provide feedback to Google on Google+.  It is also a really slick tool.  I've already sent them several items for improvement.  I hope they roll this out to their other services.

Integration with other Google products

Currently there is some integration with Buzz and Picasa Web though I am unsure of what Buzz's role is now and am thinking of disabling it.

I am looking forward to this being improved.  Good Google Calendar integration is a must for being a FB replacement.  Blogger shouldn't be too hard to also tie in.  I'd like them to solve the GMail / Google Reader integration issue but not too sure how they'll pull that off.

Contacts integration is actually where users will probably see the greatest troubles.  This is due to trying to bolt together different services that don't always have their data coordinated.  Users have unmerged GMail contacts, contacts creating G+ accounts with different email addresses than what are in my contact book, and the various tags I have from people.  It'll be a mess even with Google's help to try to match up all of these representations of people.

Back to Picasa Web.  I figured I should go back and update my tagging of people in my pictures.  Sadly I can't find the really helpful mass-tag tool that lets you look through all the faces it found and tag them.

Google Takeout

One of the reasons I am loyal to Google products (besides reducing the number of accounts I need) is the ability to leave and this is no different.

Final Thoughts

As I said, Google will need to improve their service integration and slowly ramp up their algorithms taking care of things for me.

Reaching critical mass will be a challenge.  Some might compare this with the migration from MySpace but this is even harder seeing as there are even more users with more history in the service to leave behind.  Maybe that is a good thing, to have a fresh start, but there are some connections that might not transition over that I would miss.

A question for me: where do I post things?  Facebook, Twitter, or G+?

Monday, June 06, 2011

Extrapolating

I give at the office, blood that is.  The organization that does it recently gave me access to my vitals through their website.  I finally took a look and a coworker made a startling realization.

I wonder if our cafeteria at work will start serving brains by 2012.  I bet Sodexo will charge an arm and a leg for it though.

Saturday, May 28, 2011

Meego Conference First Impressions

I am grateful for the opportunity to have gone to MeeGo Conference this week.

As has been discussed, the keynote was a let down. I very much appreciate Jaffa's analysis of the keynote.  The only thing I have to add is that there were rumors that the keynote was reworked at the last minute for various reasons and if this is the case we should be somewhat understanding, it is difficult pulling off a change like that.

So what were my favorite things about MeeGo Conference?

First, spending time with various members of the Maemo and MeeGo communities.  It was a lot of fun spending time together whether in sessions, meals, trips around town, or playing werewolf together.  It was great to see GeneralAntilles, Jaffa, Qole, sjgadsby, fiferboy, texrat, timsamoff, wazd, and many more.

My second favorite aspect of the conference was the collaboration.  I caught word of an apps.meego.com QA lunch BoF which was good as I don't remember if there were any other community app developers at the table to provide input from that perspective.  It was great to see the collaboration between geekygirldawn, xfade, lbt, bergie, and others.

The main problems I see with where we are at with maemo.org extras is (1) the monotonically increasing version numbers between repos, causing pain if you have a "1.3" in extras-testing but need to push through a "1.2.1" due to say Google changing an API making the app in extras completely worthless, (2) the friction in the workflow for providing both testing and user feedback, (3) noise in extras-testing due to lack of cleanup, and (4) use of extras-devel rather than a PPA.  (3) and (4) are resolved, so hopefully we also get (1) and (2).

Another aspect to the collaboration that I participated in was thp's Python presentation.  During the Q&A we had a bit of a discussion on viability for Python for various instances of Meego.  I'll cover this more in another post.

The final part to collaboration which I got to observe was thp et al taking the loaner Exo PC's and creating a multi-touch pong game.

The third and final of my favorite parts of the conference was the sessions.

Arjan Van De Ven's presentation was the best I saw due to his passion, his call to action, and audience (particularly Jaffa) raising issues with the internal communication within Intel being at friction with keeping MeeGo open.  A couple months ago he announced replacing several pieces of key software with other variants.  People took issue with no previous open discussion, few if any bug reports regarding Intel's complaints, possible NIH syndrome, and how much of this was spite towards Nokia for the switch.  Some interesting tidbits from what little I caught of that flame war were that some of the software being reverted to (evolution) has the same problems as what it is replacing (tracker) and the suggestion that software shouldn't be accepted until it is ready being at odds with the call to use innovative technologies.  Add on top of that last one the risk of "ready software" being more likely to be announced through unilateral big-reveals, shunning the in-the-open from-the-beginning software (here is looking at you MeeGo QML Components which I'll discuss more in a follow up post).  The main disappointment were a couple of potshots made at Nokia during the discussion.

I do understand that there is a conflict between always-innovative/always-beta software and getting quality releases out now using tried and true software.  I think the main thing people take issue with is how this was done and how much more this will be done with Nokia taking a backseat role.

The presentations on the future of Qt were also great even if they did raise my eyebrows on a few points (again, in a follow up post).  I got to see the Qt5 plans, Lighthouse, and QtQuick 2 presentations.  Unfortunately it wasn't until after-the-fact that I found out I should have also gone to MeeGo UX Components presentation (again, that promised follow up post).

As I've previously mentioned, thp's Python presentation was great.  I also expect wazd's presentation to be good but forgot to go (and he even used some of my programs, shame on me).  I also have to say I was impressed with hopbeat's use of Prezi and would wish to never see a traditional power point again.

Despite the let downs, MeeGo Conference was great.  It was also good to get some time dedicated to programming and to see more of San Francisco compared to my last visit (I was a lot less lost thanks to a real GPS).

Thursday, May 19, 2011

The Marriage Discussion

I was reading a friend's blogpost and my response got a bit long (and now  there isanother post so I guess I also take too long to write also), so here we go.

As was pointed out in the comments, Elder Oaks did also speak on the subject and did mention the sisters.  The proportions spent on each topic though is telling.

I think we tend to simplify this subject a bit too much.  Many guys could probably claim the following paragraph from the post would apply to them:
"I have so many girlfriends who wrack their brains about what they are doing that's keeping them from getting married. They wonder what's wrong with them and what they should be doing differently. They think that perhaps there's something else for them to learn before they get married. It's absolutely ridiculous! And though they mean well, some friends and family members don't help at all. They will often say things like, "You should act like this, or you should wear that." They go on and on about how men are stupid, and women need to practically bend over backward and be the aggressor to get men to see what they need to do. Essentially, they are making excuses for men and telling women to do all the work."
Well, except the last two sentences.

Some of the factors I can think of include (which some can apply to both genders)
  • No desire.  Maybe it is a sampling bias but despite this one getting a lot of complaints this doesn't apply to most guys I've met.
  • Desire but not priority  Sometimes we don't realize that we treat things with a lower priority those things we actually really want.  A lowered priority can be for obviously selfish reasons as "still wanting to have fun" or others like education and career.
  • Asking a person on a date being read into too much.  As President Hollingsworth pointed out, 10 years ago he was struggling to get people to go on second and third dates without them reading into things, now the problem is going on first dates without them being read into.
  • The 20s being the new teenage years.  This is especially the case with guys that are meandering through life rather than working to establish themselves in a career but face women around them that have or are working towards higher degrees.  Notice that I said "not working to establish" rather than "not established".  A guy actively working to establish his career whether through getting an education or growing in one's field is fine and should hold his head up.  This is also a problem spiritually.  If someone has been working to purify their desires, to fulfill the commandments, and serve those around them would they want to risk regressing through the negative influence  of someone who has not been developing themselves spiritually?
  • Trying really hard but not realizing they are doing it wrong.    One example: we've seen the times when a new cute girl or guy moves into a ward and everyone of the opposite gender surrounds that person and obsesses and fights over them for the next 4 months or so.  This is made more ridiculous by the fact that the attraction is skin deep and the person doesn't really seem to match them in their personality.  Sometimes it is helpful to take a step back and stop being so aggressive over being married to explore what you want and don't want through dating a variety of people and developing friendships that can blossom into a relationship.
  • And then there are the guys that girls ignore, turn down, or are even mean to.  This can because they aren't familiar with these guys, they are socially awkward, they are different but in a good way, different in a bad way, etc.  Hopefully if it is a bad way the guy recognizes this and is trying to improve but the way to improve is to be with people but others are so myopically focused on marriage they don't practice charity towards these people but see them as a waste of time on their path to marriage.
Those last two points mentioned the marriage/dating myopia and that is a topic of its own.  Sometimes it seems people's obsession over marriage is making them less ready for marriage.  I hear people talk about needing to have Christ in one's marriage and the need for selflessness.  People tend to be too focused on what they get out of a situation, who they'll get to flirt with, etc that they lose the opportunities to grow.

One example is to not be early or even being late to church.  A person then loses out on the opportunity to meditate on the atonement and the sacrament.  If they hold the priesthood they also lose out on helping prepare, bless, or pass the sacrament.  One reason people might do this is so that they can chose who they sit by and maximize time during meetings to be with them.

Another example is to just look at the amount of service offered to who, especially between two people that have needs.  Sometimes we neglect those who need it most because we get nothing out of it.  Granted there are other factors like how much the person needing service seeks help but we should be a lot more observant about these things.

Pressure to get married can be good and help push people past their hang ups with selfishness and help them take a risk but I also worry that continued pressure over the years and a social/spiritual environment that focuses mostly on socializing as a means for encouraging marriage to the detriment of service, sacrifice, etc exacerbates the marriage myopia.

I dislike not really having a purpose or conclusion to be building to so sorry for the jumble of not-fully-thought-out thoughts.

Friday, May 06, 2011

Forgiving Self and Others

Several months ago I was asked to speak during the main services of my Church.  In software development Bjarne Stroustrup stated "Starting a major project 'completely from scratch' can be exhilarating.  However, often more accurate description is 'intoxicating' and the result is a drunkard's walk through the design alternatives".  I tend to agree with that and is a something I would like to improve on.  Similar to the challenge of starting new software projects from scratch is to chose one of a myriad of topics related to the Gospel and Jesus Christ and narrowing down a focus in that topic.  So I kindly asked for a topic and was given "Forgiving Self and Others".

Someone had asked for some of material I used in my comments and I decided to go ahead and turn what I said into a post on the subject (and not just a transcript).

President Spencer W. Kimball described forgiveness as “purging of our feelings and thoughts and bitternesses” (Miracle of Forgiveness Ch 18).  I believe these feelings that we need to purge are an impediment to our living the two great commandments.  How can we "love the Lord our God" if we deny the efficacy of the atonement in the lives of ourself and others, rejecting that great sacrifice that the Christ made for us?  How can we "love thy neighbor as thyself" if we don't love ourself, if we can't forgive ourself?  How can we love our neighbor if bear a grudge against our neighbor?

Forgiving Self

I contemplated reasons we might not forgive ourself.  The ones I was able to come up with include
  • Incomplete Repentance
  • Needing increased faith and trust that we can be forgiven by Christ through the Atonement
  • Being too concerned with our perception of other's perception of ourself
To me it seems like we are in self-denial if we try to forgive ourselves without complete repentance.  I worry how much we are desensitizing ourselves to the influence of the Holy Ghost if we are trying to ignore the Holy Ghost's prodding for us to repent.

On the other hand it can seem overwhelming to look at our vast array of imperfections and to think of trying to repent of them all.    An analogy comes to mind for how to handle this.

If we were in a car accident and taken to the ER, what wounds would the doctors worry about first?  Scratches?  Your persisting foot infection you've never resolved?  A broken leg?  A pierced lung?  They would work on the life threatening injuries and as they are stabilized focus on the more debilitating damage.  They probably wouldn't even worry about the scratches until they are trying to clean everything off afterwards.  They also wouldn't focus solely on the what was initially the worst injury until it was completely healed, ignoring all others.

What sins keep us furthest from God?  Sometimes it can be quite surprising. For me an issue is "cease to sleep longer than is needful; retire to thy bed early, that ye may not be weary; arise early, that your bodies and your minds may be invigorated." (D&C 88:124).  If I repeatedly stay up I am too tired to wake up on time in the morning.  In my rush to leave for work I then neglect caring for my body through exercise, have less alert and sincere prayers, and I cut my scripture study short.

I'll leave it to President Lee for his words on forgiving self and the atonement:
Some years ago President Romney and I were sitting in my office. The door opened and a fine young man came in with a troubled look on his face, and he said, "Brethren, I am going to the temple for the first time tomorrow. I have made some mistakes in the past, and I have gone to my bishop and my stake president, and I have made a clean disclosure of it all; and after a period of repentance and assurance that I have not returned again to those mistakes, they have now adjudged me ready to go to the temple. But, brethren, that is not enough. I want to know, and how can I know, that the Lord has forgiven me also." 
What would you answer one who would come to you asking that question? As we pondered for a moment, we remembered King Benjamin's address contained in the book of Mosiah. Here was a group of people who now were asking for baptism, and they said they viewed themselves in their carnal state: 
"And they all cried aloud with one voice, saying: O have mercy, and apply the atoning blood of Christ that we may receive forgiveness of our sins, and our hearts may be purified. ... 
"After they had spoken these words the Spirit of the Lord came upon them, and they were filled with joy, having received a remission of their sins, and having peace of conscience" (Mosiah 4:2-3). 
There was the answer. 
If the time comes when you have done all that you can to repent of your sins, whoever you are, wherever you are, and have made amends and restitution to the best of your ability; if it be something that will affect your standing in the Church and you have gone to the proper authorities, then you will want that confirming answer as to whether or not the Lord has accepted of you. In your soul-searching, if you seek for and you find that peace of conscience, by that token you may know that the Lord has accepted of your repentance. Satan would have you think otherwise and sometimes persuade you that now having made one mistake, you might go on and on with no turning back. That is one of the great falsehoods. The miracle of forgiveness is available to all of those who turn from their evil doings and return no more, because the Lord has said in a revelation to us in our day: "Go your ways and sin no more; but unto that soul who sinneth [meaning again] shall the former sins return, saith the Lord your God" (D&C 82:7). Have that in mind, all of you who may be troubled with a burden of sin. 
Harold B Lee
Ensign, Oct 2008, 44-49, Stand Ye in Holy Places

If the barrier to forgiving ourself is worry over how people perceive us that sounds like some pride there.  Does the forgiveness of sins come from men or from God?  If we don't forgive ourselves due to how other's people perceive us, whose forgiveness are we considering more important?  Now don't get me wrong, repentance does involve repairing wrongs.  We should love and strengthen our fellow men.  What I am talking about is when these things are done and we are not letting go of the fact that we sinned because of this.

Forgiving Others

23 Therefore, if ye shall come unto me, or shall desire to come unto me, and rememberest that thy brother hath aught against thee—
24 Go thy way unto thy brother, and first be reconciled to thy brother, and then come unto me with full purpose of heart, and I will receive you.
3 Nephi 12:23-24

This last time I read these verses I thought about how it really would apply both to the person needing forgiveness and for person forgiving.  As I said in the beginning, how are we loving our neighbor if we haven't forgiven him?  Then if you wish to come unto the Lord and remember that you have not forgiven your brother but hold harsh feelings towards him rather than love, can you really come unto the Lord with full purpose of heart and be received by him?

Sometimes it feels like we talk of one person repenting and another forgiving as if these are strictly ordered and coupled affairs.  I'd say that these are not coupled events but are orthogonal to each other to the point where one might forgive another when that person has no sin to repent of.

First, I'll look at the ordering when both are needed.  President Kimball taught that we must be willing to make the first move. “we must forgive, and we must do so without regard to whether or not our antagonist repents, or how sincere is his transformation, or whether or not he asks our forgiveness” (Miracle of Forgiveness).  Our forgiving of another is an expression of love that can help elevate that person even to repentance.

This idea of love elevating another is expressed by Dr Victor Frankl in the following powerful but dry language
By the spiritual act of love he is enabled to see the essential traits and features in the beloved person; and even more, he sees that which is potential in him, that which is not yet actualized but yet ought to be actualized. Furthermore, by his love, the loving person enables the beloved person to actualize these potentialities. By making him aware of what he can be and of what he should become, he makes these potentialities come true.
Viktor Frankl, Man's Search for Meaning

This same concept was expressed by Goethe when he said "Treat a man is he is and he will remain as he is.  Treat a man as he can and should be and he will become as he can and should be".  The musical Man of La Mancha (which I sadly can't recommend) also expresses this idea.  Don Quixote saw the beautiful virtuous Dulcinea when the reality was a women named Aldonza but this has a transforming affect on her.  As Don Quixote is dying, Aldonza comes and pleads for him to see her as he did before.  "Won't you please bring back \ The dream of Dulcinea... \ Won't you bring me back \ The bright and shining glory \ Of Dulcinea... Dulcinea...".

Now on to my second point about needing to forgive a person when there might not be need of repentance.  Is sometimes the offense we are forgiving really in our self, that we judged them harshly and took offense where none was meant?

A great example of this is the correspondences between Moroni and Pahoran.  Moroni's armies had not been receiving the needed supplies to defend and retake lost territory.  His first letter to Pahoran receives no response.  After losing even more territory and lives, he writes again and accuses Pahoran of joining in with others in their effort to overthrow their republic with a monarchy.  Pahoran responds humbly that such a overthrow did happen but that he was a victim of it and was gathering strength to retake the kingdom if it be right to turn against their own people.  When sending the letter Moroni probably expected himself to be needing to forgive Pahoran to only find out there was no offense in Pahoran.

Regarding this concept, President Spencer W Kimball quotes the following in Miracle of Forgiveness:
"There is but one quality necessary for the perfect understanding of character, one quality that, if man have it, he may judge-that is, omniscience. Most people study character as a proofreader pores over a great poem: his ears are dulled to the majesty and music of the lines, his eyes are darkened to the magic imagination of the genius of the author; that proofreader is busy watching for an inverted comma, a misspacing, or a wrong font letter. He has an eye trained for the imperfections, the weaknesses. …
"We do not need to judge nearly so much as we think we do. This is the age of snap judgments. … [We need] the courage to say, 'I don't know. I am waiting further evidence. I must hear both sides of the question.' It is this suspended judgment that is the supreme form of charity"
William George Jordan

Orson Scott Card in the Ender series has a societal role called "Speaker for the Dead" who seeks to understand a person's life and correct the misunderstanding of us proof readers.  The idea that we see through a glass darkly lit is and can come to understand and love others is a powerful running concept in that series.

Forgiving someone does not mean that they not face the consequences of their actions.  Going through the consequences, paying the price for their actions, is a portion of what need to go through as part of repentance.
President Kimball speaks of a son talking to his father’s murderer “Tom, you made a mistake for which you owe a debt to society for which I feel you must continue to pay, just the same as I must continue to pay the price for having been reared without a father”.

Just as King Mosiah guarded his kingdom against his sons falling back to sin (See Moshiah 29:6-7), we need not put ourselves back in a position to be hurt.  It is a tough balance to meet, forgiving someone and recognizing they can repent and be a different person while not putting oneself in the path of their destruction while they are still in error or at risk to return to their errors.

Whether we properly administer mercy these two above cases comes down to whether we are loving the person as Christ does.  In addition to the son forgiving his murderer, another great example of these principles is the Nephites protecting themselves, both passively and actively, against the Lamanites without seeking for revenge.  When the Nephites act out of revenge is when their nation is on decline and on the verge of destruction.
Recompense to no man evil for evil … Dearly beloved, avenge not yourselves, but rather give place unto wrath: for it is written, Vengeance is mine; I will repay, saith the Lord.
Romans 12:17, 19

The most important element I have left for last, the healing power of Christ's Atonement.  Christ's Atonement does not just offer us a healing balm for our sins but for our heart.  Elder Featherstone has provided one of my favorite descriptions of this and I will leave it to him.
Lately I have decided that I need to talk more about justice. We don't understand justice completely, and there is so much out in the world that seems unjust and unfair that it is probably a good time to discuss this.
Who suffers most, the guilty or the innocent? The adulterer can go see the bishop. If he or she has truly repented, the bishop can say, on behalf of the Church, "You are forgiven." And they leave the office and that burden is lifted. What about the innocent? Who suffers most, the adulterer or the mother and father with a wayward son or daughter?
When will that hurt and suffering go away? It won't--not until the straying son or daughter comes back home. Should the innocent suffer? The parents quite often are innocent; and they hurt and they ache and they pray, and the pain will not go away.
Who suffers most, the incest perpetrator or the incest victim? Little ones are sometimes violated at a very tender age.
Who suffers most--the fornicator? the thief? those involved in drugs, homosexuality, and other perversions--or the innocent? Or do sometimes the innocent suffer more--the paraplegic, the quadriplegic, those with debilitating diseases, the "innocent" man or woman who has been involved in divorce, and dozens of others?
I believe sometimes the innocent suffer far, far more than the guilty--and that would not be justice, would it? It wouldn't be fair.
Now then, if the sinful one can go in and sit down with the bishop and have the burden relieved, then why should not the innocent? There are those who watch a spouse slowly die with cancer--a husband eventually becomes a widower or, if a man dies, a wife will be left alone. There are those who have other kinds of debilitating diseases--for instance, the quadriplegic who goes through a difficult life that way--isn't it only just that somehow the Atonement cover that kind of suffering? The innocent must be able to find the same relief as the guilty; that would only be just.
In Alma 7 we discover that the Lord suffered not only for the transgressions and sins of the world but for our afflictions and our illnesses and the sicknesses of the world. That is the part of the Atonement that I have missed somehow, and I want to suggest to you it is not left undone. Justice according to the supreme goodness of God will be satisfied. When we have a heart like unto God's own heart, we know justice will take place. Now, the innocent ones must do the same thing that the guilty do; that is, they must go to him who has a right to lift that off of their hearts.
President Harold B. Lee said, "I came to a night, some years ago, when on my bed, I realized that before I could be worthy of the high place to which I had been called, I must love and forgive every soul that walked the earth" (CR, October 1946, p. 146). If you have been violated, if you have been abused as a child or as an adult, or if you are later on in this life, would you remember that we must forgive the offending one? Justice "according to the supreme goodness of God" means that we do turn it over to him. It will not be left undone. We can have that absolute assurance. That would only be just. We must take it off of our hearts. Some modern psychiatrists might say, "Well, you don't get healed that way," but you do. You do get healed by turning justice over to God and forgiving the offender. We must be merciful if we would obtain mercy. The Lord can lift all burdens from us. Once we turn it over to him and simply say, "It is between that person and God. I forgive," then the burden will be lifted quietly and easily. If you are sitting here today and have had those problems in the past and can in your heart forgive and simply turn justice over to the Savior, then through his Atonement those sicknesses and illnesses and the abuses will be lifted from you. That would only be just.
The innocent must forgive the perpetrator, then transfer the burden to the Savior; and that is justice. That, again, does not mean that it is left undone; it just means that we have turned it over to the Savior.
Vaughn J Featherstone, “A Man After God’s Own Heart”

Friday, February 11, 2011

And what do I do now?

I felt a great disturbance in the Force, as if millions of voices suddenly cried out in terror and were suddenly silenced. I fear something terrible has happened. 
That quote was the first thing that went through my mind when I heard the announcement about the MS/Nokia partnership.  As a community member I feel betrayed but I feel even worse for the employees.  Nokia has been building up a strategy that attracts a very passionate group.  The main supplier of your mobile platform switching strategies away from your needs is a drop in the bucket to your employer switching strategies to the exact opposite of where your passion lies.  Whether you quit, get layed off, switch to developing a product you dislike, or even move to a project in the forgotten shed that gets no attention are all options that are not fun.

So drop in the bucket time.

I first switched to Nokia Linux-based products from Palm because I needed pocketable internet access.  I was moving to a lot of internet services so my Palm wasn't doing a good job fulfilling my needs.  I was annoyed with the Linux support which was purely a community effort.  Momentum is important so that I will have the apps I need and the lifetime to make the switch worth while.  I bought the 770 more as an experiment and found it fulfilled my needs.

I started developing applications for it to fit different needs and have come to appreciate it as a development platform.  I can develop and use my applications on the desktop and have them also work on Maemo.  That makes development easier and means I can make greater use of my work.  I've also come to appreciate a flexible architecture with things like Telepathy allowing VOIP/IM service to be first-class, sharing system, libsocialweb (Meego), and hopefully in the future libfolks for contact aggregation.

Writing mobile applications has grown beyond fulfilling my needs as a user.  I enjoy the opportunity to provide benefit for people as well as the chance to experiment and play with things that I don't get to in my job.  Releasing my applications for free changes the feeling of user support, fixes, and new features from have-to to get-to and keeps things very liberating and fun.


Where do I go from here?

Meego: Intel is sticking with Meego.  I am curious to see what all devices are announced next week.  If they look like they have life to them then maybe I'll stick around.  Nokia is still keeping Meego development around as a project and is releasing a device this year.  I wonder if this is to fulfill some item in a contract with Intel.  If so and when the contract ends, this is dead.  If not, I wonder how long it will survive.  I am sure the financial analysts will be telling them to kill it to shift even greater investment to money pot they will expect WP7 to be.

Android: Android would probably offer me the apps I need.  Linux being under the hood is meaningless when you don't have the full Linux experience.  I feel no motivation to develop for it, either in Java, C++ and the Python supported seems grotesque at first brush.  I dislike the siloed approach that apps focus on.  You don't get the power of frameworks like Telepathy, libsocialweb, or libfolks where the backend is decoupled from the front end, allowing for choosing the front-end and back-ends that best fulfill your needs rather than sacrificing one over the other.  I dislike the idea of a manufacturer holding back updates and feel too lazy to always be following the latest custom ROMs (or some of the feats you need to go through to load one on some devices).   I've played with friends Android devices and follow high level developments in the Android community but I could be mistaken on some things either good or bad.


webOS, something else? WP7 and iOS are out of the question.  webOS seems a bit limited in both apps and development platform but does offer "synergy" which sounds like it provides a similar experience of a plugin architecture that Maemo has.  I feel a bit concerned over the momentum of the platform especially in terms of how well it'll stick around.  Being from a single vendor adds to that risk and limits device options (which was why I was glad Nokia partnered with Intel to create Meego).  I only have cursory knowledge of webOS and have never played with a device whether this biases me in its favor or against it is to be seen.

I think I'll wait for next week to see what Meego devices come out of MWC before making my decision.

In the mean time I'd be curious if people have recommendations:
  • Pocketable (3-5 inches) devices with modern specs (Required)
  • Google Voice / VOIP Support regardless of network connection (Required)
  • Good support for desktop Linux (Required)
  • Support for Google services (GMail, Reader, Calendar, etc) (Option because I'm used to using the mobile website)
  • Access to a Linux command line with VIM and SSH (Optional but encouraged)
  • Support for Python or some other higher level language (maybe I'd even be willing to venture into Javascript which always felt dirty to me). (Optional but encouraged)
  • Apps run on both desktop and handheld without modification or emulation (Optional but encouraged)
  • Official way to distribute free apps without charge (Optional but encouraged)

I'd also be curious what users of my applications will do.  There have been some stalwarts on Maemo 4.1 (n800, n810).  Will you all be sticking around or giving up on it?  Will there be a similar stalwart community on Maemo 5 (n900)?  If I move from Maemo to Meego and everyone jumps ship from Maemo 4.1 and Maemo 5 then there is no reason for me to put in the extra effort to maintain compatibility with Maemo.

Friday, January 07, 2011

Porting Dialcentral: The Last "10%"

I had thought I was "almost done" with the rewrite of DialCentral from GTK to Qt.  I've even started investigating my Meego ports and started helping package / develop a new project.  Oh the joy of rewriting software and reimplementing old bugs and the creation of all new ones.

Maemo 4.1 was leading in being the least polished.  Somehow I kept missing the setIconSize method on QTabWidget to override the default tab size on that platform which was incredibly small.

I also had to fix some modality issues.  I had not set the parent window of my dialogs because rather than a new window appearing, the dialog's contents would be drawn on the parent window on top of everything else.  It took me a bit to discover the variant of setParent that I also needed to set the Qt::WindowsFlags which you can conveniently do both with a setParent overload.  The other side of this modality issue was with close buttons on Ubuntu on tap-out-of-window on Maemo 5, I forgot close buttons on some dialogs.

The last major user complaint is for those who haven't yet installed a Qt application on Maemo 4.1.  The Application Manager reports the size of a package as its own size plus all of its dependencies.  This makes sense for if a program has a separate data package or uses a rare but large library.  The downside is if you see 5 packages listed at 24 MB "each" then that is a bit discouraging for installing any of them.  Not much can be done about this one though.

I think most of the other Maemo 4.1 issues have been resolved or are "good enough".

Maemo 5 is now presenting the bigger challenge.  Take a look at the following screenshot.

If you can't tell "Tell Me" is my number of choice for testing DialCentral.
Problems:
  • The box/line in the text box are an artifact of scrolling
  • The "Cancel Call" button is marked as not-visible but the "Send SMS" and "Call" buttons are marked as visible.  Sure doesn't look that way in the UI.  Well, until you press on part of "Cancel Call", then the "Call" button is drawn on top.
The best I can figure is that it is glitches in Qt dealing with the compositing.  While the window is hidden and in the time that it is sliding in I am changing up the UI in response to changes in the model.  If you cause something in the UI to change, like going back and adding another contact or entering some text, some or all of the glitches go away.

I could just chalk this up as a Qt bug, file it, and move on.  Even if I can find a simpler reproduction case what is the chance that Maemo 5 users will see the fix?  Even if there is a chance that they do see it, how does that help them in the mean time?  I've been experimenting with update, activate, enableUpdate with and without delays aimed to arrive after the slide-in animation and have not gotten any results.  I might just have to queue up the UI changes for a timed delay after show to hope it is after the animation.  This will take a bit of rewriting this dialog for a problem that is only on one platform.  I'm not looking forward to this.

Primitive Debugging

At the end of a release at work our product has to be tested mixed in with other products.  In development we tend to be focused on our individual product and we try to keep things simple for reproducibility sake.  Our customers focus on a problem and need multiple products to be used in complex ways.  This helps give us some comfort that things won't break terribly in the customer's environment.

These are no the most fun issues to be had.  It is difficult if at all possible to reproduce these issues outside of the test lab.  The test lab also exists on an isolated network.  These combine to reproduce some interesting challenges when debugging.

By dumb luck I ended up being the one to usually go down to look at these problems.  This time around a different developer got wrangled in.  This is an experienced person who previously only dealt in app software.  His favorite tools like remote desktop and Visual Studio debugging (remote or even local) are thrown out the window.
 
Normally I end up using WinDBG but some quick looking leads us to believe it is an issue with the startup of a service we have.  Debuggers aren't much use in these situations because you can't start the service from inside it and you can't always attach in time.  So even though my coworker dreads WinDBG, he can't even use this tool.  That leaves us with print messages from a debug build of our service.  I am the one to generally maintain the service in question and I've been sure to put in debug messages in all the most useful spots.  I also showed my fellow developer a few tricks with debugging through DebugView.

This just gave me pause to reflect on how useful it is to use (in my case exclusively) these "primitive" tools.  In regular day-to-day debugging I can use the right tool (user space debugger, kernel space debugger, prints).  In addition I have the experience to deal with these more extreme debugging situations.  This is another great benefit for tools like VIM which you can use in a GUI, local command prompt, and through SSH.