PyCharm Database View and Google Cloud SQL

PyCharm has really improved my developer productivity.  It has great integration with the Google Apps SDK and with a little tweaking, can support multiple Google Cloud SQL database logins.

The tricky part is managing the stored credentials behind the scenes. Seems like the Google SQL Command Line Tool only supports 1 login at a time. If you are like me and do projects for multiple clients, then you need multiple Google Account logins.

What works pretty easily is swapping out the credential file behind the scenes. Take a look here to find where the Command Line Tool is storing it’s credential:

https://developers.google.com/cloud-sql/docs/commandline#revokeaccess

You can setup the Command Line Tool using your first account, then rename the resulting credential File (or Registry Key in Windows. Setup the Command Line Tool again using your next account, then rename the credential file/key to something else.  Now you can swap your active credential by swapping in the right file/key.  Symbolic links work in Mac/Linux, .reg files to set the right key should work in Windows.

Once you have the right Credential in place, tell PyCharm about the Google Command Line Tool .jar database connector file and you are good to go.  Here’s a picture of my setup.

Setup PyCharm with Google Cloud SQL

Rule in School

I’ve got one son heading off to Wayland Middle School, the other starting Cambridge School of Weston.  Both boys are tech savvy, so what are the right devices to support their educational experience?

Wayland High School is giving every kid a Macbook Air.  My high schooler, thinks that’s a great idea.  But recently he was interacting with his school portal and everything posted there was an Excel file.  He’s also into having “different” stuff than everyone else.  Could it be that a Microsoft Surface RT tablet makes sense for High School?

The middle schooler just want’s a Nexus 7 tablet so he can read and play tablet games.  So that one is easy.  Nexus 7’s are about the most reasonably priced devices on the market.

You might be thinking that these tablet devices are not powerful enough for real gaming (and that’s what kids really want computers for these days).  Right-O.  They’ve both already got PCs loaded with games and other distractions.  The idea of a device for school is something that can do email, writing, basic web searches, play music, and not much else.

 

Macbook Air vs Pro

I’ve been using a Macbook Air from 2012 for the last year and love it in general. Our Wayland High School is “loaning” them to every high school student as part of a 1-1 program. It is a sweet machine, but I’m learning it does have it’s limits.

The big limitation I’ve hit with my Air is fan noise when doing anything with video or screensharing. GotoMeeting, WebEx, Skype, all of these get the CPU fan spinning to maximum. While this isn’t technically a problem, it is lowering my satisfaction with my Air being my only computer. And for reference, I’ve got the Core i7 version w/ 8gb RAM.

I’m hoping the next generation of Macbook Pros with Haswell internals will be powerful and have great battery life. I’ll probably upgrade and pawn off my Air on one of my kids. Don’t tell them I said that.

PyCharm is Good

The Wayland Barn loves PyCharm.  I’ve been using Google App Engine and Django with Eclipse for about a year and I finally took the plunge and switched to a dedicated IDE.  What a difference!

I shouldn’t complain.  The Eclipse add-in I had been using, PyDev, was free and worked pretty well.  In fact, I’d never have switched except that Google broke the dev_appserver about 3 months ago and I lost my ability to do step debugging in Eclipse.

After a very short learning curve with PyCharm, I’ve got my projects, databases, GIT source control, and deployment all working in a neat package.

Freemium ain’t Free

Over the weekend, PowerWeek.com switched from Freemium pricing to a Free Trial model.  The change was motivated by 3 factors.

  1. We looked at our user base and saw that lots of people signup and then never return. So we were emailing them every day for the rest of their lives?  Not good.
  2. Most of our user community is trying to make a change in their work habits. They want to get more done.  If PowerWeek is free, then we reduce the commitment and initiative to really try our dogma.
  3. Our users are business people who can benefit economically from adopting PowerWeek and promoting that others in their downline do the same.  By leading with a “free” promise, it becomes hard to see the product as something you pay to leverage.

Freemium is great for advertising driving websites.  We are the opposite.  Our users unanimously told us to NOT start using advertising to pay for the operation.

The experiment has begun.  We had an 8% conversion rate from Freemium (which is killer, we know), but we think we can do even better!  To read more about our user-driven decision, check out our press release.

Hangouts or Skype?

I’ve been relying on Skype as my primary phone at my Wayland MA office for the last 2 years.  It has been really good in general.  Then again, I’ve got super big pipes from Verizon FiOS (70mbs down/35mbs up).

Recently, I’ve had clients who prefer to use Google Hangouts.  On my Mac, it seems harder to get everyone assembled using the Hangout UX.  Also, the audio degrades for me after about 30 minutes.  If I disconnect and reconnect, then I’m fine again.

It is a pretty interesting story to see how Google has progressed to invade this space.  Check out the excellent chronology by the Verge here.

Jawbone UP is buzzing

I just took the plunge and purchased a Jawbone UP for my 49th birthday. The idea is the little bracelet keeps track of how active you are (or aren’t) and reminds you to get more exercise. I was waiting for the Fitbit Flex to be released first, but now they are sold-out everywhere and have an 8 week waiting list. I was able to get an UP at BestBuy right next to Wayland, MA.

It just buzzed at me to indicate I’ve been stationary in my chair for 45 minutes. I’ve got to get up now and move around. I’ll be experimenting with the app and device the next few weeks and will report back how it feels.

 

Parallels and Windows 8 – two core minimum

I’m amazed how well my Macbook Air (June 2012 version) runs Windows in a virtual machine with Parallels.  I’ve been doing a bunch of data migration work recently and need to run Windows 7, SQL Server, and Office 2010.  Everything is seamless and fast on a second monitor so it feels like 2 PCs on a single keyboard and mouse.

Then I started working with Windows 8 and Office 2013 for a different client and the wheels came off.  The VM would stutter like a car climbing snowy Claypit Hill Road in Wayland.  The CPU would peg but not even the animated cursor would be spinning.

Frustrated, I launched a case with Parallels support.  After a little back and forth, I got an appointment with an engineer who was polite, articulate, and — wait for it — helpful!  He indicated he had seen this problem before and adding a 2nd CPU core to the VM resolved the issue.

The change was painless.  It required fully stopping the VM, but no other surgery.  I haven’t seen the stutter problem since, and don’t notice any adverse performance consequences from the change.  Parallels get’s an A for technology and an A for support.  Nice to feel that way about a product and company these days.

Apex Data Loader Tips for Uploading Content Files

Salesforce.com Content is a pretty good document management system.  If you are using Salesforce and you aren’t using Content you probably should.

Uploading large quantities of files is not difficult, but requires some local knowledge.  Here are a few tips to make it easier.

  1. Give the Apex Data Loader more heap space.  Instructions can be found here.
  2. I like to err on the side of reliability when doing document uploads; so I change the Data Loader Settings to use a batch size of 1 and do not use the Bulk API.
  3. Keep in mind that you can only import 5,000 files per day.  If you are doing more than this, open a case with Salesforce.com support and get the limit raised temporarily.
  4. Files in Content are managed by 2 objects.  ContentDocument and ContentVersion.  When uploading new documents to Content, you are adding records to ContentVersion.  When you are bulk deleting, you delete records from ContentDocument.
  5. The easiest way to figure out how to create a ContentVersion upload file is to first do an Export.  Make sure to manually add a few files to Content through the UI so there is something to Export from each of the Libraries you want to populate.  When doing the ContentVersion Export, select ALL columns EXCEPT VersionData.  VersionData contains the actual bytes of the files in Content.
  6. The minimum set of columns required for a Content import are:
  • TITLE = User friendly name of the file, can be anything, but usually the filename without any folder (path) information.
  • PATHONCLIENT = Fully qualified file name including ALL path information.
  • VERSIONDATA = exactly the same as PATHONCLIENT.
  • FIRSTPUBLISHLOCATIONID = Salesforce ID of the Library where the document should be loaded.  If you don’t put this in the file, then your files will be uploaded to your personal library which must be wrong.

That should get you started. Have fun assembling your files into batches for uploading.  Once they are in Content, you’ll get the benefit of secure sharing, preview of popular file types, and flexible tagging.