Detecting Blondes

[Disclaimer: I hope it is evident that this was written jokingly. It was targeted at a blonde friend of mine who does not at all match the below description.]

Like any object that surrounds us, taking a brief moment of time to analyze the piece–especially when surrounded by both those of a similar and diverse nature–readily brings forth a plethora of similarities and differences (of vast and narrow ranges), in which the item can be classified, categorized, grouped, arranged, and so forth.

Funnily, people are often the same way–just like little objects meant to be poked, prodded, documented, and separated for accurate categorization. I have sat, the pencil’s eraser tap-tapping away at my lower lip thoughtfully, and just watched people, an external observer meaning to gather a true comprehension of those that surround him. It is interesting, those peculiar little things that people do without any sort of conscious awareness. It’s ingrained into them, based on their genetic archetype.

Let us take for an example blondes, the American classic of stereotypes. They can be observed as falling into a number of closely related categories: fit, dumb, and a hybrid of outgoing and shy. A blonde is easily detectable, even if their hair is masked by some sort of disguise–it’s impossible for them to truly blend. They work out like it’s the only way to rid themselves of a horrendous, vicious virus–any weight that puts them in the healthy zone is seen as a threat to their life as they know it. Beside, how can the small straps of their favorite Prada slip onto their arm unless they fit this part of the categorization? They’re not entirely dumb, intelligence is locked away in a deep chamber in their head, though the key is forever lost and the lock is too complex of a tumbler arrangement to duplicate. They stand one foot in the final of categories: one in the shy, the other in outgoing, remaining persistent and outgoing when the opportunity suits them best, and others worst: a sharp raising of the hand, smacking of their gums as they chew obnoxiously on their gum, they are genetically programmed to ask the most invasive question at the worst time possible. They are shy, however, in revealing any sort of intimate details of their own. I suppose that’s a play on the antiquated philosophy of never inquiring about a girl, let her make the first move.

Knowing these three simple categories will save much time and hassle when trying to learn about someone, whether they be a blonde or someone who associates with one. A blonde, it is well known, will always be in designer fashion and therefore impossible to cater to. They’ll eat nothing but the richest of food, and I don’t mean in the sugar content sense. They will purse their lips often in distaste, meaning that the makeup bill will skyrocket even further, and their ongoing gum chewing will mean that one’s wallet is often extracted to make a down payment on the next batch. Beware however, those who are less familiar with blondes: appealing to any of these qualities to appease a blonde will mean that the bank account is empty, the wallet tattered and void of any green, and the blonde left unhappy. If she is unhappy, it can be inferred from those obnoxious qualities that she are stuck with, everyone is unhappy.

Their ‘friends,’ even if their natural hair color is luckily not blonde, are dangerous folk as well and should therefore be avoided at all costs. They are the exact opposite of blondes and yet, in this simple act of association–the ability to tolerate their existence and many faults–they can readily be quarantined into the same zone. They will try to lead everyday lives, but it can be readily understood that backstabbing is only a knife’s point away. Anything to appease that blonde.

Those of that golden hair are not so common, of course. They are rare enough to come by to make life tolerable, but common enough to make contact unavoidable. Still, even if in an area in which the golden population is at a low, these simple qualities should still be memorized. Knowing whether someone fits them informs whether or not they are a blonde. More importantly, however, knowing that they do not suffer these attributes verifies the likelihood that they are well-meaning, trustworthy people.

  • Share/Bookmark
Posted in Creative Writing | Tagged , , , , , | Leave a comment

Expanding Client Access to Server Resources

This project is being developed alongside Dr. Kevin Scannell.

Introduction

Throughout the course of the Fall 2010 semester I will investigate the expansion of an existing Mozilla Firefox extension (hereafter “add-on,” “extension,” “plug-in”). This extension, licensed under GNU General Public License version three (GPLv3), interfaces Charlifter [1], also GPLv3, a server which provides access to language processing resources for over one-hundred languages. The purpose of Charlifter is to promote the proper localization of text, which is presently represented either with incorrect diacritic placement or none at all. Charlifter uses ever-growing corpora to add diacritics, or unicodify, text which is passed to it either in ASCII form or in an incompletely or incorrectly unicodified state, using context and the aforementioned corpora for statistical analysis and unicodification of the text. Communication between the extension and the server are made via HTTP POSTs where data is represented in JavaScript Object Notation (JSON). Any request from the plug-in to unicodify the text is also referenced as “lifting” or “accentuating,” meant to represent the act of adding diacritics.

Goals

The goal in extending the add-on is to focus on an intuitive interface for seamless integration into the browsing experience. The target expertise level of the end-user is to range anywhere from novice to expert, meaning that the extension will avoid technical and linguistics jargon throughout.

Asynchronous

Presently the plug-in supports only synchronous lifting, thereby requiring a conscious act from the user to lift the text. To meet the goal of making this plug-in intuitive, asynchronous lifting will be made the focal point of the add-on. Charlifter uses word-level trigrams with its corpora for unicodification, so a primary concern of the asynchronous lifting aspect will be to accentuate with as much context as possible. The ideal situation is that the user types three or more words and the plug-in will then request a lift, but in situations in which the user types fewer than three words, the extension will employ techniques to make an accurate guess as to when the user is finished typing. In cases like this where the trigram is not present, the server surrounds the submitted text with placeholder words to make a less accurate unicodification guess.

Should the user then revisit the text input and begin typing more, the extension must remain intuitive and include words which may have already been lifted. If the server responds with a different unicodification based on this more accurate context, the plug-in is to replace the old, likely less accurate, version with the new response.

The user’s manipulations of the text are unpredictable as a whole. Therefore, it is imperative that the add-on also support mutations where the user deletes just characters, a single word, or groups thereof, re-evaluating nearby words for changes in the context. The client may also add large blocks of text via common methods such as copying and pasting, either in an empty box or near un-lifted or already lifted text. In all such cases, the plug-in is still to resend the text and that which is nearby for lifting based on new context.

The extension must also account for common network issues such as slow communication (lag) or connectivity being lost altogether. Such a situation is fine under the plug-in’s policy of failing gracefully, especially during synchronous accentuations, but the lag issue deserves special attention when considering asynchronous lifting. There may be situations in which the add-on submits a request to have text lifted and network lag pauses the response, during the interim of which the user adds more text, changing the context. As another request is submitted, the original returns and the add-on modifies the text accordingly. The problem arises when the second response returns and the extension must find, through common text matching, the old block of text that was lifted. As the context used for this has since received diacritics, this would be an impossible task. The proposed solution for this is to use other clues to locate which blocks of text were to be lifted, such as cursor position at the time of the call and difference between original and lifted text. Weighing such records of the text as it was at lift-time, the extension can more accurately discern which text was sent for lifting, even with subsequent text mutations. In order to relate these weighted values to the current text, it is proposed that a simple numerical ID be added to the Application Programming Interface (API) request, which the server is to simply echo back in the response, thereby not violating the server’s statelessness.

With asynchronous functionality comes the ability for the user to add text to multiple page elements in multiple tabs within multiple browser windows at the same time. The plug-in must coordinate which lift response belongs to a particular browser window, tab, page, and page element. The proposed method of such tracking is to assign a pseudo-random unique identifier (ID) to each element (of the page, the window, and so forth), such that an associative array in combination with this ID can be used to locate the element and mutate the text accordingly.

Efficiency

With the addition of asynchronous calls, the rate at which calls are made becomes an issue of the extension rather than one of the user. In order to determine when a user is done editing, at least momentarily, the plug-in will use two methods: timeouts and blur events.

The timeout is triggered after a delay in user activity. For the delay to be effective in terms of promoting a sense of live accentuating while still giving the user sufficient time to begin adding the next characters for new words, the time will typically be under one second, although further experimentation needs to be conducted to determine an adequate idle time.

The other method is responding to an “onblur” event. As soon as a user begins typing in a page element, with asynchronous lifting enabled, the element will be tracked as mentioned prior, and an event listener will be added for the “onblur” event. When the input field loses focus, whether a trigram or more has been met or not, the text will be lifted. This follows that the user is at least temporarily done making modifications to that elements’ text.

It is important in the consideration of asynchronous calling and efficiency both to use such methods in order to minimize the request rate, saving bandwidth, while still maintaining a sense of the accentuating being live.

Language List

Currently the user is provided with a list of approximately 112 languages to choose from, along with a context menu entry for their most recently used language. In line with the goal of being intuitive, the extension will originally provide a list where the ISO-639 codes are sorted alphabetically. The extension will then weigh clues to order the list in a way that provides languages that the user is most likely to target at the top. Incorporating top-level domains of the currently visited website, the Mozilla application’s language setting, and use frequency of past languages, the plug-in will resort the list. Any unweighted items will remain at the end of the list, still ordered alphabetically.

References

  • [1] Kevin P. Scannell, Statistical Unicodification of African Languages, Saint Louis University, 1 January 2010.
  • Share/Bookmark
Posted in Programming | Tagged , , , , , , , | Leave a comment

St. Louis Perl Mongers: Lightning Talks on July 21, 2010

Yesterday I made my first attendance at the St. Louis Perl Mongers, and boy, what a great group! The meeting space, graciously provided by Announce Media, was nothing short of gorgeous, the Jimmy Johns food sponsored by Cofactor Genomics was easily classified as “yummy!,” and the people attending were amazingly nice. I can say without a doubt that the talks mirrored the awesomeness of the group. I won’t bother trying to highlight my favourites because I genuinely found something that I liked in and learned from each.

This lightning talk session made for the first talk I’ve ever given. Titled s/2 Years/5 Minutes/ of Photography: A Lightning Talk about Photography by Michael Schade, I discussed what I’ve learned over my past two years of photography and some of my beliefs. You can check it out on YouTube below, with each audio segment synchronized to its respective slide (we don’t have video of this session, unfortunately).

Now that you know about the existence of such a cool group, I bet you are wanting to attend the next session. Am I right? Yep, I knew I was, so I’ll go ahead and spill the details:

When  Wednesday, August 18, 2010 at 6:30 PM (the third Wednesday of each month)
Where Announce Media
              6665 Delmar Blvd
              St. Louis, MO 63130-4544

I’m looking forward to the next session and being able to meet up with these guys and gals again. I can say without hesitation that it was a pleasure making their acquaintance.

  • Share/Bookmark
Posted in Talks | Tagged , , , , , , | Leave a comment

School and Business Closing Detector

Not too long ago, we had a big army of snowfall marching in to attack our streets (and gas bills, if we all wished to avoid the accompanying twenty-below-zero wind chill). Seeing this pending attack, local schools did the responsible thing and canceled classes, wanting to keep their students safe. Some businesses, often those pertaining to children, did the same.

Long story short, my school was waiting to call things off (superintendents from the various districts have phone conferences, discuss what the best plan is, and so forth). Tired of checking the news’ local website, having to tediously refresh everything manually, I wrote a little web scraping tool in Python to help me along.

It’s nothing too fancy, and I’m sure I’d have done things differently if I were turning this into a full-fledged program. However, I think it’s still worth posting, even in its immature state, because someone may learn something from it–or, someone may point something out to me that I could have done differently, so that I too can learn.

# Michael A. Schade, www.mschade.me
 
URL = 'http://www.ksdk.com/weather/severe_weather/cancellations_closings/default.aspx'
 
closings = {
    'School':   [],
    'Business': [],
}
 
def get_closings():
    """Downloads and parses the KSDK school and business cancellation page,
    returning only the data pertaining to closings that we need."""
    from urllib2 import urlopen
    data = urlopen(URL).read()
 
    from lxml import html
    data    = html.document_fromstring(data)
    try:
        data = data.get_element_by_id('schooclosings_dg')
    except KeyError:
        return None
    data    = data.findall('./tr/td/table/tr/td')[1::2]
    return zip(*[iter(data)]*2)
 
def add_closings():
    """Maintains the list of closed schools and businesses and notifies only
    for new cancellations."""
    added       = False
    count       = {'School': 0, 'Business': 0}
    closings    = get_closings()
    if closings is None:
        print "No closings at this time."
    else:
        for entity, place_type in closings:
            entity      = entity.text_content()
            place_type  = place_type.text_content()
            if place_type == '': place_type = 'School'
            if entity not in closings[place_type]:
                added = True
                closings[place_type].append(entity)
                count[place_type] += 1
                print 'Adding new %s: %s' % (place_type, entity)
        if added:
            import time
            now = time.strftime('%I:%M %p', time.localtime())
            print '%s) %d schools (%d new) and %d businesses (%d new) canceled as of now.' % (
                now,
                len(closings['School']),
                count['School'],
                len(closings['Business']),
                count['Business']
            )
            print '=' * 78
 
import time
while True:
    add_closings()
    time.sleep(120)
  • Share/Bookmark
Posted in Programming | Tagged , | Leave a comment

Django Shortcut: Automated Admin Model Registration

As we all know, Django has a rather lovely admin package. However, in a module’s admin.py, all desired models must manually be registered with django.contrib.admin.site.register.

No longer, say I. The only time I use the admin package is during development, I roll my own for production. So, it stands to reason that I wouldn’t want to spend much time registering models with admin, especially if I’m going to be changing the models around!

And so, as the cliché goes: without further ado, I present my snippet:

# Change to import the proper model object
from package import models
 
# Leave alone
from django.db.models.base import ModelBase
from django.contrib import admin
from inspect import getmembers
 
for model in getmembers(models):
  if type(model[1]) == ModelBase: # model[1] is the actual object
    admin.site.register(model[1])

The primary downside with this is that there’s a lack of customization. Although, as I said, I use the admin views only for development, so customization is most often not a concern of mine.

  • Share/Bookmark
Posted in Programming | Tagged , , | Leave a comment

Knowing When To Cease Development

I had started this project for two reasons: first, I had another project in mind that needed to access Google Voice; but knew of no way to do so; and second, I wanted to provide a way for developers to easily access Google Voice.

My idea was to access Google Voice’s internal API, parse it with lxml and cjson, and keep the results stored in classes specific to the type of data to make utilizing Google Voice in any project a simple thing to do. However, as I was finishing up on a recent change of the conversation class to be Python properties, I decided that it would be fun to do a quick search for “Python Google Voice.” I had never done this before and figured enough time had passed due to a number of things (work, school, an accident I was recently in) that it was possible that something did indeed exist.

How right I was. I found a very nicely coded project on Google Code (originally GitHub, it appears) called PyGoogleVoice. Authored by Justin Quick and Joe McCall, I have emailed them to let them know that I am stepping down on my own version. A lot of the features that they have meet (and even exceed, such as stemming the project to support Asterisk) what I envisioned smsGV (now py-smsGV) behold.

I am still going to work on the project that had inspired me to originally create. Though, instead of using my own library, I have decided it proper to use Justin Quick and Joe McCall’s. It has been more finely tested, is better featured, and will continue to be updated while py-smsGV will not.

Also, for both the benefit of PyGoogleVoice, should they find inspiration, and other developers, I am going to still post my code to GitHub. It’s not as fine-tuned as I would like, it is not representative of my actual skill because certain parts of it are still written in an early ‘testing’ fashion and had yet to be refactored or rewritten and finalized. However, I’m not a very big fan of just destroying code. Knowledge and inspiration can come from many places, possibly including my code, and so I have no problem hesitating to post it, even in its incomplete stage.

This post is just to let everyone know about the other Python Google Voice project in existence and to keep anyone who had been waiting on mine from anticipating or being anxious. I’ll post more about any lessons learned from the coding I had done on this as well as more about the project I had in mind in the (hopefully near, depending on my accident recovery, schooling, and work) future.

  • Share/Bookmark
Posted in Programming | Tagged , , , | Leave a comment

Novice Tip: if key in {}, not {}.has_key()

I’m sure a lot of you know this already, but it’s always nice to share some information on the off-chance that someone doesn’t. I am actively working on a library and, when profiling the execution of the tokenizing methods, I noticed a large inefficiency with the has_key() function that only gets worse as the dictionary grows. I switched this to an if key in {} format and efficiency boosted by approximately 54%.

The reasoning is that Python’s in-operator is an “under-the-hood C-level call,” meaning that it operates at a much swifter pace as opposed to the has_key() Python way [1].

In subsequent reading I found a nice guide that, if you found this helpful, you might learn a thing or two from—Code Like a Pythonista: Idiomatic Python (Goodger, David). I personally did not know about Python’s interactive “_”—what a useful little character!

[1] Lundh, Fredrik. “dict.has_key(x) versus ‘x in dict’” 6 Dec 2006. Web. <http://mail.python.org/pipermail/python-list/2006-December/588627.html>.

  • Share/Bookmark
Posted in Programming | Tagged , , , , , | Leave a comment

A Small Delay in smsGV

Aside from a few new projects and developments for work, I have delayed the release of smsGV slightly (though its commits are always available publicly on GitHub—albeit not very recently updated, that’s to be soon changed).

It’s only fair that I let you all know the reason for the delay. It’s not because I don’t love smsGV or Google Voice anymore, I use it daily, but rather because I have traversed the Google Voice backend further and found a more optimized route to achieving my goals. Furthermore, I’ve found that using it will prepare the smsGV library for additional features that otherwise would not have been or would have been difficult and inefficient to implement.

That’s all for now. I just wanted to keep everyone posted on the progress.

  • Share/Bookmark
Posted in Programming | Tagged , , , , | Leave a comment

Paste2Upload—Completion Through Change

Preface

There are reasons for everything as I always recall in regular discussions with friends, family, and other acquaintances. Paste2Upload is not an exception, that’s for sure. An avid Lifehacker reader, I remind myself consistently that if there is a noted repetition in my daily life that it is necessary it be dealt with.

One thing that I do, without fail, throughout the day is open up a new tab in whichever browser I am feeling favourable to that day (mainly Firefox or Safari), navigate my way to Paste2, and paste a snippet of text; whether it be a funny conversation, an important selection of a website, or some code that I want to share quickly and efficiently. This works quite well, I must admit, but on the last note of the previous sentence there exists one issue with the current workflow: efficiency.

A Solution

Beginning

As we all know, especially the engineers of the crowd, there are many solutions to any given problem. Now, when I’m among a circle of my peers, I’ll make a point to insist that my solution is right. It’s all in good fun, just like they’d insist that theirs is right to me—it’s the engineer’s way.

And so, working diligently, I analyzed the situation at hand and came up with a solution (the right solution, I might add, to any of the aforementioned crowd). What I needed was clear:

A swift, efficient way to paste text—sans-browser. I don’t always work with a browser open, but I do often communicate with an instant messenger at hand, so I wanted to untie myself from that single necessity.

  • A system-wide solution—I work in a variety of environments and share an equal variety of ways that I obtain information to share. Again, snippets from various mediums including both conversations and code. [ Note: Although room exists for various implementations to be system-wide, the actual execution of such is not addressed directly in the code, though I do handle it in a way specific to Apple’s OS X. See a soon-to-follow post for more information. ]
  • Full Functionality—Paste2 supplies three fields, two of which are greatly important to me: language and “code.” Although the code field can be anything, as I’ve already stated twice above, the language field denotes options to format the text via syntax highlighting. Whether that be plain text, Python, MySQL, or other, I knew that it was necessary to implement this.

As you read through my implementation, please don’t hesitate to chime in with comments here and there. They’re never hushed away and are instead acted quite the opposite to, I welcome them. While around my peers for the effect of playful banter and competition I’ll insist that I’ve devised the end-all, be-all solutions, I welcome open-mindedness and request any suggestions. If they seem reasonable and well-placed and have a relevancy to the topic, I’ll implement them as necessary.

Implementation

My goals were outlined and the implementation of them became clear. My original vision with this was that I create a command-line based utility in Python that would allow me to execute something along the following lines:

./paste2 –verbose –language python –description “A little taste of some code that I wrote” [text]

An explanation is in line here:

  • Verbose—We all know that this usually means the program being noisier in its execution. For me, it simply meant that the program would output to stdout “Pasted to http://paste2.org/p/..”
  • Language—Working from the syntax highlighting options given on Paste2, this would do the obvious and allow me to specify a language to highlight for.
  • Description—On the revision of Paste2 that exists at the time of this writing, you can supply some context to your pasted information in a description field. This data will appear below your paste.
  • [text]—This one, although all options are optional, I did not specify because I wanted to note its impact on the end-product and how it existed in my original vision. The idea was that, if unspecified, the text would be supplied via a small clipboard module that I wrote (also in Python) to get the current clipboard data from the computer for Linux, Unix, Windows, and OS X-based operating systems.
  • Return Value—The return was always similar, the program would exit cleanly and leave the user with a newly set clipboard containing the Paste2 posting URL.

A Mutable Plan

As a testament to my earlier promise, I am never afraid to welcome new ideas or proposed changes. Talking with a good friend of mine, Will Donnelly, I showed him my code at its then-completed state. It functioned according to the specifications above. Being the kind and praising friend that he is, he immediately pointed out everything that he saw wrong with it.

His main complaint was that my mindset did not seem to embrace the “UNIXy” side of things. I asked him to expand and he pointed out that my program forced the user to have their clipboard modified (which would hinder various implementations), had the unnecessary (and unwelcomed) [-v, --verbose] flags, and that it accepted only input from the clipboard or via directly input text.

To me, that last part was not an issue until he expanded further on his complaint. As he put it, I was failing to meet the standard by not accepting input-by-file or input through stdin. This is when everything clicked: a change had to be made.

The Mutation

I overlooked the proposed changes and implemented them with ease. It wasn’t many lines of change, but the payoff was well worth it. The program now accepted input through both stdin and file (which was simple enough, since Python treats the former just as it would the latter).

The verbose flags were removed as the program would now always output the URL to stdout so that, in the UNIXy fashion that was so demanded, it could be piped wherever necessary—whether xsel (Linux) or pbcopy (OS X).

Text input was removed in favour of file-name specification, which could be specified as a single dash (“-”) to let the program know that stdin input was requested.

The End Product

The end product, distributed freely under the MIT License, can be viewed at its GitHub repository page. The code itself can be viewed directly from the GitHub website as well.

The Message

Although I wanted to take an opportunity to share this bit of code with everyone, and I hope others will find it useful to their daily lives in reducing repetition and increasing efficiency, I had a greater meaning to this post.

First, as my preface suggested, I wanted to stress to all programmers (or – if not a programmer, to those who may want to suggest a small project for me to tackle) that if you notice repetition and inefficiency through your daily life, this is ample opportunity to write some productive code and simplify your life.

Second, I want to remind everyone that—no matter the field that you work in—I know that it is easy to get an idea stuck and committed in your head, but don’t let that block you from the bigger picture. Always take a step back, share your idea with friends and family, and don’t shun their input away. Although you may think that your original idea is the end-all solution and will work exactly how you want it, you may find from a little bit of open-mindedness that other possibilities can branch outwards from a little seed. As was with my code above, clipboards were my main concern at the beginning. Toward the end, various implementations are much less limited.

  • Share/Bookmark
Posted in Programming | Tagged , , , | Leave a comment

smsGV – A Python Library to Interface Google Voice

The Problem

I jumped up and down with excitement when I received my Google Voice upgrade, for many reasons that excite me. First is being able to place calls through the number, and receive calls as well. Though, the most important was by far SMS. I do not have a messaging plan on my mobile because it is just plain expensive, but I do have a data plan on it: for work, for play, and because the price is certainly right.

The problem that I have with Google Voice at the moment, however, is that there are two ways to receive messages on my phone through my GV number:

  • Receive the message via SMS
  • Check via www.google.com/voice/m/
  • Now, given what I have already said, the first option is out right away. So that leaves the option behind door number two – using my browser to check for new messages. Option two introduces an issue that, for me, defeats the whole purpose of SMS: notification.

    My phone buzzes, dings, and changes the colours on my room’s walls whenever I receive a new email. (Okay, well, it does most of that). Sadly, it does not know when to set off its bells and whistles if the only way that it has to check for new messages is Pocket IE, Opera Mobile, or whichever other browser you prefer. This is an issue, since I don’t want to refresh the browser minutely, or even bi-minutely, to maintain a conversation with a friend.

    Why not email their number?

    Sure, you may point out that I can just email theirNumber@carrierSmsDomain.tld. I absolutely despise this method: it is tedious, prone to errors, and it means that I have to dig up all of these carrier emails, know if they change. Overall, it is simply a hassle, and hassles do not appeal to me.

    Alright, alright! We get it! On with “The Solution”

    The solution, in my humblest of opinions, is quite a simple one. Why not have Google Voice send new SMS messages to my email? It’s really quite an easy process, something that the “Big Grldquo; could implement with ease given they have direct access to the SMS receiving hooks. And yet, they have not. Not for a lack of request from their users, as numerous postings online show. Not from a lack of engineering and programming intelligence, as their Google Wave shows. Perhaps it is simply because the service is new and they do not want to overstuff it with potentially useless features. I truly do not know, I’d have to talk to Larry or Sergey to find out.

    So, rather than waiting and speculating if the multicoloured giant will ever release this feature, I’ve decided to implement it myself.

    How?

    First I had to inspect the Google Voice system to see what potential methods were available for me to use.

    The basic idea that I narrowed everything down with involves a lovely little friend of mine called Python, a module with the sweet name of “lxml,” and some inspection of the Google Voice system. At the time of this writing, I know what tactic I will be using because, well, I’ve already implemented it. The project is not released just yet because I’m still adding the gravy to my potatoes, but the core of my strategy has been prototyped, written, implemented, tested, and proven. The library uses a combination of Google’s mobile and “full” website, along with parsing the included JSON, in order to most efficiently and accurately retrieve new messages.

    Password handling.

    One obvious line of thinking is that I would have to store the passwords. This bothers me, since to make storing them useful I would either have to encrypt in such a way that decryption was swift (which would ultimately only be faux security at best), or I could store them plaintext.

    “Which way, then?” you may be asking. My answer is quite simple: “Neither.” I do not like storing such sensitive data plaintext, and upon further inspection it is not necessary. When the library processes a login request it will store a persistent cookie to ensure that the session lasts for as long as possible. Of course, exceptions where the cookie expires or shows as invalid are handled appropriately.

    • Share/Bookmark
    Posted in Programming | Tagged , , , | Leave a comment