Tactical Technical Strike

Musings, Thoughts, Notes, & a brain dump of what I come across

Because I’m just dumb: PHPPgAdmin is a web-based Postgres admin app

Posted on | February 28, 2010 | No Comments

I’ve long been a fan of phpMyAdmin, the oft used web based manager for my sql. Literally it typically gets installed as soon as mysql does on a new box, because i hate almost all of the gui tools and some things are just quicker from a graphical interface (like inserting rows into a table that i can’t remember what the columns are…).

Well, I’m trying to switch to Postgres for some of my work. The future of the MySql project seems to be up in the air a little bit because of Oracle’s recent acquisition of Sun, and postgres has some features that i’d love to make use of (most importantly the postGIS extensions). That, and I’d love to expand my knowledge of DB stuff, so why not learn postgres?

Well, I spent a ton more time than I should have tracking down that the postgres version of mysql was called phppgadmin. PG is apparently the shorthand abbreviation for postgres.

References:
[1] PostgreSQL
[2] PhpPGAdmin
[3] Apt-install: PHPPgAdmin

Ubuntu: Video skipping and Display Performance

Posted on | January 10, 2010 | No Comments

At Home, my primary computer is a somewhat underpowered Dell Inspiron 530, running Ubuntu 9.10. Along with the low power processor and INTEL onboard video, rendering is often a bottleneck. Because of that, I’m always looking to improve my Display performance.

While searching through Lifehacker one day, I found a great article about setting the Compiz refresh rate, because it seems to have trouble detecting the correct rates on it’s own. This was pretty easy, only involving installing the COMPIZ configuration manager (apt-get install compizconfig-settings-manager or with the apt-url here), researching the refresh rate of my monitor ( A samsung 21″ basic black that refreshs at 75 Hz), and then updating the property in my Settings manager (Compiz->Settings->General->General Options->Display Settings [tab]).

And that’s it, you’re done!

References:
[1] Lifehacker: Make Compiz Run more Smoothly

Easily install apt packages from web links

Posted on | January 9, 2010 | No Comments

Did you know that you can easily create a link that will install or update a package for your apt based system? It’s easy with APT-URL! The syntax is simple, just apt:{package-name}, and your ubuntu, android, or debian system should try and grab the package. Makes it really easy when documenting package information online.

References:
[1] Ubuntu Wiki discussing AptUrl usage

Looking at bad API decisions: Openlayers toString & fromString

Posted on | January 9, 2010 | No Comments

From time to time, I come across little “bits of aggravation” from various websites, libraries, or technology vendors that make me want to pull my hair out. I’ll spend days or weeks working my way through them, only to realize at the end “If someone had just published this little nuance in bold letters before I started, I would have saved all that time.” This is my attempt to save all that time for someone else.

OpenLayers, if you didn’t know, is a rather large javascript library that provides not only the ability to connect to the Google, Yahoo, and Microsoft mapping apis, but also to common to geospatial servers that implement the open geospatial consortium (ogc) standard protocols for delivering information (this includes ArcGIS and Geoserver).   However, because Openlayers is such a large codebase attempting to provide so much functionality, I often run up against situations where it seems the project has neglected much of their existing functionality in a rush to add new features.

Not that I don’t understand OL’s reasoning.  As the web and the geospatial community continue to advance at breathtaking speeds, the OpenLayers library is tasked to keep up with the latest and greatest functionality, or risk being the library that “Won’t do what I need” and eventually leave users looking for alternatives.  But after working with the library for the better part of 6 months, I’ve been generally surprised at how many broken controls, methods, and inadequate error checking I’ve found within.  Before you implore me to submit patches and help fix the code base myself, I’m writing this in an attempt to provide a public voice to some of these concerns, not to criticize the OpenLayers community for their design decisions.

The issue at hand:

The OpenLayers.Bounds object attempts to describe the current viewport of a map object.  It lists the coordinates of the map corners, making it easy to zoom to a specific view or perform “map math” to change the perspective.  Along with a constructor, it also provides methods to serialize & deserialize the object to an Array, String, or Size object.  However, most likely due to an API that has evolved over time without going back to reconcile prior design decisions to newer techniques and best practices, the toString and fromString methods use data in entirely different formats.  An example of these formats are shown below.

String toString(): return string is of format: “left-bottom=($left,$bottom) right-top=($top,$right)”
void fromString(input): input string is of format ” $left,$bottom,$right,$top”

From the above code example, you can see that you could not directly reuse the fromString format as input for the toString format. It is very elementary to convert these formats, but isn’t that the point of an API? By proper naming, documentation, and working examples, an API should make it down right idiot proof for it’s users to proprly employ it. This is a situation where OpenLayers API did not make that happen, and caused me numerous hours of banging my head. Hopefully, this will save you that trouble.

References:
[Define] OpenLayers: An open source javascript library providing geospatial client functionality for use within the browser. Displays map tiles and data by implementing most common geospatial sources and protocols.

[1] Openlayers

[2] Openlayers.Bounds API Documentation

[3] A bug documenting this issue from 2008

Removing that pesky pomegranate stain

Posted on | January 2, 2010 | No Comments

From the “I do the research so you don’t have to” department:

Last week we had a pomegranate stain in a shirt to try and get out, and since I was challenged that it was impossible, I set out to remove this pomegranate (man that’s tough to spell) stain from the shirt.  Turns out, it was next to simple.  I’m sure there is some crazy scientific reason as to why this works, but it beats me.  Here is what I did:

  1. Rinse the material/shirt in cool water, removing an excess juice and getting as much “low hanging fruit (juice)” out as you can.
  2. Start water (plain, tap water works fine) boiling.
  3. Rub the remaining stain with baking powder.  I did this by just sticking my thumb into the arm and hammer box, and getting whatever stayed on.  I think rubbed this over the stain, and it will change from purple to a deep blue color.
  4. Pour boiling water on the stain until it is gone.  It took me about 2 qts of poured on water to get it out.

Don’t ask me how, and don’t ask me why, but that’s what did it.  Hope you have as much luck as I did, and I’m sure i’ll eventually get to find out if this works for other stains too.

Original Source material (if you want to figure this out yourself):

[1] How to clean pomegranate stains

« go back
  • Links, feeds, and all the other info that I need to be fully self-indulgent, shared, and organized. These links and widgets are subject to change.