Showing posts with label quickstart. Show all posts
Showing posts with label quickstart. Show all posts

Tuesday, July 23, 2013

Glass Development - Bootstrap UX/UI Framework, a Beginner's Discovery!

If you have read my last two posts, you know I have not developed for a good decade and a half.

<old name voice>Back in HTML 3.2 we had to code walking uphill in the snow BOTH DIRECTIONS! Dern kids today</old man voice>

Well, as I begin to learn anew and develop for Google Glass, I find that the Python Quickstart project has a nice clean set of HTML and CSS. Now, I know (knew?!) how to write that stuff and I noted in the index.html file this reference in the <head> tag

<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet"  media="screen">


What is this "bootstrap" thingy?? I asked myself and poking around I find a wonderful world of UI goodness courtesy of some nice geeks from Twitter, @mdo and @fat

My Glass Quickstart Site Using Bootstrap
Yep, the Google Glass Quickstart project uses a set of web tools that bring in a responsive design from Twitter Bootstrap or just Bootstrap that is going on two years old. Who knew?

Anyway, this is a really nice way to make a clean website and on digging into the details, it is flexible, responsive and helpful. So, I wanted to point this out and that you'd do well to check out the Bootstrap site and by extension, the Bootstrap blog.

You do not have to use Bootstrap for Glass site development at all, but if you are modifying the Quickstart it certainly gives you a platform to look good!

Tuesday, July 16, 2013

Google Glass Development For Windows - Beginner Tips

As an update to my last post, I am happy tonight because I have finally had success in getting the the Glass Quickstart for Python running on my instance of the Google App Engine for Windows 7. If you have read my previous post you know I was not doing well. My plea netting several kind messages that gave me hints at what I might be doing wrong, but I thought I'd start over, armed with new knowledge from failure and the kindness of the community.

Yay! The Glass Quickstart is finally running!
After much reading, I confirmed that the Python path was best for me and what I really needed to do is to have my environment setup correctly and carefully follow the steps outlined on the quickstart pages. So, I began fresh and took my time. Here is what I learned about setting up the development environment for Glass with Python and Google App Engine on Windows.

  1. Install Python 2.7.x (not 3.x) before GAE. If you do this, GAE will know Python is there and set itself up to use it.
  2. You have to install and then configure, so the best resource (at the time of this writing) to install Python on Windows 7 is this video from Michael Herman.
  3. Do not use the 64 bit install, even if your machine is 64 bit. Some Python modules do not install or work correctly on Win64. Use the file on this page that is called:
    "Python 2.7.5 Windows Installer (Windows binary -- does not include source)" for best results.
  4. The best educational instruction for configuration is the Google Python Course. Make sure you use 
  5. To make Python easier to use from any location on your system, you have to set your PATH. Use this string in Windows PowerShell to set your PATH, which has all of the directories in it. The instructions at Google or Python.org or python-guide.org are OK, but this PATH from the video from Michael Herman is the best: [Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\;C:\Python27\Scripts\;C:\PYTHON27\DLLs;C:\PYTHON27\LIB;", "User")
  6. After you have tested Python by itself, then follow these instructions from Google to install the GAE.
  7. In that set of instructions, there is a step-by-step tutorial which, if you are careful, will get you a running application called 'Guestbook'. It was helpful to do this before the Glass Quickstart to ensure my environment was working fine.
  8. As Google recommends, to edit the example files and your own code, install and the free text editor Notepad++ (not the Notepad app that comes with Windows). I had issues with incorrectly encoded characters from the cut&paste code using plain old Notepad.
  9. After that is all installed, I went through the Python Tutorial for GAE and built the app. Here is my running example
  10. Because the Glass Quickstart code is downloaded from the code versioning website, GitHub, I signed up for and installed GitHub for Windows. I can see how it will be useful but it is not needed to just get the Quickstart up and running. You could just download the ZIP file and extract it.
  11. While working with the GAE, make use of the Google App Engine Launcher. Yes, yes, I know you can type command lines, but for we who like a GUI this tool is helpful in getting your environment and application code running on local and then deployed on your instance of GAE.
  12. My main advice: pay close attention to setting up Python and your development tools properly, use the installers and GUIs, and you will be successful.
The elusive 'deployment successful' message in the GAE Launcher deployment log window!



Sunday, July 14, 2013

Google Glass Development Follies

By occupation, I am not a developer, coder, or programmer . . . nor do I play one on TV. Yet I have developed applications, web sites and client applications in the past. I have to say that was the distant past (chronologically: FORTRAN 77, BASIC, HyperCard / HyperTalk, Visual BasicSQL in Access, FileMaker ProRegEx, HTML 3.2, LotusScript and JavaScript) and so for well over a decade I have not done any programming. In fact, many would see my previous list of "languages" and declare that I was simply scripting, not really programming at all! Which is fine and I am inclined to agree. However, my point is that while I am not a skilled developer I do know what development is and generally how it is accomplished.

Further, as an IT Enterprise Architect, I "develop" applications for a living. Just not down to the level of code, just like a building architect or shopping mall developer rarely grabs a pneumatic nail gun or diamond-tipped tile saw to complete the project. Yet all architects need to know the materials available and how the tools operate to properly execute a well-designed building. Thus, when I was selected for the Google Glass Explorers program, since it was a new UX and platform, I thought I'd try my hand at designing a native application for Glass.

My app, I mused, would be something simple: a location-aware service for botanic gardens and parks that would provide geographically appropriate information cards that could give the wearer rich information about their surroundings. For example, at Rancho Santa Ana Botanic Garden near where I live the cards would appear when you are in the riparian zone on the mesa or in the palm oasis or in the wildflower meadow. A virtual reality tour of sorts.

A week after I got my Glass, I enthusiastically began. After a bit of research and reading the materials provided by Google, I began to setup my development environment. Mainstream Glass development involves hosting your service on the Google App Engine (GAE) and I set about to register for GAE, activate the API, and publish a sample application. I needed to select a language (FORTRAN 77 was not supported!) and at first I decided to go for the future and I selected Go, the new language for web applications invented by Google. The Go "Getting Started" tutorial provides a sample application and a step-by-step instruction and for the most part, I was able to follow and successfully deploy the application. The step-by-step lesson builds upon itself and when it got more complicated, my application in Go would not compile, but I had a working app up on the big bad internet, so I was feeling pretty good.

The next step was to try to get the Glass Quickstart application compiled and working on my GAE instance. This did not happen. The instructions left out some parts and did not clearly state where files or libraries should be located. After tinkering for several multi-hour sessions of the course of 3 days, I thought that possibly Go was too new of a language for me to tackle, with two few experts hanging out on the forums to help a newbie like myself. In looking at the activity on the various forums like GitHub and Stackoverflow (both new to me, sonny!), it seems that people were much more involved in Python. There was already another new Python Glass app on GitHub about counters, so this was encouraging.

So I plunged into Python. And like its reptilian namesake, my time, confidence and self-esteem were slowly squeezed to death. Not that Python, the language, itself had anything to do with it, but the development environment is not standardized all that well and the nature of the open source path is fraught with peril for the uninitiated. That said, there are a lot of tutorials, blogs, and books out there, but many times these resources begin with assumptions which lead to deployment errors. I tried again and again to get the Glass Quickstart for Python deployed, but error after error stopped me in my tracks. I was missing libraries, had the session.secret file in the wrong directory, etc. My being on Windows did not help matter either because developers today just don't do Windows (unless you're in .NET).

So, at this point I have posted a plea on StackOverflow, the Glass Explorers Community (private link) and directly to the Google developer via G+ that put the Quickstart up in GitHub. I have had no takers yet and might resort to getting (and reading) a Python book.

But hey, if you can help a harmless old script kiddie like me with Python, please, slither on by!