Quick Review of Delivering Happiness by Round Table Comics

I just got finished reading the comic book version of Delivering Happiness: A Path to Profits, Passion, and Purpose.

This was one of the two books given out to everyone at Big Omaha this year.

Quick and Entertaining Read

Front to back, this book only took me a little over an hour to finish.  The comic book layout makes it fun to read and makes the story flow quickly.

Lacking in Depth and Explanations

As you might expect to happen with a book this short, there wasn’t much detailed information about the what’s and why’s regarding most of the decisions.  You get a high level story of Tony Hsieh, the zappos CEO, and then the book ends with an overview of some of the simple lessons he’s learned.

Each of three different happiness frameworks is explained on a single page.

This is a Great Book for Business Leadership & Management Classes

The succinct nature of the book would make it ideal for reading with a class and then being able to go into more detail as groups on the different pieces of the book.

If you’re purchasing a book to read on your own, I’d say you can find something better…perhaps just go with the text version of the same story.

My Favorite Quote

After he’d already made millions of dollars on the sale of Link Exchange, and before fully committing himself to Zappos, he found himself asking his friends “What do we want to be when we grow up?”

I’m not sure why that particular piece stuck with me but it does have some strong parallels to some of the questions I was asking that ultimately led me to quit my day job.

How to Upload a Sign In With Facebook App to the Amazon Market

The Amazon market signs apps in a way that will break your app if it uses Sign In with Facebook or any other solution that depends on the signature of the app matching what’s input into a developer site ( Google maps is another example).

Contact Amazon 

Contact through the developer portal and tell them that you have this problem.


They will set up your account so you can sign the app yourself.

Here’s the steps they sent me ( Directions for steps 7 & 9 will follow).
1. Log in to the Developer Portal 
2. Find the app you want to sign on the My Apps page 
3. Mouse over the Actions button for that app and select App Details 
4. From the application details page under the Upload Binary section, click Edit 
5. If you already have a binary uploaded, click the Remove button 
6. Make your DRM selection and select No, I will sign my binary under Signature 
7. Upload your unsigned binary (shown as Step 1. Upload unsigned binary)
8. Download the processed binary (shown as Step 2. Download processed binary)
9. Sign the downloaded binary
10. Upload your newly signed binary (shown as Step 3. Upload signed binary)
11. Click the Done button 

Upload your unsigned binary 

If you’re like me, you’ve never exported an unsigned binary.

Here’s the docs from google…http://developer.android.com/guide/publishing/app-signing.html#releasecompile

For eclipse peoples, here’s what it says:
To export an unsigned APK from Eclipse, right-click the project in the Package Explorer and select Android Tools > Export Unsigned Application Package. Then specify the file location for the unsigned APK. (Alternatively, open your AndroidManifest.xml file in Eclipse, select the Manifest tab, and click Export an unsigned APK.)

Note: When I did this on my macbook, I had to edit the source code of the amazon website on this step to the right file path because the filepicker tried to do something strange and used C:/fakepath/….

Sign the downloaded binary 

Then after downloading the processed amazon file, you’ve got to sign it command line using jarsigner and zipit.

http://developer.android.com/guide/publishing/app-signing.html#signapp jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore /Users/youruser/name.keystore unsigned-amz.apk keyalias

Now the unsigned-amz.apk is signed. With some extra parameters you could create a new one instead.

The final step is a zipalign command for performance.
zipalign -v 4 /path-to/unsigned-amz.apk /path-to/signed-aligned-amz.apk

That’s it.  Upload it back to amazon.

Low Speed Error L51 for Sole F63 Treadmill

I moved my treadmill and afterwards trying to turn on the treadmill just resulted in it giving an L51 Sole Low Speed Error.  I’ve finally gotten my treadmill working again and figured I’d post my experience to hopefully help somebody else out since I couldn’t find much online.

Owners Guide on L51 Sole Low Speed Error

Before contacting Sole, I tried out the easy stuff in the Sole F63 owner’s guide regarding the L51 Low Speed Error:
– try to calibrate
– adjust the speed sensor

Neither had any impact.

Consulting the Web

I searched and browsed and found quite a few tips in different places. Most of the advice I found beyond calibration or adjusting the speed sensor were also in the owner’s manual under general maintenance. For example, livestrong.com recommends cleaning, tightening|lubricating the belt & checking the power supply.

None of these helped me either.

Contacting with Sole

Then we contacted Sole and they sent us a box of stuff without having us do any real troubleshooting.

The box had a new controller board, a new speed sensor, and some new wires to connect the main control unit.

Advice here is that as you try out the new pieces, don’t undo any of the nice twisty ties that have the existing wires in place or take the wire out of the front right leg. Just run the wires to the side quickly to eliminate whether or not they change the symptoms. Also take pictures of the wiring to the mother board so that you have a nice easy reference. Here’s one of my pics that made it easy to put it back in place.
Motherboard during L51 Sole Low Speed Error Troubleshooting

Likewise, monitor the behavior of the controller board. My symptom was that the mother board would get power, a red light would come on, and then it would make a single click. Never a second click.

I was able to prove the motor worked fine by hooking up the power to the battery from my cordless drill. This one really impressed my wife.

I called Sole and they sent me another motherboard to swap out which didn’t change any symptoms.

A Resolution

The piece that finally fixed it was a whole new console. The explanation here is that the click from the mother board was sending a signal to the console saying it was ready for commands but the console was never responding telling it to turn the motor on and get running.

Another Resolution

The man in the video below had a similar issue and completely relocating the speed sensor was what finally fixed it for him. If you’ve replaced everything else, then you may want to check out the video below and the comments section to learn more about how relocating the sensor fixed the issue for him.

In Summary

If you’re getting the Sole Low Speed Error when trying to turn on your Sole F63 treadmill, then the Sole support team may be very helpful as they were in my case. However, you may be left to do quite a bit of troubleshooting on your own. The nice thing is that at least in my case, sole was willing to keep sending out parts as long as I would do the work.

Android Phonegap Native Timepicker

So I’ve been working on a simple android app and I finally got audacious and started to move beyond the basics. I was able to get an app in the store with just my HTML/JS/CSS skills pretty easily which makes phonegap a big success.

Anyhow, now my latest fiasco was to try and use the native android timepicker and while I’ve still got a ways to go, I wanted to post my working code that I also put back on a discussion I had with myself on the google group.

FWIW here’s what I’ve got working.

A simple TimePicker class with a showTimePicker method.

public class TimePicker {
private DroidGap mGap;

public TimePicker(DroidGap gap)
{
mGap = gap;
}

public void showTimePicker(){
mGap.showDialog(HelloWorldPlugin.TIME_DIALOG_ID);
}
}

A custom TimePickerDialog.OnTimeSetListener which is initialized with
knowledge of DroidGap too…

@Override
public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
mGap.sendJavascript(” callback javascript goes here!”);
}

Initialize and add the createdialog stuff like the android dialog
tutorial.

TimePicker timepicker = new TimePicker(this, appView);
appView.addJavascriptInterface(timepicker, “TimePicker”);

Then in the javascript, once phonegap loads, you can refer to the
timepicker:

window.TimePicker.showTimePicker();

Hope that Saves Somebody else some time or inspires somebody to show
me the ways of the plugin framework.

 

As I get better at this stuff, I might end up understanding how to do it within the plugin architecture but for now that’s it.

Cheers.

HTC Hero Mount USB to Mac Os X (macbook pro)

I wanted to get the media off of my htc hero and onto my macbookpro, but plugging the USB cable in does not result in a notification on android which allows me to mount sd card through the USB cable.

I found lots of promising articles, most of which pointed me to either Twisted, which didn’t work for me, or to the Android developer SDK. I’m fully capable of using the SDK but this seems like overkill for such a simple issue.

My Solution: Close the lid on the macbook. Plug in the phone and then I get the notification allowing me to mount a USB. Once mounted, its the same as working with any other USB card.

Django RadioSelect | CheckboxSelectMultiple | SelectDateWidget Examples

In trying to use django built-in forms, I had the most trouble finding good examples of django radioselect, checkboxselectmultiple and selectdatewidget.

Here’s my attempt to help others looking into using Django RadioSelect, CheckboxSelectMultiple, or the SelectDateWidget.

Django RadioSelect Example


from django.forms.widgets import RadioSelect

RADIO_CHOICES = [['1','Radio 1'],['2','Radio 2']]

class SimpleForm(forms.Form):
radio = forms.ChoiceField( widget=RadioSelect(), choices=RADIO_CHOICES)

Django CheckboxSelectMultiple Example


from django.forms.widgets import CheckboxSelectMultiple

CHECKBOX_CHOICES = (('1','The first choice'),('2','The Second Choice'))

class SimpleForm(forms.Form):
checkboxes = forms.MultipleChoiceField( required=False, widget=CheckboxSelectMultiple(), choices=CHECKBOX_CHOICES)

Django SelectDateWidget Example


from django.forms.extras.widgets import SelectDateWidget

YEAR_CHOICES = ('2016','2015')
class SimpleForm(forms.Form):
date = forms.DateField(widget=SelectDateWidget(None,YEAR_CHOICES) )

Django Docs

Update 1/3/2016: The official documentation on these have improved but is still buried within a huge post. Here is the link to the latest stable docs: https://docs.djangoproject.com/en/stable/ref/forms/widgets/

I Love Django Forms

These are all excellent features and the more I use Django, the more I like it. Chalk up Forms as another part of django that blows away any other web framework I’ve worked with.

Mechanize vs. Scrape:

In the process of automating functional tests, I have ran across another python library, mechanize, that looks to be very promising. Perhaps, even more so than scrape.py?

http://wwwsearch.sourceforge.net/mechanize/
http://stockrt.github.com/p/emulating-a-browser-in-python-with-mechanize/

So far it seems that the mechanize platform is more powerful, as it is able to handle complex tasks like managing a gmail inbox( see http://libgmail.sourceforge.net/ ).

My take so far is that scrape.py offers some nice features for validating that a given page has the tags and elements I am looking for. I’m still new to both of these libraries so if anyone out there has experience with both and could help nudge me in the right direction, it would be much appreciated.

scrape.py for functional website testing

This solution is perfect for testing your website’s functional capabilities. Scrape.py supports sessions and cookies so hitting your authenticated resources is cake.

Here’s a quick sample i wrote to test things out:

from scrape import *
s.go(“http://www.google.com”)
s.follow(“Sign in”)
x = s.doc.first(‘form’)
params = x.get_params()
params[‘Email’]=’keithentzeroth’
params[‘Passwd’]=’xxxxxx’
s.submit(x,params)
s.go(“http://www.google.com”)
print s.doc

Try it out with your google account. To verify you’re logged in look for the Sign Out link or alternatively look for a GAUSR cookie in s.cookiejar.

Thanks to Ka-Ping himself for clearing up some of my confusion.

My plan is to use this to test the site as if there were no script/styles enabled. Then to layer on browser behavior ( AJAX etc…), I’ll look to Selenium or something of the kind.

Mac Screen Captures

It hasn’t been too long since I exclusively started using mac at home and work. I struggled at first to capture screenshots and I’m still catching on to some of the great little things Apple has thrown in here.

This morning’s enlightenment was around capturing screen shots, both full and partial, on my mac. I was reading a blogpost about apps to replace the Snapper add-on I used to use and the author dropped a subtle hint about shift+command+control+4.

With a little search engine power, I found a useful page from apple, http://www.apple.com/pro/tips/secretcapture.html.

Mac Screen Captures

Command+Shift+3 = Screenshot Saved To Desktop
Command+Shift+4 = CrossHairs For Snapping To Desktop
Shift+Command+Shift+3 ( or 4) = …. To Clipboard For Pasting to Photoshop/eMails etc…