mongoexport json format UTF-8 characters

So, you just did an export of your mongoDB database into a JSON formatted file called exported.json.  In part, you did this because you have this crazy idea of using the JSON with another application.  Then you see some strange stuff in the URL fields you exported.  Specifically, you see stuff like \u0026 in them.  These are actually UTF-8 codes for the % (percent) symbol.  If you want to work the exported data back around to the stored format, you’ll want to check out Python’s json library.  I’ve included a starting point below.

import json
f = open('exported.json')
for line in f:
    print json.loads(line),

Show, don’t tell

I recently read an article about writing techniques that talked about “showing” the reader what was happening versus “telling” them.  An example of telling a story is: “it was bitterly cold outside.”  Or we could show the reader: “I braced myself as I headed outside.  Exiting the building I hear the rope on the flag slapping against the pole.  The straining flag appears to glow with the sun behind it.  My body reflexively shivers when the next wind gust hits.  I chose the wrong jacket.”   This same principle of show, don’t tell can be applied to business and IT. 

As an example, you could say we’re experience great growth year over year or you could show a simple graphic and let people draw their own conclusions.  In this graphic I also draw from the viewpoint of less is more.  There are no axis, scales or excess colors and labels as they don’t bring any value.  The graphic simply shows a value of 20 for 2013 and 40 for 2014.  My challenge to you is to think where you can apply show, don’t tell in your own writing, presentations and applications.


Sony Flip 15 upgrade

I have a SONY Flip 15 convertible tablet (SVF15N17CXB) that I use primarily for contract work that requires a PC.  It is a very nice machine with an i7, 8G of RAM and switching discrete/integrated graphics adapter.  When I purchased it in early 2014 the two things it was lacking were an SSD and an active stylus.  I quickly remedied the lack of stylus.  It did come with a 1 TB hybrid fusion drive which I reasoned I would evaluate while SSDs continue to evolve.  I used this configuration for the better part of a year.  I noticed that most often observed slowness came back to I/O bound processes – the hard drive light was flickering a lot and the performance tab in task manager confirmed it.  So, with the last minute renewal of tax credits on business asset purchases I decided to upgrade the machine.

I had originally picked out a Samsung 840 EVO at 512G.  Since then the 850 line up was introduced.  Based on my observed hard drive usage I decided to go with the faster, but slimmer (in capacity) 850 PRO in 256G.

I figured if I am going to go through the work of opening the machine up, I would upgrade the RAM at the same time.  I went with 16GB of Crucial Ballistix that is also faster than the stock RAM.  Since, the hard drive I’m pulling out is a 1TB drive I picked up a USB 3.0 enclosure with UASP support so I can use it as an external drive.


Upgrading the Flip 15 is not for the faint of heart.  It is ultrabookish in form factor.  What that means is no easy access panels.  You get lots of screws with some of them hidden under rubber feet and a cover you have to pry off.  I found the tear down in this video very useful.  My tip is to start prying the cover off by the power connector.  Continue loosening the cover all the way around.  Slide the cover off by moving it away from the head phones connector.


In the picture above you can see the new memory in place in the lower middle of the picture.  The SSD is under the silver and gold colored ribbons in the lower right of the picture.  I did not utilize some of the existing foil/plastic shielding that was on the original case.  It appeared that it was primarily there as an insulator between exposed components on the HDD circuit board and the rest of the machine.  The SSD has no exposed parts.  It an all plastic case.  I did reuse the adhesive wrapper/shield on the bottom portion of the drive as it is also used to secure the drive cable connector.

Since installation of the new parts, the machines performance is much snappier.  Windows 8.1 Pro launches in ~4 seconds from a cold boot.  Development environments start up much faster.  Overall, much less time is spent waiting on the machine.