Android Bootcamp 2

Posted by Jessica Wed, 25 Mar 2009 03:00:00 GMT

Last week I attended Big Nerd Ranch’s Android bootcamp. Wow! What an awesome week!
So, I was only marginally familiar with the Andoird SDK before I attended the bootcamp. These are the kinds of things I knew before going to class…
  1. Adb logcat is a command that opens the log of what’s really going on under the hood. Adb stands for android debug bridge. Typing adb logcat at a terminal/command prompt while the emulator is running provides you with a very useful console log.
  2. Screen layouts are controlled by xml, an android specific xml format.
  3. Resources classes are compiled from the layout, strings and other xml files in res folder and can be referenced in code by R.layout.name_of_layout_xml. These resources can make little red x’s in Eclipse show up even when there isn’t a real problem with your code because you just need to clean/build.
  4. Apps aren’t deployed as wars or jars. They are deployed in an apk.
  5. The activity lifecycle includes a number of methods that you can override, including onCreate and onPause.
  6. I had done some tutorials, bought some books, and looked over several of sites I had also asked for help, but nothing really got the concepts in my head like the training at the Big Nerd Ranch.

We covered a ton of stuff over the course of the week: Layouts—lists, spinners, radio buttons, Activities (multiple activities), Menus, Saving to Database, Notifications, Toasts, Video, Webkit, Location, Intents, Content Providers, AIDLs, Services, Dailing a number, Maps… (there were more topics, but these are the ones that really stood out).

There were modules on each of these topics complete with code examples and exercises, which has really been helping out now that I am back at home writing Android apps as fast as my little fingers can type.

The time our class spent together eating meals was incredibly instructive—as folks drilled our instructor with Android-related questions. :) Here are some of my notes from class. After the course, I am re-writing the Android Sheep app and am working on my own “to do” list app—original, huh.

Google App Engine

Posted by Jessica Fri, 02 Jan 2009 07:04:00 GMT

I don’t do python… yet, at least. :) Settle down; I’ve got it on my to-do list.

But wanting to see what Google App Engine was all about, I downloaded the sdk and signed up for an account.

In the app.yaml file—where you can specify the version of the application and other meta information about your application, I noticed that a runtime can also be specified and by default it is set to python. The documentation for Google App Engine notes that…

This code runs in the python runtime environment, version “1”. Additional runtime environments and languages may be supported in the future.

So, for those of you who don’t do python either… there’s hope. Or you could do something quiet strange, like this! Yikes!

Another interesting tidbit is that some subset of Django is included with Google App Engine. Let’s play.

Sitemap with Rails

Posted by Jessica Sun, 21 Jan 2007 00:07:00 GMT

I finally got around to generating a sitemap for this site. I used these instructions for creating sitemaps in rails. Very simple and straight forward instructions.

Unfortunately, the sitemap created isn’t valid according to google. The xml document created has <link> tags instead of <loc> tags which google webmaster requires.

I am guessing that these errors mean that my sitemap is useless to Google. Still looking for a solution and will post an update as soon as I find one.

A Collection of Uses for Google Sets

Posted by Jessica Fri, 24 Nov 2006 22:28:00 GMT

Have I mentioned I love Google Sets? Something about ostensive defintions just makes me all warm and fuzzy inside! Here are some practical uses of Google Sets (and similar apps) that I have gathered from around the net:

I found these in this O’Reily article:

Enter the name of the company you work for. Enter the name of one of its main competitors. Click “small set.” Voila! There’s how the web classifies your company.

You’re packing for a weekend trip and you want to check if you’ve forgotten something? type in five items you remembered to pack (toothbrush, towel, etc.) and then generate a list..

You’ve just moved to a new house and you want to be sure you’ve notified everyone who cares about your new address – type in a few things such as electricity, comcast, post office etc. and then generate a list—you’ll be surprised at the number for things you forgot.

There’s this tip from Google Groups

Music related searches – I like Band X…. find me similar

And here’s an inspired few from me:
  • Tired of the same old breakfast food, commute activities? Get suggestions on what to eat for breakfast or what to do during your commute.
  • Writers can search for synonyms or topic ideas
  • Can’t remember the seven deadly sins?
  • Use the app as a part of a parlor game. One group has to create a list of four related items. The second team gets points for guessing what Google Sets will produce… kind of like 10,000 Dollar Pyramid.

There is also Query by Example. Look at the Popular searches on this site. There are lists of planets, constants, business schools, alternate spellings, colors, rock bands, oceans, prime numbers, political parties, and tons more. Great for writers, anyone looking to make some creative connections or simply as a reference. Very useful!

Google Sets + Sed = Quick Keywords for Meta Tags

Posted by Jessica Tue, 17 Oct 2006 20:32:00 GMT

I know there is alot of talk about search engine optimization. Additionally, I have no idea whether or not keywords in the meta tag do anything to help people find your site. With that said, I want to share how to quickly generate and format keywords for the meta tag.

To generate keywords for a website, go to Google Sets. Enter some small group of keywords that describes your site. For example, if I were maintaining a site on machine learning, I might enter the following terms: machine learning & artificial intelligence. This search returns 40 to 50 keywords related to machine learning.

Copy these keywords into a text file and delete any that aren’t relevant or that are misleading.

Now, if you were to simply cut and paste this list of keywords into your HTML document, your document would be UGLY (eew!) and difficult to read. Who wants to read a file with that many carriage returns?

The solution is to replace all end of line characters with commas (except the last EOL), so that things look relatively nice and neat in an html or rhtml or whatnot file.

To replace the end of line characters with commas, use the following two linux commands:

  • sed ’/$/,/’ file1 > file2
  • paste -sd ’\0’ – file2 > file3

You don’t have to create two extra files, but I do because often I have compiled keywords from several searches and wouldn’t want to repeat the process if I messed up the sed and paste commands. Besides after I have inserted the keywords into my html, I simply delete the files.

After getting all of the keywords on one line, paste them into the ”<META name=”keyword” content=””> statement.


UPDATE
For Windows users, there are two things I can recommend you do if you would like to use these commands.
    First, if you are running a website that is on a server running linux, you can ssh into the server, upload the text file you would like to convert (file1 in my example), and then run sed and paste on that text file.

    Second, you can try to run GNU Bash shell on Windows or install Cygwin. I haven’t tried either of these options because both my Windows laptop and desktop died (RIP my sweet babies) a few months ago.

designed by jowensbysandifer