Installing Docker 1.0.0 in Ubuntu 14.04 Trusty Tahr

Docker just hit 1.0.0, which to adds more confidence to use it in production setting. For those not yet familiar with Docker, hit this page What is Docker and see why it will be a influential project/tool/platform now and in the future.

If you are using Ubuntu 14.04 Trusty Tahr, upgrade then hit

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y apt-transport-https
sudo echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo apt-get update
sudo apt-get install -y lxc-docker

The above script is an equivalent to what you can find at https://get.docker.io/ubuntu/

Reboot.

And start testing and using your docker system.

Flat UI Kit Demo on Bootstrap 2 Docs

Hello again.

I’ve been following Bootstrap since their 1.x release. The project as of this date has already gained a huge huge following, a whooping 49k stars in Github; it’s the most starred project.

Then, just recently, there’s this another gift to the Bootstrap community: @designmodo’s Flat-UI Free. Its a User Interface Kit / Theme for Bootstrap that is, as of 2012-2013, is hip and stylish given the trend on an alternative “flatter” UI design (e.g. Windows 8, Google+).

Now, my search yields empty in finding a comprehensive demo of Flat-UI Kit. So I’ve hacked together a quick demonstration by applying the Flat-UI css and js markup to the stock Bootstrap 2.x documentation.

Below you’ll see the comparison between stock Bootstrap (blue button) vs. with Flat-UI styles applied (green button).

flat-ui stock-bootstrap

Checkout Bootstrap 2.3.1 Documentation with the Flat-UI style applied.

Quest for the perfect data / object persistence API

In response to Hristo’s post on: http://stackful.io/blog/discovering-sqlalchemy-core-the-relational-nosql-api-for-python/

I’m not sure but to me, SQLAlchemy Core seems to be a thin SQL generation / DBAPI translation layer. It wraps the relational model into a set of classes with OOish flavor to it. As you said, it is made up of building block classes for something more complex. I’m not just sure how to fit a NoSQL datastore behind the SQLAlchemy Core API; but I think with much effort it’s possible.

I do get that unexpressable want for an idiomatic, sexy API to the best object/data persistence solutions out there…

Good OO design promotes well-defined interfaces, separation of concerns, pluggability / testability, etc. Oh if only there’s a system where your class serializable definitions (as schemas, versioned copies (?)), object instances (lazily referenced), are all transparently instantiated/persisted to-fro the memory and non-volatile storage, plus there’s a rich API for adhoc queries. But wait, this sounds like a perfect OODB, or even an ORM, sadly there’s no one-size-fits-all solution.

Most OODBs will want you to walk the object graph to get your data.
ORMs try too much to be OOish but still require you to learn and master your RDBMS and SQL to be truly effective. Some even fall back to reinventing an SQL-like interface as a testament that adhoc query is difficult to tackle.
NoSQL stores are too specialized and their adhoc query facilities (if there are any), are so far behind with what the RDBMS world has to offer.

Think about the other attempts to this:

  • Have a look at something like LINQ in the .NET world. Collections, maps, joins are first-class language features and transparently translated into SQL if applied to database-backed data.
  • Checkout the experiments on functional DB APIs in clojure, scala, erlang.
  • Django has that non-rel project but I haven’t really followed that effort and (as of this post, the last update was 8 months ago)
  • Another example in Ruby there’s this DataMapper project, with an adapter to mongodb; for an ORM like api against SQL and nosql databases.
  • Heck, Perl’s DBI have weird drivers to it (CSV, LDAP, mongo). Writing a driver means exposing something as a tuple store.
  • Java has JPA as a standard, and there are implementations that support NoSQL data stores; e.g. I think EclipseLink supports MongoDB, Oracle NoSQL among others.

On final thought, pro-RDBMS people promote the idea that data is the first class citizen, the application code secondary; And I agree with what they’re saying that your data will surely outlive your application. Tuples, joins, normalization / zero-redundancy goes back to relational theory / algebra which to me makes good sense. So we continue to ask and mind the thought: what is this “object-relational impedance mismatch” really about and if it’s that real, are we close to a good-enough solution?

Interesting Reads and Discussions:

Orm Haters Do Get ItHN discussion

OrmHate – HN discussion

Orm Is an Anti-Pattern – HN discussion

Twitter Bootstrap 1.4 Documentation

Twitter Bootstrap is s a front-end css toolkit to help in rapid prototyping of web apps. Thanks to the good folks at Twitter, this open-source project is intended for developers like me with unspectacular design skills.
Common front-end concerns such as layouts, admin forms, grids, typography, etc. are easily done and reused at a fraction of the time.

The 2.0 release was out early this year of 2012; with many new features and changes. As of this writing though, the 1.x documentation was replaced with the newer version. For existing users like me, I have live in-project projects still using the 1.4 branch. I see no immediate need for an upgrade; I may start a 2.0 branch when I have the time. Many people are interested with the older docs as well.

With this I am hosting a temporary copy of the 1.4 documentation for everybody’s benefit; until such time when there’s an official one.

Link to the Twitter Bootstrap 1.4 Documentation copy

Cheers!

Reverse Mouse Wheel Scroll ala OS X Lion in Ubuntu 10.04

Learned a new command today: xinput. This allows you to (re)configure how X11 maps your input devices.

If you are on Ubuntu, and you’d want what Apple calls the “Natural Scrolling”, then you may do the following:

In the shell:

$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Macintosh mouse button emulation        	id=11	[slave  pointer  (2)]
⎜   ↳ SIGMACH1P USB Keykoard                  	id=9	[slave  pointer  (2)]
⎜   ↳ A4Tech USB Mouse                        	id=12	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=10	[slave  keyboard (3)]
    ↳ SIGMACH1P USB Keykoard                  	id=8	[slave  keyboard (3)]

In my case, my mouse is an “A4Tech USB Mouse”. Yours might be different so check carefully the output of xinput list.

I reversed mine using:

xinput set-button-map "A4Tech USB Mouse" 1 2 3 5 4 6 7 8 9 10 11 12 13 14 15 16

Check your wheel up/down scrolling. That’s it.

But this is not a permanent setting; it will be lost after a reboot. Add this command in the:

System > Preferences > Startup Applications.

The so called natural scrolling is a mode that was introduced in the release of OS X Lion; which corresponds to how one scrolls on an iPad/iPhone. It does feel awkward at first, but I retrained my brain/hand in continued usage. It does make sense when you think “I want to scroll the content” vs. “I want to scroll the scrollbar”.

People either love or hate this.

Installing Java 1.6 (OpenJDK) in CentOS 5.x from EPEL

I am posting this mini guide for those needing a quick guide in installing OpenJDK in CentOS 5.x.

The how-to information in CentOS community wiki sites explains how to build the rpms yourself from various JDK providers (IBM, Sun/Oracle, etc); but this is not what I wanted. What I wanted is to leverage existing yum repositories for CentOS, and this is where EPEL (Extra Packages for Enterprise Linux) comes to mind.

Continue reading

Assembla.com Free Project Hosting: free, trac, svn, wiki, private!

Update 2009-02-07: I am thanking Jason Fowler for pointing out that assemba does not offer free private svn hosting anymore. I tried logging in at my assembla account (yay, it’s been ages since) and my private spaces were marked readonly. For alternatives, check out Straw Dogs’ List

Assembla.com Logo On one of my free days, I was on a lookout for a free subversion hosting, for a private project. There are several free SVN hosting for opensource projects (Sourceforge.net, Google, berlios.de among others) but I needed one for a private (read: closed) project. A quick google and forum reads led me to Assembla.com.
Continue reading

Xubuntu: Pimp my Gateway Solo 3350 Notebook

Gateway Solo 3350 It’s been 5 days since my shiny pre-owned notebook arrived. Considering it’s size, specs and above all, price, this sure is a bargain find from TipidPC. I am truly blessed to have found such an item. Hopefully for me this will bring more productivity and portability nirvana. The thing weighs less than 2 kgs, very light and it’s barely noticeable in my bag.

Here are the specifications:

  • Celeron 500MHz Coppermine
  • 128MB SDRAM
  • 10GB HDD
  • 12″ LCD
  • ATI Rage Mobility Graphics Card
  • ESS Sound Card
  • 3com Ethernet LAN Card
  • External CD-ROM

Shopping around for a suitable “lightweight” linux distribution to install, the choice for me is clear: Xubuntu.
Continue reading