Automatic SEO Optimization –> Test Drive it today !!!!

When Any and All URLs based on the CargoChief.Com domain leads the end-user to the CargoChief site you are free to explore SEO (Search Engine Optimization) simply by using whatever URLs you wish to use such as the following:

http://www.cargochief.com/book/your/next/shipment/through/us/

or

http://www.cargochief.com/helps/you/connect/with/shippers/

or

http://www.cargochief.com/gets/your/pallets/shipped/today/

or

Whatever your marketing people might wish to use… you can feel free to be as creative about your message and how your URLs are positioned in whatever search engines you may wish to use…

Yet another useful innovation you may wish to begin using today.

Go ahead and give it a try…  the URL you bookmark will be the SEO-friendly URL rather than the actual end-point even when the actual end-point takes you to the CargoChief Cloud.

Only works with http://www.CargoChief.Com or CargoChief.Com domains.

Never see another 404 page again !!!

Brought to you by Vyper Logix Corp, innovation for the 21st Century ad beyond.

Here’s what you won’t find coded using HTML 5 !!!!

HTML 5 ?!?  Huh ?!?

Here are 2 rather fun games that don’t use HTML 5 but do use Flash !!!

EdgeWorld

and

Galaxy Online II

Both of these games are fun and both make heavy use of Flash; both of these games will NEVER be coded using HTML 5 without Flash !!!

Why ???

Because HTML 5 without Flash is just too darned easy to hack !!! (See also: The End of JavaScript for the details…)

Heck, Flash is easy enough to hack but HTML 5 is just crazy easy to Hack… and by “Hack” I mean, I can make the silly thing do whatever I want including but not limited to being able to modify the runtime code being executed by my browser.

Any realtime multiplayer game coded using nothing but HTML 5 and JavaScript would simply be far too easy to hack to the point of making it just too easy for any suitably skilled person able to make this ill-fated HTML 5 game do whatever this suitably skilled person might want it to do including but not limited to making one’s in-game characters have god-like powers with infinite resources.

Flash is far more difficult to hack !!!

You can find tools one can use to hack a currently running Flash video game however – nobody gets to change the code without being forced to jump through some rather intense technical hoops and Flash-based SWFs can be obfuscated and encrypted where JavaScript cannot – in real terms.

Long Live Flash !!!

Hey, I just cannot be an Adobe-hater !!!

I happen to think Flash has more to offer than HTML 5 even though there are those who seem to want Flash to cease to exist… I think Flash is here to stay !!!

I never thought I might ever find a Free-to-Play Flash game I might be tempted to dump real money into and then I bumped into Galaxy Online II and suddenly I began to feel as-though I might be able to take-over the whole Galaxy… now I think Free-To-Play games can be really super cool as well as rather lucrative when they are well done !!!

Enjoy the games !!!

 

SleepyMongoose meets the Python after dark

 

For a while now I have been looking for a reasonable

REST-based NoSQL Database I can use from the Google App Engine just to avoid
having to pay Google for their database fees.

Earlier today… I was able to make the SleepyMongoose
snuggle-up with the Python for some after-hours fun in the dark.

SleepyMongoose

You can read-up about SleepyMongoose here.

It’s a REST-based interface for MongoDB that runs as a lightweight Python HTTP
Server – I will eventually get around to making this SleepyMongoose wake-up by
shoving some Stackless Python into it just for fun and because Stackless always
makes Python work better.

So what does the SleepyMongoose need once I get around to
using it from the Google App Engine ?

SleepyMongoose needs a slick Python wrapper so I don’t gotta
deal with all that REST stuff which after-all the REST interface is only needed
because Google doesn’t seem to care much about bandwidth consumption for
anything other than their own database and it just makes sense to make Google
give me a FREE No-Cost MongoDb Proxy which is what this is all leading to
anyway.

SleepyMongoose meets the Python

 So, since I am a pretty good Python coder I chose to whip-up

a Magic little object that allows me to get away from REST and right into
Python objects.

I implemented the SleepyMongoose API as documented in their Wiki.

Keep in mind the code presented here requires the Vyper
Logix Library as found here (shameless
plug, of course
).

Here’s a sample of what the usage looks like:

from vyperlogix import
mongodb

 

if (__name__ == ‘__main__’):

    import os,sys

   

    sm = mongodb.SleepyMongoose(‘127.0.0.1:27080’).db(‘gps_1M’).collection(‘num_connections’)

    results = sm.connect()

    print ‘sm.connect() #1
–> ‘
,results

 

    results = sm.server(‘mongodb://127.0.0.1:65535’).connect()

    print ‘sm.connect() #2
–> ‘
,results

 

    results = sm.server(‘mongodb://127.0.0.1:65535’).name(‘backup’).connect()

    print ‘sm.connect() #3
–> ‘
,results

 

    results = sm.docs({“x”:2}).insert()

    print ‘sm.insert() #1
–> ‘
,results

 

    results = sm.find({“x”:2})

    print ‘sm.find() #1 –>
,results

 

    results = sm.criteria({“x”:2}).remove()

    print ‘sm.remove() #1
–> ‘
,results

 

    results = sm.docs().insert({“x”:3})

    print ‘sm.insert() #1
–> ‘
,results

 

    results = sm.find({“x”:3})

    print ‘sm.find() #2 –>
,results

 

    results = sm.remove({“x”:3})

    print ‘sm.remove() #2
–> ‘
,results

 

    results = sm.docs([{“x”:2},{“x”:3}]).insert()

    print ‘sm.insert() #3
–> ‘
,results

 

    results = sm.criteria({“x”:2}).remove()

    print ‘sm.remove() #3
–> ‘
,results

 

    results = sm.criteria([{“x”:3}]).remove()

    print ‘sm.remove() #4
–> ‘
,results

 

    results = sm.insert([{“x”:2},{“x”:3}])

    print ‘sm.insert() #4
–> ‘
,results

 

    results = sm.remove({“x”:2})

    print ‘sm.remove() #5
–> ‘
,results

 

    results = sm.remove([{“x”:3}])

    print ‘sm.remove() #6
–> ‘
,results

    pass

Here’s the rest of the code:  (Simple and to the point, no nonsense code,
in a few hours…)

__copyright__ = “””\

(c). Copyright 2008-2011,
Vyper Logix Corp., All Rights Reserved.

 

Published under Creative
Commons License

(http://creativecommons.org/licenses/by-nc/3.0/)

restricted to
non-commercial educational use only.,

 

http://www.VyperLogix.com
for details

 

THE AUTHOR VYPER LOGIX
CORP DISCLAIMS ALL WARRANTIES WITH REGARD TO

THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND

FITNESS, IN NO EVENT SHALL
THE AUTHOR BE LIABLE FOR ANY SPECIAL,

INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING

FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT,

NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION

WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE !

 

USE AT YOUR OWN RISK.

“””

import logging

 

import urllib2

 

import simplejson

 

from vyperlogix import
misc

from vyperlogix.misc import _utils

from vyperlogix.classes import MagicObject

 

arg0 = lambda args:args[0] if (misc.isIterable(args)) and (len(args) > 0) and (misc.isString(args[0])) else None

list0 = lambda args:args[0] if (misc.isIterable(args)) and (len(args) > 0) and ( (misc.isList(args[0])) or (misc.isDict(args[0])) ) else []

int0 = lambda args:args[0] if (misc.isIterable(args)) and (len(args) > 0) and (misc.isInteger(args[0])) else None

bool0 = lambda args:args[0] if (misc.isIterable(args)) and (len(args) > 0) and (misc.isBooleanString(args[0])) else None

 

__only__ = lambda value,target:value if (str(value).lower().capitalize() == str(target).lower().capitalize()) else None

 

class SleepyMongoose(MagicObject.MagicObject2):

    def __init__(self,sleepy_mongoose):

        ”’

        See
also: https://github.com/kchodorow/sleepy.mongoose/wiki/

        ”’

        toks = sleepy_mongoose.split(‘:’)

        try:

            self.__sleepy_mongoose__ =
sleepy_mongoose if (misc.isString(toks[0]) and misc.isInteger(int(toks[-1]))) else None

        except:

            self.__sleepy_mongoose__ =
None

        self.__database__ = None

        self.__collection__ = None

        self.__server__ = None

        self.__server_name__ = None

        self.__last_exception__ =
None

        self.__n__ = None

        self.__docs__ = None

        self.__criteria__ = None

        self.__newobj__ = None

        self.__fields__ = None

        self.__sort__ = None

        self.__skip__ = None

        self.__limit__ = None

        self.__explain__ = None

        self.__batch_size__ = None

        self.__id__ = None

       

    def __http_get__(self,url):

        data = None

        try:

            response = urllib2.urlopen(url)

            json = response.read()

            data = simplejson.loads(json)

        except Exception, ex:

            self.__last_exception__ =
_utils.formattedException(details=ex)

            data = None

        return data

 

    def __http_post__(self,url,parms=()):

        from vyperlogix.url._urllib2 import
http_post

        data = None

        try:

            json = http_post(url,parms)

            data = simplejson.loads(json)

        except Exception, ex:

            self.__last_exception__ =
_utils.formattedException(details=ex)

            data = None

        return data

 

    def __handle_exceptions__(self):

        if (not self.__sleepy_mongoose__):

            logging.error(‘ERROR: Cannot understand “SleepyMongoose(%s)”‘
% (self.__sleepy_mongoose__))

        elif (not self.__database__):

            logging.error(‘ERROR: Cannot understand “db(%s)”‘ % (self.__database__))

        elif (not self.__collection__):

            logging.error(‘ERROR: Cannot understand “collection(%s)”‘
% (self.__collection__))

   

    def __getattr__(self,name):

        self.__n__ = name

        return super(SleepyMongoose, self).__getattr__(name)

 

    def __call__(self,*args,**kwargs):

        if (self.__n__ == ‘db’):

            self.__database__ = arg0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘collection’):

            self.__collection__ =
arg0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘server’):

            self.__server__ = arg0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘name’):

            self.__server_name__ =
arg0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘docs’):

            self.__docs__ = list0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘criteria’):

            self.__criteria__ = list0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘fields’):

            self.__fields__ = list0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘sort’):

            self.__sort__ = list0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘skip’):

            self.__skip__ = int0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘limit’):

            self.__limit__ = int0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘batch_size’):

            self.__batch_size__ =
int0(args)

            self.__reset_magic__()

        elif (self.__id__ == ‘id’):

            self.__id__ = int0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘explain’):

            self.__explain__ =
__only__(bool0(args),‘True’)

            self.__reset_magic__()

        elif (self.__n__ == ‘newobj’):

            self.__newobj__ = list0(args)

            self.__reset_magic__()

        elif (self.__n__ == ‘find’):

            if (self.__sleepy_mongoose__)
and (self.__database__) and (self.__collection__):

                p = []

                if (self.__criteria__):

                    p.append(tuple([“criteria”,simplejson.dumps(self.__criteria__)]))

                    self.__criteria__ = None

                if (self.__fields__):

                    p.append(tuple([“fields”,simplejson.dumps(self.__fields__)]))

                    self.__fields__ = None

                if (self.__sort__):

                    p.append(tuple([“sort”,simplejson.dumps(self.__sort__)]))

                    self.__sort__ = None

                if (self.__skip__):

                    p.append(tuple([“skip”,‘%d’%(self.__skip__)]))

                    self.__skip__ = None

                if (self.__limit__):

                    p.append(tuple([“limit”,‘%d’%(self.__limit__)]))

                    self.__limit__ = None

                if (self.__explain__):

                    p.append(tuple([“explain”,‘%s’%(self.__explain__)]))

                    self.__explain__ = None

                if (self.__batch_size__):

                    p.append(tuple([“batch_size”,‘%d’%(self.__batch_size__)]))

                    self.__batch_size__ = None

                if (self.__server_name__):

                    p.append(tuple([“name”,self.__server_name__]))

                url = http://%s/%s/%s/_%s’
% (self.__sleepy_mongoose__,self.__database__,self.__collection__,self.__n__)

                return self.__http_post__(url,tuple(p))

            else:

                self.__handle_exceptions__()

            self.__reset_magic__()

        elif (self.__n__ == ‘insert’):

            if (self.__sleepy_mongoose__)
and (self.__database__) and (self.__collection__):

                p = []

                if (self.__docs__):

                    p.append(tuple([“docs”,simplejson.dumps(self.__docs__)]))

                    self.__docs__ = None

                else:

                    p.append(tuple([“docs”,simplejson.dumps(list0(args))]))

                    self.__docs__ = None

                if (self.__server_name__):

                    p.append(tuple([“name”,self.__server_name__]))

                url = http://%s/%s/%s/_%s’
% (self.__sleepy_mongoose__,self.__database__,self.__collection__,self.__n__)

                return self.__http_post__(url,tuple(p))

            else:

                self.__handle_exceptions__()

            self.__reset_magic__()

        elif (self.__n__ == ‘update’):

            if (self.__sleepy_mongoose__)
and (self.__database__) and (self.__collection__):

                p = []

                if (self.__criteria__):

                    p.append(tuple([“criteria”,simplejson.dumps(self.__criteria__)]))

                    self.__criteria__ = None

                if (self.__newobj__):

                    p.append(tuple([“newobj”,simplejson.dumps(self.__newobj__)]))

                    self.__newobj__ = None

                if (self.__server_name__):

                    p.append(tuple([“name”,self.__server_name__]))

                url = http://%s/%s/%s/_%s’
% (self.__sleepy_mongoose__,self.__database__,self.__collection__,self.__n__)

                return self.__http_post__(url,tuple(p))

            else:

                self.__handle_exceptions__()

            self.__reset_magic__()

        elif (self.__n__ == ‘more’):

            if (self.__sleepy_mongoose__)
and (self.__database__) and (self.__collection__):

                p = []

                if (self.__id__):

                    p.append(tuple([“id”,‘%d’%(self.__id__)]))

                    self.__id__ = None

                if (self.__batch_size__):

                    p.append(tuple([“batch_size”,‘%d’%(self.__batch_size__)]))

                    self.__batch_size__ = None

                if (self.__server_name__):

                    p.append(tuple([“name”,self.__server_name__]))

                q = ‘?’+‘&’.join([‘=’.join(list(t)) for t in p]) if (len(p) > 0) else

                url = http://%s/%s/%s/_%s%s’
% (self.__sleepy_mongoose__,self.__database__,self.__collection__,self.__n__,q)

                return self.__http_get__(url)

            else:

                self.__handle_exceptions__()

            self.__reset_magic__()

        elif (self.__n__ == ‘cmd’):

            if (self.__sleepy_mongoose__)
and (self.__database__):

                p = []

                _c_ = list0(args)

                if (_c_):

                    p.append(tuple([“cmd”,simplejson.dumps(_c_)]))

                url = http://%s/%s/_%s’ % (self.__sleepy_mongoose__,self.__database__,self.__n__)

                return self.__http_post__(url,tuple(p))

            else:

                self.__handle_exceptions__()

            self.__reset_magic__()

        elif (self.__n__ == ‘remove’):

            if (self.__sleepy_mongoose__)
and (self.__database__) and (self.__collection__):

                p = []

                if (self.__criteria____):

                    p.append(tuple([“criteria”,simplejson.dumps(self.__criteria____)]))

                    self.__criteria____ = None

                else:

                    p.append(tuple([“criteria”,simplejson.dumps(list0(args))]))

                    self.__criteria____ = None

                if (self.__server_name__):

                    p.append(tuple([“name”,self.__server_name__]))

                url = http://%s/%s/%s/_%s’
% (self.__sleepy_mongoose__,self.__database__,self.__collection__,self.__n__)

                return self.__http_post__(url,tuple(p))

            else:

                self.__handle_exceptions__()

            self.__reset_magic__()

        elif (self.__n__ == ‘connect’):

            _token = self.__n__

            if (self.__sleepy_mongoose__):

                p = []

                if (self.__server__):

                    p.append(tuple([“server”,self.__server__]))

                if (self.__server_name__):

                    p.append(tuple([“name”,self.__server_name__]))

                url = http://%s/_%s’ % (self.__sleepy_mongoose__,_token)

                return self.__http_post__(url,tuple(p))

            else:

                self.__handle_exceptions__()

            self.__reset_magic__()

        else:

            logging.debug(‘DEBUG: Cannot understand “%s(%s,%s)”‘ % (self.n,args,kwargs))

        return self

 

 

First Impressions of iMac Core i7 + OS/X Lion

OS/X Lion tends to break some OS/X Leopard software…

I don’t have a list for you here… suffice it to say if you wanted to upgrade to Lion right now, you might want to wait a good long while to let everybody else update their Open Source code or you may run into some issues.

SVN Clients for OS/X Lion are a pain…

Apple needs to ship Parallels Desktop in OS/X

OS/X cannot do it all !

This was the first thing I had to learn about OS/X… not being used heavily by software developers… some Open Source goodies one might want to use just won’t be available or won’t be as nice as one might find when working with Windows.

For instance, there ain’t nothing like Tortoise SVN for OS/X and close don’t cut it.  Parallels Desktop running Windows 7 Ultimate takes care of this problem.

Setting up a simple SSH Server in OS/X is a pain – simple to do with Linux but not so simple with OS/X – seems like Steve Jobs feels like nobody should be able to use OS/X Leopard as a headless file server cuz there ain’t no easy way to get a simple SSH Server up and running without Parallels Desktop running Ubuntu, for instance.  Or maybe I just don’t get the genius behind OS/X which could be my problem… in any case, if I gotta spend 3+ hrs trying to make a simple SSH Server run in OS/X and it’s not working to the point of I gotta do some research then you can forget me thinking it’s gonna happen anytime soon.  Setting up an SSH Server literally takes seconds for just about any Linux including installing them keys so I can disable password logins – nobody needs to use my SSH Server unless they got a key with a passphrase – seems like I just gotta have security.

Parallels Desktop running Ubuntu Server 11.04 solves this problem.

The bottom line is… OS/X alone is a huge waste of time for a software developer unless you make sure to install and use Parallels Desktop 6 cuz you will have to use Windows 7 and/or Ubuntu or some combination of these flavors.

Microsoft should cozy up with the Parallels folks too

I have been saying this for several years by now but… Windows needs to be combined with Linux and Ubuntu makes the most sense.

Parallels for Windows with Ubuntu 11.04 would do the trick.  VmWare and VirtualBox can’t hold a candle to Parallels Desktop 6 – sorry but I have been smitten by Parallels Desktop 6.

Makes more sense to run Mac OS/X in Windows that vice-versa

Every so often someone asks me to take some App I wrote for Windows and run it on a Mac – Adobe AIR 2.6+ makes this a breeze especially when I can simulate the Windows File Naming conventions in Mac OS/X using a single AS3 function… been there and done that.

What sucks about this is having to drop the bucks for a Mac just to make this happen with all the subtleties of Mac OS/X you just gotta have the hardware to make this happen sometimes.  Saves money and time if Parallels Desktop for Windows would be as good as Parallels Desktop for OS/X so someone like me could run Mac OS/X in Windows since using Windows makes development a breeze as compared to how this happens in Mac OS/X or doesn’t happen as the case may be.

Mac OS/X handles Apps in a childish way

Why does Steve Jobs get so anal about how you can use Apps in Mac OS/X ?!?

I can only use one App at a time… the App I want to use must be in focus… this is the only way the one menu bar for the whole OS will allow me to interact with the App… me thinks Steve Jobs has never used OS/X for doing anything serious.

Windows allows me to do whatever I want whenever I want however I want.

Windows just works better for Apps.  Sorry but this is how I like to roll… tons of windows open at the same time, I get to use them all without having to tell the OS which one I want to use next.

Mac OS/X would be way to clumsy for serious development let alone power use.

Getting back to work using Windows…

By the way… I happen to own an iMac Core i7 fully loaded with all the bells and whistles… along with not one but two Mac Minis.  Just didn’t want you to think I am some kind of Windows snob.  I just happen to think Windows lets me rock-and-roll the way I want to and OS/X wants me to do just one thing at a time before moving along to the next one thing I want to do.  Easier to handle multitasking this way and not only because this reminds me of cooperative multitasking which is far easier to code than real multitasking but then Microsoft is just more serious about their OS’s than Apple could ever be based on my experience with using OS’s for hard-core programming.

This is why I love HTML5 !!!

Kamkar’s API comes just days after a lawsuit was filed against a company for making use of the HTML5 Web SQL database storage capabilities that come with Safari, Chrome, and Opera. First exposed by Ars Technica, this particular company (Ringleader Digital) made an effort to keep a persistent user ID even when the user deleted cookies and their HTML5 databases, telling Ars that the only way to opt out of the tracking was to use the company’s opt-out link (which gives the user no confirmation that they are, in fact, opted out.)

See also:  http://arstechnica.com/web/news/2010/09/evercookie-escalates-the-zombie-cookie-war-by-raising-awareness.ars

I don’t know about the rest of you but this strikes me as being just way too cool for school !

 

%d bloggers like this: