Tuesday, June 29, 2010

Maemo and Android

Lately I've been reflecting on my commitment to Maemo.  Olivier's blog post made some great points in both directions.

Since I like to ramble, how about some background?

I've been a Linux user full-time (at home) for about 8 years.  I've dual-booted for probably another 4 years before that.  I've gone from Slackware to Red Hat (wow, color printing support!) to Debian to Gentoo to Ubuntu.  I remember staying up through the entire night going through Debian's package list one at a time deciding what all amazing pieces of software I wanted installed.

I loved Gentoo's USE flags.  I was importing all of my music collection as Flac.  Debian didn't have Flac enabled for all packages but with USE flags I could enable Flac for everything that could build it in.  I started tiring of Gentoo's multiple day install process.  I would slip up somewhere somehow and wouldn't detect it until the entire system had compiled.  I didn't know what was wrong so I would start over from scratch.  This almost made me abandon Linux.  With Windows everything "just worked".   The "freedom to leave" kept me strong until I decided to "take the wimpy way out" and switch to Ubuntu.  That is the main motivating force behind the software and web apps I use.

For handhelds I originally used palm devices.  More of my data was moving to the web and at college I had wifi everywhere.  I wanted a handheld device that could match my circumstances and wants.  I chose Maemo and have been using it for about 3 years.  It wasn't too long after that that I started contributing to projects.

The lack of polish makes me sometimes wonder about alternatives.  I sadly admit that for a couple months I used an iPod Touch as my 770 was dying and I was hoping the n900 would release soon (it didn't and I got an n810).  That convinced me I couldn't go iOS.  Android is starting to look attractive though.  I've even felt it was the best thing to recommend to some family members who originally followed me onto Maemo.  That was a sad moment.

Some questions I ask myself include:
  • Why should I stay on Maemo when Android is blossoming?
  • Does Maemo have staying power in the market?
  • Would I need to invest as much time in development if I had Android's larger (free) market available?
I then remind myself
  • Working on the projects I do is a great way to develop skills independent of what work projects I do.
  • If I do decide to work on a project, I much prefer VIM + Python to Eclipse + Java. I write my apps on the desktop and validate they transition smoothly to the device.  SSHing into my device is great.  Modifying the source right there and trying things out is great.
  • Maemo has a much better chance as Meego due to becoming decoupled from a single vendor.  I didn't say it would be like Android but it'll be better.
  • The flexibility of the architecture.  DBus is a great system.  I love that Maemo uses telepathy.  After the long process of learning it I was able to integrate Google Voice support both in my phone and my desktop system.  I've started work on a Bluetooth plugin but that has stalled due to other projects.  The types of customizations people develop is great.
So for now I will be sticking to Maemo/Meego.  I hope I keep having reason to stick to the platform.  In the meantime I will keep writing software for it.

Porting Gonvert: Meaningless Results

So let's see how the two versions of Gonvert compare:

Qt Version
  • Feature parity with the GTK version
  • 5 Windows (Two ways of unit conversion, quick jump, and recent)
  • 1985 LOCs
  • From May 26 to June 15th
GTK Version
  • 1 Window
  • 1658 LOCs (766 of that is hildonize.py which Gonvert doesn't use all of it)
  • From October 29th to January 9th
LOCs are measured by "wc -l" rather than getting fancy.  I wrote both apps and they were written in a similar style with similar amounts of whitespace and documentation.

So for all of my criticism of Qt this went fairly quickly without a lot of code. I look forward maintaining this code base going forward.  It is still hard to compare the numbers because of how meaningless they are.  How much should hildonize.py count towards the GTK version?  How much of the GTK development time was me learning the code and providing a smooth refactored path through revision history rather than doing a fresh rewrite?

One nice side benefit of not having to modify the actual unit list or the base conversions is that I'm still shipping the GTK version in case someone really doesn't like the new stuff.  Now that I'm well beyond feature parity I don't think that is as much of a concern anymore.

I've already started on the next phase of my Qt learning process, porting ejpi.  Some outside things have come up which has slowed down my progress.  I'll follow up with posts on that later.

Porting Gonvert: The Actual Port

Starting from scratch made it a bit easier to redo the architecture and pieces of the UI.

I started off with one class named Gonvert that acted as my application class.  It owned all of the global QActions (which I coupled to my settings) and top-level windows.  Ironically enough I did not have it own the QApplication.  I left that to my main function.


I dislike circular references but with Gonvert owning all of the global QActions I passed the instance down into its children so they could add them to their QWidgets and menus.


Gonvert also managed loading and saving of settings.  I normally manage settings manually and then load/save them through Python's ini handling code.  This time I created dictionaries with QAction values being the values.  I then serialized/deserialized using simplejson.  This worked well.


I decided to take better advantage of stacked windows and made Categories a window rather than a dialog.  Like with other GTK applications, I ran into issues with modality and stacked windows when deploying to Maemo so I had to restructure things to allow everything to run on the desktop without being modal.


GTK's way of creating list views and tree views requires a lot of boilerplate but uses minimal inheritance internally and requires minimal inheritance to customize.  I think all you need to inherit for is creating custom cell renderers and creating your on model if you decide to not re-use theirs.  I loved that I could put any data type, including complex python types into the default models.  I never created my own model (though I probably should have in some places).


I must admit, I lied earlier.  I had to use concrete inheritance to do a custom model with Qt.  The models I was seeing were very restrictive and seemed only focused on QStrings.  With Gonvert I need to do math on data in the model and I like to center on the decimal place.  So I had to create a custom model to internally store the raw value and then to have a column for left of the decimal place and a column for the right of the decimal place.  The customizing I did in GTK with CellRenderers seems to be coupled into the Qt model which is really sad.  Why does my model care about presentation?  Why?  Why?  So it looks like for a lot of things I'll have to create custom models.  Sadly creating a model was confusing but since I never did it in GTK I can't say if it is easier or harder.


Gonvert tends to have a lot of units.  For some this is cool in a geeky sort of way.  For others it means they have to scroll through more to find what they want.  I went ahead and implemented favorites.  It worked out pretty easy to write it all.  The favorites editor uses strings only so I took advantage of the built in model.  I originally implemented it by having the user select the row.  This played a tad bit better than GTK with scrolling on Maemo but it was still a bit finicky.  A drag to scroll was sometimes interpreted as a drag to select or unselect.  I eventually switched it to togglable items which got the favorites editor to work smoothly.  I then would have the category and unit selection windows hide the non-favorite rows.  There is a filter to both sort and filter but I had read some bad things about it and just decided to do both manually.


On a related note to scrolling and lists I noticed strange behavior when adding my "Quick Convert" or "Condensed View".  When you drag a list to scroll, the widget fires a selection changed event for the row you started the drag on and then it fires an event to put you back where you were.  Kind of hacky.  I shared code between programmaticly setting a unit type and the user selecting one.  In the programmatic case we want to scroll to the unit.  In the user case this caused their scrolling to jump around because of these selection events firing.


The main view in Gonvert has tended to be a bit slow.  In the Qt version it was even slower especially with Favorites added.  The main view has an edit box where the user types in a value and then below that is a list of all units and what that value gets converted into.  The unit values get updated, and resorted on every keypress.  This with sorting caused odd issues with me setting rows as hidden for favorites so I had to update that every time the user put in a value.  The slow downs:
  • Marked the model as modified more times than needed
  • Modifying setRowHidden more times than needed
  • Doing a lot of calls back into Qt in the innerloop of Qt calling into my code.
When updating all the values I limited re-sorts to only happen when the value column is selected for sort.  I also made it so we would not signal the model as modified first for the modification and then again for the sort.  I also throttled updating of favorites.  When the user edits the value a QTimer gets started if it hasn't already.  At the end of the timer the model gets updated.  This introduces a minor delay in the updating (set to 100ms right now) but reduces the amount of time we block the users editing by good enough amount.  Sadly whenever the timer goes off and the user is still pressing a lot of numbers, there is a slight pause.

Other things
  • I played around with the favorites.
  • I removed a lot of the error checking in my model (like checking to see if the index was valid).  This proved very beneficial (as long as the View is written correctly).
  • I think I also did some other optimizations but those were the main ones.
Yes, I guided myself in this with the use of a profiler.

One nice thing about this port has been that I've not had to touch anything not related to UI like the loading of units and converting a single unit.  Sadly my model before and after has been coupled to the UI.

Monday, June 28, 2010

Porting Gonert: Qt's Design

All of the tutorials probably followed the bad example of Qt for concrete inheritance.  Some features are only available through inheritance.  Others have only recently allowed for composition.

Luckily I was able to get through all of Gonvert without concrete inheritance.  A nice trick to avoid inheriting from QObject to create signals is to hijack QAction.  I actually used QActions for what they were intended in Gonvert but in some future apps I might abuse them.  I find the class hierarchies odd as compared to GTK.  Just one example is GTK encourages inserting widgets into scroll windows but Qt has widgets inherit from them.  I do admit this probably lets them couple the concepts closely enough that it makes it easier to give a native feel on platforms.

The sweet taste of bloat in the morning.  Qt let's you show any QWidget as a window.  This requires less boiletplate for debugging my own custom widgets (which I left for my next porting exercise) but it makes each widget feel bloated that they can completely handle being a window in of themselves.


Qt was designed when C++ had a less extensive set of libraries.  Why does that have to bleed over into the Python bindings though?  When I first dived into GTK I was nervous about my interactions with the underlying types and ownership.  I eventually learned I could just ignore all of it and it felt great.  GTK had a feel that is very native to Python.  Tutorials for PyQt on the other hand have to go into long discussions of the trade-offs between native data types and Qt's data types.  They also had to go over object ownership rules.  This left a bad taste in my mouth.

I also see people recommending Qt equivalents of python objects. I'd rather not couple myself that tightly to the UI framework.  You can keep your database access, your XML, and (I hope) your threading.  That last one I have yet to explore how worth while it is to do.

A minor annoyance, ctrl+c in the shell does not seem to kill Qt.  If things went wrong setting everything up I have to go and kill my application.  That can be annoying for keeping debug cycles short.  I also had it crash on exit a lot.  I have no clue what I changed that removed that.

The old-style signal syntax is nasty in Qt.  The new stuff is pretty good.  I dislike that I don't get a token to use to unregister a slot but I pass in the same function.  This is annoying when your slot is a lambda.  It is also annoying if for some crazy reason you wanted to register a slot multiple times.  Registering multiple times and my use of lambdas brings up another annoyance.  GTK is written in C and so all callbacks had to offer a void* data pointer at the end so anything can be done with them.  In PyGTK this was cool because they exposed that to the user by allowing arbitrary objects to be passed in there (the object was already being passed in when using a bound method).  They even implemented it through *args so you didn't have it bundle up multiple objects yourself, it would do it for you.  In DialCentral I use a single slot for the dialpad and then use the data parameter to differentiate the key.  Qt is designed around slots being on objects I think and is used to member function pointers.  This sadly means they didn't have to have the void* of C days and you have to go through extra steps to pass arbitrary data to a slot.

I do really enjoy QActions.  At least I said something positive, right?  I'll probably have more gripes and more things to praise it for as I continue porting my applications over.

Saturday, June 26, 2010

Porting Gonvert: Qt's Documentation

Why do almost all UI examples rely heavily on concrete inheritance?  As I looked for tutorials, examples, and references, I kept seeing concrete inheritance come up.  It is bad design and it muddles up the examples.  Are they creating a function in the class for their own use or are they overriding a method?  How critical is it they override it to be able to get functionality X?

PyGTK tutorial and reference were great.  Everything is easily found in the reference and almost everything I needed to know was in the tutorial.  Qt's reference is good, PyQt's is a bit more so-so.  As for tutorials I have not found one concrete tutorial that covers 90% of what I need but instead need to jump from tutorial to tutorial depending on the specific thing I am doing.  I've even done searches through source code to try and find how to use somethings but that didn't get me much.

Porting Gonvert from GTK to Qt

On t.m.o I sometimes see requests to port applications from a previous generation of Maemo (like Quicknote and Multilist) or to port a desktop application to Maemo (like Gonvert).

I must be asking for punishment taking on a lot of these.

Gonvert started off as a unit converter for the desktop.  The UI was not well suited for mobile devices.  I had to make the UI more minimal and use my hildonize.py code to make it auto-hildonize.  Underneath the surface I had to do drastic code cleanup to even figure out how all the parts interact (btw if you want to see refactoring in action, check out my early git history with Gonvert).

As part of my plan for learning Qt and preparing for Meego, I decided Gonvert would be my first port.  No custom widgets, no threading, just taking user input and processing it to generate output.


So I'm going to look at Qt's documentation and design, what my experience was like porting Gonvert, and some meaningless statistics on the port.

Sunday, June 20, 2010

On Representation

There is a bastard kind of generosity, which, by being extended to all men, is as fatal to society, on one hand, as the want of true generosity is on the other. A lax manner of administering justice, falsely termed moderation, has a tendency both to dispirit public virtue, and promote the growth of public evils.
Common Sense, Rights of Man, and Other Writings of Thomas Paine
pg 81
Lately (as in over the last year or more) I've been reading various writings of Thomas Paine. In Rights of Man he defends free governments against Edmond Burke's attacks and Paine himself attacks back against monarchy.

How do we compare today with what the propagandist claims us to be on transparency, the role of our "leaders", and taxes:
But the case is, that the representative system diffuses such a body of knowledge throughout a Nation on the subject of Government, as to explode ignorance and preclude imposition. The craft of [royal] courts cannot be acted on that ground. There is no place for mystery, nowhere for it to begin. Those who are not in the representation know as much of the nature of business as those who are. An affection of mysterious importance would there be scouted. Nations can have no secrets; and the secrets of courts, like those of individuals, are always their defects.

In the representative system, the reason for everything must publicly appear. Every man is a proprietor in Government and considers it a necessary part of his business to understand. It concerns his interest, because it affects his property. He examines the cost, and compares it with the advantages, and above all, he does not adopt the slavish custom of following what in other Governments are called LEADERS.

It can only be by blinding the understanding of man, and making him believe that Government is some wonderful mysterious thing, that excessive revenues are obtained. Monarchy is well calculate to ensure this end. It is the popery of Government, a thing kept up to amuse the ignorant and quiet them into taxes.

The Government of a free country, properly speaking, is not in the persons, but in the laws. The enacting of those requires no great expense; and when they are administered the whole of civil Government is performed - the rest is all [royal] court contrivance.
Common Sense, Rights of Man, and Other Writings of Thomas Paine
pg 293
How much mystery do we have in our government? The race to declare negotiations of counterfeiting treaties as state secrets, the convoluting of processes, back room deals, hiding pork in large "public good" bills. How do these things take affect and how do we stop it? I've heard Tocqueville would attribute it to apathy and I believe that would be a good chunk of it. What do we do about it though?

Also look how we inflate the role of public servants from being represenatives, judges, and executors to the great epitaph of Leaders. Most do not deserve that moniker and are at best managers working for their own good. I turn to Hugh Nibley for a good description of the difference between Leaders and Managers
Leaders are movers and shakers, original, inventive, unpredictable, imaginative, full of surprises that discomfit the enemy in war and the main office in peace. For managers are safe, conservative, predictable, conforming organization men and team players, dedicated to the establishment.
...
For the manager, on the other hand, the idea of equality is repugnant and indeed counterproductive. Where promotion, perks, privilege, and power are the name of the game, awe and reverence for rank is everything, the inspiration and motivation of all good men. ...

"If you love me," said the Greatest of all leaders, "you will keep my commandments." "If you know what is good for me," says the manager, "you will keep my commandments, and not make waves." That is why the rise of management always marks the decline of culture.
I highly recommend reading the rest of that commencement address he gave.

Another great quote to contemplate on representative governments accomplishing good:
It is always the interest of a far greater number of people in a Nation to have things right than to let them remain wrong; and when public matters are open to a debate, and the public judgment free it will not decide wrong, unless it decides too hastily.
Common Sense, Rights of Man, and Other Writings of Thomas Paine
pg 301
With managers representing us, we have those who create, pass, and sign laws that contain the worst of both sides to an argument without the benefits of either rather than working from principle and compromising for the greater good. How many politicians have passed laws so hastily that they have not read the very law they are passing? How long will we be hurting from this haste when these laws are such wide sweeping things as covering outrageously sized stimulus plans or national health care?

Thursday, June 17, 2010

From Maemo to Meego

Seek out any project that has one of the following resume-ready words in its description:
  • Multimedia
  • Worldwide
  • Advanced
  • Strategic
  • Revenue
  • Market
  • Technology
  • Rapid
  • Competitive
The Dilbert Principle, pg 81
by Scott Adams
I'm thinking it best to start off with a little background. On talk.maemo.org and throughout the rest of maemo.org I am known as "epage" (I tend not to be too Original). I joined the community when I got myself a Nokia 770 to replace my Palm Pilot I used for keeping myself organized at school. My old college campus has wifi everywhere and I had moved a lot of my data over to online services so I needed a device that could handle my changing needs.

I started off contributing to a project called "GCDialer" a Grand Central client for Maemo. GCDialer would use your browsers cookies file with wget to communicate with Grand Central. This worked great on Maemo but my desktop had already switched to a version of Firefox that changed how cookies were stored. To get this to work on my desktop I took an ActiveState recipe for downloading pages with cookies and integrated it into GCDialer. Since then the other contributors backed off, we switched the name to DialCentral (pre-GV, for trademark concerns), moved over to Maemo 4.1, added a host of features when adding Google Voice support, and added Maemo 5 support.

I'm now the sole maintainer of DialCentral, Quicknote, Multilist, ejpi, Gonvert, and The One Ring. I've also contributed to NQA and flirted with Mer. This list slowly evoled as I've either start new projects (ejpi, The One Ring), I wanted to make improvements to things I use regularly (DialCentral, Quicknote), or people have requested ports (Multilist, Gonvert, NQA).

Recently I've been trying to help out on the wiki with Python Performance and PyQt.

That last one is where I'm going with this. I have a couple projects in the pipeline. One is for a non-profit and I'm waiting on them to give the "Ok" before releasing. Developing an app that was not for my specific needs or the needs of other community members but for a longer term benefit of a non-profit motivated me to finally start preparing for Meego.

With Maemo 6 we were told Qt was the future and GTK was community-support only. I think I saw in the transition from Maemo 6 to Meego that GTK was going to be fully supported. I took that from the Maemo perspective (rather than Moblin) and assumed GTK/Hildon was to be supported. This made me complacent to learning Qt and switching over. It took long enough switching my applications to support Maemo 5 in addition to Maemo 4.1 but to switch the toolkit also?. After some discussion on the mailing list about Hildon on Meego it looks like Stskeeps is going to pull through on this one though I wonder what Hildon is like without the custom GTK underneath.

I still figure I should learn Qt. My plan is the following:
  • Port Gonvert for an intro into the basic Qt UIs
  • Port ejpi to learn about custom widgets
  • Port DialCentral to develop strategies for threading
I've actually finished Gonvert and plan to write up my experience from that. The main reason I finally got around to starting a blog was to provide a source of slightly less outdated information than what I kept running into.

Wednesday, June 16, 2010

Temporary Death

Your roof, as you know very well, has been recently repaired, and has no aperture by which even a Woman could penetrate.
Flatland, pg 81
by Edwin A. Abbott
My group at work has three main clients: 1) customers who use our product in our tightly integrated ecosystem, 2) customers who use a variant in a more traditional environment, and 3) internal clients using us to build even more complex products for customers.

Sadly (1) is what we end up testing the most.

One part of our system is heavily used by (2) and (3) but not (1). So it is no wonder that we just now found out (internally) about a race condition with a delay loaded object in software that is about 7 years old and used in mission critical applications. I know what you might be thinking but this will not be a sordid tale about the woes of singletons.

We have a critical section around the delay loading. I recently got a bug report on a crash when we have two threads racing to use the object on process start. I sat back baffled for a bit not seeing the problem in our code so moving on to blaming the tools. I know, big mistake but at some point libraries do fail. It turns out the problem was with us and was fairly simple

A little background for non-C++ folk:
In C++ there is an idiom called RAII which allows for easy handling of resources. In this case when tScopedLock is created the lock is acquired. At the end of scope the lock is released. Whenever I see a garbage collected OOP language without an equivalent a little part of me dies having to see all of those "finally" clauses. I was very glad Python added the "with" statement and "from __future__ import with_statement" can be found in most of my python scripts.
void tClass::loadIfNeeded()
{
tScopedLock(lock);
if(!loaded)
{
load();
}
}
With a coding convention that is discouraging of spaces things tend to bleed together. So sadly it took me digging into the Windows Critical Sections data structure to realize when the count inside it was being modified. So I went and put the fix in

void tClass::loadIfNeeded()
{
tScopedLock scopedLock(lock);
if(!loaded)
{
load();
}
}

Oh the joys of accidental temporaries and their scope which lasts for the expression they appear in (usually).

Of course I was a (mostly) good citizen. I grepped through our code and fixed about 5 instances of this problem. I then added a check in our (very limited) static analysis to watch for people adding them. On an internal forum people came up with some pre-proc magic to try and help. Maybe later I'll investigate that.

"It's because people are stupid!"

It was reported that when Dr. Willard Richards ... first saw a copy of the Book of Mormon he opened it in the center and read a few pages. He closed the book with this statement: "That book was either written by God or the devil, and I am going to find out who wrote it."
A Marvelous Work And A Wonder, pg 81
By LeGrand Richards
I've occasionally played catch up with BYU's Tuesday Morning Devotionals. Recently I read "Scholarship and Faith" by Ross Spencer. I'd like to start off with his introduction to Dr Henry Eyring and Dr Eyring's comments:
Dr. Henry Eyring, the great LDS chemist and father of President Henry B. Eyring, was a great example of how to combine professional excellence with faith and humility. He was world-famous for his work on chemical reactions and was also known both to his scientific colleagues and to members of the Church as a man of faith and devotion. He said:
...
So this, then, is sort of the picture that I would give you and end on the note that I can’t see any difference between the kinds of arguments that you make to support religion and the arguments that you make to support science. I understand, of course, that there are contradictions of all kinds in science, and there are contradictions between science and religion, and there are contradictions between various parts of religion in every human mind (but not in God’s mind; in a billion years you’ll have your problems solved, if you can wait).
[Henry Eyring, “You Don’t Have to Make All the Mistakes There Are,” speech given at Brigham Young University, no date, Henry Eyring Papers, Manuscript Division, Special Collections, J. Willard Marriott Library, University of Utah, box 20, folder 23;quoted in Henry J. Eyring, Mormon Scientist, 302]
I know that there is a God. I do not feel the need to conform my religion to science or science to my religion. I feel confident in holding two views in my mind that some may feel are opposite. I've not always felt that confidence and sought to bring them together but I've come to understand that of the vast universe I have an insignificant knowledge of both and that it would be futile for me to take my limited and incorrect perception of God and His Laws (moral and physical, if they can even be divided like that) and conform it to my misunderstanding of a bunch of observations and mathematical predictions we've made about the world around us.

Even if I interpret the written and spoken word to be contradictory to established theories of Science I still see value in learning from those theories for even if they happen to be incorrect they provide valuable insight into how God's creations work.
Sometimes it seems both "religious communities" and "intellectual communities" are far from learning the valuable lesson that Ross Spencer learned from Isaac Asimov:

I received a similar message from a rather unlikely source early in my career. When I was just out of graduate school, I attended my first meeting of the American Physical Society in New York City. It was a heady experience, and a highlight was a special event arranged by the conference organizers: the great science fiction writer Isaac Asimov had been invited to speak to us.

He began by telling us about something that had happened to him when he was a young student. He was hired to help a historian do research on social resistance to technological change. Hour after hour he wrote down the stories he found in books in the university library about people protesting the invention of things like machines to spin thread and to weave cloth, steam-powered trains, automobiles, airplanes, etc. All of these advances were perceived by the general public either to be physically dangerous or to be a threat to the livelihoods of workers in trades that were about to be destroyed by these advances.

He regaled us with these stories for a long time, and they were very funny, but it went on so long that I began to wonder where he was going. Finally he got to the point. He said that when he started to write science fiction, he remembered all of this work he had done. So while his fellow writers were all rhapsodizing about the thrill of rockets and space travel (long before such things were possible), he wrote a story about how the local populace showed up at the launch site with torches and pitchforks in opposition to space travel. Years later, when rockets and travel outside of the earth’s atmosphere became possible, there were protests, and many of Mr. Asimov’s colleagues were astounded that he had predicted so far in advance that this would occur.

“Why,” Mr. Asimov then asked us, “among all of these talented and visionary writers, was I the only one who was able to predict that this resistance to change would occur?” He let us think about the question for an uncomfortably silent minute, then leaned into the microphone and said in an intense voice that I still vividly remember: “It’s because people are stupid!” And he included himself. He said that if he hadn’t had this idea pounded into his head daily for several months, he was sure that he wouldn’t have been able to foresee it either.

Tuesday, June 15, 2010

Laws of the Land

He thought it proper however that the true nature of the existing confederacy should be investigated, and he was not anxious to strengthen the foundations on which it now stands.
The Anti-Federalist Papers, Opposition to the New Jersey Plan, pg 81
by James Madison
On social news sites I came across an interesting article "Do laws even matter today?".

Cushioning the consequences of people's bad decisions from hurting themselves makes me wonder sometimes why I bother to be careful. If everyone else is in debt and has no savings, why should I maintain self-discipline to not get into debt and save for retirement? The government will cushion the pain for people. If it can't then it is probably because it is buckling and breaking from its own paternal nature. At that point what good will my self-discipline have done me if money isn't even worth anything (fiat or otherwise)?

Another area I find interesting in this the effect of unavoidable law breaking has on the mores of a nation. I came across a quote from Bastiat (who I've now added every book of his to my reading list) that says

When law and morality contradict each other, the citizen has the cruel alternative of either losing his moral sense or losing his respect for the law. These two evils are of equal consequence, and it would be difficult for a person to choose between them.
The Law, by Bastiat

In college I took a course titled "History of Creativity" to fulfill my Civilization credit. One of the things we discussed was the affect of prohibition on the mores of the nation. Overnight the nation became a nation of criminals. When this happens people turn a blind eye to other crime. How can they condemn others in the court of law when they are criminals themselves?

This leads me to wonder about other things like the "War" on Drugs and Speed Limits. Are we making people tolerant of worst crimes by outlawing these? If we legalized these and other crimes become the new rage where do we draw the line on legalizing these verse taking a stand for what is right and what is wrong?

Sweet-and-Sour Bitter Melon

But to the hackers it was all part of the system. It made no human sense, but it had its logic. It was The Right Thing
Hackers, pg 81, by Steven Levy
I've been meaning to start a blog for a while (which can be interpreted as I'll be playing catch up on post ideas for a while). I plan to have this serve as way to collect my thoughts on things political, spiritual, electronic, and personal.

As a side benefit I will also get to explore what page 81 says in each of my books.